From 588543a0946f1dbf0f1dd5135f8f6447486dc183 Mon Sep 17 00:00:00 2001 From: djm <> Date: Fri, 29 Apr 2005 05:37:32 +0000 Subject: import of openssl-0.9.7g; tested on platforms from alpha to zaurus, ok deraadt@ --- src/lib/libcrypto/Attic/Makefile | 347 ++-- src/lib/libcrypto/aes/Makefile | 103 + src/lib/libcrypto/asn1/Makefile | 1150 +++++++++++ src/lib/libcrypto/asn1/a_gentm.c | 12 +- src/lib/libcrypto/asn1/a_utctm.c | 11 +- src/lib/libcrypto/bf/Makefile | 116 ++ src/lib/libcrypto/bio/Makefile | 214 ++ src/lib/libcrypto/bn/Makefile | 331 ++++ src/lib/libcrypto/bn/bntest.c | 2 +- src/lib/libcrypto/buffer/Makefile | 92 + src/lib/libcrypto/cast/Makefile | 120 ++ src/lib/libcrypto/comp/Makefile | 113 ++ src/lib/libcrypto/conf/Makefile | 181 ++ src/lib/libcrypto/crypto-lib.com | 8 +- src/lib/libcrypto/des/FILES0 | 2 +- src/lib/libcrypto/des/Makefile | 314 +++ src/lib/libcrypto/des/des_old.c | 2 +- src/lib/libcrypto/des/destest.c | 4 +- src/lib/libcrypto/dh/Makefile | 131 ++ src/lib/libcrypto/dsa/Makefile | 173 ++ src/lib/libcrypto/dso/Makefile | 140 ++ src/lib/libcrypto/dso/dso_win32.c | 2 +- src/lib/libcrypto/ec/Makefile | 126 ++ src/lib/libcrypto/engine/Makefile | 536 +++++ src/lib/libcrypto/engine/hw_cryptodev.c | 12 +- src/lib/libcrypto/engine/vendor_defns/sureware.h | 2 +- src/lib/libcrypto/err/Makefile | 118 ++ src/lib/libcrypto/evp/Makefile | 1076 ++++++++++ src/lib/libcrypto/evp/c_allc.c | 8 + src/lib/libcrypto/evp/c_alld.c | 2 +- src/lib/libcrypto/evp/evp_test.c | 34 +- src/lib/libcrypto/evp/evptests.txt | 107 +- src/lib/libcrypto/evp/m_md2.c | 1 + src/lib/libcrypto/evp/m_mdc2.c | 1 + src/lib/libcrypto/evp/m_sha.c | 3 +- src/lib/libcrypto/hmac/Makefile | 99 + src/lib/libcrypto/idea/Makefile | 92 + src/lib/libcrypto/krb5/Makefile | 88 + src/lib/libcrypto/lhash/Makefile | 91 + src/lib/libcrypto/md2/Makefile | 93 + src/lib/libcrypto/md2/md2.h | 3 + src/lib/libcrypto/md2/md2_dgst.c | 4 +- src/lib/libcrypto/md4/Makefile | 92 + src/lib/libcrypto/md5/Makefile | 128 ++ src/lib/libcrypto/mdc2/Makefile | 98 + src/lib/libcrypto/mdc2/mdc2.h | 4 +- src/lib/libcrypto/o_str.h | 67 + src/lib/libcrypto/objects/Makefile | 122 ++ src/lib/libcrypto/objects/obj_dat.h | 79 +- src/lib/libcrypto/objects/obj_mac.h | 72 + src/lib/libcrypto/ocsp/Makefile | 291 +++ src/lib/libcrypto/pem/Makefile | 335 ++++ src/lib/libcrypto/perlasm/x86ms.pl | 1 + src/lib/libcrypto/perlasm/x86nasm.pl | 8 +- src/lib/libcrypto/perlasm/x86unix.pl | 7 +- src/lib/libcrypto/pkcs12/Makefile | 415 ++++ src/lib/libcrypto/pkcs7/Makefile | 241 +++ src/lib/libcrypto/rand/Makefile | 196 ++ src/lib/libcrypto/rand/md_rand.c | 9 + src/lib/libcrypto/rand/rand_egd.c | 10 +- src/lib/libcrypto/rand/rand_unix.c | 35 +- src/lib/libcrypto/rand/rand_vms.c | 5 +- src/lib/libcrypto/rand/rand_win.c | 104 +- src/lib/libcrypto/rc2/Makefile | 92 + src/lib/libcrypto/rc4/Makefile | 123 ++ src/lib/libcrypto/rc4/asm/rc4-ia64.S | 157 ++ src/lib/libcrypto/rc5/Makefile | 110 ++ src/lib/libcrypto/rc5/rc5.h | 5 +- src/lib/libcrypto/ripemd/Makefile | 111 ++ src/lib/libcrypto/rsa/Makefile | 239 +++ src/lib/libcrypto/sha/Makefile | 127 ++ src/lib/libcrypto/sha/shatest.c | 4 +- src/lib/libcrypto/stack/Makefile | 86 + src/lib/libcrypto/txt_db/Makefile | 86 + src/lib/libcrypto/ui/Makefile | 115 ++ src/lib/libcrypto/util/cygwin.sh | 14 +- src/lib/libcrypto/util/domd | 10 +- src/lib/libcrypto/util/extract-names.pl | 8 +- src/lib/libcrypto/util/fixNT.sh | 6 +- src/lib/libcrypto/util/libeay.num | 86 +- src/lib/libcrypto/util/mk1mf.pl | 20 +- src/lib/libcrypto/util/mkdef.pl | 17 +- src/lib/libcrypto/util/mkfiles.pl | 10 +- src/lib/libcrypto/util/mklink.pl | 1 + src/lib/libcrypto/util/opensslwrap.sh | 22 + src/lib/libcrypto/util/pl/BC-16.pl | 15 +- src/lib/libcrypto/util/pl/BC-32.pl | 13 +- src/lib/libcrypto/util/pl/Mingw32.pl | 11 +- src/lib/libcrypto/util/pl/OS2-EMX.pl | 11 +- src/lib/libcrypto/util/pl/VC-16.pl | 13 +- src/lib/libcrypto/util/pl/VC-32.pl | 11 +- src/lib/libcrypto/util/pl/VC-CE.pl | 11 +- src/lib/libcrypto/util/pl/linux.pl | 9 +- src/lib/libcrypto/util/pl/ultrix.pl | 11 +- src/lib/libcrypto/util/pl/unix.pl | 9 +- src/lib/libcrypto/util/pod2mantest | 2 +- src/lib/libcrypto/util/selftest.pl | 4 +- src/lib/libcrypto/util/shlib_wrap.sh | 70 + src/lib/libcrypto/x509/Makefile | 592 ++++++ src/lib/libcrypto/x509v3/Makefile | 645 ++++++ src/lib/libssl/src/CHANGES | 120 ++ src/lib/libssl/src/Configure | 126 +- src/lib/libssl/src/FAQ | 47 +- src/lib/libssl/src/INSTALL | 4 +- src/lib/libssl/src/INSTALL.DJGPP | 47 +- src/lib/libssl/src/INSTALL.W32 | 13 +- src/lib/libssl/src/Makefile | 930 +++++++++ src/lib/libssl/src/Makefile.org | 158 +- src/lib/libssl/src/NEWS | 24 +- src/lib/libssl/src/PROBLEMS | 13 +- src/lib/libssl/src/README | 20 +- src/lib/libssl/src/VMS/VMSify-conf.pl | 34 + src/lib/libssl/src/VMS/mkshared.com | 8 + src/lib/libssl/src/apps/CA.pl | 27 +- src/lib/libssl/src/apps/CA.pl.in | 25 +- src/lib/libssl/src/apps/CA.sh | 10 +- src/lib/libssl/src/apps/Makefile | 1168 +++++++++++ src/lib/libssl/src/apps/apps.c | 206 +- src/lib/libssl/src/apps/apps.h | 12 +- src/lib/libssl/src/apps/asn1pars.c | 10 + src/lib/libssl/src/apps/ca.c | 66 +- src/lib/libssl/src/apps/crl.c | 6 +- src/lib/libssl/src/apps/dgst.c | 88 +- src/lib/libssl/src/apps/enc.c | 71 +- src/lib/libssl/src/apps/makeapps.com | 10 +- src/lib/libssl/src/apps/openssl-vms.cnf | 95 +- src/lib/libssl/src/apps/openssl.c | 25 +- src/lib/libssl/src/apps/openssl.cnf | 57 +- src/lib/libssl/src/apps/pkcs12.c | 28 +- src/lib/libssl/src/apps/pkcs8.c | 289 ++- src/lib/libssl/src/apps/prime.c | 128 ++ src/lib/libssl/src/apps/progs.h | 2 + src/lib/libssl/src/apps/req.c | 24 +- src/lib/libssl/src/apps/s_client.c | 9 + src/lib/libssl/src/apps/s_socket.c | 1 - src/lib/libssl/src/apps/speed.c | 1 + src/lib/libssl/src/apps/verify.c | 1 + src/lib/libssl/src/apps/x509.c | 57 +- src/lib/libssl/src/certs/demo/ca-cert.pem | 33 + src/lib/libssl/src/certs/demo/dsa-ca.pem | 43 + src/lib/libssl/src/certs/demo/dsa-pca.pem | 49 + src/lib/libssl/src/certs/demo/nortelCA.pem | 16 + src/lib/libssl/src/certs/demo/pca-cert.pem | 33 + src/lib/libssl/src/certs/demo/timCA.pem | 16 + src/lib/libssl/src/certs/demo/tjhCA.pem | 15 + src/lib/libssl/src/certs/demo/vsigntca.pem | 18 + src/lib/libssl/src/certs/eng1.pem | 23 + src/lib/libssl/src/certs/eng2.pem | 23 + src/lib/libssl/src/certs/eng3.pem | 34 + src/lib/libssl/src/certs/eng4.pem | 23 + src/lib/libssl/src/certs/eng5.pem | 23 + src/lib/libssl/src/certs/expired/RegTP-4R.pem | 19 + src/lib/libssl/src/certs/expired/factory.pem | 15 + src/lib/libssl/src/certs/expired/rsa-cca.pem | 19 + src/lib/libssl/src/certs/expired/vsign2.pem | 18 + src/lib/libssl/src/certs/wellsfgo.pem | 23 + src/lib/libssl/src/config | 140 +- src/lib/libssl/src/crypto/Makefile | 347 ++-- src/lib/libssl/src/crypto/aes/Makefile | 103 + src/lib/libssl/src/crypto/aes/aes.h | 15 + src/lib/libssl/src/crypto/aes/aes_cbc.c | 44 +- src/lib/libssl/src/crypto/aes/aes_cfb.c | 68 + src/lib/libssl/src/crypto/aes/aes_core.c | 4 + src/lib/libssl/src/crypto/aes/aes_ctr.c | 35 +- src/lib/libssl/src/crypto/aes/aes_locl.h | 2 +- src/lib/libssl/src/crypto/asn1/Makefile | 1150 +++++++++++ src/lib/libssl/src/crypto/asn1/a_bitstr.c | 8 +- src/lib/libssl/src/crypto/asn1/a_digest.c | 7 +- src/lib/libssl/src/crypto/asn1/a_enum.c | 2 +- src/lib/libssl/src/crypto/asn1/a_gentm.c | 12 +- src/lib/libssl/src/crypto/asn1/a_int.c | 21 +- src/lib/libssl/src/crypto/asn1/a_print.c | 2 +- src/lib/libssl/src/crypto/asn1/a_set.c | 23 +- src/lib/libssl/src/crypto/asn1/a_strex.c | 9 +- src/lib/libssl/src/crypto/asn1/a_type.c | 5 +- src/lib/libssl/src/crypto/asn1/a_utctm.c | 11 +- src/lib/libssl/src/crypto/asn1/a_verify.c | 8 +- src/lib/libssl/src/crypto/asn1/asn1.h | 8 +- src/lib/libssl/src/crypto/asn1/asn1_err.c | 8 +- src/lib/libssl/src/crypto/asn1/asn1_lib.c | 1 + src/lib/libssl/src/crypto/asn1/evp_asn1.c | 6 +- src/lib/libssl/src/crypto/asn1/p5_pbe.c | 26 +- src/lib/libssl/src/crypto/asn1/p5_pbev2.c | 6 +- src/lib/libssl/src/crypto/asn1/t_bitst.c | 5 +- src/lib/libssl/src/crypto/asn1/x_crl.c | 40 +- src/lib/libssl/src/crypto/asn1/x_name.c | 19 +- src/lib/libssl/src/crypto/asn1/x_pubkey.c | 50 +- src/lib/libssl/src/crypto/bf/Makefile | 116 ++ src/lib/libssl/src/crypto/bf/bf_skey.c | 3 +- src/lib/libssl/src/crypto/bf/blowfish.h | 5 +- src/lib/libssl/src/crypto/bio/Makefile | 214 ++ src/lib/libssl/src/crypto/bio/b_print.c | 2 +- src/lib/libssl/src/crypto/bio/bio.h | 1 + src/lib/libssl/src/crypto/bio/bss_file.c | 16 +- src/lib/libssl/src/crypto/bn/Makefile | 331 ++++ src/lib/libssl/src/crypto/bn/asm/ia64.S | 217 +- src/lib/libssl/src/crypto/bn/asm/ppc.pl | 2081 ++++++++++++++++++++ src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c | 54 +- src/lib/libssl/src/crypto/bn/bn_mont.c | 2 +- src/lib/libssl/src/crypto/bn/bntest.c | 2 +- src/lib/libssl/src/crypto/buffer/Makefile | 92 + src/lib/libssl/src/crypto/cast/Makefile | 120 ++ src/lib/libssl/src/crypto/cast/c_skey.c | 4 +- src/lib/libssl/src/crypto/cast/cast.h | 5 +- src/lib/libssl/src/crypto/comp/Makefile | 113 ++ src/lib/libssl/src/crypto/comp/c_zlib.c | 13 +- src/lib/libssl/src/crypto/conf/Makefile | 181 ++ src/lib/libssl/src/crypto/conf/conf_def.c | 5 + src/lib/libssl/src/crypto/cryptlib.c | 130 +- src/lib/libssl/src/crypto/crypto-lib.com | 8 +- src/lib/libssl/src/crypto/crypto.h | 61 +- src/lib/libssl/src/crypto/des/FILES0 | 2 +- src/lib/libssl/src/crypto/des/Makefile | 314 +++ src/lib/libssl/src/crypto/des/cfb64ede.c | 112 ++ src/lib/libssl/src/crypto/des/des.h | 6 +- src/lib/libssl/src/crypto/des/des_enc.c | 8 + src/lib/libssl/src/crypto/des/des_old.c | 2 +- src/lib/libssl/src/crypto/des/destest.c | 4 +- src/lib/libssl/src/crypto/des/ecb3_enc.c | 4 +- src/lib/libssl/src/crypto/des/set_key.c | 4 + src/lib/libssl/src/crypto/dh/Makefile | 131 ++ src/lib/libssl/src/crypto/dh/dh_check.c | 4 + src/lib/libssl/src/crypto/dh/dh_err.c | 2 +- src/lib/libssl/src/crypto/dh/dh_gen.c | 6 + src/lib/libssl/src/crypto/dh/dh_key.c | 4 + src/lib/libssl/src/crypto/dsa/Makefile | 173 ++ src/lib/libssl/src/crypto/dsa/dsa.h | 4 + src/lib/libssl/src/crypto/dsa/dsa_gen.c | 45 +- src/lib/libssl/src/crypto/dsa/dsa_key.c | 2 + src/lib/libssl/src/crypto/dsa/dsa_ossl.c | 2 + src/lib/libssl/src/crypto/dsa/dsa_sign.c | 12 + src/lib/libssl/src/crypto/dsa/dsa_vrf.c | 8 + src/lib/libssl/src/crypto/dso/Makefile | 140 ++ src/lib/libssl/src/crypto/dso/dso_win32.c | 2 +- src/lib/libssl/src/crypto/ec/Makefile | 126 ++ src/lib/libssl/src/crypto/engine/Makefile | 536 +++++ src/lib/libssl/src/crypto/engine/hw_cryptodev.c | 12 +- .../src/crypto/engine/vendor_defns/sureware.h | 2 +- src/lib/libssl/src/crypto/err/Makefile | 118 ++ src/lib/libssl/src/crypto/err/err.c | 2 + src/lib/libssl/src/crypto/err/err.h | 3 + src/lib/libssl/src/crypto/err/err_all.c | 4 + src/lib/libssl/src/crypto/err/openssl.ec | 1 + src/lib/libssl/src/crypto/evp/Makefile | 1076 ++++++++++ src/lib/libssl/src/crypto/evp/bio_md.c | 19 +- src/lib/libssl/src/crypto/evp/c_allc.c | 8 + src/lib/libssl/src/crypto/evp/c_alld.c | 2 +- src/lib/libssl/src/crypto/evp/digest.c | 45 + src/lib/libssl/src/crypto/evp/e_aes.c | 32 +- src/lib/libssl/src/crypto/evp/e_des.c | 43 +- src/lib/libssl/src/crypto/evp/e_des3.c | 51 +- src/lib/libssl/src/crypto/evp/e_null.c | 2 +- src/lib/libssl/src/crypto/evp/e_old.c | 108 + src/lib/libssl/src/crypto/evp/e_rc4.c | 1 + src/lib/libssl/src/crypto/evp/evp.h | 70 +- src/lib/libssl/src/crypto/evp/evp_enc.c | 61 +- src/lib/libssl/src/crypto/evp/evp_err.c | 9 +- src/lib/libssl/src/crypto/evp/evp_lib.c | 28 +- src/lib/libssl/src/crypto/evp/evp_locl.h | 29 +- src/lib/libssl/src/crypto/evp/evp_pkey.c | 124 +- src/lib/libssl/src/crypto/evp/evp_test.c | 34 +- src/lib/libssl/src/crypto/evp/evptests.txt | 107 +- src/lib/libssl/src/crypto/evp/m_dss.c | 2 +- src/lib/libssl/src/crypto/evp/m_md2.c | 1 + src/lib/libssl/src/crypto/evp/m_md4.c | 1 + src/lib/libssl/src/crypto/evp/m_md5.c | 1 + src/lib/libssl/src/crypto/evp/m_mdc2.c | 1 + src/lib/libssl/src/crypto/evp/m_sha.c | 3 +- src/lib/libssl/src/crypto/evp/m_sha1.c | 2 +- src/lib/libssl/src/crypto/evp/names.c | 3 + src/lib/libssl/src/crypto/hmac/Makefile | 99 + src/lib/libssl/src/crypto/hmac/hmac.c | 16 + src/lib/libssl/src/crypto/hmac/hmac.h | 1 + src/lib/libssl/src/crypto/idea/Makefile | 92 + src/lib/libssl/src/crypto/idea/idea.h | 4 + src/lib/libssl/src/crypto/krb5/Makefile | 88 + src/lib/libssl/src/crypto/lhash/Makefile | 91 + src/lib/libssl/src/crypto/md2/Makefile | 93 + src/lib/libssl/src/crypto/md2/md2.h | 3 + src/lib/libssl/src/crypto/md2/md2_dgst.c | 4 +- src/lib/libssl/src/crypto/md32_common.h | 14 +- src/lib/libssl/src/crypto/md4/Makefile | 92 + src/lib/libssl/src/crypto/md4/md4.h | 3 + src/lib/libssl/src/crypto/md4/md4_dgst.c | 2 +- src/lib/libssl/src/crypto/md5/Makefile | 128 ++ src/lib/libssl/src/crypto/md5/md5.h | 3 + src/lib/libssl/src/crypto/md5/md5_dgst.c | 2 +- src/lib/libssl/src/crypto/mdc2/Makefile | 98 + src/lib/libssl/src/crypto/mdc2/mdc2.h | 4 +- src/lib/libssl/src/crypto/o_str.c | 96 + src/lib/libssl/src/crypto/o_str.h | 67 + src/lib/libssl/src/crypto/o_time.c | 21 +- src/lib/libssl/src/crypto/objects/Makefile | 122 ++ src/lib/libssl/src/crypto/objects/o_names.c | 7 +- src/lib/libssl/src/crypto/objects/obj_dat.c | 12 +- src/lib/libssl/src/crypto/objects/obj_dat.h | 79 +- src/lib/libssl/src/crypto/objects/obj_err.c | 4 +- src/lib/libssl/src/crypto/objects/obj_mac.h | 72 + src/lib/libssl/src/crypto/objects/obj_mac.num | 18 + src/lib/libssl/src/crypto/objects/objects.h | 2 + src/lib/libssl/src/crypto/objects/objects.txt | 22 + src/lib/libssl/src/crypto/ocsp/Makefile | 291 +++ src/lib/libssl/src/crypto/opensslv.h | 8 +- src/lib/libssl/src/crypto/pem/Makefile | 335 ++++ src/lib/libssl/src/crypto/pem/pem_all.c | 119 ++ src/lib/libssl/src/crypto/pem/pem_lib.c | 15 +- src/lib/libssl/src/crypto/pem/pem_pkey.c | 1 + src/lib/libssl/src/crypto/perlasm/x86asm.pl | 2 + src/lib/libssl/src/crypto/perlasm/x86ms.pl | 1 + src/lib/libssl/src/crypto/perlasm/x86nasm.pl | 8 +- src/lib/libssl/src/crypto/perlasm/x86unix.pl | 7 +- src/lib/libssl/src/crypto/pkcs12/Makefile | 415 ++++ src/lib/libssl/src/crypto/pkcs12/p12_crpt.c | 6 +- src/lib/libssl/src/crypto/pkcs12/p12_init.c | 12 +- src/lib/libssl/src/crypto/pkcs12/p12_kiss.c | 18 +- src/lib/libssl/src/crypto/pkcs12/p12_mutl.c | 5 +- src/lib/libssl/src/crypto/pkcs7/Makefile | 241 +++ src/lib/libssl/src/crypto/pkcs7/pk7_attr.c | 9 +- src/lib/libssl/src/crypto/pkcs7/pk7_doit.c | 55 +- src/lib/libssl/src/crypto/pkcs7/pk7_lib.c | 44 +- src/lib/libssl/src/crypto/pkcs7/pk7_smime.c | 46 +- src/lib/libssl/src/crypto/rand/Makefile | 196 ++ src/lib/libssl/src/crypto/rand/md_rand.c | 9 + src/lib/libssl/src/crypto/rand/rand.h | 10 + src/lib/libssl/src/crypto/rand/rand_egd.c | 10 +- src/lib/libssl/src/crypto/rand/rand_err.c | 8 +- src/lib/libssl/src/crypto/rand/rand_lib.c | 12 + src/lib/libssl/src/crypto/rand/rand_unix.c | 35 +- src/lib/libssl/src/crypto/rand/rand_vms.c | 5 +- src/lib/libssl/src/crypto/rand/rand_win.c | 104 +- src/lib/libssl/src/crypto/rand/randfile.c | 2 + src/lib/libssl/src/crypto/rc2/Makefile | 92 + src/lib/libssl/src/crypto/rc2/rc2.h | 5 +- src/lib/libssl/src/crypto/rc2/rc2_skey.c | 13 + src/lib/libssl/src/crypto/rc4/Makefile | 123 ++ src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl | 114 +- src/lib/libssl/src/crypto/rc4/asm/rc4-ia64.S | 157 ++ src/lib/libssl/src/crypto/rc4/rc4.h | 7 + src/lib/libssl/src/crypto/rc4/rc4_enc.c | 4 + src/lib/libssl/src/crypto/rc4/rc4_locl.h | 1 + src/lib/libssl/src/crypto/rc4/rc4_skey.c | 8 +- src/lib/libssl/src/crypto/rc5/Makefile | 110 ++ src/lib/libssl/src/crypto/rc5/rc5.h | 5 +- src/lib/libssl/src/crypto/ripemd/Makefile | 111 ++ src/lib/libssl/src/crypto/ripemd/ripemd.h | 3 + src/lib/libssl/src/crypto/ripemd/rmd_dgst.c | 3 +- src/lib/libssl/src/crypto/rsa/Makefile | 239 +++ src/lib/libssl/src/crypto/rsa/rsa.h | 4 + src/lib/libssl/src/crypto/rsa/rsa_eay.c | 2 +- src/lib/libssl/src/crypto/rsa/rsa_gen.c | 3 + src/lib/libssl/src/crypto/rsa/rsa_saos.c | 7 +- src/lib/libssl/src/crypto/rsa/rsa_sign.c | 9 +- src/lib/libssl/src/crypto/sha/Makefile | 127 ++ src/lib/libssl/src/crypto/sha/asm/sha1-586.pl | 2 +- src/lib/libssl/src/crypto/sha/asm/sha1-ia64.pl | 549 ++++++ src/lib/libssl/src/crypto/sha/sha.h | 7 + src/lib/libssl/src/crypto/sha/sha1dgst.c | 8 + src/lib/libssl/src/crypto/sha/sha_locl.h | 9 + src/lib/libssl/src/crypto/sha/shatest.c | 4 +- src/lib/libssl/src/crypto/stack/Makefile | 86 + src/lib/libssl/src/crypto/stack/safestack.h | 59 + src/lib/libssl/src/crypto/stack/stack.c | 14 +- src/lib/libssl/src/crypto/stack/stack.h | 1 + src/lib/libssl/src/crypto/txt_db/Makefile | 86 + src/lib/libssl/src/crypto/ui/Makefile | 115 ++ src/lib/libssl/src/crypto/x509/Makefile | 592 ++++++ src/lib/libssl/src/crypto/x509/by_file.c | 4 +- src/lib/libssl/src/crypto/x509/x509.h | 11 +- src/lib/libssl/src/crypto/x509/x509_cmp.c | 48 +- src/lib/libssl/src/crypto/x509/x509_r2x.c | 6 +- src/lib/libssl/src/crypto/x509/x509_req.c | 35 +- src/lib/libssl/src/crypto/x509/x509_txt.c | 13 +- src/lib/libssl/src/crypto/x509/x509_vfy.c | 131 +- src/lib/libssl/src/crypto/x509/x509_vfy.h | 8 +- src/lib/libssl/src/crypto/x509/x509cset.c | 1 + src/lib/libssl/src/crypto/x509/x509name.c | 10 +- src/lib/libssl/src/crypto/x509/x_all.c | 1 + src/lib/libssl/src/crypto/x509v3/Makefile | 645 ++++++ src/lib/libssl/src/crypto/x509v3/ext_dat.h | 11 +- src/lib/libssl/src/crypto/x509v3/v3_bitst.c | 7 +- src/lib/libssl/src/crypto/x509v3/v3_ia5.c | 5 +- src/lib/libssl/src/crypto/x509v3/v3_int.c | 19 +- src/lib/libssl/src/crypto/x509v3/v3_pci.c | 313 +++ src/lib/libssl/src/crypto/x509v3/v3_pcia.c | 55 + src/lib/libssl/src/crypto/x509v3/v3_purp.c | 75 +- src/lib/libssl/src/crypto/x509v3/v3err.c | 14 +- src/lib/libssl/src/crypto/x509v3/x509v3.h | 31 + src/lib/libssl/src/demos/engines/rsaref/rsaref.c | 6 +- .../libssl/src/doc/HOWTO/proxy_certificates.txt | 322 +++ src/lib/libssl/src/doc/apps/asn1parse.pod | 2 +- src/lib/libssl/src/doc/apps/dgst.pod | 6 + src/lib/libssl/src/doc/apps/enc.pod | 2 +- src/lib/libssl/src/doc/apps/errstr.pod | 39 + .../libssl/src/doc/crypto/ASN1_STRING_print_ex.pod | 6 +- src/lib/libssl/src/doc/crypto/BN_num_bytes.pod | 26 +- src/lib/libssl/src/doc/crypto/ERR_error_string.pod | 2 +- src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod | 2 + src/lib/libssl/src/doc/crypto/EVP_SealInit.pod | 5 +- src/lib/libssl/src/doc/crypto/EVP_SignInit.pod | 9 +- .../libssl/src/doc/crypto/RSA_public_encrypt.pod | 7 +- .../src/doc/crypto/X509_NAME_ENTRY_get_object.pod | 6 +- .../src/doc/crypto/X509_NAME_add_entry_by_txt.pod | 6 +- .../libssl/src/doc/crypto/X509_NAME_print_ex.pod | 4 +- src/lib/libssl/src/doc/crypto/blowfish.pod | 2 +- src/lib/libssl/src/doc/crypto/pem.pod | 2 +- src/lib/libssl/src/doc/fingerprints.txt | 28 + src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod | 6 +- .../src/doc/ssl/SSL_CTX_get_ex_new_index.pod | 2 +- .../libssl/src/doc/ssl/SSL_CTX_get_verify_mode.pod | 12 +- .../libssl/src/doc/ssl/SSL_CTX_set_cert_store.pod | 2 +- .../src/doc/ssl/SSL_CTX_set_info_callback.pod | 4 +- src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod | 2 +- .../src/doc/ssl/SSL_CTX_set_quiet_shutdown.pod | 4 +- .../src/doc/ssl/SSL_CTX_set_session_id_context.pod | 3 +- .../libssl/src/doc/ssl/SSL_CTX_use_certificate.pod | 4 +- .../src/doc/ssl/SSL_SESSION_get_ex_new_index.pod | 2 +- .../libssl/src/doc/ssl/SSL_SESSION_get_time.pod | 8 +- src/lib/libssl/src/doc/ssl/SSL_get_SSL_CTX.pod | 2 +- src/lib/libssl/src/doc/ssl/SSL_get_ciphers.pod | 4 +- .../libssl/src/doc/ssl/SSL_get_client_CA_list.pod | 4 +- .../libssl/src/doc/ssl/SSL_get_current_cipher.pod | 2 +- .../libssl/src/doc/ssl/SSL_get_default_timeout.pod | 2 +- src/lib/libssl/src/doc/ssl/SSL_get_error.pod | 2 +- .../libssl/src/doc/ssl/SSL_get_ex_new_index.pod | 2 +- src/lib/libssl/src/doc/ssl/SSL_get_fd.pod | 6 +- .../libssl/src/doc/ssl/SSL_get_peer_cert_chain.pod | 2 +- .../src/doc/ssl/SSL_get_peer_certificate.pod | 2 +- src/lib/libssl/src/doc/ssl/SSL_get_session.pod | 4 +- .../libssl/src/doc/ssl/SSL_get_verify_result.pod | 2 +- src/lib/libssl/src/doc/ssl/SSL_get_version.pod | 2 +- src/lib/libssl/src/doc/ssl/SSL_pending.pod | 2 +- src/lib/libssl/src/doc/ssl/SSL_set_shutdown.pod | 2 +- src/lib/libssl/src/doc/ssl/SSL_shutdown.pod | 2 +- src/lib/libssl/src/doc/ssl/SSL_state_string.pod | 4 +- src/lib/libssl/src/doc/ssl/SSL_want.pod | 10 +- src/lib/libssl/src/doc/ssl/d2i_SSL_SESSION.pod | 2 +- src/lib/libssl/src/doc/ssl/ssl.pod | 110 +- src/lib/libssl/src/doc/standards.txt | 4 + src/lib/libssl/src/e_os.h | 22 +- src/lib/libssl/src/e_os2.h | 14 +- src/lib/libssl/src/fips/Makefile | 199 ++ src/lib/libssl/src/fips/aes/Makefile | 131 ++ src/lib/libssl/src/fips/aes/fips_aes_selftest.c | 112 ++ src/lib/libssl/src/fips/aes/fips_aesavs.c | 1005 ++++++++++ src/lib/libssl/src/fips/des/Makefile | 155 ++ src/lib/libssl/src/fips/des/fips_des_selftest.c | 200 ++ src/lib/libssl/src/fips/des/fips_desmovs.c | 833 ++++++++ src/lib/libssl/src/fips/dh/Makefile | 109 + src/lib/libssl/src/fips/dh/fips_dh_check.c | 125 ++ src/lib/libssl/src/fips/dh/fips_dh_gen.c | 186 ++ src/lib/libssl/src/fips/dh/fips_dh_key.c | 230 +++ src/lib/libssl/src/fips/dsa/Makefile | 158 ++ src/lib/libssl/src/fips/dsa/fips_dsa_gen.c | 374 ++++ src/lib/libssl/src/fips/dsa/fips_dsa_ossl.c | 387 ++++ src/lib/libssl/src/fips/dsa/fips_dsa_selftest.c | 168 ++ src/lib/libssl/src/fips/dsa/fips_dsatest.c | 257 +++ src/lib/libssl/src/fips/dsa/fips_dssvs.c | 306 +++ src/lib/libssl/src/fips/fips-lib.com | 1180 +++++++++++ src/lib/libssl/src/fips/fips.c | 260 +++ src/lib/libssl/src/fips/fips.h | 125 ++ src/lib/libssl/src/fips/fips_locl.h | 67 + src/lib/libssl/src/fips/fips_test_suite.c | 341 ++++ src/lib/libssl/src/fips/install.com | 55 + src/lib/libssl/src/fips/openssl_fips_fingerprint | 30 + src/lib/libssl/src/fips/rand/Makefile | 104 + src/lib/libssl/src/fips/rand/fips_rand.c | 355 ++++ src/lib/libssl/src/fips/rand/fips_rand.h | 73 + src/lib/libssl/src/fips/rand/fips_randtest.c | 369 ++++ src/lib/libssl/src/fips/rsa/Makefile | 111 ++ src/lib/libssl/src/fips/rsa/fips_rsa_eay.c | 735 +++++++ src/lib/libssl/src/fips/rsa/fips_rsa_gen.c | 249 +++ src/lib/libssl/src/fips/rsa/fips_rsa_selftest.c | 251 +++ src/lib/libssl/src/install.com | 12 +- src/lib/libssl/src/makevms.com | 45 +- src/lib/libssl/src/ms/do_masm.bat | 22 +- src/lib/libssl/src/ms/do_ms.bat | 22 +- src/lib/libssl/src/ms/do_nasm.bat | 23 +- src/lib/libssl/src/ms/do_nt.bat | 8 +- src/lib/libssl/src/ms/test.bat | 40 +- src/lib/libssl/src/ms/testss.bat | 2 +- src/lib/libssl/src/openssl.spec | 2 +- src/lib/libssl/src/shlib/hpux10-cc.sh | 6 +- src/lib/libssl/src/ssl/Makefile | 1020 ++++++++++ src/lib/libssl/src/ssl/kssl.c | 18 +- src/lib/libssl/src/ssl/kssl.h | 6 + src/lib/libssl/src/ssl/s23_clnt.c | 23 +- src/lib/libssl/src/ssl/s23_lib.c | 2 +- src/lib/libssl/src/ssl/s23_srvr.c | 9 + src/lib/libssl/src/ssl/s2_clnt.c | 7 +- src/lib/libssl/src/ssl/s2_lib.c | 2 +- src/lib/libssl/src/ssl/s2_srvr.c | 9 +- src/lib/libssl/src/ssl/s3_clnt.c | 7 +- src/lib/libssl/src/ssl/s3_enc.c | 4 + src/lib/libssl/src/ssl/s3_lib.c | 74 +- src/lib/libssl/src/ssl/s3_pkt.c | 12 +- src/lib/libssl/src/ssl/s3_srvr.c | 17 +- src/lib/libssl/src/ssl/ssl.h | 118 +- src/lib/libssl/src/ssl/ssl_asn1.c | 8 +- src/lib/libssl/src/ssl/ssl_cert.c | 104 +- src/lib/libssl/src/ssl/ssl_ciph.c | 21 +- src/lib/libssl/src/ssl/ssl_err.c | 4 +- src/lib/libssl/src/ssl/ssl_lib.c | 103 +- src/lib/libssl/src/ssl/ssl_locl.h | 12 +- src/lib/libssl/src/ssl/ssl_rsa.c | 2 +- src/lib/libssl/src/ssl/ssl_sess.c | 13 +- src/lib/libssl/src/ssl/ssl_txt.c | 4 +- src/lib/libssl/src/ssl/ssltest.c | 538 ++++- src/lib/libssl/src/ssl/t1_enc.c | 4 +- src/lib/libssl/src/test/CAss.cnf | 8 + src/lib/libssl/src/test/Makefile | 788 ++++++++ src/lib/libssl/src/test/P1ss.cnf | 37 + src/lib/libssl/src/test/P2ss.cnf | 45 + src/lib/libssl/src/test/Uss.cnf | 8 + src/lib/libssl/src/test/bctest | 2 +- src/lib/libssl/src/test/evptests.txt | 107 +- src/lib/libssl/src/test/maketests.com | 6 +- src/lib/libssl/src/test/tcrl | 2 +- src/lib/libssl/src/test/testca | 3 + src/lib/libssl/src/test/testenc | 20 +- src/lib/libssl/src/test/testenc.com | 2 +- src/lib/libssl/src/test/testfipsssl | 113 ++ src/lib/libssl/src/test/testgen | 6 +- src/lib/libssl/src/test/testss | 86 +- src/lib/libssl/src/test/testssl | 14 +- src/lib/libssl/src/test/testsslproxy | 10 + src/lib/libssl/src/test/tpkcs7 | 2 +- src/lib/libssl/src/test/tpkcs7d | 2 +- src/lib/libssl/src/test/treq | 2 +- src/lib/libssl/src/test/trsa | 4 +- src/lib/libssl/src/test/tsid | 2 +- src/lib/libssl/src/test/tverify.com | 9 +- src/lib/libssl/src/test/tx509 | 2 +- src/lib/libssl/src/tools/Makefile | 61 + src/lib/libssl/src/tools/c_issuer | 2 +- src/lib/libssl/src/tools/c_rehash | 2 +- src/lib/libssl/src/util/cygwin.sh | 14 +- src/lib/libssl/src/util/domd | 10 +- src/lib/libssl/src/util/extract-names.pl | 8 +- src/lib/libssl/src/util/fixNT.sh | 6 +- src/lib/libssl/src/util/libeay.num | 86 +- src/lib/libssl/src/util/mk1mf.pl | 20 +- src/lib/libssl/src/util/mkdef.pl | 17 +- src/lib/libssl/src/util/mkerr.pl | 7 +- src/lib/libssl/src/util/mkfiles.pl | 10 +- src/lib/libssl/src/util/mklink.pl | 1 + src/lib/libssl/src/util/mkstack.pl | 1 + src/lib/libssl/src/util/opensslwrap.sh | 22 + src/lib/libssl/src/util/pl/BC-16.pl | 15 +- src/lib/libssl/src/util/pl/BC-32.pl | 13 +- src/lib/libssl/src/util/pl/Mingw32.pl | 11 +- src/lib/libssl/src/util/pl/OS2-EMX.pl | 11 +- src/lib/libssl/src/util/pl/VC-16.pl | 13 +- src/lib/libssl/src/util/pl/VC-32.pl | 11 +- src/lib/libssl/src/util/pl/VC-CE.pl | 11 +- src/lib/libssl/src/util/pl/linux.pl | 9 +- src/lib/libssl/src/util/pl/ultrix.pl | 11 +- src/lib/libssl/src/util/pl/unix.pl | 9 +- src/lib/libssl/src/util/pod2mantest | 2 +- src/lib/libssl/src/util/selftest.pl | 4 +- src/lib/libssl/src/util/shlib_wrap.sh | 70 + src/lib/libssl/test/Makefile | 788 ++++++++ src/lib/libssl/test/evptests.txt | 107 +- src/lib/libssl/test/maketests.com | 6 +- src/lib/libssl/test/testenc.com | 2 +- src/lib/libssl/test/testfipsssl | 113 ++ src/lib/libssl/test/tverify.com | 9 +- 566 files changed, 45602 insertions(+), 2253 deletions(-) create mode 100644 src/lib/libcrypto/aes/Makefile create mode 100644 src/lib/libcrypto/asn1/Makefile create mode 100644 src/lib/libcrypto/bf/Makefile create mode 100644 src/lib/libcrypto/bio/Makefile create mode 100644 src/lib/libcrypto/bn/Makefile create mode 100644 src/lib/libcrypto/buffer/Makefile create mode 100644 src/lib/libcrypto/cast/Makefile create mode 100644 src/lib/libcrypto/comp/Makefile create mode 100644 src/lib/libcrypto/conf/Makefile create mode 100644 src/lib/libcrypto/des/Makefile create mode 100644 src/lib/libcrypto/dh/Makefile create mode 100644 src/lib/libcrypto/dsa/Makefile create mode 100644 src/lib/libcrypto/dso/Makefile create mode 100644 src/lib/libcrypto/ec/Makefile create mode 100644 src/lib/libcrypto/engine/Makefile create mode 100644 src/lib/libcrypto/err/Makefile create mode 100644 src/lib/libcrypto/evp/Makefile create mode 100644 src/lib/libcrypto/hmac/Makefile create mode 100644 src/lib/libcrypto/idea/Makefile create mode 100644 src/lib/libcrypto/krb5/Makefile create mode 100644 src/lib/libcrypto/lhash/Makefile create mode 100644 src/lib/libcrypto/md2/Makefile create mode 100644 src/lib/libcrypto/md4/Makefile create mode 100644 src/lib/libcrypto/md5/Makefile create mode 100644 src/lib/libcrypto/mdc2/Makefile create mode 100644 src/lib/libcrypto/o_str.h create mode 100644 src/lib/libcrypto/objects/Makefile create mode 100644 src/lib/libcrypto/ocsp/Makefile create mode 100644 src/lib/libcrypto/pem/Makefile create mode 100644 src/lib/libcrypto/pkcs12/Makefile create mode 100644 src/lib/libcrypto/pkcs7/Makefile create mode 100644 src/lib/libcrypto/rand/Makefile create mode 100644 src/lib/libcrypto/rc2/Makefile create mode 100644 src/lib/libcrypto/rc4/Makefile create mode 100644 src/lib/libcrypto/rc4/asm/rc4-ia64.S create mode 100644 src/lib/libcrypto/rc5/Makefile create mode 100644 src/lib/libcrypto/ripemd/Makefile create mode 100644 src/lib/libcrypto/rsa/Makefile create mode 100644 src/lib/libcrypto/sha/Makefile create mode 100644 src/lib/libcrypto/stack/Makefile create mode 100644 src/lib/libcrypto/txt_db/Makefile create mode 100644 src/lib/libcrypto/ui/Makefile create mode 100755 src/lib/libcrypto/util/opensslwrap.sh create mode 100755 src/lib/libcrypto/util/shlib_wrap.sh create mode 100644 src/lib/libcrypto/x509/Makefile create mode 100644 src/lib/libcrypto/x509v3/Makefile create mode 100644 src/lib/libssl/src/Makefile create mode 100644 src/lib/libssl/src/VMS/VMSify-conf.pl create mode 100644 src/lib/libssl/src/apps/Makefile create mode 100644 src/lib/libssl/src/apps/prime.c create mode 100644 src/lib/libssl/src/certs/demo/ca-cert.pem create mode 100644 src/lib/libssl/src/certs/demo/dsa-ca.pem create mode 100644 src/lib/libssl/src/certs/demo/dsa-pca.pem create mode 100644 src/lib/libssl/src/certs/demo/nortelCA.pem create mode 100644 src/lib/libssl/src/certs/demo/pca-cert.pem create mode 100644 src/lib/libssl/src/certs/demo/timCA.pem create mode 100644 src/lib/libssl/src/certs/demo/tjhCA.pem create mode 100644 src/lib/libssl/src/certs/demo/vsigntca.pem create mode 100644 src/lib/libssl/src/certs/eng1.pem create mode 100644 src/lib/libssl/src/certs/eng2.pem create mode 100644 src/lib/libssl/src/certs/eng3.pem create mode 100644 src/lib/libssl/src/certs/eng4.pem create mode 100644 src/lib/libssl/src/certs/eng5.pem create mode 100644 src/lib/libssl/src/certs/expired/RegTP-4R.pem create mode 100644 src/lib/libssl/src/certs/expired/factory.pem create mode 100644 src/lib/libssl/src/certs/expired/rsa-cca.pem create mode 100644 src/lib/libssl/src/certs/expired/vsign2.pem create mode 100644 src/lib/libssl/src/certs/wellsfgo.pem create mode 100644 src/lib/libssl/src/crypto/aes/Makefile create mode 100644 src/lib/libssl/src/crypto/asn1/Makefile create mode 100644 src/lib/libssl/src/crypto/bf/Makefile create mode 100644 src/lib/libssl/src/crypto/bio/Makefile create mode 100644 src/lib/libssl/src/crypto/bn/Makefile create mode 100644 src/lib/libssl/src/crypto/bn/asm/ppc.pl create mode 100644 src/lib/libssl/src/crypto/buffer/Makefile create mode 100644 src/lib/libssl/src/crypto/cast/Makefile create mode 100644 src/lib/libssl/src/crypto/comp/Makefile create mode 100644 src/lib/libssl/src/crypto/conf/Makefile create mode 100644 src/lib/libssl/src/crypto/des/Makefile create mode 100644 src/lib/libssl/src/crypto/dh/Makefile create mode 100644 src/lib/libssl/src/crypto/dsa/Makefile create mode 100644 src/lib/libssl/src/crypto/dso/Makefile create mode 100644 src/lib/libssl/src/crypto/ec/Makefile create mode 100644 src/lib/libssl/src/crypto/engine/Makefile create mode 100644 src/lib/libssl/src/crypto/err/Makefile create mode 100644 src/lib/libssl/src/crypto/evp/Makefile create mode 100644 src/lib/libssl/src/crypto/evp/e_old.c create mode 100644 src/lib/libssl/src/crypto/hmac/Makefile create mode 100644 src/lib/libssl/src/crypto/idea/Makefile create mode 100644 src/lib/libssl/src/crypto/krb5/Makefile create mode 100644 src/lib/libssl/src/crypto/lhash/Makefile create mode 100644 src/lib/libssl/src/crypto/md2/Makefile create mode 100644 src/lib/libssl/src/crypto/md4/Makefile create mode 100644 src/lib/libssl/src/crypto/md5/Makefile create mode 100644 src/lib/libssl/src/crypto/mdc2/Makefile create mode 100644 src/lib/libssl/src/crypto/o_str.c create mode 100644 src/lib/libssl/src/crypto/o_str.h create mode 100644 src/lib/libssl/src/crypto/objects/Makefile create mode 100644 src/lib/libssl/src/crypto/ocsp/Makefile create mode 100644 src/lib/libssl/src/crypto/pem/Makefile create mode 100644 src/lib/libssl/src/crypto/pkcs12/Makefile create mode 100644 src/lib/libssl/src/crypto/pkcs7/Makefile create mode 100644 src/lib/libssl/src/crypto/rand/Makefile create mode 100644 src/lib/libssl/src/crypto/rc2/Makefile create mode 100644 src/lib/libssl/src/crypto/rc4/Makefile create mode 100644 src/lib/libssl/src/crypto/rc4/asm/rc4-ia64.S create mode 100644 src/lib/libssl/src/crypto/rc5/Makefile create mode 100644 src/lib/libssl/src/crypto/ripemd/Makefile create mode 100644 src/lib/libssl/src/crypto/rsa/Makefile create mode 100644 src/lib/libssl/src/crypto/sha/Makefile create mode 100644 src/lib/libssl/src/crypto/sha/asm/sha1-ia64.pl create mode 100644 src/lib/libssl/src/crypto/stack/Makefile create mode 100644 src/lib/libssl/src/crypto/txt_db/Makefile create mode 100644 src/lib/libssl/src/crypto/ui/Makefile create mode 100644 src/lib/libssl/src/crypto/x509/Makefile create mode 100644 src/lib/libssl/src/crypto/x509v3/Makefile create mode 100644 src/lib/libssl/src/crypto/x509v3/v3_pci.c create mode 100644 src/lib/libssl/src/crypto/x509v3/v3_pcia.c create mode 100644 src/lib/libssl/src/doc/HOWTO/proxy_certificates.txt create mode 100644 src/lib/libssl/src/doc/apps/errstr.pod create mode 100644 src/lib/libssl/src/doc/fingerprints.txt create mode 100644 src/lib/libssl/src/fips/Makefile create mode 100644 src/lib/libssl/src/fips/aes/Makefile create mode 100644 src/lib/libssl/src/fips/aes/fips_aes_selftest.c create mode 100644 src/lib/libssl/src/fips/aes/fips_aesavs.c create mode 100644 src/lib/libssl/src/fips/des/Makefile create mode 100644 src/lib/libssl/src/fips/des/fips_des_selftest.c create mode 100644 src/lib/libssl/src/fips/des/fips_desmovs.c create mode 100644 src/lib/libssl/src/fips/dh/Makefile create mode 100644 src/lib/libssl/src/fips/dh/fips_dh_check.c create mode 100644 src/lib/libssl/src/fips/dh/fips_dh_gen.c create mode 100644 src/lib/libssl/src/fips/dh/fips_dh_key.c create mode 100644 src/lib/libssl/src/fips/dsa/Makefile create mode 100644 src/lib/libssl/src/fips/dsa/fips_dsa_gen.c create mode 100644 src/lib/libssl/src/fips/dsa/fips_dsa_ossl.c create mode 100644 src/lib/libssl/src/fips/dsa/fips_dsa_selftest.c create mode 100644 src/lib/libssl/src/fips/dsa/fips_dsatest.c create mode 100644 src/lib/libssl/src/fips/dsa/fips_dssvs.c create mode 100644 src/lib/libssl/src/fips/fips-lib.com create mode 100644 src/lib/libssl/src/fips/fips.c create mode 100644 src/lib/libssl/src/fips/fips.h create mode 100644 src/lib/libssl/src/fips/fips_locl.h create mode 100644 src/lib/libssl/src/fips/fips_test_suite.c create mode 100644 src/lib/libssl/src/fips/install.com create mode 100755 src/lib/libssl/src/fips/openssl_fips_fingerprint create mode 100644 src/lib/libssl/src/fips/rand/Makefile create mode 100644 src/lib/libssl/src/fips/rand/fips_rand.c create mode 100644 src/lib/libssl/src/fips/rand/fips_rand.h create mode 100644 src/lib/libssl/src/fips/rand/fips_randtest.c create mode 100644 src/lib/libssl/src/fips/rsa/Makefile create mode 100644 src/lib/libssl/src/fips/rsa/fips_rsa_eay.c create mode 100644 src/lib/libssl/src/fips/rsa/fips_rsa_gen.c create mode 100644 src/lib/libssl/src/fips/rsa/fips_rsa_selftest.c create mode 100644 src/lib/libssl/src/ssl/Makefile create mode 100644 src/lib/libssl/src/test/Makefile create mode 100644 src/lib/libssl/src/test/P1ss.cnf create mode 100644 src/lib/libssl/src/test/P2ss.cnf create mode 100644 src/lib/libssl/src/test/testfipsssl create mode 100644 src/lib/libssl/src/test/testsslproxy create mode 100644 src/lib/libssl/src/tools/Makefile create mode 100755 src/lib/libssl/src/util/opensslwrap.sh create mode 100755 src/lib/libssl/src/util/shlib_wrap.sh create mode 100644 src/lib/libssl/test/Makefile create mode 100644 src/lib/libssl/test/testfipsssl (limited to 'src') diff --git a/src/lib/libcrypto/Attic/Makefile b/src/lib/libcrypto/Attic/Makefile index eb49323ad5..cffaeedc5d 100644 --- a/src/lib/libcrypto/Attic/Makefile +++ b/src/lib/libcrypto/Attic/Makefile @@ -1,133 +1,218 @@ -LIB= crypto -CFLAGS+= -DNO_IDEA -DTERMIOS -DL_ENDIAN -DANSI_SOURCE -CFLAGS+= -I${.CURDIR}/../include -SRCS+= cryptlib.c mem.c cversion.c ex_data.c cpt_err.c -CFLAGS+= -I${.CURDIR}/md2 -SRCS+= md2_dgst.c md2_one.c -CFLAGS+= -I${.CURDIR}/md5 -SRCS+= md5_dgst.c md5_one.c -CFLAGS+= -I${.CURDIR}/sha -SRCS+= sha_dgst.c sha1dgst.c sha_one.c sha1_one.c -CFLAGS+= -I${.CURDIR}/mdc2 -SRCS+= mdc2dgst.c mdc2_one.c -CFLAGS+= -I${.CURDIR}/hmac -SRCS+= hmac.c -CFLAGS+= -I${.CURDIR}/ripemd -SRCS+= rmd_dgst.c rmd_one.c -CFLAGS+= -I${.CURDIR}/des -SRCS+= set_key.c ecb_enc.c cbc_enc.c ecb3_enc.c -SRCS+= cfb64enc.c cfb64ede.c cfb_enc.c ofb64ede.c -SRCS+= enc_read.c enc_writ.c ofb64enc.c ofb_enc.c -SRCS+= str2key.c pcbc_enc.c qud_cksm.c rand_key.c -SRCS+= read2pwd.c fcrypt.c xcbc_enc.c read_pwd.c -SRCS+= rpc_enc.c cbc_cksm.c supp.c -CFLAGS+= -I${.CURDIR}/rc2 -SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c -SRCS+= rc2ofb64.c -CFLAGS+= -I${.CURDIR}/rc4 -SRCS+= rc4_skey.c -CFLAGS+= -I${.CURDIR}/rc5 -SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5cfb64.c -SRCS+= rc5ofb64.c -CFLAGS+= -I${.CURDIR}/idea -SRCS+= i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c -SRCS+= i_skey.c -CFLAGS+= -I${.CURDIR}/bf -SRCS+= bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c -CFLAGS+= -I${.CURDIR}/cast -SRCS+= c_skey.c c_ecb.c c_cfb64.c c_ofb64.c -CFLAGS+= -I${.CURDIR}/bn -SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c -SRCS+= bn_mul.c bn_print.c bn_rand.c bn_shift.c bn_sub.c -SRCS+= bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c -SRCS+= bn_sqr.c bn_recp.c bn_mont.c bn_mpi.c -CFLAGS+= -I${.CURDIR}/rsa -SRCS+= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c -SRCS+= rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c -SRCS+= rsa_none.c -CFLAGS+= -I${.CURDIR}/dsa -SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c -SRCS+= dsa_sign.c dsa_err.c -CFLAGS+= -I${.CURDIR}/dh -SRCS+= dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c -CFLAGS+= -I${.CURDIR}/buffer -SRCS+= buffer.c buf_err.c -CFLAGS+= -I${.CURDIR}/bio -SRCS+= bio_lib.c bio_cb.c bio_err.c bss_mem.c -SRCS+= bss_null.c bss_fd.c bss_file.c bss_sock.c -SRCS+= bss_conn.c bf_null.c bf_buff.c -SRCS+= b_print.c b_dump.c b_sock.c bss_acpt.c -SRCS+= bf_nbio.c -CFLAGS+= -I${.CURDIR}/stack -SRCS+= stack.c -CFLAGS+= -I${.CURDIR}/lhash -SRCS+= lhash.c lh_stats.c -CFLAGS+= -I${.CURDIR}/rand -SRCS+= md_rand.c randfile.c -CFLAGS+= -I${.CURDIR}/err -SRCS+= err.c err_all.c err_prn.c -CFLAGS+= -I${.CURDIR}/objects -SRCS+= obj_dat.c obj_lib.c obj_err.c -CFLAGS+= -I${.CURDIR}/evp -SRCS+= encode.c digest.c evp_enc.c evp_key.c -SRCS+= e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c -SRCS+= e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c -SRCS+= e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c -SRCS+= e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c e_ecb_r2.c -SRCS+= e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c e_ecb_bf.c -SRCS+= e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c e_ecb_c.c -SRCS+= e_cbc_c.c e_cfb_c.c e_ofb_c.c e_ecb_r5.c -SRCS+= e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c m_null.c -SRCS+= m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c -SRCS+= m_dss1.c m_mdc2.c m_ripemd.c p_open.c -SRCS+= p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c -SRCS+= p_dec.c bio_md.c bio_b64.c bio_enc.c -SRCS+= evp_err.c e_null.c c_all.c evp_lib.c -CFLAGS+= -I${.CURDIR}/pem -SRCS+= pem_sign.c pem_seal.c pem_info.c pem_lib.c -SRCS+= pem_all.c pem_err.c -CFLAGS+= -I${.CURDIR}/asn1 -SRCS+= a_object.c a_bitstr.c a_utctm.c a_int.c -SRCS+= a_octet.c a_print.c a_type.c a_set.c -SRCS+= a_dup.c a_d2i_fp.c a_i2d_fp.c a_sign.c -SRCS+= a_digest.c a_verify.c x_algor.c x_val.c -SRCS+= x_pubkey.c x_sig.c x_req.c x_attrib.c -SRCS+= x_name.c x_cinf.c x_x509.c x_crl.c -SRCS+= x_info.c x_spki.c d2i_r_pr.c i2d_r_pr.c -SRCS+= d2i_r_pu.c i2d_r_pu.c d2i_s_pr.c i2d_s_pr.c -SRCS+= d2i_s_pu.c i2d_s_pu.c d2i_pu.c d2i_pr.c -SRCS+= i2d_pu.c i2d_pr.c t_req.c t_x509.c -SRCS+= t_pkey.c p7_i_s.c p7_signi.c p7_signd.c -SRCS+= p7_recip.c p7_enc_c.c p7_evp.c p7_dgst.c -SRCS+= p7_s_e.c p7_enc.c p7_lib.c f_int.c -SRCS+= f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c -SRCS+= d2i_dsap.c n_pkey.c a_hdr.c x_pkey.c -SRCS+= a_bool.c x_exten.c asn1_par.c asn1_lib.c -SRCS+= asn1_err.c a_meth.c a_bytes.c evp_asn1.c -CFLAGS+= -I${.CURDIR}/x509 -SRCS+= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c -SRCS+= x509_obj.c x509_req.c x509_vfy.c x509_set.c -SRCS+= x509rset.c x509_err.c x509name.c x509_v3.c -SRCS+= x509_ext.c x509pack.c x509type.c x509_lu.c -SRCS+= x_all.c x509_txt.c by_file.c by_dir.c -SRCS+= v3_net.c v3_x509.c -CFLAGS+= -I${.CURDIR}/conf -SRCS+= conf.c conf_err.c -CFLAGS+= -I${.CURDIR}/txt_db -SRCS+= txt_db.c -CFLAGS+= -I${.CURDIR}/pkcs7 -SRCS+= pk7_lib.c pkcs7err.c pk7_doit.c - -.PATH: ${.CURDIR}/md2 ${.CURDIR}/md5 ${.CURDIR}/sha ${.CURDIR}/mdc2 \ - ${.CURDIR}/hmac ${.CURDIR}/ripemd ${.CURDIR}/des ${.CURDIR}/rc2 \ - ${.CURDIR}/rc4 ${.CURDIR}/rc5 ${.CURDIR}/idea ${.CURDIR}/bf \ - ${.CURDIR}/cast ${.CURDIR}/bn ${.CURDIR}/rsa ${.CURDIR}/dsa \ - ${.CURDIR}/dh ${.CURDIR}/buffer ${.CURDIR}/bio ${.CURDIR}/stack \ - ${.CURDIR}/lhash ${.CURDIR}/rand ${.CURDIR}/err ${.CURDIR}/objects \ - ${.CURDIR}/evp ${.CURDIR}/pem ${.CURDIR}/asn1 ${.CURDIR}/asn1 \ - ${.CURDIR}/x509 ${.CURDIR}/conf txt_db/txt_db.c ${.CURDIR}/pkcs7 \ - ${.CURDIR}/txt_db - -.include +# +# SSLeay/crypto/Makefile +# +DIR= crypto +TOP= .. +CC= cc +INCLUDE= -I. -I$(TOP) -I../include +INCLUDES= -I.. -I../.. -I../../include +CFLAG= -g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP= /usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +RM= rm -f +AR= ar r +PEX_LIBS= +EX_LIBS= + +CFLAGS= $(INCLUDE) $(CFLAG) + + +LIBS= + +SDIRS= md2 md5 sha mdc2 hmac ripemd \ + des rc2 rc4 rc5 idea bf cast \ + bn ec rsa dsa dh dso engine aes \ + buffer bio stack lhash rand err objects \ + evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 + +GENERAL=Makefile README crypto-lib.com install.com + +LIB= $(TOP)/libcrypto.a +SHARED_LIB= libcrypto$(SHLIB_EXT) +LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c +LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o + +SRC= $(LIBSRC) + +EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \ + ossl_typ.h +HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + @(cd ..; $(MAKE) DIRS=$(DIR) all) + +all: shared + +buildinf.h: ../Makefile + ( echo "#ifndef MK1MF_BUILD"; \ + echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \ + echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \ + echo ' #define PLATFORM "$(PLATFORM)"'; \ + echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \ + echo '#endif' ) >buildinf.h + +testapps: + if echo ${SDIRS} | fgrep ' des '; \ + then cd des && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' des; fi + cd pkcs7 && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps + +subdirs: + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making all in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ + done; + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making 'files' in crypto/$$i..." && \ + $(MAKE) PERL='${PERL}' files ); \ + done; + +links: + @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS) + @for i in $(SDIRS); do \ + (cd $$i && echo "making links in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PERL='${PERL}' links ); \ + done; + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +shared: buildinf.h lib subdirs + @if [ -n "$(SHARED_LIBS)" ]; then \ + egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null || \ + (cd ..; $(MAKE) $(SHARED_LIB)); \ + fi + +libs: + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making libs in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \ + done; + +tests: + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making tests in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \ + done; + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ;\ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making install in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \ + done; + +lint: + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making lint in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \ + done; + +depend: + if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + if [ ! -s buildinf.h ]; then rm buildinf.h; fi + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making depend in crypto/$$i..." && \ + $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \ + done; + +clean: + rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making clean in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \ + done; + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making dclean in crypto/$$i..." && \ + $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \ + done; + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h +cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h +cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h +cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cpt_err.c +cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h +cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h +cryptlib.o: ../include/openssl/symhacks.h cryptlib.c cryptlib.h +cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h +cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h +cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c +ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c +ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h +ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ex_data.o: ../include/openssl/safestack.h ../include/openssl/stack.h +ex_data.o: ../include/openssl/symhacks.h cryptlib.h ex_data.c +mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +mem.o: ../include/openssl/err.h ../include/openssl/lhash.h +mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h +mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c +mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h +mem_clr.o: ../include/openssl/symhacks.h mem_clr.c +mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h +mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h +mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c +o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h +o_str.o: o_str.c o_str.h +o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c +o_time.o: o_time.h +tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h +tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h +tmdiff.o: ../include/openssl/symhacks.h ../include/openssl/tmdiff.h cryptlib.h +tmdiff.o: tmdiff.c +uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +uid.o: ../include/openssl/safestack.h ../include/openssl/stack.h +uid.o: ../include/openssl/symhacks.h uid.c diff --git a/src/lib/libcrypto/aes/Makefile b/src/lib/libcrypto/aes/Makefile new file mode 100644 index 0000000000..a37c6f66a2 --- /dev/null +++ b/src/lib/libcrypto/aes/Makefile @@ -0,0 +1,103 @@ +# +# crypto/aes/Makefile +# + +DIR= aes +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP= /usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +#TEST=aestest.c +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c aes_ctr.c +LIBOBJ=aes_core.o aes_misc.o aes_ecb.o aes_cbc.o aes_cfb.o aes_ofb.o aes_ctr.o + +SRC= $(LIBSRC) + +EXHEADER= aes.h +HEADER= aes_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +$(LIBOBJ): $(LIBSRC) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: installs + +installs: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c aes_locl.h +aes_cfb.o: ../../e_os.h ../../include/openssl/aes.h +aes_cfb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +aes_cfb.o: aes_cfb.c aes_locl.h +aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_core.o: ../../include/openssl/fips.h ../../include/openssl/opensslconf.h +aes_core.o: aes_core.c aes_locl.h +aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.h +aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h +aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_misc.o: ../../include/openssl/opensslconf.h +aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c +aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_ofb.o: ../../include/openssl/opensslconf.h aes_locl.h aes_ofb.c diff --git a/src/lib/libcrypto/asn1/Makefile b/src/lib/libcrypto/asn1/Makefile new file mode 100644 index 0000000000..b11298d621 --- /dev/null +++ b/src/lib/libcrypto/asn1/Makefile @@ -0,0 +1,1150 @@ +# +# SSLeay/crypto/asn1/Makefile +# + +DIR= asn1 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= a_object.c a_bitstr.c a_utctm.c a_gentm.c a_time.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_enum.c a_utf8.c a_sign.c a_digest.c a_verify.c a_mbstr.c a_strex.c \ + x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_bignum.c \ + x_long.c x_name.c x_x509.c x_x509a.c x_crl.c x_info.c x_spki.c nsseq.c \ + d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c\ + t_req.c t_x509.c t_x509a.c t_crl.c t_pkey.c t_spki.c t_bitst.c \ + tasn_new.c tasn_fre.c tasn_enc.c tasn_dec.c tasn_utl.c tasn_typ.c \ + f_int.c f_string.c n_pkey.c \ + f_enum.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 a_strnid.c \ + evp_asn1.c asn_pack.c p5_pbe.c p5_pbev2.c p8_pkey.c asn_moid.c +LIBOBJ= a_object.o a_bitstr.o a_utctm.o a_gentm.o a_time.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_enum.o a_utf8.o a_sign.o a_digest.o a_verify.o a_mbstr.o a_strex.o \ + x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o x_bignum.o \ + x_long.o x_name.o x_x509.o x_x509a.o x_crl.o x_info.o x_spki.o nsseq.o \ + d2i_pu.o d2i_pr.o i2d_pu.o i2d_pr.o \ + t_req.o t_x509.o t_x509a.o t_crl.o t_pkey.o t_spki.o t_bitst.o \ + tasn_new.o tasn_fre.o tasn_enc.o tasn_dec.o tasn_utl.o tasn_typ.o \ + f_int.o f_string.o n_pkey.o \ + f_enum.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 a_strnid.o \ + evp_asn1.o asn_pack.o p5_pbe.o p5_pbev2.o p8_pkey.o asn_moid.o + +SRC= $(LIBSRC) + +EXHEADER= asn1.h asn1_mac.h asn1t.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +test: test.c + cc -g -I../../include -c test.c + cc -g -I../../include -o test test.o -L../.. -lcrypto + +pk: pk.c + cc -g -I../../include -c pk.c + cc -g -I../../include -o pk pk.o -L../.. -lcrypto + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +a_bitstr.o: ../../e_os.h ../../include/openssl/asn1.h +a_bitstr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_bitstr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_bitstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_bitstr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_bitstr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_bitstr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_bitstr.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bitstr.c +a_bool.o: ../../e_os.h ../../include/openssl/asn1.h +a_bool.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +a_bool.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_bool.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_bool.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_bool.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_bool.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_bool.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_bool.o: ../cryptlib.h a_bool.c +a_bytes.o: ../../e_os.h ../../include/openssl/asn1.h +a_bytes.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_bytes.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_bytes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_bytes.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_bytes.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_bytes.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_bytes.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bytes.c +a_d2i_fp.o: ../../e_os.h ../../include/openssl/asn1.h +a_d2i_fp.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +a_d2i_fp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_d2i_fp.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_d2i_fp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_d2i_fp.o: ../../include/openssl/opensslconf.h +a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_d2i_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_d2i_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_d2i_fp.c +a_digest.o: ../../e_os.h ../../include/openssl/aes.h +a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h +a_digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +a_digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +a_digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +a_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +a_digest.o: ../../include/openssl/opensslconf.h +a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +a_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +a_digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +a_digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +a_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +a_digest.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +a_digest.o: ../cryptlib.h a_digest.c +a_dup.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_dup.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_dup.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_dup.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_dup.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_dup.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_dup.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_dup.o: ../cryptlib.h a_dup.c +a_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_enum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_enum.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_enum.o: ../cryptlib.h a_enum.c +a_gentm.o: ../../e_os.h ../../include/openssl/asn1.h +a_gentm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_gentm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_gentm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_gentm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_gentm.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_gentm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_gentm.o: ../../include/openssl/symhacks.h ../cryptlib.h ../o_time.h a_gentm.c +a_hdr.o: ../../e_os.h ../../include/openssl/asn1.h +a_hdr.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +a_hdr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_hdr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_hdr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_hdr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_hdr.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_hdr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_hdr.o: ../cryptlib.h a_hdr.c +a_i2d_fp.o: ../../e_os.h ../../include/openssl/asn1.h +a_i2d_fp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_i2d_fp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_i2d_fp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_i2d_fp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_i2d_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_i2d_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_i2d_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_i2d_fp.c +a_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_int.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_int.o: ../cryptlib.h a_int.c +a_mbstr.o: ../../e_os.h ../../include/openssl/asn1.h +a_mbstr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_mbstr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_mbstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_mbstr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_mbstr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_mbstr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_mbstr.o: ../../include/openssl/symhacks.h ../cryptlib.h a_mbstr.c +a_meth.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_meth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_meth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_meth.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_meth.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_meth.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_meth.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_meth.o: ../cryptlib.h a_meth.c +a_object.o: ../../e_os.h ../../include/openssl/asn1.h +a_object.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_object.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_object.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_object.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +a_object.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +a_object.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_object.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_object.o: ../../include/openssl/symhacks.h ../cryptlib.h a_object.c +a_octet.o: ../../e_os.h ../../include/openssl/asn1.h +a_octet.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_octet.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_octet.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_octet.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_octet.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_octet.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_octet.o: ../../include/openssl/symhacks.h ../cryptlib.h a_octet.c +a_print.o: ../../e_os.h ../../include/openssl/asn1.h +a_print.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_print.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_print.o: ../../include/openssl/symhacks.h ../cryptlib.h a_print.c +a_set.o: ../../e_os.h ../../include/openssl/asn1.h +a_set.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +a_set.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_set.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_set.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_set.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_set.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_set.o: ../cryptlib.h a_set.c +a_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +a_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +a_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +a_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +a_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +a_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +a_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +a_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +a_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +a_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +a_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +a_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +a_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +a_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +a_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +a_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +a_sign.o: ../cryptlib.h a_sign.c +a_strex.o: ../../e_os.h ../../include/openssl/aes.h +a_strex.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_strex.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_strex.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_strex.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_strex.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_strex.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_strex.o: ../../include/openssl/err.h ../../include/openssl/evp.h +a_strex.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +a_strex.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +a_strex.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +a_strex.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +a_strex.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_strex.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +a_strex.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +a_strex.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +a_strex.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +a_strex.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +a_strex.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +a_strex.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +a_strex.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_strex.c charmap.h +a_strnid.o: ../../e_os.h ../../include/openssl/asn1.h +a_strnid.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_strnid.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_strnid.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_strnid.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +a_strnid.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +a_strnid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_strnid.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_strnid.o: ../../include/openssl/symhacks.h ../cryptlib.h a_strnid.c +a_time.o: ../../e_os.h ../../include/openssl/asn1.h +a_time.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +a_time.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_time.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_time.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_time.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_time.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_time.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_time.o: ../cryptlib.h ../o_time.h a_time.c +a_type.o: ../../e_os.h ../../include/openssl/asn1.h +a_type.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +a_type.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_type.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_type.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_type.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_type.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_type.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_type.o: ../cryptlib.h a_type.c +a_utctm.o: ../../e_os.h ../../include/openssl/asn1.h +a_utctm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_utctm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_utctm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_utctm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_utctm.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_utctm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_utctm.o: ../../include/openssl/symhacks.h ../cryptlib.h ../o_time.h a_utctm.c +a_utf8.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_utf8.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_utf8.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_utf8.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_utf8.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_utf8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_utf8.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_utf8.o: ../cryptlib.h a_utf8.c +a_verify.o: ../../e_os.h ../../include/openssl/aes.h +a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h +a_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +a_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +a_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +a_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +a_verify.o: ../../include/openssl/opensslconf.h +a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +a_verify.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +a_verify.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +a_verify.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +a_verify.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_verify.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +a_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +a_verify.o: ../cryptlib.h a_verify.c +asn1_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +asn1_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +asn1_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +asn1_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +asn1_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn1_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +asn1_err.o: ../../include/openssl/symhacks.h asn1_err.c +asn1_lib.o: ../../e_os.h ../../include/openssl/asn1.h +asn1_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +asn1_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +asn1_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +asn1_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +asn1_lib.o: ../../include/openssl/opensslconf.h +asn1_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn1_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +asn1_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_lib.c +asn1_par.o: ../../e_os.h ../../include/openssl/asn1.h +asn1_par.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +asn1_par.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +asn1_par.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +asn1_par.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +asn1_par.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn1_par.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +asn1_par.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c +asn_moid.o: ../../e_os.h ../../include/openssl/aes.h +asn_moid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +asn_moid.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +asn_moid.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +asn_moid.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +asn_moid.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +asn_moid.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +asn_moid.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +asn_moid.o: ../../include/openssl/err.h ../../include/openssl/evp.h +asn_moid.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +asn_moid.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +asn_moid.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +asn_moid.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +asn_moid.o: ../../include/openssl/opensslconf.h +asn_moid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn_moid.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +asn_moid.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +asn_moid.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +asn_moid.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +asn_moid.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +asn_moid.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +asn_moid.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +asn_moid.o: ../cryptlib.h asn_moid.c +asn_pack.o: ../../e_os.h ../../include/openssl/asn1.h +asn_pack.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +asn_pack.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +asn_pack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +asn_pack.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn_pack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +asn_pack.o: ../../include/openssl/symhacks.h ../cryptlib.h asn_pack.c +d2i_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +d2i_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +d2i_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +d2i_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +d2i_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +d2i_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +d2i_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +d2i_pr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +d2i_pr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +d2i_pr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +d2i_pr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +d2i_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +d2i_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +d2i_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +d2i_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +d2i_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +d2i_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +d2i_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +d2i_pr.o: ../../include/openssl/ui_compat.h ../cryptlib.h d2i_pr.c +d2i_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +d2i_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +d2i_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +d2i_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +d2i_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +d2i_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +d2i_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +d2i_pu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +d2i_pu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +d2i_pu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +d2i_pu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +d2i_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +d2i_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +d2i_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +d2i_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +d2i_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +d2i_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +d2i_pu.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +d2i_pu.o: ../../include/openssl/ui_compat.h ../cryptlib.h d2i_pu.c +evp_asn1.o: ../../e_os.h ../../include/openssl/asn1.h +evp_asn1.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +evp_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +evp_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +evp_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +evp_asn1.o: ../../include/openssl/opensslconf.h +evp_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +evp_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +evp_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_asn1.c +f_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +f_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +f_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +f_enum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +f_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +f_enum.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +f_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +f_enum.o: ../cryptlib.h f_enum.c +f_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +f_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +f_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +f_int.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +f_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +f_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +f_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +f_int.o: ../cryptlib.h f_int.c +f_string.o: ../../e_os.h ../../include/openssl/asn1.h +f_string.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +f_string.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +f_string.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +f_string.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +f_string.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +f_string.o: ../../include/openssl/symhacks.h ../cryptlib.h f_string.c +i2d_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +i2d_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +i2d_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +i2d_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +i2d_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +i2d_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +i2d_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +i2d_pr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +i2d_pr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +i2d_pr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +i2d_pr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +i2d_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +i2d_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +i2d_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +i2d_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +i2d_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +i2d_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +i2d_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +i2d_pr.o: ../../include/openssl/ui_compat.h ../cryptlib.h i2d_pr.c +i2d_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +i2d_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +i2d_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +i2d_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +i2d_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +i2d_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +i2d_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +i2d_pu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +i2d_pu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +i2d_pu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +i2d_pu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +i2d_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +i2d_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +i2d_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +i2d_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +i2d_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +i2d_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +i2d_pu.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +i2d_pu.o: ../../include/openssl/ui_compat.h ../cryptlib.h i2d_pu.c +n_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +n_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h +n_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +n_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +n_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +n_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +n_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +n_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +n_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +n_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +n_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +n_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +n_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +n_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +n_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +n_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +n_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +n_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +n_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +n_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +n_pkey.o: ../cryptlib.h n_pkey.c +nsseq.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +nsseq.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +nsseq.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +nsseq.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +nsseq.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +nsseq.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +nsseq.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +nsseq.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +nsseq.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +nsseq.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +nsseq.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +nsseq.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +nsseq.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +nsseq.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +nsseq.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +nsseq.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +nsseq.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +nsseq.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +nsseq.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h nsseq.c +p5_pbe.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p5_pbe.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +p5_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p5_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p5_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p5_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p5_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p5_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p5_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +p5_pbe.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +p5_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p5_pbe.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p5_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p5_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p5_pbe.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p5_pbe.o: ../cryptlib.h p5_pbe.c +p5_pbev2.o: ../../e_os.h ../../include/openssl/aes.h +p5_pbev2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +p5_pbev2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p5_pbev2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p5_pbev2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p5_pbev2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p5_pbev2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p5_pbev2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p5_pbev2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p5_pbev2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p5_pbev2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p5_pbev2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p5_pbev2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p5_pbev2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p5_pbev2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p5_pbev2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p5_pbev2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p5_pbev2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p5_pbev2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p5_pbev2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_pbev2.c +p8_pkey.o: ../../e_os.h ../../include/openssl/aes.h +p8_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +p8_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p8_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p8_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p8_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p8_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p8_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p8_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p8_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p8_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p8_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p8_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p8_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p8_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p8_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p8_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p8_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p8_pkey.o: ../cryptlib.h p8_pkey.c +t_bitst.o: ../../e_os.h ../../include/openssl/aes.h +t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +t_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +t_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +t_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +t_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +t_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +t_bitst.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +t_bitst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +t_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +t_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +t_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +t_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +t_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +t_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +t_bitst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +t_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +t_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h t_bitst.c +t_crl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +t_crl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_crl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_crl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +t_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +t_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +t_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +t_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +t_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +t_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +t_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +t_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +t_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +t_crl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +t_crl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +t_crl.o: ../cryptlib.h t_crl.c +t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +t_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +t_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h +t_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +t_pkey.o: ../../include/openssl/symhacks.h ../cryptlib.h t_pkey.c +t_req.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +t_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_req.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h +t_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +t_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +t_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +t_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +t_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +t_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +t_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +t_req.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +t_req.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +t_req.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +t_req.o: ../cryptlib.h t_req.c +t_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +t_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_spki.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +t_spki.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +t_spki.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +t_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +t_spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +t_spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +t_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +t_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +t_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +t_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +t_spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +t_spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +t_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +t_spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +t_spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +t_spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +t_spki.o: ../cryptlib.h t_spki.c +t_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +t_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_x509.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h +t_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +t_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +t_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +t_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +t_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +t_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +t_x509.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +t_x509.o: ../cryptlib.h t_x509.c +t_x509a.o: ../../e_os.h ../../include/openssl/aes.h +t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_x509a.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +t_x509a.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_x509a.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_x509a.o: ../../include/openssl/err.h ../../include/openssl/evp.h +t_x509a.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +t_x509a.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +t_x509a.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +t_x509a.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +t_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_x509a.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +t_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +t_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +t_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +t_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +t_x509a.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +t_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h t_x509a.c +tasn_dec.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_dec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_dec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +tasn_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +tasn_dec.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +tasn_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tasn_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_dec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_dec.o: ../../include/openssl/symhacks.h tasn_dec.c +tasn_enc.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_enc.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tasn_enc.o: ../../include/openssl/opensslconf.h +tasn_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_enc.o: ../../include/openssl/symhacks.h tasn_enc.c +tasn_fre.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_fre.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_fre.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_fre.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tasn_fre.o: ../../include/openssl/opensslconf.h +tasn_fre.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_fre.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_fre.o: ../../include/openssl/symhacks.h tasn_fre.c +tasn_new.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_new.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_new.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_new.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +tasn_new.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tasn_new.o: ../../include/openssl/opensslconf.h +tasn_new.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_new.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_new.o: ../../include/openssl/symhacks.h tasn_new.c +tasn_typ.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_typ.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_typ.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_typ.o: ../../include/openssl/opensslconf.h +tasn_typ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_typ.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_typ.o: ../../include/openssl/symhacks.h tasn_typ.c +tasn_utl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_utl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_utl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_utl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +tasn_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tasn_utl.o: ../../include/openssl/opensslconf.h +tasn_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_utl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_utl.o: ../../include/openssl/symhacks.h tasn_utl.c +x_algor.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_algor.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_algor.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_algor.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_algor.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_algor.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_algor.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_algor.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_algor.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_algor.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_algor.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_algor.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_algor.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_algor.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_algor.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_algor.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_algor.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_algor.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_algor.o: x_algor.c +x_attrib.o: ../../e_os.h ../../include/openssl/aes.h +x_attrib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +x_attrib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_attrib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_attrib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_attrib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_attrib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_attrib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_attrib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_attrib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_attrib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_attrib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_attrib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_attrib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_attrib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_attrib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_attrib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_attrib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_attrib.o: ../cryptlib.h x_attrib.c +x_bignum.o: ../../e_os.h ../../include/openssl/asn1.h +x_bignum.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_bignum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_bignum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +x_bignum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +x_bignum.o: ../../include/openssl/opensslconf.h +x_bignum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_bignum.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +x_bignum.o: ../../include/openssl/symhacks.h ../cryptlib.h x_bignum.c +x_crl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_crl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_crl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_crl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_crl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_crl.c +x_exten.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_exten.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_exten.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_exten.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_exten.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_exten.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_exten.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_exten.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_exten.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_exten.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_exten.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_exten.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_exten.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_exten.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_exten.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_exten.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_exten.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_exten.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_exten.o: x_exten.c +x_info.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_info.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_info.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_info.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_info.o: ../cryptlib.h x_info.c +x_long.o: ../../e_os.h ../../include/openssl/asn1.h +x_long.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_long.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_long.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +x_long.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +x_long.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_long.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +x_long.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_long.o: ../cryptlib.h x_long.c +x_name.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_name.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_name.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_name.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_name.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_name.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_name.c +x_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +x_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_pkey.c +x_pubkey.o: ../../e_os.h ../../include/openssl/aes.h +x_pubkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +x_pubkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_pubkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_pubkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_pubkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_pubkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_pubkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_pubkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_pubkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_pubkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_pubkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_pubkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_pubkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_pubkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_pubkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_pubkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_pubkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_pubkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_pubkey.o: ../cryptlib.h x_pubkey.c +x_req.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_req.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_req.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_req.c +x_sig.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_sig.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_sig.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_sig.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_sig.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_sig.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_sig.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_sig.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_sig.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_sig.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_sig.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_sig.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_sig.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_sig.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_sig.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_sig.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_sig.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_sig.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_sig.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_sig.c +x_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_spki.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_spki.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_spki.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_spki.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_spki.c +x_val.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_val.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_val.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_val.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_val.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_val.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_val.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_val.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_val.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_val.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_val.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_val.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_val.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_val.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_val.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_val.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_val.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_val.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_val.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_val.c +x_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h x_x509.c +x_x509a.o: ../../e_os.h ../../include/openssl/aes.h +x_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +x_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_x509a.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_x509a.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_x509a.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_x509a.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_x509a.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_x509a.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_x509a.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_x509a.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_x509a.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_x509a.o: ../cryptlib.h x_x509a.c diff --git a/src/lib/libcrypto/asn1/a_gentm.c b/src/lib/libcrypto/asn1/a_gentm.c index 8581007868..0dfd576211 100644 --- a/src/lib/libcrypto/asn1/a_gentm.c +++ b/src/lib/libcrypto/asn1/a_gentm.c @@ -192,8 +192,9 @@ int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str) { if (s != NULL) { - ASN1_STRING_set((ASN1_STRING *)s, - (unsigned char *)str,t.length); + if (!ASN1_STRING_set((ASN1_STRING *)s, + (unsigned char *)str,t.length)) + return 0; s->type=V_ASN1_GENERALIZEDTIME; } return(1); @@ -223,7 +224,12 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, if ((p == NULL) || ((size_t)s->length < len)) { p=OPENSSL_malloc(len); - if (p == NULL) return(NULL); + if (p == NULL) + { + ASN1err(ASN1_F_ASN1_GENERALIZEDTIME_SET, + ERR_R_MALLOC_FAILURE); + return(NULL); + } if (s->data != NULL) OPENSSL_free(s->data); s->data=(unsigned char *)p; diff --git a/src/lib/libcrypto/asn1/a_utctm.c b/src/lib/libcrypto/asn1/a_utctm.c index 999852dae5..7b25fed331 100644 --- a/src/lib/libcrypto/asn1/a_utctm.c +++ b/src/lib/libcrypto/asn1/a_utctm.c @@ -173,8 +173,9 @@ int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str) { if (s != NULL) { - ASN1_STRING_set((ASN1_STRING *)s, - (unsigned char *)str,t.length); + if (!ASN1_STRING_set((ASN1_STRING *)s, + (unsigned char *)str,t.length)) + return 0; s->type = V_ASN1_UTCTIME; } return(1); @@ -203,7 +204,11 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) if ((p == NULL) || ((size_t)s->length < len)) { p=OPENSSL_malloc(len); - if (p == NULL) return(NULL); + if (p == NULL) + { + ASN1err(ASN1_F_ASN1_UTCTIME_SET,ERR_R_MALLOC_FAILURE); + return(NULL); + } if (s->data != NULL) OPENSSL_free(s->data); s->data=(unsigned char *)p; diff --git a/src/lib/libcrypto/bf/Makefile b/src/lib/libcrypto/bf/Makefile new file mode 100644 index 0000000000..0e2121efdc --- /dev/null +++ b/src/lib/libcrypto/bf/Makefile @@ -0,0 +1,116 @@ +# +# SSLeay/crypto/blowfish/Makefile +# + +DIR= bf +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +BF_ENC= bf_enc.o +# or use +#DES_ENC= bx86-elf.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=bftest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c +LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o + +SRC= $(LIBSRC) + +EXHEADER= blowfish.h +HEADER= bf_pi.h bf_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > bx86-elf.s) + +# a.out +asm/bx86-out.o: asm/bx86unix.cpp + $(CPP) -DOUT asm/bx86unix.cpp | as -o asm/bx86-out.o + +# bsdi +asm/bx86bsdi.o: asm/bx86unix.cpp + $(CPP) -DBSDI asm/bx86unix.cpp | sed 's/ :/:/' | as -o asm/bx86bsdi.o + +asm/bx86unix.cpp: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) bf-586.pl cpp $(PROCESSOR) >bx86unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: installs + +installs: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/bx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +bf_cfb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h +bf_cfb64.o: ../../include/openssl/opensslconf.h bf_cfb64.c bf_locl.h +bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h +bf_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bf_ecb.o: bf_ecb.c bf_locl.h +bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h +bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h +bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h +bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c +bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/crypto.h +bf_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +bf_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bf_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bf_skey.o: bf_locl.h bf_pi.h bf_skey.c diff --git a/src/lib/libcrypto/bio/Makefile b/src/lib/libcrypto/bio/Makefile new file mode 100644 index 0000000000..19d9350760 --- /dev/null +++ b/src/lib/libcrypto/bio/Makefile @@ -0,0 +1,214 @@ +# +# SSLeay/crypto/bio/Makefile +# + +DIR= bio +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +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 bss_log.c bss_bio.c +# bf_lbuf.c +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 bss_log.o bss_bio.o +# bf_lbuf.o + +SRC= $(LIBSRC) + +EXHEADER= bio.h +HEADER= bss_file.c $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +b_dump.o: ../../e_os.h ../../include/openssl/bio.h +b_dump.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +b_dump.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +b_dump.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +b_dump.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +b_dump.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +b_dump.o: ../cryptlib.h b_dump.c +b_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +b_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +b_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +b_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +b_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +b_print.o: ../cryptlib.h b_print.c +b_sock.o: ../../e_os.h ../../include/openssl/bio.h +b_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +b_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +b_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +b_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +b_sock.o: ../cryptlib.h b_sock.c +bf_buff.o: ../../e_os.h ../../include/openssl/bio.h +bf_buff.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bf_buff.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bf_buff.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bf_buff.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bf_buff.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bf_buff.o: ../cryptlib.h bf_buff.c +bf_nbio.o: ../../e_os.h ../../include/openssl/bio.h +bf_nbio.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bf_nbio.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bf_nbio.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bf_nbio.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bf_nbio.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +bf_nbio.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bf_nbio.o: ../cryptlib.h bf_nbio.c +bf_null.o: ../../e_os.h ../../include/openssl/bio.h +bf_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bf_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bf_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bf_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bf_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bf_null.o: ../cryptlib.h bf_null.c +bio_cb.o: ../../e_os.h ../../include/openssl/bio.h +bio_cb.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bio_cb.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_cb.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bio_cb.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bio_cb.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_cb.o: ../cryptlib.h bio_cb.c +bio_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +bio_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bio_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bio_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_err.o: bio_err.c +bio_lib.o: ../../e_os.h ../../include/openssl/bio.h +bio_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bio_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bio_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bio_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_lib.o: ../cryptlib.h bio_lib.c +bss_acpt.o: ../../e_os.h ../../include/openssl/bio.h +bss_acpt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_acpt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_acpt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_acpt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_acpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_acpt.o: ../cryptlib.h bss_acpt.c +bss_bio.o: ../../e_os.h ../../include/openssl/bio.h +bss_bio.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +bss_bio.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +bss_bio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bss_bio.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bss_bio.o: ../../include/openssl/symhacks.h bss_bio.c +bss_conn.o: ../../e_os.h ../../include/openssl/bio.h +bss_conn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_conn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_conn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_conn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_conn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_conn.o: ../cryptlib.h bss_conn.c +bss_fd.o: ../../e_os.h ../../include/openssl/bio.h +bss_fd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_fd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_fd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_fd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_fd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_fd.o: ../cryptlib.h bss_fd.c +bss_file.o: ../../e_os.h ../../include/openssl/bio.h +bss_file.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_file.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_file.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_file.o: ../cryptlib.h bss_file.c +bss_log.o: ../../e_os.h ../../include/openssl/bio.h +bss_log.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_log.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_log.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_log.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_log.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_log.o: ../cryptlib.h bss_log.c +bss_mem.o: ../../e_os.h ../../include/openssl/bio.h +bss_mem.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_mem.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_mem.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_mem.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_mem.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_mem.o: ../cryptlib.h bss_mem.c +bss_null.o: ../../e_os.h ../../include/openssl/bio.h +bss_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_null.o: ../cryptlib.h bss_null.c +bss_sock.o: ../../e_os.h ../../include/openssl/bio.h +bss_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_sock.o: ../cryptlib.h bss_sock.c diff --git a/src/lib/libcrypto/bn/Makefile b/src/lib/libcrypto/bn/Makefile new file mode 100644 index 0000000000..f693d35d87 --- /dev/null +++ b/src/lib/libcrypto/bn/Makefile @@ -0,0 +1,331 @@ +# +# SSLeay/crypto/bn/Makefile +# + +DIR= bn +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +BN_ASM= bn_asm.o +# or use +#BN_ASM= bn86-elf.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=bntest.c exptest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \ + bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ + bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \ + bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c + +LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \ + bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \ + bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \ + bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o + +SRC= $(LIBSRC) + +EXHEADER= bn.h +HEADER= bn_lcl.h bn_prime.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +bn_prime.h: bn_prime.pl + $(PERL) bn_prime.pl >bn_prime.h + +divtest: divtest.c ../../libcrypto.a + cc -I../../include divtest.c -o divtest ../../libcrypto.a + +bnbug: bnbug.c ../../libcrypto.a top + cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/bn86-elf.s: asm/bn-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) bn-586.pl elf $(CFLAGS) > bn86-elf.s) + +asm/co86-elf.s: asm/co-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) co-586.pl elf $(CFLAGS) > co86-elf.s) + +# a.out +asm/bn86-out.o: asm/bn86unix.cpp + $(CPP) -DOUT asm/bn86unix.cpp | as -o asm/bn86-out.o + +asm/co86-out.o: asm/co86unix.cpp + $(CPP) -DOUT asm/co86unix.cpp | as -o asm/co86-out.o + +# bsdi +asm/bn86bsdi.o: asm/bn86unix.cpp + $(CPP) -DBSDI asm/bn86unix.cpp | sed 's/ :/:/' | as -o asm/bn86bsdi.o + +asm/co86bsdi.o: asm/co86unix.cpp + $(CPP) -DBSDI asm/co86unix.cpp | sed 's/ :/:/' | as -o asm/co86bsdi.o + +asm/bn86unix.cpp: asm/bn-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) bn-586.pl cpp >bn86unix.cpp ) + +asm/co86unix.cpp: asm/co-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) co-586.pl cpp >co86unix.cpp ) + +asm/sparcv8.o: asm/sparcv8.S + +asm/sparcv8plus.o: asm/sparcv8plus.S + +# Old GNU assembler doesn't understand V9 instructions, so we +# hire /usr/ccs/bin/as to do the job. Note that option is called +# *-gcc27, but even gcc 2>=8 users may experience similar problem +# if they didn't bother to upgrade GNU assembler. Such users should +# not choose this option, but be adviced to *remove* GNU assembler +# or upgrade it. +asm/sparcv8plus-gcc27.o: asm/sparcv8plus.S + $(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \ + /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o + + +asm/ia64.o: asm/ia64.S + +# Some compiler drivers (most notably HP-UX and Intel C++) don't +# understand .S extension:-( I wish I could pipe output from cc -E, +# but it's too compiler driver/ABI dependent to cover with a single +# rule... +asm/ia64-cpp.o: asm/ia64.S + $(CC) $(ASFLAGS) -E asm/ia64.S > /tmp/ia64.$$$$.s && \ + $(CC) $(ASFLAGS) -c -o asm/ia64-cpp.o /tmp/ia64.$$$$.s; \ + rm -f /tmp/ia64.$$$$.s + +asm/x86_64-gcc.o: asm/x86_64-gcc.c + $(CC) $(ASFLAGS) -c -o $@ $< + +asm/pa-risc2W.o: asm/pa-risc2W.s + /usr/ccs/bin/as -o asm/pa-risc2W.o asm/pa-risc2W.s + +asm/linux_ppc32.s: asm/ppc.pl; $(PERL) $< $@ +asm/linux_ppc64.s: asm/ppc.pl; $(PERL) $< $@ +asm/aix_ppc32.s: asm/ppc.pl; $(PERL) asm/ppc.pl $@ +asm/aix_ppc64.s: asm/ppc.pl; $(PERL) asm/ppc.pl $@ +asm/osx_ppc32.s: asm/ppc.pl; $(PERL) $< $@ + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +exptest: + rm -f exptest + gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a + +div: + rm -f a.out + gcc -I.. -g div.c ../../libcrypto.a + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-elf.* *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +bn_add.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_add.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_add.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_add.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_add.o: ../cryptlib.h bn_add.c bn_lcl.h +bn_asm.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_asm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_asm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_asm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_asm.o: ../cryptlib.h bn_asm.c bn_lcl.h +bn_blind.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_blind.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_blind.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_blind.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_blind.o: ../cryptlib.h bn_blind.c bn_lcl.h +bn_ctx.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_ctx.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_ctx.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_ctx.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_ctx.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_ctx.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_ctx.o: ../cryptlib.h bn_ctx.c bn_lcl.h +bn_div.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_div.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_div.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_div.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_div.o: ../cryptlib.h bn_div.c bn_lcl.h +bn_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +bn_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +bn_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bn_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bn_err.o: ../../include/openssl/symhacks.h bn_err.c +bn_exp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_exp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_exp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_exp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_exp.o: ../cryptlib.h bn_exp.c bn_lcl.h +bn_exp2.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_exp2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_exp2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_exp2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_exp2.o: ../cryptlib.h bn_exp2.c bn_lcl.h +bn_gcd.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_gcd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_gcd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_gcd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_gcd.o: ../cryptlib.h bn_gcd.c bn_lcl.h +bn_kron.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h +bn_kron.o: ../../include/openssl/opensslconf.h bn_kron.c bn_lcl.h +bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_lib.o: ../cryptlib.h bn_lcl.h bn_lib.c +bn_mod.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_mod.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_mod.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_mod.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_mod.o: ../cryptlib.h bn_lcl.h bn_mod.c +bn_mont.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_mont.o: ../cryptlib.h bn_lcl.h bn_mont.c +bn_mpi.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_mpi.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_mpi.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mpi.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_mpi.o: ../cryptlib.h bn_lcl.h bn_mpi.c +bn_mul.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_mul.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_mul.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mul.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_mul.o: ../cryptlib.h bn_lcl.h bn_mul.c +bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_prime.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bn_prime.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +bn_prime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_prime.o: ../cryptlib.h bn_lcl.h bn_prime.c bn_prime.h +bn_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_print.o: ../cryptlib.h bn_lcl.h bn_print.c +bn_rand.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_rand.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bn_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +bn_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_rand.o: ../cryptlib.h bn_lcl.h bn_rand.c +bn_recp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_recp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_recp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_recp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_recp.o: ../cryptlib.h bn_lcl.h bn_recp.c +bn_shift.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_shift.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_shift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_shift.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_shift.o: ../cryptlib.h bn_lcl.h bn_shift.c +bn_sqr.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_sqr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_sqr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_sqr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_sqr.o: ../cryptlib.h bn_lcl.h bn_sqr.c +bn_sqrt.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_sqrt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_sqrt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_sqrt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_sqrt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_sqrt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_sqrt.o: ../cryptlib.h bn_lcl.h bn_sqrt.c +bn_word.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_word.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_word.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_word.o: ../cryptlib.h bn_lcl.h bn_word.c diff --git a/src/lib/libcrypto/bn/bntest.c b/src/lib/libcrypto/bn/bntest.c index 3c8c540387..28cd3339da 100644 --- a/src/lib/libcrypto/bn/bntest.c +++ b/src/lib/libcrypto/bn/bntest.c @@ -232,7 +232,7 @@ int main(int argc, char *argv[]) EXIT(0); err: BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices - * the failure, see test_bn in test/Makefile.ssl*/ + * the failure, see test_bn in test/Makefile */ BIO_flush(out); ERR_load_crypto_strings(); ERR_print_errors_fp(stderr); diff --git a/src/lib/libcrypto/buffer/Makefile b/src/lib/libcrypto/buffer/Makefile new file mode 100644 index 0000000000..3911baf513 --- /dev/null +++ b/src/lib/libcrypto/buffer/Makefile @@ -0,0 +1,92 @@ +# +# SSLeay/crypto/buffer/Makefile +# + +DIR= buffer +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= buffer.c buf_err.c +LIBOBJ= buffer.o buf_err.o + +SRC= $(LIBSRC) + +EXHEADER= buffer.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +buf_err.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h +buf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +buf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +buf_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +buf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +buf_err.o: ../../include/openssl/symhacks.h buf_err.c +buffer.o: ../../e_os.h ../../include/openssl/bio.h +buffer.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +buffer.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +buffer.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +buffer.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +buffer.o: ../cryptlib.h buffer.c diff --git a/src/lib/libcrypto/cast/Makefile b/src/lib/libcrypto/cast/Makefile new file mode 100644 index 0000000000..8b0d04bb7c --- /dev/null +++ b/src/lib/libcrypto/cast/Makefile @@ -0,0 +1,120 @@ +# +# SSLeay/crypto/cast/Makefile +# + +DIR= cast +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CAST_ENC=c_enc.o +# or use +#CAST_ENC=asm/cx86-elf.o +#CAST_ENC=asm/cx86-out.o +#CAST_ENC=asm/cx86-sol.o +#CAST_ENC=asm/cx86bdsi.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=casttest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c +LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o + +SRC= $(LIBSRC) + +EXHEADER= cast.h +HEADER= cast_s.h cast_lcl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/cx86-elf.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) cast-586.pl elf $(CLAGS) $(PROCESSOR) > cx86-elf.s) + +# a.out +asm/cx86-out.o: asm/cx86unix.cpp + $(CPP) -DOUT asm/cx86unix.cpp | as -o asm/cx86-out.o + +# bsdi +asm/cx86bsdi.o: asm/cx86unix.cpp + $(CPP) -DBSDI asm/cx86unix.cpp | sed 's/ :/:/' | as -o asm/cx86bsdi.o + +asm/cx86unix.cpp: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) cast-586.pl cpp $(PROCESSOR) >cx86unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/cx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +c_cfb64.o: ../../e_os.h ../../include/openssl/cast.h +c_cfb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +c_cfb64.o: c_cfb64.c cast_lcl.h +c_ecb.o: ../../e_os.h ../../include/openssl/cast.h +c_ecb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +c_ecb.o: ../../include/openssl/opensslv.h c_ecb.c cast_lcl.h +c_enc.o: ../../e_os.h ../../include/openssl/cast.h +c_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +c_enc.o: c_enc.c cast_lcl.h +c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h +c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +c_ofb64.o: c_ofb64.c cast_lcl.h +c_skey.o: ../../e_os.h ../../include/openssl/cast.h +c_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +c_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +c_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +c_skey.o: ../../include/openssl/symhacks.h c_skey.c cast_lcl.h cast_s.h diff --git a/src/lib/libcrypto/comp/Makefile b/src/lib/libcrypto/comp/Makefile new file mode 100644 index 0000000000..68109a8013 --- /dev/null +++ b/src/lib/libcrypto/comp/Makefile @@ -0,0 +1,113 @@ +# +# SSLeay/crypto/comp/Makefile +# + +DIR= comp +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= comp_lib.c comp_err.c \ + c_rle.c c_zlib.c + +LIBOBJ= comp_lib.o comp_err.o \ + c_rle.o c_zlib.o + +SRC= $(LIBSRC) + +EXHEADER= comp.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +c_rle.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +c_rle.o: ../../include/openssl/bn.h ../../include/openssl/comp.h +c_rle.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +c_rle.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +c_rle.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +c_rle.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +c_rle.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h c_rle.c +c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +c_zlib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h +c_zlib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +c_zlib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +c_zlib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +c_zlib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +c_zlib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +c_zlib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +c_zlib.o: c_zlib.c +comp_err.o: ../../include/openssl/bio.h ../../include/openssl/comp.h +comp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +comp_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +comp_err.o: ../../include/openssl/opensslconf.h +comp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +comp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +comp_err.o: comp_err.c +comp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +comp_lib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h +comp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +comp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +comp_lib.o: ../../include/openssl/opensslconf.h +comp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +comp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +comp_lib.o: ../../include/openssl/symhacks.h comp_lib.c diff --git a/src/lib/libcrypto/conf/Makefile b/src/lib/libcrypto/conf/Makefile new file mode 100644 index 0000000000..6d2f8ffd9a --- /dev/null +++ b/src/lib/libcrypto/conf/Makefile @@ -0,0 +1,181 @@ +# +# SSLeay/crypto/conf/Makefile +# + +DIR= conf +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c \ + conf_mall.c conf_sap.c + +LIBOBJ= conf_err.o conf_lib.o conf_api.o conf_def.o conf_mod.o \ + conf_mall.o conf_sap.o + +SRC= $(LIBSRC) + +EXHEADER= conf.h conf_api.h +HEADER= conf_def.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +conf_api.o: ../../e_os.h ../../include/openssl/bio.h +conf_api.o: ../../include/openssl/conf.h ../../include/openssl/conf_api.h +conf_api.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +conf_api.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +conf_api.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +conf_api.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_api.o: conf_api.c +conf_def.o: ../../e_os.h ../../include/openssl/bio.h +conf_def.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +conf_def.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h +conf_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +conf_def.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +conf_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_def.o: ../cryptlib.h conf_def.c conf_def.h +conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h +conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +conf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +conf_err.o: ../../include/openssl/opensslconf.h +conf_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +conf_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_err.o: conf_err.c +conf_lib.o: ../../include/openssl/bio.h ../../include/openssl/conf.h +conf_lib.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h +conf_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +conf_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +conf_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_lib.o: conf_lib.c +conf_mall.o: ../../e_os.h ../../include/openssl/aes.h +conf_mall.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_mall.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_mall.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_mall.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_mall.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_mall.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_mall.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_mall.o: ../../include/openssl/engine.h ../../include/openssl/err.h +conf_mall.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +conf_mall.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +conf_mall.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +conf_mall.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +conf_mall.o: ../../include/openssl/objects.h +conf_mall.o: ../../include/openssl/opensslconf.h +conf_mall.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +conf_mall.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +conf_mall.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +conf_mall.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +conf_mall.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +conf_mall.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +conf_mall.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +conf_mall.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +conf_mall.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_mall.c +conf_mod.o: ../../e_os.h ../../include/openssl/aes.h +conf_mod.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_mod.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_mod.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_mod.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_mod.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_mod.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_mod.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_mod.o: ../../include/openssl/err.h ../../include/openssl/evp.h +conf_mod.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +conf_mod.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +conf_mod.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +conf_mod.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +conf_mod.o: ../../include/openssl/opensslconf.h +conf_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +conf_mod.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +conf_mod.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +conf_mod.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +conf_mod.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +conf_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_mod.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +conf_mod.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +conf_mod.o: ../cryptlib.h conf_mod.c +conf_sap.o: ../../e_os.h ../../include/openssl/aes.h +conf_sap.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_sap.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_sap.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_sap.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_sap.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_sap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_sap.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_sap.o: ../../include/openssl/engine.h ../../include/openssl/err.h +conf_sap.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +conf_sap.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +conf_sap.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +conf_sap.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +conf_sap.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +conf_sap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +conf_sap.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +conf_sap.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +conf_sap.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +conf_sap.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +conf_sap.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +conf_sap.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +conf_sap.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +conf_sap.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_sap.c diff --git a/src/lib/libcrypto/crypto-lib.com b/src/lib/libcrypto/crypto-lib.com index 39e78c69e5..c044ce0099 100644 --- a/src/lib/libcrypto/crypto-lib.com +++ b/src/lib/libcrypto/crypto-lib.com @@ -158,7 +158,7 @@ $! $ APPS_DES = "DES/DES,CBC3_ENC" $ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE" $ -$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time" +$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time,o_str" $ LIB_MD2 = "md2_dgst,md2_one" $ LIB_MD4 = "md4_dgst,md4_one" $ LIB_MD5 = "md5_dgst,md5_one" @@ -247,7 +247,7 @@ $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ - $ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ - "v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ - "v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info,"+ - - "v3_ocsp,v3_akeya" + "v3_ocsp,v3_akeya,v3_pcia,v3_pci" $ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def,conf_mod,conf_mall,conf_sap" $ LIB_TXT_DB = "txt_db" $ LIB_PKCS7 = "pk7_asn1,pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,"+ - @@ -752,8 +752,8 @@ $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT " ALL : Just Build Everything." -$ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.SSL]LIBCRYPTO.OLB Library." -$ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.SSL]*.EXE Programs." +$ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library." +$ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.EXE Programs." $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" $ WRITE SYS$OUTPUT "" diff --git a/src/lib/libcrypto/des/FILES0 b/src/lib/libcrypto/des/FILES0 index 4c7ea2de7a..1c2e1f75b9 100644 --- a/src/lib/libcrypto/des/FILES0 +++ b/src/lib/libcrypto/des/FILES0 @@ -8,7 +8,7 @@ README - What this package is. VERSION - Which version this is and what was changed. KERBEROS - Kerberos version 4 notes. Makefile.PL - An old makefile to build with perl5, not current. -Makefile.ssl - The SSLeay makefile +Makefile - The SSLeay makefile Makefile.uni - The normal unix makefile. GNUmakefile - The makefile for use with glibc. makefile.bc - A Borland C makefile diff --git a/src/lib/libcrypto/des/Makefile b/src/lib/libcrypto/des/Makefile new file mode 100644 index 0000000000..655f2ea1a8 --- /dev/null +++ b/src/lib/libcrypto/des/Makefile @@ -0,0 +1,314 @@ +# +# SSLeay/crypto/des/Makefile +# + +DIR= des +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES=-I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r +RANLIB= ranlib +DES_ENC= des_enc.o fcrypt_b.o +# or use +#DES_ENC= dx86-elf.o yx86-elf.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=destest.c +APPS= + +LIB=$(TOP)/libcrypto.a +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 rpc_enc.c set_key.c \ + des_enc.c fcrypt_b.c \ + xcbc_enc.c \ + str2key.c cfb64ede.c ofb64ede.c ede_cbcm_enc.c des_old.c des_old2.c \ + read2pwd.c + +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} \ + fcrypt.o xcbc_enc.o rpc_enc.o cbc_cksm.o \ + ede_cbcm_enc.o des_old.o des_old2.o read2pwd.o + +SRC= $(LIBSRC) + +EXHEADER= des.h des_old.h +HEADER= des_locl.h rpc_des.h spr.h des_ver.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +des: des.o cbc3_enc.o lib + $(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB) + +# elf +asm/dx86-elf.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) des-586.pl elf $(CFLAGS) > dx86-elf.s) + +asm/yx86-elf.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) crypt586.pl elf $(CFLAGS) > yx86-elf.s) + +# a.out +asm/dx86-out.o: asm/dx86unix.cpp + $(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o + +asm/yx86-out.o: asm/yx86unix.cpp + $(CPP) -DOUT asm/yx86unix.cpp | as -o asm/yx86-out.o + +# bsdi +asm/dx86bsdi.o: asm/dx86unix.cpp + $(CPP) -DBSDI asm/dx86unix.cpp | sed 's/ :/:/' | as -o asm/dx86bsdi.o + +asm/yx86bsdi.o: asm/yx86unix.cpp + $(CPP) -DBSDI asm/yx86unix.cpp | sed 's/ :/:/' | as -o asm/yx86bsdi.o + +asm/dx86unix.cpp: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) des-586.pl cpp >dx86unix.cpp) + +asm/yx86unix.cpp: asm/crypt586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: installs + +installs: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +cbc_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +cbc_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +cbc_cksm.o: ../../include/openssl/opensslconf.h +cbc_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +cbc_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +cbc_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +cbc_cksm.o: cbc_cksm.c des_locl.h +cbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +cbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +cbc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +cbc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +cbc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +cbc_enc.o: ../../include/openssl/ui_compat.h cbc_enc.c des_locl.h ncbc_enc.c +cfb64ede.o: ../../e_os.h ../../include/openssl/crypto.h +cfb64ede.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +cfb64ede.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +cfb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +cfb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +cfb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +cfb64ede.o: cfb64ede.c des_locl.h +cfb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +cfb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +cfb64enc.o: ../../include/openssl/opensslconf.h +cfb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +cfb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +cfb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +cfb64enc.o: cfb64enc.c des_locl.h +cfb_enc.o: ../../e_os.h ../../include/openssl/crypto.h +cfb_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +cfb_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +cfb_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +cfb_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +cfb_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +cfb_enc.o: cfb_enc.c des_locl.h +des_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +des_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +des_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +des_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +des_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +des_enc.o: ../../include/openssl/ui_compat.h des_enc.c des_locl.h ncbc_enc.c +des_old.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +des_old.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +des_old.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +des_old.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +des_old.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +des_old.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +des_old.o: ../../include/openssl/ui_compat.h des_old.c +des_old2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +des_old2.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +des_old2.o: ../../include/openssl/opensslconf.h +des_old2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +des_old2.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +des_old2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +des_old2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +des_old2.o: des_old2.c +ecb3_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ecb3_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ecb3_enc.o: ../../include/openssl/opensslconf.h +ecb3_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ecb3_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ecb3_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ecb3_enc.o: des_locl.h ecb3_enc.c +ecb_enc.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ecb_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +ecb_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ecb_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ecb_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ecb_enc.o: des_locl.h des_ver.h ecb_enc.c spr.h +ede_cbcm_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ede_cbcm_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ede_cbcm_enc.o: ../../include/openssl/opensslconf.h +ede_cbcm_enc.o: ../../include/openssl/opensslv.h +ede_cbcm_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ede_cbcm_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ede_cbcm_enc.o: ../../include/openssl/ui_compat.h des_locl.h ede_cbcm_enc.c +enc_read.o: ../../e_os.h ../../include/openssl/bio.h +enc_read.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +enc_read.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +enc_read.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +enc_read.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +enc_read.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +enc_read.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +enc_read.o: ../cryptlib.h des_locl.h enc_read.c +enc_writ.o: ../../e_os.h ../../include/openssl/bio.h +enc_writ.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +enc_writ.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +enc_writ.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +enc_writ.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +enc_writ.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +enc_writ.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +enc_writ.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +enc_writ.o: ../cryptlib.h des_locl.h enc_writ.c +fcrypt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +fcrypt.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +fcrypt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +fcrypt.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +fcrypt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +fcrypt.o: ../../include/openssl/ui_compat.h des_locl.h fcrypt.c +fcrypt_b.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +fcrypt_b.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +fcrypt_b.o: ../../include/openssl/opensslconf.h +fcrypt_b.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +fcrypt_b.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fcrypt_b.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +fcrypt_b.o: des_locl.h fcrypt_b.c +ofb64ede.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ofb64ede.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ofb64ede.o: ../../include/openssl/opensslconf.h +ofb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ofb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ofb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ofb64ede.o: des_locl.h ofb64ede.c +ofb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ofb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ofb64enc.o: ../../include/openssl/opensslconf.h +ofb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ofb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ofb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ofb64enc.o: des_locl.h ofb64enc.c +ofb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ofb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ofb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +ofb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ofb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ofb_enc.o: ../../include/openssl/ui_compat.h des_locl.h ofb_enc.c +pcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +pcbc_enc.o: ../../include/openssl/opensslconf.h +pcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +pcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pcbc_enc.o: des_locl.h pcbc_enc.c +qud_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +qud_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +qud_cksm.o: ../../include/openssl/opensslconf.h +qud_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +qud_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +qud_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +qud_cksm.o: des_locl.h qud_cksm.c +rand_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rand_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +rand_key.o: ../../include/openssl/opensslconf.h +rand_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +rand_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rand_key.o: rand_key.c +read2pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +read2pwd.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +read2pwd.o: ../../include/openssl/opensslconf.h +read2pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +read2pwd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +read2pwd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +read2pwd.o: read2pwd.c +rpc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rpc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +rpc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +rpc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rpc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +rpc_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h rpc_des.h +rpc_enc.o: rpc_enc.c +set_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +set_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +set_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +set_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +set_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +set_key.o: ../../include/openssl/ui_compat.h des_locl.h set_key.c +str2key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +str2key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +str2key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +str2key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +str2key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +str2key.o: ../../include/openssl/ui_compat.h des_locl.h str2key.c +xcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +xcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +xcbc_enc.o: ../../include/openssl/opensslconf.h +xcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +xcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +xcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +xcbc_enc.o: des_locl.h xcbc_enc.c diff --git a/src/lib/libcrypto/des/des_old.c b/src/lib/libcrypto/des/des_old.c index 7e4cd7180d..88e9802aad 100644 --- a/src/lib/libcrypto/des/des_old.c +++ b/src/lib/libcrypto/des/des_old.c @@ -84,7 +84,7 @@ void _ossl_old_des_ecb3_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock des_key_schedule ks1,des_key_schedule ks2, des_key_schedule ks3, int enc) { - DES_ecb3_encrypt((const_DES_cblock *)input, output, + DES_ecb3_encrypt((const unsigned char *)input, (unsigned char *)output, (DES_key_schedule *)ks1, (DES_key_schedule *)ks2, (DES_key_schedule *)ks3, enc); } diff --git a/src/lib/libcrypto/des/destest.c b/src/lib/libcrypto/des/destest.c index 3983ac8e5f..e3e9d77f14 100644 --- a/src/lib/libcrypto/des/destest.c +++ b/src/lib/libcrypto/des/destest.c @@ -439,8 +439,8 @@ int main(int argc, char *argv[]) memcpy(in,plain_data[i],8); memset(out,0,8); memset(outin,0,8); - des_ecb2_encrypt(&in,&out,ks,ks2,DES_ENCRYPT); - des_ecb2_encrypt(&out,&outin,ks,ks2,DES_DECRYPT); + des_ecb2_encrypt(in,out,ks,ks2,DES_ENCRYPT); + des_ecb2_encrypt(out,outin,ks,ks2,DES_DECRYPT); if (memcmp(out,cipher_ecb2[i],8) != 0) { diff --git a/src/lib/libcrypto/dh/Makefile b/src/lib/libcrypto/dh/Makefile new file mode 100644 index 0000000000..c091a8130a --- /dev/null +++ b/src/lib/libcrypto/dh/Makefile @@ -0,0 +1,131 @@ +# +# SSLeay/crypto/dh/Makefile +# + +DIR= dh +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= dhtest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= dh_asn1.c dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c +LIBOBJ= dh_asn1.o dh_gen.o dh_key.o dh_lib.o dh_check.o dh_err.o + +SRC= $(LIBSRC) + +EXHEADER= dh.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +dh_asn1.o: ../../e_os.h ../../include/openssl/asn1.h +dh_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +dh_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dh_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dh_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +dh_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +dh_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +dh_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dh_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_asn1.c +dh_check.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +dh_check.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dh_check.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h +dh_check.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_check.o: ../../include/openssl/opensslconf.h +dh_check.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dh_check.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_check.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_check.c +dh_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dh_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dh_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +dh_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dh_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dh_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_err.o: ../../include/openssl/symhacks.h dh_err.c +dh_gen.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +dh_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dh_gen.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h +dh_gen.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dh_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dh_gen.o: ../cryptlib.h dh_gen.c +dh_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dh_key.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h +dh_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dh_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_key.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_key.c +dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +dh_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dh_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h +dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dh_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +dh_lib.o: ../cryptlib.h dh_lib.c diff --git a/src/lib/libcrypto/dsa/Makefile b/src/lib/libcrypto/dsa/Makefile new file mode 100644 index 0000000000..3a55058973 --- /dev/null +++ b/src/lib/libcrypto/dsa/Makefile @@ -0,0 +1,173 @@ +# +# SSLeay/crypto/dsa/Makefile +# + +DIR= dsa +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=dsatest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c \ + dsa_err.c dsa_ossl.c +LIBOBJ= dsa_gen.o dsa_key.o dsa_lib.o dsa_asn1.o dsa_vrf.o dsa_sign.o \ + dsa_err.o dsa_ossl.o + +SRC= $(LIBSRC) + +EXHEADER= dsa.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +dsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +dsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dsa_asn1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dsa_asn1.o: ../../include/openssl/opensslconf.h +dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dsa_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_asn1.c +dsa_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dsa_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dsa_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dsa_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +dsa_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_err.o: dsa_err.c +dsa_gen.o: ../../e_os.h ../../include/openssl/aes.h +dsa_gen.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +dsa_gen.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +dsa_gen.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +dsa_gen.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h +dsa_gen.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +dsa_gen.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +dsa_gen.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +dsa_gen.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +dsa_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dsa_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dsa_gen.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +dsa_gen.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +dsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dsa_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +dsa_gen.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +dsa_gen.o: ../../include/openssl/ui_compat.h ../cryptlib.h dsa_gen.c +dsa_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_key.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +dsa_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dsa_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dsa_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +dsa_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_key.o: ../cryptlib.h dsa_key.c +dsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +dsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_lib.o: ../../include/openssl/ui.h ../cryptlib.h dsa_lib.c +dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dsa_ossl.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +dsa_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_ossl.o: ../cryptlib.h dsa_ossl.c +dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/fips.h +dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dsa_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +dsa_sign.o: ../cryptlib.h dsa_sign.c +dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_vrf.o: ../../include/openssl/engine.h ../../include/openssl/err.h +dsa_vrf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dsa_vrf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_vrf.o: ../../include/openssl/ui.h ../cryptlib.h dsa_vrf.c diff --git a/src/lib/libcrypto/dso/Makefile b/src/lib/libcrypto/dso/Makefile new file mode 100644 index 0000000000..168951bc3e --- /dev/null +++ b/src/lib/libcrypto/dso/Makefile @@ -0,0 +1,140 @@ +# +# SSLeay/crypto/dso/Makefile +# + +DIR= dso +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c \ + dso_openssl.c dso_win32.c dso_vms.c +LIBOBJ= dso_dl.o dso_dlfcn.o dso_err.o dso_lib.o dso_null.o \ + dso_openssl.o dso_win32.o dso_vms.o + +SRC= $(LIBSRC) + +EXHEADER= dso.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +dso_dl.o: ../../e_os.h ../../include/openssl/bio.h +dso_dl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_dl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_dl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_dl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dso_dl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_dl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_dl.c +dso_dlfcn.o: ../../e_os.h ../../include/openssl/bio.h +dso_dlfcn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_dlfcn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_dlfcn.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_dlfcn.o: ../../include/openssl/opensslconf.h +dso_dlfcn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +dso_dlfcn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dso_dlfcn.o: ../cryptlib.h dso_dlfcn.c +dso_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +dso_err.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dso_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_err.o: ../../include/openssl/symhacks.h dso_err.c +dso_lib.o: ../../e_os.h ../../include/openssl/bio.h +dso_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_lib.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dso_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_lib.c +dso_null.o: ../../e_os.h ../../include/openssl/bio.h +dso_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_null.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_null.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_null.o: ../../include/openssl/opensslconf.h +dso_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +dso_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dso_null.o: ../cryptlib.h dso_null.c +dso_openssl.o: ../../e_os.h ../../include/openssl/bio.h +dso_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_openssl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_openssl.o: ../../include/openssl/opensslconf.h +dso_openssl.o: ../../include/openssl/opensslv.h +dso_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_openssl.c +dso_vms.o: ../../e_os.h ../../include/openssl/bio.h +dso_vms.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_vms.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_vms.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_vms.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dso_vms.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_vms.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_vms.c +dso_win32.o: ../../e_os.h ../../include/openssl/bio.h +dso_win32.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_win32.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_win32.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_win32.o: ../../include/openssl/opensslconf.h +dso_win32.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +dso_win32.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dso_win32.o: ../cryptlib.h dso_win32.c diff --git a/src/lib/libcrypto/dso/dso_win32.c b/src/lib/libcrypto/dso/dso_win32.c index 6c30deb250..3fa90eb27c 100644 --- a/src/lib/libcrypto/dso/dso_win32.c +++ b/src/lib/libcrypto/dso/dso_win32.c @@ -61,7 +61,7 @@ #include "cryptlib.h" #include -#if !defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WINCE) +#if !defined(DSO_WIN32) DSO_METHOD *DSO_METHOD_win32(void) { return NULL; diff --git a/src/lib/libcrypto/ec/Makefile b/src/lib/libcrypto/ec/Makefile new file mode 100644 index 0000000000..8f03658ad4 --- /dev/null +++ b/src/lib/libcrypto/ec/Makefile @@ -0,0 +1,126 @@ +# +# crypto/ec/Makefile +# + +DIR= ec +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=ectest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_recp.c ecp_nist.c ec_cvt.c ec_mult.c \ + ec_err.c + +LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_recp.o ecp_nist.o ec_cvt.o ec_mult.o \ + ec_err.o + +SRC= $(LIBSRC) + +EXHEADER= ec.h +HEADER= ec_lcl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +ec_cvt.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h +ec_cvt.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h +ec_cvt.o: ../../include/openssl/symhacks.h ec_cvt.c ec_lcl.h +ec_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ec_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ec_err.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ec_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ec_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ec_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ec_err.o: ec_err.c +ec_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ec_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ec_lib.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ec_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ec_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ec_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ec_lib.o: ec_lcl.h ec_lib.c +ec_mult.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ec_mult.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ec_mult.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ec_mult.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ec_mult.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ec_mult.o: ec_lcl.h ec_mult.c +ecp_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ecp_mont.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ecp_mont.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ecp_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ecp_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ecp_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ecp_mont.o: ec_lcl.h ecp_mont.c +ecp_nist.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h +ecp_nist.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h +ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c +ecp_recp.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h +ecp_recp.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h +ecp_recp.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_recp.c +ecp_smpl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ecp_smpl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ecp_smpl.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ecp_smpl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ecp_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ecp_smpl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ecp_smpl.o: ec_lcl.h ecp_smpl.c diff --git a/src/lib/libcrypto/engine/Makefile b/src/lib/libcrypto/engine/Makefile new file mode 100644 index 0000000000..38f83f1654 --- /dev/null +++ b/src/lib/libcrypto/engine/Makefile @@ -0,0 +1,536 @@ +# +# OpenSSL/crypto/engine/Makefile +# + +DIR= engine +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= enginetest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \ + eng_table.c eng_pkey.c eng_fat.c eng_all.c \ + tb_rsa.c tb_dsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c \ + eng_openssl.c eng_dyn.c eng_cnf.c \ + hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c \ + hw_cryptodev.c hw_aep.c hw_sureware.c hw_4758_cca.c +LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ + eng_table.o eng_pkey.o eng_fat.o eng_all.o \ + tb_rsa.o tb_dsa.o tb_dh.o tb_rand.o tb_cipher.o tb_digest.o \ + eng_openssl.o eng_dyn.o eng_cnf.o \ + hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o \ + hw_cryptodev.o hw_aep.o hw_sureware.o hw_4758_cca.o + +SRC= $(LIBSRC) + +EXHEADER= engine.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +errors: + $(PERL) $(TOP)/util/mkerr.pl -conf hw.ec \ + -nostatic -staticloader -write hw_*.c + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +eng_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_all.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +eng_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_all.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +eng_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +eng_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +eng_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_all.o: ../../include/openssl/ui.h eng_all.c eng_int.h +eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h +eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_cnf.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +eng_cnf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +eng_cnf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h +eng_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +eng_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_cnf.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_cnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_cnf.o: ../cryptlib.h eng_cnf.c +eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h +eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_ctrl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_ctrl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_ctrl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_ctrl.o: ../../include/openssl/opensslconf.h +eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_ctrl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_ctrl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_ctrl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_ctrl.o: ../cryptlib.h eng_ctrl.c eng_int.h +eng_dyn.o: ../../e_os.h ../../include/openssl/asn1.h +eng_dyn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_dyn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_dyn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_dyn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h +eng_dyn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +eng_dyn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_dyn.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_dyn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_dyn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_dyn.o: ../cryptlib.h eng_dyn.c eng_int.h +eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +eng_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +eng_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +eng_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +eng_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_err.o: ../../include/openssl/ui.h eng_err.c +eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h +eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_fat.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +eng_fat.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +eng_fat.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h +eng_fat.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +eng_fat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_fat.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_fat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_fat.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_fat.o: ../cryptlib.h eng_fat.c eng_int.h +eng_init.o: ../../e_os.h ../../include/openssl/asn1.h +eng_init.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_init.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_init.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_init.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_init.o: ../../include/openssl/opensslconf.h +eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_init.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_init.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_init.o: ../cryptlib.h eng_init.c eng_int.h +eng_lib.o: ../../e_os.h ../../include/openssl/asn1.h +eng_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +eng_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +eng_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +eng_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_lib.o: ../../include/openssl/ui.h ../cryptlib.h eng_int.h eng_lib.c +eng_list.o: ../../e_os.h ../../include/openssl/asn1.h +eng_list.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_list.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_list.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_list.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_list.o: ../../include/openssl/opensslconf.h +eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_list.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_list.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_list.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_list.o: ../cryptlib.h eng_int.h eng_list.c +eng_openssl.o: ../../e_os.h ../../include/openssl/aes.h +eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +eng_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +eng_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +eng_openssl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_openssl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +eng_openssl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +eng_openssl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +eng_openssl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +eng_openssl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +eng_openssl.o: ../../include/openssl/opensslconf.h +eng_openssl.o: ../../include/openssl/opensslv.h +eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +eng_openssl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +eng_openssl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +eng_openssl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +eng_openssl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +eng_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +eng_openssl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_openssl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +eng_openssl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +eng_openssl.o: ../cryptlib.h eng_openssl.c +eng_pkey.o: ../../e_os.h ../../include/openssl/asn1.h +eng_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_pkey.o: ../../include/openssl/opensslconf.h +eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_pkey.o: ../cryptlib.h eng_int.h eng_pkey.c +eng_table.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +eng_table.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +eng_table.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +eng_table.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +eng_table.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_table.o: ../../include/openssl/engine.h ../../include/openssl/err.h +eng_table.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +eng_table.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +eng_table.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +eng_table.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +eng_table.o: ../../include/openssl/objects.h +eng_table.o: ../../include/openssl/opensslconf.h +eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_table.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +eng_table.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +eng_table.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +eng_table.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +eng_table.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_table.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +eng_table.o: eng_int.h eng_table.c +hw_4758_cca.o: ../../e_os.h ../../include/openssl/aes.h +hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_4758_cca.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_4758_cca.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_4758_cca.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_4758_cca.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_4758_cca.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_4758_cca.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +hw_4758_cca.o: ../../include/openssl/err.h ../../include/openssl/evp.h +hw_4758_cca.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +hw_4758_cca.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +hw_4758_cca.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +hw_4758_cca.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +hw_4758_cca.o: ../../include/openssl/opensslconf.h +hw_4758_cca.o: ../../include/openssl/opensslv.h +hw_4758_cca.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +hw_4758_cca.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +hw_4758_cca.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +hw_4758_cca.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +hw_4758_cca.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +hw_4758_cca.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +hw_4758_cca.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +hw_4758_cca.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +hw_4758_cca.o: ../cryptlib.h hw_4758_cca.c hw_4758_cca_err.c hw_4758_cca_err.h +hw_4758_cca.o: vendor_defns/hw_4758_cca.h +hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_aep.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +hw_aep.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +hw_aep.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +hw_aep.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +hw_aep.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +hw_aep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +hw_aep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +hw_aep.o: ../../include/openssl/ui.h hw_aep.c hw_aep_err.c hw_aep_err.h +hw_aep.o: vendor_defns/aep.h +hw_atalla.o: ../../e_os.h ../../include/openssl/asn1.h +hw_atalla.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_atalla.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_atalla.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +hw_atalla.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_atalla.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +hw_atalla.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +hw_atalla.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_atalla.o: ../cryptlib.h hw_atalla.c hw_atalla_err.c hw_atalla_err.h +hw_atalla.o: vendor_defns/atalla.h +hw_cryptodev.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +hw_cryptodev.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +hw_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +hw_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_cryptodev.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_cryptodev.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +hw_cryptodev.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +hw_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +hw_cryptodev.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +hw_cryptodev.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +hw_cryptodev.o: ../../include/openssl/objects.h +hw_cryptodev.o: ../../include/openssl/opensslconf.h +hw_cryptodev.o: ../../include/openssl/opensslv.h +hw_cryptodev.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +hw_cryptodev.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +hw_cryptodev.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +hw_cryptodev.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +hw_cryptodev.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +hw_cryptodev.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_cryptodev.o: ../../include/openssl/ui_compat.h hw_cryptodev.c +hw_cswift.o: ../../e_os.h ../../include/openssl/asn1.h +hw_cswift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_cswift.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_cswift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +hw_cswift.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_cswift.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +hw_cswift.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +hw_cswift.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_cswift.o: ../cryptlib.h hw_cswift.c hw_cswift_err.c hw_cswift_err.h +hw_cswift.o: vendor_defns/cswift.h +hw_ncipher.o: ../../e_os.h ../../include/openssl/aes.h +hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_ncipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_ncipher.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +hw_ncipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h +hw_ncipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +hw_ncipher.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +hw_ncipher.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +hw_ncipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +hw_ncipher.o: ../../include/openssl/opensslconf.h +hw_ncipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_ncipher.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +hw_ncipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +hw_ncipher.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +hw_ncipher.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +hw_ncipher.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +hw_ncipher.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +hw_ncipher.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_ncipher.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +hw_ncipher.o: ../../include/openssl/x509_vfy.h ../cryptlib.h hw_ncipher.c +hw_ncipher.o: hw_ncipher_err.c hw_ncipher_err.h vendor_defns/hwcryptohook.h +hw_nuron.o: ../../e_os.h ../../include/openssl/asn1.h +hw_nuron.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_nuron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_nuron.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_nuron.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_nuron.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_nuron.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +hw_nuron.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_nuron.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +hw_nuron.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_nuron.o: ../cryptlib.h hw_nuron.c hw_nuron_err.c hw_nuron_err.h +hw_sureware.o: ../../e_os.h ../../include/openssl/aes.h +hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_sureware.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_sureware.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_sureware.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_sureware.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_sureware.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_sureware.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +hw_sureware.o: ../../include/openssl/err.h ../../include/openssl/evp.h +hw_sureware.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +hw_sureware.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +hw_sureware.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +hw_sureware.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +hw_sureware.o: ../../include/openssl/opensslconf.h +hw_sureware.o: ../../include/openssl/opensslv.h +hw_sureware.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +hw_sureware.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +hw_sureware.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +hw_sureware.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +hw_sureware.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +hw_sureware.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +hw_sureware.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +hw_sureware.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +hw_sureware.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +hw_sureware.o: ../cryptlib.h eng_int.h engine.h hw_sureware.c hw_sureware_err.c +hw_sureware.o: hw_sureware_err.h vendor_defns/sureware.h +hw_ubsec.o: ../../e_os.h ../../include/openssl/asn1.h +hw_ubsec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_ubsec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_ubsec.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_ubsec.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_ubsec.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +hw_ubsec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_ubsec.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +hw_ubsec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +hw_ubsec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_ubsec.o: ../cryptlib.h hw_ubsec.c hw_ubsec_err.c hw_ubsec_err.h +hw_ubsec.o: vendor_defns/hw_ubsec.h +tb_cipher.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_cipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_cipher.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_cipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_cipher.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_cipher.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_cipher.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_cipher.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_cipher.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_cipher.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_cipher.o: ../../include/openssl/objects.h +tb_cipher.o: ../../include/openssl/opensslconf.h +tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_cipher.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_cipher.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_cipher.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_cipher.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_cipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_cipher.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_cipher.o: eng_int.h tb_cipher.c +tb_dh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_dh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_dh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_dh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_dh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_dh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_dh.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_dh.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_dh.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_dh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tb_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_dh.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_dh.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_dh.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_dh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_dh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_dh.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_int.h +tb_dh.o: tb_dh.c +tb_digest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_digest.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_digest.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_digest.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_digest.o: ../../include/openssl/objects.h +tb_digest.o: ../../include/openssl/opensslconf.h +tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_digest.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_digest.o: eng_int.h tb_digest.c +tb_dsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_dsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_dsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_dsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_dsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_dsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_dsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_dsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_dsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_dsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tb_dsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_dsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_dsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_dsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_dsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_dsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_dsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_dsa.o: eng_int.h tb_dsa.c +tb_rand.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_rand.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_rand.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_rand.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_rand.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_rand.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_rand.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_rand.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_rand.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_rand.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tb_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_rand.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_rand.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_rand.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_rand.o: eng_int.h tb_rand.c +tb_rsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_rsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_rsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_rsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_rsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_rsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_rsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_rsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_rsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_rsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tb_rsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_rsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_rsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_rsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_rsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_rsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_rsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_rsa.o: eng_int.h tb_rsa.c diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c index 467c0daa1b..3e7fff1c1e 100644 --- a/src/lib/libcrypto/engine/hw_cryptodev.c +++ b/src/lib/libcrypto/engine/hw_cryptodev.c @@ -77,7 +77,7 @@ static int cryptodev_max_iv(int cipher); static int cryptodev_key_length_valid(int cipher, int len); static int cipher_nid_to_cryptodev(int nid); static int get_cryptodev_ciphers(const int **cnids); -static int get_cryptodev_digests(const int **cnids); +/*static int get_cryptodev_digests(const int **cnids);*/ static int cryptodev_usable_ciphers(const int **nids); static int cryptodev_usable_digests(const int **nids); static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, @@ -137,6 +137,7 @@ static struct { { 0, NID_undef, 0, 0, }, }; +#if 0 /* UNUSED */ static struct { int id; int nid; @@ -149,6 +150,7 @@ static struct { { CRYPTO_SHA1, NID_undef, }, { 0, NID_undef, }, }; +#endif /* * Return a fd if /dev/crypto seems usable, 0 otherwise. @@ -258,7 +260,7 @@ get_cryptodev_ciphers(const int **cnids) int fd, i, count = 0; if ((fd = get_dev_crypto()) < 0) { - *nids = NULL; + *cnids = NULL; return (0); } memset(&sess, 0, sizeof(sess)); @@ -289,6 +291,7 @@ get_cryptodev_ciphers(const int **cnids) * returning them here is harmless, as long as we return NULL * when asked for a handler in the cryptodev_engine_digests routine */ +#if 0 /* UNUSED */ static int get_cryptodev_digests(const int **cnids) { @@ -297,7 +300,7 @@ get_cryptodev_digests(const int **cnids) int fd, i, count = 0; if ((fd = get_dev_crypto()) < 0) { - *nids = NULL; + *cnids = NULL; return (0); } memset(&sess, 0, sizeof(sess)); @@ -318,6 +321,7 @@ get_cryptodev_digests(const int **cnids) *cnids = NULL; return (count); } +#endif /* * Find the useable ciphers|digests from dev/crypto - this is the first @@ -623,7 +627,7 @@ static int bn2crparam(const BIGNUM *a, struct crparam *crp) { int i, j, k; - ssize_t words, bytes, bits; + ssize_t bytes, bits; u_char *b; crp->crp_p = NULL; diff --git a/src/lib/libcrypto/engine/vendor_defns/sureware.h b/src/lib/libcrypto/engine/vendor_defns/sureware.h index 1d3789219d..4bc22027f9 100644 --- a/src/lib/libcrypto/engine/vendor_defns/sureware.h +++ b/src/lib/libcrypto/engine/vendor_defns/sureware.h @@ -232,7 +232,7 @@ extern SW_EXPORT SureWareHook_Dsa_Sign_t SureWareHook_Dsa_Sign; * mlen,elen and dlen are all multiple of sizeof(unsigned long) */ typedef int SureWareHook_Mod_Exp_t(char*const msg,int mlen,const unsigned long *mod, - int elen,const unsigned long *exp, + int elen,const unsigned long *exponent, int dlen,unsigned long *data, unsigned long *res); extern SW_EXPORT SureWareHook_Mod_Exp_t SureWareHook_Mod_Exp; diff --git a/src/lib/libcrypto/err/Makefile b/src/lib/libcrypto/err/Makefile new file mode 100644 index 0000000000..149f3e0eb9 --- /dev/null +++ b/src/lib/libcrypto/err/Makefile @@ -0,0 +1,118 @@ +# +# SSLeay/crypto/err/Makefile +# + +DIR= err +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=err.c err_all.c err_prn.c +LIBOBJ=err.o err_all.o err_prn.o + +SRC= $(LIBSRC) + +EXHEADER= err.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +err.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/buffer.h +err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +err.o: ../../include/openssl/symhacks.h ../cryptlib.h err.c +err_all.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +err_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +err_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +err_all.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +err_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +err_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h +err_all.o: ../../include/openssl/evp.h ../../include/openssl/fips.h +err_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +err_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +err_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +err_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +err_all.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +err_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h +err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +err_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +err_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +err_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +err_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +err_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +err_all.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +err_all.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +err_all.o: err_all.c +err_prn.o: ../../e_os.h ../../include/openssl/bio.h +err_prn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +err_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +err_prn.o: ../cryptlib.h err_prn.c diff --git a/src/lib/libcrypto/evp/Makefile b/src/lib/libcrypto/evp/Makefile new file mode 100644 index 0000000000..5027a3855a --- /dev/null +++ b/src/lib/libcrypto/evp/Makefile @@ -0,0 +1,1076 @@ +# +# SSLeay/crypto/evp/Makefile +# + +DIR= evp +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=evp_test.c +TESTDATA=evptests.txt +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \ + e_des.c e_bf.c e_idea.c e_des3.c \ + e_rc4.c e_aes.c names.c \ + e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \ + m_null.c m_md2.c m_md4.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 c_allc.c c_alld.c evp_lib.c bio_ok.c \ + evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \ + e_old.c + +LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \ + e_des.o e_bf.o e_idea.o e_des3.o \ + e_rc4.o e_aes.o names.o \ + e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \ + m_null.o m_md2.o m_md4.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 c_allc.o c_alld.o evp_lib.o bio_ok.o \ + evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o \ + e_old.o + +SRC= $(LIBSRC) + +EXHEADER= evp.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + cp $(TESTDATA) ../../test + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +bio_b64.o: ../../e_os.h ../../include/openssl/aes.h +bio_b64.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +bio_b64.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +bio_b64.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +bio_b64.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +bio_b64.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h +bio_b64.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +bio_b64.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +bio_b64.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +bio_b64.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +bio_b64.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bio_b64.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +bio_b64.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +bio_b64.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +bio_b64.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +bio_b64.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_b64.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +bio_b64.o: ../cryptlib.h bio_b64.c +bio_enc.o: ../../e_os.h ../../include/openssl/aes.h +bio_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +bio_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +bio_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +bio_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +bio_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h +bio_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +bio_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +bio_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +bio_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +bio_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bio_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +bio_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +bio_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +bio_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +bio_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +bio_enc.o: ../cryptlib.h bio_enc.c +bio_md.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +bio_md.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +bio_md.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +bio_md.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +bio_md.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +bio_md.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +bio_md.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_md.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +bio_md.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +bio_md.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +bio_md.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +bio_md.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +bio_md.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bio_md.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +bio_md.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +bio_md.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +bio_md.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +bio_md.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +bio_md.o: ../../include/openssl/ui_compat.h ../cryptlib.h bio_md.c +bio_ok.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +bio_ok.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +bio_ok.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +bio_ok.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +bio_ok.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +bio_ok.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +bio_ok.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_ok.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +bio_ok.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +bio_ok.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +bio_ok.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +bio_ok.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +bio_ok.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bio_ok.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +bio_ok.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +bio_ok.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +bio_ok.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_ok.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +bio_ok.o: ../cryptlib.h bio_ok.c +c_all.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +c_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h +c_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +c_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +c_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +c_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +c_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +c_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +c_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +c_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +c_all.o: ../../include/openssl/ui_compat.h ../cryptlib.h c_all.c +c_allc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +c_allc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_allc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_allc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_allc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +c_allc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +c_allc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +c_allc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +c_allc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +c_allc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +c_allc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +c_allc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +c_allc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +c_allc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +c_allc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_allc.c +c_alld.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +c_alld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_alld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_alld.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_alld.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +c_alld.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +c_alld.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +c_alld.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +c_alld.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +c_alld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +c_alld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +c_alld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +c_alld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +c_alld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +c_alld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_alld.c +digest.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h +digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +digest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +digest.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +digest.o: ../../include/openssl/ui_compat.h ../cryptlib.h digest.c +e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_aes.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_aes.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +e_aes.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +e_aes.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +e_aes.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +e_aes.o: ../../include/openssl/err.h ../../include/openssl/evp.h +e_aes.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +e_aes.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +e_aes.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +e_aes.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +e_aes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +e_aes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +e_aes.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +e_aes.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +e_aes.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +e_aes.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h e_aes.c +e_aes.o: evp_locl.h +e_bf.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_bf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_bf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_bf.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_bf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_bf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_bf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_bf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_bf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_bf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_bf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_bf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_bf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_bf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_bf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_bf.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_bf.c evp_locl.h +e_cast.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_cast.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_cast.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_cast.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_cast.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_cast.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_cast.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_cast.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_cast.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_cast.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_cast.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_cast.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_cast.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_cast.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_cast.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_cast.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_cast.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_cast.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_cast.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_cast.c evp_locl.h +e_des.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_des.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_des.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_des.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_des.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_des.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_des.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_des.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_des.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_des.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_des.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_des.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_des.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_des.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_des.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_des.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_des.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des.c evp_locl.h +e_des3.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_des3.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_des3.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_des3.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_des3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_des3.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_des3.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_des3.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_des3.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_des3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_des3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_des3.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_des3.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_des3.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_des3.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_des3.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_des3.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des3.c evp_locl.h +e_idea.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_idea.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_idea.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_idea.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_idea.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_idea.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_idea.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_idea.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_idea.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_idea.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_idea.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_idea.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_idea.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_idea.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_idea.c evp_locl.h +e_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_null.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_null.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_null.c +e_old.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_old.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_old.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +e_old.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +e_old.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +e_old.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +e_old.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_old.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +e_old.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +e_old.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +e_old.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +e_old.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +e_old.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +e_old.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +e_old.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +e_old.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +e_old.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h e_old.c +e_rc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_rc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_rc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_rc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_rc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_rc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_rc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_rc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_rc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_rc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_rc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_rc2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_rc2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_rc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_rc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_rc2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_rc2.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc2.c evp_locl.h +e_rc4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_rc4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_rc4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_rc4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_rc4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_rc4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_rc4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_rc4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_rc4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_rc4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_rc4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_rc4.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_rc4.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_rc4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_rc4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_rc4.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_rc4.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc4.c evp_locl.h +e_rc5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_rc5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_rc5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_rc5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_rc5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_rc5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_rc5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_rc5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_rc5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_rc5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_rc5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_rc5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_rc5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_rc5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_rc5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_rc5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_rc5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_rc5.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc5.c evp_locl.h +e_xcbc_d.o: ../../e_os.h ../../include/openssl/aes.h +e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +e_xcbc_d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h +e_xcbc_d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +e_xcbc_d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +e_xcbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +e_xcbc_d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +e_xcbc_d.o: ../../include/openssl/opensslconf.h +e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_xcbc_d.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_xcbc_d.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_xcbc_d.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_xcbc_d.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c +encode.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +encode.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +encode.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +encode.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +encode.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +encode.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +encode.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +encode.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +encode.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +encode.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +encode.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +encode.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +encode.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +encode.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +encode.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +encode.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +encode.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +encode.o: ../../include/openssl/ui_compat.h ../cryptlib.h encode.c +evp_acnf.o: ../../e_os.h ../../include/openssl/aes.h +evp_acnf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_acnf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_acnf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +evp_acnf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +evp_acnf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +evp_acnf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +evp_acnf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +evp_acnf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +evp_acnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +evp_acnf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +evp_acnf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +evp_acnf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +evp_acnf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +evp_acnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +evp_acnf.o: ../../include/openssl/ui_compat.h ../cryptlib.h evp_acnf.c +evp_enc.o: ../../e_os.h ../../include/openssl/aes.h +evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_enc.o: ../../include/openssl/engine.h ../../include/openssl/err.h +evp_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +evp_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +evp_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +evp_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +evp_enc.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +evp_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +evp_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +evp_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +evp_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +evp_enc.o: ../cryptlib.h evp_enc.c evp_locl.h +evp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +evp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +evp_err.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +evp_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +evp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +evp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +evp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +evp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +evp_err.o: evp_err.c +evp_key.o: ../../e_os.h ../../include/openssl/aes.h +evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +evp_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +evp_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +evp_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +evp_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +evp_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +evp_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +evp_key.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +evp_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_key.c +evp_lib.o: ../../e_os.h ../../include/openssl/aes.h +evp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +evp_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +evp_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +evp_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +evp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +evp_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +evp_lib.o: ../cryptlib.h evp_lib.c +evp_pbe.o: ../../e_os.h ../../include/openssl/aes.h +evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +evp_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +evp_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +evp_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +evp_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +evp_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +evp_pbe.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +evp_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pbe.c +evp_pkey.o: ../../e_os.h ../../include/openssl/aes.h +evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_pkey.o: ../../include/openssl/opensslconf.h +evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +evp_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +evp_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +evp_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +evp_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +evp_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pkey.c +m_dss.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_dss.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_dss.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_dss.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_dss.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_dss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_dss.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_dss.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_dss.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_dss.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_dss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_dss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_dss.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_dss.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_dss.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_dss.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_dss.o: ../cryptlib.h m_dss.c +m_dss1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_dss1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_dss1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_dss1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_dss1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_dss1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_dss1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_dss1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_dss1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_dss1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_dss1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_dss1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_dss1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_dss1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_dss1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_dss1.o: ../cryptlib.h m_dss1.c +m_md2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_md2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_md2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_md2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_md2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_md2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_md2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_md2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_md2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_md2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_md2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_md2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_md2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_md2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_md2.o: ../cryptlib.h evp_locl.h m_md2.c +m_md4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_md4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_md4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_md4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_md4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_md4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_md4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_md4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_md4.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_md4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_md4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_md4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_md4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_md4.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_md4.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_md4.o: ../cryptlib.h evp_locl.h m_md4.c +m_md5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_md5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_md5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_md5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_md5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_md5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_md5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_md5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_md5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_md5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_md5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_md5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_md5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_md5.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_md5.o: ../cryptlib.h evp_locl.h m_md5.c +m_mdc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_mdc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_mdc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_mdc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_mdc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_mdc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_mdc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_mdc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_mdc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_mdc2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_mdc2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_mdc2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_mdc2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_mdc2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_mdc2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_mdc2.o: ../cryptlib.h evp_locl.h m_mdc2.c +m_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_null.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_null.o: ../cryptlib.h m_null.c +m_ripemd.o: ../../e_os.h ../../include/openssl/aes.h +m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +m_ripemd.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +m_ripemd.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +m_ripemd.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +m_ripemd.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +m_ripemd.o: ../../include/openssl/err.h ../../include/openssl/evp.h +m_ripemd.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +m_ripemd.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +m_ripemd.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +m_ripemd.o: ../../include/openssl/opensslconf.h +m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_ripemd.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_ripemd.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_ripemd.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_ripemd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_ripemd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_ripemd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_ripemd.o: ../cryptlib.h m_ripemd.c +m_sha.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_sha.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_sha.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_sha.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_sha.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_sha.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_sha.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_sha.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_sha.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_sha.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_sha.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_sha.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_sha.o: ../cryptlib.h evp_locl.h m_sha.c +m_sha1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_sha1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_sha1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_sha1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_sha1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_sha1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_sha1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_sha1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_sha1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_sha1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_sha1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_sha1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_sha1.o: ../cryptlib.h m_sha1.c +names.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +names.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +names.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +names.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +names.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +names.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +names.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +names.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +names.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +names.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +names.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +names.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +names.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +names.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +names.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +names.o: ../cryptlib.h names.c +p5_crpt.o: ../../e_os.h ../../include/openssl/aes.h +p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p5_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p5_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p5_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p5_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p5_crpt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +p5_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p5_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p5_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p5_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p5_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p5_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p5_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_crpt.c +p5_crpt2.o: ../../e_os.h ../../include/openssl/aes.h +p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p5_crpt2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_crpt2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_crpt2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_crpt2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_crpt2.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h +p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p5_crpt2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p5_crpt2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p5_crpt2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p5_crpt2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p5_crpt2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p5_crpt2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p5_crpt2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p5_crpt2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p5_crpt2.o: ../cryptlib.h p5_crpt2.c +p_dec.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_dec.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_dec.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_dec.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_dec.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_dec.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_dec.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_dec.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_dec.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p_dec.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p_dec.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p_dec.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_dec.c +p_enc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_enc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_enc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p_enc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_enc.c +p_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +p_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +p_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_lib.c +p_open.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_open.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_open.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_open.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_open.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_open.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_open.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_open.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_open.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p_open.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p_open.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p_open.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p_open.o: ../cryptlib.h p_open.c +p_seal.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_seal.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_seal.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_seal.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_seal.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_seal.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_seal.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_seal.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_seal.c +p_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p_sign.o: ../cryptlib.h p_sign.c +p_verify.o: ../../e_os.h ../../include/openssl/aes.h +p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p_verify.o: ../../include/openssl/opensslconf.h +p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p_verify.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p_verify.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p_verify.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p_verify.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p_verify.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p_verify.o: ../cryptlib.h p_verify.c diff --git a/src/lib/libcrypto/evp/c_allc.c b/src/lib/libcrypto/evp/c_allc.c index 341a958fd4..fc96812365 100644 --- a/src/lib/libcrypto/evp/c_allc.c +++ b/src/lib/libcrypto/evp/c_allc.c @@ -67,6 +67,8 @@ void OpenSSL_add_all_ciphers(void) #ifndef OPENSSL_NO_DES EVP_add_cipher(EVP_des_cfb()); + EVP_add_cipher(EVP_des_cfb1()); + EVP_add_cipher(EVP_des_cfb8()); EVP_add_cipher(EVP_des_ede_cfb()); EVP_add_cipher(EVP_des_ede3_cfb()); @@ -150,6 +152,8 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_128_ecb()); EVP_add_cipher(EVP_aes_128_cbc()); EVP_add_cipher(EVP_aes_128_cfb()); + EVP_add_cipher(EVP_aes_128_cfb1()); + EVP_add_cipher(EVP_aes_128_cfb8()); EVP_add_cipher(EVP_aes_128_ofb()); #if 0 EVP_add_cipher(EVP_aes_128_ctr()); @@ -159,6 +163,8 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_192_ecb()); EVP_add_cipher(EVP_aes_192_cbc()); EVP_add_cipher(EVP_aes_192_cfb()); + EVP_add_cipher(EVP_aes_192_cfb1()); + EVP_add_cipher(EVP_aes_192_cfb8()); EVP_add_cipher(EVP_aes_192_ofb()); #if 0 EVP_add_cipher(EVP_aes_192_ctr()); @@ -168,6 +174,8 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_256_ecb()); EVP_add_cipher(EVP_aes_256_cbc()); EVP_add_cipher(EVP_aes_256_cfb()); + EVP_add_cipher(EVP_aes_256_cfb1()); + EVP_add_cipher(EVP_aes_256_cfb8()); EVP_add_cipher(EVP_aes_256_ofb()); #if 0 EVP_add_cipher(EVP_aes_256_ctr()); diff --git a/src/lib/libcrypto/evp/c_alld.c b/src/lib/libcrypto/evp/c_alld.c index be91cdb037..aae7bf7482 100644 --- a/src/lib/libcrypto/evp/c_alld.c +++ b/src/lib/libcrypto/evp/c_alld.c @@ -75,7 +75,7 @@ void OpenSSL_add_all_digests(void) EVP_add_digest_alias(SN_md5,"ssl2-md5"); EVP_add_digest_alias(SN_md5,"ssl3-md5"); #endif -#ifndef OPENSSL_NO_SHA +#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) EVP_add_digest(EVP_sha()); #ifndef OPENSSL_NO_DSA EVP_add_digest(EVP_dss()); diff --git a/src/lib/libcrypto/evp/evp_test.c b/src/lib/libcrypto/evp/evp_test.c index 28460173f7..a624cfd248 100644 --- a/src/lib/libcrypto/evp/evp_test.c +++ b/src/lib/libcrypto/evp/evp_test.c @@ -136,7 +136,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, const unsigned char *iv,int in, const unsigned char *plaintext,int pn, const unsigned char *ciphertext,int cn, - int encdec) + int encdec,int multiplier) { EVP_CIPHER_CTX ctx; unsigned char out[4096]; @@ -162,22 +162,25 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, if(!EVP_EncryptInit_ex(&ctx,c,NULL,key,iv)) { fprintf(stderr,"EncryptInit failed\n"); + ERR_print_errors_fp(stderr); test1_exit(10); } EVP_CIPHER_CTX_set_padding(&ctx,0); - if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn)) + if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn*multiplier)) { fprintf(stderr,"Encrypt failed\n"); + ERR_print_errors_fp(stderr); test1_exit(6); } if(!EVP_EncryptFinal_ex(&ctx,out+outl,&outl2)) { fprintf(stderr,"EncryptFinal failed\n"); + ERR_print_errors_fp(stderr); test1_exit(7); } - if(outl+outl2 != cn) + if(outl+outl2 != cn*multiplier) { fprintf(stderr,"Ciphertext length mismatch got %d expected %d\n", outl+outl2,cn); @@ -198,22 +201,25 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, if(!EVP_DecryptInit_ex(&ctx,c,NULL,key,iv)) { fprintf(stderr,"DecryptInit failed\n"); + ERR_print_errors_fp(stderr); test1_exit(11); } EVP_CIPHER_CTX_set_padding(&ctx,0); - if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn)) + if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn*multiplier)) { fprintf(stderr,"Decrypt failed\n"); + ERR_print_errors_fp(stderr); test1_exit(6); } if(!EVP_DecryptFinal_ex(&ctx,out+outl,&outl2)) { fprintf(stderr,"DecryptFinal failed\n"); + ERR_print_errors_fp(stderr); test1_exit(7); } - if(outl+outl2 != cn) + if(outl+outl2 != cn*multiplier) { fprintf(stderr,"Plaintext length mismatch got %d expected %d\n", outl+outl2,cn); @@ -238,7 +244,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn, const unsigned char *iv,int in, const unsigned char *plaintext,int pn, const unsigned char *ciphertext,int cn, - int encdec) + int encdec,int multiplier) { const EVP_CIPHER *c; @@ -246,7 +252,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn, if(!c) return 0; - test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec); + test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec,multiplier); return 1; } @@ -272,16 +278,19 @@ static int test_digest(const char *digest, if(!EVP_DigestInit_ex(&ctx,d, NULL)) { fprintf(stderr,"DigestInit failed\n"); + ERR_print_errors_fp(stderr); EXIT(100); } if(!EVP_DigestUpdate(&ctx,plaintext,pn)) { fprintf(stderr,"DigestUpdate failed\n"); + ERR_print_errors_fp(stderr); EXIT(101); } if(!EVP_DigestFinal_ex(&ctx,md,&mdn)) { fprintf(stderr,"DigestFinal failed\n"); + ERR_print_errors_fp(stderr); EXIT(101); } EVP_MD_CTX_cleanup(&ctx); @@ -359,6 +368,7 @@ int main(int argc,char **argv) unsigned char *iv,*key,*plaintext,*ciphertext; int encdec; int kn,in,pn,cn; + int multiplier=1; if(!fgets((char *)line,sizeof line,f)) break; @@ -383,7 +393,15 @@ int main(int argc,char **argv) pn=convert(plaintext); cn=convert(ciphertext); - if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec) + if(strchr(cipher,'*')) + { + p=cipher; + sstrsep(&p,"*"); + multiplier=atoi(sstrsep(&p,"*")); + } + + if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec, + multiplier) && !test_digest(cipher,plaintext,pn,ciphertext,cn)) { fprintf(stderr,"Can't find %s\n",cipher); diff --git a/src/lib/libcrypto/evp/evptests.txt b/src/lib/libcrypto/evp/evptests.txt index 80bd9c7765..dfe91a5bc0 100644 --- a/src/lib/libcrypto/evp/evptests.txt +++ b/src/lib/libcrypto/evp/evptests.txt @@ -92,7 +92,102 @@ AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000 AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:F58C4C04D6E5F1BA779EABFB5F7BFBD6:AE2D8A571E03AC9C9EB76FAC45AF8E51:9CFC4E967EDB808D679F777BC6702C7D AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:9CFC4E967EDB808D679F777BC6702C7D:30C81C46A35CE411E5FBC1191A0A52EF:39F23369A9D9BACFA530E26304231461 AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39F23369A9D9BACFA530E26304231461:F69F2445DF4F9B17AD2B417BE66C3710:B2EB05E2C39BE9FCDA6C19078C6A9D1B -# We don't support CFB{1,8}-AESxxx.{En,De}crypt + +# CFB1-AES128.Encrypt + +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:1 +# all of the above packed into one... +# in: 0110 1011 1100 0001 = 6bc1 +# out: 0110 1000 1011 0011 = 68b3 +AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:1 + +# CFB1-AES128.Decrypt +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:0 +# all of the above packed into one... +# in: 0110 1000 1011 0011 = 68b3 +# out: 0110 1011 1100 0001 = 6bc1 +AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:0 + +# TODO: CFB1-AES192 and 256 + +# CFB8-AES128.Encrypt + +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:1 +# all of the above packed into one +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:1 + +# CFB8-AES128.Decrypt + +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:0 +# all of the above packed into one +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:0 + +# TODO: 192 and 256 bit keys + # For all CFB128 encrypts and decrypts, the transformed sequence is # AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec # CFB128-AES128.Encrypt @@ -174,6 +269,16 @@ DESX-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363 # DES EDE3 CBC tests (from destest) DES-EDE3-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363534333231204E6F77206973207468652074696D6520666F722000000000:3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D41C673812CFDE9675 +# DES CFB1 from FIPS 81 +# plaintext: 0100 1110 0110 1111 0111 0111 = 4e6f77 +# ciphertext: 1100 1101 0001 1110 1100 1001 = cd1ec9 + +DES-CFB1*8:0123456789abcdef:1234567890abcdef:4e6f77:cd1ec9 + +# DES CFB8 from FIPS 81 + +DES-CFB8:0123456789abcdef:1234567890abcdef:4e6f7720697320746865:f31fda07011462ee187f + # RC4 tests (from rc4test) RC4:0123456789abcdef0123456789abcdef::0123456789abcdef:75b7878099e0c596 RC4:0123456789abcdef0123456789abcdef::0000000000000000:7494c2e7104b0879 diff --git a/src/lib/libcrypto/evp/m_md2.c b/src/lib/libcrypto/evp/m_md2.c index 50914c83b3..0df48e5199 100644 --- a/src/lib/libcrypto/evp/m_md2.c +++ b/src/lib/libcrypto/evp/m_md2.c @@ -60,6 +60,7 @@ #include #include "cryptlib.h" #include +#include "evp_locl.h" #include #include #include diff --git a/src/lib/libcrypto/evp/m_mdc2.c b/src/lib/libcrypto/evp/m_mdc2.c index 9f6467c931..62de1336b8 100644 --- a/src/lib/libcrypto/evp/m_mdc2.c +++ b/src/lib/libcrypto/evp/m_mdc2.c @@ -60,6 +60,7 @@ #include #include "cryptlib.h" #include +#include "evp_locl.h" #include #include #include diff --git a/src/lib/libcrypto/evp/m_sha.c b/src/lib/libcrypto/evp/m_sha.c index 10697c7ed3..d1785e5f74 100644 --- a/src/lib/libcrypto/evp/m_sha.c +++ b/src/lib/libcrypto/evp/m_sha.c @@ -56,10 +56,11 @@ * [including the GNU Public Licence.] */ -#ifndef OPENSSL_NO_SHA +#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) #include #include "cryptlib.h" #include +#include "evp_locl.h" #include #include diff --git a/src/lib/libcrypto/hmac/Makefile b/src/lib/libcrypto/hmac/Makefile new file mode 100644 index 0000000000..f634dab79d --- /dev/null +++ b/src/lib/libcrypto/hmac/Makefile @@ -0,0 +1,99 @@ +# +# SSLeay/crypto/md/Makefile +# + +DIR= hmac +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=hmactest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=hmac.c +LIBOBJ=hmac.o + +SRC= $(LIBSRC) + +EXHEADER= hmac.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +hmac.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +hmac.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +hmac.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +hmac.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +hmac.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +hmac.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hmac.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +hmac.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h +hmac.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +hmac.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +hmac.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +hmac.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +hmac.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +hmac.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +hmac.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +hmac.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +hmac.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +hmac.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +hmac.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +hmac.o: ../cryptlib.h hmac.c diff --git a/src/lib/libcrypto/idea/Makefile b/src/lib/libcrypto/idea/Makefile new file mode 100644 index 0000000000..f652783027 --- /dev/null +++ b/src/lib/libcrypto/idea/Makefile @@ -0,0 +1,92 @@ +# +# SSLeay/crypto/idea/Makefile +# + +DIR= idea +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=ideatest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c +LIBOBJ=i_cbc.o i_cfb64.o i_ofb64.o i_ecb.o i_skey.o + +SRC= $(LIBSRC) + +EXHEADER= idea.h +HEADER= idea_lcl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +i_cbc.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_cbc.o: i_cbc.c idea_lcl.h +i_cfb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_cfb64.o: i_cfb64.c idea_lcl.h +i_ecb.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_ecb.o: ../../include/openssl/opensslv.h i_ecb.c idea_lcl.h +i_ofb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_ofb64.o: i_ofb64.c idea_lcl.h +i_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +i_skey.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +i_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +i_skey.o: i_skey.c idea_lcl.h diff --git a/src/lib/libcrypto/krb5/Makefile b/src/lib/libcrypto/krb5/Makefile new file mode 100644 index 0000000000..25cc695e8d --- /dev/null +++ b/src/lib/libcrypto/krb5/Makefile @@ -0,0 +1,88 @@ +# +# OpenSSL/krb5/Makefile +# + +DIR= krb5 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= krb5_asn.c + +LIBOBJ= krb5_asn.o + +SRC= $(LIBSRC) + +EXHEADER= krb5_asn.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +krb5_asn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +krb5_asn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +krb5_asn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +krb5_asn.o: ../../include/openssl/krb5_asn.h +krb5_asn.o: ../../include/openssl/opensslconf.h +krb5_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +krb5_asn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +krb5_asn.o: ../../include/openssl/symhacks.h krb5_asn.c diff --git a/src/lib/libcrypto/lhash/Makefile b/src/lib/libcrypto/lhash/Makefile new file mode 100644 index 0000000000..d325a1644d --- /dev/null +++ b/src/lib/libcrypto/lhash/Makefile @@ -0,0 +1,91 @@ +# +# SSLeay/crypto/lhash/Makefile +# + +DIR= lhash +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=lhash.c lh_stats.c +LIBOBJ=lhash.o lh_stats.o + +SRC= $(LIBSRC) + +EXHEADER= lhash.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +lh_stats.o: ../../e_os.h ../../include/openssl/bio.h +lh_stats.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +lh_stats.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +lh_stats.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +lh_stats.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +lh_stats.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +lh_stats.o: ../cryptlib.h lh_stats.c +lhash.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +lhash.o: ../../include/openssl/e_os2.h ../../include/openssl/lhash.h +lhash.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +lhash.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +lhash.o: ../../include/openssl/symhacks.h lhash.c diff --git a/src/lib/libcrypto/md2/Makefile b/src/lib/libcrypto/md2/Makefile new file mode 100644 index 0000000000..90628511da --- /dev/null +++ b/src/lib/libcrypto/md2/Makefile @@ -0,0 +1,93 @@ +# +# SSLeay/crypto/md/Makefile +# + +DIR= md2 +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=md2test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=md2_dgst.c md2_one.c +LIBOBJ=md2_dgst.o md2_one.o + +SRC= $(LIBSRC) + +EXHEADER= md2.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +md2_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +md2_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md2_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +md2_dgst.o: ../../include/openssl/md2.h ../../include/openssl/opensslconf.h +md2_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md2_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md2_dgst.o: md2_dgst.c +md2_one.o: ../../e_os.h ../../include/openssl/bio.h +md2_one.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +md2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md2_one.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +md2_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +md2_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +md2_one.o: ../../include/openssl/symhacks.h ../cryptlib.h md2_one.c diff --git a/src/lib/libcrypto/md2/md2.h b/src/lib/libcrypto/md2/md2.h index ad9241455c..d0ef9da08e 100644 --- a/src/lib/libcrypto/md2/md2.h +++ b/src/lib/libcrypto/md2/md2.h @@ -80,6 +80,9 @@ typedef struct MD2state_st } MD2_CTX; const char *MD2_options(void); +#ifdef OPENSSL_FIPS +int private_MD2_Init(MD2_CTX *c); +#endif int MD2_Init(MD2_CTX *c); int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len); int MD2_Final(unsigned char *md, MD2_CTX *c); diff --git a/src/lib/libcrypto/md2/md2_dgst.c b/src/lib/libcrypto/md2/md2_dgst.c index ecb64f0ec4..8124acd687 100644 --- a/src/lib/libcrypto/md2/md2_dgst.c +++ b/src/lib/libcrypto/md2/md2_dgst.c @@ -62,6 +62,8 @@ #include #include #include +#include +#include const char *MD2_version="MD2" OPENSSL_VERSION_PTEXT; @@ -116,7 +118,7 @@ const char *MD2_options(void) return("md2(int)"); } -int MD2_Init(MD2_CTX *c) +FIPS_NON_FIPS_MD_Init(MD2) { c->num=0; memset(c->state,0,sizeof c->state); diff --git a/src/lib/libcrypto/md4/Makefile b/src/lib/libcrypto/md4/Makefile new file mode 100644 index 0000000000..0b7c8d7ad8 --- /dev/null +++ b/src/lib/libcrypto/md4/Makefile @@ -0,0 +1,92 @@ +# +# SSLeay/crypto/md4/Makefile +# + +DIR= md4 +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=md4test.c +APPS=md4.c + +LIB=$(TOP)/libcrypto.a +LIBSRC=md4_dgst.c md4_one.c +LIBOBJ=md4_dgst.o md4_one.o + +SRC= $(LIBSRC) + +EXHEADER= md4.h +HEADER= md4_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/mx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +md4_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +md4_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md4_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +md4_dgst.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h +md4_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md4_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md4_dgst.o: ../md32_common.h md4_dgst.c md4_locl.h +md4_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +md4_one.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h +md4_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md4_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md4_one.o: md4_one.c diff --git a/src/lib/libcrypto/md5/Makefile b/src/lib/libcrypto/md5/Makefile new file mode 100644 index 0000000000..832446fff2 --- /dev/null +++ b/src/lib/libcrypto/md5/Makefile @@ -0,0 +1,128 @@ +# +# SSLeay/crypto/md5/Makefile +# + +DIR= md5 +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES=-I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +MD5_ASM_OBJ= + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=md5test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=md5_dgst.c md5_one.c +LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ) + +SRC= $(LIBSRC) + +EXHEADER= md5.h +HEADER= md5_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/mx86-elf.s: asm/md5-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) md5-586.pl elf $(CFLAGS) > mx86-elf.s) + +# a.out +asm/mx86-out.o: asm/mx86unix.cpp + $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o + +# bsdi +asm/mx86bsdi.o: asm/mx86unix.cpp + $(CPP) -DBSDI asm/mx86unix.cpp | sed 's/ :/:/' | as -o asm/mx86bsdi.o + +asm/mx86unix.cpp: asm/md5-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) md5-586.pl cpp >mx86unix.cpp) + +asm/md5-sparcv8plus.o: asm/md5-sparcv9.S + $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \ + -o asm/md5-sparcv8plus.o asm/md5-sparcv9.S + +# Old GNU assembler doesn't understand V9 instructions, so we +# hire /usr/ccs/bin/as to do the job. Note that option is called +# *-gcc27, but even gcc 2>=8 users may experience similar problem +# if they didn't bother to upgrade GNU assembler. Such users should +# not choose this option, but be adviced to *remove* GNU assembler +# or upgrade it. +asm/md5-sparcv8plus-gcc27.o: asm/md5-sparcv9.S + $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -E asm/md5-sparcv9.S | \ + /usr/ccs/bin/as -xarch=v8plus - -o asm/md5-sparcv8plus-gcc27.o + +asm/md5-sparcv9.o: asm/md5-sparcv9.S + $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \ + -o asm/md5-sparcv9.o asm/md5-sparcv9.S + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/mx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +md5_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +md5_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md5_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +md5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h +md5_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md5_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md5_dgst.o: ../md32_common.h md5_dgst.c md5_locl.h +md5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +md5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h +md5_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md5_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md5_one.o: md5_one.c diff --git a/src/lib/libcrypto/mdc2/Makefile b/src/lib/libcrypto/mdc2/Makefile new file mode 100644 index 0000000000..38c785bf95 --- /dev/null +++ b/src/lib/libcrypto/mdc2/Makefile @@ -0,0 +1,98 @@ +# +# SSLeay/crypto/mdc2/Makefile +# + +DIR= mdc2 +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= mdc2test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=mdc2dgst.c mdc2_one.c +LIBOBJ=mdc2dgst.o mdc2_one.o + +SRC= $(LIBSRC) + +EXHEADER= mdc2.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +mdc2_one.o: ../../e_os.h ../../include/openssl/bio.h +mdc2_one.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +mdc2_one.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +mdc2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +mdc2_one.o: ../../include/openssl/lhash.h ../../include/openssl/mdc2.h +mdc2_one.o: ../../include/openssl/opensslconf.h +mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +mdc2_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +mdc2_one.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +mdc2_one.o: ../cryptlib.h mdc2_one.c +mdc2dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +mdc2dgst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +mdc2dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +mdc2dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +mdc2dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/opensslconf.h +mdc2dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +mdc2dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +mdc2dgst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +mdc2dgst.o: mdc2dgst.c diff --git a/src/lib/libcrypto/mdc2/mdc2.h b/src/lib/libcrypto/mdc2/mdc2.h index 793a8a0f13..4cba101f37 100644 --- a/src/lib/libcrypto/mdc2/mdc2.h +++ b/src/lib/libcrypto/mdc2/mdc2.h @@ -80,7 +80,9 @@ typedef struct mdc2_ctx_st int pad_type; /* either 1 or 2, default 1 */ } MDC2_CTX; - +#ifdef OPENSSL_FIPS +int private_MDC2_Init(MDC2_CTX *c); +#endif int MDC2_Init(MDC2_CTX *c); int MDC2_Update(MDC2_CTX *c, const unsigned char *data, unsigned long len); int MDC2_Final(unsigned char *md, MDC2_CTX *c); diff --git a/src/lib/libcrypto/o_str.h b/src/lib/libcrypto/o_str.h new file mode 100644 index 0000000000..4a70a9e00b --- /dev/null +++ b/src/lib/libcrypto/o_str.h @@ -0,0 +1,67 @@ +/* crypto/o_str.h -*- mode:C; c-file-style: "eay" -*- */ +/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL + * project 2003. + */ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * licensing@OpenSSL.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + +#ifndef HEADER_O_STR_H +#define HEADER_O_STR_H + +#include /* to get size_t */ + +int OPENSSL_strcasecmp(const char *str1, const char *str2); +int OPENSSL_strncasecmp(const char *str1, const char *str2, size_t n); + +#endif diff --git a/src/lib/libcrypto/objects/Makefile b/src/lib/libcrypto/objects/Makefile new file mode 100644 index 0000000000..e449147129 --- /dev/null +++ b/src/lib/libcrypto/objects/Makefile @@ -0,0 +1,122 @@ +# +# SSLeay/crypto/objects/Makefile +# + +DIR= objects +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r +PERL= perl + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= o_names.c obj_dat.c obj_lib.c obj_err.c +LIBOBJ= o_names.o obj_dat.o obj_lib.o obj_err.o + +SRC= $(LIBSRC) + +EXHEADER= objects.h obj_mac.h +HEADER= $(EXHEADER) obj_dat.h + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: obj_dat.h lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +obj_dat.h: obj_dat.pl obj_mac.h + $(PERL) obj_dat.pl obj_mac.h obj_dat.h + +# objects.pl both reads and writes obj_mac.num +obj_mac.h: objects.pl objects.txt obj_mac.num + $(PERL) objects.pl objects.txt obj_mac.num obj_mac.h + @sleep 1; touch obj_mac.h; sleep 1 + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +o_names.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +o_names.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +o_names.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +o_names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +o_names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +o_names.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +o_names.o: ../../include/openssl/symhacks.h o_names.c +obj_dat.o: ../../e_os.h ../../include/openssl/asn1.h +obj_dat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +obj_dat.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +obj_dat.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +obj_dat.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +obj_dat.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +obj_dat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +obj_dat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +obj_dat.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_dat.c obj_dat.h +obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +obj_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +obj_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +obj_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +obj_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +obj_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +obj_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +obj_err.o: ../../include/openssl/symhacks.h obj_err.c +obj_lib.o: ../../e_os.h ../../include/openssl/asn1.h +obj_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +obj_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +obj_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +obj_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +obj_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +obj_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +obj_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +obj_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_lib.c diff --git a/src/lib/libcrypto/objects/obj_dat.h b/src/lib/libcrypto/objects/obj_dat.h index 969b18a341..8785127055 100644 --- a/src/lib/libcrypto/objects/obj_dat.h +++ b/src/lib/libcrypto/objects/obj_dat.h @@ -62,12 +62,12 @@ * [including the GNU Public Licence.] */ -#define NUM_NID 650 -#define NUM_SN 643 -#define NUM_LN 643 -#define NUM_OBJ 617 +#define NUM_NID 668 +#define NUM_SN 660 +#define NUM_LN 660 +#define NUM_OBJ 624 -static unsigned char lvalues[4455]={ +static unsigned char lvalues[4500]={ 0x00, /* [ 0] OBJ_undef */ 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ @@ -685,6 +685,13 @@ static unsigned char lvalues[4455]={ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x06,/* [4425] OBJ_rsaOAEPEncryptionSET */ 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x02,/* [4434] OBJ_ms_smartcard_login */ 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x03,/* [4444] OBJ_ms_upn */ +0x55,0x04,0x09, /* [4454] OBJ_streetAddress */ +0x55,0x04,0x11, /* [4457] OBJ_postalCode */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x15, /* [4460] OBJ_id_ppl */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0E, /* [4467] OBJ_proxyCertInfo */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x00, /* [4475] OBJ_id_ppl_anyLanguage */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x01, /* [4483] OBJ_id_ppl_inheritAll */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x02, /* [4491] OBJ_Independent */ }; static ASN1_OBJECT nid_objs[NUM_NID]={ @@ -1728,20 +1735,47 @@ static ASN1_OBJECT nid_objs[NUM_NID]={ 10,&(lvalues[4434]),0}, {"msUPN","Microsoft Universal Principal Name",NID_ms_upn,10, &(lvalues[4444]),0}, +{"AES-128-CFB1","aes-128-cfb1",NID_aes_128_cfb1,0,NULL}, +{"AES-192-CFB1","aes-192-cfb1",NID_aes_192_cfb1,0,NULL}, +{"AES-256-CFB1","aes-256-cfb1",NID_aes_256_cfb1,0,NULL}, +{"AES-128-CFB8","aes-128-cfb8",NID_aes_128_cfb8,0,NULL}, +{"AES-192-CFB8","aes-192-cfb8",NID_aes_192_cfb8,0,NULL}, +{"AES-256-CFB8","aes-256-cfb8",NID_aes_256_cfb8,0,NULL}, +{"DES-CFB1","des-cfb1",NID_des_cfb1,0,NULL}, +{"DES-CFB8","des-cfb8",NID_des_cfb8,0,NULL}, +{"DES-EDE3-CFB1","des-ede3-cfb1",NID_des_ede3_cfb1,0,NULL}, +{"DES-EDE3-CFB8","des-ede3-cfb8",NID_des_ede3_cfb8,0,NULL}, +{"streetAddress","streetAddress",NID_streetAddress,3,&(lvalues[4454]),0}, +{"postalCode","postalCode",NID_postalCode,3,&(lvalues[4457]),0}, +{"id-ppl","id-ppl",NID_id_ppl,7,&(lvalues[4460]),0}, +{"proxyCertInfo","Proxy Certificate Information",NID_proxyCertInfo,8, + &(lvalues[4467]),0}, +{"id-ppl-anyLanguage","Any language",NID_id_ppl_anyLanguage,8, + &(lvalues[4475]),0}, +{"id-ppl-inheritAll","Inherit all",NID_id_ppl_inheritAll,8, + &(lvalues[4483]),0}, +{NULL,NULL,NID_undef,0,NULL}, +{"id-ppl-independent","Independent",NID_Independent,8,&(lvalues[4491]),0}, }; static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[364]),/* "AD_DVCS" */ &(nid_objs[419]),/* "AES-128-CBC" */ &(nid_objs[421]),/* "AES-128-CFB" */ +&(nid_objs[650]),/* "AES-128-CFB1" */ +&(nid_objs[653]),/* "AES-128-CFB8" */ &(nid_objs[418]),/* "AES-128-ECB" */ &(nid_objs[420]),/* "AES-128-OFB" */ &(nid_objs[423]),/* "AES-192-CBC" */ &(nid_objs[425]),/* "AES-192-CFB" */ +&(nid_objs[651]),/* "AES-192-CFB1" */ +&(nid_objs[654]),/* "AES-192-CFB8" */ &(nid_objs[422]),/* "AES-192-ECB" */ &(nid_objs[424]),/* "AES-192-OFB" */ &(nid_objs[427]),/* "AES-256-CBC" */ &(nid_objs[429]),/* "AES-256-CFB" */ +&(nid_objs[652]),/* "AES-256-CFB1" */ +&(nid_objs[655]),/* "AES-256-CFB8" */ &(nid_objs[426]),/* "AES-256-ECB" */ &(nid_objs[428]),/* "AES-256-OFB" */ &(nid_objs[91]),/* "BF-CBC" */ @@ -1762,6 +1796,8 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[31]),/* "DES-CBC" */ &(nid_objs[643]),/* "DES-CDMF" */ &(nid_objs[30]),/* "DES-CFB" */ +&(nid_objs[656]),/* "DES-CFB1" */ +&(nid_objs[657]),/* "DES-CFB8" */ &(nid_objs[29]),/* "DES-ECB" */ &(nid_objs[32]),/* "DES-EDE" */ &(nid_objs[43]),/* "DES-EDE-CBC" */ @@ -1770,6 +1806,8 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[33]),/* "DES-EDE3" */ &(nid_objs[44]),/* "DES-EDE3-CBC" */ &(nid_objs[61]),/* "DES-EDE3-CFB" */ +&(nid_objs[658]),/* "DES-EDE3-CFB1" */ +&(nid_objs[659]),/* "DES-EDE3-CFB8" */ &(nid_objs[63]),/* "DES-EDE3-OFB" */ &(nid_objs[45]),/* "DES-OFB" */ &(nid_objs[80]),/* "DESX-CBC" */ @@ -2022,6 +2060,10 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[271]),/* "id-pkix1-explicit-93" */ &(nid_objs[270]),/* "id-pkix1-implicit-88" */ &(nid_objs[272]),/* "id-pkix1-implicit-93" */ +&(nid_objs[662]),/* "id-ppl" */ +&(nid_objs[664]),/* "id-ppl-anyLanguage" */ +&(nid_objs[667]),/* "id-ppl-independent" */ +&(nid_objs[665]),/* "id-ppl-inheritAll" */ &(nid_objs[267]),/* "id-qcs" */ &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ &(nid_objs[259]),/* "id-qt" */ @@ -2186,6 +2228,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ &(nid_objs[47]),/* "pkcs9" */ &(nid_objs[401]),/* "policyConstraints" */ +&(nid_objs[661]),/* "postalCode" */ &(nid_objs[406]),/* "prime-field" */ &(nid_objs[409]),/* "prime192v1" */ &(nid_objs[410]),/* "prime192v2" */ @@ -2196,6 +2239,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[415]),/* "prime256v1" */ &(nid_objs[385]),/* "private" */ &(nid_objs[84]),/* "privateKeyUsagePeriod" */ +&(nid_objs[663]),/* "proxyCertInfo" */ &(nid_objs[510]),/* "pseudonym" */ &(nid_objs[435]),/* "pss" */ &(nid_objs[286]),/* "qcStatements" */ @@ -2355,6 +2399,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[454]),/* "simpleSecurityObject" */ &(nid_objs[496]),/* "singleLevelQuality" */ &(nid_objs[387]),/* "snmpv2" */ +&(nid_objs[660]),/* "streetAddress" */ &(nid_objs[85]),/* "subjectAltName" */ &(nid_objs[398]),/* "subjectInfoAccess" */ &(nid_objs[82]),/* "subjectKeyIdentifier" */ @@ -2380,6 +2425,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[363]),/* "AD Time Stamping" */ &(nid_objs[405]),/* "ANSI X9.62" */ &(nid_objs[368]),/* "Acceptable OCSP Responses" */ +&(nid_objs[664]),/* "Any language" */ &(nid_objs[177]),/* "Authority Information Access" */ &(nid_objs[365]),/* "Basic OCSP Response" */ &(nid_objs[285]),/* "Biometric Info" */ @@ -2402,6 +2448,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[296]),/* "IPSec User" */ &(nid_objs[182]),/* "ISO Member Body" */ &(nid_objs[183]),/* "ISO US Member Body" */ +&(nid_objs[667]),/* "Independent" */ +&(nid_objs[665]),/* "Inherit all" */ &(nid_objs[142]),/* "Invalidity Date" */ &(nid_objs[504]),/* "MIME MHS" */ &(nid_objs[388]),/* "Mail" */ @@ -2442,6 +2490,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[164]),/* "Policy Qualifier CPS" */ &(nid_objs[165]),/* "Policy Qualifier User Notice" */ &(nid_objs[385]),/* "Private" */ +&(nid_objs[663]),/* "Proxy Certificate Information" */ &(nid_objs[ 1]),/* "RSA Data Security, Inc." */ &(nid_objs[ 2]),/* "RSA Data Security, Inc. PKCS" */ &(nid_objs[188]),/* "S/MIME" */ @@ -2485,14 +2534,20 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[606]),/* "additional verification" */ &(nid_objs[419]),/* "aes-128-cbc" */ &(nid_objs[421]),/* "aes-128-cfb" */ +&(nid_objs[650]),/* "aes-128-cfb1" */ +&(nid_objs[653]),/* "aes-128-cfb8" */ &(nid_objs[418]),/* "aes-128-ecb" */ &(nid_objs[420]),/* "aes-128-ofb" */ &(nid_objs[423]),/* "aes-192-cbc" */ &(nid_objs[425]),/* "aes-192-cfb" */ +&(nid_objs[651]),/* "aes-192-cfb1" */ +&(nid_objs[654]),/* "aes-192-cfb8" */ &(nid_objs[422]),/* "aes-192-ecb" */ &(nid_objs[424]),/* "aes-192-ofb" */ &(nid_objs[427]),/* "aes-256-cbc" */ &(nid_objs[429]),/* "aes-256-cfb" */ +&(nid_objs[652]),/* "aes-256-cfb1" */ +&(nid_objs[655]),/* "aes-256-cfb8" */ &(nid_objs[426]),/* "aes-256-ecb" */ &(nid_objs[428]),/* "aes-256-ofb" */ &(nid_objs[376]),/* "algorithm" */ @@ -2531,6 +2586,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[31]),/* "des-cbc" */ &(nid_objs[643]),/* "des-cdmf" */ &(nid_objs[30]),/* "des-cfb" */ +&(nid_objs[656]),/* "des-cfb1" */ +&(nid_objs[657]),/* "des-cfb8" */ &(nid_objs[29]),/* "des-ecb" */ &(nid_objs[32]),/* "des-ede" */ &(nid_objs[43]),/* "des-ede-cbc" */ @@ -2539,6 +2596,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[33]),/* "des-ede3" */ &(nid_objs[44]),/* "des-ede3-cbc" */ &(nid_objs[61]),/* "des-ede3-cfb" */ +&(nid_objs[658]),/* "des-ede3-cfb1" */ +&(nid_objs[659]),/* "des-ede3-cfb8" */ &(nid_objs[63]),/* "des-ede3-ofb" */ &(nid_objs[45]),/* "des-ofb" */ &(nid_objs[107]),/* "description" */ @@ -2668,6 +2727,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[271]),/* "id-pkix1-explicit-93" */ &(nid_objs[270]),/* "id-pkix1-implicit-88" */ &(nid_objs[272]),/* "id-pkix1-implicit-93" */ +&(nid_objs[662]),/* "id-ppl" */ &(nid_objs[267]),/* "id-qcs" */ &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ &(nid_objs[259]),/* "id-qt" */ @@ -2831,6 +2891,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[22]),/* "pkcs7-signedData" */ &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ &(nid_objs[47]),/* "pkcs9" */ +&(nid_objs[661]),/* "postalCode" */ &(nid_objs[406]),/* "prime-field" */ &(nid_objs[409]),/* "prime192v1" */ &(nid_objs[410]),/* "prime192v2" */ @@ -3003,6 +3064,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[454]),/* "simpleSecurityObject" */ &(nid_objs[496]),/* "singleLevelQuality" */ &(nid_objs[16]),/* "stateOrProvinceName" */ +&(nid_objs[660]),/* "streetAddress" */ &(nid_objs[498]),/* "subtreeMaximumQuality" */ &(nid_objs[497]),/* "subtreeMinimumQuality" */ &(nid_objs[100]),/* "surname" */ @@ -3046,10 +3108,12 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[14]),/* OBJ_countryName 2 5 4 6 */ &(nid_objs[15]),/* OBJ_localityName 2 5 4 7 */ &(nid_objs[16]),/* OBJ_stateOrProvinceName 2 5 4 8 */ +&(nid_objs[660]),/* OBJ_streetAddress 2 5 4 9 */ &(nid_objs[17]),/* OBJ_organizationName 2 5 4 10 */ &(nid_objs[18]),/* OBJ_organizationalUnitName 2 5 4 11 */ &(nid_objs[106]),/* OBJ_title 2 5 4 12 */ &(nid_objs[107]),/* OBJ_description 2 5 4 13 */ +&(nid_objs[661]),/* OBJ_postalCode 2 5 4 17 */ &(nid_objs[173]),/* OBJ_name 2 5 4 41 */ &(nid_objs[99]),/* OBJ_givenName 2 5 4 42 */ &(nid_objs[101]),/* OBJ_initials 2 5 4 43 */ @@ -3270,6 +3334,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[266]),/* OBJ_id_aca 1 3 6 1 5 5 7 10 */ &(nid_objs[267]),/* OBJ_id_qcs 1 3 6 1 5 5 7 11 */ &(nid_objs[268]),/* OBJ_id_cct 1 3 6 1 5 5 7 12 */ +&(nid_objs[662]),/* OBJ_id_ppl 1 3 6 1 5 5 7 21 */ &(nid_objs[176]),/* OBJ_id_ad 1 3 6 1 5 5 7 48 */ &(nid_objs[507]),/* OBJ_id_hex_partial_message 1 3 6 1 7 1 1 1 */ &(nid_objs[508]),/* OBJ_id_hex_multipart_message 1 3 6 1 7 1 1 2 */ @@ -3323,6 +3388,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[292]),/* OBJ_sbqp_routerIdentifier 1 3 6 1 5 5 7 1 9 */ &(nid_objs[397]),/* OBJ_ac_proxying 1 3 6 1 5 5 7 1 10 */ &(nid_objs[398]),/* OBJ_sinfo_access 1 3 6 1 5 5 7 1 11 */ +&(nid_objs[663]),/* OBJ_proxyCertInfo 1 3 6 1 5 5 7 1 14 */ &(nid_objs[164]),/* OBJ_id_qt_cps 1 3 6 1 5 5 7 2 1 */ &(nid_objs[165]),/* OBJ_id_qt_unotice 1 3 6 1 5 5 7 2 2 */ &(nid_objs[293]),/* OBJ_textNotice 1 3 6 1 5 5 7 2 3 */ @@ -3393,6 +3459,9 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[360]),/* OBJ_id_cct_crs 1 3 6 1 5 5 7 12 1 */ &(nid_objs[361]),/* OBJ_id_cct_PKIData 1 3 6 1 5 5 7 12 2 */ &(nid_objs[362]),/* OBJ_id_cct_PKIResponse 1 3 6 1 5 5 7 12 3 */ +&(nid_objs[664]),/* OBJ_id_ppl_anyLanguage 1 3 6 1 5 5 7 21 0 */ +&(nid_objs[665]),/* OBJ_id_ppl_inheritAll 1 3 6 1 5 5 7 21 1 */ +&(nid_objs[667]),/* OBJ_Independent 1 3 6 1 5 5 7 21 2 */ &(nid_objs[178]),/* OBJ_ad_OCSP 1 3 6 1 5 5 7 48 1 */ &(nid_objs[179]),/* OBJ_ad_ca_issuers 1 3 6 1 5 5 7 48 2 */ &(nid_objs[363]),/* OBJ_ad_timeStamping 1 3 6 1 5 5 7 48 3 */ diff --git a/src/lib/libcrypto/objects/obj_mac.h b/src/lib/libcrypto/objects/obj_mac.h index 7645012298..d28894cf41 100644 --- a/src/lib/libcrypto/objects/obj_mac.h +++ b/src/lib/libcrypto/objects/obj_mac.h @@ -950,6 +950,10 @@ #define NID_id_cct 268 #define OBJ_id_cct OBJ_id_pkix,12L +#define SN_id_ppl "id-ppl" +#define NID_id_ppl 662 +#define OBJ_id_ppl OBJ_id_pkix,21L + #define SN_id_ad "id-ad" #define NID_id_ad 176 #define OBJ_id_ad OBJ_id_pkix,48L @@ -1065,6 +1069,11 @@ #define NID_sinfo_access 398 #define OBJ_sinfo_access OBJ_id_pe,11L +#define SN_proxyCertInfo "proxyCertInfo" +#define LN_proxyCertInfo "Proxy Certificate Information" +#define NID_proxyCertInfo 663 +#define OBJ_proxyCertInfo OBJ_id_pe,14L + #define SN_id_qt_cps "id-qt-cps" #define LN_id_qt_cps "Policy Qualifier CPS" #define NID_id_qt_cps 164 @@ -1389,6 +1398,21 @@ #define NID_id_cct_PKIResponse 362 #define OBJ_id_cct_PKIResponse OBJ_id_cct,3L +#define SN_id_ppl_anyLanguage "id-ppl-anyLanguage" +#define LN_id_ppl_anyLanguage "Any language" +#define NID_id_ppl_anyLanguage 664 +#define OBJ_id_ppl_anyLanguage OBJ_id_ppl,0L + +#define SN_id_ppl_inheritAll "id-ppl-inheritAll" +#define LN_id_ppl_inheritAll "Inherit all" +#define NID_id_ppl_inheritAll 665 +#define OBJ_id_ppl_inheritAll OBJ_id_ppl,1L + +#define SN_Independent "id-ppl-independent" +#define LN_Independent "Independent" +#define NID_Independent 667 +#define OBJ_Independent OBJ_id_ppl,2L + #define SN_ad_OCSP "OCSP" #define LN_ad_OCSP "OCSP" #define NID_ad_OCSP 178 @@ -1619,6 +1643,10 @@ #define NID_stateOrProvinceName 16 #define OBJ_stateOrProvinceName OBJ_X509,8L +#define LN_streetAddress "streetAddress" +#define NID_streetAddress 660 +#define OBJ_streetAddress OBJ_X509,9L + #define SN_organizationName "O" #define LN_organizationName "organizationName" #define NID_organizationName 17 @@ -1637,6 +1665,10 @@ #define NID_description 107 #define OBJ_description OBJ_X509,13L +#define LN_postalCode "postalCode" +#define NID_postalCode 661 +#define OBJ_postalCode OBJ_X509,17L + #define SN_name "name" #define LN_name "name" #define NID_name 173 @@ -2009,6 +2041,46 @@ #define NID_aes_256_cfb128 429 #define OBJ_aes_256_cfb128 OBJ_aes,44L +#define SN_aes_128_cfb1 "AES-128-CFB1" +#define LN_aes_128_cfb1 "aes-128-cfb1" +#define NID_aes_128_cfb1 650 + +#define SN_aes_192_cfb1 "AES-192-CFB1" +#define LN_aes_192_cfb1 "aes-192-cfb1" +#define NID_aes_192_cfb1 651 + +#define SN_aes_256_cfb1 "AES-256-CFB1" +#define LN_aes_256_cfb1 "aes-256-cfb1" +#define NID_aes_256_cfb1 652 + +#define SN_aes_128_cfb8 "AES-128-CFB8" +#define LN_aes_128_cfb8 "aes-128-cfb8" +#define NID_aes_128_cfb8 653 + +#define SN_aes_192_cfb8 "AES-192-CFB8" +#define LN_aes_192_cfb8 "aes-192-cfb8" +#define NID_aes_192_cfb8 654 + +#define SN_aes_256_cfb8 "AES-256-CFB8" +#define LN_aes_256_cfb8 "aes-256-cfb8" +#define NID_aes_256_cfb8 655 + +#define SN_des_cfb1 "DES-CFB1" +#define LN_des_cfb1 "des-cfb1" +#define NID_des_cfb1 656 + +#define SN_des_cfb8 "DES-CFB8" +#define LN_des_cfb8 "des-cfb8" +#define NID_des_cfb8 657 + +#define SN_des_ede3_cfb1 "DES-EDE3-CFB1" +#define LN_des_ede3_cfb1 "des-ede3-cfb1" +#define NID_des_ede3_cfb1 658 + +#define SN_des_ede3_cfb8 "DES-EDE3-CFB8" +#define LN_des_ede3_cfb8 "des-ede3-cfb8" +#define NID_des_ede3_cfb8 659 + #define SN_hold_instruction_code "holdInstructionCode" #define LN_hold_instruction_code "Hold Instruction Code" #define NID_hold_instruction_code 430 diff --git a/src/lib/libcrypto/ocsp/Makefile b/src/lib/libcrypto/ocsp/Makefile new file mode 100644 index 0000000000..59f7098d9e --- /dev/null +++ b/src/lib/libcrypto/ocsp/Makefile @@ -0,0 +1,291 @@ +# +# OpenSSL/ocsp/Makefile +# + +DIR= ocsp +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= ocsp_asn.c ocsp_ext.c ocsp_ht.c ocsp_lib.c ocsp_cl.c \ + ocsp_srv.c ocsp_prn.c ocsp_vfy.c ocsp_err.c + +LIBOBJ= ocsp_asn.o ocsp_ext.o ocsp_ht.o ocsp_lib.o ocsp_cl.o \ + ocsp_srv.o ocsp_prn.o ocsp_vfy.o ocsp_err.o + +SRC= $(LIBSRC) + +EXHEADER= ocsp.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +ocsp_asn.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_asn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +ocsp_asn.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_asn.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_asn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/evp.h +ocsp_asn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_asn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_asn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_asn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_asn.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_asn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_asn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_asn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_asn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_asn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_asn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_asn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_asn.o: ../../include/openssl/x509v3.h ocsp_asn.c +ocsp_cl.o: ../../e_os.h ../../include/openssl/aes.h +ocsp_cl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_cl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_cl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_cl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_cl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_cl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_cl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ocsp_cl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_cl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_cl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_cl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_cl.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_cl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +ocsp_cl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +ocsp_cl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +ocsp_cl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +ocsp_cl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_cl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_cl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_cl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_cl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_cl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_cl.o: ../../include/openssl/x509v3.h ../cryptlib.h ocsp_cl.c +ocsp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ocsp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_err.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_err.o: ../../include/openssl/x509v3.h ocsp_err.c +ocsp_ext.o: ../../e_os.h ../../include/openssl/aes.h +ocsp_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ocsp_ext.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_ext.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_ext.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_ext.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_ext.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_ext.o: ../../include/openssl/opensslconf.h +ocsp_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_ext.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +ocsp_ext.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +ocsp_ext.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +ocsp_ext.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +ocsp_ext.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +ocsp_ext.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ocsp_ext.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +ocsp_ext.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +ocsp_ext.o: ../cryptlib.h ocsp_ext.c +ocsp_ht.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_ht.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_ht.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_ht.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_ht.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_ht.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_ht.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_ht.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ocsp_ht.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_ht.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_ht.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_ht.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_ht.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_ht.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_ht.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_ht.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_ht.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_ht.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_ht.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_ht.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_ht.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_ht.o: ../../include/openssl/x509v3.h ocsp_ht.c +ocsp_lib.o: ../../e_os.h ../../include/openssl/aes.h +ocsp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ocsp_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_lib.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_lib.o: ../../include/openssl/opensslconf.h +ocsp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_lib.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +ocsp_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +ocsp_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +ocsp_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +ocsp_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +ocsp_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +ocsp_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ocsp_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +ocsp_lib.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +ocsp_lib.o: ../cryptlib.h ocsp_lib.c +ocsp_prn.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ocsp_prn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_prn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_prn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_prn.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_prn.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +ocsp_prn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_prn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_prn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_prn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_prn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_prn.o: ../../include/openssl/x509v3.h ocsp_prn.c +ocsp_srv.o: ../../e_os.h ../../include/openssl/aes.h +ocsp_srv.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_srv.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_srv.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_srv.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_srv.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_srv.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_srv.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ocsp_srv.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_srv.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_srv.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_srv.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_srv.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_srv.o: ../../include/openssl/opensslconf.h +ocsp_srv.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_srv.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +ocsp_srv.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +ocsp_srv.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +ocsp_srv.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +ocsp_srv.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +ocsp_srv.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +ocsp_srv.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ocsp_srv.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +ocsp_srv.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +ocsp_srv.o: ../cryptlib.h ocsp_srv.c +ocsp_vfy.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_vfy.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_vfy.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_vfy.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_vfy.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_vfy.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_vfy.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ocsp_vfy.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_vfy.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_vfy.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_vfy.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_vfy.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_vfy.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_vfy.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_vfy.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_vfy.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_vfy.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_vfy.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_vfy.o: ../../include/openssl/x509v3.h ocsp_vfy.c diff --git a/src/lib/libcrypto/pem/Makefile b/src/lib/libcrypto/pem/Makefile new file mode 100644 index 0000000000..f3dfea2ac8 --- /dev/null +++ b/src/lib/libcrypto/pem/Makefile @@ -0,0 +1,335 @@ +# +# SSLeay/crypto/pem/Makefile +# + +DIR= pem +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c \ + pem_x509.c pem_xaux.c pem_oth.c pem_pk8.c pem_pkey.c + +LIBOBJ= pem_sign.o pem_seal.o pem_info.o pem_lib.o pem_all.o pem_err.o \ + pem_x509.o pem_xaux.o pem_oth.o pem_pk8.o pem_pkey.o + +SRC= $(LIBSRC) + +EXHEADER= pem.h pem2.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +pem_all.o: ../../e_os.h ../../include/openssl/aes.h +pem_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_all.o: ../../include/openssl/fips.h ../../include/openssl/idea.h +pem_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pem_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pem_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pem_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pem_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_all.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_all.o: ../cryptlib.h pem_all.c +pem_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +pem_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pem_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pem_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pem_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pem_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pem_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pem_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pem_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pem_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pem_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pem_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_err.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_err.o: pem_err.c +pem_info.o: ../../e_os.h ../../include/openssl/aes.h +pem_info.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_info.o: ../../include/openssl/opensslconf.h +pem_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_info.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_info.o: ../cryptlib.h pem_info.c +pem_lib.o: ../../e_os.h ../../include/openssl/aes.h +pem_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +pem_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +pem_lib.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h +pem_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pem_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pem_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pem_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pem_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pem_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_lib.c +pem_oth.o: ../../e_os.h ../../include/openssl/aes.h +pem_oth.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_oth.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_oth.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_oth.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_oth.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_oth.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_oth.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_oth.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_oth.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_oth.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_oth.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_oth.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +pem_oth.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +pem_oth.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +pem_oth.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +pem_oth.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_oth.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_oth.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_oth.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_oth.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_oth.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_oth.o: ../cryptlib.h pem_oth.c +pem_pk8.o: ../../e_os.h ../../include/openssl/aes.h +pem_pk8.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_pk8.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_pk8.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_pk8.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_pk8.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_pk8.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_pk8.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_pk8.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_pk8.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_pk8.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_pk8.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_pk8.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +pem_pk8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +pem_pk8.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h +pem_pk8.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pem_pk8.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pem_pk8.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pem_pk8.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_pk8.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_pk8.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pem_pk8.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pem_pk8.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_pk8.c +pem_pkey.o: ../../e_os.h ../../include/openssl/aes.h +pem_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_pkey.o: ../../include/openssl/opensslconf.h +pem_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_pkey.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_pkey.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +pem_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +pem_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_pkey.o: ../cryptlib.h pem_pkey.c +pem_seal.o: ../../e_os.h ../../include/openssl/aes.h +pem_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_seal.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_seal.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_seal.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_seal.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_seal.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_seal.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_seal.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_seal.o: ../../include/openssl/opensslconf.h +pem_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_seal.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pem_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pem_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pem_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pem_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pem_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_seal.c +pem_sign.o: ../../e_os.h ../../include/openssl/aes.h +pem_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_sign.o: ../../include/openssl/opensslconf.h +pem_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_sign.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pem_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pem_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pem_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pem_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pem_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_sign.c +pem_x509.o: ../../e_os.h ../../include/openssl/aes.h +pem_x509.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_x509.o: ../../include/openssl/opensslconf.h +pem_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_x509.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_x509.o: ../cryptlib.h pem_x509.c +pem_xaux.o: ../../e_os.h ../../include/openssl/aes.h +pem_xaux.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_xaux.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_xaux.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_xaux.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_xaux.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_xaux.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_xaux.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_xaux.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_xaux.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_xaux.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_xaux.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_xaux.o: ../../include/openssl/opensslconf.h +pem_xaux.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_xaux.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_xaux.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_xaux.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_xaux.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_xaux.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_xaux.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_xaux.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_xaux.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_xaux.o: ../cryptlib.h pem_xaux.c diff --git a/src/lib/libcrypto/perlasm/x86ms.pl b/src/lib/libcrypto/perlasm/x86ms.pl index fbb4afb9bd..b6bd744057 100644 --- a/src/lib/libcrypto/perlasm/x86ms.pl +++ b/src/lib/libcrypto/perlasm/x86ms.pl @@ -160,6 +160,7 @@ sub main'not { &out1("not",@_); } sub main'call { &out1("call",($_[0]=~/^\$L/?'':'_').$_[0]); } sub main'ret { &out0("ret"); } sub main'nop { &out0("nop"); } +sub main'movz { &out2("movzx",@_); } sub out2 { diff --git a/src/lib/libcrypto/perlasm/x86nasm.pl b/src/lib/libcrypto/perlasm/x86nasm.pl index 30346af4ea..5009acb4b3 100644 --- a/src/lib/libcrypto/perlasm/x86nasm.pl +++ b/src/lib/libcrypto/perlasm/x86nasm.pl @@ -86,7 +86,7 @@ sub get_mem { my($size,$addr,$reg1,$reg2,$idx)=@_; my($t,$post); - my($ret)="["; + my($ret)="$size ["; $addr =~ s/^\s+//; if ($addr =~ /^(.+)\+(.+)$/) { @@ -169,6 +169,7 @@ sub main'not { &out1("not",@_); } sub main'call { &out1("call",($_[0]=~/^\$L/?'':'_').$_[0]); } sub main'ret { &out0("ret"); } sub main'nop { &out0("nop"); } +sub main'movz { &out2("movzx",@_); } sub out2 { @@ -176,6 +177,11 @@ sub out2 my($l,$t); push(@out,"\t$name\t"); + if ($name eq "lea") + { + $p1 =~ s/^[^\[]*\[/\[/; + $p2 =~ s/^[^\[]*\[/\[/; + } $t=&conv($p1).","; $l=length($t); push(@out,$t); diff --git a/src/lib/libcrypto/perlasm/x86unix.pl b/src/lib/libcrypto/perlasm/x86unix.pl index 10b669bf04..a31a25c12b 100644 --- a/src/lib/libcrypto/perlasm/x86unix.pl +++ b/src/lib/libcrypto/perlasm/x86unix.pl @@ -137,12 +137,12 @@ sub main'shl { &out2("sall",@_); } sub main'shr { &out2("shrl",@_); } sub main'xor { &out2("xorl",@_); } sub main'xorb { &out2("xorb",@_); } -sub main'add { &out2("addl",@_); } +sub main'add { &out2($_[0]=~/%[a-d][lh]/?"addb":"addl",@_); } sub main'adc { &out2("adcl",@_); } sub main'sub { &out2("subl",@_); } sub main'rotl { &out2("roll",@_); } sub main'rotr { &out2("rorl",@_); } -sub main'exch { &out2("xchg",@_); } +sub main'exch { &out2($_[0]=~/%[a-d][lh]/?"xchgb":"xchgl",@_); } sub main'cmp { &out2("cmpl",@_); } sub main'lea { &out2("leal",@_); } sub main'mul { &out1("mull",@_); } @@ -164,7 +164,7 @@ sub main'jc { &out1("jc",@_); } sub main'jnc { &out1("jnc",@_); } sub main'jno { &out1("jno",@_); } sub main'dec { &out1("decl",@_); } -sub main'inc { &out1("incl",@_); } +sub main'inc { &out1($_[0]=~/%[a-d][hl]/?"incb":"incl",@_); } sub main'push { &out1("pushl",@_); $stack+=4; } sub main'pop { &out1("popl",@_); $stack-=4; } sub main'pushf { &out0("pushf"); $stack+=4; } @@ -173,6 +173,7 @@ sub main'not { &out1("notl",@_); } sub main'call { &out1("call",($_[0]=~/^\.L/?'':$under).$_[0]); } sub main'ret { &out0("ret"); } sub main'nop { &out0("nop"); } +sub main'movz { &out2("movzbl",@_); } # The bswapl instruction is new for the 486. Emulate if i386. sub main'bswap diff --git a/src/lib/libcrypto/pkcs12/Makefile b/src/lib/libcrypto/pkcs12/Makefile new file mode 100644 index 0000000000..854b641f7c --- /dev/null +++ b/src/lib/libcrypto/pkcs12/Makefile @@ -0,0 +1,415 @@ +# +# SSLeay/crypto/pkcs12/Makefile +# + +DIR= pkcs12 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= p12_add.c p12_asn.c p12_attr.c p12_crpt.c p12_crt.c p12_decr.c \ + p12_init.c p12_key.c p12_kiss.c p12_mutl.c\ + p12_utl.c p12_npas.c pk12err.c p12_p8d.c p12_p8e.c +LIBOBJ= p12_add.o p12_asn.o p12_attr.o p12_crpt.o p12_crt.o p12_decr.o \ + p12_init.o p12_key.o p12_kiss.o p12_mutl.o\ + p12_utl.o p12_npas.o pk12err.o p12_p8d.o p12_p8e.o + +SRC= $(LIBSRC) + +EXHEADER= pkcs12.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +test: + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +p12_add.o: ../../e_os.h ../../include/openssl/aes.h +p12_add.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_add.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_add.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_add.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_add.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_add.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_add.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_add.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_add.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_add.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_add.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_add.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_add.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_add.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_add.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_add.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_add.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_add.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_add.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_add.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_add.o: ../cryptlib.h p12_add.c +p12_asn.o: ../../e_os.h ../../include/openssl/aes.h +p12_asn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +p12_asn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p12_asn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p12_asn.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p12_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p12_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p12_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p12_asn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p12_asn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p12_asn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p12_asn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p12_asn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p12_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_asn.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_asn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_asn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_asn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_asn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_asn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_asn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_asn.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_asn.c +p12_attr.o: ../../e_os.h ../../include/openssl/aes.h +p12_attr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_attr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_attr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_attr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_attr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_attr.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_attr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_attr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_attr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_attr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_attr.o: ../../include/openssl/opensslconf.h +p12_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_attr.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_attr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_attr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_attr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_attr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_attr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_attr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_attr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_attr.c +p12_crpt.o: ../../e_os.h ../../include/openssl/aes.h +p12_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_crpt.o: ../../include/openssl/opensslconf.h +p12_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_crpt.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_crpt.c +p12_crt.o: ../../e_os.h ../../include/openssl/aes.h +p12_crt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_crt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_crt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_crt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_crt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_crt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_crt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_crt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_crt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_crt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_crt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_crt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_crt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_crt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_crt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_crt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_crt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_crt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_crt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_crt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_crt.o: ../cryptlib.h p12_crt.c +p12_decr.o: ../../e_os.h ../../include/openssl/aes.h +p12_decr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_decr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_decr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_decr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_decr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_decr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_decr.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_decr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_decr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_decr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_decr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_decr.o: ../../include/openssl/opensslconf.h +p12_decr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_decr.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_decr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_decr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_decr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_decr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_decr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_decr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_decr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_decr.c +p12_init.o: ../../e_os.h ../../include/openssl/aes.h +p12_init.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_init.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_init.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_init.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_init.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_init.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_init.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_init.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_init.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_init.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_init.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_init.o: ../../include/openssl/opensslconf.h +p12_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_init.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_init.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_init.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_init.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_init.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_init.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_init.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_init.c +p12_key.o: ../../e_os.h ../../include/openssl/aes.h +p12_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_key.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_key.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_key.o: ../cryptlib.h p12_key.c +p12_kiss.o: ../../e_os.h ../../include/openssl/aes.h +p12_kiss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_kiss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_kiss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_kiss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_kiss.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_kiss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_kiss.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_kiss.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_kiss.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_kiss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_kiss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_kiss.o: ../../include/openssl/opensslconf.h +p12_kiss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_kiss.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_kiss.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_kiss.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_kiss.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_kiss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_kiss.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_kiss.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_kiss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_kiss.c +p12_mutl.o: ../../e_os.h ../../include/openssl/aes.h +p12_mutl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_mutl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_mutl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_mutl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_mutl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_mutl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_mutl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_mutl.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h +p12_mutl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p12_mutl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p12_mutl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p12_mutl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p12_mutl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_mutl.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_mutl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +p12_mutl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_mutl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_mutl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_mutl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_mutl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_mutl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_mutl.o: ../cryptlib.h p12_mutl.c +p12_npas.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +p12_npas.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p12_npas.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p12_npas.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p12_npas.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p12_npas.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p12_npas.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p12_npas.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p12_npas.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p12_npas.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p12_npas.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p12_npas.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p12_npas.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_npas.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +p12_npas.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_npas.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_npas.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_npas.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_npas.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_npas.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_npas.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_npas.o: ../../include/openssl/x509_vfy.h p12_npas.c +p12_p8d.o: ../../e_os.h ../../include/openssl/aes.h +p12_p8d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_p8d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_p8d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_p8d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_p8d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_p8d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_p8d.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_p8d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_p8d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_p8d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_p8d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_p8d.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_p8d.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_p8d.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_p8d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_p8d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_p8d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_p8d.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_p8d.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_p8d.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_p8d.o: ../cryptlib.h p12_p8d.c +p12_p8e.o: ../../e_os.h ../../include/openssl/aes.h +p12_p8e.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_p8e.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_p8e.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_p8e.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_p8e.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_p8e.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_p8e.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_p8e.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_p8e.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_p8e.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_p8e.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_p8e.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_p8e.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_p8e.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_p8e.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_p8e.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_p8e.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_p8e.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_p8e.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_p8e.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_p8e.o: ../cryptlib.h p12_p8e.c +p12_utl.o: ../../e_os.h ../../include/openssl/aes.h +p12_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_utl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_utl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_utl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_utl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_utl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_utl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_utl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_utl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_utl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_utl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_utl.o: ../cryptlib.h p12_utl.c +pk12err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +pk12err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk12err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk12err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk12err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk12err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk12err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk12err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk12err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk12err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk12err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk12err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk12err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk12err.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +pk12err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pk12err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pk12err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pk12err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pk12err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pk12err.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pk12err.o: ../../include/openssl/x509_vfy.h pk12err.c diff --git a/src/lib/libcrypto/pkcs7/Makefile b/src/lib/libcrypto/pkcs7/Makefile new file mode 100644 index 0000000000..f15c65f690 --- /dev/null +++ b/src/lib/libcrypto/pkcs7/Makefile @@ -0,0 +1,241 @@ +# +# SSLeay/crypto/pkcs7/Makefile +# + +DIR= pkcs7 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +PEX_LIBS= +EX_LIBS= + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= pk7_asn1.c pk7_lib.c pkcs7err.c pk7_doit.c pk7_smime.c pk7_attr.c \ + pk7_mime.c +LIBOBJ= pk7_asn1.o pk7_lib.o pkcs7err.o pk7_doit.o pk7_smime.o pk7_attr.o \ + pk7_mime.o + +SRC= $(LIBSRC) + +EXHEADER= pkcs7.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +test: + +all: lib + +testapps: enc dec sign verify + +enc: enc.o lib + $(CC) $(CFLAGS) -o enc enc.o $(PEX_LIBS) $(LIB) $(EX_LIBS) + +dec: dec.o lib + $(CC) $(CFLAGS) -o dec dec.o $(PEX_LIBS) $(LIB) $(EX_LIBS) + +sign: sign.o lib + $(CC) $(CFLAGS) -o sign sign.o $(PEX_LIBS) $(LIB) $(EX_LIBS) + +verify: verify.o example.o lib + $(CC) $(CFLAGS) -o verify verify.o $(PEX_LIBS) example.o $(LIB) $(EX_LIBS) + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff enc dec sign verify + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +pk7_asn1.o: ../../e_os.h ../../include/openssl/aes.h +pk7_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +pk7_asn1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk7_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk7_asn1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk7_asn1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_asn1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk7_asn1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk7_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk7_asn1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk7_asn1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk7_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk7_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_asn1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pk7_asn1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pk7_asn1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pk7_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pk7_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pk7_asn1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pk7_asn1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pk7_asn1.o: ../cryptlib.h pk7_asn1.c +pk7_attr.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +pk7_attr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk7_attr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk7_attr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk7_attr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_attr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk7_attr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk7_attr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk7_attr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk7_attr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk7_attr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk7_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_attr.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pk7_attr.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pk7_attr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pk7_attr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pk7_attr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pk7_attr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pk7_attr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pk7_attr.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pk7_attr.o: pk7_attr.c +pk7_doit.o: ../../e_os.h ../../include/openssl/aes.h +pk7_doit.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_doit.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_doit.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_doit.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +pk7_doit.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_doit.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_doit.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk7_doit.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk7_doit.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk7_doit.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk7_doit.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk7_doit.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk7_doit.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_doit.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pk7_doit.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pk7_doit.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pk7_doit.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pk7_doit.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pk7_doit.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pk7_doit.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pk7_doit.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +pk7_doit.o: ../cryptlib.h pk7_doit.c +pk7_lib.o: ../../e_os.h ../../include/openssl/aes.h +pk7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pk7_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pk7_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pk7_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pk7_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pk7_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pk7_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pk7_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pk7_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +pk7_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +pk7_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pk7_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pk7_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pk7_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pk7_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pk7_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pk7_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pk7_lib.c +pk7_mime.o: ../../e_os.h ../../include/openssl/aes.h +pk7_mime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_mime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_mime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_mime.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pk7_mime.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pk7_mime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pk7_mime.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pk7_mime.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pk7_mime.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pk7_mime.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pk7_mime.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pk7_mime.o: ../../include/openssl/opensslconf.h +pk7_mime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_mime.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pk7_mime.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pk7_mime.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pk7_mime.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pk7_mime.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pk7_mime.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pk7_mime.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pk7_mime.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pk7_mime.c +pk7_smime.o: ../../e_os.h ../../include/openssl/aes.h +pk7_smime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_smime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_smime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_smime.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +pk7_smime.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_smime.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_smime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk7_smime.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk7_smime.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk7_smime.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk7_smime.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk7_smime.o: ../../include/openssl/objects.h +pk7_smime.o: ../../include/openssl/opensslconf.h +pk7_smime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_smime.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pk7_smime.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pk7_smime.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pk7_smime.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pk7_smime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pk7_smime.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pk7_smime.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pk7_smime.o: ../../include/openssl/x509v3.h ../cryptlib.h pk7_smime.c +pkcs7err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pkcs7err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +pkcs7err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pkcs7err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +pkcs7err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pkcs7err.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h +pkcs7err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pkcs7err.o: pkcs7err.c diff --git a/src/lib/libcrypto/rand/Makefile b/src/lib/libcrypto/rand/Makefile new file mode 100644 index 0000000000..665eaa18e5 --- /dev/null +++ b/src/lib/libcrypto/rand/Makefile @@ -0,0 +1,196 @@ +# +# SSLeay/crypto/rand/Makefile +# + +DIR= rand +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= randtest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \ + rand_win.c rand_unix.c rand_os2.c +LIBOBJ=md_rand.o randfile.o rand_lib.o rand_err.o rand_egd.o \ + rand_win.o rand_unix.o rand_os2.o + +SRC= $(LIBSRC) + +EXHEADER= rand.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +md_rand.o: ../../e_os.h ../../include/openssl/aes.h +md_rand.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +md_rand.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +md_rand.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +md_rand.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +md_rand.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md_rand.o: ../../include/openssl/evp.h ../../include/openssl/fips.h +md_rand.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +md_rand.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +md_rand.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +md_rand.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +md_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +md_rand.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +md_rand.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +md_rand.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +md_rand.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +md_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +md_rand.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +md_rand.o: ../../include/openssl/ui_compat.h md_rand.c rand_lcl.h +rand_egd.o: ../../include/openssl/buffer.h ../../include/openssl/e_os2.h +rand_egd.o: ../../include/openssl/opensslconf.h +rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +rand_egd.o: rand_egd.c +rand_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +rand_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rand_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rand_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_err.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +rand_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_err.o: rand_err.c +rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h +rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rand_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rand_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +rand_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +rand_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +rand_lib.o: ../../include/openssl/err.h ../../include/openssl/fips.h +rand_lib.o: ../../include/openssl/fips_rand.h ../../include/openssl/lhash.h +rand_lib.o: ../../include/openssl/opensslconf.h +rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rand_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +rand_lib.o: ../../include/openssl/ui_compat.h ../cryptlib.h rand_lib.c +rand_os2.o: ../../e_os.h ../../include/openssl/aes.h +rand_os2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rand_os2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rand_os2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rand_os2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rand_os2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rand_os2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rand_os2.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rand_os2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rand_os2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rand_os2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rand_os2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rand_os2.o: ../../include/openssl/opensslconf.h +rand_os2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_os2.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +rand_os2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rand_os2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rand_os2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rand_os2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_os2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rand_os2.o: ../cryptlib.h rand_lcl.h rand_os2.c +rand_unix.o: ../../e_os.h ../../include/openssl/aes.h +rand_unix.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rand_unix.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rand_unix.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rand_unix.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rand_unix.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rand_unix.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rand_unix.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rand_unix.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rand_unix.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rand_unix.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rand_unix.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rand_unix.o: ../../include/openssl/opensslconf.h +rand_unix.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_unix.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +rand_unix.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rand_unix.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rand_unix.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rand_unix.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_unix.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rand_unix.o: ../cryptlib.h rand_lcl.h rand_unix.c +rand_win.o: ../../e_os.h ../../include/openssl/aes.h +rand_win.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rand_win.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rand_win.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rand_win.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rand_win.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rand_win.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rand_win.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rand_win.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rand_win.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rand_win.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rand_win.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rand_win.o: ../../include/openssl/opensslconf.h +rand_win.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_win.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +rand_win.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rand_win.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rand_win.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rand_win.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_win.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rand_win.o: ../cryptlib.h rand_lcl.h rand_win.c +randfile.o: ../../e_os.h ../../include/openssl/buffer.h +randfile.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +randfile.o: ../../include/openssl/opensslconf.h +randfile.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +randfile.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +randfile.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +randfile.o: randfile.c diff --git a/src/lib/libcrypto/rand/md_rand.c b/src/lib/libcrypto/rand/md_rand.c index eeffc0df4c..c84968df88 100644 --- a/src/lib/libcrypto/rand/md_rand.c +++ b/src/lib/libcrypto/rand/md_rand.c @@ -126,6 +126,7 @@ #include #include +#include #ifdef BN_DEBUG # define PREDICT @@ -332,6 +333,14 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) #endif int do_stir_pool = 0; +#ifdef OPENSSL_FIPS + if(FIPS_mode()) + { + FIPSerr(FIPS_F_SSLEAY_RAND_BYTES,FIPS_R_NON_FIPS_METHOD); + return 0; + } +#endif + #ifdef PREDICT if (rand_predictable) { diff --git a/src/lib/libcrypto/rand/rand_egd.c b/src/lib/libcrypto/rand/rand_egd.c index 6f742900a0..cd666abfcb 100644 --- a/src/lib/libcrypto/rand/rand_egd.c +++ b/src/lib/libcrypto/rand/rand_egd.c @@ -95,7 +95,7 @@ * RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255. */ -#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) +#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_VOS) int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) { return(-1); @@ -216,7 +216,9 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) while (numbytes != 1) { num = read(fd, egdbuf, 1); - if (num >= 0) + if (num == 0) + goto err; /* descriptor closed */ + else if (num > 0) numbytes += num; else { @@ -246,7 +248,9 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) while (numbytes != egdbuf[0]) { num = read(fd, retrievebuf + numbytes, egdbuf[0] - numbytes); - if (num >= 0) + if (num == 0) + goto err; /* descriptor closed */ + else if (num > 0) numbytes += num; else { diff --git a/src/lib/libcrypto/rand/rand_unix.c b/src/lib/libcrypto/rand/rand_unix.c index 0599719dd1..9376554fae 100644 --- a/src/lib/libcrypto/rand/rand_unix.c +++ b/src/lib/libcrypto/rand/rand_unix.c @@ -120,6 +120,7 @@ #include #include #include +#include #include #include #include @@ -151,9 +152,9 @@ int RAND_poll(void) int n = 0; #endif #ifdef DEVRANDOM - static const char *randomfiles[] = { DEVRANDOM, NULL }; - const char **randomfile = NULL; - int fd; + static const char *randomfiles[] = { DEVRANDOM }; + struct stat randomstats[sizeof(randomfiles)/sizeof(randomfiles[0])]; + int fd,i; #endif #ifdef DEVRANDOM_EGD static const char *egdsockets[] = { DEVRANDOM_EGD, NULL }; @@ -161,26 +162,42 @@ int RAND_poll(void) #endif #ifdef DEVRANDOM + memset(randomstats,0,sizeof(randomstats)); /* Use a random entropy pool device. Linux, FreeBSD and OpenBSD * have this. Use /dev/urandom if you can as /dev/random may block * if it runs out of random entries. */ - for (randomfile = randomfiles; *randomfile && n < ENTROPY_NEEDED; randomfile++) + for (i=0; i= 0) { struct timeval t = { 0, 10*1000 }; /* Spend 10ms on each file. */ - int r; + int r,j; fd_set fset; + struct stat *st=&randomstats[i]; + + /* Avoid using same input... Used to be O_NOFOLLOW + * above, but it's not universally appropriate... */ + if (fstat(fd,st) != 0) { close(fd); continue; } + for (j=0;jst_ino && + randomstats[j].st_dev==st->st_dev) + break; + } + if (jlength) + while (pitems_data->length + && (total_length + pitems_data->length <= 256)) { pitem->length = pitems_data->length; pitem->code = pitems_data->code; - pitem->buffer = (long *)data_buffer[total_length]; + pitem->buffer = (long *)&data_buffer[total_length]; pitem->retlen = 0; total_length += pitems_data->length; pitems_data++; diff --git a/src/lib/libcrypto/rand/rand_win.c b/src/lib/libcrypto/rand/rand_win.c index 3584842224..30c69161ef 100644 --- a/src/lib/libcrypto/rand/rand_win.c +++ b/src/lib/libcrypto/rand/rand_win.c @@ -125,7 +125,7 @@ * http://developer.intel.com/design/security/rng/redist_license.htm */ #define PROV_INTEL_SEC 22 -#define INTEL_DEF_PROV TEXT("Intel Hardware Cryptographic Service Provider") +#define INTEL_DEF_PROV L"Intel Hardware Cryptographic Service Provider" static void readtimer(void); static void readscreen(void); @@ -152,7 +152,7 @@ typedef struct tagCURSORINFO #define CURSOR_SHOWING 0x00000001 #endif /* CURSOR_SHOWING */ -typedef BOOL (WINAPI *CRYPTACQUIRECONTEXT)(HCRYPTPROV *, LPCTSTR, LPCTSTR, +typedef BOOL (WINAPI *CRYPTACQUIRECONTEXTW)(HCRYPTPROV *, LPCWSTR, LPCWSTR, DWORD, DWORD); typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV, DWORD, BYTE *); typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV, DWORD); @@ -194,7 +194,7 @@ int RAND_poll(void) HWND h; HMODULE advapi, kernel, user, netapi; - CRYPTACQUIRECONTEXT acquire = 0; + CRYPTACQUIRECONTEXTW acquire = 0; CRYPTGENRANDOM gen = 0; CRYPTRELEASECONTEXT release = 0; #if 1 /* There was previously a problem with NETSTATGET. Currently, this @@ -213,6 +213,9 @@ int RAND_poll(void) GetVersionEx( &osverinfo ) ; #if defined(OPENSSL_SYS_WINCE) && WCEPLATFORM!=MS_HPC_PRO +#ifndef CryptAcquireContext +#define CryptAcquireContext CryptAcquireContextW +#endif /* poll the CryptoAPI PRNG */ /* The CryptoAPI returns sizeof(buf) bytes of randomness */ if (CryptAcquireContext(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) @@ -223,21 +226,35 @@ int RAND_poll(void) } #endif +#ifndef OPENSSL_SYS_WINCE + /* + * None of below libraries are present on Windows CE, which is + * why we #ifndef the whole section. This also excuses us from + * handling the GetProcAddress issue. The trouble is that in + * real Win32 API GetProcAddress is available in ANSI flavor + * only. In WinCE on the other hand GetProcAddress is a macro + * most commonly defined as GetProcAddressW, which accepts + * Unicode argument. If we were to call GetProcAddress under + * WinCE, I'd recommend to either redefine GetProcAddress as + * GetProcAddressA (there seem to be one in common CE spec) or + * implement own shim routine, which would accept ANSI argument + * and expand it to Unicode. + */ + /* load functions dynamically - not available on all systems */ advapi = LoadLibrary(TEXT("ADVAPI32.DLL")); kernel = LoadLibrary(TEXT("KERNEL32.DLL")); user = LoadLibrary(TEXT("USER32.DLL")); netapi = LoadLibrary(TEXT("NETAPI32.DLL")); -#ifndef OPENSSL_SYS_WINCE #if 1 /* There was previously a problem with NETSTATGET. Currently, this * section is still experimental, but if all goes well, this conditional * will be removed */ if (netapi) { - netstatget = (NETSTATGET) GetProcAddress(netapi,TEXT("NetStatisticsGet")); - netfree = (NETFREE) GetProcAddress(netapi,TEXT("NetApiBufferFree")); + netstatget = (NETSTATGET) GetProcAddress(netapi,"NetStatisticsGet"); + netfree = (NETFREE) GetProcAddress(netapi,"NetApiBufferFree"); } if (netstatget && netfree) @@ -264,9 +281,7 @@ int RAND_poll(void) if (netapi) FreeLibrary(netapi); #endif /* 1 */ -#endif /* !OPENSSL_SYS_WINCE */ - -#ifndef OPENSSL_SYS_WINCE + /* It appears like this can cause an exception deep within ADVAPI32.DLL * at random times on Windows 2000. Reported by Jeffrey Altman. * Only use it on NT. @@ -321,16 +336,20 @@ int RAND_poll(void) free(buf); } #endif -#endif /* !OPENSSL_SYS_WINCE */ if (advapi) { - acquire = (CRYPTACQUIRECONTEXT) GetProcAddress(advapi, - TEXT("CryptAcquireContextA")); + /* + * If it's available, then it's available in both ANSI + * and UNICODE flavors even in Win9x, documentation says. + * We favor Unicode... + */ + acquire = (CRYPTACQUIRECONTEXTW) GetProcAddress(advapi, + "CryptAcquireContextW"); gen = (CRYPTGENRANDOM) GetProcAddress(advapi, - TEXT("CryptGenRandom")); + "CryptGenRandom"); release = (CRYPTRELEASECONTEXT) GetProcAddress(advapi, - TEXT("CryptReleaseContext")); + "CryptReleaseContext"); } if (acquire && gen && release) @@ -367,26 +386,15 @@ int RAND_poll(void) if (advapi) FreeLibrary(advapi); - /* timer data */ - readtimer(); - - /* memory usage statistics */ - GlobalMemoryStatus(&m); - RAND_add(&m, sizeof(m), 1); - - /* process ID */ - w = GetCurrentProcessId(); - RAND_add(&w, sizeof(w), 1); - if (user) { GETCURSORINFO cursor; GETFOREGROUNDWINDOW win; GETQUEUESTATUS queue; - win = (GETFOREGROUNDWINDOW) GetProcAddress(user, TEXT("GetForegroundWindow")); - cursor = (GETCURSORINFO) GetProcAddress(user, TEXT("GetCursorInfo")); - queue = (GETQUEUESTATUS) GetProcAddress(user, TEXT("GetQueueStatus")); + win = (GETFOREGROUNDWINDOW) GetProcAddress(user, "GetForegroundWindow"); + cursor = (GETCURSORINFO) GetProcAddress(user, "GetCursorInfo"); + queue = (GETQUEUESTATUS) GetProcAddress(user, "GetQueueStatus"); if (win) { @@ -458,19 +466,19 @@ int RAND_poll(void) MODULEENTRY32 m; snap = (CREATETOOLHELP32SNAPSHOT) - GetProcAddress(kernel, TEXT("CreateToolhelp32Snapshot")); + GetProcAddress(kernel, "CreateToolhelp32Snapshot"); close_snap = (CLOSETOOLHELP32SNAPSHOT) - GetProcAddress(kernel, TEXT("CloseToolhelp32Snapshot")); - heap_first = (HEAP32FIRST) GetProcAddress(kernel, TEXT("Heap32First")); - heap_next = (HEAP32NEXT) GetProcAddress(kernel, TEXT("Heap32Next")); - heaplist_first = (HEAP32LIST) GetProcAddress(kernel, TEXT("Heap32ListFirst")); - heaplist_next = (HEAP32LIST) GetProcAddress(kernel, TEXT("Heap32ListNext")); - process_first = (PROCESS32) GetProcAddress(kernel, TEXT("Process32First")); - process_next = (PROCESS32) GetProcAddress(kernel, TEXT("Process32Next")); - thread_first = (THREAD32) GetProcAddress(kernel, TEXT("Thread32First")); - thread_next = (THREAD32) GetProcAddress(kernel, TEXT("Thread32Next")); - module_first = (MODULE32) GetProcAddress(kernel, TEXT("Module32First")); - module_next = (MODULE32) GetProcAddress(kernel, TEXT("Module32Next")); + GetProcAddress(kernel, "CloseToolhelp32Snapshot"); + heap_first = (HEAP32FIRST) GetProcAddress(kernel, "Heap32First"); + heap_next = (HEAP32NEXT) GetProcAddress(kernel, "Heap32Next"); + heaplist_first = (HEAP32LIST) GetProcAddress(kernel, "Heap32ListFirst"); + heaplist_next = (HEAP32LIST) GetProcAddress(kernel, "Heap32ListNext"); + process_first = (PROCESS32) GetProcAddress(kernel, "Process32First"); + process_next = (PROCESS32) GetProcAddress(kernel, "Process32Next"); + thread_first = (THREAD32) GetProcAddress(kernel, "Thread32First"); + thread_next = (THREAD32) GetProcAddress(kernel, "Thread32Next"); + module_first = (MODULE32) GetProcAddress(kernel, "Module32First"); + module_next = (MODULE32) GetProcAddress(kernel, "Module32Next"); if (snap && heap_first && heap_next && heaplist_first && heaplist_next && process_first && process_next && @@ -546,6 +554,18 @@ int RAND_poll(void) FreeLibrary(kernel); } +#endif /* !OPENSSL_SYS_WINCE */ + + /* timer data */ + readtimer(); + + /* memory usage statistics */ + GlobalMemoryStatus(&m); + RAND_add(&m, sizeof(m), 1); + + /* process ID */ + w = GetCurrentProcessId(); + RAND_add(&w, sizeof(w), 1); #if 0 printf("Exiting RAND_poll\n"); @@ -607,7 +627,7 @@ static void readtimer(void) DWORD w; LARGE_INTEGER l; static int have_perfc = 1; -#if defined(_MSC_VER) && !defined(OPENSSL_SYS_WINCE) +#if defined(_MSC_VER) && defined(_M_X86) static int have_tsc = 1; DWORD cyclecount; @@ -660,7 +680,7 @@ static void readtimer(void) static void readscreen(void) { -#ifndef OPENSSL_SYS_WINCE +#if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) HDC hScrDC; /* screen DC */ HDC hMemDC; /* memory DC */ HBITMAP hBitmap; /* handle for our bitmap */ diff --git a/src/lib/libcrypto/rc2/Makefile b/src/lib/libcrypto/rc2/Makefile new file mode 100644 index 0000000000..18edaca6c6 --- /dev/null +++ b/src/lib/libcrypto/rc2/Makefile @@ -0,0 +1,92 @@ +# +# SSLeay/crypto/rc2/Makefile +# + +DIR= rc2 +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=rc2test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c +LIBOBJ=rc2_ecb.o rc2_skey.o rc2_cbc.o rc2cfb64.o rc2ofb64.o + +SRC= $(LIBSRC) + +EXHEADER= rc2.h +HEADER= rc2_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rc2_cbc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h +rc2_cbc.o: rc2_cbc.c rc2_locl.h +rc2_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +rc2_ecb.o: ../../include/openssl/rc2.h rc2_ecb.c rc2_locl.h +rc2_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +rc2_skey.o: ../../include/openssl/opensslconf.h +rc2_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h +rc2_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rc2_skey.o: ../../include/openssl/symhacks.h rc2_locl.h rc2_skey.c +rc2cfb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h +rc2cfb64.o: rc2_locl.h rc2cfb64.c +rc2ofb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h +rc2ofb64.o: rc2_locl.h rc2ofb64.c diff --git a/src/lib/libcrypto/rc4/Makefile b/src/lib/libcrypto/rc4/Makefile new file mode 100644 index 0000000000..64e06924f4 --- /dev/null +++ b/src/lib/libcrypto/rc4/Makefile @@ -0,0 +1,123 @@ +# +# SSLeay/crypto/rc4/Makefile +# + +DIR= rc4 +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +RC4_ENC=rc4_enc.o +# or use +#RC4_ENC=asm/rx86-elf.o +#RC4_ENC=asm/rx86-out.o +#RC4_ENC=asm/rx86-sol.o +#RC4_ENC=asm/rx86bdsi.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=rc4test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=rc4_skey.c rc4_enc.c +LIBOBJ=rc4_skey.o $(RC4_ENC) + +SRC= $(LIBSRC) + +EXHEADER= rc4.h +HEADER= $(EXHEADER) rc4_locl.h + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > rx86-elf.s) + +# a.out +asm/rx86-out.o: asm/rx86unix.cpp + $(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o + +# bsdi +asm/rx86bsdi.o: asm/rx86unix.cpp + $(CPP) -DBSDI asm/rx86unix.cpp | sed 's/ :/:/' | as -o asm/rx86bsdi.o + +asm/rx86unix.cpp: asm/rc4-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp) + +asm/rc4-amd64.s: asm/rc4-amd64.pl; $(PERL) asm/rc4-amd64.pl $@ + +asm/rc4-ia64.s: asm/rc4-ia64.S + $(CC) $(CFLAGS) -E asm/rc4-ia64.S > $@ + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/rx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rc4_enc.o: ../../e_os.h ../../include/openssl/bio.h +rc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h +rc4_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rc4_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h rc4_enc.c rc4_locl.h +rc4_skey.o: ../../e_os.h ../../include/openssl/bio.h +rc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rc4_skey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h +rc4_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rc4_skey.o: ../../include/openssl/symhacks.h ../cryptlib.h rc4_locl.h +rc4_skey.o: rc4_skey.c diff --git a/src/lib/libcrypto/rc4/asm/rc4-ia64.S b/src/lib/libcrypto/rc4/asm/rc4-ia64.S new file mode 100644 index 0000000000..b517d2e88f --- /dev/null +++ b/src/lib/libcrypto/rc4/asm/rc4-ia64.S @@ -0,0 +1,157 @@ +// ==================================================================== +// Written by Andy Polyakov for the OpenSSL +// project. +// +// Rights for redistribution and usage in source and binary forms are +// granted according to the OpenSSL license. Warranty of any kind is +// disclaimed. +// ==================================================================== + +.ident "rc4-ia64.S, Version 1.1" +.ident "IA-64 ISA artwork by Andy Polyakov " + +// What's wrong with compiler generated code? Because of the nature of +// C language, compiler doesn't [dare to] reorder load and stores. But +// being memory-bound, RC4 should benefit from reorder [on in-order- +// execution core such as IA-64]. But what can we reorder? At the very +// least we can safely reorder references to key schedule in respect +// to input and output streams. Secondly, from the first [close] glance +// it appeared that it's possible to pull up some references to +// elements of the key schedule itself. Original rationale ["prior +// loads are not safe only for "degenerated" key schedule, when some +// elements equal to the same value"] was kind of sloppy. I should have +// formulated as it really was: if we assume that pulling up reference +// to key[x+1] is not safe, then it would mean that key schedule would +// "degenerate," which is never the case. The problem is that this +// holds true in respect to references to key[x], but not to key[y]. +// Legitimate "collisions" do occur within every 256^2 bytes window. +// Fortunately there're enough free instruction slots to keep prior +// reference to key[x+1], detect "collision" and compensate for it. +// All this without sacrificing a single clock cycle:-) +// Furthermore. In order to compress loop body to the minimum, I chose +// to deploy deposit instruction, which substitutes for the whole +// key->data+((x&255)<data[0]))). This unfortunately +// requires key->data to be aligned at sizeof(key->data) boundary. +// This is why you'll find "RC4_INT pad[512-256-2];" addenum to RC4_KEY +// and "d=(RC4_INT *)(((size_t)(d+255))&~(sizeof(key->data)-1));" in +// rc4_skey.c [and rc4_enc.c, where it's retained for debugging +// purposes]. Throughput is ~210MBps on 900MHz CPU, which is is >3x +// faster than gcc generated code and +30% - if compared to HP-UX C. +// Unrolling loop below should give >30% on top of that... + +.text +.explicit + +#if defined(_HPUX_SOURCE) && !defined(_LP64) +# define ADDP addp4 +#else +# define ADDP add +#endif + +#define SZ 4 // this is set to sizeof(RC4_INT) +// SZ==4 seems to be optimal. At least SZ==8 is not any faster, not for +// assembler implementation, while SZ==1 code is ~30% slower. +#if SZ==1 // RC4_INT is unsigned char +# define LDKEY ld1 +# define STKEY st1 +# define OFF 0 +#elif SZ==4 // RC4_INT is unsigned int +# define LDKEY ld4 +# define STKEY st4 +# define OFF 2 +#elif SZ==8 // RC4_INT is unsigned long +# define LDKEY ld8 +# define STKEY st8 +# define OFF 3 +#endif + +out=r8; // [expanded] output pointer +inp=r9; // [expanded] output pointer +prsave=r10; +key=r28; // [expanded] pointer to RC4_KEY +ksch=r29; // (key->data+255)[&~(sizeof(key->data)-1)] +xx=r30; +yy=r31; + +// void RC4(RC4_KEY *key,size_t len,const void *inp,void *out); +.global RC4# +.proc RC4# +.align 32 +.skip 16 +RC4: + .prologue + .fframe 0 + .save ar.pfs,r2 + .save ar.lc,r3 + .save pr,prsave +{ .mii; alloc r2=ar.pfs,4,12,0,16 + mov prsave=pr + ADDP key=0,in0 };; +{ .mib; cmp.eq p6,p0=0,in1 // len==0? + mov r3=ar.lc +(p6) br.ret.spnt.many b0 };; // emergency exit + + .body + .rotr dat[4],key_x[4],tx[2],rnd[2],key_y[2],ty[1]; + +{ .mib; LDKEY xx=[key],SZ // load key->x + add in1=-1,in1 // adjust len for loop counter + nop.b 0 } +{ .mib; ADDP inp=0,in2 + ADDP out=0,in3 + brp.loop.imp .Ltop,.Lexit-16 };; +{ .mmi; LDKEY yy=[key] // load key->y + add ksch=(255+1)*SZ,key // as ksch will be used with + // deposit instruction only, + // I don't have to &~255... + mov ar.lc=in1 } +{ .mmi; mov key_y[1]=r0 // guarantee inequality + // in first iteration + add xx=1,xx + mov pr.rot=1<<16 };; +{ .mii; nop.m 0 + dep key_x[1]=xx,ksch,OFF,8 + mov ar.ec=3 };; // note that epilogue counter + // is off by 1. I compensate + // for this at exit... +.Ltop: +// The loop is scheduled for 3*(n+2) spin-rate on Itanium 2, which +// theoretically gives asymptotic performance of clock frequency +// divided by 3 bytes per seconds, or 500MBps on 1.5GHz CPU. Measured +// performance however is distinctly lower than 1/4:-( The culplrit +// seems to be *(out++)=dat, which inadvertently splits the bundle, +// even though there is M-port available... Unrolling is due... +// Unrolled loop should collect output with variable shift instruction +// in order to avoid starvation for integer shifter... It should be +// possible to get pretty close to theoretical peak... +{ .mmi; (p16) LDKEY tx[0]=[key_x[1]] // tx=key[xx] + (p17) LDKEY ty[0]=[key_y[1]] // ty=key[yy] + (p18) dep rnd[1]=rnd[1],ksch,OFF,8} // &key[(tx+ty)&255] +{ .mmi; (p19) st1 [out]=dat[3],1 // *(out++)=dat + (p16) add xx=1,xx // x++ + (p16) cmp.ne.unc p20,p21=key_x[1],key_y[1] };; +{ .mmi; (p18) LDKEY rnd[1]=[rnd[1]] // rnd=key[(tx+ty)&255] + (p16) ld1 dat[0]=[inp],1 // dat=*(inp++) + (p16) dep key_x[0]=xx,ksch,OFF,8 } // &key[xx&255] +.pred.rel "mutex",p20,p21 +{ .mmi; (p21) add yy=yy,tx[1] // (p16) + (p20) add yy=yy,tx[0] // (p16) y+=tx + (p21) mov tx[0]=tx[1] };; // (p16) +{ .mmi; (p17) STKEY [key_y[1]]=tx[1] // key[yy]=tx + (p17) STKEY [key_x[2]]=ty[0] // key[xx]=ty + (p16) dep key_y[0]=yy,ksch,OFF,8 } // &key[yy&255] +{ .mmb; (p17) add rnd[0]=tx[1],ty[0] // tx+=ty + (p18) xor dat[2]=dat[2],rnd[1] // dat^=rnd + br.ctop.sptk .Ltop };; +.Lexit: +{ .mib; STKEY [key]=yy,-SZ // save key->y + mov pr=prsave,0x1ffff + nop.b 0 } +{ .mib; st1 [out]=dat[3],1 // compensate for truncated + // epilogue counter + add xx=-1,xx + nop.b 0 };; +{ .mib; STKEY [key]=xx // save key->x + mov ar.lc=r3 + br.ret.sptk.many b0 };; +.endp RC4# diff --git a/src/lib/libcrypto/rc5/Makefile b/src/lib/libcrypto/rc5/Makefile new file mode 100644 index 0000000000..3a8d309b29 --- /dev/null +++ b/src/lib/libcrypto/rc5/Makefile @@ -0,0 +1,110 @@ +# +# SSLeay/crypto/rc5/Makefile +# + +DIR= rc5 +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +RC5_ENC= rc5_enc.o +# or use +#DES_ENC= r586-elf.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=rc5test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c +LIBOBJ=rc5_skey.o rc5_ecb.o $(RC5_ENC) rc5cfb64.o rc5ofb64.o + +SRC= $(LIBSRC) + +EXHEADER= rc5.h +HEADER= rc5_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/r586-elf.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) rc5-586.pl elf $(CFLAGS) > r586-elf.s) + +# a.out +asm/r586-out.o: asm/r586unix.cpp + $(CPP) -DOUT asm/r586unix.cpp | as -o asm/r586-out.o + +# bsdi +asm/r586bsdi.o: asm/r586unix.cpp + $(CPP) -DBSDI asm/r586unix.cpp | sed 's/ :/:/' | as -o asm/r586bsdi.o + +asm/r586unix.cpp: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) rc5-586.pl cpp >r586unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/r586unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rc5_ecb.o: ../../include/openssl/opensslv.h ../../include/openssl/rc5.h +rc5_ecb.o: rc5_ecb.c rc5_locl.h +rc5_enc.o: ../../include/openssl/rc5.h rc5_enc.c rc5_locl.h +rc5_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +rc5_skey.o: ../../include/openssl/opensslconf.h +rc5_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc5.h +rc5_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rc5_skey.o: ../../include/openssl/symhacks.h rc5_locl.h rc5_skey.c +rc5cfb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5cfb64.c +rc5ofb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5ofb64.c diff --git a/src/lib/libcrypto/rc5/rc5.h b/src/lib/libcrypto/rc5/rc5.h index 4adfd2db5a..aa3f26920b 100644 --- a/src/lib/libcrypto/rc5/rc5.h +++ b/src/lib/libcrypto/rc5/rc5.h @@ -92,7 +92,10 @@ typedef struct rc5_key_st RC5_32_INT data[2*(RC5_16_ROUNDS+1)]; } RC5_32_KEY; - +#ifdef OPENSSL_FIPS +void private_RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, + int rounds); +#endif void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, int rounds); void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key, diff --git a/src/lib/libcrypto/ripemd/Makefile b/src/lib/libcrypto/ripemd/Makefile new file mode 100644 index 0000000000..dc086e3434 --- /dev/null +++ b/src/lib/libcrypto/ripemd/Makefile @@ -0,0 +1,111 @@ +# +# SSLeay/crypto/ripemd/Makefile +# + +DIR= ripemd +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +RIP_ASM_OBJ= + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=rmdtest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=rmd_dgst.c rmd_one.c +LIBOBJ=rmd_dgst.o rmd_one.o $(RMD160_ASM_OBJ) + +SRC= $(LIBSRC) + +EXHEADER= ripemd.h +HEADER= rmd_locl.h rmdconst.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/rm86-elf.s: asm/rmd-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rmd-586.pl elf $(CFLAGS) > rm86-elf.s) + +# a.out +asm/rm86-out.o: asm/rm86unix.cpp + $(CPP) -DOUT asm/rm86unix.cpp | as -o asm/rm86-out.o + +# bsdi +asm/rm86bsdi.o: asm/rm86unix.cpp + $(CPP) -DBSDI asm/rm86unix.cpp | sed 's/ :/:/' | as -o asm/rm86bsdi.o + +asm/rm86unix.cpp: asm/rmd-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rmd-586.pl cpp >rm86unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/rm86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rmd_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +rmd_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rmd_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +rmd_dgst.o: ../../include/openssl/opensslconf.h +rmd_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ripemd.h +rmd_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rmd_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h rmd_dgst.c +rmd_dgst.o: rmd_locl.h rmdconst.h +rmd_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +rmd_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +rmd_one.o: ../../include/openssl/ripemd.h ../../include/openssl/safestack.h +rmd_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rmd_one.o: rmd_one.c diff --git a/src/lib/libcrypto/rsa/Makefile b/src/lib/libcrypto/rsa/Makefile new file mode 100644 index 0000000000..5748b0d3d0 --- /dev/null +++ b/src/lib/libcrypto/rsa/Makefile @@ -0,0 +1,239 @@ +# +# SSLeay/crypto/rsa/Makefile +# + +DIR= rsa +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=rsa_test.c +APPS= + +LIB=$(TOP)/libcrypto.a +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 rsa_oaep.c rsa_chk.c rsa_null.c \ + rsa_asn1.c +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 rsa_oaep.o rsa_chk.o rsa_null.o \ + rsa_asn1.o + +SRC= $(LIBSRC) + +EXHEADER= rsa.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +rsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +rsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +rsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +rsa_asn1.o: ../../include/openssl/opensslconf.h +rsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_asn1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_asn1.o: ../cryptlib.h rsa_asn1.c +rsa_chk.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_chk.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +rsa_chk.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_chk.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_chk.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_chk.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_chk.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_chk.o: rsa_chk.c +rsa_eay.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_eay.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_eay.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_eay.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_eay.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_eay.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_eay.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_eay.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_eay.c +rsa_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +rsa_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_err.o: rsa_err.c +rsa_gen.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_gen.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_gen.o: ../cryptlib.h rsa_gen.c +rsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +rsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +rsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +rsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +rsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_lib.o: ../../include/openssl/ui.h ../cryptlib.h rsa_lib.c +rsa_none.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_none.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_none.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_none.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_none.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_none.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_none.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_none.c +rsa_null.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_null.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_null.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_null.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_null.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_null.c +rsa_oaep.o: ../../e_os.h ../../include/openssl/aes.h +rsa_oaep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_oaep.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_oaep.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_oaep.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_oaep.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_oaep.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rsa_oaep.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rsa_oaep.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rsa_oaep.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rsa_oaep.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rsa_oaep.o: ../../include/openssl/opensslconf.h +rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_oaep.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +rsa_oaep.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rsa_oaep.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rsa_oaep.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rsa_oaep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_oaep.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rsa_oaep.o: ../cryptlib.h rsa_oaep.c +rsa_pk1.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_pk1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_pk1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_pk1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_pk1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_pk1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_pk1.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_pk1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pk1.c +rsa_saos.o: ../../e_os.h ../../include/openssl/aes.h +rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_saos.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_saos.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_saos.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_saos.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rsa_saos.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rsa_saos.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rsa_saos.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rsa_saos.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rsa_saos.o: ../../include/openssl/opensslconf.h +rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_saos.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +rsa_saos.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rsa_saos.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rsa_saos.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rsa_saos.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_saos.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rsa_saos.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +rsa_saos.o: ../cryptlib.h rsa_saos.c +rsa_sign.o: ../../e_os.h ../../include/openssl/aes.h +rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rsa_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rsa_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rsa_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rsa_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rsa_sign.o: ../../include/openssl/opensslconf.h +rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +rsa_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rsa_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rsa_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +rsa_sign.o: ../cryptlib.h rsa_sign.c +rsa_ssl.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_ssl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_ssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_ssl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_ssl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_ssl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_ssl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_ssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_ssl.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_ssl.c diff --git a/src/lib/libcrypto/sha/Makefile b/src/lib/libcrypto/sha/Makefile new file mode 100644 index 0000000000..0426786aa0 --- /dev/null +++ b/src/lib/libcrypto/sha/Makefile @@ -0,0 +1,127 @@ +# +# SSLeay/crypto/sha/Makefile +# + +DIR= sha +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +SHA1_ASM_OBJ= + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=shatest.c sha1test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c +LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA1_ASM_OBJ) + +SRC= $(LIBSRC) + +EXHEADER= sha.h +HEADER= sha_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > sx86-elf.s) + +# a.out +asm/sx86-out.o: asm/sx86unix.cpp + $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o + +# bsdi +asm/sx86bsdi.o: asm/sx86unix.cpp + $(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o + +asm/sx86unix.cpp: asm/sha1-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp) + +asm/sha1-ia64.s: asm/sha1-ia64.pl + (cd asm; $(PERL) sha1-ia64.pl $(CFLAGS) ) > $@ + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/sx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +sha1_one.o: ../../include/openssl/opensslconf.h +sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +sha1_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +sha1_one.o: ../../include/openssl/symhacks.h sha1_one.c +sha1dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +sha1dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +sha1dgst.o: ../../include/openssl/opensslconf.h +sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +sha1dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +sha1dgst.o: ../../include/openssl/symhacks.h ../md32_common.h sha1dgst.c +sha1dgst.o: sha_locl.h +sha_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +sha_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +sha_dgst.o: ../../include/openssl/opensslconf.h +sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +sha_dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +sha_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h sha_dgst.c +sha_dgst.o: sha_locl.h +sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +sha_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +sha_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +sha_one.o: sha_one.c diff --git a/src/lib/libcrypto/sha/shatest.c b/src/lib/libcrypto/sha/shatest.c index 5d2b1d3b1a..ff702aa53e 100644 --- a/src/lib/libcrypto/sha/shatest.c +++ b/src/lib/libcrypto/sha/shatest.c @@ -62,10 +62,10 @@ #include "../e_os.h" -#ifdef OPENSSL_NO_SHA +#if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA0) int main(int argc, char *argv[]) { - printf("No SHA support\n"); + printf("No SHA0 support\n"); return(0); } #else diff --git a/src/lib/libcrypto/stack/Makefile b/src/lib/libcrypto/stack/Makefile new file mode 100644 index 0000000000..4d5199a000 --- /dev/null +++ b/src/lib/libcrypto/stack/Makefile @@ -0,0 +1,86 @@ +# +# SSLeay/crypto/stack/Makefile +# + +DIR= stack +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=stack.c +LIBOBJ=stack.o + +SRC= $(LIBSRC) + +EXHEADER= stack.h safestack.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +stack.o: ../../e_os.h ../../include/openssl/bio.h +stack.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +stack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +stack.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +stack.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +stack.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +stack.o: ../cryptlib.h stack.c diff --git a/src/lib/libcrypto/txt_db/Makefile b/src/lib/libcrypto/txt_db/Makefile new file mode 100644 index 0000000000..f91a08f006 --- /dev/null +++ b/src/lib/libcrypto/txt_db/Makefile @@ -0,0 +1,86 @@ +# +# SSLeay/crypto/txt_db/Makefile +# + +DIR= txt_db +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=txt_db.c +LIBOBJ=txt_db.o + +SRC= $(LIBSRC) + +EXHEADER= txt_db.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +txt_db.o: ../../e_os.h ../../include/openssl/bio.h +txt_db.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +txt_db.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +txt_db.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +txt_db.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +txt_db.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +txt_db.o: ../../include/openssl/txt_db.h ../cryptlib.h txt_db.c diff --git a/src/lib/libcrypto/ui/Makefile b/src/lib/libcrypto/ui/Makefile new file mode 100644 index 0000000000..fcb2a66a39 --- /dev/null +++ b/src/lib/libcrypto/ui/Makefile @@ -0,0 +1,115 @@ +# +# OpenSSL/crypto/ui/Makefile +# + +DIR= ui +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +#TEST= uitest.c +TEST= +APPS= + +COMPATSRC= ui_compat.c +COMPATOBJ= ui_compat.o + +LIB=$(TOP)/libcrypto.a +LIBSRC= ui_err.c ui_lib.c ui_openssl.c ui_util.c $(COMPATSRC) +LIBOBJ= ui_err.o ui_lib.o ui_openssl.o ui_util.o $(COMPATOBJ) + +SRC= $(LIBSRC) + +EXHEADER= ui.h ui_compat.h +HEADER= $(EXHEADER) ui_locl.h + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +ui_compat.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ui_compat.o: ../../include/openssl/opensslconf.h +ui_compat.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ui_compat.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ui_compat.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ui_compat.o: ui_compat.c +ui_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +ui_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ui_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ui_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ui_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ui_err.o: ../../include/openssl/ui.h ui_err.c +ui_lib.o: ../../e_os.h ../../include/openssl/bio.h +ui_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +ui_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ui_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ui_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ui_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ui_lib.o: ../../include/openssl/ui.h ../cryptlib.h ui_lib.c ui_locl.h +ui_openssl.o: ../../e_os.h ../../include/openssl/bio.h +ui_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +ui_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ui_openssl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ui_openssl.o: ../../include/openssl/opensslv.h +ui_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ui_openssl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ui_openssl.o: ../cryptlib.h ui_locl.h ui_openssl.c +ui_util.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ui_util.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +ui_util.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ui_util.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ui_util.o: ui_util.c diff --git a/src/lib/libcrypto/util/cygwin.sh b/src/lib/libcrypto/util/cygwin.sh index 930f766b4f..7f791d47f4 100644 --- a/src/lib/libcrypto/util/cygwin.sh +++ b/src/lib/libcrypto/util/cygwin.sh @@ -21,11 +21,11 @@ function cleanup() function get_openssl_version() { - eval `grep '^VERSION=' Makefile.ssl` + eval `grep '^VERSION=' Makefile` if [ -z "${VERSION}" ] then - echo "Error: Couldn't retrieve OpenSSL version from Makefile.ssl." - echo " Check value of variable VERSION in Makefile.ssl." + echo "Error: Couldn't retrieve OpenSSL version from Makefile." + echo " Check value of variable VERSION in Makefile." exit 1 fi } @@ -39,7 +39,7 @@ function base_install() function doc_install() { - DOC_DIR=${INSTALL_PREFIX}/usr/doc/openssl + DOC_DIR=${INSTALL_PREFIX}/usr/share/doc/openssl mkdir -p ${DOC_DIR} cp CHANGES CHANGES.SSLeay INSTALL LICENSE NEWS README ${DOC_DIR} @@ -49,7 +49,7 @@ function doc_install() function create_cygwin_readme() { - README_DIR=${INSTALL_PREFIX}/usr/doc/Cygwin + README_DIR=${INSTALL_PREFIX}/usr/share/doc/Cygwin README_FILE=${README_DIR}/openssl-${VERSION}.README mkdir -p ${README_DIR} @@ -112,8 +112,8 @@ cd ${INSTALL_PREFIX} strip usr/bin/*.exe usr/bin/*.dll # Runtime package -find etc usr/bin usr/doc usr/ssl/certs usr/ssl/man/man[157] usr/ssl/misc \ - usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d | +find etc usr/bin usr/share/doc usr/ssl/certs usr/ssl/man/man[157] \ + usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - # Development package find usr/include usr/lib usr/ssl/man/man3 -empty -o \! -type d | diff --git a/src/lib/libcrypto/util/domd b/src/lib/libcrypto/util/domd index 49310bbdd1..5610521f0b 100644 --- a/src/lib/libcrypto/util/domd +++ b/src/lib/libcrypto/util/domd @@ -11,7 +11,7 @@ if [ "$1" = "-MD" ]; then fi if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi -cp Makefile.ssl Makefile.save +cp Makefile Makefile.save # fake the presence of Kerberos touch $TOP/krb5.h if [ "$MAKEDEPEND" = "gcc" ]; then @@ -20,15 +20,15 @@ if [ "$MAKEDEPEND" = "gcc" ]; then if [ "$1" != "--" ]; then args="$args $1"; fi shift done - sed -e '/^# DO NOT DELETE.*/,$d' < Makefile.ssl > Makefile.tmp + sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp gcc -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new rm -f Makefile.tmp else - ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile.ssl $@ - ${PERL} $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new + ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile $@ + ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new fi -mv Makefile.new Makefile.ssl +mv Makefile.new Makefile # unfake the presence of Kerberos rm $TOP/krb5.h diff --git a/src/lib/libcrypto/util/extract-names.pl b/src/lib/libcrypto/util/extract-names.pl index 744a8e2324..35bd6ed843 100644 --- a/src/lib/libcrypto/util/extract-names.pl +++ b/src/lib/libcrypto/util/extract-names.pl @@ -9,9 +9,11 @@ while() { } elsif ($name) { if (/ - /) { s/ - .*//; - s/,[ \t]+/,/g; - s/^[ \t]+//g; - s/[ \t]+$//g; + s/,\s+/,/g; + s/\s+,/,/g; + s/^\s+//g; + s/\s+$//g; + s/\s/_/g; push @words, split ','; } } diff --git a/src/lib/libcrypto/util/fixNT.sh b/src/lib/libcrypto/util/fixNT.sh index ce4f19299b..ab9e766b86 100644 --- a/src/lib/libcrypto/util/fixNT.sh +++ b/src/lib/libcrypto/util/fixNT.sh @@ -3,12 +3,12 @@ # clean up the mess that NT makes of my source tree # -if [ -f makefile.ssl -a ! -f Makefile.ssl ]; then - /bin/mv makefile.ssl Makefile.ssl +if [ -f makefile -a ! -f Makefile ]; then + /bin/mv makefile Makefile fi chmod +x Configure util/* echo cleaning /bin/rm -f `find . -name '*.$$$' -print` 2>/dev/null >/dev/null echo 'removing those damn ^M' perl -pi -e 's/\015//' `find . -type 'f' -print |grep -v '.obj$' |grep -v '.der$' |grep -v '.gz'` -make -f Makefile.ssl links +make -f Makefile links diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num index 203c7713e7..56fb7446e0 100644 --- a/src/lib/libcrypto/util/libeay.num +++ b/src/lib/libcrypto/util/libeay.num @@ -284,20 +284,20 @@ EVP_add_alias 291 NOEXIST::FUNCTION: EVP_add_cipher 292 EXIST::FUNCTION: EVP_add_digest 293 EXIST::FUNCTION: EVP_bf_cbc 294 EXIST::FUNCTION:BF -EVP_bf_cfb 295 EXIST::FUNCTION:BF +EVP_bf_cfb64 295 EXIST::FUNCTION:BF EVP_bf_ecb 296 EXIST::FUNCTION:BF EVP_bf_ofb 297 EXIST::FUNCTION:BF EVP_cleanup 298 EXIST::FUNCTION: EVP_des_cbc 299 EXIST::FUNCTION:DES -EVP_des_cfb 300 EXIST::FUNCTION:DES +EVP_des_cfb64 300 EXIST::FUNCTION:DES EVP_des_ecb 301 EXIST::FUNCTION:DES EVP_des_ede 302 EXIST::FUNCTION:DES EVP_des_ede3 303 EXIST::FUNCTION:DES EVP_des_ede3_cbc 304 EXIST::FUNCTION:DES -EVP_des_ede3_cfb 305 EXIST::FUNCTION:DES +EVP_des_ede3_cfb64 305 EXIST::FUNCTION:DES EVP_des_ede3_ofb 306 EXIST::FUNCTION:DES EVP_des_ede_cbc 307 EXIST::FUNCTION:DES -EVP_des_ede_cfb 308 EXIST::FUNCTION:DES +EVP_des_ede_cfb64 308 EXIST::FUNCTION:DES EVP_des_ede_ofb 309 EXIST::FUNCTION:DES EVP_des_ofb 310 EXIST::FUNCTION:DES EVP_desx_cbc 311 EXIST::FUNCTION:DES @@ -308,14 +308,14 @@ EVP_get_cipherbyname 315 EXIST::FUNCTION: EVP_get_digestbyname 316 EXIST::FUNCTION: EVP_get_pw_prompt 317 EXIST::FUNCTION: EVP_idea_cbc 318 EXIST::FUNCTION:IDEA -EVP_idea_cfb 319 EXIST::FUNCTION:IDEA +EVP_idea_cfb64 319 EXIST::FUNCTION:IDEA EVP_idea_ecb 320 EXIST::FUNCTION:IDEA EVP_idea_ofb 321 EXIST::FUNCTION:IDEA EVP_md2 322 EXIST::FUNCTION:MD2 EVP_md5 323 EXIST::FUNCTION:MD5 EVP_md_null 324 EXIST::FUNCTION: EVP_rc2_cbc 325 EXIST::FUNCTION:RC2 -EVP_rc2_cfb 326 EXIST::FUNCTION:RC2 +EVP_rc2_cfb64 326 EXIST::FUNCTION:RC2 EVP_rc2_ecb 327 EXIST::FUNCTION:RC2 EVP_rc2_ofb 328 EXIST::FUNCTION:RC2 EVP_rc4 329 EXIST::FUNCTION:RC4 @@ -962,7 +962,7 @@ i2t_ASN1_OBJECT 979 EXIST::FUNCTION: BN_BLINDING_new 980 EXIST::FUNCTION: BN_BLINDING_free 981 EXIST::FUNCTION: EVP_cast5_cbc 983 EXIST::FUNCTION:CAST -EVP_cast5_cfb 984 EXIST::FUNCTION:CAST +EVP_cast5_cfb64 984 EXIST::FUNCTION:CAST EVP_cast5_ecb 985 EXIST::FUNCTION:CAST EVP_cast5_ofb 986 EXIST::FUNCTION:CAST BF_decrypt 987 EXIST::FUNCTION:BF @@ -1057,7 +1057,7 @@ EVP_CIPHER_param_to_asn1 1084 EXIST::FUNCTION: EVP_CIPHER_get_asn1_iv 1085 EXIST::FUNCTION: EVP_CIPHER_set_asn1_iv 1086 EXIST::FUNCTION: EVP_rc5_32_12_16_cbc 1087 EXIST::FUNCTION:RC5 -EVP_rc5_32_12_16_cfb 1088 EXIST::FUNCTION:RC5 +EVP_rc5_32_12_16_cfb64 1088 EXIST::FUNCTION:RC5 EVP_rc5_32_12_16_ecb 1089 EXIST::FUNCTION:RC5 EVP_rc5_32_12_16_ofb 1090 EXIST::FUNCTION:RC5 asn1_add_error 1091 EXIST::FUNCTION: @@ -2776,10 +2776,10 @@ ENGINE_load_4758cca 3218 EXIST::FUNCTION:ENGINE _ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES EVP_aes_256_ofb 3220 EXIST::FUNCTION:AES EVP_aes_192_ofb 3221 EXIST::FUNCTION:AES -EVP_aes_128_cfb 3222 EXIST::FUNCTION:AES -EVP_aes_256_cfb 3223 EXIST::FUNCTION:AES +EVP_aes_128_cfb128 3222 EXIST::FUNCTION:AES +EVP_aes_256_cfb128 3223 EXIST::FUNCTION:AES EVP_aes_128_ofb 3224 EXIST::FUNCTION:AES -EVP_aes_192_cfb 3225 EXIST::FUNCTION:AES +EVP_aes_192_cfb128 3225 EXIST::FUNCTION:AES CONF_modules_free 3226 EXIST::FUNCTION: NCONF_default 3227 EXIST::FUNCTION: OPENSSL_no_config 3228 EXIST::FUNCTION: @@ -2803,3 +2803,67 @@ OpenSSLDie 3244 EXIST::FUNCTION: OPENSSL_cleanse 3245 EXIST::FUNCTION: ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH +EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES +FIPS_corrupt_rsa 3249 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_des 3250 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES +EVP_aes_192_cfb8 3252 EXIST::FUNCTION:AES +FIPS_mode_set 3253 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_dsa 3254 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES +FIPS_allow_md5 3256 EXIST:OPENSSL_FIPS:FUNCTION: +DES_ede3_cfb_encrypt 3257 EXIST::FUNCTION:DES +EVP_des_ede3_cfb8 3258 EXIST::FUNCTION:DES +FIPS_rand_seeded 3259 EXIST:OPENSSL_FIPS:FUNCTION: +AES_cfbr_encrypt_block 3260 EXIST::FUNCTION:AES +AES_cfb8_encrypt 3261 EXIST::FUNCTION:AES +FIPS_rand_seed 3262 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_corrupt_des 3263 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_aes_192_cfb1 3264 EXIST::FUNCTION:AES +FIPS_selftest_aes 3265 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_set_prng_key 3266 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_des_cfb8 3267 EXIST::FUNCTION:DES +FIPS_corrupt_dsa 3268 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_test_mode 3269 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_rand_method 3270 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_aes_256_cfb1 3271 EXIST::FUNCTION:AES +ERR_load_FIPS_strings 3272 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_corrupt_aes 3273 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_sha1 3274 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_rsa 3275 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_corrupt_sha1 3276 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_des_cfb1 3277 EXIST::FUNCTION:DES +FIPS_dsa_check 3278 EXIST:OPENSSL_FIPS:FUNCTION: +AES_cfb1_encrypt 3279 EXIST::FUNCTION:AES +EVP_des_ede3_cfb1 3280 EXIST::FUNCTION:DES +FIPS_rand_check 3281 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_md5_allowed 3282 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_mode 3283 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_failed 3284 EXIST:OPENSSL_FIPS:FUNCTION: +sk_is_sorted 3285 EXIST::FUNCTION: +X509_check_ca 3286 EXIST::FUNCTION: +private_idea_set_encrypt_key 3287 EXIST:OPENSSL_FIPS:FUNCTION:IDEA +HMAC_CTX_set_flags 3288 EXIST::FUNCTION:HMAC +private_SHA_Init 3289 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA0 +private_CAST_set_key 3290 EXIST:OPENSSL_FIPS:FUNCTION:CAST +private_RIPEMD160_Init 3291 EXIST:OPENSSL_FIPS:FUNCTION:RIPEMD +private_RC5_32_set_key 3292 EXIST:OPENSSL_FIPS:FUNCTION:RC5 +private_MD5_Init 3293 EXIST:OPENSSL_FIPS:FUNCTION:MD5 +private_RC4_set_key 3294 EXIST:OPENSSL_FIPS:FUNCTION:RC4 +private_MDC2_Init 3295 EXIST:OPENSSL_FIPS:FUNCTION:MDC2 +private_RC2_set_key 3296 EXIST:OPENSSL_FIPS:FUNCTION:RC2 +private_MD4_Init 3297 EXIST:OPENSSL_FIPS:FUNCTION:MD4 +private_BF_set_key 3298 EXIST:OPENSSL_FIPS:FUNCTION:BF +private_MD2_Init 3299 EXIST:OPENSSL_FIPS:FUNCTION:MD2 +d2i_PROXY_CERT_INFO_EXTENSION 3300 EXIST::FUNCTION: +PROXY_POLICY_it 3301 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +PROXY_POLICY_it 3301 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +i2d_PROXY_POLICY 3302 EXIST::FUNCTION: +i2d_PROXY_CERT_INFO_EXTENSION 3303 EXIST::FUNCTION: +d2i_PROXY_POLICY 3304 EXIST::FUNCTION: +PROXY_CERT_INFO_EXTENSION_new 3305 EXIST::FUNCTION: +PROXY_CERT_INFO_EXTENSION_free 3306 EXIST::FUNCTION: +PROXY_CERT_INFO_EXTENSION_it 3307 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +PROXY_CERT_INFO_EXTENSION_it 3307 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +PROXY_POLICY_free 3308 EXIST::FUNCTION: +PROXY_POLICY_new 3309 EXIST::FUNCTION: diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl index b4bc0457e5..957264c6b5 100644 --- a/src/lib/libcrypto/util/mk1mf.pl +++ b/src/lib/libcrypto/util/mk1mf.pl @@ -10,7 +10,7 @@ $OPTIONS=""; $ssl_version=""; $banner="\t\@echo Building OpenSSL"; -open(IN,") { $ssl_version=$1 if (/^VERSION=(.*)$/); $OPTIONS=$1 if (/^OPTIONS=(.*)$/); @@ -18,7 +18,7 @@ while() { } close(IN); -die "Makefile.ssl is not the toplevel Makefile!\n" if $ssl_version eq ""; +die "Makefile is not the toplevel Makefile!\n" if $ssl_version eq ""; $infile="MINFO"; @@ -222,7 +222,7 @@ $cflags.=" -DOPENSSL_NO_SHA" if $no_sha; $cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1; $cflags.=" -DOPENSSL_NO_RIPEMD" if $no_ripemd; $cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2; -$cflags.=" -DOPENSSL_NO_BF" if $no_bf; +$cflags.=" -DOPENSSL_NO_BF" if $no_bf; $cflags.=" -DOPENSSL_NO_CAST" if $no_cast; $cflags.=" -DOPENSSL_NO_DES" if $no_des; $cflags.=" -DOPENSSL_NO_RSA" if $no_rsa; @@ -236,6 +236,7 @@ $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; $cflags.=" -DOPENSSL_NO_EC" if $no_ec; $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; $cflags.=" -DOPENSSL_NO_HW" if $no_hw; +$cflags.=" -DOPENSSL_FIPS" if $fips; #$cflags.=" -DRSAref" if $rsaref ne ""; ## if ($unix) @@ -631,15 +632,21 @@ foreach (split(/\s+/,$test)) $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); -$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); - +if ($fips) + { + $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)","\$(BIN_D)$o.sha1","\$(BIN_D)$o\$(E_EXE)$exep"); + } +else + { + $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); + } print $defs; if ($platform eq "linux-elf") { print <<"EOF"; # Generate perlasm output files %.cpp: - (cd \$(\@D)/..; PERL=perl make -f Makefile.ssl asm/\$(\@F)) + (cd \$(\@D)/..; PERL=perl make -f Makefile asm/\$(\@F)) EOF } print "###################################################################\n"; @@ -921,6 +928,7 @@ sub read_options $no_aes=1; } elsif (/^rsaref$/) { } + elsif (/^fips$/) { $fips=1; } elsif (/^gcc$/) { $gcc=1; } elsif (/^debug$/) { $debug=1; } elsif (/^profile$/) { $profile=1; } diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl index 01a1bfda19..9918c3d549 100644 --- a/src/lib/libcrypto/util/mkdef.pl +++ b/src/lib/libcrypto/util/mkdef.pl @@ -79,7 +79,7 @@ my $OS2=0; my $safe_stack_def = 0; my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", - "EXPORT_VAR_AS_FUNCTION" ); + "EXPORT_VAR_AS_FUNCTION", "OPENSSL_FIPS" ); my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", @@ -94,7 +94,7 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", "FP_API", "STDIO", "SOCK", "KRB5", "ENGINE", "HW" ); my $options=""; -open(IN,") { $options=$1 if (/^OPTIONS=(.*)$/); } @@ -109,6 +109,7 @@ my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; my $no_ec; my $no_engine; my $no_hw; my $no_fp_api; +my $fips; foreach (@ARGV, split(/ /, $options)) { @@ -129,6 +130,7 @@ foreach (@ARGV, split(/ /, $options)) } $VMS=1 if $_ eq "VMS"; $OS2=1 if $_ eq "OS2"; + $fips=1 if $_ eq "fips"; $do_ssl=1 if $_ eq "ssleay"; if ($_ eq "ssl") { @@ -265,6 +267,7 @@ $crypto.=" crypto/ocsp/ocsp.h"; $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; $crypto.=" crypto/krb5/krb5_asn.h"; $crypto.=" crypto/tmdiff.h"; +$crypto.=" fips/fips.h fips/rand/fips_rand.h"; my $symhacks="crypto/symhacks.h"; @@ -469,7 +472,7 @@ sub do_defs push(@tag,$1); $tag{$1}=-1; } - } elsif (/^\#\s*ifdef\s+(.*)/) { + } elsif (/^\#\s*ifdef\s+(\S*)/) { push(@tag,"-"); push(@tag,$1); $tag{$1}=1; @@ -794,7 +797,7 @@ sub do_defs } close(IN); - my $algs; + my $algs = ''; my $plays; print STDERR "DEBUG: postprocessing ----------\n" if $debug; @@ -864,6 +867,7 @@ sub do_defs $platform{$s} = &reduce_platforms((defined($platform{$s})?$platform{$s}.',':"").$p); + $algorithm{$s} = '' if !defined $algorithm{$s}; $algorithm{$s} .= ','.$a; if (defined($variant{$s})) { @@ -1028,6 +1032,9 @@ sub is_valid if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { return 1; } + if ($keyword eq "OPENSSL_FIPS" && $fips) { + return 1; + } return 0; } else { # algorithms @@ -1119,7 +1126,7 @@ sub print_test_file sub get_version { local *MF; my $v = '?'; - open MF, 'Makefile.ssl' or return $v; + open MF, 'Makefile' or return $v; while () { $v = $1, last if /^VERSION=(.*?)\s*$/; } diff --git a/src/lib/libcrypto/util/mkfiles.pl b/src/lib/libcrypto/util/mkfiles.pl index 29e1404c69..928a274303 100644 --- a/src/lib/libcrypto/util/mkfiles.pl +++ b/src/lib/libcrypto/util/mkfiles.pl @@ -51,6 +51,14 @@ my @dirs = ( "crypto/ocsp", "crypto/ui", "crypto/krb5", +"fips", +"fips/aes", +"fips/des", +"fips/dsa", +"fips/dh", +"fips/rand", +"fips/rsa", +"fips/sha1", "ssl", "apps", "test", @@ -58,7 +66,7 @@ my @dirs = ( ); foreach (@dirs) { - &files_dir ($_, "Makefile.ssl"); + &files_dir ($_, "Makefile"); } exit(0); diff --git a/src/lib/libcrypto/util/mklink.pl b/src/lib/libcrypto/util/mklink.pl index 9386da7aa4..c8653cecc3 100644 --- a/src/lib/libcrypto/util/mklink.pl +++ b/src/lib/libcrypto/util/mklink.pl @@ -52,6 +52,7 @@ $symlink_exists=eval {symlink("",""); 1}; foreach $file (@files) { my $err = ""; if ($symlink_exists) { + unlink "$from/$file"; symlink("$to/$file", "$from/$file") or $err = " [$!]"; } else { unlink "$from/$file"; diff --git a/src/lib/libcrypto/util/opensslwrap.sh b/src/lib/libcrypto/util/opensslwrap.sh new file mode 100755 index 0000000000..91d29e2b87 --- /dev/null +++ b/src/lib/libcrypto/util/opensslwrap.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +HERE="`echo $0 | sed -e 's|[^/]*$||'`" +OPENSSL="${HERE}../apps/openssl" + +if [ -x "${OPENSSL}.exe" ]; then + # The original reason for this script existence is to work around + # certain caveats in run-time linker behaviour. On Windows platforms + # adjusting $PATH used to be sufficient, but with introduction of + # SafeDllSearchMode in XP/2003 the only way to get it right in + # *all* possible situations is to copy newly built .DLLs to apps/ + # and test/, which is now done elsewhere... The $PATH is adjusted + # for backward compatibility (and nostagical reasons:-). + if [ "$OSTYPE" != msdosdjgpp ]; then + PATH="${HERE}..:$PATH"; export PATH + fi + exec "${OPENSSL}.exe" "$@" +elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then + exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@" +else + exec "${OPENSSL}" "$@" # hope for the best... +fi diff --git a/src/lib/libcrypto/util/pl/BC-16.pl b/src/lib/libcrypto/util/pl/BC-16.pl index 2033f524ca..8030653daa 100644 --- a/src/lib/libcrypto/util/pl/BC-16.pl +++ b/src/lib/libcrypto/util/pl/BC-16.pl @@ -64,7 +64,7 @@ $lfile=''; $asm='bcc -c -B -Tml'; $afile='/o'; -if ($no_asm) +if ($no_asm || $fips) { $bn_asm_obj=''; $bn_asm_src=''; @@ -119,11 +119,11 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$f,$_,@f); - + $file =~ s/\//$o/g if $o ne '/'; - $n=&bname($targer); + $n=&bname($target); $ret.="$target: $files $dep_libs\n"; $ret.=" \$(LINK) @&&|"; @@ -139,7 +139,12 @@ sub do_link_rule } else { $ret.="\n $r \$(APP_EX_OBJ) $files\n"; } - $ret.=" $target\n\n $libs\n\n|\n\n"; + $ret.=" $target\n\n $libs\n\n|\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/BC-32.pl b/src/lib/libcrypto/util/pl/BC-32.pl index e83b336190..897ae9d824 100644 --- a/src/lib/libcrypto/util/pl/BC-32.pl +++ b/src/lib/libcrypto/util/pl/BC-32.pl @@ -62,7 +62,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_mulw_obj='crypto\bn\asm\bn_win32.obj'; $bn_mulw_src='crypto\bn\asm\bn_win32.asm'; @@ -122,13 +122,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); - + $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n"; + $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/Mingw32.pl b/src/lib/libcrypto/util/pl/Mingw32.pl index 4bee638c4a..b9bb24d21d 100644 --- a/src/lib/libcrypto/util/pl/Mingw32.pl +++ b/src/lib/libcrypto/util/pl/Mingw32.pl @@ -21,7 +21,7 @@ if ($debug) else { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -mcpu=i486 -Wall"; } -if ($gaswin and !$no_asm) +if ($gaswin and !$no_asm and !$fips) { $bn_asm_obj='$(OBJ_D)\bn-win32.o'; $bn_asm_src='crypto/bn/asm/bn-win32.s'; @@ -92,13 +92,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } 1; diff --git a/src/lib/libcrypto/util/pl/OS2-EMX.pl b/src/lib/libcrypto/util/pl/OS2-EMX.pl index ddb3524210..75d72ebbcb 100644 --- a/src/lib/libcrypto/util/pl/OS2-EMX.pl +++ b/src/lib/libcrypto/util/pl/OS2-EMX.pl @@ -48,7 +48,7 @@ $des_enc_src=""; $bf_enc_obj=""; $bf_enc_src=""; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj"; $bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm"; @@ -106,13 +106,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/VC-16.pl b/src/lib/libcrypto/util/pl/VC-16.pl index 7cda5e67a9..564ba3fd08 100644 --- a/src/lib/libcrypto/util/pl/VC-16.pl +++ b/src/lib/libcrypto/util/pl/VC-16.pl @@ -61,7 +61,7 @@ if ($shlib) else { $mlflags=''; } -$app_ex_obj="setargv.obj"; +$app_ex_obj=""; $obj='.obj'; $ofile="/Fo"; @@ -90,7 +90,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm) +if (!$no_asm && !$fips) { if ($asmbits == 32) { @@ -147,7 +147,7 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$f,$_,@f); $file =~ s/\//$o/g if $o ne '/'; @@ -165,7 +165,12 @@ sub do_link_rule } else { $ret.=" \$(APP_EX_OBJ) $files"; } - $ret.="\n $target\n\n $libs\n\n<<\n\n"; + $ret.="\n $target\n\n $libs\n\n<<\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl index 285990c589..cf689b9feb 100644 --- a/src/lib/libcrypto/util/pl/VC-32.pl +++ b/src/lib/libcrypto/util/pl/VC-32.pl @@ -64,7 +64,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_asm_obj='crypto\bn\asm\bn_win32.obj'; $bn_asm_src='crypto\bn\asm\bn_win32.asm'; @@ -126,14 +126,19 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs\n"; $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n"; - $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n\n"; + $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/VC-CE.pl b/src/lib/libcrypto/util/pl/VC-CE.pl index 1805ef9d97..2fd0c4dd32 100644 --- a/src/lib/libcrypto/util/pl/VC-CE.pl +++ b/src/lib/libcrypto/util/pl/VC-CE.pl @@ -47,7 +47,7 @@ $shlibp=($shlib)?".dll":".lib"; $lfile='/out:'; $shlib_ex_obj=""; -#$app_ex_obj="setargv.obj"; +$app_ex_obj=""; $app_ex_obj=""; $bn_asm_obj=''; @@ -97,14 +97,19 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs\n"; $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n"; - $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n\n"; + $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/linux.pl b/src/lib/libcrypto/util/pl/linux.pl index 8924ed5480..df05c40526 100644 --- a/src/lib/libcrypto/util/pl/linux.pl +++ b/src/lib/libcrypto/util/pl/linux.pl @@ -72,13 +72,18 @@ sub do_shlib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/ultrix.pl b/src/lib/libcrypto/util/pl/ultrix.pl index ea370c71f9..447b854708 100644 --- a/src/lib/libcrypto/util/pl/ultrix.pl +++ b/src/lib/libcrypto/util/pl/ultrix.pl @@ -17,7 +17,7 @@ else $cflags.=" -std1 -DL_ENDIAN"; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_asm_obj='$(OBJ_D)/mips1.o'; $bn_asm_src='crypto/bn/asm/mips1.s'; @@ -25,13 +25,18 @@ if (!$no_asm) sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/unix.pl b/src/lib/libcrypto/util/pl/unix.pl index 146611ad99..bbd1798a2e 100644 --- a/src/lib/libcrypto/util/pl/unix.pl +++ b/src/lib/libcrypto/util/pl/unix.pl @@ -70,13 +70,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pod2mantest b/src/lib/libcrypto/util/pod2mantest index 412ca8d6d8..384e683df4 100644 --- a/src/lib/libcrypto/util/pod2mantest +++ b/src/lib/libcrypto/util/pod2mantest @@ -1,6 +1,6 @@ #!/bin/sh -# This script is used by test/Makefile.ssl to check whether a sane 'pod2man' +# This script is used by test/Makefile to check whether a sane 'pod2man' # is installed. # ('make install' should not try to run 'pod2man' if it does not exist or if # it is a broken 'pod2man' version that is known to cause trouble. if we find diff --git a/src/lib/libcrypto/util/selftest.pl b/src/lib/libcrypto/util/selftest.pl index 276b81183d..e9d5aa8938 100644 --- a/src/lib/libcrypto/util/selftest.pl +++ b/src/lib/libcrypto/util/selftest.pl @@ -34,9 +34,9 @@ foreach $_ (split("\n",$c)) { $platform0=$1 if (/Configuring for (.*)$/); } -system "sh config" if (! -f "Makefile.ssl"); +system "sh config" if (! -f "Makefile"); -if (open(IN,") { $version=$1 if (/^VERSION=(.*)$/); $platform=$1 if (/^PLATFORM=(.*)$/); diff --git a/src/lib/libcrypto/util/shlib_wrap.sh b/src/lib/libcrypto/util/shlib_wrap.sh new file mode 100755 index 0000000000..dc5f5b1ce4 --- /dev/null +++ b/src/lib/libcrypto/util/shlib_wrap.sh @@ -0,0 +1,70 @@ +#!/bin/sh + +[ $# -ne 0 ] || set -x # debug mode without arguments:-) + +THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.." +[ -d "${THERE}" ] || exec "$@" # should never happen... + +# Alternative to this is to parse ${THERE}/Makefile... +LIBCRYPTOSO="${THERE}/libcrypto.so" +if [ -f "$LIBCRYPTOSO" ]; then + while [ -h "$LIBCRYPTOSO" ]; do + LIBCRYPTOSO="${THERE}/`ls -l "$LIBCRYPTOSO" | sed -e 's|.*\-> ||'`" + done + SOSUFFIX=`echo ${LIBCRYPTOSO} | sed -e 's|.*\.so||' 2>/dev/null` + LIBSSLSO="${THERE}/libssl.so${SOSUFFIX}" +fi + +SYSNAME=`(uname -s) 2>/dev/null`; +case "$SYSNAME" in +SunOS|IRIX*) + # SunOS and IRIX run-time linkers evaluate alternative + # variables depending on target ABI... + rld_var=LD_LIBRARY_PATH + case "`(/usr/bin/file "$LIBCRYPTOSO") 2>/dev/null`" in + *ELF\ 64*SPARC*) + [ -n "$LD_LIBRARY_PATH_64" ] && rld_var=LD_LIBRARY_PATH_64 + ;; + *ELF\ N32*MIPS*) + [ -n "$LD_LIBRARYN32_PATH" ] && rld_var=LD_LIBRARYN32_PATH + _RLDN32_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLDN32_LIST + ;; + *ELF\ 64*MIPS*) + [ -n "$LD_LIBRARY64_PATH" ] && rld_var=LD_LIBRARY64_PATH + _RLD64_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD64_LIST + ;; + esac + eval $rld_var=\"${THERE}:'$'$rld_var\"; export $rld_var + unset rld_var + ;; +*) LD_LIBRARY_PATH="${THERE}:$LD_LIBRARY_PATH" # Linux, ELF HP-UX + DYLD_LIBRARY_PATH="${THERE}:$DYLD_LIBRARY_PATH" # MacOS X + SHLIB_PATH="${THERE}:$SHLIB_PATH" # legacy HP-UX + LIBPATH="${THERE}:$LIBPATH" # AIX, OS/2 + export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH + # Even though $PATH is adjusted [for Windows sake], it doesn't + # necessarily does the trick. Trouble is that with introduction + # of SafeDllSearchMode in XP/2003 it's more appropriate to copy + # .DLLs in vicinity of executable, which is done elsewhere... + if [ "$OSTYPE" != msdosdjgpp ]; then + PATH="${THERE}:$PATH"; export PATH + fi + ;; +esac + +if [ -f "$LIBCRYPTOSO" ]; then + # Following three lines are major excuse for isolating them into + # this wrapper script. Original reason for setting LD_PRELOAD + # was to make it possible to pass 'make test' when user linked + # with -rpath pointing to previous version installation. Wrapping + # it into a script makes it possible to do so on multi-ABI + # platforms. + case "$SYSNAME" in + *BSD) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *BSD + *) LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO" ;; # SunOS, Linux, ELF HP-UX + esac + _RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT" # Tru64, o32 IRIX + export LD_PRELOAD _RLD_LIST +fi + +exec "$@" diff --git a/src/lib/libcrypto/x509/Makefile b/src/lib/libcrypto/x509/Makefile new file mode 100644 index 0000000000..5fb774f1c7 --- /dev/null +++ b/src/lib/libcrypto/x509/Makefile @@ -0,0 +1,592 @@ +# +# SSLeay/crypto/x509/Makefile +# + +DIR= x509 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c \ + x509_obj.c x509_req.c x509spki.c x509_vfy.c \ + x509_set.c x509cset.c x509rset.c x509_err.c \ + x509name.c x509_v3.c x509_ext.c x509_att.c \ + x509type.c x509_lu.c x_all.c x509_txt.c \ + x509_trs.c by_file.c by_dir.c +LIBOBJ= x509_def.o x509_d2.o x509_r2x.o x509_cmp.o \ + x509_obj.o x509_req.o x509spki.o x509_vfy.o \ + x509_set.o x509cset.o x509rset.o x509_err.o \ + x509name.o x509_v3.o x509_ext.o x509_att.o \ + x509type.o x509_lu.o x_all.o x509_txt.o \ + x509_trs.o by_file.o by_dir.o + +SRC= $(LIBSRC) + +EXHEADER= x509.h x509_vfy.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +by_dir.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +by_dir.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +by_dir.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +by_dir.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +by_dir.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +by_dir.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +by_dir.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +by_dir.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +by_dir.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +by_dir.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +by_dir.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +by_dir.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +by_dir.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +by_dir.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +by_dir.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +by_dir.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +by_dir.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +by_dir.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +by_dir.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +by_dir.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +by_dir.o: ../cryptlib.h by_dir.c +by_file.o: ../../e_os.h ../../include/openssl/aes.h +by_file.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +by_file.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +by_file.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +by_file.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +by_file.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +by_file.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +by_file.o: ../../include/openssl/err.h ../../include/openssl/evp.h +by_file.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +by_file.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +by_file.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +by_file.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +by_file.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +by_file.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +by_file.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +by_file.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +by_file.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +by_file.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +by_file.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +by_file.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +by_file.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +by_file.o: ../../include/openssl/x509_vfy.h ../cryptlib.h by_file.c +x509_att.o: ../../e_os.h ../../include/openssl/aes.h +x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_att.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_att.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_att.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_att.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_att.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_att.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_att.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_att.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_att.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_att.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_att.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_att.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_att.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_att.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_att.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_att.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_att.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_att.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_att.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_att.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_att.c +x509_cmp.o: ../../e_os.h ../../include/openssl/aes.h +x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_cmp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_cmp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_cmp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_cmp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_cmp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_cmp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_cmp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_cmp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_cmp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_cmp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_cmp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_cmp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_cmp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_cmp.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_cmp.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_cmp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_cmp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_cmp.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_cmp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_cmp.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_cmp.c +x509_d2.o: ../../e_os.h ../../include/openssl/aes.h +x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_d2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_d2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_d2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_d2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_d2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_d2.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_d2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_d2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_d2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_d2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_d2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x509_d2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x509_d2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x509_d2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x509_d2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x509_d2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x509_d2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x509_d2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x509_d2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_d2.c +x509_def.o: ../../e_os.h ../../include/openssl/aes.h +x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_def.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_def.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_def.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_def.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_def.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_def.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_def.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_def.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_def.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_def.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_def.o: ../../include/openssl/opensslconf.h +x509_def.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_def.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_def.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_def.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_def.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_def.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_def.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_def.o: ../cryptlib.h x509_def.c +x509_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +x509_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x509_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x509_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x509_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_err.o: x509_err.c +x509_ext.o: ../../e_os.h ../../include/openssl/aes.h +x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_ext.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_ext.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_ext.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_ext.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_ext.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_ext.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_ext.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_ext.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_ext.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_ext.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_ext.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_ext.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_ext.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_ext.c +x509_lu.o: ../../e_os.h ../../include/openssl/aes.h +x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_lu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_lu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_lu.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_lu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_lu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_lu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_lu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_lu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_lu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_lu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_lu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_lu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_lu.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_lu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_lu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_lu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_lu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_lu.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_lu.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_lu.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_lu.c +x509_obj.o: ../../e_os.h ../../include/openssl/aes.h +x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_obj.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_obj.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_obj.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_obj.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_obj.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_obj.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_obj.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_obj.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_obj.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_obj.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_obj.o: ../../include/openssl/opensslconf.h +x509_obj.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_obj.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_obj.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_obj.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_obj.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_obj.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_obj.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_obj.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_obj.o: ../cryptlib.h x509_obj.c +x509_r2x.o: ../../e_os.h ../../include/openssl/aes.h +x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_r2x.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_r2x.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_r2x.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_r2x.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_r2x.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_r2x.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_r2x.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_r2x.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_r2x.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_r2x.o: ../../include/openssl/opensslconf.h +x509_r2x.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_r2x.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_r2x.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_r2x.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_r2x.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_r2x.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_r2x.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_r2x.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_r2x.o: ../cryptlib.h x509_r2x.c +x509_req.o: ../../e_os.h ../../include/openssl/aes.h +x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_req.o: ../../include/openssl/opensslconf.h +x509_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_req.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +x509_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_req.o: ../cryptlib.h x509_req.c +x509_set.o: ../../e_os.h ../../include/openssl/aes.h +x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_set.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_set.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_set.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_set.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_set.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_set.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_set.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_set.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_set.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_set.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_set.o: ../../include/openssl/opensslconf.h +x509_set.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_set.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_set.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_set.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_set.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_set.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_set.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_set.o: ../cryptlib.h x509_set.c +x509_trs.o: ../../e_os.h ../../include/openssl/aes.h +x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_trs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_trs.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_trs.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_trs.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_trs.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_trs.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_trs.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_trs.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_trs.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_trs.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_trs.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_trs.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_trs.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_trs.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_trs.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_trs.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_trs.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_trs.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_trs.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_trs.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_trs.c +x509_txt.o: ../../e_os.h ../../include/openssl/aes.h +x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_txt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_txt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_txt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_txt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_txt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_txt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_txt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_txt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_txt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_txt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_txt.o: ../../include/openssl/opensslconf.h +x509_txt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_txt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_txt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_txt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_txt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_txt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_txt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_txt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_txt.o: ../cryptlib.h x509_txt.c +x509_v3.o: ../../e_os.h ../../include/openssl/aes.h +x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_v3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_v3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_v3.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_v3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_v3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_v3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_v3.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_v3.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_v3.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_v3.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_v3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_v3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_v3.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_v3.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_v3.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_v3.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_v3.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_v3.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_v3.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_v3.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_v3.c +x509_vfy.o: ../../e_os.h ../../include/openssl/aes.h +x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_vfy.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_vfy.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_vfy.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_vfy.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_vfy.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_vfy.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_vfy.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_vfy.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_vfy.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_vfy.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_vfy.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_vfy.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_vfy.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_vfy.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_vfy.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_vfy.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_vfy.c +x509cset.o: ../../e_os.h ../../include/openssl/aes.h +x509cset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509cset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509cset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509cset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509cset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509cset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509cset.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509cset.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509cset.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509cset.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509cset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509cset.o: ../../include/openssl/opensslconf.h +x509cset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509cset.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509cset.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509cset.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509cset.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509cset.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509cset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509cset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509cset.o: ../cryptlib.h x509cset.c +x509name.o: ../../e_os.h ../../include/openssl/aes.h +x509name.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509name.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509name.o: ../../include/openssl/opensslconf.h +x509name.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509name.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509name.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509name.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509name.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509name.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509name.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509name.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509name.o: ../cryptlib.h x509name.c +x509rset.o: ../../e_os.h ../../include/openssl/aes.h +x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509rset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509rset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509rset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509rset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509rset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509rset.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509rset.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509rset.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509rset.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509rset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509rset.o: ../../include/openssl/opensslconf.h +x509rset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509rset.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509rset.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509rset.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509rset.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509rset.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509rset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509rset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509rset.o: ../cryptlib.h x509rset.c +x509spki.o: ../../e_os.h ../../include/openssl/aes.h +x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509spki.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509spki.o: ../../include/openssl/opensslconf.h +x509spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509spki.o: ../cryptlib.h x509spki.c +x509type.o: ../../e_os.h ../../include/openssl/aes.h +x509type.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509type.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509type.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509type.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509type.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509type.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509type.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509type.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509type.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509type.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509type.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509type.o: ../../include/openssl/opensslconf.h +x509type.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509type.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509type.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509type.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509type.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509type.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509type.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509type.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509type.o: ../cryptlib.h x509type.c +x_all.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_all.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_all.o: ../cryptlib.h x_all.c diff --git a/src/lib/libcrypto/x509v3/Makefile b/src/lib/libcrypto/x509v3/Makefile new file mode 100644 index 0000000000..ed2f91cbb3 --- /dev/null +++ b/src/lib/libcrypto/x509v3/Makefile @@ -0,0 +1,645 @@ +# +# SSLeay/crypto/x509v3/Makefile +# + +DIR= x509v3 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= v3_bcons.c v3_bitst.c v3_conf.c v3_extku.c v3_ia5.c v3_lib.c \ +v3_prn.c v3_utl.c v3err.c v3_genn.c v3_alt.c v3_skey.c v3_akey.c v3_pku.c \ +v3_int.c v3_enum.c v3_sxnet.c v3_cpols.c v3_crld.c v3_purp.c v3_info.c \ +v3_ocsp.c v3_akeya.c v3_pcia.c v3_pci.c +LIBOBJ= v3_bcons.o v3_bitst.o v3_conf.o v3_extku.o v3_ia5.o v3_lib.o \ +v3_prn.o v3_utl.o v3err.o v3_genn.o v3_alt.o v3_skey.o v3_akey.o v3_pku.o \ +v3_int.o v3_enum.o v3_sxnet.o v3_cpols.o v3_crld.o v3_purp.o v3_info.o \ +v3_ocsp.o v3_akeya.o v3_pcia.o v3_pci.o + +SRC= $(LIBSRC) + +EXHEADER= x509v3.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +v3_akey.o: ../../e_os.h ../../include/openssl/aes.h +v3_akey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_akey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_akey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_akey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_akey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_akey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_akey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_akey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_akey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_akey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_akey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_akey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_akey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_akey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_akey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_akey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_akey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_akey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_akey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_akey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_akey.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_akey.o: ../cryptlib.h v3_akey.c +v3_akeya.o: ../../e_os.h ../../include/openssl/aes.h +v3_akeya.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_akeya.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_akeya.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_akeya.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_akeya.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_akeya.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_akeya.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_akeya.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_akeya.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_akeya.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_akeya.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_akeya.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_akeya.o: ../../include/openssl/opensslconf.h +v3_akeya.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_akeya.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_akeya.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_akeya.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_akeya.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_akeya.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_akeya.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_akeya.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_akeya.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_akeya.c +v3_alt.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_alt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_alt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_alt.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_alt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_alt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_alt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_alt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_alt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_alt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_alt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_alt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_alt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_alt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_alt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_alt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_alt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_alt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_alt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_alt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_alt.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_alt.o: ../cryptlib.h v3_alt.c +v3_bcons.o: ../../e_os.h ../../include/openssl/aes.h +v3_bcons.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_bcons.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_bcons.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_bcons.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_bcons.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_bcons.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_bcons.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_bcons.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_bcons.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_bcons.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_bcons.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_bcons.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_bcons.o: ../../include/openssl/opensslconf.h +v3_bcons.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_bcons.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_bcons.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_bcons.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_bcons.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_bcons.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_bcons.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_bcons.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_bcons.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bcons.c +v3_bitst.o: ../../e_os.h ../../include/openssl/aes.h +v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_bitst.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_bitst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_bitst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bitst.c +v3_conf.o: ../../e_os.h ../../include/openssl/aes.h +v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_conf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_conf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_conf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_conf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_conf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_conf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_conf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_conf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_conf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_conf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_conf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_conf.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_conf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_conf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_conf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_conf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_conf.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_conf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_conf.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_conf.c +v3_cpols.o: ../../e_os.h ../../include/openssl/aes.h +v3_cpols.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_cpols.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_cpols.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_cpols.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_cpols.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_cpols.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_cpols.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_cpols.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_cpols.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_cpols.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_cpols.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_cpols.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_cpols.o: ../../include/openssl/opensslconf.h +v3_cpols.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_cpols.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_cpols.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_cpols.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_cpols.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_cpols.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_cpols.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_cpols.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_cpols.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_cpols.c +v3_crld.o: ../../e_os.h ../../include/openssl/aes.h +v3_crld.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_crld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_crld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_crld.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_crld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_crld.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_crld.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_crld.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_crld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_crld.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_crld.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_crld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_crld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_crld.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_crld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_crld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_crld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_crld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_crld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_crld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_crld.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_crld.o: ../cryptlib.h v3_crld.c +v3_enum.o: ../../e_os.h ../../include/openssl/aes.h +v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_enum.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_enum.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_enum.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_enum.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_enum.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_enum.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_enum.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_enum.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_enum.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_enum.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_enum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_enum.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_enum.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_enum.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_enum.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_enum.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_enum.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_enum.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_enum.c +v3_extku.o: ../../e_os.h ../../include/openssl/aes.h +v3_extku.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_extku.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_extku.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_extku.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_extku.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_extku.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_extku.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_extku.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_extku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_extku.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_extku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_extku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_extku.o: ../../include/openssl/opensslconf.h +v3_extku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_extku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_extku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_extku.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_extku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_extku.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_extku.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_extku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_extku.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_extku.c +v3_genn.o: ../../e_os.h ../../include/openssl/aes.h +v3_genn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_genn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_genn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_genn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_genn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_genn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_genn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_genn.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_genn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_genn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_genn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_genn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_genn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_genn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_genn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_genn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_genn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_genn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_genn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_genn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_genn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_genn.o: ../cryptlib.h v3_genn.c +v3_ia5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_ia5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_ia5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_ia5.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_ia5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_ia5.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_ia5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_ia5.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_ia5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_ia5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_ia5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_ia5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_ia5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_ia5.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_ia5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_ia5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_ia5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_ia5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_ia5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_ia5.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_ia5.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_ia5.o: ../cryptlib.h v3_ia5.c +v3_info.o: ../../e_os.h ../../include/openssl/aes.h +v3_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_info.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_info.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_info.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_info.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_info.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_info.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_info.o: ../cryptlib.h v3_info.c +v3_int.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_int.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_int.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_int.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_int.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_int.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_int.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_int.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_int.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_int.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_int.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_int.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_int.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_int.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_int.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_int.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_int.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_int.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_int.o: ../cryptlib.h v3_int.c +v3_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_lib.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_lib.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_lib.o: ../cryptlib.h ext_dat.h v3_lib.c +v3_ocsp.o: ../../e_os.h ../../include/openssl/aes.h +v3_ocsp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_ocsp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_ocsp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_ocsp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_ocsp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_ocsp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_ocsp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_ocsp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_ocsp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_ocsp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_ocsp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_ocsp.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +v3_ocsp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_ocsp.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_ocsp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_ocsp.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_ocsp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_ocsp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_ocsp.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_ocsp.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_ocsp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_ocsp.o: ../cryptlib.h v3_ocsp.c +v3_pci.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_pci.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_pci.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_pci.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_pci.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_pci.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_pci.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_pci.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_pci.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_pci.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_pci.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_pci.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_pci.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_pci.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_pci.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_pci.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_pci.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_pci.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_pci.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_pci.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_pci.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_pci.o: ../cryptlib.h v3_pci.c +v3_pcia.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_pcia.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +v3_pcia.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_pcia.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_pcia.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_pcia.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_pcia.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_pcia.o: ../../include/openssl/e_os2.h ../../include/openssl/evp.h +v3_pcia.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_pcia.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_pcia.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_pcia.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_pcia.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_pcia.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_pcia.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_pcia.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_pcia.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_pcia.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_pcia.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_pcia.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_pcia.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_pcia.o: v3_pcia.c +v3_pku.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_pku.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +v3_pku.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_pku.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_pku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_pku.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_pku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_pku.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_pku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_pku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_pku.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_pku.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_pku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_pku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_pku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_pku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_pku.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_pku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_pku.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_pku.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_pku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_pku.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_pku.c +v3_prn.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_prn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_prn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_prn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_prn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_prn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_prn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_prn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_prn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_prn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_prn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_prn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_prn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_prn.o: ../cryptlib.h v3_prn.c +v3_purp.o: ../../e_os.h ../../include/openssl/aes.h +v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_purp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_purp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_purp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_purp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_purp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_purp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_purp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_purp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_purp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_purp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_purp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_purp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_purp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_purp.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_purp.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_purp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_purp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_purp.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_purp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_purp.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_purp.c +v3_skey.o: ../../e_os.h ../../include/openssl/aes.h +v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_skey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_skey.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_skey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_skey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_skey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_skey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_skey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_skey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_skey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_skey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_skey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_skey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_skey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_skey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_skey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_skey.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_skey.c +v3_sxnet.o: ../../e_os.h ../../include/openssl/aes.h +v3_sxnet.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_sxnet.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_sxnet.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_sxnet.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_sxnet.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_sxnet.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_sxnet.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_sxnet.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_sxnet.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_sxnet.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_sxnet.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_sxnet.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_sxnet.o: ../../include/openssl/opensslconf.h +v3_sxnet.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_sxnet.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_sxnet.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_sxnet.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_sxnet.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_sxnet.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_sxnet.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_sxnet.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_sxnet.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_sxnet.c +v3_utl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_utl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_utl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_utl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_utl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_utl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_utl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_utl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_utl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_utl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_utl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_utl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_utl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_utl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_utl.o: ../cryptlib.h v3_utl.c +v3err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3err.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3err.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3err.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3err.o: v3err.c diff --git a/src/lib/libssl/src/CHANGES b/src/lib/libssl/src/CHANGES index 4a0363a1c2..cccc4f812f 100644 --- a/src/lib/libssl/src/CHANGES +++ b/src/lib/libssl/src/CHANGES @@ -2,6 +2,112 @@ OpenSSL CHANGES _______________ + Changes between 0.9.7f and 0.9.7g [11 Apr 2005] + + *) Fixes for newer kerberos headers. NB: the casts are needed because + the 'length' field is signed on one version and unsigned on another + with no (?) obvious way to tell the difference, without these VC++ + complains. Also the "definition" of FAR (blank) is no longer included + nor is the error ENOMEM. KRB5_PRIVATE has to be set to 1 to pick up + some needed definitions. + [Steve Henson] + + *) Undo Cygwin change. + [Ulf Möller] + + *) Added support for proxy certificates according to RFC 3820. + Because they may be a security thread to unaware applications, + they must be explicitely allowed in run-time. See + docs/HOWTO/proxy_certificates.txt for further information. + [Richard Levitte] + + Changes between 0.9.7e and 0.9.7f [22 Mar 2005] + + *) Use (SSL_RANDOM_VALUE - 4) bytes of pseudo random data when generating + server and client random values. Previously + (SSL_RANDOM_VALUE - sizeof(time_t)) would be used which would result in + less random data when sizeof(time_t) > 4 (some 64 bit platforms). + + This change has negligible security impact because: + + 1. Server and client random values still have 24 bytes of pseudo random + data. + + 2. Server and client random values are sent in the clear in the initial + handshake. + + 3. The master secret is derived using the premaster secret (48 bytes in + size for static RSA ciphersuites) as well as client server and random + values. + + The OpenSSL team would like to thank the UK NISCC for bringing this issue + to our attention. + + [Stephen Henson, reported by UK NISCC] + + *) Use Windows randomness collection on Cygwin. + [Ulf Möller] + + *) Fix hang in EGD/PRNGD query when communication socket is closed + prematurely by EGD/PRNGD. + [Darren Tucker via Lutz Jänicke, resolves #1014] + + *) Prompt for pass phrases when appropriate for PKCS12 input format. + [Steve Henson] + + *) Back-port of selected performance improvements from development + branch, as well as improved support for PowerPC platforms. + [Andy Polyakov] + + *) Add lots of checks for memory allocation failure, error codes to indicate + failure and freeing up memory if a failure occurs. + [Nauticus Networks SSL Team , Steve Henson] + + *) Add new -passin argument to dgst. + [Steve Henson] + + *) Perform some character comparisons of different types in X509_NAME_cmp: + this is needed for some certificates that reencode DNs into UTF8Strings + (in violation of RFC3280) and can't or wont issue name rollover + certificates. + [Steve Henson] + + *) Make an explicit check during certificate validation to see that + the CA setting in each certificate on the chain is correct. As a + side effect always do the following basic checks on extensions, + not just when there's an associated purpose to the check: + + - if there is an unhandled critical extension (unless the user + has chosen to ignore this fault) + - if the path length has been exceeded (if one is set at all) + - that certain extensions fit the associated purpose (if one has + been given) + [Richard Levitte] + + Changes between 0.9.7d and 0.9.7e [25 Oct 2004] + + *) Avoid a race condition when CRLs are checked in a multi threaded + environment. This would happen due to the reordering of the revoked + entries during signature checking and serial number lookup. Now the + encoding is cached and the serial number sort performed under a lock. + Add new STACK function sk_is_sorted(). + [Steve Henson] + + *) Add Delta CRL to the extension code. + [Steve Henson] + + *) Various fixes to s3_pkt.c so alerts are sent properly. + [David Holmes ] + + *) Reduce the chances of duplicate issuer name and serial numbers (in + violation of RFC3280) using the OpenSSL certificate creation utilities. + This is done by creating a random 64 bit value for the initial serial + number when a serial number file is created or when a self signed + certificate is created using 'openssl req -x509'. The initial serial + number file is created using 'openssl x509 -next_serial' in CA.pl + rather than being initialized to 1. + [Steve Henson] + Changes between 0.9.7c and 0.9.7d [17 Mar 2004] *) Fix null-pointer assignment in do_change_cipher_spec() revealed @@ -2037,6 +2143,20 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k *) Clean old EAY MD5 hack from e_os.h. [Richard Levitte] + Changes between 0.9.6l and 0.9.6m [17 Mar 2004] + + *) Fix null-pointer assignment in do_change_cipher_spec() revealed + by using the Codenomicon TLS Test Tool (CAN-2004-0079) + [Joe Orton, Steve Henson] + + Changes between 0.9.6k and 0.9.6l [04 Nov 2003] + + *) Fix additional bug revealed by the NISCC test suite: + + Stop bug triggering large recursion when presented with + certain ASN.1 tags (CAN-2003-0851) + [Steve Henson] + Changes between 0.9.6j and 0.9.6k [30 Sep 2003] *) Fix various bugs revealed by running the NISCC test suite: diff --git a/src/lib/libssl/src/Configure b/src/lib/libssl/src/Configure index 4e7883c17a..e0e732c445 100644 --- a/src/lib/libssl/src/Configure +++ b/src/lib/libssl/src/Configure @@ -10,7 +10,7 @@ use strict; # see INSTALL for instructions. -my $usage="Usage: Configure [no- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-engine] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n"; +my $usage="Usage: Configure [no- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-engine] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [[no-]fips] [debug] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n"; # Options: # @@ -135,15 +135,16 @@ my %table=( # Our development configs "purify", "purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::", "debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::", -"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o", +"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o", "debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", "debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", -"debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::::", +"debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", +"debug-ben-fips-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_FIPS -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", "debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", "debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT:::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", +"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", "debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT::dlfcn", "debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -155,6 +156,12 @@ my %table=( "gcc", "gcc:-O3::(unknown):::BN_LLONG:::", "cc", "cc:-O::(unknown)::::::", +####VOS Configurations +"vos-gcc","gcc:-b hppa1.1-stratus-vos -O3 -Wall -Wuninitialized -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map:BN_LLONG:::::::::::::.so:", +"debug-vos-gcc","gcc:-b hppa1.1-stratus-vos -O0 -g -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map:BN_LLONG:::::::::::::.so:", +"vos-vcc","vcc:-b i386-stratus-vos -O3 -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map::::::::::::::.so:", +"debug-vos-vcc","vcc:-b i386-stratus-vos -O0 -g -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map::::::::::::::.so:", + #### Solaris x86 with GNU C setups # -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have to do it # here because whenever GNU C instantiates an assembler template it @@ -162,9 +169,19 @@ my %table=( # 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic" # error message. "solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +# -shared -static-libgcc might appear controversial, but modules taken +# from static libgcc do not have relocations and linking them into our +# shared objects doesn't have any negative side-effects. On the contrary, +# doing so makes it possible to use gcc shared build with Sun C. Given +# that gcc generates faster code [thanks to inline assembler], I would +# actually recommend to consider using gcc shared build even with vendor +# compiler:-) +# +"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o::::::asm/rc4-amd64.o:::dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### Solaris x86 with Sun C setups "solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL::::::::::dlfcn:solaris-shared:-KPIC:-xarch=amd64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### SPARC Solaris with GNU C setups "solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -263,10 +280,10 @@ my %table=( "hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # IA-64 targets -"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:hpux-shared:+Z::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # Frank Geurts has patiently assisted with # with debugging of the following config. -"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:hpux64-shared:+Z::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # More attempts at unified 10.X and 11.X targets for HP C compiler. # @@ -382,17 +399,20 @@ my %table=( "debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", "debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", "debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", +"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", "linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:asm/linux_ppc32.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +# -bpowerpc64-linux is transient option, -m64 should be the one to use... +"linux-ppc64", "gcc:-bpowerpc64-linux -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:asm/linux_ppc64.o:::::::::dlfcn:linux-shared:-fPIC:-bpowerpc64-linux:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::", "linux-s390", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/ia64.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/ia64.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o::::::asm/rc4-amd64.o:::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-em64t", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -415,7 +435,9 @@ my %table=( "qnx6", "cc:-DL_ENDIAN -DTERMIOS::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:", # Linux on ARM -"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +# ARM comes in both little- and big-endian flavors. The following line is +# endian neutral, but ./config is free to throw in -D[BL]_ENDIAN... +"linux-elf-arm","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # SCO/Caldera targets. # @@ -442,11 +464,10 @@ my %table=( # IBM's AIX. -"aix-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::", -"aix-gcc", "gcc:-O3 -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR:::", -"aix43-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", -"aix43-gcc", "gcc:-O1 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:", -"aix64-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHAR::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", +"aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::", +"aix-gcc", "gcc:-O3 -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR:asm/aix_ppc32.o:::::::::dlfcn:", +"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384::-qthreaded:AIX::BN_LLONG RC4_CHAR:asm/aix_ppc32.o:::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", +"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:asm/aix_ppc64.o:::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", # # Cray T90 and similar (SDSC) @@ -509,17 +530,17 @@ my %table=( "BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::", # MinGW -"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-mno-cygwin -lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32::::.dll", +"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll", # UWIN "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", # Cygwin "Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", -"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:::.dll", +"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:cygwin-shared:-D_WINDLL::.dll", # DJGPP -"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::", +"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM=\"/dev/urandom\\x24\":::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::", # Ultrix from Bernhard Simon "ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::", @@ -542,7 +563,7 @@ my %table=( ##### MacOS X (a.k.a. Rhapsody or Darwin) setup "rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", -"darwin-ppc-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", +"darwin-ppc-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/osx_ppc32.o::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "darwin-i386-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", ##### A/UX @@ -609,7 +630,7 @@ my $threads=0; my $no_asm=0; my $no_dso=0; my @skip=(); -my $Makefile="Makefile.ssl"; +my $Makefile="Makefile"; my $des_locl="crypto/des/des_locl.h"; my $des ="crypto/des/des.h"; my $bn ="crypto/bn/bn.h"; @@ -621,6 +642,7 @@ my $rc2 ="crypto/rc2/rc2.h"; my $bf ="crypto/bf/bf_locl.h"; my $bn_asm ="bn_asm.o"; my $des_enc="des_enc.o fcrypt_b.o"; +my $fips_des_enc="fips_des_enc.o"; my $bf_enc ="bf_enc.o"; my $cast_enc="c_enc.o"; my $rc4_enc="rc4_enc.o"; @@ -631,6 +653,8 @@ my $rmd160_obj=""; my $processor=""; my $default_ranlib; my $perl; +my $fips=0; +my $debug=0; my $no_ssl2=0; my $no_ssl3=0; @@ -640,10 +664,6 @@ my $no_sha=0; my $no_rsa=0; my $no_dh=0; -$default_ranlib= &which("ranlib") or $default_ranlib="true"; -$perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl") - or $perl="perl"; - &usage if ($#ARGV < 0); my $flags; @@ -739,6 +759,8 @@ PROCESS_ARGS: { $no_ssl3 = 1; } elsif (/^no-tls1?$/) { $no_tls1 = 1; } + elsif (/^no-fips$/) + { $fips = 0; } elsif (/^no-(.+)$/) { my $algo=$1; @@ -804,6 +826,14 @@ PROCESS_ARGS: } elsif (/^386$/) { $processor=386; } + elsif (/^fips$/) + { + $fips=1; + } + elsif (/^debug$/) + { + $debug=1; + } elsif (/^rsaref$/) { # No RSAref support any more since it's not needed. @@ -920,11 +950,15 @@ print "Configuring for $target\n"; my $IsWindows=scalar grep /^$target$/,@WinTargets; -$exe_ext=".exe" if ($target eq "Cygwin"); -$exe_ext=".exe" if ($target eq "DJGPP"); +$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw"); +$exe_ext=".pm" if ($target eq "vos-gcc" or $target eq "debug-vos-gcc" or $target eq "vos-vcc" or $target eq "debug-vos-vcc"); $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq ""); $prefix=$openssldir if $prefix eq ""; +$default_ranlib= &which("ranlib") or $default_ranlib="true"; +$perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl") + or $perl="perl"; + chop $openssldir if $openssldir =~ /\/$/; chop $prefix if $prefix =~ /\/$/; @@ -1139,12 +1173,26 @@ if ($ranlib eq "") $bn_obj = $bn_asm unless $bn_obj ne ""; +my $fips_des_obj; +my $fips_sha1_obj; +if ($fips) + { + if ($des_obj =~ /\-elf\.o$/ && $no_shared) # FIPS DES module is not PIC + { + $fips_des_obj='asm/fips-dx86-elf.o'; + $openssl_other_defines.="#define OPENSSL_FIPS_DES_ASM\n"; + } + else { $fips_des_obj=$fips_des_enc; } + $fips_sha1_obj='asm/sx86-elf.o' if ($sha1_obj =~ /\-elf\.o$/); + $des_obj=$sha1_obj=""; + $openssl_other_defines.="#define OPENSSL_FIPS\n"; + } $des_obj=$des_enc unless ($des_obj =~ /\.o$/); $bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); $cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); $rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/); $rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/); -if ($sha1_obj =~ /\.o$/) +if ($sha1_obj =~ /\.o$/ || $fips_sha1_obj =~ /\.o$/) { # $sha1_obj=$sha1_enc; $cflags.=" -DSHA1_ASM"; @@ -1160,6 +1208,12 @@ if ($rmd160_obj =~ /\.o$/) $cflags.=" -DRMD160_ASM"; } +if ($debug) + { + $cflags.=" -g"; + $cflags=~s/-fomit-frame-pointer//; + } + # "Stringify" the C flags string. This permits it to be made part of a string # and works as well on command lines. $cflags =~ s/([\\\"])/\\\1/g; @@ -1232,12 +1286,14 @@ while () s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/; s/^BN_ASM=.*$/BN_ASM= $bn_obj/; s/^DES_ENC=.*$/DES_ENC= $des_obj/; + s/^FIPS_DES_ENC=.*$/FIPS_DES_ENC= $fips_des_obj/; s/^BF_ENC=.*$/BF_ENC= $bf_obj/; s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/; s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/; s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/; s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/; s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/; + s/^FIPS_SHA1_ASM_OBJ=.*$/FIPS_SHA1_ASM_OBJ= $fips_sha1_obj/; s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/; s/^PROCESSOR=.*/PROCESSOR= $processor/; s/^RANLIB=.*/RANLIB= $ranlib/; @@ -1470,7 +1526,7 @@ if($IsWindows) { printf OUT < and I get errors why? * I've called and it fails, why? * I just get a load of numbers for the error output, what do they mean? @@ -60,6 +61,7 @@ OpenSSL - Frequently Asked Questions * Can I use OpenSSL's SSL library with non-blocking I/O? * Why doesn't my server application receive a client certificate? * Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? +* I think I've detected a memory leak, is this a bug? =============================================================================== @@ -68,7 +70,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 0.9.7d was released on March 17, 2004. +OpenSSL 0.9.7g was released on April 11, 2005. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at and I get errors why? This usually happens when you try compiling something using the PKCS#12 @@ -765,5 +785,28 @@ The correct name according to RFC2256 (LDAP) is x500UniqueIdentifier. Change your code to use the new name when compiling against OpenSSL 0.9.7. +* I think I've detected a memory leak, is this a bug? + +In most cases the cause of an apparent memory leak is an OpenSSL internal table +that is allocated when an application starts up. Since such tables do not grow +in size over time they are harmless. + +These internal tables can be freed up when an application closes using various +functions. Currently these include following: + +Thread-local cleanup functions: + + ERR_remove_state() + +Application-global cleanup functions that are aware of usage (and therefore +thread-safe): + + ENGINE_cleanup() and CONF_modules_unload() + +"Brutal" (thread-unsafe) Application-global cleanup functions: + + ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data(). + + =============================================================================== diff --git a/src/lib/libssl/src/INSTALL b/src/lib/libssl/src/INSTALL index 1c3f3c3fe9..503474f2e4 100644 --- a/src/lib/libssl/src/INSTALL +++ b/src/lib/libssl/src/INSTALL @@ -123,7 +123,7 @@ generic configurations "cc" or "gcc" should usually work on 32 bit systems. - Configure creates the file Makefile.ssl from Makefile.org and + Configure creates the file Makefile from Makefile.org and defines various macros in crypto/opensslconf.h (generated from crypto/opensslconf.h.in). @@ -159,7 +159,7 @@ the failure that isn't a problem in OpenSSL itself (like a missing or malfunctioning bc). If it is a problem with OpenSSL itself, try removing any compiler optimization flags from the CFLAG line - in Makefile.ssl and run "make clean; make". Please send a bug + in Makefile and run "make clean; make". Please send a bug report to , including the output of "make report" in order to be added to the request tracker at http://www.openssl.org/support/rt2.html. diff --git a/src/lib/libssl/src/INSTALL.DJGPP b/src/lib/libssl/src/INSTALL.DJGPP index cdeac222b2..1047ec90a5 100644 --- a/src/lib/libssl/src/INSTALL.DJGPP +++ b/src/lib/libssl/src/INSTALL.DJGPP @@ -3,32 +3,45 @@ INSTALLATION ON THE DOS PLATFORM WITH DJGPP ------------------------------------------- - Openssl has been ported to DOS, but only with long filename support. If - you wish to compile on native DOS with 8+3 filenames, you will have to - tweak the installation yourself, including renaming files with illegal - or duplicate names. + OpenSSL has been ported to DJGPP, a Unix look-alike 32-bit run-time + environment for 16-bit DOS, but only with long filename support. + If you wish to compile on native DOS with 8+3 filenames, you will + have to tweak the installation yourself, including renaming files + with illegal or duplicate names. You should have a full DJGPP environment installed, including the latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package requires that PERL and BC also be installed. - All of these can be obtained from the usual DJGPP mirror sites, such - as "ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp". You also need to - have the WATT-32 networking package installed before you try to compile - openssl. This can be obtained from "http://www.bgnett.no/~giva/". + All of these can be obtained from the usual DJGPP mirror sites or + directly at "http://www.delorie.com/pub/djgpp". For help on which + files to download, see the DJGPP "ZIP PICKER" page at + "http://www.delorie.com/djgpp/zip-picker.html". You also need to have + the WATT-32 networking package installed before you try to compile + OpenSSL. This can be obtained from "http://www.bgnett.no/~giva/". The Makefile assumes that the WATT-32 code is in the directory specified by the environment variable WATT_ROOT. If you have watt-32 in directory "watt32" under your main DJGPP directory, specify WATT_ROOT="/dev/env/DJDIR/watt32". - To compile openssl, start your BASH shell. Then configure for DOS by - running "./Configure" with appropriate arguments. The basic syntax for - DOS is: - ./Configure no-threads --prefix=/dev/env/DJDIR DJGPP + To compile OpenSSL, start your BASH shell, then configure for DJGPP by + running "./Configure" with appropriate arguments: + + ./Configure no-threads --prefix=/dev/env/DJDIR DJGPP - You may run out of DPMI selectors when running in a DOS box under - Windows. If so, just close the BASH shell, go back to Windows, and - restart BASH. Then run "make" again. + And finally fire up "make". You may run out of DPMI selectors when + running in a DOS box under Windows. If so, just close the BASH + shell, go back to Windows, and restart BASH. Then run "make" again. + + RUN-TIME CAVEAT LECTOR + -------------- + + Quoting FAQ: + + "Cryptographic software needs a source of unpredictable data to work + correctly. Many open source operating systems provide a "randomness + device" (/dev/urandom or /dev/random) that serves this purpose." - Building openssl under DJGPP has been tested with DJGPP 2.03, - GCC 2.952, GCC 2.953, perl 5.005_02 and perl 5.006_01. + As of version 0.9.7f DJGPP port checks upon /dev/urandom$ for a 3rd + party "randomness" DOS driver. One such driver, NOISE.SYS, can be + obtained from "http://www.rahul.net/dkaufman/index.html". diff --git a/src/lib/libssl/src/INSTALL.W32 b/src/lib/libssl/src/INSTALL.W32 index 0f6c302f0d..c277efa18b 100644 --- a/src/lib/libssl/src/INSTALL.W32 +++ b/src/lib/libssl/src/INSTALL.W32 @@ -46,12 +46,13 @@ http://www.kernel.org/pub/software/devel/nasm/binaries/win32/ The NASM binary nasmw.exe needs to be installed anywhere on your PATH. - Firstly you should run Configure: + Firstly you should run Configure (to build a FIPS-certified variant of + OpenSSL, add the option "fips"): > perl Configure VC-WIN32 Next you need to build the Makefiles and optionally the assembly language - files: + files (to build a FIPS-certified variant of OpenSSL, add the argument "fips"): - If you are using MASM then run: @@ -100,10 +101,12 @@ Borland C++ builder 5 --------------------- - * Configure for building with Borland Builder: + * Configure for building with Borland Builder (to build a FIPS-certified + variant of OpenSSL, add the option "fips"): > perl Configure BC-32 - * Create the appropriate makefile + * Create the appropriate makefile (to build a FIPS-certified variant of + OpenSSL, add the argument "fips") > ms\do_nasm * Build @@ -194,6 +197,8 @@ occur, try > ms\mingw32 no-asm instead. + If you want to build a FIPS-certified variant of OpenSSL, add the argument + "fips" libcrypto.a and libssl.a are the static libraries. To use the DLLs, link with libeay32.a and libssl32.a instead. diff --git a/src/lib/libssl/src/Makefile b/src/lib/libssl/src/Makefile new file mode 100644 index 0000000000..45d2befa5c --- /dev/null +++ b/src/lib/libssl/src/Makefile @@ -0,0 +1,930 @@ +### Generated automatically from Makefile.org by Configure. + +## +## Makefile for OpenSSL +## + +VERSION=0.9.7g +MAJOR=0 +MINOR=9.7 +SHLIB_VERSION_NUMBER=0.9.7 +SHLIB_VERSION_HISTORY= +SHLIB_MAJOR=0 +SHLIB_MINOR=9.7 +SHLIB_EXT= +PLATFORM=dist +OPTIONS= no-krb5 +CONFIGURE_ARGS=dist +SHLIB_TARGET= + +# HERE indicates where this Makefile lives. This can be used to indicate +# where sub-Makefiles are expected to be. Currently has very limited usage, +# and should probably not be bothered with at all. +HERE=. + +# INSTALL_PREFIX is for package builders so that they can configure +# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/. +# Normally it is left empty. +INSTALL_PREFIX= +INSTALLTOP=/usr/local/ssl + +# Do not edit this manually. Use Configure --openssldir=DIR do change this! +OPENSSLDIR=/usr/local/ssl + +# NO_IDEA - Define to build without the IDEA algorithm +# NO_RC4 - Define to build without the RC4 algorithm +# NO_RC2 - Define to build without the RC2 algorithm +# THREADS - Define when building with threads, you will probably also need any +# system defines as well, i.e. _REENTERANT for Solaris 2.[34] +# TERMIO - Define the termio terminal subsystem, needed if sgtty is missing. +# TERMIOS - Define the termios terminal subsystem, Silicon Graphics. +# LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3). +# DEVRANDOM - Give this the value of the 'random device' if your OS supports +# one. 32 bytes will be read from this when the random +# number generator is initalised. +# SSL_FORBID_ENULL - define if you want the server to be not able to use the +# NULL encryption ciphers. +# +# LOCK_DEBUG - turns on lots of lock debug output :-) +# REF_CHECK - turn on some xyz_free() assertions. +# REF_PRINT - prints some stuff on structure free. +# CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff +# MFUNC - Make all Malloc/Free/Realloc calls call +# CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to +# call application defined callbacks via CRYPTO_set_mem_functions() +# MD5_ASM needs to be defined to use the x86 assembler for MD5 +# SHA1_ASM needs to be defined to use the x86 assembler for SHA1 +# RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160 +# Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must +# equal 4. +# PKCS1_CHECK - pkcs1 tests. + +CC= cc +#CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM +CFLAG= -DOPENSSL_NO_KRB5 -O +DEPFLAG= +PEX_LIBS= +EX_LIBS= +EXE_EXT= +ARFLAGS= +AR=ar $(ARFLAGS) r +RANLIB= /usr/bin/ranlib +PERL= /usr/bin/perl +TAR= tar +TARFLAGS= --no-recursion +MAKEDEPPROG=makedepend + +# We let the C compiler driver to take care of .s files. This is done in +# order to be excused from maintaining a separate set of architecture +# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC +# gcc, then the driver will automatically translate it to -xarch=v8plus +# and pass it down to assembler. +AS=$(CC) -c +ASFLAG=$(CFLAG) + +# Set BN_ASM to bn_asm.o if you want to use the C version +BN_ASM= bn_asm.o +#BN_ASM= bn_asm.o +#BN_ASM= asm/bn86-elf.o # elf, linux-elf +#BN_ASM= asm/bn86-sol.o # solaris +#BN_ASM= asm/bn86-out.o # a.out, FreeBSD +#BN_ASM= asm/bn86bsdi.o # bsdi +#BN_ASM= asm/alpha.o # DEC Alpha +#BN_ASM= asm/pa-risc2.o # HP-UX PA-RISC +#BN_ASM= asm/r3000.o # SGI MIPS cpu +#BN_ASM= asm/sparc.o # Sun solaris/SunOS +#BN_ASM= asm/bn-win32.o # Windows 95/NT +#BN_ASM= asm/x86w16.o # 16 bit code for Windows 3.1/DOS +#BN_ASM= asm/x86w32.o # 32 bit code for Windows 3.1 + +# For x86 assembler: Set PROCESSOR to 386 if you want to support +# the 80386. +PROCESSOR= + +# Set DES_ENC to des_enc.o if you want to use the C version +#There are 4 x86 assember options. +FIPS_DES_ENC= +DES_ENC= des_enc.o fcrypt_b.o +#DES_ENC= des_enc.o fcrypt_b.o # C +#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf +#DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris +#DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD +#DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi + +# Set BF_ENC to bf_enc.o if you want to use the C version +#There are 4 x86 assember options. +BF_ENC= bf_enc.o +#BF_ENC= bf_enc.o +#BF_ENC= asm/bx86-elf.o # elf +#BF_ENC= asm/bx86-sol.o # solaris +#BF_ENC= asm/bx86-out.o # a.out, FreeBSD +#BF_ENC= asm/bx86bsdi.o # bsdi + +# Set CAST_ENC to c_enc.o if you want to use the C version +#There are 4 x86 assember options. +CAST_ENC= c_enc.o +#CAST_ENC= c_enc.o +#CAST_ENC= asm/cx86-elf.o # elf +#CAST_ENC= asm/cx86-sol.o # solaris +#CAST_ENC= asm/cx86-out.o # a.out, FreeBSD +#CAST_ENC= asm/cx86bsdi.o # bsdi + +# Set RC4_ENC to rc4_enc.o if you want to use the C version +#There are 4 x86 assember options. +RC4_ENC= rc4_enc.o +#RC4_ENC= rc4_enc.o +#RC4_ENC= asm/rx86-elf.o # elf +#RC4_ENC= asm/rx86-sol.o # solaris +#RC4_ENC= asm/rx86-out.o # a.out, FreeBSD +#RC4_ENC= asm/rx86bsdi.o # bsdi + +# Set RC5_ENC to rc5_enc.o if you want to use the C version +#There are 4 x86 assember options. +RC5_ENC= rc5_enc.o +#RC5_ENC= rc5_enc.o +#RC5_ENC= asm/r586-elf.o # elf +#RC5_ENC= asm/r586-sol.o # solaris +#RC5_ENC= asm/r586-out.o # a.out, FreeBSD +#RC5_ENC= asm/r586bsdi.o # bsdi + +# Also need MD5_ASM defined +MD5_ASM_OBJ= +#MD5_ASM_OBJ= asm/mx86-elf.o # elf +#MD5_ASM_OBJ= asm/mx86-sol.o # solaris +#MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD +#MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi + +# Also need SHA1_ASM defined +SHA1_ASM_OBJ= +FIPS_SHA1_ASM_OBJ= +#SHA1_ASM_OBJ= asm/sx86-elf.o # elf +#SHA1_ASM_OBJ= asm/sx86-sol.o # solaris +#SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD +#SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi + +# Also need RMD160_ASM defined +RMD160_ASM_OBJ= +#RMD160_ASM_OBJ= asm/rm86-elf.o # elf +#RMD160_ASM_OBJ= asm/rm86-sol.o # solaris +#RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD +#RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi + +# KRB5 stuff +KRB5_INCLUDES= +LIBKRB5= + +# When we're prepared to use shared libraries in the programs we link here +# we might set SHLIB_MARK to '$(SHARED_LIBS)'. +SHLIB_MARK= + +DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools +SHLIBDIRS= crypto ssl + +# dirs in crypto to build +SDIRS= objects \ + md2 md4 md5 sha mdc2 hmac ripemd \ + des rc2 rc4 rc5 idea bf cast \ + bn ec rsa dsa dh dso engine aes \ + buffer bio stack lhash rand err \ + evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 + +FDIRS= sha1 rand des aes dsa rsa dh + +# tests to perform. "alltests" is a special word indicating that all tests +# should be performed. +TESTS = alltests + +MAKEFILE= Makefile + +MANDIR=$(OPENSSLDIR)/man +MAN1=1 +MAN3=3 +MANSUFFIX= +SHELL=/bin/sh + +TOP= . +ONEDIRS=out tmp +EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS +WDIRS= windows +LIBS= libcrypto.a libssl.a +SIGS= libcrypto.a.sha1 +SHARED_CRYPTO=libcrypto$(SHLIB_EXT) +SHARED_SSL=libssl$(SHLIB_EXT) +SHARED_LIBS= +SHARED_LIBS_LINK_EXTS= +SHARED_LDFLAGS= + +GENERAL= Makefile +BASENAME= openssl +NAME= $(BASENAME)-$(VERSION) +TARFILE= $(NAME).tar +WTARFILE= $(NAME)-win.tar +EXHEADER= e_os2.h +HEADER= e_os.h + +# When we're prepared to use shared libraries in the programs we link here +# we might remove 'clean-shared' from the targets to perform at this stage + +all: Makefile sub_all openssl.pc + +sigs: $(SIGS) +libcrypto.a.sha1: libcrypto.a + @if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + $(RANLIB) libcrypto.a; \ + fips/sha1/fips_standalone_sha1 libcrypto.a > libcrypto.a.sha1; \ + fi + +sub_all: + @for i in $(DIRS); \ + do \ + if [ -d "$$i" ]; then \ + (cd $$i && echo "making all in $$i..." && \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \ + else \ + $(MAKE) $$i; \ + fi; \ + done; + +sub_target: + @for i in $(DIRS); \ + do \ + if [ -d "$$i" ]; then \ + (cd $$i && echo "making $(TARGET) in $$i..." && \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \ + else \ + $(MAKE) $$i; \ + fi; \ + done; + +libcrypto$(SHLIB_EXT): libcrypto.a + @if [ "$(SHLIB_TARGET)" != "" ]; then \ + $(MAKE) SHLIBDIRS=crypto build-shared; \ + else \ + echo "There's no support for shared libraries on this platform" >&2; \ + fi + +libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a + @if [ "$(SHLIB_TARGET)" != "" ]; then \ + $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ + else \ + echo "There's no support for shared libraries on this platform" >&2; \ + fi + +clean-shared: + @for i in $(SHLIBDIRS); do \ + if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \ + tmp="$(SHARED_LIBS_LINK_EXTS)"; \ + for j in $${tmp:-x}; do \ + ( set -x; rm -f lib$$i$$j ); \ + done; \ + fi; \ + ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \ + if [ "$(PLATFORM)" = "Cygwin" ]; then \ + ( set -x; rm -f cyg$$i-$(SHLIB_VERSION_NUMBER)$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \ + fi; \ + done + +link-shared: + @if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \ + tmp="$(SHARED_LIBS_LINK_EXTS)"; \ + for i in $(SHLIBDIRS); do \ + prev=lib$$i$(SHLIB_EXT); \ + for j in $${tmp:-x}; do \ + ( set -x; \ + rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \ + prev=lib$$i$$j; \ + done; \ + done; \ + fi + +build-shared: clean-shared do_$(SHLIB_TARGET) link-shared + +do_bsd-gcc-shared: do_gnu-shared +do_linux-shared: do_gnu-shared +do_gnu-shared: + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -Wl,-Bsymbolic \ + -Wl,--whole-archive lib$$i.a \ + -Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \ + libs="-l$$i $$libs"; \ + done + +DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null + +# For Darwin AKA Mac OS/X (dyld) +do_darwin-shared: + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( set -x; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \ + lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \ + -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \ + libs="-l`basename $$i${SHLIB_EXT} .dylib` $$libs"; \ + echo "" ; \ + done + +do_cygwin-shared: + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + shlib=cyg$${i}-$(SHLIB_VERSION_NUMBER).dll; \ + [ "$(PLATFORM)" = "mingw" ] && shlib=$${i}eay32.dll; \ + [ -f apps/$$shlib ] && rm apps/$$shlib; \ + [ -f test/$$shlib ] && rm test/$$shlib; \ + base=; [ $$i = "crypto" ] && base=-Wl,--image-base,0xFE00000; \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared $$base -o $$shlib \ + -Wl,-Bsymbolic \ + -Wl,--whole-archive lib$$i.a \ + -Wl,--out-implib,lib$$i.dll.a \ + -Wl,--no-whole-archive $$libs ${EX_LIBS} ) || exit 1; \ + cp -p $$shlib apps/; cp -p $$shlib test/; \ + libs="-l$$i $$libs"; \ + done + +# This assumes that GNU utilities are *not* used +do_alpha-osf1-shared: + if ${DETECT_GNU_LD}; then \ + $(MAKE) do_gnu-shared; \ + else \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -o lib$$i.so \ + -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \ + -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \ + libs="-l$$i $$libs"; \ + done; \ + fi + +# This assumes that GNU utilities are *not* used +# The difference between alpha-osf1-shared and tru64-shared is the `-msym' +# option passed to the linker. +do_tru64-shared: + if ${DETECT_GNU_LD}; then \ + $(MAKE) do_gnu-shared; \ + else \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -msym -o lib$$i.so \ + -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \ + -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \ + libs="-l$$i $$libs"; \ + done; \ + fi + +# This assumes that GNU utilities are *not* used +# The difference between tru64-shared and tru64-shared-rpath is the +# -rpath ${INSTALLTOP}/lib passed to the linker. +do_tru64-shared-rpath: + if ${DETECT_GNU_LD}; then \ + $(MAKE) do_gnu-shared; \ + else \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -msym -o lib$$i.so \ + -rpath ${INSTALLTOP}/lib \ + -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \ + -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \ + libs="-l$$i $$libs"; \ + done; \ + fi + + +# This assumes that GNU utilities are *not* used +do_solaris-shared: + if ${DETECT_GNU_LD}; then \ + $(MAKE) do_gnu-shared; \ + else \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \ + MINUSZ='-z '; \ + (${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \ + set -x; ${CC} ${SHARED_LDFLAGS} -G -dy -z text \ + -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -Wl,-Bsymbolic \ + $${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \ + $$libs ${EX_LIBS} -lc ) || exit 1; \ + libs="-l$$i $$libs"; \ + done; \ + fi + +# OpenServer 5 native compilers used +do_svr3-shared: + if ${DETECT_GNU_LD}; then \ + $(MAKE) do_gnu-shared; \ + else \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \ + find . -name "*.o" -print > allobjs ; \ + OBJS= ; export OBJS ; \ + for obj in `ar t lib$$i.a` ; do \ + OBJS="$${OBJS} `grep /$$obj allobjs`" ; \ + done ; \ + set -x; ${CC} ${SHARED_LDFLAGS} \ + -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \ + libs="-l$$i $$libs"; \ + done; \ + fi + +# UnixWare 7 and OpenUNIX 8 native compilers used +do_svr5-shared: + if ${DETECT_GNU_LD}; then \ + $(MAKE) do_gnu-shared; \ + else \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \ + SHARE_FLAG='-G'; \ + (${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \ + find . -name "*.o" -print > allobjs ; \ + OBJS= ; export OBJS ; \ + for obj in `ar t lib$$i.a` ; do \ + OBJS="$${OBJS} `grep /$$obj allobjs`" ; \ + done ; \ + set -x; LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \ + ${CC} ${SHARED_LDFLAGS} \ + $${SHARE_FLAG} -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \ + libs="-l$$i $$libs"; \ + done; \ + fi + +# This assumes that GNU utilities are *not* used +do_irix-shared: + if ${DETECT_GNU_LD}; then \ + $(MAKE) do_gnu-shared; \ + else \ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( WHOLELIB="-all lib$$i.a -none"; \ + (${CC} -v 2>&1 | grep gcc) > /dev/null && WHOLELIB="-Wl,-all,lib$$i.a,-none"; \ + set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + $${WHOLELIB} $$libs ${EX_LIBS} -lc) || exit 1; \ + libs="-l$$i $$libs"; \ + done; \ + fi + +# This assumes that GNU utilities are *not* used +# HP-UX includes the full pathname of libs we depend on, so we would get +# ./libcrypto (with ./ as path information) compiled into libssl, hence +# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto +# anyway. +# The object modules are loaded from lib$i.a using the undocumented -Fl +# option. +# +# WARNING: Until DSO is fixed to support a search path, we support SHLIB_PATH +# by temporarily specifying "+s"! +# +do_hpux-shared: + for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + if expr $(PLATFORM) : '.*ia64' > /dev/null; then \ + shlib=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + else \ + shlib=lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + fi; \ + [ -f $$shlib ] && rm -f $$shlib; \ + ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \ + +vnocompatwarnings \ + -b -z +s \ + -o $$shlib +h $$shlib \ + -Fl lib$$i.a -ldld -lc ) || exit 1; \ + chmod a=rx $$shlib; \ + done + +# This assumes that GNU utilities are *not* used +# HP-UX includes the full pathname of libs we depend on, so we would get +# ./libcrypto (with ./ as path information) compiled into libssl, hence +# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto +# anyway. +# +# HP-UX in 64bit mode has "+s" enabled by default; it will search for +# shared libraries along LD_LIBRARY_PATH _and_ SHLIB_PATH. +# +do_hpux64-shared: + for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + if expr $(PLATFORM) : '.*ia64' > /dev/null; then \ + shlib=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + else \ + shlib=lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + fi; \ + [ -f $$shlib ] && rm -f $$shlib; \ + ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \ + -b -z \ + -o $$shlib +h $$shlib \ + +forceload lib$$i.a -ldl -lc ) || exit 1; \ + chmod a=rx $$shlib; \ + done + +# The following method is said to work on all platforms. Tests will +# determine if that's how it's gong to be used. +# This assumes that for all but GNU systems, GNU utilities are *not* used. +# ALLSYMSFLAGS would be: +# GNU systems: --whole-archive +# Tru64 Unix: -all +# Solaris: -z allextract +# Irix: -all +# HP/UX-32bit: -Fl +# HP/UX-64bit: +forceload +# AIX: -bnogc +# SHAREDFLAGS would be: +# GNU systems: -shared -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +# Tru64 Unix: -shared \ +# -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" +# Solaris: -G -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +# Irix: -shared -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +# HP/UX-32bit: +vnocompatwarnings -b -z +s \ +# +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} +# HP/UX-64bit: -b -z +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} +# AIX: -G -bE:lib$$i.exp -bM:SRE +# SHAREDCMD would be: +# GNU systems: $(CC) +# Tru64 Unix: $(CC) +# Solaris: $(CC) +# Irix: $(CC) +# HP/UX-32bit: /usr/ccs/bin/ld +# HP/UX-64bit: /usr/ccs/bin/ld +# AIX: $(CC) +ALLSYMSFLAG=-bnogc +SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE +SHAREDCMD=$(CC) +do_aix-shared: + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + ( set -x; \ + OBJECT_MODE=`expr x${SHARED_LDFLAGS} : 'x\-[a-z]\([0-9]*\)'`; \ + OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \ + ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \ + ( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \ + $(SHAREDCMD) $(SHAREDFLAGS) \ + -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib$$i.o \ + $$libs ${EX_LIBS} ) ) \ + || exit 1; \ + libs="-l$$i $$libs"; \ + done + +do_reliantunix-shared: + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ + libs="$(LIBKRB5) $$libs"; \ + fi; \ + tmpdir=/tmp/openssl.$$$$ ; rm -rf $$tmpdir ; \ + ( set -x; \ + ( Opwd=`pwd` ; mkdir $$tmpdir || exit 1; \ + cd $$tmpdir || exit 1 ; ar x $$Opwd/lib$$i.a ; \ + ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} *.o \ + ) || exit 1; \ + cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \ + ) || exit 1; \ + rm -rf $$tmpdir ; \ + libs="-l$$i $$libs"; \ + done + +openssl.pc: Makefile + @ ( echo 'prefix=$(INSTALLTOP)'; \ + echo 'exec_prefix=$${prefix}'; \ + echo 'libdir=$${exec_prefix}/lib'; \ + echo 'includedir=$${prefix}/include'; \ + echo ''; \ + echo 'Name: OpenSSL'; \ + echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \ + echo 'Version: '$(VERSION); \ + echo 'Requires: '; \ + echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \ + echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc + +Makefile: Makefile.org + @echo "Makefile is older than Makefile.org." + @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please." + @false + +libclean: + rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib + +clean: libclean + rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c + @for i in $(DIRS) ;\ + do \ + if [ -d "$$i" ]; then \ + (cd $$i && echo "making clean in $$i..." && \ + $(MAKE) EXE_EXT='${EXE_EXT}' SDIRS='${SDIRS}' clean ) || exit 1; \ + rm -f $(LIBS); \ + fi; \ + done; + rm -f openssl.pc + rm -f speed.* .pure + rm -f $(TARFILE) + @for i in $(ONEDIRS) ;\ + do \ + rm -fr $$i/*; \ + done + +makefile.one: files + $(PERL) util/mk1mf.pl >makefile.one; \ + sh util/do_ms.sh + +files: + $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO + @for i in $(DIRS) ;\ + do \ + if [ -d "$$i" ]; then \ + (cd $$i && echo "making 'files' in $$i..." && \ + $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \ + fi; \ + done; + +links: + @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl + @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER) + @for i in $(DIRS); do \ + if [ -d "$$i" ]; then \ + (cd $$i && echo "making links in $$i..." && \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \ + fi; \ + done; + +gentests: + @(cd test && echo "generating dummy tests (if needed)..." && \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate ); + +dclean: + rm -f *.bak + @for i in $(DIRS) ;\ + do \ + if [ -d "$$i" ]; then \ + (cd $$i && echo "making dclean in $$i..." && \ + $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \ + fi; \ + done; + +rehash: rehash.time +rehash.time: certs + @(OPENSSL="`pwd`/util/opensslwrap.sh"; \ + OPENSSL_DEBUG_MEMORY=on; \ + export OPENSSL OPENSSL_DEBUG_MEMORY; \ + $(PERL) tools/c_rehash certs) + touch rehash.time + +test: tests + +tests: rehash + @(cd test && echo "testing..." && \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests ); + util/shlib_wrap.sh apps/openssl version -a + +report: + @$(PERL) util/selftest.pl + +depend: + @for i in $(DIRS) ;\ + do \ + if [ -d "$$i" ]; then \ + (cd $$i && echo "making dependencies $$i..." && \ + $(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \ + fi; \ + done; + +lint: + @for i in $(DIRS) ;\ + do \ + if [ -d "$$i" ]; then \ + (cd $$i && echo "making lint $$i..." && \ + $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \ + fi; \ + done; + +tags: + rm -f TAGS + find . -name '[^.]*.[ch]' | xargs etags -a + +errors: + $(PERL) util/mkerr.pl -recurse -write + (cd crypto/engine; $(MAKE) PERL=$(PERL) errors) + +stacks: + $(PERL) util/mkstack.pl -write + +util/libeay.num:: + $(PERL) util/mkdef.pl crypto update + +util/ssleay.num:: + $(PERL) util/mkdef.pl ssl update + +crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h + $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h +crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num + $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h + +apps/openssl-vms.cnf: apps/openssl.cnf + $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf + +TABLE: Configure + (echo 'Output of `Configure TABLE'"':"; \ + $(PERL) Configure TABLE) > TABLE + +update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf TABLE + +# Build distribution tar-file. As the list of files returned by "find" is +# pretty long, on several platforms a "too many arguments" error or similar +# would occur. Therefore the list of files is temporarily stored into a file +# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal +# tar does not support the --files-from option. +tar: + find . -type d -print | xargs chmod 755 + find . -type f -print | xargs chmod a+r + find . -type f -perm -0100 -print | xargs chmod a+x + find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \ + $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \ + tardy --user_number=0 --user_name=openssl \ + --group_number=0 --group_name=openssl \ + --prefix=openssl-$(VERSION) - |\ + gzip --best >../$(TARFILE).gz; \ + rm -f ../$(TARFILE).list; \ + ls -l ../$(TARFILE).gz + +tar-snap: + @$(TAR) $(TARFLAGS) -cvf - \ + `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\ + tardy --user_number=0 --user_name=openssl \ + --group_number=0 --group_name=openssl \ + --prefix=openssl-$(VERSION) - > ../$(TARFILE);\ + ls -l ../$(TARFILE) + +dist: + $(PERL) Configure dist + @$(MAKE) dist_pem_h + @$(MAKE) SDIRS='${SDIRS}' clean + @$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar + +dist_pem_h: + (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) + +install: all install_docs install_sw + +install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ + $(INSTALL_PREFIX)$(INSTALLTOP)/lib \ + $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \ + $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ + $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ + $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ + $(INSTALL_PREFIX)$(OPENSSLDIR)/private + @headerlist="$(EXHEADER)"; for i in $$headerlist ;\ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + @for i in $(DIRS) ;\ + do \ + if [ -d "$$i" ]; then \ + (cd $$i; echo "installing $$i..."; \ + $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \ + fi; \ + done + @for i in $(LIBS) ;\ + do \ + if [ -f "$$i" ]; then \ + ( echo installing $$i; \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + : ; \ + else \ + $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + fi; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ + fi; \ + done; + @if [ -n "$(SHARED_LIBS)" ]; then \ + tmp="$(SHARED_LIBS)"; \ + for i in $${tmp:-x}; \ + do \ + if [ -f "$$i" -o -f "$$i.a" ]; then \ + ( echo installing $$i; \ + if [ "$(PLATFORM)" != "Cygwin" ]; then \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ + else \ + c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ + cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ + chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ + cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ + fi ); \ + fi; \ + done; \ + ( here="`pwd`"; \ + cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ + set $(MAKE); \ + $$1 -f $$here/Makefile link-shared ); \ + if [ "$(INSTALLTOP)" != "/usr" ]; then \ + echo 'OpenSSL shared libraries have been installed in:'; \ + echo ' $(INSTALLTOP)'; \ + echo ''; \ + sed -e '1,/^$$/d' doc/openssl-shared.txt; \ + fi; \ + fi + @for i in $(SIGS) ;\ + do \ + if [ -f "$$i" ]; then \ + ( echo installing $$i; \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ + fi; \ + done; + cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc + +install_docs: + @$(PERL) $(TOP)/util/mkdir-p.pl \ + $(INSTALL_PREFIX)$(MANDIR)/man1 \ + $(INSTALL_PREFIX)$(MANDIR)/man3 \ + $(INSTALL_PREFIX)$(MANDIR)/man5 \ + $(INSTALL_PREFIX)$(MANDIR)/man7 + @pod2man="`cd util; ./pod2mantest $(PERL)`"; \ + here="`pwd`"; \ + filecase=; \ + if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \ + filecase=-i; \ + fi; \ + for i in doc/apps/*.pod; do \ + fn=`basename $$i .pod`; \ + if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \ + echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ + (cd `$(PERL) util/dirname.pl $$i`; \ + sh -c "$$pod2man \ + --section=$$sec --center=OpenSSL \ + --release=$(VERSION) `basename $$i`") \ + > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + $(PERL) util/extract-names.pl < $$i | \ + grep -v $$filecase "^$$fn\$$" | \ + grep -v "[ ]" | \ + (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ + while read n; do \ + $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ + done); \ + done; \ + for i in doc/crypto/*.pod doc/ssl/*.pod; do \ + fn=`basename $$i .pod`; \ + if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \ + echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ + (cd `$(PERL) util/dirname.pl $$i`; \ + sh -c "$$pod2man \ + --section=$$sec --center=OpenSSL \ + --release=$(VERSION) `basename $$i`") \ + > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + $(PERL) util/extract-names.pl < $$i | \ + grep -v $$filecase "^$$fn\$$" | \ + grep -v "[ ]" | \ + (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ + while read n; do \ + $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ + done); \ + done + +# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/src/lib/libssl/src/Makefile.org b/src/lib/libssl/src/Makefile.org index a987a0298b..cc4000b148 100644 --- a/src/lib/libssl/src/Makefile.org +++ b/src/lib/libssl/src/Makefile.org @@ -101,6 +101,7 @@ PROCESSOR= # Set DES_ENC to des_enc.o if you want to use the C version #There are 4 x86 assember options. +FIPS_DES_ENC= des_enc.o fcrypt_b.o DES_ENC= asm/dx86-out.o asm/yx86-out.o #DES_ENC= des_enc.o fcrypt_b.o # C #DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf @@ -153,6 +154,7 @@ MD5_ASM_OBJ= asm/mx86-out.o # Also need SHA1_ASM defined SHA1_ASM_OBJ= asm/sx86-out.o +FIPS_SHA1_ASM_OBJ= asm/sx86-out.o #SHA1_ASM_OBJ= asm/sx86-elf.o # elf #SHA1_ASM_OBJ= asm/sx86-sol.o # solaris #SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD @@ -173,23 +175,24 @@ LIBKRB5= # we might set SHLIB_MARK to '$(SHARED_LIBS)'. SHLIB_MARK= -DIRS= crypto ssl $(SHLIB_MARK) apps test tools +DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools SHLIBDIRS= crypto ssl # dirs in crypto to build -SDIRS= \ +SDIRS= objects \ md2 md4 md5 sha mdc2 hmac ripemd \ des rc2 rc4 rc5 idea bf cast \ bn ec rsa dsa dh dso engine aes \ - buffer bio stack lhash rand err objects \ + buffer bio stack lhash rand err \ evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 +FDIRS= sha1 rand des aes dsa rsa dh + # tests to perform. "alltests" is a special word indicating that all tests # should be performed. TESTS = alltests -MAKEFILE= Makefile.ssl -MAKE= make -f Makefile.ssl +MAKEFILE= Makefile MANDIR=$(OPENSSLDIR)/man MAN1=1 @@ -202,6 +205,7 @@ ONEDIRS=out tmp EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS WDIRS= windows LIBS= libcrypto.a libssl.a +SIGS= libcrypto.a.sha1 SHARED_CRYPTO=libcrypto$(SHLIB_EXT) SHARED_SSL=libssl$(SHLIB_EXT) SHARED_LIBS= @@ -219,14 +223,32 @@ HEADER= e_os.h # When we're prepared to use shared libraries in the programs we link here # we might remove 'clean-shared' from the targets to perform at this stage -all: Makefile.ssl sub_all openssl.pc +all: Makefile sub_all openssl.pc + +sigs: $(SIGS) +libcrypto.a.sha1: libcrypto.a + @if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + $(RANLIB) libcrypto.a; \ + fips/sha1/fips_standalone_sha1 libcrypto.a > libcrypto.a.sha1; \ + fi sub_all: @for i in $(DIRS); \ do \ if [ -d "$$i" ]; then \ (cd $$i && echo "making all in $$i..." && \ - $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \ + else \ + $(MAKE) $$i; \ + fi; \ + done; + +sub_target: + @for i in $(DIRS); \ + do \ + if [ -d "$$i" ]; then \ + (cd $$i && echo "making $(TARGET) in $$i..." && \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \ else \ $(MAKE) $$i; \ fi; \ @@ -312,11 +334,18 @@ do_cygwin-shared: if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ libs="$(LIBKRB5) $$libs"; \ fi; \ - ( set -x; ${CC} -shared -o cyg$$i-$(SHLIB_VERSION_NUMBER).dll \ + shlib=cyg$${i}-$(SHLIB_VERSION_NUMBER).dll; \ + [ "$(PLATFORM)" = "mingw" ] && shlib=$${i}eay32.dll; \ + [ -f apps/$$shlib ] && rm apps/$$shlib; \ + [ -f test/$$shlib ] && rm test/$$shlib; \ + base=; [ $$i = "crypto" ] && base=-Wl,--image-base,0xFE00000; \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared $$base -o $$shlib \ -Wl,-Bsymbolic \ -Wl,--whole-archive lib$$i.a \ -Wl,--out-implib,lib$$i.dll.a \ - -Wl,--no-whole-archive $$libs ) || exit 1; \ + -Wl,--no-whole-archive $$libs ${EX_LIBS} ) || exit 1; \ + cp -p $$shlib apps/; cp -p $$shlib test/; \ libs="-l$$i $$libs"; \ done @@ -392,6 +421,7 @@ do_solaris-shared: set -x; ${CC} ${SHARED_LDFLAGS} -G -dy -z text \ -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -Wl,-Bsymbolic \ $${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \ $$libs ${EX_LIBS} -lc ) || exit 1; \ libs="-l$$i $$libs"; \ @@ -456,8 +486,8 @@ do_irix-shared: if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ libs="$(LIBKRB5) $$libs"; \ fi; \ - ( WHOLELIB="-all lib$$i.a -notall"; \ - (${CC} -v 2>&1 | grep gcc) > /dev/null && WHOLELIB="-Wl,-all,lib$$i.a,-notall"; \ + ( WHOLELIB="-all lib$$i.a -none"; \ + (${CC} -v 2>&1 | grep gcc) > /dev/null && WHOLELIB="-Wl,-all,lib$$i.a,-none"; \ set -x; ${CC} ${SHARED_LDFLAGS} \ -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ @@ -482,13 +512,18 @@ do_hpux-shared: if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ libs="$(LIBKRB5) $$libs"; \ fi; \ + if expr $(PLATFORM) : '.*ia64' > /dev/null; then \ + shlib=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + else \ + shlib=lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + fi; \ + [ -f $$shlib ] && rm -f $$shlib; \ ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \ - +vnocompatwarnings \ + +vnocompatwarnings \ -b -z +s \ - -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -o $$shlib +h $$shlib \ -Fl lib$$i.a -ldld -lc ) || exit 1; \ - chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + chmod a=rx $$shlib; \ done # This assumes that GNU utilities are *not* used @@ -505,12 +540,17 @@ do_hpux64-shared: if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \ libs="$(LIBKRB5) $$libs"; \ fi; \ + if expr $(PLATFORM) : '.*ia64' > /dev/null; then \ + shlib=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + else \ + shlib=lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + fi; \ + [ -f $$shlib ] && rm -f $$shlib; \ ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \ - -b -z \ - -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + -b -z \ + -o $$shlib +h $$shlib \ +forceload lib$$i.a -ldl -lc ) || exit 1; \ - chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + chmod a=rx $$shlib; \ done # The following method is said to work on all platforms. Tests will @@ -551,6 +591,8 @@ do_aix-shared: libs="$(LIBKRB5) $$libs"; \ fi; \ ( set -x; \ + OBJECT_MODE=`expr x${SHARED_LDFLAGS} : 'x\-[a-z]\([0-9]*\)'`; \ + OBJECT_MODE=$${OBJECT_MODE:-32}; export OBJECT_MODE; \ ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \ ( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \ $(SHAREDCMD) $(SHAREDFLAGS) \ @@ -577,7 +619,7 @@ do_reliantunix-shared: libs="-l$$i $$libs"; \ done -openssl.pc: Makefile.ssl +openssl.pc: Makefile @ ( echo 'prefix=$(INSTALLTOP)'; \ echo 'exec_prefix=$${prefix}'; \ echo 'libdir=$${exec_prefix}/lib'; \ @@ -590,8 +632,8 @@ openssl.pc: Makefile.ssl echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc -Makefile.ssl: Makefile.org - @echo "Makefile.ssl is older than Makefile.org." +Makefile: Makefile.org + @echo "Makefile is older than Makefile.org." @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please." @false @@ -604,7 +646,7 @@ clean: libclean do \ if [ -d "$$i" ]; then \ (cd $$i && echo "making clean in $$i..." && \ - $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \ + $(MAKE) EXE_EXT='${EXE_EXT}' SDIRS='${SDIRS}' clean ) || exit 1; \ rm -f $(LIBS); \ fi; \ done; @@ -621,7 +663,7 @@ makefile.one: files sh util/do_ms.sh files: - $(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO + $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO @for i in $(DIRS) ;\ do \ if [ -d "$$i" ]; then \ @@ -631,19 +673,18 @@ files: done; links: - @$(TOP)/util/point.sh Makefile.ssl Makefile @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER) @for i in $(DIRS); do \ if [ -d "$$i" ]; then \ (cd $$i && echo "making links in $$i..." && \ - $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \ + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \ fi; \ done; gentests: @(cd test && echo "generating dummy tests (if needed)..." && \ - $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate ); + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate ); dclean: rm -f *.bak @@ -657,29 +698,18 @@ dclean: rehash: rehash.time rehash.time: certs - @(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \ - export OPENSSL OPENSSL_DEBUG_MEMORY; \ - LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \ - DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \ - SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \ - LIBPATH="`pwd`:$$LIBPATH"; \ - if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \ - export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \ - $(PERL) tools/c_rehash certs) + @(OPENSSL="`pwd`/util/opensslwrap.sh"; \ + OPENSSL_DEBUG_MEMORY=on; \ + export OPENSSL OPENSSL_DEBUG_MEMORY; \ + $(PERL) tools/c_rehash certs) touch rehash.time test: tests tests: rehash @(cd test && echo "testing..." && \ - $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests ); - @LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \ - DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \ - SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \ - LIBPATH="`pwd`:$$LIBPATH"; \ - if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \ - export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \ - apps/openssl version -a + $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests ); + util/shlib_wrap.sh apps/openssl version -a report: @$(PERL) util/selftest.pl @@ -703,13 +733,8 @@ lint: done; tags: - @for i in $(DIRS) ;\ - do \ - if [ -d "$$i" ]; then \ - (cd $$i && echo "making tags $$i..." && \ - $(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \ - fi; \ - done; + rm -f TAGS + find . -name '[^.]*.[ch]' | xargs etags -a errors: $(PERL) util/mkerr.pl -recurse -write @@ -729,11 +754,14 @@ crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h +apps/openssl-vms.cnf: apps/openssl.cnf + $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf + TABLE: Configure (echo 'Output of `Configure TABLE'"':"; \ $(PERL) Configure TABLE) > TABLE -update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE +update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf TABLE # Build distribution tar-file. As the list of files returned by "find" is # pretty long, on several platforms a "too many arguments" error or similar @@ -770,16 +798,17 @@ dist: dist_pem_h: (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) -install: all install_docs +install: all install_docs install_sw + +install_sw: @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ $(INSTALL_PREFIX)$(INSTALLTOP)/lib \ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \ $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/private \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/lib - @for i in $(EXHEADER) ;\ + $(INSTALL_PREFIX)$(OPENSSLDIR)/private + @headerlist="$(EXHEADER)"; for i in $$headerlist ;\ do \ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ @@ -796,7 +825,11 @@ install: all install_docs if [ -f "$$i" ]; then \ ( echo installing $$i; \ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ - $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + : ; \ + else \ + $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + fi; \ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ fi; \ @@ -833,6 +866,15 @@ install: all install_docs sed -e '1,/^$$/d' doc/openssl-shared.txt; \ fi; \ fi + @for i in $(SIGS) ;\ + do \ + if [ -f "$$i" ]; then \ + ( echo installing $$i; \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ + fi; \ + done; cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc @@ -845,7 +887,7 @@ install_docs: @pod2man="`cd util; ./pod2mantest $(PERL)`"; \ here="`pwd`"; \ filecase=; \ - if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" ]; then \ + if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \ filecase=-i; \ fi; \ for i in doc/apps/*.pod; do \ diff --git a/src/lib/libssl/src/NEWS b/src/lib/libssl/src/NEWS index 4c1ba0a241..8e1ce65a5f 100644 --- a/src/lib/libssl/src/NEWS +++ b/src/lib/libssl/src/NEWS @@ -5,12 +5,34 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g: + + o More compilation issues fixed. + o Adaptation to more modern Kerberos API. + o Enhanced or corrected configuration for Solaris64, Mingw and Cygwin. + o Enhanced x86_64 assembler BIGNUM module. + o More constification. + o Added processing of proxy certificates (RFC 3820). + + Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f: + + o Several compilation issues fixed. + o Many memory allocation failure checks added. + o Improved comparison of X509 Name type. + o Mandatory basic checks on certificates. + o Performance improvements. + + Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e: + + o Fix race condition in CRL checking code. + o Fixes to PKCS#7 (S/MIME) code. + Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d: o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug o Security: Fix null-pointer assignment in do_change_cipher_spec() o Allow multiple active certificates with same subject in CA index - o Multiple X590 verification fixes + o Multiple X509 verification fixes o Speed up HMAC and other operations Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c: diff --git a/src/lib/libssl/src/PROBLEMS b/src/lib/libssl/src/PROBLEMS index 85e96a5ebe..cbefadb40e 100644 --- a/src/lib/libssl/src/PROBLEMS +++ b/src/lib/libssl/src/PROBLEMS @@ -12,8 +12,8 @@ along the whole library path before it bothers looking for .a libraries. This means that -L switches won't matter unless OpenSSL is built with shared library support. -The workaround may be to change the following lines in apps/Makefile.ssl and -test/Makefile.ssl: +The workaround may be to change the following lines in apps/Makefile and +test/Makefile: LIBCRYPTO=-L.. -lcrypto LIBSSL=-L.. -lssl @@ -90,15 +90,6 @@ failures in other parts of the code. Workaround: modify the target to +O2 when building with no-asm. -* Poor support for AIX shared builds. - -do_aix-shared rule is not flexible enough to parameterize through a -config-line. './Configure aix43-cc shared' is working, but not -'./Configure aix64-gcc shared'. In latter case make fails to create shared -libraries. It's possible to build 64-bit shared libraries by running -'env OBJECT_MODE=64 make', but we need more elegant solution. Preferably one -supporting even gcc shared builds. See RT#463 for background information. - * Problems building shared libraries on SCO OpenServer Release 5.0.6 with gcc 2.95.3 diff --git a/src/lib/libssl/src/README b/src/lib/libssl/src/README index f72a21036f..c52c2d94bd 100644 --- a/src/lib/libssl/src/README +++ b/src/lib/libssl/src/README @@ -1,7 +1,7 @@ - OpenSSL 0.9.7d 17 Mar 2004 + OpenSSL 0.9.7g 11 April 2005 - Copyright (c) 1998-2004 The OpenSSL Project + Copyright (c) 1998-2005 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. @@ -173,11 +173,17 @@ textual explanation of what your patch does. Note: For legal reasons, contributions from the US can be accepted only - if a TSA notification and a copy of the patch is sent to crypt@bis.doc.gov; - see http://www.bis.doc.gov/Encryption/PubAvailEncSourceCodeNofify.html [sic] - and http://w3.access.gpo.gov/bis/ear/pdf/740.pdf (EAR Section 740.13(e)). - - The preferred format for changes is "diff -u" output. You might + if a TSU notification and a copy of the patch are sent to crypt@bis.doc.gov + (formerly BXA) with a copy to the ENC Encryption Request Coordinator; + please take some time to look at + http://www.bis.doc.gov/Encryption/PubAvailEncSourceCodeNofify.html [sic] + and + http://w3.access.gpo.gov/bis/ear/pdf/740.pdf (EAR Section 740.13(e)) + for the details. If "your encryption source code is too large to serve as + an email attachment", they are glad to receive it by fax instead; hope you + have a cheap long-distance plan. + + Our preferred format for changes is "diff -u" output. You might generate it like this: # cd openssl-work diff --git a/src/lib/libssl/src/VMS/VMSify-conf.pl b/src/lib/libssl/src/VMS/VMSify-conf.pl new file mode 100644 index 0000000000..d3be6a29e7 --- /dev/null +++ b/src/lib/libssl/src/VMS/VMSify-conf.pl @@ -0,0 +1,34 @@ +#! /usr/bin/perl + +use strict; +use warnings; + +my @directory_vars = ( "dir", "certs", "crl_dir", "new_certs_dir" ); +my @file_vars = ( "database", "certificate", "serial", "crlnumber", + "crl", "private_key", "RANDFILE" ); +while() { + chomp; + foreach my $d (@directory_vars) { + if (/^(\s*\#?\s*${d}\s*=\s*)\.\/([^\s\#]*)([\s\#].*)$/) { + $_ = "$1sys\\\$disk:\[.$2$3"; + } elsif (/^(\s*\#?\s*${d}\s*=\s*)(\w[^\s\#]*)([\s\#].*)$/) { + $_ = "$1sys\\\$disk:\[.$2$3"; + } + s/^(\s*\#?\s*${d}\s*=\s*\$\w+)\/([^\s\#]*)([\s\#].*)$/$1.$2\]$3/; + while(/^(\s*\#?\s*${d}\s*=\s*(\$\w+\.|sys\\\$disk:\[\.)[\w\.]+)\/([^\]]*)\](.*)$/) { + $_ = "$1.$3]$4"; + } + } + foreach my $f (@file_vars) { + s/^(\s*\#?\s*${f}\s*=\s*)\.\/(.*)$/$1sys\\\$disk:\[\/$2/; + while(/^(\s*\#?\s*${f}\s*=\s*(\$\w+|sys\\\$disk:\[)[^\/]*)\/(\w+\/[^\s\#]*)([\s\#].*)$/) { + $_ = "$1.$3$4"; + } + if (/^(\s*\#?\s*${f}\s*=\s*(\$\w+|sys\\\$disk:\[)[^\/]*)\/(\w+)([\s\#].*)$/) { + $_ = "$1]$3.$4"; + } elsif (/^(\s*\#?\s*${f}\s*=\s*(\$\w+|sys\\\$disk:\[)[^\/]*)\/([^\s\#]*)([\s\#].*)$/) { + $_ = "$1]$3$4"; + } + } + print $_,"\n"; +} diff --git a/src/lib/libssl/src/VMS/mkshared.com b/src/lib/libssl/src/VMS/mkshared.com index afdc85bbe0..19f3821bc6 100644 --- a/src/lib/libssl/src/VMS/mkshared.com +++ b/src/lib/libssl/src/VMS/mkshared.com @@ -266,6 +266,14 @@ $ falsesum = falsesum + 1 $ endif $ if plat_entry .eqs. "VMS" then truesum = truesum + 1 $ if plat_entry .eqs. "!VMS" then falsesum = falsesum + 1 +$ if f$trnlnm("OPENSSL_FIPS") .nes. "" +$ then +$ if plat_entry .eqs. "OPENSSL_FIPS" then truesum = truesum + 1 +$ if plat_entry .eqs. "!OPENSSL_FIPS" then falsesum = falsesum + 1 +$ else +$ if plat_entry .eqs. "OPENSSL_FIPS" then falsesum = falsesum + 1 +$ if plat_entry .eqs. "!OPENSSL_FIPS" then truesum = truesum + 1 +$ endif $ goto loop1 $ endif $ endloop1: diff --git a/src/lib/libssl/src/apps/CA.pl b/src/lib/libssl/src/apps/CA.pl index 8b2ce7ea42..4f3ba0f08c 100644 --- a/src/lib/libssl/src/apps/CA.pl +++ b/src/lib/libssl/src/apps/CA.pl @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl # # CA - wrapper around ca to make it easier to use ... basically ca requires # some setup stuff to be done before you can use it and this makes @@ -36,13 +36,21 @@ # default openssl.cnf file has setup as per the following # demoCA ... where everything is stored +my $openssl; +if(defined $ENV{OPENSSL}) { + $openssl = $ENV{OPENSSL}; +} else { + $openssl = "openssl"; + $ENV{OPENSSL} = $openssl; +} + $SSLEAY_CONFIG=$ENV{"SSLEAY_CONFIG"}; $DAYS="-days 365"; -$REQ="openssl req $SSLEAY_CONFIG"; -$CA="openssl ca $SSLEAY_CONFIG"; -$VERIFY="openssl verify"; -$X509="openssl x509"; -$PKCS12="openssl pkcs12"; +$REQ="$openssl req $SSLEAY_CONFIG"; +$CA="$openssl ca $SSLEAY_CONFIG"; +$VERIFY="$openssl verify"; +$X509="$openssl x509"; +$PKCS12="$openssl pkcs12"; $CATOP="./demoCA"; $CAKEY="cakey.pem"; @@ -82,9 +90,6 @@ foreach (@ARGV) { mkdir "${CATOP}/crl", $DIRMODE ; mkdir "${CATOP}/newcerts", $DIRMODE; mkdir "${CATOP}/private", $DIRMODE; - open OUT, ">${CATOP}/serial"; - print OUT "01\n"; - close OUT; open OUT, ">${CATOP}/index.txt"; close OUT; } @@ -106,6 +111,10 @@ foreach (@ARGV) { $RET=$?; } } + if (! -f "${CATOP}/serial" ) { + system ("$X509 -in ${CATOP}/$CACERT -noout " + . "-next_serial -out ${CATOP}/serial"); + } } elsif (/^-pkcs12$/) { my $cname = $ARGV[1]; $cname = "My Certificate" unless defined $cname; diff --git a/src/lib/libssl/src/apps/CA.pl.in b/src/lib/libssl/src/apps/CA.pl.in index 8b2ce7ea42..39f267d313 100644 --- a/src/lib/libssl/src/apps/CA.pl.in +++ b/src/lib/libssl/src/apps/CA.pl.in @@ -36,13 +36,21 @@ # default openssl.cnf file has setup as per the following # demoCA ... where everything is stored +my $openssl; +if(defined $ENV{OPENSSL}) { + $openssl = $ENV{OPENSSL}; +} else { + $openssl = "openssl"; + $ENV{OPENSSL} = $openssl; +} + $SSLEAY_CONFIG=$ENV{"SSLEAY_CONFIG"}; $DAYS="-days 365"; -$REQ="openssl req $SSLEAY_CONFIG"; -$CA="openssl ca $SSLEAY_CONFIG"; -$VERIFY="openssl verify"; -$X509="openssl x509"; -$PKCS12="openssl pkcs12"; +$REQ="$openssl req $SSLEAY_CONFIG"; +$CA="$openssl ca $SSLEAY_CONFIG"; +$VERIFY="$openssl verify"; +$X509="$openssl x509"; +$PKCS12="$openssl pkcs12"; $CATOP="./demoCA"; $CAKEY="cakey.pem"; @@ -82,9 +90,6 @@ foreach (@ARGV) { mkdir "${CATOP}/crl", $DIRMODE ; mkdir "${CATOP}/newcerts", $DIRMODE; mkdir "${CATOP}/private", $DIRMODE; - open OUT, ">${CATOP}/serial"; - print OUT "01\n"; - close OUT; open OUT, ">${CATOP}/index.txt"; close OUT; } @@ -106,6 +111,10 @@ foreach (@ARGV) { $RET=$?; } } + if (! -f "${CATOP}/serial" ) { + system ("$X509 -in ${CATOP}/$CACERT -noout " + . "-next_serial -out ${CATOP}/serial"); + } } elsif (/^-pkcs12$/) { my $cname = $ARGV[1]; $cname = "My Certificate" unless defined $cname; diff --git a/src/lib/libssl/src/apps/CA.sh b/src/lib/libssl/src/apps/CA.sh index d9f3069fb2..030a11fc25 100644 --- a/src/lib/libssl/src/apps/CA.sh +++ b/src/lib/libssl/src/apps/CA.sh @@ -30,11 +30,13 @@ # default openssl.cnf file has setup as per the following # demoCA ... where everything is stored +if [ -z "$OPENSSL" ]; then OPENSSL=openssl; fi + DAYS="-days 365" -REQ="openssl req $SSLEAY_CONFIG" -CA="openssl ca $SSLEAY_CONFIG" -VERIFY="openssl verify" -X509="openssl x509" +REQ="$OPENSSL req $SSLEAY_CONFIG" +CA="$OPENSSL ca $SSLEAY_CONFIG" +VERIFY="$OPENSSL verify" +X509="$OPENSSL x509" CATOP=./demoCA CAKEY=./cakey.pem diff --git a/src/lib/libssl/src/apps/Makefile b/src/lib/libssl/src/apps/Makefile new file mode 100644 index 0000000000..93dcf765e6 --- /dev/null +++ b/src/lib/libssl/src/apps/Makefile @@ -0,0 +1,1168 @@ +# +# apps/Makefile +# + +DIR= apps +TOP= .. +CC= cc +INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES) +CFLAG= -g -static +INSTALL_PREFIX= +INSTALLTOP= /usr/local/ssl +OPENSSLDIR= /usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +PERL= perl +RM= rm -f +# KRB5 stuff +KRB5_INCLUDES= +LIBKRB5= + +PEX_LIBS= +EX_LIBS= +EXE_EXT= + +SHLIB_TARGET= + +CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG) + +GENERAL=Makefile makeapps.com install.com + +DLIBCRYPTO=../libcrypto.a +DLIBSSL=../libssl.a +LIBCRYPTO=-L.. -lcrypto +LIBSSL=-L.. -lssl + +PROGRAM= openssl + +SCRIPTS=CA.sh CA.pl + +EXE= $(PROGRAM)$(EXE_EXT) + +E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \ + ca crl rsa rsautl dsa dsaparam \ + x509 genrsa gendsa s_server s_client speed \ + s_time version pkcs7 crl2pkcs7 sess_id ciphers nseq pkcs12 \ + pkcs8 spkac smime rand engine ocsp prime + +PROGS= $(PROGRAM).c + +A_OBJ=apps.o +A_SRC=apps.c +S_OBJ= s_cb.o s_socket.o +S_SRC= s_cb.c s_socket.c +RAND_OBJ=app_rand.o +RAND_SRC=app_rand.c + +E_OBJ= verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o \ + ca.o pkcs7.o crl2p7.o crl.o \ + rsa.o rsautl.o dsa.o dsaparam.o \ + x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o \ + s_time.o $(A_OBJ) $(S_OBJ) $(RAND_OBJ) version.o sess_id.o \ + ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o prime.o + +E_SRC= verify.c asn1pars.c req.c dgst.c dh.c enc.c passwd.c gendh.c errstr.c ca.c \ + pkcs7.c crl2p7.c crl.c \ + rsa.c rsautl.c dsa.c dsaparam.c \ + x509.c genrsa.c gendsa.c s_server.c s_client.c speed.c \ + s_time.c $(A_SRC) $(S_SRC) $(RAND_SRC) version.c sess_id.c \ + ciphers.c nseq.c pkcs12.c pkcs8.c spkac.c smime.c rand.c engine.c ocsp.c prime.c + +SRC=$(E_SRC) + +EXHEADER= +HEADER= apps.h progs.h s_apps.h \ + testdsa.h testrsa.h \ + $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + @(cd ..; $(MAKE) DIRS=$(DIR) all) + +all: exe + +exe: $(EXE) + +req: sreq.o $(A_OBJ) $(DLIBCRYPTO) + LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(RAND_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + +sreq.o: req.c + $(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +install: + @for i in $(EXE); \ + do \ + (echo installing $$i; \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ + chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ + done; + @for i in $(SCRIPTS); \ + do \ + (echo installing $$i; \ + cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \ + chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \ + done + @cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \ + chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \ + mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf + +tags: + ctags $(SRC) + +tests: + +links: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) + rm -f req + +$(DLIBSSL): + (cd ..; $(MAKE) DIRS=ssl all) + +$(DLIBCRYPTO): + (cd ..; $(MAKE) DIRS=crypto all) + +$(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL) + $(RM) $(EXE) + if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + set -x; $${CC:-$(CC)} -o $(EXE) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \ + elif [ -z "$(SHARED_LIBS)" ]; then \ + set -x; $${CC:-$(CC)} -o $(EXE) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \ + else \ + set -x; LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $(EXE) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \ + fi + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(EXE); \ + fi + -(cd ..; \ + OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \ + $(PERL) tools/c_rehash certs) + +progs.h: progs.pl + $(PERL) progs.pl $(E_EXE) >progs.h + $(RM) $(PROGRAM).o + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +app_rand.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +app_rand.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +app_rand.o: ../include/openssl/bn.h ../include/openssl/buffer.h +app_rand.o: ../include/openssl/cast.h ../include/openssl/conf.h +app_rand.o: ../include/openssl/crypto.h ../include/openssl/des.h +app_rand.o: ../include/openssl/des_old.h ../include/openssl/dh.h +app_rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +app_rand.o: ../include/openssl/engine.h ../include/openssl/err.h +app_rand.o: ../include/openssl/evp.h ../include/openssl/idea.h +app_rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h +app_rand.o: ../include/openssl/md4.h ../include/openssl/md5.h +app_rand.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +app_rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +app_rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +app_rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +app_rand.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +app_rand.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +app_rand.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h +app_rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +app_rand.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h app_rand.c +app_rand.o: apps.h +apps.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +apps.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h +apps.o: ../include/openssl/cast.h ../include/openssl/conf.h +apps.o: ../include/openssl/crypto.h ../include/openssl/des.h +apps.o: ../include/openssl/des_old.h ../include/openssl/dh.h +apps.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +apps.o: ../include/openssl/engine.h ../include/openssl/err.h +apps.o: ../include/openssl/evp.h ../include/openssl/idea.h +apps.o: ../include/openssl/lhash.h ../include/openssl/md2.h +apps.o: ../include/openssl/md4.h ../include/openssl/md5.h +apps.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +apps.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +apps.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h +apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h +apps.o: ../include/openssl/rand.h ../include/openssl/rc2.h +apps.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +apps.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h +apps.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +apps.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +apps.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +apps.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.c apps.h +asn1pars.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +asn1pars.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +asn1pars.o: ../include/openssl/bn.h ../include/openssl/buffer.h +asn1pars.o: ../include/openssl/cast.h ../include/openssl/conf.h +asn1pars.o: ../include/openssl/crypto.h ../include/openssl/des.h +asn1pars.o: ../include/openssl/des_old.h ../include/openssl/dh.h +asn1pars.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +asn1pars.o: ../include/openssl/engine.h ../include/openssl/err.h +asn1pars.o: ../include/openssl/evp.h ../include/openssl/idea.h +asn1pars.o: ../include/openssl/lhash.h ../include/openssl/md2.h +asn1pars.o: ../include/openssl/md4.h ../include/openssl/md5.h +asn1pars.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +asn1pars.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h +asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +asn1pars.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +asn1pars.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +asn1pars.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h +asn1pars.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +asn1pars.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h +asn1pars.o: asn1pars.c +ca.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ca.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ca.o: ../include/openssl/cast.h ../include/openssl/conf.h +ca.o: ../include/openssl/crypto.h ../include/openssl/des.h +ca.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ca.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ca.o: ../include/openssl/engine.h ../include/openssl/err.h +ca.o: ../include/openssl/evp.h ../include/openssl/idea.h +ca.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ca.o: ../include/openssl/md4.h ../include/openssl/md5.h +ca.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ca.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ca.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ca.o: ../include/openssl/rand.h ../include/openssl/rc2.h +ca.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ca.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ca.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +ca.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ca.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ca.c +ciphers.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ciphers.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ciphers.o: ../include/openssl/cast.h ../include/openssl/comp.h +ciphers.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ciphers.o: ../include/openssl/des.h ../include/openssl/des_old.h +ciphers.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ciphers.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h +ciphers.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ciphers.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ciphers.o: ../include/openssl/md4.h ../include/openssl/md5.h +ciphers.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ciphers.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +ciphers.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +ciphers.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +ciphers.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ciphers.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +ciphers.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ciphers.o: ../include/openssl/x509_vfy.h apps.h ciphers.c +crl.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +crl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +crl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +crl.o: ../include/openssl/cast.h ../include/openssl/conf.h +crl.o: ../include/openssl/crypto.h ../include/openssl/des.h +crl.o: ../include/openssl/des_old.h ../include/openssl/dh.h +crl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +crl.o: ../include/openssl/engine.h ../include/openssl/err.h +crl.o: ../include/openssl/evp.h ../include/openssl/idea.h +crl.o: ../include/openssl/lhash.h ../include/openssl/md2.h +crl.o: ../include/openssl/md4.h ../include/openssl/md5.h +crl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +crl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h +crl.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +crl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +crl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +crl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +crl.o: ../include/openssl/sha.h ../include/openssl/stack.h +crl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +crl.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +crl.o: ../include/openssl/x509v3.h apps.h crl.c +crl2p7.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +crl2p7.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +crl2p7.o: ../include/openssl/bn.h ../include/openssl/buffer.h +crl2p7.o: ../include/openssl/cast.h ../include/openssl/conf.h +crl2p7.o: ../include/openssl/crypto.h ../include/openssl/des.h +crl2p7.o: ../include/openssl/des_old.h ../include/openssl/dh.h +crl2p7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +crl2p7.o: ../include/openssl/engine.h ../include/openssl/err.h +crl2p7.o: ../include/openssl/evp.h ../include/openssl/idea.h +crl2p7.o: ../include/openssl/lhash.h ../include/openssl/md2.h +crl2p7.o: ../include/openssl/md4.h ../include/openssl/md5.h +crl2p7.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +crl2p7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h +crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +crl2p7.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +crl2p7.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +crl2p7.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h +crl2p7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +crl2p7.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h +crl2p7.o: crl2p7.c +dgst.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +dgst.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +dgst.o: ../include/openssl/bn.h ../include/openssl/buffer.h +dgst.o: ../include/openssl/cast.h ../include/openssl/conf.h +dgst.o: ../include/openssl/crypto.h ../include/openssl/des.h +dgst.o: ../include/openssl/des_old.h ../include/openssl/dh.h +dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dgst.o: ../include/openssl/engine.h ../include/openssl/err.h +dgst.o: ../include/openssl/evp.h ../include/openssl/hmac.h +dgst.o: ../include/openssl/idea.h ../include/openssl/lhash.h +dgst.o: ../include/openssl/md2.h ../include/openssl/md4.h +dgst.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dgst.o: ../include/openssl/rand.h ../include/openssl/rc2.h +dgst.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +dgst.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dgst.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +dgst.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +dgst.o: ../include/openssl/x509_vfy.h apps.h dgst.c +dh.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +dh.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h +dh.o: ../include/openssl/cast.h ../include/openssl/conf.h +dh.o: ../include/openssl/crypto.h ../include/openssl/des.h +dh.o: ../include/openssl/des_old.h ../include/openssl/dh.h +dh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dh.o: ../include/openssl/engine.h ../include/openssl/err.h +dh.o: ../include/openssl/evp.h ../include/openssl/idea.h +dh.o: ../include/openssl/lhash.h ../include/openssl/md2.h +dh.o: ../include/openssl/md4.h ../include/openssl/md5.h +dh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +dh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +dh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +dh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +dh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +dh.o: ../include/openssl/sha.h ../include/openssl/stack.h +dh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +dh.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dh.c +dsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +dsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +dsa.o: ../include/openssl/cast.h ../include/openssl/conf.h +dsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +dsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dsa.o: ../include/openssl/engine.h ../include/openssl/err.h +dsa.o: ../include/openssl/evp.h ../include/openssl/idea.h +dsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h +dsa.o: ../include/openssl/md4.h ../include/openssl/md5.h +dsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +dsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +dsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +dsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +dsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h +dsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +dsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dsa.c +dsaparam.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +dsaparam.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h +dsaparam.o: ../include/openssl/cast.h ../include/openssl/conf.h +dsaparam.o: ../include/openssl/crypto.h ../include/openssl/des.h +dsaparam.o: ../include/openssl/des_old.h ../include/openssl/dh.h +dsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h +dsaparam.o: ../include/openssl/evp.h ../include/openssl/idea.h +dsaparam.o: ../include/openssl/lhash.h ../include/openssl/md2.h +dsaparam.o: ../include/openssl/md4.h ../include/openssl/md5.h +dsaparam.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +dsaparam.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +dsaparam.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +dsaparam.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +dsaparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +dsaparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +dsaparam.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h +dsaparam.o: dsaparam.c +enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h +enc.o: ../include/openssl/cast.h ../include/openssl/conf.h +enc.o: ../include/openssl/crypto.h ../include/openssl/des.h +enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h +enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +enc.o: ../include/openssl/engine.h ../include/openssl/err.h +enc.o: ../include/openssl/evp.h ../include/openssl/idea.h +enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h +enc.o: ../include/openssl/md4.h ../include/openssl/md5.h +enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h +enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +enc.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +enc.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +enc.o: ../include/openssl/sha.h ../include/openssl/stack.h +enc.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +enc.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h enc.c +engine.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +engine.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h +engine.o: ../include/openssl/cast.h ../include/openssl/comp.h +engine.o: ../include/openssl/conf.h ../include/openssl/crypto.h +engine.o: ../include/openssl/des.h ../include/openssl/des_old.h +engine.o: ../include/openssl/dh.h ../include/openssl/dsa.h +engine.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +engine.o: ../include/openssl/err.h ../include/openssl/evp.h +engine.o: ../include/openssl/idea.h ../include/openssl/kssl.h +engine.o: ../include/openssl/lhash.h ../include/openssl/md2.h +engine.o: ../include/openssl/md4.h ../include/openssl/md5.h +engine.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +engine.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h +engine.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +engine.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +engine.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +engine.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h +engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +engine.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +engine.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +engine.o: ../include/openssl/x509_vfy.h apps.h engine.c +errstr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +errstr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h +errstr.o: ../include/openssl/cast.h ../include/openssl/comp.h +errstr.o: ../include/openssl/conf.h ../include/openssl/crypto.h +errstr.o: ../include/openssl/des.h ../include/openssl/des_old.h +errstr.o: ../include/openssl/dh.h ../include/openssl/dsa.h +errstr.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +errstr.o: ../include/openssl/err.h ../include/openssl/evp.h +errstr.o: ../include/openssl/idea.h ../include/openssl/kssl.h +errstr.o: ../include/openssl/lhash.h ../include/openssl/md2.h +errstr.o: ../include/openssl/md4.h ../include/openssl/md5.h +errstr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +errstr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +errstr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +errstr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +errstr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +errstr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +errstr.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +errstr.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +errstr.o: ../include/openssl/x509_vfy.h apps.h errstr.c +gendh.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +gendh.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h +gendh.o: ../include/openssl/cast.h ../include/openssl/conf.h +gendh.o: ../include/openssl/crypto.h ../include/openssl/des.h +gendh.o: ../include/openssl/des_old.h ../include/openssl/dh.h +gendh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +gendh.o: ../include/openssl/engine.h ../include/openssl/err.h +gendh.o: ../include/openssl/evp.h ../include/openssl/idea.h +gendh.o: ../include/openssl/lhash.h ../include/openssl/md2.h +gendh.o: ../include/openssl/md4.h ../include/openssl/md5.h +gendh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +gendh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +gendh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h +gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +gendh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +gendh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h +gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +gendh.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h gendh.c +gendsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +gendsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +gendsa.o: ../include/openssl/cast.h ../include/openssl/conf.h +gendsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +gendsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h +gendsa.o: ../include/openssl/evp.h ../include/openssl/idea.h +gendsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h +gendsa.o: ../include/openssl/md4.h ../include/openssl/md5.h +gendsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +gendsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +gendsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +gendsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +gendsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h +gendsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +gendsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h +gendsa.o: gendsa.c +genrsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +genrsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +genrsa.o: ../include/openssl/cast.h ../include/openssl/conf.h +genrsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +genrsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +genrsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h +genrsa.o: ../include/openssl/evp.h ../include/openssl/idea.h +genrsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h +genrsa.o: ../include/openssl/md4.h ../include/openssl/md5.h +genrsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +genrsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +genrsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +genrsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +genrsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h +genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +genrsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h +genrsa.o: genrsa.c +nseq.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +nseq.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +nseq.o: ../include/openssl/bn.h ../include/openssl/buffer.h +nseq.o: ../include/openssl/cast.h ../include/openssl/conf.h +nseq.o: ../include/openssl/crypto.h ../include/openssl/des.h +nseq.o: ../include/openssl/des_old.h ../include/openssl/dh.h +nseq.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +nseq.o: ../include/openssl/engine.h ../include/openssl/err.h +nseq.o: ../include/openssl/evp.h ../include/openssl/idea.h +nseq.o: ../include/openssl/lhash.h ../include/openssl/md2.h +nseq.o: ../include/openssl/md4.h ../include/openssl/md5.h +nseq.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +nseq.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h +nseq.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +nseq.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +nseq.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +nseq.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h +nseq.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +nseq.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h nseq.c +ocsp.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ocsp.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ocsp.o: ../include/openssl/cast.h ../include/openssl/comp.h +ocsp.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ocsp.o: ../include/openssl/des.h ../include/openssl/des_old.h +ocsp.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ocsp.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h +ocsp.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ocsp.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ocsp.o: ../include/openssl/md4.h ../include/openssl/md5.h +ocsp.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ocsp.o: ../include/openssl/rand.h ../include/openssl/rc2.h +ocsp.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ocsp.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h +ocsp.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c +openssl.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +openssl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +openssl.o: ../include/openssl/cast.h ../include/openssl/comp.h +openssl.o: ../include/openssl/conf.h ../include/openssl/crypto.h +openssl.o: ../include/openssl/des.h ../include/openssl/des_old.h +openssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h +openssl.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +openssl.o: ../include/openssl/err.h ../include/openssl/evp.h +openssl.o: ../include/openssl/fips.h ../include/openssl/idea.h +openssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +openssl.o: ../include/openssl/md2.h ../include/openssl/md4.h +openssl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +openssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +openssl.o: ../include/openssl/rand.h ../include/openssl/rc2.h +openssl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +openssl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +openssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +openssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +openssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +openssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +openssl.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h +openssl.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +openssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h +openssl.o: openssl.c progs.h s_apps.h +passwd.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +passwd.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +passwd.o: ../include/openssl/bn.h ../include/openssl/buffer.h +passwd.o: ../include/openssl/cast.h ../include/openssl/conf.h +passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h +passwd.o: ../include/openssl/des_old.h ../include/openssl/dh.h +passwd.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +passwd.o: ../include/openssl/engine.h ../include/openssl/err.h +passwd.o: ../include/openssl/evp.h ../include/openssl/idea.h +passwd.o: ../include/openssl/lhash.h ../include/openssl/md2.h +passwd.o: ../include/openssl/md4.h ../include/openssl/md5.h +passwd.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +passwd.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +passwd.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +passwd.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +passwd.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +passwd.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +passwd.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h +passwd.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +passwd.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +passwd.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h +passwd.o: passwd.c +pkcs12.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +pkcs12.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +pkcs12.o: ../include/openssl/bn.h ../include/openssl/buffer.h +pkcs12.o: ../include/openssl/cast.h ../include/openssl/conf.h +pkcs12.o: ../include/openssl/crypto.h ../include/openssl/des.h +pkcs12.o: ../include/openssl/des_old.h ../include/openssl/dh.h +pkcs12.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +pkcs12.o: ../include/openssl/engine.h ../include/openssl/err.h +pkcs12.o: ../include/openssl/evp.h ../include/openssl/idea.h +pkcs12.o: ../include/openssl/lhash.h ../include/openssl/md2.h +pkcs12.o: ../include/openssl/md4.h ../include/openssl/md5.h +pkcs12.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +pkcs12.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +pkcs12.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +pkcs12.o: ../include/openssl/pem.h ../include/openssl/pem2.h +pkcs12.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h +pkcs12.o: ../include/openssl/rand.h ../include/openssl/rc2.h +pkcs12.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +pkcs12.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +pkcs12.o: ../include/openssl/safestack.h ../include/openssl/sha.h +pkcs12.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +pkcs12.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +pkcs12.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +pkcs12.o: ../include/openssl/x509_vfy.h apps.h pkcs12.c +pkcs7.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +pkcs7.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +pkcs7.o: ../include/openssl/bn.h ../include/openssl/buffer.h +pkcs7.o: ../include/openssl/cast.h ../include/openssl/conf.h +pkcs7.o: ../include/openssl/crypto.h ../include/openssl/des.h +pkcs7.o: ../include/openssl/des_old.h ../include/openssl/dh.h +pkcs7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +pkcs7.o: ../include/openssl/engine.h ../include/openssl/err.h +pkcs7.o: ../include/openssl/evp.h ../include/openssl/idea.h +pkcs7.o: ../include/openssl/lhash.h ../include/openssl/md2.h +pkcs7.o: ../include/openssl/md4.h ../include/openssl/md5.h +pkcs7.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +pkcs7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +pkcs7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +pkcs7.o: ../include/openssl/pem.h ../include/openssl/pem2.h +pkcs7.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +pkcs7.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +pkcs7.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +pkcs7.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +pkcs7.o: ../include/openssl/sha.h ../include/openssl/stack.h +pkcs7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +pkcs7.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +pkcs7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h pkcs7.c +pkcs8.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +pkcs8.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +pkcs8.o: ../include/openssl/bn.h ../include/openssl/buffer.h +pkcs8.o: ../include/openssl/cast.h ../include/openssl/conf.h +pkcs8.o: ../include/openssl/crypto.h ../include/openssl/des.h +pkcs8.o: ../include/openssl/des_old.h ../include/openssl/dh.h +pkcs8.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +pkcs8.o: ../include/openssl/engine.h ../include/openssl/err.h +pkcs8.o: ../include/openssl/evp.h ../include/openssl/idea.h +pkcs8.o: ../include/openssl/lhash.h ../include/openssl/md2.h +pkcs8.o: ../include/openssl/md4.h ../include/openssl/md5.h +pkcs8.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +pkcs8.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +pkcs8.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +pkcs8.o: ../include/openssl/pem.h ../include/openssl/pem2.h +pkcs8.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h +pkcs8.o: ../include/openssl/rand.h ../include/openssl/rc2.h +pkcs8.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +pkcs8.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +pkcs8.o: ../include/openssl/safestack.h ../include/openssl/sha.h +pkcs8.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +pkcs8.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +pkcs8.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +pkcs8.o: ../include/openssl/x509_vfy.h apps.h pkcs8.c +prime.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +prime.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +prime.o: ../include/openssl/bn.h ../include/openssl/buffer.h +prime.o: ../include/openssl/cast.h ../include/openssl/conf.h +prime.o: ../include/openssl/crypto.h ../include/openssl/des.h +prime.o: ../include/openssl/des_old.h ../include/openssl/dh.h +prime.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +prime.o: ../include/openssl/engine.h ../include/openssl/err.h +prime.o: ../include/openssl/evp.h ../include/openssl/idea.h +prime.o: ../include/openssl/lhash.h ../include/openssl/md2.h +prime.o: ../include/openssl/md4.h ../include/openssl/md5.h +prime.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +prime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +prime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +prime.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +prime.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +prime.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +prime.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +prime.o: ../include/openssl/sha.h ../include/openssl/stack.h +prime.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +prime.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +prime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h prime.c +rand.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +rand.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +rand.o: ../include/openssl/bn.h ../include/openssl/buffer.h +rand.o: ../include/openssl/cast.h ../include/openssl/conf.h +rand.o: ../include/openssl/crypto.h ../include/openssl/des.h +rand.o: ../include/openssl/des_old.h ../include/openssl/dh.h +rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +rand.o: ../include/openssl/engine.h ../include/openssl/err.h +rand.o: ../include/openssl/evp.h ../include/openssl/idea.h +rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h +rand.o: ../include/openssl/md4.h ../include/openssl/md5.h +rand.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +rand.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +rand.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +rand.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +rand.o: ../include/openssl/sha.h ../include/openssl/stack.h +rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +rand.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h rand.c +req.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h +req.o: ../include/openssl/asn1.h ../include/openssl/bio.h +req.o: ../include/openssl/blowfish.h ../include/openssl/bn.h +req.o: ../include/openssl/buffer.h ../include/openssl/cast.h +req.o: ../include/openssl/conf.h ../include/openssl/crypto.h +req.o: ../include/openssl/des.h ../include/openssl/des_old.h +req.o: ../include/openssl/dh.h ../include/openssl/dsa.h +req.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +req.o: ../include/openssl/err.h ../include/openssl/evp.h +req.o: ../include/openssl/idea.h ../include/openssl/lhash.h +req.o: ../include/openssl/md2.h ../include/openssl/md4.h +req.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +req.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +req.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +req.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +req.o: ../include/openssl/rand.h ../include/openssl/rc2.h +req.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +req.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +req.o: ../include/openssl/safestack.h ../include/openssl/sha.h +req.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +req.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +req.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +req.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h req.c +rsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +rsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +rsa.o: ../include/openssl/cast.h ../include/openssl/conf.h +rsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +rsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +rsa.o: ../include/openssl/engine.h ../include/openssl/err.h +rsa.o: ../include/openssl/evp.h ../include/openssl/idea.h +rsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h +rsa.o: ../include/openssl/md4.h ../include/openssl/md5.h +rsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +rsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +rsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +rsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +rsa.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +rsa.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +rsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +rsa.o: ../include/openssl/sha.h ../include/openssl/stack.h +rsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +rsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h rsa.c +rsautl.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +rsautl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +rsautl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +rsautl.o: ../include/openssl/cast.h ../include/openssl/conf.h +rsautl.o: ../include/openssl/crypto.h ../include/openssl/des.h +rsautl.o: ../include/openssl/des_old.h ../include/openssl/dh.h +rsautl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +rsautl.o: ../include/openssl/engine.h ../include/openssl/err.h +rsautl.o: ../include/openssl/evp.h ../include/openssl/idea.h +rsautl.o: ../include/openssl/lhash.h ../include/openssl/md2.h +rsautl.o: ../include/openssl/md4.h ../include/openssl/md5.h +rsautl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +rsautl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +rsautl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +rsautl.o: ../include/openssl/pem.h ../include/openssl/pem2.h +rsautl.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +rsautl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +rsautl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +rsautl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +rsautl.o: ../include/openssl/sha.h ../include/openssl/stack.h +rsautl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +rsautl.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +rsautl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h +rsautl.o: rsautl.c +s_cb.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s_cb.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_cb.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_cb.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_cb.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_cb.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_cb.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_cb.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +s_cb.o: ../include/openssl/err.h ../include/openssl/evp.h +s_cb.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s_cb.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s_cb.o: ../include/openssl/md4.h ../include/openssl/md5.h +s_cb.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s_cb.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s_cb.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s_cb.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s_cb.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s_cb.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s_cb.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s_cb.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s_cb.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s_cb.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s_cb.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s_cb.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s_cb.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +s_cb.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s_cb.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_cb.c +s_client.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s_client.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_client.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_client.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_client.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_client.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_client.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +s_client.o: ../include/openssl/err.h ../include/openssl/evp.h +s_client.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s_client.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s_client.o: ../include/openssl/md4.h ../include/openssl/md5.h +s_client.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s_client.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s_client.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s_client.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s_client.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s_client.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s_client.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s_client.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s_client.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s_client.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s_client.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s_client.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +s_client.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s_client.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_client.c +s_server.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s_server.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_server.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_server.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_server.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_server.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_server.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +s_server.o: ../include/openssl/err.h ../include/openssl/evp.h +s_server.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s_server.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s_server.o: ../include/openssl/md4.h ../include/openssl/md5.h +s_server.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s_server.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s_server.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s_server.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s_server.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s_server.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s_server.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s_server.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s_server.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s_server.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s_server.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s_server.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s_server.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +s_server.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s_server.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_server.c +s_socket.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s_socket.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_socket.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_socket.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_socket.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_socket.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_socket.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_socket.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +s_socket.o: ../include/openssl/err.h ../include/openssl/evp.h +s_socket.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s_socket.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s_socket.o: ../include/openssl/md4.h ../include/openssl/md5.h +s_socket.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s_socket.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s_socket.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s_socket.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s_socket.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s_socket.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s_socket.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s_socket.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s_socket.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s_socket.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s_socket.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s_socket.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +s_socket.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s_socket.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_socket.c +s_time.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s_time.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_time.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_time.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_time.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_time.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_time.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_time.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +s_time.o: ../include/openssl/err.h ../include/openssl/evp.h +s_time.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s_time.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s_time.o: ../include/openssl/md4.h ../include/openssl/md5.h +s_time.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s_time.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s_time.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s_time.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s_time.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s_time.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s_time.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s_time.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s_time.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s_time.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s_time.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s_time.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s_time.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +s_time.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s_time.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_time.c +sess_id.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +sess_id.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +sess_id.o: ../include/openssl/bn.h ../include/openssl/buffer.h +sess_id.o: ../include/openssl/cast.h ../include/openssl/comp.h +sess_id.o: ../include/openssl/conf.h ../include/openssl/crypto.h +sess_id.o: ../include/openssl/des.h ../include/openssl/des_old.h +sess_id.o: ../include/openssl/dh.h ../include/openssl/dsa.h +sess_id.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +sess_id.o: ../include/openssl/err.h ../include/openssl/evp.h +sess_id.o: ../include/openssl/idea.h ../include/openssl/kssl.h +sess_id.o: ../include/openssl/lhash.h ../include/openssl/md2.h +sess_id.o: ../include/openssl/md4.h ../include/openssl/md5.h +sess_id.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +sess_id.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +sess_id.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +sess_id.o: ../include/openssl/pem.h ../include/openssl/pem2.h +sess_id.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +sess_id.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +sess_id.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +sess_id.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +sess_id.o: ../include/openssl/sha.h ../include/openssl/ssl.h +sess_id.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +sess_id.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +sess_id.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +sess_id.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +sess_id.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +sess_id.o: ../include/openssl/x509_vfy.h apps.h sess_id.c +smime.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +smime.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +smime.o: ../include/openssl/bn.h ../include/openssl/buffer.h +smime.o: ../include/openssl/cast.h ../include/openssl/conf.h +smime.o: ../include/openssl/crypto.h ../include/openssl/des.h +smime.o: ../include/openssl/des_old.h ../include/openssl/dh.h +smime.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +smime.o: ../include/openssl/engine.h ../include/openssl/err.h +smime.o: ../include/openssl/evp.h ../include/openssl/idea.h +smime.o: ../include/openssl/lhash.h ../include/openssl/md2.h +smime.o: ../include/openssl/md4.h ../include/openssl/md5.h +smime.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +smime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +smime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +smime.o: ../include/openssl/pem.h ../include/openssl/pem2.h +smime.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +smime.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +smime.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +smime.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +smime.o: ../include/openssl/sha.h ../include/openssl/stack.h +smime.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +smime.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +smime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h smime.c +speed.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +speed.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +speed.o: ../include/openssl/bn.h ../include/openssl/buffer.h +speed.o: ../include/openssl/cast.h ../include/openssl/conf.h +speed.o: ../include/openssl/crypto.h ../include/openssl/des.h +speed.o: ../include/openssl/des_old.h ../include/openssl/dh.h +speed.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +speed.o: ../include/openssl/engine.h ../include/openssl/err.h +speed.o: ../include/openssl/evp.h ../include/openssl/hmac.h +speed.o: ../include/openssl/idea.h ../include/openssl/lhash.h +speed.o: ../include/openssl/md2.h ../include/openssl/md4.h +speed.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +speed.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +speed.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h +speed.o: ../include/openssl/rand.h ../include/openssl/rc2.h +speed.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +speed.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +speed.o: ../include/openssl/safestack.h ../include/openssl/sha.h +speed.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +speed.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +speed.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +speed.o: ../include/openssl/x509_vfy.h apps.h speed.c testdsa.h testrsa.h +spkac.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +spkac.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +spkac.o: ../include/openssl/bn.h ../include/openssl/buffer.h +spkac.o: ../include/openssl/cast.h ../include/openssl/conf.h +spkac.o: ../include/openssl/crypto.h ../include/openssl/des.h +spkac.o: ../include/openssl/des_old.h ../include/openssl/dh.h +spkac.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +spkac.o: ../include/openssl/engine.h ../include/openssl/err.h +spkac.o: ../include/openssl/evp.h ../include/openssl/idea.h +spkac.o: ../include/openssl/lhash.h ../include/openssl/md2.h +spkac.o: ../include/openssl/md4.h ../include/openssl/md5.h +spkac.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +spkac.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +spkac.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +spkac.o: ../include/openssl/pem.h ../include/openssl/pem2.h +spkac.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +spkac.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +spkac.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +spkac.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +spkac.o: ../include/openssl/sha.h ../include/openssl/stack.h +spkac.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +spkac.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +spkac.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h spkac.c +verify.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +verify.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +verify.o: ../include/openssl/bn.h ../include/openssl/buffer.h +verify.o: ../include/openssl/cast.h ../include/openssl/conf.h +verify.o: ../include/openssl/crypto.h ../include/openssl/des.h +verify.o: ../include/openssl/des_old.h ../include/openssl/dh.h +verify.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +verify.o: ../include/openssl/engine.h ../include/openssl/err.h +verify.o: ../include/openssl/evp.h ../include/openssl/idea.h +verify.o: ../include/openssl/lhash.h ../include/openssl/md2.h +verify.o: ../include/openssl/md4.h ../include/openssl/md5.h +verify.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +verify.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +verify.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +verify.o: ../include/openssl/pem.h ../include/openssl/pem2.h +verify.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +verify.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +verify.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +verify.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +verify.o: ../include/openssl/sha.h ../include/openssl/stack.h +verify.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +verify.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +verify.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +verify.o: ../include/openssl/x509v3.h apps.h verify.c +version.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +version.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +version.o: ../include/openssl/bn.h ../include/openssl/buffer.h +version.o: ../include/openssl/cast.h ../include/openssl/conf.h +version.o: ../include/openssl/crypto.h ../include/openssl/des.h +version.o: ../include/openssl/des_old.h ../include/openssl/dh.h +version.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +version.o: ../include/openssl/engine.h ../include/openssl/err.h +version.o: ../include/openssl/evp.h ../include/openssl/idea.h +version.o: ../include/openssl/lhash.h ../include/openssl/md2.h +version.o: ../include/openssl/md4.h ../include/openssl/md5.h +version.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +version.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +version.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +version.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +version.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +version.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +version.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +version.o: ../include/openssl/sha.h ../include/openssl/stack.h +version.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +version.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +version.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h +version.o: version.c +x509.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +x509.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +x509.o: ../include/openssl/bn.h ../include/openssl/buffer.h +x509.o: ../include/openssl/cast.h ../include/openssl/conf.h +x509.o: ../include/openssl/crypto.h ../include/openssl/des.h +x509.o: ../include/openssl/des_old.h ../include/openssl/dh.h +x509.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +x509.o: ../include/openssl/engine.h ../include/openssl/err.h +x509.o: ../include/openssl/evp.h ../include/openssl/idea.h +x509.o: ../include/openssl/lhash.h ../include/openssl/md2.h +x509.o: ../include/openssl/md4.h ../include/openssl/md5.h +x509.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +x509.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +x509.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +x509.o: ../include/openssl/pem.h ../include/openssl/pem2.h +x509.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +x509.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +x509.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +x509.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +x509.o: ../include/openssl/sha.h ../include/openssl/stack.h +x509.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +x509.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +x509.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +x509.o: ../include/openssl/x509v3.h apps.h x509.c diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c index 93a665e788..9157cdfcdc 100644 --- a/src/lib/libssl/src/apps/apps.c +++ b/src/lib/libssl/src/apps/apps.c @@ -126,16 +126,6 @@ #include #endif -#ifdef OPENSSL_SYS_WINDOWS -#define strcasecmp _stricmp -#else -# ifdef NO_STRINGS_H - int strcasecmp(); -# else -# include -# endif /* NO_STRINGS_H */ -#endif - #define NON_MAIN #include "apps.h" #undef NON_MAIN @@ -340,60 +330,6 @@ void program_name(char *in, char *out, int size) #endif #endif -#ifdef OPENSSL_SYS_WIN32 -int WIN32_rename(char *from, char *to) - { -#ifndef OPENSSL_SYS_WINCE - /* Windows rename gives an error if 'to' exists, so delete it - * first and ignore file not found errror - */ - if((remove(to) != 0) && (errno != ENOENT)) - return -1; -#undef rename - return rename(from, to); -#else - /* convert strings to UNICODE */ - { - BOOL result = FALSE; - WCHAR* wfrom; - WCHAR* wto; - int i; - wfrom = malloc((strlen(from)+1)*2); - wto = malloc((strlen(to)+1)*2); - if (wfrom != NULL && wto != NULL) - { - for (i=0; i<(int)strlen(from)+1; i++) - wfrom[i] = (short)from[i]; - for (i=0; i<(int)strlen(to)+1; i++) - wto[i] = (short)to[i]; - result = MoveFile(wfrom, wto); - } - if (wfrom != NULL) - free(wfrom); - if (wto != NULL) - free(wto); - return result; - } -#endif - } -#endif - -#ifdef OPENSSL_SYS_VMS -int VMS_strcasecmp(const char *str1, const char *str2) - { - while (*str1 && *str2) - { - int res = toupper(*str1) - toupper(*str2); - if (res) return res < 0 ? -1 : 1; - } - if (*str1) - return 1; - if (*str2) - return -1; - return 0; - } -#endif - int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[]) { int num,len,i; @@ -590,7 +526,7 @@ int password_callback(char *buf, int bufsiz, int verify, char *prompt = NULL; prompt = UI_construct_prompt(ui, "pass phrase", - cb_data->prompt_info); + prompt_info); ui_flags |= UI_INPUT_FLAG_DEFAULT_PWD; UI_ctrl(ui, UI_CTRL_PRINT_ERRORS, 1, 0, 0); @@ -739,6 +675,51 @@ int add_oid_section(BIO *err, CONF *conf) return 1; } +static int load_pkcs12(BIO *err, BIO *in, const char *desc, + pem_password_cb *pem_cb, void *cb_data, + EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca) + { + const char *pass; + char tpass[PEM_BUFSIZE]; + int len, ret = 0; + PKCS12 *p12; + p12 = d2i_PKCS12_bio(in, NULL); + if (p12 == NULL) + { + BIO_printf(err, "Error loading PKCS12 file for %s\n", desc); + goto die; + } + /* See if an empty password will do */ + if (PKCS12_verify_mac(p12, "", 0) || PKCS12_verify_mac(p12, NULL, 0)) + pass = ""; + else + { + if (!pem_cb) + pem_cb = (pem_password_cb *)password_callback; + len = pem_cb(tpass, PEM_BUFSIZE, 0, cb_data); + if (len < 0) + { + BIO_printf(err, "Passpharse callback error for %s\n", + desc); + goto die; + } + if (len < PEM_BUFSIZE) + tpass[len] = 0; + if (!PKCS12_verify_mac(p12, tpass, len)) + { + BIO_printf(err, + "Mac verify error (wrong password?) in PKCS12 file for %s\n", desc); + goto die; + } + pass = tpass; + } + ret = PKCS12_parse(p12, pass, pkey, cert, ca); + die: + if (p12) + PKCS12_free(p12); + return ret; + } + X509 *load_cert(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *cert_descrip) { @@ -819,11 +800,9 @@ X509 *load_cert(BIO *err, const char *file, int format, (pem_password_cb *)password_callback, NULL); else if (format == FORMAT_PKCS12) { - PKCS12 *p12 = d2i_PKCS12_bio(cert, NULL); - - PKCS12_parse(p12, NULL, NULL, &x, NULL); - PKCS12_free(p12); - p12 = NULL; + if (!load_pkcs12(err, cert,cert_descrip, NULL, NULL, + NULL, &x, NULL)) + goto end; } else { BIO_printf(err,"bad input format specified for %s\n", @@ -902,11 +881,10 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin, #endif else if (format == FORMAT_PKCS12) { - PKCS12 *p12 = d2i_PKCS12_bio(key, NULL); - - PKCS12_parse(p12, pass, &pkey, NULL, NULL); - PKCS12_free(p12); - p12 = NULL; + if (!load_pkcs12(err, key, key_descrip, + (pem_password_cb *)password_callback, &cb_data, + &pkey, NULL, NULL)) + goto end; } else { @@ -1486,12 +1464,9 @@ BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai) } else { - ASN1_INTEGER_set(ai,1); ret=BN_new(); - if (ret == NULL) + if (ret == NULL || !rand_serial(ret, ai)) BIO_printf(bio_err, "Out of memory\n"); - else - BN_one(ret); } } else @@ -1653,6 +1628,33 @@ int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix) return 0; } +int rand_serial(BIGNUM *b, ASN1_INTEGER *ai) + { + BIGNUM *btmp; + int ret = 0; + if (b) + btmp = b; + else + btmp = BN_new(); + + if (!btmp) + return 0; + + if (!BN_pseudo_rand(btmp, SERIAL_RAND_BITS, 0, 0)) + goto error; + if (ai && !BN_to_ASN1_INTEGER(btmp, ai)) + goto error; + + ret = 1; + + error: + + if (!b) + BN_free(btmp); + + return ret; + } + CA_DB *load_index(char *dbfile, DB_ATTR *db_attr) { CA_DB *retdb = NULL; @@ -1970,6 +1972,48 @@ int rotate_index(char *dbfile, char *new_suffix, char *old_suffix) void free_index(CA_DB *db) { - TXT_DB_free(db->db); - OPENSSL_free(db); + if (db) + { + if (db->db) TXT_DB_free(db->db); + OPENSSL_free(db); + } } + +/* This code MUST COME AFTER anything that uses rename() */ +#ifdef OPENSSL_SYS_WIN32 +int WIN32_rename(char *from, char *to) + { +#ifndef OPENSSL_SYS_WINCE + /* Windows rename gives an error if 'to' exists, so delete it + * first and ignore file not found errror + */ + if((remove(to) != 0) && (errno != ENOENT)) + return -1; +#undef rename + return rename(from, to); +#else + /* convert strings to UNICODE */ + { + BOOL result = FALSE; + WCHAR* wfrom; + WCHAR* wto; + int i; + wfrom = malloc((strlen(from)+1)*2); + wto = malloc((strlen(to)+1)*2); + if (wfrom != NULL && wto != NULL) + { + for (i=0; i<(int)strlen(from)+1; i++) + wfrom[i] = (short)from[i]; + for (i=0; i<(int)strlen(to)+1; i++) + wto[i] = (short)to[i]; + result = MoveFile(wfrom, wto); + } + if (wfrom != NULL) + free(wfrom); + if (wto != NULL) + free(wto); + return result; + } +#endif + } +#endif diff --git a/src/lib/libssl/src/apps/apps.h b/src/lib/libssl/src/apps/apps.h index 8a9c4ab0a0..4320410dad 100644 --- a/src/lib/libssl/src/apps/apps.h +++ b/src/lib/libssl/src/apps/apps.h @@ -141,12 +141,6 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read, int WIN32_rename(char *oldname,char *newname); #endif -/* VMS below version 7.0 doesn't have strcasecmp() */ -#ifdef OPENSSL_SYS_VMS -#define strcasecmp(str1,str2) VMS_strcasecmp((str1),(str2)) -int VMS_strcasecmp(const char *str1, const char *str2); -#endif - #ifndef MONOLITH #define MAIN(a,v) main(a,v) @@ -154,9 +148,11 @@ int VMS_strcasecmp(const char *str1, const char *str2); #ifndef NON_MAIN CONF *config=NULL; BIO *bio_err=NULL; +int in_FIPS_mode=0; #else extern CONF *config; extern BIO *bio_err; +extern int in_FIPS_mode; #endif #else @@ -165,6 +161,7 @@ extern BIO *bio_err; extern CONF *config; extern char *default_config_file; extern BIO *bio_err; +extern int in_FIPS_mode; #endif @@ -313,6 +310,7 @@ typedef struct ca_db_st BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai); int save_serial(char *serialfile, char *suffix, BIGNUM *serial, ASN1_INTEGER **retai); int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix); +int rand_serial(BIGNUM *b, ASN1_INTEGER *ai); CA_DB *load_index(char *dbfile, DB_ATTR *dbattr); int index_index(CA_DB *db); int save_index(char *dbfile, char *suffix, CA_DB *db); @@ -341,4 +339,6 @@ X509_NAME *do_subject(char *str, long chtype); #define APP_PASS_LEN 1024 +#define SERIAL_RAND_BITS 64 + #endif diff --git a/src/lib/libssl/src/apps/asn1pars.c b/src/lib/libssl/src/apps/asn1pars.c index 7db40adf04..c89b358b23 100644 --- a/src/lib/libssl/src/apps/asn1pars.c +++ b/src/lib/libssl/src/apps/asn1pars.c @@ -278,6 +278,7 @@ bad: tmplen=num; for (i=0; ivalue.asn1_string->data; tmplen=at->value.asn1_string->length; diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c index 2db61b1eae..e98885d7e3 100644 --- a/src/lib/libssl/src/apps/ca.c +++ b/src/lib/libssl/src/apps/ca.c @@ -76,16 +76,6 @@ #include #include -#ifdef OPENSSL_SYS_WINDOWS -#define strcasecmp _stricmp -#else -# ifdef NO_STRINGS_H - int strcasecmp(); -# else -# include -# endif /* NO_STRINGS_H */ -#endif - #ifndef W_OK # ifdef OPENSSL_SYS_VMS # if defined(__DECC) @@ -248,6 +238,7 @@ int MAIN(int argc, char **argv) { ENGINE *e = NULL; char *key=NULL,*passargin=NULL; + int create_ser = 0; int free_key = 0; int total=0; int total_done=0; @@ -547,10 +538,6 @@ bad: ERR_load_crypto_strings(); -#ifndef OPENSSL_NO_ENGINE - e = setup_engine(bio_err, engine, 0); -#endif - /*****************************************************************/ tofree=NULL; if (configfile == NULL) configfile = getenv("OPENSSL_CONF"); @@ -595,6 +582,10 @@ bad: if (!load_config(bio_err, conf)) goto err; +#ifndef OPENSSL_NO_ENGINE + e = setup_engine(bio_err, engine, 0); +#endif + /* Lets get the config section we are using */ if (section == NULL) { @@ -666,8 +657,10 @@ bad: break; } } -#ifdef RL_DEBUG else + ERR_clear_error(); +#ifdef RL_DEBUG + if (!p) BIO_printf(bio_err, "DEBUG: unique_subject undefined\n", p); #endif #ifdef RL_DEBUG @@ -1001,25 +994,27 @@ bad: } } + if ((md == NULL) && ((md=NCONF_get_string(conf, + section,ENV_DEFAULT_MD)) == NULL)) + { + lookup_fail(section,ENV_DEFAULT_MD); + goto err; + } + + if ((dgst=EVP_get_digestbyname(md)) == NULL) + { + BIO_printf(bio_err,"%s is an unsupported message digest type\n",md); + goto err; + } + if (req) { - if ((md == NULL) && ((md=NCONF_get_string(conf, - section,ENV_DEFAULT_MD)) == NULL)) - { - lookup_fail(section,ENV_DEFAULT_MD); - goto err; - } if ((email_dn == 1) && ((tmp_email_dn=NCONF_get_string(conf, section,ENV_DEFAULT_EMAIL_DN)) != NULL )) { if(strcmp(tmp_email_dn,"no") == 0) email_dn=0; } - if ((dgst=EVP_get_digestbyname(md)) == NULL) - { - BIO_printf(bio_err,"%s is an unsupported message digest type\n",md); - goto err; - } if (verbose) BIO_printf(bio_err,"message digest is %s\n", OBJ_nid2ln(dgst->type)); @@ -1106,7 +1101,7 @@ bad: goto err; } - if ((serial=load_serial(serialfile, 0, NULL)) == NULL) + if ((serial=load_serial(serialfile, create_ser, NULL)) == NULL) { BIO_printf(bio_err,"error while loading serial number\n"); goto err; @@ -1402,23 +1397,10 @@ bad: /* we now have a CRL */ if (verbose) BIO_printf(bio_err,"signing CRL\n"); - if (md != NULL) - { - if ((dgst=EVP_get_digestbyname(md)) == NULL) - { - BIO_printf(bio_err,"%s is an unsupported message digest type\n",md); - goto err; - } - } - else - { #ifndef OPENSSL_NO_DSA - if (pkey->type == EVP_PKEY_DSA) - dgst=EVP_dss1(); - else + if (pkey->type == EVP_PKEY_DSA) + dgst=EVP_dss1(); #endif - dgst=EVP_md5(); - } /* Add any extensions asked for */ diff --git a/src/lib/libssl/src/apps/crl.c b/src/lib/libssl/src/apps/crl.c index 81d66587c1..878f65468e 100644 --- a/src/lib/libssl/src/apps/crl.c +++ b/src/lib/libssl/src/apps/crl.c @@ -355,7 +355,11 @@ bad: if (text) X509_CRL_print(out, x); - if (noout) goto end; + if (noout) + { + ret = 0; + goto end; + } if (outformat == FORMAT_ASN1) i=(int)i2d_X509_CRL_bio(out,x); diff --git a/src/lib/libssl/src/apps/dgst.c b/src/lib/libssl/src/apps/dgst.c index be25dafef7..17fb87b77c 100644 --- a/src/lib/libssl/src/apps/dgst.c +++ b/src/lib/libssl/src/apps/dgst.c @@ -66,6 +66,7 @@ #include #include #include +#include #undef BUFSIZE #define BUFSIZE 1024*8 @@ -73,9 +74,11 @@ #undef PROG #define PROG dgst_main +static HMAC_CTX hmac_ctx; + int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title, - const char *file); + const char *file,BIO *bmd,const char *hmac_key, int non_fips_allow); int MAIN(int, char **); @@ -100,9 +103,12 @@ int MAIN(int argc, char **argv) EVP_PKEY *sigkey = NULL; unsigned char *sigbuf = NULL; int siglen = 0; + char *passargin = NULL, *passin = NULL; #ifndef OPENSSL_NO_ENGINE char *engine=NULL; #endif + char *hmac_key=NULL; + int non_fips_allow = 0; apps_startup(); @@ -145,6 +151,12 @@ int MAIN(int argc, char **argv) if (--argc < 1) break; keyfile=*(++argv); } + else if (!strcmp(*argv,"-passin")) + { + if (--argc < 1) + break; + passargin=*++argv; + } else if (strcmp(*argv,"-verify") == 0) { if (--argc < 1) break; @@ -181,6 +193,14 @@ int MAIN(int argc, char **argv) out_bin = 1; else if (strcmp(*argv,"-d") == 0) debug=1; + else if (strcmp(*argv,"-non-fips-allow") == 0) + non_fips_allow=1; + else if (!strcmp(*argv,"-hmac")) + { + if (--argc < 1) + break; + hmac_key=*++argv; + } else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL) md=m; else @@ -235,7 +255,7 @@ int MAIN(int argc, char **argv) } #ifndef OPENSSL_NO_ENGINE - e = setup_engine(bio_err, engine, 0); + e = setup_engine(bio_err, engine, 0); #endif in=BIO_new(BIO_s_file()); @@ -247,6 +267,12 @@ int MAIN(int argc, char **argv) BIO_set_callback_arg(in,bio_err); } + if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) + { + BIO_printf(bio_err, "Error getting password\n"); + goto end; + } + if ((in == NULL) || (bmd == NULL)) { ERR_print_errors(bio_err); @@ -288,7 +314,7 @@ int MAIN(int argc, char **argv) sigkey = load_pubkey(bio_err, keyfile, keyform, 0, NULL, e, "key file"); else - sigkey = load_key(bio_err, keyfile, keyform, 0, NULL, + sigkey = load_key(bio_err, keyfile, keyform, 0, passin, e, "key file"); if (!sigkey) { @@ -318,18 +344,30 @@ int MAIN(int argc, char **argv) goto end; } } - + if (non_fips_allow) + { + EVP_MD_CTX *md_ctx; + BIO_get_md_ctx(bmd,&md_ctx); + EVP_MD_CTX_set_flags(md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); + } /* we use md as a filter, reading from 'in' */ - BIO_set_md(bmd,md); + if (!BIO_set_md(bmd,md)) + { + BIO_printf(bio_err, "Error setting digest %s\n", + EVP_MD_name(md)); + ERR_print_errors(bio_err); + goto end; + } + inp=BIO_push(bmd,in); if (argc == 0) { BIO_set_fp(in,stdin,BIO_NOCLOSE); err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf, - siglen,"","(stdin)"); + siglen,"","(stdin)",bmd,hmac_key, non_fips_allow); } else { @@ -347,14 +385,15 @@ int MAIN(int argc, char **argv) } if(!out_bin) { - size_t len = strlen(name)+strlen(argv[i])+5; + size_t len = strlen(name)+strlen(argv[i])+(hmac_key ? 5 : 0)+5; tmp=tofree=OPENSSL_malloc(len); - BIO_snprintf(tmp,len,"%s(%s)= ",name,argv[i]); + BIO_snprintf(tmp,len,"%s%s(%s)= ", + hmac_key ? "HMAC-" : "",name,argv[i]); } else tmp=""; r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf, - siglen,tmp,argv[i]); + siglen,tmp,argv[i],bmd,hmac_key,non_fips_allow); if(r) err=r; if(tofree) @@ -369,6 +408,8 @@ end: OPENSSL_free(buf); } if (in != NULL) BIO_free(in); + if (passin) + OPENSSL_free(passin); BIO_free_all(out); EVP_PKEY_free(sigkey); if(sigbuf) OPENSSL_free(sigbuf); @@ -379,11 +420,25 @@ end: int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title, - const char *file) + const char *file,BIO *bmd,const char *hmac_key, int non_fips_allow) { - int len; + unsigned int len; int i; + EVP_MD_CTX *md_ctx; + if (hmac_key) + { + EVP_MD *md; + + BIO_get_md(bmd,&md); + HMAC_CTX_init(&hmac_ctx); + if (non_fips_allow) + HMAC_CTX_set_flags(&hmac_ctx, + EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); + HMAC_Init_ex(&hmac_ctx,hmac_key,strlen(hmac_key),md, NULL); + BIO_get_md_ctx(bmd,&md_ctx); + BIO_set_md_ctx(bmd,&hmac_ctx.md_ctx); + } for (;;) { i=BIO_read(bp,(char *)buf,BUFSIZE); @@ -426,6 +481,11 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, return 1; } } + else if(hmac_key) + { + HMAC_Final(&hmac_ctx,buf,&len); + HMAC_CTX_cleanup(&hmac_ctx); + } else len=BIO_gets(bp,(char *)buf,BUFSIZE); @@ -433,7 +493,7 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, else { BIO_write(out,title,strlen(title)); - for (i=0; i"); @@ -296,6 +309,20 @@ bad: e = setup_engine(bio_err, engine, 0); #endif + if (md && (dgst=EVP_get_digestbyname(md)) == NULL) + { + BIO_printf(bio_err,"%s is an unsupported message digest type\n",md); + goto end; + } + + if (dgst == NULL) + { + if (in_FIPS_mode) + dgst = EVP_sha1(); + else + dgst = EVP_md5(); + } + if (bufsize != NULL) { unsigned long n; @@ -483,7 +510,7 @@ bad: sptr = salt; } - EVP_BytesToKey(cipher,EVP_md5(),sptr, + EVP_BytesToKey(cipher,dgst,sptr, (unsigned char *)str, strlen(str),1,key,iv); /* zero the complete buffer or the string @@ -516,13 +543,43 @@ bad: if ((benc=BIO_new(BIO_f_cipher())) == NULL) goto end; - BIO_set_cipher(benc,cipher,key,iv,enc); - if (nopad) + + /* Since we may be changing parameters work on the encryption + * context rather than calling BIO_set_cipher(). + */ + + BIO_get_cipher_ctx(benc, &ctx); + if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc)) { - EVP_CIPHER_CTX *ctx; - BIO_get_cipher_ctx(benc, &ctx); + BIO_printf(bio_err, "Error setting cipher %s\n", + EVP_CIPHER_name(cipher)); + ERR_print_errors(bio_err); + goto end; + } + + if (non_fips_allow) + EVP_CIPHER_CTX_set_flags(ctx, + EVP_CIPH_FLAG_NON_FIPS_ALLOW); + + if (!EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, enc)) + { + BIO_printf(bio_err, "Error setting cipher %s\n", + EVP_CIPHER_name(cipher)); + ERR_print_errors(bio_err); + goto end; + } + + if (nopad) EVP_CIPHER_CTX_set_padding(ctx, 0); + + if (!EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, enc)) + { + BIO_printf(bio_err, "Error setting cipher %s\n", + EVP_CIPHER_name(cipher)); + ERR_print_errors(bio_err); + goto end; } + if (debug) { BIO_set_callback(benc,BIO_debug_callback); diff --git a/src/lib/libssl/src/apps/makeapps.com b/src/lib/libssl/src/apps/makeapps.com index 0197c8a171..2f1af9ec94 100644 --- a/src/lib/libssl/src/apps/makeapps.com +++ b/src/lib/libssl/src/apps/makeapps.com @@ -142,13 +142,13 @@ $ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+- "RSA;RSAUTL;DSA;DSAPARAM;"+- "X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+- "S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+- - "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP" + "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP;PRIME" $ APP_FILES := OPENSSL,'OBJ_DIR'VERIFY.OBJ,ASN1PARS.OBJ,REQ.OBJ,DGST.OBJ,DH.OBJ,DHPARAM.OBJ,ENC.OBJ,PASSWD.OBJ,GENDH.OBJ,ERRSTR.OBJ,- CA.OBJ,PKCS7.OBJ,CRL2P7.OBJ,CRL.OBJ,- RSA.OBJ,RSAUTL.OBJ,DSA.OBJ,DSAPARAM.OBJ,- X509.OBJ,GENRSA.OBJ,GENDSA.OBJ,S_SERVER.OBJ,S_CLIENT.OBJ,SPEED.OBJ,- S_TIME.OBJ,APPS.OBJ,S_CB.OBJ,S_SOCKET.OBJ,APP_RAND.OBJ,VERSION.OBJ,SESS_ID.OBJ,- - CIPHERS.OBJ,NSEQ.OBJ,PKCS12.OBJ,PKCS8.OBJ,SPKAC.OBJ,SMIME.OBJ,RAND.OBJ,ENGINE.OBJ,OCSP.OBJ + CIPHERS.OBJ,NSEQ.OBJ,PKCS12.OBJ,PKCS8.OBJ,SPKAC.OBJ,SMIME.OBJ,RAND.OBJ,ENGINE.OBJ,OCSP.OBJ,PRIME.OBJ $ TCPIP_PROGRAMS = ",," $ IF COMPILER .EQS. "VAXC" THEN - TCPIP_PROGRAMS = ",OPENSSL," @@ -679,7 +679,7 @@ $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - THEN CC = "CC/DECC" $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - "/NOLIST/PREFIX=ALL" + - - "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS + "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS $! $! Define The Linker Options File Name. $! @@ -711,7 +711,7 @@ $ EXIT $ ENDIF $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - - "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS + "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS $ CCDEFS = CCDEFS + ",""VAXC""" $! $! Define As SYS$COMMON:[SYSLIB] @@ -743,7 +743,7 @@ $! Use GNU C... $! $ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC $ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - - "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS + "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS $! $! Define The Linker Options File Name. $! diff --git a/src/lib/libssl/src/apps/openssl-vms.cnf b/src/lib/libssl/src/apps/openssl-vms.cnf index d4498713fa..878467ce98 100644 --- a/src/lib/libssl/src/apps/openssl-vms.cnf +++ b/src/lib/libssl/src/apps/openssl-vms.cnf @@ -3,8 +3,13 @@ # This is mostly being used for generation of certificate requests. # +# This definition stops the following lines choking if HOME isn't +# defined. +HOME = . RANDFILE = $ENV::HOME/.rnd -oid_file = $ENV::HOME/.oid + +# Extra OBJECT IDENTIFIER info: +#oid_file = $ENV::HOME/.oid oid_section = new_oids # To use this configuration file with the "-extfile" option of the @@ -29,22 +34,35 @@ default_ca = CA_default # The default ca section #################################################################### [ CA_default ] -dir = sys\$disk:[.demoCA # Where everything is kept +dir = sys\$disk:[.demoCA # Where everything is kept certs = $dir.certs] # Where the issued certs are kept crl_dir = $dir.crl] # Where the issued crl are kept database = $dir]index.txt # database index file. -new_certs_dir = $dir.newcerts] # default place for new certs. +#unique_subject = no # Set to 'no' to allow creation of + # several ctificates with same subject. +new_certs_dir = $dir.newcerts] # default place for new certs. certificate = $dir]cacert.pem # The CA certificate -serial = $dir]serial. # The current serial number +serial = $dir]serial. # The current serial number +#crlnumber = $dir]crlnumber. # the current crl number must be + # commented out to leave a V1 CRL crl = $dir]crl.pem # The current CRL private_key = $dir.private]cakey.pem# The private key RANDFILE = $dir.private].rand # private random number file x509_extensions = usr_cert # The extentions to add to the cert +# Comment out the following two lines for the "traditional" +# (and highly broken) format. +name_opt = ca_default # Subject Name options +cert_opt = ca_default # Certificate field options + +# Extension copying option: use with caution. +# copy_extensions = copy + # Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs # so this is commented out by default to leave a V1 CRL. +# crlnumber must also be commented out to leave a V1 CRL. # crl_extensions = crl_ext default_days = 365 # how long to certify for @@ -86,16 +104,19 @@ distinguished_name = req_distinguished_name attributes = req_attributes x509_extensions = v3_ca # The extentions to add to the self signed cert -# This sets the permitted types in a DirectoryString. There are several -# options. +# Passwords for private keys if not present they will be prompted for +# input_password = secret +# output_password = secret + +# This sets a mask for permitted string types. There are several options. # default: PrintableString, T61String, BMPString. # pkix : PrintableString, BMPString. # utf8only: only UTF8Strings. -# nobmp : PrintableString, T61String (no BMPStrings). +# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). # MASK:XXXX a literal mask value. # WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings # so use this option with caution! -dirstring_type = nobmp +string_mask = nombstr # req_extensions = v3_req # The extensions to add to a certificate request @@ -124,7 +145,7 @@ commonName = Common Name (eg, YOUR name) commonName_max = 64 emailAddress = Email Address -emailAddress_max = 40 +emailAddress_max = 64 # SET-ex3 = SET extension number 3 @@ -172,6 +193,9 @@ authorityKeyIdentifier=keyid,issuer:always # This stuff is for subjectAltName and issuerAltname. # Import the email address. # subjectAltName=email:copy +# An alternative to produce certificates that aren't +# deprecated according to PKIX. +# subjectAltName=email:move # Copy subject details # issuerAltName=issuer:copy @@ -234,3 +258,56 @@ basicConstraints = CA:true # issuerAltName=issuer:copy authorityKeyIdentifier=keyid:always,issuer:always + +[ proxy_cert_ext ] +# These extensions should be added when creating a proxy certificate + +# This goes against PKIX guidelines but some CAs do it and some software +# requires this to avoid interpreting an end user certificate as a CA. + +basicConstraints=CA:FALSE + +# Here are some examples of the usage of nsCertType. If it is omitted +# the certificate can be used for anything *except* object signing. + +# This is OK for an SSL server. +# nsCertType = server + +# For an object signing certificate this would be used. +# nsCertType = objsign + +# For normal client use this is typical +# nsCertType = client, email + +# and for everything including object signing: +# nsCertType = client, email, objsign + +# This is typical in keyUsage for a client certificate. +# keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +# This will be displayed in Netscape's comment listbox. +nsComment = "OpenSSL Generated Certificate" + +# PKIX recommendations harmless if included in all certificates. +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid,issuer:always + +# This stuff is for subjectAltName and issuerAltname. +# Import the email address. +# subjectAltName=email:copy +# An alternative to produce certificates that aren't +# deprecated according to PKIX. +# subjectAltName=email:move + +# Copy subject details +# issuerAltName=issuer:copy + +#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem +#nsBaseUrl +#nsRevocationUrl +#nsRenewalUrl +#nsCaPolicyUrl +#nsSslServerName + +# This really needs to be in place for it to be a proxy certificate. +proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c index e0d89d4ab4..65a9ee8a66 100644 --- a/src/lib/libssl/src/apps/openssl.c +++ b/src/lib/libssl/src/apps/openssl.c @@ -129,6 +129,7 @@ #include "progs.h" #include "s_apps.h" #include +#include /* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the * base prototypes (we cast each variable inside the function to the required @@ -147,6 +148,7 @@ char *default_config_file=NULL; #ifdef MONOLITH CONF *config=NULL; BIO *bio_err=NULL; +int in_FIPS_mode=0; #endif @@ -227,10 +229,31 @@ int main(int Argc, char *Argv[]) char **argv,*p; LHASH *prog=NULL; long errline; - + arg.data=NULL; arg.count=0; + in_FIPS_mode = 0; + +#ifdef OPENSSL_FIPS + if(getenv("OPENSSL_FIPS")) { +#if defined(_WIN32) + char filename[MAX_PATH] = ""; + GetModuleFileNameA( NULL, filename, MAX_PATH) ; + p = filename; +#else + p = Argv[0]; +#endif + if (!FIPS_mode_set(1,p)) { + ERR_load_crypto_strings(); + ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); + EXIT(1); + } + in_FIPS_mode = 1; + if (getenv("OPENSSL_FIPS_MD5")) + FIPS_allow_md5(1); + } +#endif if (bio_err == NULL) if ((bio_err=BIO_new(BIO_s_file())) != NULL) BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); diff --git a/src/lib/libssl/src/apps/openssl.cnf b/src/lib/libssl/src/apps/openssl.cnf index 854d1f164e..4c1d595b0a 100644 --- a/src/lib/libssl/src/apps/openssl.cnf +++ b/src/lib/libssl/src/apps/openssl.cnf @@ -44,8 +44,8 @@ new_certs_dir = $dir/newcerts # default place for new certs. certificate = $dir/cacert.pem # The CA certificate serial = $dir/serial # The current serial number -#crlnumber = $dir/crlnumber # the current crl number - # must be commented out to leave a V1 CRL +#crlnumber = $dir/crlnumber # the current crl number must be + # commented out to leave a V1 CRL crl = $dir/crl.pem # The current CRL private_key = $dir/private/cakey.pem# The private key RANDFILE = $dir/private/.rand # private random number file @@ -258,3 +258,56 @@ basicConstraints = CA:true # issuerAltName=issuer:copy authorityKeyIdentifier=keyid:always,issuer:always + +[ proxy_cert_ext ] +# These extensions should be added when creating a proxy certificate + +# This goes against PKIX guidelines but some CAs do it and some software +# requires this to avoid interpreting an end user certificate as a CA. + +basicConstraints=CA:FALSE + +# Here are some examples of the usage of nsCertType. If it is omitted +# the certificate can be used for anything *except* object signing. + +# This is OK for an SSL server. +# nsCertType = server + +# For an object signing certificate this would be used. +# nsCertType = objsign + +# For normal client use this is typical +# nsCertType = client, email + +# and for everything including object signing: +# nsCertType = client, email, objsign + +# This is typical in keyUsage for a client certificate. +# keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +# This will be displayed in Netscape's comment listbox. +nsComment = "OpenSSL Generated Certificate" + +# PKIX recommendations harmless if included in all certificates. +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid,issuer:always + +# This stuff is for subjectAltName and issuerAltname. +# Import the email address. +# subjectAltName=email:copy +# An alternative to produce certificates that aren't +# deprecated according to PKIX. +# subjectAltName=email:move + +# Copy subject details +# issuerAltName=issuer:copy + +#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem +#nsBaseUrl +#nsRevocationUrl +#nsRenewalUrl +#nsCaPolicyUrl +#nsSslServerName + +# This really needs to be in place for it to be a proxy certificate. +proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c index 71192bdf74..c961e6b57b 100644 --- a/src/lib/libssl/src/apps/pkcs12.c +++ b/src/lib/libssl/src/apps/pkcs12.c @@ -109,7 +109,7 @@ int MAIN(int argc, char **argv) int maciter = PKCS12_DEFAULT_ITER; int twopass = 0; int keytype = 0; - int cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC; + int cert_pbe; int key_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; int ret = 1; int macver = 1; @@ -126,6 +126,13 @@ int MAIN(int argc, char **argv) apps_startup(); +#ifdef OPENSSL_FIPS + if (FIPS_mode()) + cert_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; + else +#endif + cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC; + enc = EVP_des_ede3_cbc(); if (bio_err == NULL ) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE); @@ -666,7 +673,7 @@ int MAIN(int argc, char **argv) CRYPTO_push_info("verify MAC"); #endif /* If we enter empty password try no password first */ - if(!macpass[0] && PKCS12_verify_mac(p12, NULL, 0)) { + if(!mpass[0] && PKCS12_verify_mac(p12, NULL, 0)) { /* If mac and crypto pass the same set it to NULL too */ if(!twopass) cpass = NULL; } else if (!PKCS12_verify_mac(p12, mpass, -1)) { @@ -710,9 +717,10 @@ int MAIN(int argc, char **argv) int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass, int passlen, int options, char *pempass) { - STACK_OF(PKCS7) *asafes; + STACK_OF(PKCS7) *asafes = NULL; STACK_OF(PKCS12_SAFEBAG) *bags; int i, bagnid; + int ret = 0; PKCS7 *p7; if (!( asafes = PKCS12_unpack_authsafes(p12))) return 0; @@ -730,16 +738,22 @@ int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass, } bags = PKCS12_unpack_p7encdata(p7, pass, passlen); } else continue; - if (!bags) return 0; + if (!bags) goto err; if (!dump_certs_pkeys_bags (out, bags, pass, passlen, options, pempass)) { sk_PKCS12_SAFEBAG_pop_free (bags, PKCS12_SAFEBAG_free); - return 0; + goto err; } sk_PKCS12_SAFEBAG_pop_free (bags, PKCS12_SAFEBAG_free); + bags = NULL; } - sk_PKCS7_pop_free (asafes, PKCS7_free); - return 1; + ret = 1; + + err: + + if (asafes) + sk_PKCS7_pop_free (asafes, PKCS7_free); + return ret; } int dump_certs_pkeys_bags (BIO *out, STACK_OF(PKCS12_SAFEBAG) *bags, diff --git a/src/lib/libssl/src/apps/pkcs8.c b/src/lib/libssl/src/apps/pkcs8.c index ee8cf02813..d5085444e2 100644 --- a/src/lib/libssl/src/apps/pkcs8.c +++ b/src/lib/libssl/src/apps/pkcs8.c @@ -1,6 +1,6 @@ /* pkcs8.c */ /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL - * project 1999. + * project 1999-2004. */ /* ==================================================================== * Copyright (c) 1999 The OpenSSL Project. All rights reserved. @@ -68,7 +68,7 @@ int MAIN(int, char **); int MAIN(int argc, char **argv) -{ + { ENGINE *e = NULL; char **args, *infile = NULL, *outfile = NULL; char *passargin = NULL, *passargout = NULL; @@ -100,43 +100,70 @@ int MAIN(int argc, char **argv) ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); args = argv + 1; - while (!badarg && *args && *args[0] == '-') { - if (!strcmp(*args,"-v2")) { - if (args[1]) { + while (!badarg && *args && *args[0] == '-') + { + if (!strcmp(*args,"-v2")) + { + if (args[1]) + { args++; cipher=EVP_get_cipherbyname(*args); - if(!cipher) { + if (!cipher) + { BIO_printf(bio_err, "Unknown cipher %s\n", *args); badarg = 1; + } } - } else badarg = 1; - } else if (!strcmp(*args,"-v1")) { - if (args[1]) { + else + badarg = 1; + } + else if (!strcmp(*args,"-v1")) + { + if (args[1]) + { args++; pbe_nid=OBJ_txt2nid(*args); - if(pbe_nid == NID_undef) { + if (pbe_nid == NID_undef) + { BIO_printf(bio_err, "Unknown PBE algorithm %s\n", *args); badarg = 1; + } } - } else badarg = 1; - } else if (!strcmp(*args,"-inform")) { - if (args[1]) { + else + badarg = 1; + } + else if (!strcmp(*args,"-inform")) + { + if (args[1]) + { args++; informat=str2fmt(*args); - } else badarg = 1; - } else if (!strcmp(*args,"-outform")) { - if (args[1]) { + } + else badarg = 1; + } + else if (!strcmp(*args,"-outform")) + { + if (args[1]) + { args++; outformat=str2fmt(*args); - } else badarg = 1; - } else if (!strcmp (*args, "-topk8")) topk8 = 1; - else if (!strcmp (*args, "-noiter")) iter = 1; - else if (!strcmp (*args, "-nocrypt")) nocrypt = 1; - else if (!strcmp (*args, "-nooct")) p8_broken = PKCS8_NO_OCTET; - else if (!strcmp (*args, "-nsdb")) p8_broken = PKCS8_NS_DB; - else if (!strcmp (*args, "-embed")) p8_broken = PKCS8_EMBEDDED_PARAM; + } + else badarg = 1; + } + else if (!strcmp (*args, "-topk8")) + topk8 = 1; + else if (!strcmp (*args, "-noiter")) + iter = 1; + else if (!strcmp (*args, "-nocrypt")) + nocrypt = 1; + else if (!strcmp (*args, "-nooct")) + p8_broken = PKCS8_NO_OCTET; + else if (!strcmp (*args, "-nsdb")) + p8_broken = PKCS8_NS_DB; + else if (!strcmp (*args, "-embed")) + p8_broken = PKCS8_EMBEDDED_PARAM; else if (!strcmp(*args,"-passin")) { if (!args[1]) goto bad; @@ -154,21 +181,30 @@ int MAIN(int argc, char **argv) engine= *(++args); } #endif - else if (!strcmp (*args, "-in")) { - if (args[1]) { + else if (!strcmp (*args, "-in")) + { + if (args[1]) + { args++; infile = *args; - } else badarg = 1; - } else if (!strcmp (*args, "-out")) { - if (args[1]) { + } + else badarg = 1; + } + else if (!strcmp (*args, "-out")) + { + if (args[1]) + { args++; outfile = *args; - } else badarg = 1; - } else badarg = 1; + } + else badarg = 1; + } + else badarg = 1; args++; - } + } - if (badarg) { + if (badarg) + { bad: BIO_printf(bio_err, "Usage pkcs8 [options]\n"); BIO_printf(bio_err, "where options are\n"); @@ -189,147 +225,199 @@ int MAIN(int argc, char **argv) #ifndef OPENSSL_NO_ENGINE BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); #endif - return (1); - } + return 1; + } #ifndef OPENSSL_NO_ENGINE e = setup_engine(bio_err, engine, 0); #endif - if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { + if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) + { BIO_printf(bio_err, "Error getting passwords\n"); - return (1); - } + return 1; + } - if ((pbe_nid == -1) && !cipher) pbe_nid = NID_pbeWithMD5AndDES_CBC; + if ((pbe_nid == -1) && !cipher) + pbe_nid = NID_pbeWithMD5AndDES_CBC; - if (infile) { - if (!(in = BIO_new_file(infile, "rb"))) { + if (infile) + { + if (!(in = BIO_new_file(infile, "rb"))) + { BIO_printf(bio_err, "Can't open input file %s\n", infile); return (1); + } } - } else in = BIO_new_fp (stdin, BIO_NOCLOSE); + else + in = BIO_new_fp (stdin, BIO_NOCLOSE); - if (outfile) { - if (!(out = BIO_new_file (outfile, "wb"))) { + if (outfile) + { + if (!(out = BIO_new_file (outfile, "wb"))) + { BIO_printf(bio_err, "Can't open output file %s\n", outfile); return (1); + } } - } else { + else + { out = BIO_new_fp (stdout, BIO_NOCLOSE); #ifdef OPENSSL_SYS_VMS - { + { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); - } + } #endif - } + } if (topk8) { BIO_free(in); /* Not needed in this section */ pkey = load_key(bio_err, infile, informat, 1, passin, e, "key"); - if (!pkey) { - return (1); - } - if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) { + if (!pkey) + { + BIO_free_all(out); + return 1; + } + if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) + { BIO_printf(bio_err, "Error converting key\n"); ERR_print_errors(bio_err); - return (1); - } - if(nocrypt) { - if(outformat == FORMAT_PEM) + EVP_PKEY_free(pkey); + BIO_free_all(out); + return 1; + } + if (nocrypt) + { + if (outformat == FORMAT_PEM) PEM_write_bio_PKCS8_PRIV_KEY_INFO(out, p8inf); - else if(outformat == FORMAT_ASN1) + else if (outformat == FORMAT_ASN1) i2d_PKCS8_PRIV_KEY_INFO_bio(out, p8inf); - else { + else + { BIO_printf(bio_err, "Bad format specified for key\n"); + PKCS8_PRIV_KEY_INFO_free(p8inf); + EVP_PKEY_free(pkey); + BIO_free_all(out); return (1); + } } - } else { - if(passout) p8pass = passout; - else { + else + { + if (passout) + p8pass = passout; + else + { p8pass = pass; if (EVP_read_pw_string(pass, sizeof pass, "Enter Encryption Password:", 1)) + { + PKCS8_PRIV_KEY_INFO_free(p8inf); + EVP_PKEY_free(pkey); + BIO_free_all(out); return (1); - } + } + } app_RAND_load_file(NULL, bio_err, 0); if (!(p8 = PKCS8_encrypt(pbe_nid, cipher, p8pass, strlen(p8pass), - NULL, 0, iter, p8inf))) { + NULL, 0, iter, p8inf))) + { BIO_printf(bio_err, "Error encrypting key\n"); ERR_print_errors(bio_err); + PKCS8_PRIV_KEY_INFO_free(p8inf); + EVP_PKEY_free(pkey); + BIO_free_all(out); return (1); - } + } app_RAND_write_file(NULL, bio_err); - if(outformat == FORMAT_PEM) + if (outformat == FORMAT_PEM) PEM_write_bio_PKCS8(out, p8); - else if(outformat == FORMAT_ASN1) + else if (outformat == FORMAT_ASN1) i2d_PKCS8_bio(out, p8); - else { + else + { BIO_printf(bio_err, "Bad format specified for key\n"); + PKCS8_PRIV_KEY_INFO_free(p8inf); + EVP_PKEY_free(pkey); + BIO_free_all(out); return (1); - } + } X509_SIG_free(p8); - } + } + PKCS8_PRIV_KEY_INFO_free (p8inf); EVP_PKEY_free(pkey); BIO_free_all(out); - if(passin) OPENSSL_free(passin); - if(passout) OPENSSL_free(passout); + if (passin) + OPENSSL_free(passin); + if (passout) + OPENSSL_free(passout); return (0); - } + } - if(nocrypt) { - if(informat == FORMAT_PEM) + if (nocrypt) + { + if (informat == FORMAT_PEM) p8inf = PEM_read_bio_PKCS8_PRIV_KEY_INFO(in,NULL,NULL, NULL); - else if(informat == FORMAT_ASN1) + else if (informat == FORMAT_ASN1) p8inf = d2i_PKCS8_PRIV_KEY_INFO_bio(in, NULL); - else { + else + { BIO_printf(bio_err, "Bad format specified for key\n"); return (1); + } } - } else { - if(informat == FORMAT_PEM) + else + { + if (informat == FORMAT_PEM) p8 = PEM_read_bio_PKCS8(in, NULL, NULL, NULL); - else if(informat == FORMAT_ASN1) + else if (informat == FORMAT_ASN1) p8 = d2i_PKCS8_bio(in, NULL); - else { + else + { BIO_printf(bio_err, "Bad format specified for key\n"); return (1); - } + } - if (!p8) { + if (!p8) + { BIO_printf (bio_err, "Error reading key\n"); ERR_print_errors(bio_err); return (1); - } - if(passin) p8pass = passin; - else { + } + if (passin) + p8pass = passin; + else + { p8pass = pass; EVP_read_pw_string(pass, sizeof pass, "Enter Password:", 0); - } + } p8inf = PKCS8_decrypt(p8, p8pass, strlen(p8pass)); X509_SIG_free(p8); - } + } - if (!p8inf) { + if (!p8inf) + { BIO_printf(bio_err, "Error decrypting key\n"); ERR_print_errors(bio_err); return (1); - } + } - if (!(pkey = EVP_PKCS82PKEY(p8inf))) { + if (!(pkey = EVP_PKCS82PKEY(p8inf))) + { BIO_printf(bio_err, "Error converting key\n"); ERR_print_errors(bio_err); return (1); - } + } - if (p8inf->broken) { + if (p8inf->broken) + { BIO_printf(bio_err, "Warning: broken key encoding: "); - switch (p8inf->broken) { + switch (p8inf->broken) + { case PKCS8_NO_OCTET: BIO_printf(bio_err, "No Octet String in PrivateKey\n"); break; @@ -349,21 +437,24 @@ int MAIN(int argc, char **argv) } PKCS8_PRIV_KEY_INFO_free(p8inf); - if(outformat == FORMAT_PEM) + if (outformat == FORMAT_PEM) PEM_write_bio_PrivateKey(out, pkey, NULL, NULL, 0, NULL, passout); - else if(outformat == FORMAT_ASN1) + else if (outformat == FORMAT_ASN1) i2d_PrivateKey_bio(out, pkey); - else { + else + { BIO_printf(bio_err, "Bad format specified for key\n"); return (1); - } + } end: EVP_PKEY_free(pkey); BIO_free_all(out); BIO_free(in); - if(passin) OPENSSL_free(passin); - if(passout) OPENSSL_free(passout); + if (passin) + OPENSSL_free(passin); + if (passout) + OPENSSL_free(passout); return (0); -} + } diff --git a/src/lib/libssl/src/apps/prime.c b/src/lib/libssl/src/apps/prime.c new file mode 100644 index 0000000000..1753b3ebc1 --- /dev/null +++ b/src/lib/libssl/src/apps/prime.c @@ -0,0 +1,128 @@ +/* ==================================================================== + * Copyright (c) 2004 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include "apps.h" +#include + + +#undef PROG +#define PROG prime_main + +int MAIN(int argc, char **argv) + { + int hex=0; + int checks=20; + BIGNUM *bn=NULL; + BIO *bio_out; + + apps_startup(); + + if (bio_err == NULL) + if ((bio_err=BIO_new(BIO_s_file())) != NULL) + BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); + + --argc; + ++argv; + while (argc >= 1 && **argv == '-') + { + if(!strcmp(*argv,"-hex")) + hex=1; + else if(!strcmp(*argv,"-checks")) + if(--argc < 1) + goto bad; + else + checks=atoi(*++argv); + else + { + BIO_printf(bio_err,"Unknown option '%s'\n",*argv); + goto bad; + } + --argc; + ++argv; + } + + if (argv[0] == NULL) + { + BIO_printf(bio_err,"No prime specified\n"); + goto bad; + } + + if ((bio_out=BIO_new(BIO_s_file())) != NULL) + { + BIO_set_fp(bio_out,stdout,BIO_NOCLOSE); +#ifdef OPENSSL_SYS_VMS + { + BIO *tmpbio = BIO_new(BIO_f_linebuffer()); + bio_out = BIO_push(tmpbio, bio_out); + } +#endif + } + + if(hex) + BN_hex2bn(&bn,argv[0]); + else + BN_dec2bn(&bn,argv[0]); + + BN_print(bio_out,bn); + BIO_printf(bio_out," is %sprime\n", + BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not "); + + BN_free(bn); + BIO_free_all(bio_out); + + return 0; + + bad: + BIO_printf(bio_err,"options are\n"); + BIO_printf(bio_err,"%-14s hex\n","-hex"); + BIO_printf(bio_err,"%-14s number of checks\n","-checks "); + return 1; + } diff --git a/src/lib/libssl/src/apps/progs.h b/src/lib/libssl/src/apps/progs.h index 70e4dbac07..0493257bde 100644 --- a/src/lib/libssl/src/apps/progs.h +++ b/src/lib/libssl/src/apps/progs.h @@ -35,6 +35,7 @@ extern int pkcs8_main(int argc,char *argv[]); extern int spkac_main(int argc,char *argv[]); extern int smime_main(int argc,char *argv[]); extern int rand_main(int argc,char *argv[]); +extern int prime_main(int argc,char *argv[]); #ifndef OPENSSL_NO_ENGINE extern int engine_main(int argc,char *argv[]); #endif @@ -115,6 +116,7 @@ FUNCTION functions[] = { {FUNC_TYPE_GENERAL,"spkac",spkac_main}, {FUNC_TYPE_GENERAL,"smime",smime_main}, {FUNC_TYPE_GENERAL,"rand",rand_main}, + {FUNC_TYPE_GENERAL,"prime",prime_main}, #ifndef OPENSSL_NO_ENGINE {FUNC_TYPE_GENERAL,"engine",engine_main}, #endif diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c index 1a3d1d0dfa..eebe71b15e 100644 --- a/src/lib/libssl/src/apps/req.c +++ b/src/lib/libssl/src/apps/req.c @@ -175,7 +175,7 @@ int MAIN(int argc, char **argv) char *passin = NULL, *passout = NULL; char *p; char *subj = NULL; - const EVP_MD *md_alg=NULL,*digest=EVP_md5(); + const EVP_MD *md_alg=NULL,*digest; unsigned long chtype = MBSTRING_ASC; #ifndef MONOLITH char *to_free; @@ -197,6 +197,13 @@ int MAIN(int argc, char **argv) informat=FORMAT_PEM; outformat=FORMAT_PEM; +#ifdef OPENSSL_FIPS + if (FIPS_mode()) + digest = EVP_sha1(); + else +#endif + digest = EVP_md5(); + prog=argv[0]; argc--; argv++; @@ -499,13 +506,16 @@ bad: else { req_conf=config; - if( verbose ) - BIO_printf(bio_err,"Using configuration from %s\n", - default_config_file); + if (req_conf == NULL) { - BIO_printf(bio_err,"Unable to load config info\n"); + BIO_printf(bio_err,"Unable to load config info from %s\n", default_config_file); + if (newreq) + goto end; } + else if( verbose ) + BIO_printf(bio_err,"Using configuration from %s\n", + default_config_file); } if (req_conf != NULL) @@ -831,7 +841,9 @@ loop: } else { - if (!ASN1_INTEGER_set(X509_get_serialNumber(x509ss),0L)) goto end; + if (!rand_serial(NULL, + X509_get_serialNumber(x509ss))) + goto end; } if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req))) goto end; diff --git a/src/lib/libssl/src/apps/s_client.c b/src/lib/libssl/src/apps/s_client.c index eb6fd7c1c3..f72195e02d 100644 --- a/src/lib/libssl/src/apps/s_client.c +++ b/src/lib/libssl/src/apps/s_client.c @@ -197,6 +197,9 @@ static void sc_usage(void) BIO_printf(bio_err," -pause - sleep(1) after each read(2) and write(2) system call\n"); BIO_printf(bio_err," -showcerts - show all certificates in the chain\n"); BIO_printf(bio_err," -debug - extra output\n"); +#ifdef WATT32 + BIO_printf(bio_err," -wdebug - WATT-32 tcp debugging\n"); +#endif BIO_printf(bio_err," -msg - Show protocol messages\n"); BIO_printf(bio_err," -nbio_test - more ssl protocol testing\n"); BIO_printf(bio_err," -state - print the 'ssl' states\n"); @@ -348,6 +351,10 @@ int MAIN(int argc, char **argv) c_Pause=1; else if (strcmp(*argv,"-debug") == 0) c_debug=1; +#ifdef WATT32 + else if (strcmp(*argv,"-wdebug") == 0) + dbug_init(); +#endif else if (strcmp(*argv,"-msg") == 0) c_msg=1; else if (strcmp(*argv,"-showcerts") == 0) @@ -588,6 +595,8 @@ re_start: if (starttls_proto == 1) { BIO_read(sbio,mbuf,BUFSIZZ); + BIO_printf(sbio,"EHLO some.host.name\r\n"); + BIO_read(sbio,mbuf,BUFSIZZ); BIO_printf(sbio,"STARTTLS\r\n"); BIO_read(sbio,sbuf,BUFSIZZ); } diff --git a/src/lib/libssl/src/apps/s_socket.c b/src/lib/libssl/src/apps/s_socket.c index 1867890966..9c441b0200 100644 --- a/src/lib/libssl/src/apps/s_socket.c +++ b/src/lib/libssl/src/apps/s_socket.c @@ -153,7 +153,6 @@ static int ssl_sock_init(void) #ifdef WATT32 extern int _watt_do_exit; _watt_do_exit = 0; - dbug_init(); if (sock_init()) return (0); #elif defined(OPENSSL_SYS_WINDOWS) diff --git a/src/lib/libssl/src/apps/speed.c b/src/lib/libssl/src/apps/speed.c index 2412200009..5ed510ced6 100644 --- a/src/lib/libssl/src/apps/speed.c +++ b/src/lib/libssl/src/apps/speed.c @@ -1395,6 +1395,7 @@ int MAIN(int argc, char **argv) EVP_DecryptInit_ex(&ctx,evp_cipher,NULL,key16,iv); else EVP_EncryptInit_ex(&ctx,evp_cipher,NULL,key16,iv); + EVP_CIPHER_CTX_set_padding(&ctx, 0); Time_F(START); if(decrypt) diff --git a/src/lib/libssl/src/apps/verify.c b/src/lib/libssl/src/apps/verify.c index 6a93c018b8..d73280cdd0 100644 --- a/src/lib/libssl/src/apps/verify.c +++ b/src/lib/libssl/src/apps/verify.c @@ -354,6 +354,7 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx) if (ctx->error == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) ok=1; /* Continue after extension errors too */ if (ctx->error == X509_V_ERR_INVALID_CA) ok=1; + if (ctx->error == X509_V_ERR_INVALID_NON_CA) ok=1; if (ctx->error == X509_V_ERR_PATH_LENGTH_EXCEEDED) ok=1; if (ctx->error == X509_V_ERR_INVALID_PURPOSE) ok=1; if (ctx->error == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) ok=1; diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c index 9b95f7bd3f..e7115cac67 100644 --- a/src/lib/libssl/src/apps/x509.c +++ b/src/lib/libssl/src/apps/x509.c @@ -168,7 +168,7 @@ int MAIN(int argc, char **argv) char *CAkeyfile=NULL,*CAserial=NULL; char *alias=NULL; int text=0,serial=0,hash=0,subject=0,issuer=0,startdate=0,enddate=0; - int ocspid=0; + int next_serial=0,ocspid=0; int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0,email=0; int trustout=0,clrtrust=0,clrreject=0,aliasout=0,clrext=0; int C=0; @@ -179,7 +179,7 @@ int MAIN(int argc, char **argv) X509_REQ *rq=NULL; int fingerprint=0; char buf[256]; - const EVP_MD *md_alg,*digest=EVP_md5(); + const EVP_MD *md_alg,*digest; CONF *extconf = NULL; char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL; int need_rand = 0; @@ -216,6 +216,13 @@ int MAIN(int argc, char **argv) if (ctx == NULL) goto end; X509_STORE_set_verify_cb_func(ctx,callb); +#ifdef OPENSSL_FIPS + if (FIPS_mode()) + digest = EVP_sha1(); + else +#endif + digest = EVP_md5(); + argc--; argv++; num=0; @@ -371,6 +378,8 @@ int MAIN(int argc, char **argv) email= ++num; else if (strcmp(*argv,"-serial") == 0) serial= ++num; + else if (strcmp(*argv,"-next_serial") == 0) + next_serial= ++num; else if (strcmp(*argv,"-modulus") == 0) modulus= ++num; else if (strcmp(*argv,"-pubkey") == 0) @@ -591,12 +600,19 @@ bad: if ((x=X509_new()) == NULL) goto end; ci=x->cert_info; - if (sno) + if (sno == NULL) { - if (!X509_set_serialNumber(x, sno)) + sno = ASN1_INTEGER_new(); + if (!sno || !rand_serial(NULL, sno)) + goto end; + if (!X509_set_serialNumber(x, sno)) goto end; + ASN1_INTEGER_free(sno); + sno = NULL; } - else if (!ASN1_INTEGER_set(X509_get_serialNumber(x),0)) goto end; + else if (!X509_set_serialNumber(x, sno)) + goto end; + if (!X509_set_issuer_name(x,req->req_info->subject)) goto end; if (!X509_set_subject_name(x,req->req_info->subject)) goto end; @@ -617,7 +633,7 @@ bad: if (xca == NULL) goto end; } - if (!noout || text) + if (!noout || text || next_serial) { OBJ_create("2.99999.3", "SET.ex3","SET x509v3 extension 3"); @@ -691,6 +707,24 @@ bad: i2a_ASN1_INTEGER(STDout,x->cert_info->serialNumber); BIO_printf(STDout,"\n"); } + else if (next_serial == i) + { + BIGNUM *bnser; + ASN1_INTEGER *ser; + ser = X509_get_serialNumber(x); + bnser = ASN1_INTEGER_to_BN(ser, NULL); + if (!bnser) + goto end; + if (!BN_add_word(bnser, 1)) + goto end; + ser = BN_to_ASN1_INTEGER(bnser, NULL); + if (!ser) + goto end; + BN_free(bnser); + i2a_ASN1_INTEGER(out, ser); + ASN1_INTEGER_free(ser); + BIO_puts(out, "\n"); + } else if (email == i) { int j; @@ -947,9 +981,9 @@ bad: if (checkend) { - time_t tnow=time(NULL); + time_t tcheck=time(NULL) + checkoffset; - if (ASN1_UTCTIME_cmp_time_t(X509_get_notAfter(x), tnow+checkoffset) == -1) + if (X509_cmp_time(X509_get_notAfter(x), &tcheck) < 0) { BIO_printf(out,"Certificate will expire\n"); ret=1; @@ -1047,13 +1081,6 @@ static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create } else BUF_strlcpy(buf,serialfile,len); - serial=BN_new(); - bs=ASN1_INTEGER_new(); - if ((serial == NULL) || (bs == NULL)) - { - ERR_print_errors(bio_err); - goto end; - } serial = load_serial(buf, create, NULL); if (serial == NULL) goto end; diff --git a/src/lib/libssl/src/certs/demo/ca-cert.pem b/src/lib/libssl/src/certs/demo/ca-cert.pem new file mode 100644 index 0000000000..bcba68aefa --- /dev/null +++ b/src/lib/libssl/src/certs/demo/ca-cert.pem @@ -0,0 +1,33 @@ +-----BEGIN CERTIFICATE----- +MIIC5TCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQQFADBcMQswCQYDVQQGEwJBVTET +MBEGA1UECBMKUXVlZW5zbGFuZDEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQx +HDAaBgNVBAMTE1Rlc3QgUENBICgxMDI0IGJpdCkwHhcNOTkxMjAyMjEzODUxWhcN +MDUwNzEwMjEzODUxWjBbMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFu +ZDEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxGzAZBgNVBAMTElRlc3QgQ0Eg +KDEwMjQgYml0KTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAo7ujy3XXpU/p +yDJtOxkMJmGv3mdiVm7JrdoKLUgqjO2rBaeNuYMUiuI6oYU+tlD6agwRML0Pn2JF +b90VdK/UXrmRr9djaEuH17EIKjte5RwOzndCndsjcCYyoeODMTyg7dqPIkDMmRNM +5R5xBTabD+Aji0wzQupYxBLuW5PLj7ECAwEAAaOBtzCBtDAdBgNVHQ4EFgQU1WWA +U42mkhi3ecgey1dsJjU61+UwgYQGA1UdIwR9MHuAFE0RaEcrj18q1dw+G6nJbsTW +R213oWCkXjBcMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG +A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxHDAaBgNVBAMTE1Rlc3QgUENBICgxMDI0 +IGJpdCmCAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQBb39BRphHL +6aRAQyymsvBvPSCiG9+kR0R1L23aTpNbhXp2BebyFjbEQYZc2kWGiKKcHkNECA35 +3d4LoqUlVey8DFyafOIJd9hxdZfg+rxlHMxnL7uCJRmx9+xB411Jtsol9/wg1uCK +sleGpgB4j8cG2SVCz7V2MNZNK+d5QCnR7A== +-----END CERTIFICATE----- +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQCju6PLddelT+nIMm07GQwmYa/eZ2JWbsmt2gotSCqM7asFp425 +gxSK4jqhhT62UPpqDBEwvQ+fYkVv3RV0r9ReuZGv12NoS4fXsQgqO17lHA7Od0Kd +2yNwJjKh44MxPKDt2o8iQMyZE0zlHnEFNpsP4COLTDNC6ljEEu5bk8uPsQIDAQAB +AoGAVZmpFZsDZfr0l2S9tLLwpjRWNOlKATQkno6q2WesT0eGLQufTciY+c8ypfU6 +hyio8r5iUl/VhhdjhAtKx1mRpiotftHo/eYf8rtsrnprOnWG0bWjLjtIoMbcxGn2 +J3bN6LJmbJMjDs0eJ3KnTu646F3nDUw2oGAwmpzKXA1KAP0CQQDRvQhxk2D3Pehs +HvG665u2pB5ipYQngEFlZO7RHJZzJOZEWSLuuMqaF/7pTfA5jiBvWqCgJeCRRInL +21ru4dlPAkEAx9jj7BgKn5TYnMoBSSe0afjsV9oApVpN1Nacb1YDtCwy+scp3++s +nFxlv98wxIlSdpwMUn+AUWfjiWR7Tu/G/wJBAJ/KjwZIrFVxewP0x2ILYsTRYLzz +MS4PDsO7FB+I0i7DbBOifXS2oNSpd3I0CNMwrxFnUHzynpbOStVfN3ZL5w0CQQCa +pwFahxBRhkJKsxhjoFJBX9yl75JoY4Wvm5Tbo9ih6UJaRx3kqfkN14L2BKYcsZgb +KY9vmDOYy6iNfjDeWTfJAkBkfPUb8oTJ/nSP5zN6sqGxSY4krc4xLxpRmxoJ8HL2 +XfhqXkTzbU13RX9JJ/NZ8vQN9Vm2NhxRGJocQkmcdVtJ +-----END RSA PRIVATE KEY----- diff --git a/src/lib/libssl/src/certs/demo/dsa-ca.pem b/src/lib/libssl/src/certs/demo/dsa-ca.pem new file mode 100644 index 0000000000..9eb08f3ddd --- /dev/null +++ b/src/lib/libssl/src/certs/demo/dsa-ca.pem @@ -0,0 +1,43 @@ +-----BEGIN DSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,C5B6C7CC9E1FE2C0 + +svCXBcBRhMuU22UXOfiKZA+thmz6KYXpt1Yg5Rd+TYQcQ1MdvNy0B0tkP1SxzDq0 +Xh1eMeTML9/9/0rKakgNXXXbpi5RB8t6BmwRSyej89F7nn1mtR3qzoyPRpp15SDl +Tn67C+2v+HDF3MFk88hiNCYkNbcmi7TWvChsl8N1r7wdZwtIox56yXdgxw6ZIpa/ +par0oUCzN7fiavPgCWz1kfPNSaBQSdxwH7TZi5tMHAr0J3C7a7QRnZfE09R59Uqr +zslrq+ndIw1BZAxoY0SlBu+iFOVaBVlwToC4AsHkv7j7l8ITtr7f42YbBa44D9TO +uOhONmkk/v3Fso4RaOEzdKZC+hnmmzvHs6TiTWm6yzJgSFwyOUK0eGmKEeVxpcH5 +rUOlHOwzen+FFtocZDZAfdFnb7QY7L/boQvyA5A+ZbRG4DUpmBQeQsSaICHM5Rxx +1QaLF413VNPXTLPbW0ilSc2H8x2iZTIVKfd33oSO6NhXPtSYQgfecEF4BvNHY5c4 +HovjT4mckbK95bcBzoCHu43vuSQkmZzdYo/ydSZt6zoPavbBLueTpgSbdXiDi827 +MVqOsYxGCb+kez0FoDSTgw== +-----END DSA PRIVATE KEY----- +-----BEGIN CERTIFICATE REQUEST----- +MIICUjCCAhECAQAwUjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx +ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDELMAkGA1UEAxMCQ0Ew +ggG0MIIBKQYFKw4DAgwwggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaW +sxXgUy6P4FmCc5A+dTGZR3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5m +rmuINvvsKNzC16W75Sw5JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHk +cJVbUM1JAhUA9wcx7fpsBgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVo +bzDjaeHls12YuyiGSPzemQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqR +CZ228U2cVA9YBu5JdAfOVX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxB +F5WS6wG1c6Vqftgy7Q4CuAOBhAACgYAapll6iqz9XrZFlk2GCVcB+KihxWnH7IuH +vSLw9YUrJahcBHmbpvt494lF4gC5w3WPM+vXJofbusk4GoQEEsQNMDaah4m49uUq +AylOVFJJJXuirVJ+o+0TtOFDITEAl+YZZariXOD7tdOSOl9RLMPC6+daHKS9e68u +3enxhqnDGaAAMAkGBSsOAwIbBQADMAAwLQIVAJGVuFsG/0DBuSZ0jF7ypdU0/G0v +AhQfeF5BoMMDbX/kidUVpQ6gadPlZA== +-----END CERTIFICATE REQUEST----- +-----BEGIN CERTIFICATE----- +MIIBrjCCAWwCAQswCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK +U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww +CgYDVQQDEwNQQ0EwHhcNOTcwNjE1MDIxNDI5WhcNOTcwNzE1MDIxNDI5WjBSMQsw +CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu +ZXQgV2lkZ2l0cyBQdHkgTHRkMQswCQYDVQQDEwJDQTCBkjAJBgUrDgMCDAUAA4GE +AAKBgBqmWXqKrP1etkWWTYYJVwH4qKHFacfsi4e9IvD1hSslqFwEeZum+3j3iUXi +ALnDdY8z69cmh9u6yTgahAQSxA0wNpqHibj25SoDKU5UUkkle6KtUn6j7RO04UMh +MQCX5hllquJc4Pu105I6X1Esw8Lr51ocpL17ry7d6fGGqcMZMAkGBSsOAwIbBQAD +MQAwLgIVAJ4wtQsANPxHo7Q4IQZYsL12SKdbAhUAjJ9n38zxT+iai2164xS+LIfa +C1Q= +-----END CERTIFICATE----- + diff --git a/src/lib/libssl/src/certs/demo/dsa-pca.pem b/src/lib/libssl/src/certs/demo/dsa-pca.pem new file mode 100644 index 0000000000..e3641ad47e --- /dev/null +++ b/src/lib/libssl/src/certs/demo/dsa-pca.pem @@ -0,0 +1,49 @@ +-----BEGIN DSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,F80EEEBEEA7386C4 + +GZ9zgFcHOlnhPoiSbVi/yXc9mGoj44A6IveD4UlpSEUt6Xbse3Fr0KHIUyQ3oGnS +mClKoAp/eOTb5Frhto85SzdsxYtac+X1v5XwdzAMy2KowHVk1N8A5jmE2OlkNPNt +of132MNlo2cyIRYaa35PPYBGNCmUm7YcYS8O90YtkrQZZTf4+2C4kllhMcdkQwkr +FWSWC8YOQ7w0LHb4cX1FejHHom9Nd/0PN3vn3UyySvfOqoR7nbXkrpHXmPIr0hxX +RcF0aXcV/CzZ1/nfXWQf4o3+oD0T22SDoVcZY60IzI0oIc3pNCbDV3uKNmgekrFd +qOUJ+QW8oWp7oefRx62iBfIeC8DZunohMXaWAQCU0sLQOR4yEdeUCnzCSywe0bG1 +diD0KYaEe+Yub1BQH4aLsBgDjardgpJRTQLq0DUvw0/QGO1irKTJzegEDNVBKrVn +V4AHOKT1CUKqvGNRP1UnccUDTF6miOAtaj/qpzra7sSk7dkGBvIEeFoAg84kfh9h +hVvF1YyzC9bwZepruoqoUwke/WdNIR5ymOVZ/4Liw0JdIOcq+atbdRX08niqIRkf +dsZrUj4leo3zdefYUQ7w4N2Ns37yDFq7 +-----END DSA PRIVATE KEY----- +-----BEGIN CERTIFICATE REQUEST----- +MIICVTCCAhMCAQAwUzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx +ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEMMAoGA1UEAxMDUENB +MIIBtTCCASkGBSsOAwIMMIIBHgKBgQCnP26Fv0FqKX3wn0cZMJCaCR3aajMexT2G +lrMV4FMuj+BZgnOQPnUxmUd6UvuF5NmmezibaIqEm4fGHrV+hktTW1nPcWUZiG7O +Zq5riDb77Cjcwtelu+UsOSZL2ppwGJU3lRBWI/YV7boEXt45T/23Qx+1pGVvzYAR +5HCVW1DNSQIVAPcHMe36bAYD1YWKHKycZedQZmVvAoGATd9MA6aRivUZb1BGJZnl +aG8w42nh5bNdmLsohkj83pkEP1+IDJxzJA0gXbkqmj8YlifkYofBe3RiU/xhJ6h6 +kQmdtvFNnFQPWAbuSXQHzlV+I84W9srcWmEBfslxtU323DQph2j2XiCTs9v15Als +QReVkusBtXOlan7YMu0OArgDgYUAAoGBAKbtuR5AdW+ICjCFe2ixjUiJJzM2IKwe +6NZEMXg39+HQ1UTPTmfLZLps+rZfolHDXuRKMXbGFdSF0nXYzotPCzi7GauwEJTZ +yr27ZZjA1C6apGSQ9GzuwNvZ4rCXystVEagAS8OQ4H3D4dWS17Zg31ICb5o4E5r0 +z09o/Uz46u0VoAAwCQYFKw4DAhsFAAMxADAuAhUArRubTxsbIXy3AhtjQ943AbNB +nSICFQCu+g1iW3jwF+gOcbroD4S/ZcvB3w== +-----END CERTIFICATE REQUEST----- +-----BEGIN CERTIFICATE----- +MIIC0zCCApECAQAwCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK +U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww +CgYDVQQDEwNQQ0EwHhcNOTcwNjE0MjI1NDQ1WhcNOTcwNzE0MjI1NDQ1WjBTMQsw +CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu +ZXQgV2lkZ2l0cyBQdHkgTHRkMQwwCgYDVQQDEwNQQ0EwggG1MIIBKQYFKw4DAgww +ggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaWsxXgUy6P4FmCc5A+dTGZ +R3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5mrmuINvvsKNzC16W75Sw5 +JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHkcJVbUM1JAhUA9wcx7fps +BgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVobzDjaeHls12YuyiGSPze +mQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqRCZ228U2cVA9YBu5JdAfO +VX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxBF5WS6wG1c6Vqftgy7Q4C +uAOBhQACgYEApu25HkB1b4gKMIV7aLGNSIknMzYgrB7o1kQxeDf34dDVRM9OZ8tk +umz6tl+iUcNe5EoxdsYV1IXSddjOi08LOLsZq7AQlNnKvbtlmMDULpqkZJD0bO7A +29nisJfKy1URqABLw5DgfcPh1ZLXtmDfUgJvmjgTmvTPT2j9TPjq7RUwCQYFKw4D +AhsFAAMxADAuAhUAvtv6AkMolix1Jvy3UnVEIUqdCUICFQC+jq8P49mwrY9oJ24n +5rKUjNBhSg== +-----END CERTIFICATE----- + diff --git a/src/lib/libssl/src/certs/demo/nortelCA.pem b/src/lib/libssl/src/certs/demo/nortelCA.pem new file mode 100644 index 0000000000..207f34ab3a --- /dev/null +++ b/src/lib/libssl/src/certs/demo/nortelCA.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICajCCAdMCBDGA0QUwDQYJKoZIhvcNAQEEBQAwfTELMAkGA1UEBhMCQ2ExDzAN +BgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmlsaXR5IEFjY2VwdGVkMR8w +HQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRwwGgYDVQQDExNFbnRydXN0 +IERlbW8gV2ViIENBMB4XDTk2MDQyNjEzMzUwMVoXDTA2MDQyNjEzMzUwMVowfTEL +MAkGA1UEBhMCQ2ExDzANBgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmls +aXR5IEFjY2VwdGVkMR8wHQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRww +GgYDVQQDExNFbnRydXN0IERlbW8gV2ViIENBMIGdMA0GCSqGSIb3DQEBAQUAA4GL +ADCBhwKBgQCaroS7O1DA0hm4IefNYU1cx/nqOmzEnk291d1XqznDeF4wEgakbkCc +zTKxK791yNpXG5RmngqH7cygDRTHZJ6mfCRn0wGC+AI00F2vYTGqPGRQL1N3lZT0 +YDKFC0SQeMMjFIZ1aeQigroFQnHo0VB3zWIMpNkka8PY9lxHZAmWwQIBAzANBgkq +hkiG9w0BAQQFAAOBgQBAx0UMVA1s54lMQyXjMX5kj99FJN5itb8bK1Rk+cegPQPF +cWO9SEWyEjjBjIkjjzAwBkaEszFsNGxemxtXvwjIm1xEUMTVlPEWTs2qnDvAUA9W +YqhWbhH0toGT36236QAsqCZ76rbTRVSSX2BHyJwJMG2tCRv7kRJ//NIgxj3H4w== +-----END CERTIFICATE----- + diff --git a/src/lib/libssl/src/certs/demo/pca-cert.pem b/src/lib/libssl/src/certs/demo/pca-cert.pem new file mode 100644 index 0000000000..9d754d460d --- /dev/null +++ b/src/lib/libssl/src/certs/demo/pca-cert.pem @@ -0,0 +1,33 @@ +-----BEGIN CERTIFICATE----- +MIIC5jCCAk+gAwIBAgIBADANBgkqhkiG9w0BAQQFADBcMQswCQYDVQQGEwJBVTET +MBEGA1UECBMKUXVlZW5zbGFuZDEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQx +HDAaBgNVBAMTE1Rlc3QgUENBICgxMDI0IGJpdCkwHhcNOTkxMjAyMjEzNTQ4WhcN +MDUwNzExMjEzNTQ4WjBcMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFu +ZDEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxHDAaBgNVBAMTE1Rlc3QgUENB +ICgxMDI0IGJpdCkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJ2haT/f5Zwy +V+MiuSDjSR62adBoSiBB7Usty44lXqsp9RICw+DCCxpsn/CfxPEDXLLd4olsWXc6 +JRcxGynbYmnzk+Z6aIPPJQhK3CTvaqGnWKZsA1m+WaUIUqJCuNTK4N+7hMAGaf6S +S3e9HVgEQ4a34gXJ7VQFVIBNV1EnZRWHAgMBAAGjgbcwgbQwHQYDVR0OBBYEFE0R +aEcrj18q1dw+G6nJbsTWR213MIGEBgNVHSMEfTB7gBRNEWhHK49fKtXcPhupyW7E +1kdtd6FgpF4wXDELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY +BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYDVQQDExNUZXN0IFBDQSAoMTAy +NCBiaXQpggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAUa8B3pho ++Mvxeq9HsEzJxHIFQla05S5J/e/V+DQTYoKiRFchKPrDAdrzYSEvP3h4QJEtsNqQ +JfOxg5M42uLFq7aPGWkF6ZZqZsYS+zA9IVT14g7gNA6Ne+5QtJqQtH9HA24st0T0 +Tga/lZ9M2ovImovaxSL/kRHbpCWcqWVxpOw= +-----END CERTIFICATE----- +-----BEGIN RSA PRIVATE KEY----- +MIICXAIBAAKBgQCdoWk/3+WcMlfjIrkg40ketmnQaEogQe1LLcuOJV6rKfUSAsPg +wgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp22Jp85PmemiDzyUIStwk72qhp1imbANZ +vlmlCFKiQrjUyuDfu4TABmn+kkt3vR1YBEOGt+IFye1UBVSATVdRJ2UVhwIDAQAB +AoGAba4fTtuap5l7/8ZsbE7Z1O32KJY4ZcOZukLOLUUhXxXduT+FTgGWujc0/rgc +z9qYCLlNZHOouMYTgtSfYvuMuLZ11VIt0GYH+nRioLShE59Yy+zCRyC+gPigS1kz +xvo14AsOIPYV14Tk/SsHyq6E0eTk7VzaIE197giiINUERPECQQDSKmtPTh/lRKw7 +HSZSM0I1mFWn/1zqrAbontRQY5w98QWIOe5qmzYyFbPXYT3d9BzlsMyhgiRNoBbD +yvohSHXJAkEAwAHx6ezAZeWWzD5yXD36nyjpkVCw7Tk7TSmOceLJMWt1QcrCfqlS +xA5jjpQ6Z8suU5DdtWAryM2sAir1WisYzwJAd6Zcx56jvAQ3xcPXsE6scBTVFzrj +7FqZ6E+cclPzfLQ+QQsyOBE7bpI6e/FJppY26XGZXo3YGzV8IGXrt40oOQJALETG +h86EFXo3qGOFbmsDy4pdP5nBERCu8X1xUCSfintiD4c2DInxgS5oGclnJeMcjTvL +QjQoJCX3UJCi/OUO1QJBAKgcDHWjMvt+l1pjJBsSEZ0HX9AAIIVx0RQmbFGS+F2Q +hhu5l77WnnZOQ9vvhV5u7NPCUF9nhU3jh60qWWO8mkc= +-----END RSA PRIVATE KEY----- diff --git a/src/lib/libssl/src/certs/demo/timCA.pem b/src/lib/libssl/src/certs/demo/timCA.pem new file mode 100644 index 0000000000..9c8d5bf9c6 --- /dev/null +++ b/src/lib/libssl/src/certs/demo/timCA.pem @@ -0,0 +1,16 @@ +Tims test GCI CA + +-----BEGIN CERTIFICATE----- +MIIB8DCCAZoCAQAwDQYJKoZIhvcNAQEEBQAwgYIxCzAJBgNVBAYTAkFVMRMwEQYD +VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5 +cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2RldmVsb3BtZW50MRkwFwYDVQQDExBD +cnlwdFNvZnQgRGV2IENBMB4XDTk3MDMyMjEzMzQwNFoXDTk4MDMyMjEzMzQwNFow +gYIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhC +cmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2Rl +dmVsb3BtZW50MRkwFwYDVQQDExBDcnlwdFNvZnQgRGV2IENBMFwwDQYJKoZIhvcN +AQEBBQADSwAwSAJBAOAOAqogG5QwAmLhzyO4CoRnx/wVy4NZP4dxJy83O1EnL0rw +OdsamJKvPOLHgSXo3gDu9uVyvCf/QJmZAmC5ml8CAwEAATANBgkqhkiG9w0BAQQF +AANBADRRS/GVdd7rAqRW6SdmgLJduOU2yq3avBu99kRqbp9A/dLu6r6jU+eP4oOA +TfdbFZtAAD2Hx9jUtY3tfdrJOb8= +-----END CERTIFICATE----- + diff --git a/src/lib/libssl/src/certs/demo/tjhCA.pem b/src/lib/libssl/src/certs/demo/tjhCA.pem new file mode 100644 index 0000000000..67bee1b200 --- /dev/null +++ b/src/lib/libssl/src/certs/demo/tjhCA.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICVjCCAgACAQAwDQYJKoZIhvcNAQEEBQAwgbUxCzAJBgNVBAYTAkFVMRMwEQYD +VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5 +cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsTI1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9O +IEFVVEhPUklUSUVTMTQwMgYDVQQDEytaRVJPIFZBTFVFIENBIC0gREVNT05TVFJB +VElPTiBQVVJQT1NFUyBPTkxZMB4XDTk3MDQwMzEzMjI1NFoXDTk4MDQwMzEzMjI1 +NFowgbUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH +EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsT +I1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9OIEFVVEhPUklUSUVTMTQwMgYDVQQDEyta +RVJPIFZBTFVFIENBIC0gREVNT05TVFJBVElPTiBQVVJQT1NFUyBPTkxZMFwwDQYJ +KoZIhvcNAQEBBQADSwAwSAJBAOZ7T7yqP/tyspcko3yPY1y0Cm2EmwNvzW4QgVXR +Fjs3HmJ4xtSpXdo6mwcGezL3Abt/aQXaxv9PU8xt+Jr0OFUCAwEAATANBgkqhkiG +9w0BAQQFAANBAOQpYmGgyCqCy1OljgJhCqQOu627oVlHzK1L+t9vBaMfn40AVUR4 +WzQVWO31KTgi5vTK1U+3h46fgUWqQ0h+6rU= +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/demo/vsigntca.pem b/src/lib/libssl/src/certs/demo/vsigntca.pem new file mode 100644 index 0000000000..05acf76e66 --- /dev/null +++ b/src/lib/libssl/src/certs/demo/vsigntca.pem @@ -0,0 +1,18 @@ +subject=/O=VeriSign, Inc/OU=www.verisign.com/repository/TestCPS Incorp. By Ref. Liab. LTD./OU=For VeriSign authorized testing only. No assurances (C)VS1997 +notBefore=Mar 4 00:00:00 1997 GMT +notAfter=Mar 4 23:59:59 2025 GMT +-----BEGIN CERTIFICATE----- +MIICTTCCAfcCEEdoCqpuXxnoK27q7d58Qc4wDQYJKoZIhvcNAQEEBQAwgakxFjAU +BgNVBAoTDVZlcmlTaWduLCBJbmMxRzBFBgNVBAsTPnd3dy52ZXJpc2lnbi5jb20v +cmVwb3NpdG9yeS9UZXN0Q1BTIEluY29ycC4gQnkgUmVmLiBMaWFiLiBMVEQuMUYw +RAYDVQQLEz1Gb3IgVmVyaVNpZ24gYXV0aG9yaXplZCB0ZXN0aW5nIG9ubHkuIE5v +IGFzc3VyYW5jZXMgKEMpVlMxOTk3MB4XDTk3MDMwNDAwMDAwMFoXDTI1MDMwNDIz +NTk1OVowgakxFjAUBgNVBAoTDVZlcmlTaWduLCBJbmMxRzBFBgNVBAsTPnd3dy52 +ZXJpc2lnbi5jb20vcmVwb3NpdG9yeS9UZXN0Q1BTIEluY29ycC4gQnkgUmVmLiBM +aWFiLiBMVEQuMUYwRAYDVQQLEz1Gb3IgVmVyaVNpZ24gYXV0aG9yaXplZCB0ZXN0 +aW5nIG9ubHkuIE5vIGFzc3VyYW5jZXMgKEMpVlMxOTk3MFwwDQYJKoZIhvcNAQEB +BQADSwAwSAJBAMak6xImJx44jMKcbkACy5/CyMA2fqXK4PlzTtCxRq5tFkDzne7s +cI8oFK/J+gFZNE3bjidDxf07O3JOYG9RGx8CAwEAATANBgkqhkiG9w0BAQQFAANB +ADT523tENOKrEheZFpsJx1UUjPrG7TwYc/C4NBHrZI4gZJcKVFIfNulftVS6UMYW +ToLEMaUojc3DuNXHG21PDG8= +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/eng1.pem b/src/lib/libssl/src/certs/eng1.pem new file mode 100644 index 0000000000..7ed8b1b5e6 --- /dev/null +++ b/src/lib/libssl/src/certs/eng1.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex +CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9CYW5rRW5n +aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz +aW9uMRMwEQYDVQQDEwpiYW5rZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBiYW5r +ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw +CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV +BAoTD0JhbmtFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmJhbmtlbmdpbmUxIDAeBgkqhkiG9w0B +CQEWEWNhQGJhbmtlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEA14LoTUAl1/hEy+Kh1kLHiBdW2zD3V4IhM7xxTVKsYsIH56nr69ATTIxU +P36eRzeZ137qt1AxHFjDCidk3m1Ul6l59ProPexdslLLM2npM3f2cteg+toyiYiS +EJKjyzIu1xF1j9qzGkymSY/4DsXLZNk9FaczxMk/Ooc6Os1M3AverL4VG4rYIb6f +eR32cIKJ9Q1fGuyKk7ipq1XQfPW8a8TgZdbHbe7U9Gk3iasGMHHvpR9Ep3mGbgdT +uQ98SBEuIwe1BUCGg/MXpVy48MNXfAMotBgGw4pl9yqSjMni2FB+E9Q9DHFs2RgX +MqzKuo8zcPxKx2kZ6Arj8+27dw2clQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G +CSqGSIb3DQEBBQUAA4IBAQBauupHX9EhpC/r57d6b5kkeWvognxIP9//TO4iw3qb +zIXEkPXmJmwVzlzoKJWqiya+aw19SP0+G6CzsFOBo/9ehmz+hZ8bhYX4MjlWzX5u +Tnkhz172j9fOBUmrTVPkcRIs6zjCD5PQAGoBPP1/Zdy2N36lZ0U7lg07Opirj/yJ +PSJeM2j0fwIFAroiVckvdT0BVwB6S/cPaAQGPghbbr1YGSmYrMriSv825ILJUfxz +rJYunGR9FiY9Ob7+jwJwiZMS4CxSPktutxr/3hOvr1+ALS7IcVakhhA3PuZAJbdH +FRclR9qMM8aBnBZmf+Uv3K3uhT+UBzzY654U9Yi1JYnA +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/eng2.pem b/src/lib/libssl/src/certs/eng2.pem new file mode 100644 index 0000000000..73066309b1 --- /dev/null +++ b/src/lib/libssl/src/certs/eng2.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex +CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9DZXJ0RW5n +aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz +aW9uMRMwEQYDVQQDEwpjZXJ0ZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBjZXJ0 +ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw +CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV +BAoTD0NlcnRFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmNlcnRlbmdpbmUxIDAeBgkqhkiG9w0B +CQEWEWNhQGNlcnRlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEA7aTXURShaeVt9u/dP3Q2dVib3jTCZvEyc6yfpGgaYWewXWuP4HOSfI4h +GZblbpl+dzJc6RjhR+pguIRtbT5FJB8SJGjRqoujBEOQOxtVtc2fjM9Dqh0iOvMW +WS6buxHG55GVrHAQaO5HXEScKQBa9ZyNmpSXPTEBrDMej1OAGOkc524/TZrgFPF4 +AiJLLkxCcP8NuzUKlW3WzNMSSoCtjkUKy4wjSLlAWCFM0T9Df6/+Z8ZUQTzHoKCD +ncH5Qnynd7DlOwKQ2JwwxRhYGiGVTUN0GUq7qA11kW3+vnbFesKQXoF6o2PVx9s2 +YXviI2NXXUjZ0pVnsnFCc45Pm8XojwIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G +CSqGSIb3DQEBBQUAA4IBAQBP/aHOKJ00Akzc9HWM1X30hlWZFBaQi4pqD4Uhk8+p +KzzwFP5DRLBOz8TYBbtdXrS6hxVMr2sqWmhVkuyepWhHZazKGyHY/y0FbOXsewAV +1QxxSyx7ve89pCKv4/w0rQcP916iHc8Y/TCpmz7eITa3GId+8H/XTaBi8GBp9X9O +w8m25FmEB1NT+eJwefvfdKowjy4tSorKdW/eJspxNuTSRGmUy8G71W5dYvgpAlx6 +mdnHyzxEGvRYNNI2bS0ifXgbEFNWqSas9q34ea5KOpkJu8T/KyXfSb6rPOsBSb0t +wMowwGtCVH2C4Lw/8zo0EjhMpTOsPaub408PrZ+NQ2bl +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/eng3.pem b/src/lib/libssl/src/certs/eng3.pem new file mode 100644 index 0000000000..28bcce2dfd --- /dev/null +++ b/src/lib/libssl/src/certs/eng3.pem @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIF3TCCA8WgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex +CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9Gb3J0RW5n +aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz +aW9uMRMwEQYDVQQDEwpmb3J0ZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBmb3J0 +ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw +CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV +BAoTD0ZvcnRFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmZvcnRlbmdpbmUxIDAeBgkqhkiG9w0B +CQEWEWNhQGZvcnRlbmdpbmUuY29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC +CgKCAgEAyr7GbpwDxx1v3EYbo0gcO+ligEhlDqG2e7u/AbWGoVAqc8+q6auUJUtz +4i7oh0yNadu1o9kpXW+znkgO0zlrgjGskqqMO1ooppzTJdFy/P8gR6x1Iuv3kWtX +OuzwPPEjv09LWlhyJsN+oU4ztTVf07I0Q9zYupcoDQ58XKRheI9KdDB2DYSmxywA +WSLQwIeG0Qa7gvokeQlpkgkEC7viEecJ3752KXBJHnh7As51mxnlpmG6sDy67Eli +HDw5tHETRqbtnscGBjskGQBqR5xt7+QnnthZrN8HJHDoa9zgGephwizhkL44lXLF +YK9W5XhFbblw2c+mAcHkokRiwD7CPeIoyD2a/Jcw3n5hegKTlNhd4BFGVF6JR7gF +OFk2QfHXit5uthsij9Xhl7WAgQUqLgggD9MphqPf4nY66OZUJV9ZsmB+Qfp8UizB +0WAOegactKVyRqHtRa+KIEXQXNtZgjcmMk9CYkP0nIbKtgKXaH6+9VMHNOryCnFE +7pSsuPUkypncFWCHGSeiFO3w4w4J4csltxBADQzxfRu5KZnlToQN7bVpI/Q31tVX +E5bjrJcq6Oj/OTqZ3ID+OqbkUdAg0ggjRKcTgxnLHd/AbMzJ6PsclDDf7cLs0WSl +xMxQR/z5bNST1rNtT9rsiv2TOhfvCBxO9AOjBioO8PLO032HTNECAwEAAaMQMA4w +DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAgEAVyBpPWfT2VOyvVpslGKx +8h0+CWP8cilygGRtZJ5dAJzc//1REAHdvK+TgZ4Foz3dqHhXI+RNN0FpzuWaYMjW +ZTS0kAmcOQuGY1Oo4PGlPHI21pNz29oFDTJr0ZmLBJ4JKVsE2soJg55jdk9MZHA7 +K//7HH9RsmrWZOE5DZDlrxp6+naixhMwnlPKKisIy9GNZUPqGdUWABMdB/BUVVNl +NU5TtWpIXUClMd8a+eoKcItBeYXowkHOBpinPkDX3clFDIUfWiw0Ro08s8SrrFqR +8Szwbrj52Xv1RM56oGqCjnkvJctxihODV7NcpxoAFjIZokDom0q6zPrrTUsLFQov +Plovc3w5hmALiDMshaTvE1nm3Psn4yQ+FlRE8epTZrQiIGypZkZC6lcz0mYawueW +cThYWGFhVG4ktQzOjjNRsNxopW+W7cF1zQTxiWUDnxIKSj7gtdQ2jiubxEEhfVag +r8DMtAccNVTZVURpGi56TptOOuotrTqqC+2GviW4hlxvdvmuQN0OlXlUwzz2Trxc +FamNnuA54lZw/8arLtxsFmHrcnPw53+1spumLD0S5UkxHNu40h6LIVpZz3H+0rLz +uFofTfiyMjcfK2AyHQTgUCbsrvgNuLDQUbyFGVchdFUkhztX3DhEVnxnnrpY4BVj +QdTqWIvw7lGlSuDCjxEQAOc= +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/eng4.pem b/src/lib/libssl/src/certs/eng4.pem new file mode 100644 index 0000000000..9a7b156226 --- /dev/null +++ b/src/lib/libssl/src/certs/eng4.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex +CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9NYWlsRW5n +aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz +aW9uMRMwEQYDVQQDEwptYWlsZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBtYWls +ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw +CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV +BAoTD01haWxFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCm1haWxlbmdpbmUxIDAeBgkqhkiG9w0B +CQEWEWNhQG1haWxlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAqXmfsU+lx+NFmn6tN17RTOyaddHqLnr/3rzEDIyT9TN+tF9TG7jmK7lJ +Jrj5arQ3nTFaLF8JuND2U1z/cLPw6/TX+1tE3v3CNUDSjaisyUDiUyp3TE8hMMMz +zfZQn0JsGgNhhWxqyzjhRQGtKL4+xtn8VsF/8zGgZYke7nlmVKz/FslDFTnNoodL +BAEGiu9JQS9qqpbSs20NdZ6LXPL2A4iTjnsNFBW3jIMVIn/JVVyaycU7ue2oFviD +vLNpkVZcR7A+jjIdIumOc5VSF0y7y74cQC5YwkR2mLK7UBYDK6NCY3ta/C4M8NsM +0FpmvRl0+A1ivZtVwqI98dxDtp7HeQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G +CSqGSIb3DQEBBQUAA4IBAQAjfNn5BCzxylBDakFQGWKE/P43PRibMOEzfd7+DzbY +WIekoz3i00DwoH3b6j4gwlDJRAOq4dF6/Pt/uBOHDo/op+ef+9ErmKPd+ehXN9h3 +7QbccTgz7DtVwA4iRlDRLru+JuXzT+OsCHuFZMOLJ+KD2JAGh3W68JjdcLkrlcpt +AU0wc5aOHPPfEBdIah8y8QtNzXRVzoBt8zzvgCARkXxTS2u/9QaXR1hML0JtDgQS +SdZ6Kd8SN6yzqxD+buYD5sOfJmjBF/n3lqFHNMHnnGXy2TAXZtIAWzffU3A0cGPB +N6FZ026a86HbF1X4k+xszhbJu/ikczyuWnCJIg3fTYSD +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/eng5.pem b/src/lib/libssl/src/certs/eng5.pem new file mode 100644 index 0000000000..3416ccad24 --- /dev/null +++ b/src/lib/libssl/src/certs/eng5.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID6TCCAtGgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UEBhMCQ0Ex +CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRowGAYDVQQKExFUcmFkZXJF +bmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRGl2 +aXNpb24xFTATBgNVBAMTDHRyYWRlcmVuZ2luZTEiMCAGCSqGSIb3DQEJARYTY2FA +dHJhZGVyZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBa +MIGuMQswCQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8x +GjAYBgNVBAoTEVRyYWRlckVuZ2luZSBJbmMuMSkwJwYDVQQLEyBDZXJ0aWZpY2F0 +aW9uIEF1dGhvcml0eSBEaXZpc2lvbjEVMBMGA1UEAxMMdHJhZGVyZW5naW5lMSIw +IAYJKoZIhvcNAQkBFhNjYUB0cmFkZXJlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEAzyX5QE+5SN+zgNn1v3zp9HmP4hQOWW8WuEVItZVP +9bt/xj5NeJd1kyPL/SqnF2qHcL3o/74r0Ga55aKHniwKYgQTlp5ELGfQ568QQeN9 +xNIHtUXeStI9zCNZyZC+4YqObdMR/ivKA/WsLfUVMl2lV5JzJJz1BOE0gKEYiEyz +gIq5oLzkP/mOXoHRvWSZD2D0eHYIO7ovV2epVFK7g7p+dC4QoeIUEli+GF/Myg88 +dV/qmi+Sybck2RLPXa8Nh27/ETVQ7kE1Eafmx7EyCqIhG+5lwJAy3HwHUBwAYuzj +iuZz5lD8aQmr8SKuvy3eOH9SVN5wh3YBlrNGwTStkESVLwIDAQABoxAwDjAMBgNV +HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAWOPAUhZd3x9EQiFJcuxFTMd9q +axgcriCzJsM6D96sYGko9xTeLhX/lr1bliVYI5AlupoLXAdMzGHJkOgaTirKjQXr +F9nymDdUWKe3TmwGob5016nQlH7qRKvGO3hka0rOGRK2U/2JT/4Qp8iH/DFi6cyM +uP0q8n64SAkxZXLzUuFQXqf7U/SNjzb9XJQEIAdjp7eYd3Qb4jDsDcX0FrKMF1aV +r0dCDnS7am7WTXPYCDGdSkPgEHEtLYIYH3lZp5sKdVZ9wl4F0WNFkRWRUr7AXPjw +50uLmUNmKCd8JZLMGA1TRNSTi7U9EcrWt0OkMWm74T2WVnAgNsDv2WrWsGfj +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/expired/RegTP-4R.pem b/src/lib/libssl/src/certs/expired/RegTP-4R.pem new file mode 100644 index 0000000000..6f2c6abccd --- /dev/null +++ b/src/lib/libssl/src/certs/expired/RegTP-4R.pem @@ -0,0 +1,19 @@ +issuer= CN=4R-CA 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE +notBefore=Jan 21 16:04:53 1999 GMT +notAfter=Jan 21 16:04:53 2004 GMT +subject= CN=4R-CA 1:PN+0.2.262.1.10.7.20=#130131,O=Regulierungsbeh\C3\88orde f\C3\88ur Telekommunikation und Post,C=DE +-----BEGIN CERTIFICATE----- +MIICZzCCAdOgAwIBAgIEOwVn1DAKBgYrJAMDAQIFADBvMQswCQYDVQQGEwJERTE9 +MDsGA1UEChQ0UmVndWxpZXJ1bmdzYmVoyG9yZGUgZsh1ciBUZWxla29tbXVuaWth +dGlvbiB1bmQgUG9zdDEhMAwGBwKCBgEKBxQTATEwEQYDVQQDFAo0Ui1DQSAxOlBO +MCIYDzE5OTkwMTIxMTYwNDUzWhgPMjAwNDAxMjExNjA0NTNaMG8xCzAJBgNVBAYT +AkRFMT0wOwYDVQQKFDRSZWd1bGllcnVuZ3NiZWjIb3JkZSBmyHVyIFRlbGVrb21t +dW5pa2F0aW9uIHVuZCBQb3N0MSEwDAYHAoIGAQoHFBMBMTARBgNVBAMUCjRSLUNB +IDE6UE4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGAjzHbq2asUlqeWbXTQHso +aVF6YIPVH3c/B2cbuy9HJ/lnE6x0asOzM2DGDqi47xkdAxPc0LZ0fxO87rkmz7xs +jJObnVrMXpyUSDSp5Y0wqKJdsFdr6mGFOQZteIti8AJnr8xMkwnWVyuOlEXsFe1h +5gxwQXrOcPinE6qu1t/3PmECBMAAAAGjEjAQMA4GA1UdDwEB/wQEAwIBBjAKBgYr +JAMDAQIFAAOBgQA+RdocBmA2VV9E5aKPBcp01tdZAvvW9Tve3docArVKR/4/yvSX +Z+wvzzk+uu4qBp49HN3nqPYMrzbTmjBFu4ce5fkZ7dHF0W1sSBL0rox5z36Aq2re +JjfEOEmSnNe0+opuh4FSVOssXblXTE8lEQU0FhhItgDx2ADnWZibaxLG4w== +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/expired/factory.pem b/src/lib/libssl/src/certs/expired/factory.pem new file mode 100644 index 0000000000..8e28b391b2 --- /dev/null +++ b/src/lib/libssl/src/certs/expired/factory.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICTTCCAbagAwIBAgIBADANBgkqhkiG9w0BAQQFADBMMQswCQYDVQQGEwJHQjEM +MAoGA1UEChMDVUNMMRgwFgYDVQQLEw9JQ0UtVEVMIFByb2plY3QxFTATBgNVBAMT +DFRydXN0RmFjdG9yeTAeFw05NzA0MjIxNDM5MTRaFw05ODA0MjIxNDM5MTRaMEwx +CzAJBgNVBAYTAkdCMQwwCgYDVQQKEwNVQ0wxGDAWBgNVBAsTD0lDRS1URUwgUHJv +amVjdDEVMBMGA1UEAxMMVHJ1c3RGYWN0b3J5MIGcMAoGBFUIAQECAgQAA4GNADCB +iQKBgQCEieR8NcXkUW1f0G6aC6u0i8q/98JqS6RxK5YmHIGKCkuTWAUjzLfUa4dt +U9igGCjTuxaDqlzEim+t/02pmiBZT9HaX++35MjQPUWmsChcYU5WyzGErXi+rQaw +zlwS73zM8qiPj/97lXYycWhgL0VaiDSPxRXEUdWoaGruom4mNQIDAQABo0IwQDAd +BgNVHQ4EFgQUHal1LZr7oVg5z6lYzrhTgZRCmcUwDgYDVR0PAQH/BAQDAgH2MA8G +A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAfaggfl6FZoioecjv0dq8 +/DXo/u11iMZvXn08gjX/zl2b4wtPbShOSY5FhkSm8GeySasz+/Nwb/uzfnIhokWi +lfPZHtlCWtXbIy/TN51eJyq04ceDCQDWvLC2enVg9KB+GJ34b5c5VaPRzq8MBxsA +S7ELuYGtmYgYm9NZOIr7yU0= +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/expired/rsa-cca.pem b/src/lib/libssl/src/certs/expired/rsa-cca.pem new file mode 100644 index 0000000000..69f5c1c84c --- /dev/null +++ b/src/lib/libssl/src/certs/expired/rsa-cca.pem @@ -0,0 +1,19 @@ +subject=/C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority +issuer= /C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority +notBefore=941104185834Z +notAfter =991103185834Z +-----BEGIN X509 CERTIFICATE----- + +MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw +HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy +Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05 +OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT +ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o +975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/ +touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE +7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j +9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI +0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb +MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU= +-----END X509 CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/expired/vsign2.pem b/src/lib/libssl/src/certs/expired/vsign2.pem new file mode 100644 index 0000000000..d8bdd8c812 --- /dev/null +++ b/src/lib/libssl/src/certs/expired/vsign2.pem @@ -0,0 +1,18 @@ +subject=/C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority +notBefore=Jan 29 00:00:00 1996 GMT +notAfter=Jan 7 23:59:59 2004 GMT +-----BEGIN CERTIFICATE----- +MIICPTCCAaYCEQC6WslMBTuS1qe2307QU5INMA0GCSqGSIb3DQEBAgUAMF8xCzAJ +BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh +c3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05 +NjAxMjkwMDAwMDBaFw0wNDAxMDcyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD +VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMiBQdWJsaWMgUHJp +bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB +jQAwgYkCgYEAtlqLow1qI4OAa885h/QhEzMGTCWi7VUSl8WngLn6g8EgoPovFQ18 +oWBrfnks+gYPOq72G2+x0v8vKFJfg31LxHq3+GYfgFT8t8KOWUoUV0bRmpO+QZED +uxWAk1zr58wIbD8+s0r8/0tsI9VQgiZEGY4jw3HqGSRHBJ51v8imAB8CAwEAATAN +BgkqhkiG9w0BAQIFAAOBgQC2AB+TV6QHp0DOZUA/VV7t7/pUSaUw1iF8YYfug5ML +v7Qz8pisnwa/TqjOFIFMywROWMPPX+5815pvy0GKt3+BuP+EYcYnQ2UdDOyxAArd +G6S7x3ggKLKi3TaVLuFUT79guXdoEZkj6OpS6KoATmdOu5C1RZtG644W78QzWzM9 +1Q== +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/certs/wellsfgo.pem b/src/lib/libssl/src/certs/wellsfgo.pem new file mode 100644 index 0000000000..2ba88cdda7 --- /dev/null +++ b/src/lib/libssl/src/certs/wellsfgo.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID5TCCAs2gAwIBAgIEOeSXnjANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UEBhMC +VVMxFDASBgNVBAoTC1dlbGxzIEZhcmdvMSwwKgYDVQQLEyNXZWxscyBGYXJnbyBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEvMC0GA1UEAxMmV2VsbHMgRmFyZ28gUm9v +dCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDAxMDExMTY0MTI4WhcNMjEwMTE0 +MTY0MTI4WjCBgjELMAkGA1UEBhMCVVMxFDASBgNVBAoTC1dlbGxzIEZhcmdvMSww +KgYDVQQLEyNXZWxscyBGYXJnbyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEvMC0G +A1UEAxMmV2VsbHMgRmFyZ28gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVqDM7Jvk0/82bfuUER84A4n13 +5zHCLielTWi5MbqNQ1mXx3Oqfz1cQJ4F5aHiidlMuD+b+Qy0yGIZLEWukR5zcUHE +SxP9cMIlrCL1dQu3U+SlK93OvRw6esP3E48mVJwWa2uv+9iWsWCaSOAlIiR5NM4O +JgALTqv9i86C1y8IcGjBqAr5dE8Hq6T54oN+J3N0Prj5OEL8pahbSCOz6+MlsoCu +ltQKnMJ4msZoGK43YjdeUXWoWGPAUe5AeH6orxqg4bB4nVCMe+ez/I4jsNtlAHCE +AQgAFG5Uhpq6zPk3EPbg3oQtnaSFN9OH4xXQwReQfhkhahKpdv0SAulPIV4XAgMB +AAGjYTBfMA8GA1UdEwEB/wQFMAMBAf8wTAYDVR0gBEUwQzBBBgtghkgBhvt7hwcB +CzAyMDAGCCsGAQUFBwIBFiRodHRwOi8vd3d3LndlbGxzZmFyZ28uY29tL2NlcnRw +b2xpY3kwDQYJKoZIhvcNAQEFBQADggEBANIn3ZwKdyu7IvICtUpKkfnRLb7kuxpo +7w6kAOnu5+/u9vnldKTC2FJYxHT7zmu1Oyl5GFrvm+0fazbuSCUlFLZWohDo7qd/ +0D+j0MNdJu4HzMPBJCGHHt8qElNvQRbn7a6U+oxy+hNH8Dx+rn0ROhPs7fpvcmR7 +nX1/Jv16+yWt6j4pf0zjAFcysLPp7VMX2YuyFA4w6OXVE8Zkr8QA1dhYJPz1j+zx +x32l2w8n0cbyQIjmH/ZhqPRCyLk306m+LFZ4wnKbWV01QIroTmMatukgalHizqSQ +33ZwmVxwQ023tqcZZE6St8WRPH9IFmV7Fv3L/PvZ1dZPIWU7Sn9Ho/s= +-----END CERTIFICATE----- diff --git a/src/lib/libssl/src/config b/src/lib/libssl/src/config index 25a3703c1f..0715d378d9 100644 --- a/src/lib/libssl/src/config +++ b/src/lib/libssl/src/config @@ -23,6 +23,7 @@ PREFIX="" SUFFIX="" TEST="false" +EXE="" # pick up any command line args to config for i @@ -110,16 +111,16 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in echo "m68k-apple-aux3"; exit 0 ;; - AIX:[3456789]:4:*) - echo "${MACHINE}-ibm-aix43"; exit 0 + AIX:[3-9]:4:*) + echo "${MACHINE}-ibm-aix"; exit 0 ;; - AIX:*:[56789]:*) - echo "${MACHINE}-ibm-aix43"; exit 0 + AIX:*:[5-9]:*) + echo "${MACHINE}-ibm-aix"; exit 0 ;; AIX:*) - echo "${MACHINE}-ibm-aix"; exit 0 + echo "${MACHINE}-ibm-aix3"; exit 0 ;; dgux:*) @@ -288,6 +289,14 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in echo "${MACHINE}-whatever-sysv4"; exit 0 ;; + VOS:*:*:i786) + echo "i386-stratus-vos"; exit 0 + ;; + + VOS:*:*:*) + echo "hppa1.1-stratus-vos"; exit 0 + ;; + *:4*:R4*:m88k) echo "${MACHINE}-whatever-sysv4"; exit 0 ;; @@ -328,6 +337,9 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in echo "mips-sony-newsos4"; exit 0; ;; + MINGW*) + echo "${MACHINE}-whatever-mingw"; echo 0; + ;; CYGWIN*) case "$RELEASE" in [bB]*|1.0|1.[12].*) @@ -433,7 +445,7 @@ if [ "$SYSTEM" = "SunOS" ]; then egrep -e '^cc: .* C [0-9]\.[0-9]' | \ sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'` CCVER=${CCVER:-0} - if [ $CCVER -gt 40 ]; then + if [ $MACHINE != i86pc -a $CCVER -gt 40 ]; then CC=cc # overrides gcc!!! if [ $CCVER -eq 50 ]; then echo "WARNING! Detected WorkShop C 5.0. Do make sure you have" @@ -482,29 +494,29 @@ case "$GUESSOS" in OUT="irix-$CC" ;; mips3-sgi-irix) - CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` - CPU=${CPU:-0} - if [ $CPU -ge 5000 ]; then - options="$options -mips4" - else - options="$options -mips3" - fi + #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` + #CPU=${CPU:-0} + #if [ $CPU -ge 5000 ]; then + # options="$options -mips4" + #else + # options="$options -mips3" + #fi OUT="irix-mips3-$CC" ;; mips4-sgi-irix64) echo "WARNING! If you wish to build 64-bit library, then you have to" echo " invoke './Configure irix64-mips4-$CC' *manually*." - if [ "$TEST" = "false" ]; then + if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." - (stty -icanon min 0 time 50; read waste) < /dev/tty + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi - CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` - CPU=${CPU:-0} - if [ $CPU -ge 5000 ]; then - options="$options -mips4" - else - options="$options -mips3" - fi + #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` + #CPU=${CPU:-0} + #if [ $CPU -ge 5000 ]; then + # options="$options -mips4" + #else + # options="$options -mips3" + #fi OUT="irix-mips3-$CC" ;; alpha-*-linux2) @@ -538,9 +550,14 @@ EOF rm dummy dummy.c ;; ppc64-*-linux2) - #Use the standard target for PPC architecture until we create a - #special one for the 64bit architecture. - OUT="linux-ppc" ;; + echo "WARNING! If you wish to build 64-bit library, then you have to" + echo " invoke './Configure linux-ppc64' *manually*." + if [ "$TEST" = "false" -a -t 1 ]; then + echo " You have about 5 seconds to press Ctrl-C to abort." + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 + fi + OUT="linux-ppc" + ;; ppc-*-linux2) OUT="linux-ppc" ;; m68k-*-linux*) OUT="linux-m68k" ;; ia64-*-linux?) OUT="linux-ia64" ;; @@ -551,9 +568,9 @@ EOF echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI" echo " and wish to build 64-bit library, then you have to" echo " invoke './Configure linux64-sparcv9' *manually*." - if [ "$TEST" = "false" ]; then + if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." - (stty -icanon min 0 time 50; read waste) < /dev/tty + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi OUT="linux-sparcv9" ;; sparc-*-linux2) @@ -584,7 +601,9 @@ EOF options="$options -mschedule=$CPUSCHEDULE -march=$CPUARCH" OUT="linux-parisc" ;; - arm*-*-linux2) OUT="linux-elf-arm" ;; + arm*b-*-linux2) OUT="linux-elf-arm"; options="$options -DB_ENDIAN" ;; + arm*l-*-linux2) OUT="linux-elf-arm"; options="$options -DL_ENDIAN" ;; + arm*-*-linux2) OUT="linux-elf-arm" ;; s390-*-linux2) OUT="linux-s390" ;; s390x-*-linux?) OUT="linux-s390x" ;; x86_64-*-linux?) OUT="linux-x86_64" ;; @@ -608,9 +627,9 @@ EOF if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then echo "WARNING! If you wish to build 64-bit library, then you have to" echo " invoke './Configure solaris64-sparcv9-cc' *manually*." - if [ "$TEST" = "false" ]; then + if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." - (stty -icanon min 0 time 50; read waste) < /dev/tty + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then # $GCC_ARCH denotes default ABI chosen by compiler driver @@ -620,17 +639,17 @@ EOF OUT="solaris64-sparcv9-gcc" echo "WARNING! If you wish to build 32-bit library, then you have to" echo " invoke './Configure solaris-sparcv9-gcc' *manually*." - if [ "$TEST" = "false" ]; then + if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." - (stty -icanon min 0 time 50; read waste) < /dev/tty + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi elif [ "$GCC_ARCH" = "-m32" ]; then echo "NOTICE! If you *know* that your GNU C supports 64-bit/V9 ABI" echo " and wish to build 64-bit library, then you have to" echo " invoke './Configure solaris64-sparcv9-gcc' *manually*." - if [ "$TEST" = "false" ]; then + if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." - (stty -icanon min 0 time 50; read waste) < /dev/tty + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi fi fi @@ -638,7 +657,14 @@ EOF sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;; sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;; sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; - *86*-*-solaris2) OUT="solaris-x86-$CC" ;; + *86*-*-solaris2) + ISA64=`(isalist) 2>/dev/null | grep amd64` + if [ "$ISA64" != "" ]; then + OUT="solaris64-x86_64-$CC" + else + OUT="solaris-x86-$CC" + fi + ;; *-*-sunos4) OUT="sunos-$CC" ;; alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;; sparc64-*-freebsd*) OUT="FreeBSD-sparc64" ;; @@ -679,6 +705,10 @@ EOF *-*-UnixWare21*) OUT="unixware-2.1" ;; *-*-Unixware20*) OUT="unixware-2.0" ;; *-*-Unixware21*) OUT="unixware-2.1" ;; + *-*-vos) + options="$options no-threads no-shared no-asm no-dso" + EXE=".pm" + OUT="vos-$CC" ;; BS2000-siemens-sysv4) OUT="BS2000-OSD" ;; RM*-siemens-sysv4) OUT="ReliantUNIX" ;; *-siemens-sysv4) OUT="SINIX" ;; @@ -702,9 +732,9 @@ EOF echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi." echo " If you wish to build 32-bit library, the you have to" echo " invoke './Configure hpux-ia64-cc' *manually*." - if [ "$TEST" = "false" ]; then + if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." - (stty -icanon min 0 time 50; read waste) < /dev/tty + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi OUT="hpux64-ia64-cc" elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU @@ -714,9 +744,9 @@ EOF if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then echo "WARNING! If you wish to build 64-bit library then you have to" echo " invoke './Configure hpux64-parisc2-cc' *manually*." - if [ "$TEST" = "false" ]; then + if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." - (stty -icanon min 0 time 50; read waste) < /dev/tty + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi fi elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU @@ -728,8 +758,28 @@ EOF fi options="$options -D_REENTRANT" ;; *-hpux) OUT="hpux-parisc-$CC" ;; + *-aix) + KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null` + KERNEL_BITS=${KERNEL_BITS:-32} + OBJECT_MODE=${OBJECT_MODE:-32} + if [ "$CC" = "gcc" ]; then + OUT="aix-gcc" + elif [ $OBJECT_MODE -eq 64 ]; then + echo 'Your $OBJECT_MODE was found to be set to 64' + OUT="aix64-cc" + else + OUT="aix-cc" + if [ $KERNEL_BITS -eq 64 ]; then + echo "WARNING! If you wish to build 64-bit kit, then you have to" + echo " invoke './Configure aix64-cc' *manually*." + if [ "$TEST" = "false" -a -t 1 ]; then + echo " You have ~5 seconds to press Ctrl-C to abort." + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 + fi + fi + fi + ;; # these are all covered by the catchall below - # *-aix) OUT="aix-$CC" ;; # *-dgux) OUT="dgux" ;; mips-sony-newsos4) OUT="newsos4-gcc" ;; *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;; @@ -806,8 +856,8 @@ fi if [ ".$PERL" = . ] ; then for i in . `echo $PATH | sed 's/:/ /g'`; do - if [ -f "$i/perl5" ] ; then - PERL="$i/perl5" + if [ -f "$i/perl5$EXE" ] ; then + PERL="$i/perl5$EXE" break; fi; done @@ -815,9 +865,9 @@ fi if [ ".$PERL" = . ] ; then for i in . `echo $PATH | sed 's/:/ /g'`; do - if [ -f "$i/perl" ] ; then - if "$i/perl" -e 'exit($]<5.0)'; then - PERL="$i/perl" + if [ -f "$i/perl$EXE" ] ; then + if "$i/perl$EXE" -e 'exit($]<5.0)'; then + PERL="$i/perl$EXE" break; fi; fi; diff --git a/src/lib/libssl/src/crypto/Makefile b/src/lib/libssl/src/crypto/Makefile index eb49323ad5..cffaeedc5d 100644 --- a/src/lib/libssl/src/crypto/Makefile +++ b/src/lib/libssl/src/crypto/Makefile @@ -1,133 +1,218 @@ -LIB= crypto -CFLAGS+= -DNO_IDEA -DTERMIOS -DL_ENDIAN -DANSI_SOURCE -CFLAGS+= -I${.CURDIR}/../include -SRCS+= cryptlib.c mem.c cversion.c ex_data.c cpt_err.c -CFLAGS+= -I${.CURDIR}/md2 -SRCS+= md2_dgst.c md2_one.c -CFLAGS+= -I${.CURDIR}/md5 -SRCS+= md5_dgst.c md5_one.c -CFLAGS+= -I${.CURDIR}/sha -SRCS+= sha_dgst.c sha1dgst.c sha_one.c sha1_one.c -CFLAGS+= -I${.CURDIR}/mdc2 -SRCS+= mdc2dgst.c mdc2_one.c -CFLAGS+= -I${.CURDIR}/hmac -SRCS+= hmac.c -CFLAGS+= -I${.CURDIR}/ripemd -SRCS+= rmd_dgst.c rmd_one.c -CFLAGS+= -I${.CURDIR}/des -SRCS+= set_key.c ecb_enc.c cbc_enc.c ecb3_enc.c -SRCS+= cfb64enc.c cfb64ede.c cfb_enc.c ofb64ede.c -SRCS+= enc_read.c enc_writ.c ofb64enc.c ofb_enc.c -SRCS+= str2key.c pcbc_enc.c qud_cksm.c rand_key.c -SRCS+= read2pwd.c fcrypt.c xcbc_enc.c read_pwd.c -SRCS+= rpc_enc.c cbc_cksm.c supp.c -CFLAGS+= -I${.CURDIR}/rc2 -SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c -SRCS+= rc2ofb64.c -CFLAGS+= -I${.CURDIR}/rc4 -SRCS+= rc4_skey.c -CFLAGS+= -I${.CURDIR}/rc5 -SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5cfb64.c -SRCS+= rc5ofb64.c -CFLAGS+= -I${.CURDIR}/idea -SRCS+= i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c -SRCS+= i_skey.c -CFLAGS+= -I${.CURDIR}/bf -SRCS+= bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c -CFLAGS+= -I${.CURDIR}/cast -SRCS+= c_skey.c c_ecb.c c_cfb64.c c_ofb64.c -CFLAGS+= -I${.CURDIR}/bn -SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c -SRCS+= bn_mul.c bn_print.c bn_rand.c bn_shift.c bn_sub.c -SRCS+= bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c -SRCS+= bn_sqr.c bn_recp.c bn_mont.c bn_mpi.c -CFLAGS+= -I${.CURDIR}/rsa -SRCS+= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c -SRCS+= rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c -SRCS+= rsa_none.c -CFLAGS+= -I${.CURDIR}/dsa -SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c -SRCS+= dsa_sign.c dsa_err.c -CFLAGS+= -I${.CURDIR}/dh -SRCS+= dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c -CFLAGS+= -I${.CURDIR}/buffer -SRCS+= buffer.c buf_err.c -CFLAGS+= -I${.CURDIR}/bio -SRCS+= bio_lib.c bio_cb.c bio_err.c bss_mem.c -SRCS+= bss_null.c bss_fd.c bss_file.c bss_sock.c -SRCS+= bss_conn.c bf_null.c bf_buff.c -SRCS+= b_print.c b_dump.c b_sock.c bss_acpt.c -SRCS+= bf_nbio.c -CFLAGS+= -I${.CURDIR}/stack -SRCS+= stack.c -CFLAGS+= -I${.CURDIR}/lhash -SRCS+= lhash.c lh_stats.c -CFLAGS+= -I${.CURDIR}/rand -SRCS+= md_rand.c randfile.c -CFLAGS+= -I${.CURDIR}/err -SRCS+= err.c err_all.c err_prn.c -CFLAGS+= -I${.CURDIR}/objects -SRCS+= obj_dat.c obj_lib.c obj_err.c -CFLAGS+= -I${.CURDIR}/evp -SRCS+= encode.c digest.c evp_enc.c evp_key.c -SRCS+= e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c -SRCS+= e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c -SRCS+= e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c -SRCS+= e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c e_ecb_r2.c -SRCS+= e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c e_ecb_bf.c -SRCS+= e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c e_ecb_c.c -SRCS+= e_cbc_c.c e_cfb_c.c e_ofb_c.c e_ecb_r5.c -SRCS+= e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c m_null.c -SRCS+= m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c -SRCS+= m_dss1.c m_mdc2.c m_ripemd.c p_open.c -SRCS+= p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c -SRCS+= p_dec.c bio_md.c bio_b64.c bio_enc.c -SRCS+= evp_err.c e_null.c c_all.c evp_lib.c -CFLAGS+= -I${.CURDIR}/pem -SRCS+= pem_sign.c pem_seal.c pem_info.c pem_lib.c -SRCS+= pem_all.c pem_err.c -CFLAGS+= -I${.CURDIR}/asn1 -SRCS+= a_object.c a_bitstr.c a_utctm.c a_int.c -SRCS+= a_octet.c a_print.c a_type.c a_set.c -SRCS+= a_dup.c a_d2i_fp.c a_i2d_fp.c a_sign.c -SRCS+= a_digest.c a_verify.c x_algor.c x_val.c -SRCS+= x_pubkey.c x_sig.c x_req.c x_attrib.c -SRCS+= x_name.c x_cinf.c x_x509.c x_crl.c -SRCS+= x_info.c x_spki.c d2i_r_pr.c i2d_r_pr.c -SRCS+= d2i_r_pu.c i2d_r_pu.c d2i_s_pr.c i2d_s_pr.c -SRCS+= d2i_s_pu.c i2d_s_pu.c d2i_pu.c d2i_pr.c -SRCS+= i2d_pu.c i2d_pr.c t_req.c t_x509.c -SRCS+= t_pkey.c p7_i_s.c p7_signi.c p7_signd.c -SRCS+= p7_recip.c p7_enc_c.c p7_evp.c p7_dgst.c -SRCS+= p7_s_e.c p7_enc.c p7_lib.c f_int.c -SRCS+= f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c -SRCS+= d2i_dsap.c n_pkey.c a_hdr.c x_pkey.c -SRCS+= a_bool.c x_exten.c asn1_par.c asn1_lib.c -SRCS+= asn1_err.c a_meth.c a_bytes.c evp_asn1.c -CFLAGS+= -I${.CURDIR}/x509 -SRCS+= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c -SRCS+= x509_obj.c x509_req.c x509_vfy.c x509_set.c -SRCS+= x509rset.c x509_err.c x509name.c x509_v3.c -SRCS+= x509_ext.c x509pack.c x509type.c x509_lu.c -SRCS+= x_all.c x509_txt.c by_file.c by_dir.c -SRCS+= v3_net.c v3_x509.c -CFLAGS+= -I${.CURDIR}/conf -SRCS+= conf.c conf_err.c -CFLAGS+= -I${.CURDIR}/txt_db -SRCS+= txt_db.c -CFLAGS+= -I${.CURDIR}/pkcs7 -SRCS+= pk7_lib.c pkcs7err.c pk7_doit.c - -.PATH: ${.CURDIR}/md2 ${.CURDIR}/md5 ${.CURDIR}/sha ${.CURDIR}/mdc2 \ - ${.CURDIR}/hmac ${.CURDIR}/ripemd ${.CURDIR}/des ${.CURDIR}/rc2 \ - ${.CURDIR}/rc4 ${.CURDIR}/rc5 ${.CURDIR}/idea ${.CURDIR}/bf \ - ${.CURDIR}/cast ${.CURDIR}/bn ${.CURDIR}/rsa ${.CURDIR}/dsa \ - ${.CURDIR}/dh ${.CURDIR}/buffer ${.CURDIR}/bio ${.CURDIR}/stack \ - ${.CURDIR}/lhash ${.CURDIR}/rand ${.CURDIR}/err ${.CURDIR}/objects \ - ${.CURDIR}/evp ${.CURDIR}/pem ${.CURDIR}/asn1 ${.CURDIR}/asn1 \ - ${.CURDIR}/x509 ${.CURDIR}/conf txt_db/txt_db.c ${.CURDIR}/pkcs7 \ - ${.CURDIR}/txt_db - -.include +# +# SSLeay/crypto/Makefile +# +DIR= crypto +TOP= .. +CC= cc +INCLUDE= -I. -I$(TOP) -I../include +INCLUDES= -I.. -I../.. -I../../include +CFLAG= -g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP= /usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +RM= rm -f +AR= ar r +PEX_LIBS= +EX_LIBS= + +CFLAGS= $(INCLUDE) $(CFLAG) + + +LIBS= + +SDIRS= md2 md5 sha mdc2 hmac ripemd \ + des rc2 rc4 rc5 idea bf cast \ + bn ec rsa dsa dh dso engine aes \ + buffer bio stack lhash rand err objects \ + evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 + +GENERAL=Makefile README crypto-lib.com install.com + +LIB= $(TOP)/libcrypto.a +SHARED_LIB= libcrypto$(SHLIB_EXT) +LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c +LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o + +SRC= $(LIBSRC) + +EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \ + ossl_typ.h +HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + @(cd ..; $(MAKE) DIRS=$(DIR) all) + +all: shared + +buildinf.h: ../Makefile + ( echo "#ifndef MK1MF_BUILD"; \ + echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \ + echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \ + echo ' #define PLATFORM "$(PLATFORM)"'; \ + echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \ + echo '#endif' ) >buildinf.h + +testapps: + if echo ${SDIRS} | fgrep ' des '; \ + then cd des && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' des; fi + cd pkcs7 && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps + +subdirs: + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making all in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ + done; + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making 'files' in crypto/$$i..." && \ + $(MAKE) PERL='${PERL}' files ); \ + done; + +links: + @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS) + @for i in $(SDIRS); do \ + (cd $$i && echo "making links in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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}' PERL='${PERL}' links ); \ + done; + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +shared: buildinf.h lib subdirs + @if [ -n "$(SHARED_LIBS)" ]; then \ + egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null || \ + (cd ..; $(MAKE) $(SHARED_LIB)); \ + fi + +libs: + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making libs in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \ + done; + +tests: + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making tests in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \ + done; + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ;\ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making install in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \ + done; + +lint: + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making lint in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \ + done; + +depend: + if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + if [ ! -s buildinf.h ]; then rm buildinf.h; fi + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making depend in crypto/$$i..." && \ + $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \ + done; + +clean: + rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making clean in crypto/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \ + done; + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + @for i in $(SDIRS) ;\ + do \ + (cd $$i && echo "making dclean in crypto/$$i..." && \ + $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \ + done; + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h +cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h +cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h +cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cpt_err.c +cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h +cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h +cryptlib.o: ../include/openssl/symhacks.h cryptlib.c cryptlib.h +cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h +cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h +cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c +ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c +ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h +ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ex_data.o: ../include/openssl/safestack.h ../include/openssl/stack.h +ex_data.o: ../include/openssl/symhacks.h cryptlib.h ex_data.c +mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +mem.o: ../include/openssl/err.h ../include/openssl/lhash.h +mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h +mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c +mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h +mem_clr.o: ../include/openssl/symhacks.h mem_clr.c +mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h +mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h +mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c +o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h +o_str.o: o_str.c o_str.h +o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c +o_time.o: o_time.h +tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h +tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h +tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h +tmdiff.o: ../include/openssl/symhacks.h ../include/openssl/tmdiff.h cryptlib.h +tmdiff.o: tmdiff.c +uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +uid.o: ../include/openssl/safestack.h ../include/openssl/stack.h +uid.o: ../include/openssl/symhacks.h uid.c diff --git a/src/lib/libssl/src/crypto/aes/Makefile b/src/lib/libssl/src/crypto/aes/Makefile new file mode 100644 index 0000000000..a37c6f66a2 --- /dev/null +++ b/src/lib/libssl/src/crypto/aes/Makefile @@ -0,0 +1,103 @@ +# +# crypto/aes/Makefile +# + +DIR= aes +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP= /usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +#TEST=aestest.c +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c aes_ctr.c +LIBOBJ=aes_core.o aes_misc.o aes_ecb.o aes_cbc.o aes_cfb.o aes_ofb.o aes_ctr.o + +SRC= $(LIBSRC) + +EXHEADER= aes.h +HEADER= aes_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +$(LIBOBJ): $(LIBSRC) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: installs + +installs: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c aes_locl.h +aes_cfb.o: ../../e_os.h ../../include/openssl/aes.h +aes_cfb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +aes_cfb.o: aes_cfb.c aes_locl.h +aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_core.o: ../../include/openssl/fips.h ../../include/openssl/opensslconf.h +aes_core.o: aes_core.c aes_locl.h +aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.h +aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h +aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_misc.o: ../../include/openssl/opensslconf.h +aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c +aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +aes_ofb.o: ../../include/openssl/opensslconf.h aes_locl.h aes_ofb.c diff --git a/src/lib/libssl/src/crypto/aes/aes.h b/src/lib/libssl/src/crypto/aes/aes.h index da067f4a8f..8a3ea0b883 100644 --- a/src/lib/libssl/src/crypto/aes/aes.h +++ b/src/lib/libssl/src/crypto/aes/aes.h @@ -52,6 +52,8 @@ #ifndef HEADER_AES_H #define HEADER_AES_H +#include + #ifdef OPENSSL_NO_AES #error AES is disabled. #endif @@ -64,6 +66,10 @@ #define AES_MAXNR 14 #define AES_BLOCK_SIZE 16 +#if defined(OPENSSL_FIPS) +#define FIPS_AES_SIZE_T int +#endif + #ifdef __cplusplus extern "C" { #endif @@ -95,6 +101,15 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, const unsigned long length, const AES_KEY *key, unsigned char *ivec, int *num, const int enc); +void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, + const unsigned long length, const AES_KEY *key, + unsigned char *ivec, int *num, const int enc); +void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, + const unsigned long length, const AES_KEY *key, + unsigned char *ivec, int *num, const int enc); +void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out, + const int nbits,const AES_KEY *key, + unsigned char *ivec,const int enc); void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, const unsigned long length, const AES_KEY *key, unsigned char *ivec, int *num); diff --git a/src/lib/libssl/src/crypto/aes/aes_cbc.c b/src/lib/libssl/src/crypto/aes/aes_cbc.c index 1222a21002..d2ba6bcdb4 100644 --- a/src/lib/libssl/src/crypto/aes/aes_cbc.c +++ b/src/lib/libssl/src/crypto/aes/aes_cbc.c @@ -66,6 +66,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, unsigned long n; unsigned long len = length; unsigned char tmp[AES_BLOCK_SIZE]; + const unsigned char *iv = ivec; assert(in && out && key && ivec); assert((AES_ENCRYPT == enc)||(AES_DECRYPT == enc)); @@ -73,22 +74,39 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, if (AES_ENCRYPT == enc) { while (len >= AES_BLOCK_SIZE) { for(n=0; n < AES_BLOCK_SIZE; ++n) - tmp[n] = in[n] ^ ivec[n]; - AES_encrypt(tmp, out, key); - memcpy(ivec, out, AES_BLOCK_SIZE); + out[n] = in[n] ^ iv[n]; + AES_encrypt(out, out, key); + iv = out; len -= AES_BLOCK_SIZE; in += AES_BLOCK_SIZE; out += AES_BLOCK_SIZE; } if (len) { for(n=0; n < len; ++n) - tmp[n] = in[n] ^ ivec[n]; + out[n] = in[n] ^ iv[n]; for(n=len; n < AES_BLOCK_SIZE; ++n) - tmp[n] = ivec[n]; - AES_encrypt(tmp, tmp, key); - memcpy(out, tmp, AES_BLOCK_SIZE); - memcpy(ivec, tmp, AES_BLOCK_SIZE); - } + out[n] = iv[n]; + AES_encrypt(out, out, key); + iv = out; + } + memcpy(ivec,iv,AES_BLOCK_SIZE); + } else if (in != out) { + while (len >= AES_BLOCK_SIZE) { + AES_decrypt(in, out, key); + for(n=0; n < AES_BLOCK_SIZE; ++n) + out[n] ^= iv[n]; + iv = in; + len -= AES_BLOCK_SIZE; + in += AES_BLOCK_SIZE; + out += AES_BLOCK_SIZE; + } + if (len) { + AES_decrypt(in,tmp,key); + for(n=0; n < len; ++n) + out[n] = tmp[n] ^ iv[n]; + iv = in; + } + memcpy(ivec,iv,AES_BLOCK_SIZE); } else { while (len >= AES_BLOCK_SIZE) { memcpy(tmp, in, AES_BLOCK_SIZE); @@ -102,10 +120,12 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, } if (len) { memcpy(tmp, in, AES_BLOCK_SIZE); - AES_decrypt(tmp, tmp, key); + AES_decrypt(tmp, out, key); for(n=0; n < len; ++n) - out[n] = tmp[n] ^ ivec[n]; + out[n] ^= ivec[n]; + for(n=len; n < AES_BLOCK_SIZE; ++n) + out[n] = tmp[n]; memcpy(ivec, tmp, AES_BLOCK_SIZE); - } + } } } diff --git a/src/lib/libssl/src/crypto/aes/aes_cfb.c b/src/lib/libssl/src/crypto/aes/aes_cfb.c index 9b569dda90..49f0411010 100644 --- a/src/lib/libssl/src/crypto/aes/aes_cfb.c +++ b/src/lib/libssl/src/crypto/aes/aes_cfb.c @@ -114,6 +114,7 @@ #include #include "aes_locl.h" +#include "e_os.h" /* The input and output encrypted as though 128bit cfb mode is being * used. The extra state information to record how much of the @@ -155,3 +156,70 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, *num=n; } +/* This expects a single block of size nbits for both in and out. Note that + it corrupts any extra bits in the last byte of out */ +void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out, + const int nbits,const AES_KEY *key, + unsigned char *ivec,const int enc) + { + int n,rem,num; + unsigned char ovec[AES_BLOCK_SIZE*2]; + + if (nbits<=0 || nbits>128) return; + + /* fill in the first half of the new IV with the current IV */ + memcpy(ovec,ivec,AES_BLOCK_SIZE); + /* construct the new IV */ + AES_encrypt(ivec,ivec,key); + num = (nbits+7)/8; + if (enc) /* encrypt the input */ + for(n=0 ; n < num ; ++n) + out[n] = (ovec[AES_BLOCK_SIZE+n] = in[n] ^ ivec[n]); + else /* decrypt the input */ + for(n=0 ; n < num ; ++n) + out[n] = (ovec[AES_BLOCK_SIZE+n] = in[n]) ^ ivec[n]; + /* shift ovec left... */ + rem = nbits%8; + num = nbits/8; + if(rem==0) + memcpy(ivec,ovec+num,AES_BLOCK_SIZE); + else + for(n=0 ; n < AES_BLOCK_SIZE ; ++n) + ivec[n] = ovec[n+num]<>(8-rem); + + /* it is not necessary to cleanse ovec, since the IV is not secret */ + } + +/* N.B. This expects the input to be packed, MS bit first */ +void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, + const unsigned long length, const AES_KEY *key, + unsigned char *ivec, int *num, const int enc) + { + unsigned int n; + unsigned char c[1],d[1]; + + assert(in && out && key && ivec && num); + assert(*num == 0); + + memset(out,0,(length+7)/8); + for(n=0 ; n < length ; ++n) + { + c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0; + AES_cfbr_encrypt_block(c,d,1,key,ivec,enc); + out[n/8]=(out[n/8]&~(1 << (7-n%8)))|((d[0]&0x80) >> (n%8)); + } + } + +void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, + const unsigned long length, const AES_KEY *key, + unsigned char *ivec, int *num, const int enc) + { + unsigned int n; + + assert(in && out && key && ivec && num); + assert(*num == 0); + + for(n=0 ; n < length ; ++n) + AES_cfbr_encrypt_block(&in[n],&out[n],8,key,ivec,enc); + } + diff --git a/src/lib/libssl/src/crypto/aes/aes_core.c b/src/lib/libssl/src/crypto/aes/aes_core.c index 2f41a825f8..ed566a8123 100644 --- a/src/lib/libssl/src/crypto/aes/aes_core.c +++ b/src/lib/libssl/src/crypto/aes/aes_core.c @@ -37,8 +37,11 @@ #include #include +#include #include "aes_locl.h" +#ifndef OPENSSL_FIPS + /* Te0[x] = S [x].[02, 01, 01, 03]; Te1[x] = S [x].[03, 02, 01, 01]; @@ -1255,3 +1258,4 @@ void AES_decrypt(const unsigned char *in, unsigned char *out, PUTU32(out + 12, s3); } +#endif /* ndef OPENSSL_FIPS */ diff --git a/src/lib/libssl/src/crypto/aes/aes_ctr.c b/src/lib/libssl/src/crypto/aes/aes_ctr.c index 79e1c18f19..f36982be1e 100644 --- a/src/lib/libssl/src/crypto/aes/aes_ctr.c +++ b/src/lib/libssl/src/crypto/aes/aes_ctr.c @@ -59,7 +59,7 @@ #include #include "aes_locl.h" -/* NOTE: CTR mode is big-endian. The rest of the AES code +/* NOTE: the IV/counter CTR mode is big-endian. The rest of the AES code * is endian-neutral. */ /* increment counter (128-bit int) by 1 */ @@ -67,61 +67,36 @@ static void AES_ctr128_inc(unsigned char *counter) { unsigned long c; /* Grab bottom dword of counter and increment */ -#ifdef L_ENDIAN - c = GETU32(counter + 0); - c++; - PUTU32(counter + 0, c); -#else c = GETU32(counter + 12); - c++; + c++; c &= 0xFFFFFFFF; PUTU32(counter + 12, c); -#endif /* if no overflow, we're done */ if (c) return; /* Grab 1st dword of counter and increment */ -#ifdef L_ENDIAN - c = GETU32(counter + 4); - c++; - PUTU32(counter + 4, c); -#else c = GETU32(counter + 8); - c++; + c++; c &= 0xFFFFFFFF; PUTU32(counter + 8, c); -#endif /* if no overflow, we're done */ if (c) return; /* Grab 2nd dword of counter and increment */ -#ifdef L_ENDIAN - c = GETU32(counter + 8); - c++; - PUTU32(counter + 8, c); -#else c = GETU32(counter + 4); - c++; + c++; c &= 0xFFFFFFFF; PUTU32(counter + 4, c); -#endif /* if no overflow, we're done */ if (c) return; /* Grab top dword of counter and increment */ -#ifdef L_ENDIAN - c = GETU32(counter + 12); - c++; - PUTU32(counter + 12, c); -#else c = GETU32(counter + 0); - c++; + c++; c &= 0xFFFFFFFF; PUTU32(counter + 0, c); -#endif - } /* The input encrypted as though 128bit counter mode is being diff --git a/src/lib/libssl/src/crypto/aes/aes_locl.h b/src/lib/libssl/src/crypto/aes/aes_locl.h index f290946058..4184729e34 100644 --- a/src/lib/libssl/src/crypto/aes/aes_locl.h +++ b/src/lib/libssl/src/crypto/aes/aes_locl.h @@ -62,7 +62,7 @@ #include #include -#if defined(_MSC_VER) && !defined(OPENSSL_SYS_WINCE) +#if defined(_MSC_VER) && !defined(_M_IA64) && !defined(OPENSSL_SYS_WINCE) # define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) # define GETU32(p) SWAP(*((u32 *)(p))) # define PUTU32(ct, st) { *((u32 *)(ct)) = SWAP((st)); } diff --git a/src/lib/libssl/src/crypto/asn1/Makefile b/src/lib/libssl/src/crypto/asn1/Makefile new file mode 100644 index 0000000000..b11298d621 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/Makefile @@ -0,0 +1,1150 @@ +# +# SSLeay/crypto/asn1/Makefile +# + +DIR= asn1 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= a_object.c a_bitstr.c a_utctm.c a_gentm.c a_time.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_enum.c a_utf8.c a_sign.c a_digest.c a_verify.c a_mbstr.c a_strex.c \ + x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_bignum.c \ + x_long.c x_name.c x_x509.c x_x509a.c x_crl.c x_info.c x_spki.c nsseq.c \ + d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c\ + t_req.c t_x509.c t_x509a.c t_crl.c t_pkey.c t_spki.c t_bitst.c \ + tasn_new.c tasn_fre.c tasn_enc.c tasn_dec.c tasn_utl.c tasn_typ.c \ + f_int.c f_string.c n_pkey.c \ + f_enum.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 a_strnid.c \ + evp_asn1.c asn_pack.c p5_pbe.c p5_pbev2.c p8_pkey.c asn_moid.c +LIBOBJ= a_object.o a_bitstr.o a_utctm.o a_gentm.o a_time.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_enum.o a_utf8.o a_sign.o a_digest.o a_verify.o a_mbstr.o a_strex.o \ + x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o x_bignum.o \ + x_long.o x_name.o x_x509.o x_x509a.o x_crl.o x_info.o x_spki.o nsseq.o \ + d2i_pu.o d2i_pr.o i2d_pu.o i2d_pr.o \ + t_req.o t_x509.o t_x509a.o t_crl.o t_pkey.o t_spki.o t_bitst.o \ + tasn_new.o tasn_fre.o tasn_enc.o tasn_dec.o tasn_utl.o tasn_typ.o \ + f_int.o f_string.o n_pkey.o \ + f_enum.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 a_strnid.o \ + evp_asn1.o asn_pack.o p5_pbe.o p5_pbev2.o p8_pkey.o asn_moid.o + +SRC= $(LIBSRC) + +EXHEADER= asn1.h asn1_mac.h asn1t.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +test: test.c + cc -g -I../../include -c test.c + cc -g -I../../include -o test test.o -L../.. -lcrypto + +pk: pk.c + cc -g -I../../include -c pk.c + cc -g -I../../include -o pk pk.o -L../.. -lcrypto + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +a_bitstr.o: ../../e_os.h ../../include/openssl/asn1.h +a_bitstr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_bitstr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_bitstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_bitstr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_bitstr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_bitstr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_bitstr.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bitstr.c +a_bool.o: ../../e_os.h ../../include/openssl/asn1.h +a_bool.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +a_bool.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_bool.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_bool.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_bool.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_bool.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_bool.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_bool.o: ../cryptlib.h a_bool.c +a_bytes.o: ../../e_os.h ../../include/openssl/asn1.h +a_bytes.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_bytes.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_bytes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_bytes.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_bytes.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_bytes.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_bytes.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bytes.c +a_d2i_fp.o: ../../e_os.h ../../include/openssl/asn1.h +a_d2i_fp.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +a_d2i_fp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_d2i_fp.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_d2i_fp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_d2i_fp.o: ../../include/openssl/opensslconf.h +a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_d2i_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_d2i_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_d2i_fp.c +a_digest.o: ../../e_os.h ../../include/openssl/aes.h +a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h +a_digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +a_digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +a_digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +a_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +a_digest.o: ../../include/openssl/opensslconf.h +a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +a_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +a_digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +a_digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +a_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +a_digest.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +a_digest.o: ../cryptlib.h a_digest.c +a_dup.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_dup.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_dup.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_dup.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_dup.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_dup.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_dup.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_dup.o: ../cryptlib.h a_dup.c +a_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_enum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_enum.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_enum.o: ../cryptlib.h a_enum.c +a_gentm.o: ../../e_os.h ../../include/openssl/asn1.h +a_gentm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_gentm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_gentm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_gentm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_gentm.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_gentm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_gentm.o: ../../include/openssl/symhacks.h ../cryptlib.h ../o_time.h a_gentm.c +a_hdr.o: ../../e_os.h ../../include/openssl/asn1.h +a_hdr.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +a_hdr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_hdr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_hdr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_hdr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_hdr.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_hdr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_hdr.o: ../cryptlib.h a_hdr.c +a_i2d_fp.o: ../../e_os.h ../../include/openssl/asn1.h +a_i2d_fp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_i2d_fp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_i2d_fp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_i2d_fp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_i2d_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_i2d_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_i2d_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_i2d_fp.c +a_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_int.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_int.o: ../cryptlib.h a_int.c +a_mbstr.o: ../../e_os.h ../../include/openssl/asn1.h +a_mbstr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_mbstr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_mbstr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_mbstr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_mbstr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_mbstr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_mbstr.o: ../../include/openssl/symhacks.h ../cryptlib.h a_mbstr.c +a_meth.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_meth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_meth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_meth.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_meth.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_meth.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_meth.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_meth.o: ../cryptlib.h a_meth.c +a_object.o: ../../e_os.h ../../include/openssl/asn1.h +a_object.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_object.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_object.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_object.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +a_object.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +a_object.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_object.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_object.o: ../../include/openssl/symhacks.h ../cryptlib.h a_object.c +a_octet.o: ../../e_os.h ../../include/openssl/asn1.h +a_octet.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_octet.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_octet.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_octet.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_octet.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_octet.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_octet.o: ../../include/openssl/symhacks.h ../cryptlib.h a_octet.c +a_print.o: ../../e_os.h ../../include/openssl/asn1.h +a_print.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_print.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_print.o: ../../include/openssl/symhacks.h ../cryptlib.h a_print.c +a_set.o: ../../e_os.h ../../include/openssl/asn1.h +a_set.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +a_set.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_set.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_set.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_set.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_set.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_set.o: ../cryptlib.h a_set.c +a_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +a_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +a_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +a_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +a_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +a_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +a_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +a_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +a_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +a_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +a_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +a_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +a_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +a_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +a_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +a_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +a_sign.o: ../cryptlib.h a_sign.c +a_strex.o: ../../e_os.h ../../include/openssl/aes.h +a_strex.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_strex.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_strex.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_strex.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_strex.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_strex.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_strex.o: ../../include/openssl/err.h ../../include/openssl/evp.h +a_strex.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +a_strex.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +a_strex.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +a_strex.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +a_strex.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_strex.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +a_strex.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +a_strex.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +a_strex.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +a_strex.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +a_strex.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +a_strex.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +a_strex.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_strex.c charmap.h +a_strnid.o: ../../e_os.h ../../include/openssl/asn1.h +a_strnid.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_strnid.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_strnid.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_strnid.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +a_strnid.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +a_strnid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_strnid.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_strnid.o: ../../include/openssl/symhacks.h ../cryptlib.h a_strnid.c +a_time.o: ../../e_os.h ../../include/openssl/asn1.h +a_time.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +a_time.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_time.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_time.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_time.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_time.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_time.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_time.o: ../cryptlib.h ../o_time.h a_time.c +a_type.o: ../../e_os.h ../../include/openssl/asn1.h +a_type.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +a_type.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_type.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_type.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_type.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_type.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_type.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_type.o: ../cryptlib.h a_type.c +a_utctm.o: ../../e_os.h ../../include/openssl/asn1.h +a_utctm.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +a_utctm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +a_utctm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +a_utctm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +a_utctm.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_utctm.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +a_utctm.o: ../../include/openssl/symhacks.h ../cryptlib.h ../o_time.h a_utctm.c +a_utf8.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_utf8.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_utf8.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +a_utf8.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +a_utf8.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +a_utf8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +a_utf8.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_utf8.o: ../cryptlib.h a_utf8.c +a_verify.o: ../../e_os.h ../../include/openssl/aes.h +a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h +a_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +a_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +a_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +a_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +a_verify.o: ../../include/openssl/opensslconf.h +a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +a_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +a_verify.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +a_verify.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +a_verify.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +a_verify.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +a_verify.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +a_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +a_verify.o: ../cryptlib.h a_verify.c +asn1_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +asn1_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +asn1_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +asn1_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +asn1_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn1_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +asn1_err.o: ../../include/openssl/symhacks.h asn1_err.c +asn1_lib.o: ../../e_os.h ../../include/openssl/asn1.h +asn1_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +asn1_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +asn1_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +asn1_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +asn1_lib.o: ../../include/openssl/opensslconf.h +asn1_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn1_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +asn1_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_lib.c +asn1_par.o: ../../e_os.h ../../include/openssl/asn1.h +asn1_par.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +asn1_par.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +asn1_par.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +asn1_par.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +asn1_par.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn1_par.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +asn1_par.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c +asn_moid.o: ../../e_os.h ../../include/openssl/aes.h +asn_moid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +asn_moid.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +asn_moid.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +asn_moid.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +asn_moid.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +asn_moid.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +asn_moid.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +asn_moid.o: ../../include/openssl/err.h ../../include/openssl/evp.h +asn_moid.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +asn_moid.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +asn_moid.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +asn_moid.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +asn_moid.o: ../../include/openssl/opensslconf.h +asn_moid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn_moid.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +asn_moid.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +asn_moid.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +asn_moid.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +asn_moid.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +asn_moid.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +asn_moid.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +asn_moid.o: ../cryptlib.h asn_moid.c +asn_pack.o: ../../e_os.h ../../include/openssl/asn1.h +asn_pack.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +asn_pack.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +asn_pack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +asn_pack.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +asn_pack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +asn_pack.o: ../../include/openssl/symhacks.h ../cryptlib.h asn_pack.c +d2i_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +d2i_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +d2i_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +d2i_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +d2i_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +d2i_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +d2i_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +d2i_pr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +d2i_pr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +d2i_pr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +d2i_pr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +d2i_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +d2i_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +d2i_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +d2i_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +d2i_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +d2i_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +d2i_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +d2i_pr.o: ../../include/openssl/ui_compat.h ../cryptlib.h d2i_pr.c +d2i_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +d2i_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +d2i_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +d2i_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +d2i_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +d2i_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +d2i_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +d2i_pu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +d2i_pu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +d2i_pu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +d2i_pu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +d2i_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +d2i_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +d2i_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +d2i_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +d2i_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +d2i_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +d2i_pu.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +d2i_pu.o: ../../include/openssl/ui_compat.h ../cryptlib.h d2i_pu.c +evp_asn1.o: ../../e_os.h ../../include/openssl/asn1.h +evp_asn1.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +evp_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +evp_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +evp_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +evp_asn1.o: ../../include/openssl/opensslconf.h +evp_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +evp_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +evp_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_asn1.c +f_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +f_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +f_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +f_enum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +f_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +f_enum.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +f_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +f_enum.o: ../cryptlib.h f_enum.c +f_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +f_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +f_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +f_int.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +f_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +f_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +f_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +f_int.o: ../cryptlib.h f_int.c +f_string.o: ../../e_os.h ../../include/openssl/asn1.h +f_string.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +f_string.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +f_string.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +f_string.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +f_string.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +f_string.o: ../../include/openssl/symhacks.h ../cryptlib.h f_string.c +i2d_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +i2d_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +i2d_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +i2d_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +i2d_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +i2d_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +i2d_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +i2d_pr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +i2d_pr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +i2d_pr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +i2d_pr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +i2d_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +i2d_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +i2d_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +i2d_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +i2d_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +i2d_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +i2d_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +i2d_pr.o: ../../include/openssl/ui_compat.h ../cryptlib.h i2d_pr.c +i2d_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +i2d_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +i2d_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +i2d_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +i2d_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +i2d_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +i2d_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +i2d_pu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +i2d_pu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +i2d_pu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +i2d_pu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +i2d_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +i2d_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +i2d_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +i2d_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +i2d_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +i2d_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +i2d_pu.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +i2d_pu.o: ../../include/openssl/ui_compat.h ../cryptlib.h i2d_pu.c +n_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +n_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h +n_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +n_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +n_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +n_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +n_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +n_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +n_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +n_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +n_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +n_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +n_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +n_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +n_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +n_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +n_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +n_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +n_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +n_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +n_pkey.o: ../cryptlib.h n_pkey.c +nsseq.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +nsseq.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +nsseq.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +nsseq.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +nsseq.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +nsseq.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +nsseq.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +nsseq.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +nsseq.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +nsseq.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +nsseq.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +nsseq.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +nsseq.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +nsseq.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +nsseq.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +nsseq.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +nsseq.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +nsseq.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +nsseq.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h nsseq.c +p5_pbe.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p5_pbe.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +p5_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p5_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p5_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p5_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p5_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p5_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p5_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +p5_pbe.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +p5_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p5_pbe.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p5_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p5_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p5_pbe.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p5_pbe.o: ../cryptlib.h p5_pbe.c +p5_pbev2.o: ../../e_os.h ../../include/openssl/aes.h +p5_pbev2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +p5_pbev2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p5_pbev2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p5_pbev2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p5_pbev2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p5_pbev2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p5_pbev2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p5_pbev2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p5_pbev2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p5_pbev2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p5_pbev2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p5_pbev2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p5_pbev2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p5_pbev2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p5_pbev2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p5_pbev2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p5_pbev2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p5_pbev2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p5_pbev2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_pbev2.c +p8_pkey.o: ../../e_os.h ../../include/openssl/aes.h +p8_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +p8_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p8_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p8_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p8_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p8_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p8_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p8_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p8_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p8_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p8_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p8_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p8_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p8_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p8_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p8_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p8_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p8_pkey.o: ../cryptlib.h p8_pkey.c +t_bitst.o: ../../e_os.h ../../include/openssl/aes.h +t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +t_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +t_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +t_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +t_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +t_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +t_bitst.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +t_bitst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +t_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +t_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +t_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +t_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +t_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +t_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +t_bitst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +t_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +t_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h t_bitst.c +t_crl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +t_crl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_crl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_crl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +t_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +t_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +t_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +t_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +t_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +t_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +t_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +t_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +t_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +t_crl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +t_crl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +t_crl.o: ../cryptlib.h t_crl.c +t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +t_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +t_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h +t_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +t_pkey.o: ../../include/openssl/symhacks.h ../cryptlib.h t_pkey.c +t_req.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +t_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_req.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h +t_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +t_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +t_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +t_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +t_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +t_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +t_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +t_req.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +t_req.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +t_req.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +t_req.o: ../cryptlib.h t_req.c +t_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +t_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_spki.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +t_spki.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +t_spki.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +t_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +t_spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +t_spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +t_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +t_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +t_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +t_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +t_spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +t_spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +t_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +t_spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +t_spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +t_spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +t_spki.o: ../cryptlib.h t_spki.c +t_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +t_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_x509.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h +t_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +t_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +t_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +t_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +t_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +t_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +t_x509.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +t_x509.o: ../cryptlib.h t_x509.c +t_x509a.o: ../../e_os.h ../../include/openssl/aes.h +t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_x509a.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +t_x509a.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_x509a.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_x509a.o: ../../include/openssl/err.h ../../include/openssl/evp.h +t_x509a.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +t_x509a.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +t_x509a.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +t_x509a.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +t_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +t_x509a.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +t_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +t_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +t_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +t_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +t_x509a.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +t_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h t_x509a.c +tasn_dec.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_dec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_dec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +tasn_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +tasn_dec.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +tasn_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tasn_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_dec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_dec.o: ../../include/openssl/symhacks.h tasn_dec.c +tasn_enc.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_enc.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tasn_enc.o: ../../include/openssl/opensslconf.h +tasn_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_enc.o: ../../include/openssl/symhacks.h tasn_enc.c +tasn_fre.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_fre.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_fre.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_fre.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tasn_fre.o: ../../include/openssl/opensslconf.h +tasn_fre.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_fre.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_fre.o: ../../include/openssl/symhacks.h tasn_fre.c +tasn_new.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_new.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_new.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_new.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +tasn_new.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tasn_new.o: ../../include/openssl/opensslconf.h +tasn_new.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_new.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_new.o: ../../include/openssl/symhacks.h tasn_new.c +tasn_typ.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_typ.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_typ.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_typ.o: ../../include/openssl/opensslconf.h +tasn_typ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_typ.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_typ.o: ../../include/openssl/symhacks.h tasn_typ.c +tasn_utl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +tasn_utl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +tasn_utl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +tasn_utl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +tasn_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tasn_utl.o: ../../include/openssl/opensslconf.h +tasn_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tasn_utl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +tasn_utl.o: ../../include/openssl/symhacks.h tasn_utl.c +x_algor.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_algor.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_algor.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_algor.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_algor.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_algor.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_algor.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_algor.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_algor.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_algor.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_algor.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_algor.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_algor.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_algor.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_algor.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_algor.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_algor.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_algor.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_algor.o: x_algor.c +x_attrib.o: ../../e_os.h ../../include/openssl/aes.h +x_attrib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +x_attrib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_attrib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_attrib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_attrib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_attrib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_attrib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_attrib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_attrib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_attrib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_attrib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_attrib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_attrib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_attrib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_attrib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_attrib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_attrib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_attrib.o: ../cryptlib.h x_attrib.c +x_bignum.o: ../../e_os.h ../../include/openssl/asn1.h +x_bignum.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_bignum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_bignum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +x_bignum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +x_bignum.o: ../../include/openssl/opensslconf.h +x_bignum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_bignum.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +x_bignum.o: ../../include/openssl/symhacks.h ../cryptlib.h x_bignum.c +x_crl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_crl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_crl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_crl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_crl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_crl.c +x_exten.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_exten.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_exten.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_exten.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_exten.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_exten.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_exten.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_exten.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_exten.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_exten.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_exten.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_exten.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_exten.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_exten.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_exten.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_exten.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_exten.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_exten.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_exten.o: x_exten.c +x_info.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_info.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_info.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_info.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_info.o: ../cryptlib.h x_info.c +x_long.o: ../../e_os.h ../../include/openssl/asn1.h +x_long.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_long.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_long.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +x_long.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +x_long.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_long.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +x_long.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_long.o: ../cryptlib.h x_long.c +x_name.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_name.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_name.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_name.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_name.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_name.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_name.c +x_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +x_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_pkey.c +x_pubkey.o: ../../e_os.h ../../include/openssl/aes.h +x_pubkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +x_pubkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_pubkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_pubkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_pubkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_pubkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_pubkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_pubkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_pubkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_pubkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_pubkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_pubkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_pubkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_pubkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_pubkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_pubkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_pubkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_pubkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_pubkey.o: ../cryptlib.h x_pubkey.c +x_req.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_req.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_req.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_req.c +x_sig.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_sig.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_sig.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_sig.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_sig.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_sig.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_sig.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_sig.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_sig.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_sig.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_sig.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_sig.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_sig.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_sig.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_sig.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_sig.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_sig.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_sig.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_sig.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_sig.c +x_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_spki.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_spki.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_spki.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_spki.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_spki.c +x_val.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_val.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_val.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_val.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_val.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_val.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_val.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_val.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_val.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_val.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_val.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_val.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_val.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_val.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_val.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_val.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_val.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_val.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_val.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_val.c +x_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +x_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h x_x509.c +x_x509a.o: ../../e_os.h ../../include/openssl/aes.h +x_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +x_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_x509a.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_x509a.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_x509a.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_x509a.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_x509a.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_x509a.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_x509a.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_x509a.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_x509a.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_x509a.o: ../cryptlib.h x_x509a.c diff --git a/src/lib/libssl/src/crypto/asn1/a_bitstr.c b/src/lib/libssl/src/crypto/asn1/a_bitstr.c index f4ea96cd54..b81bf4fc81 100644 --- a/src/lib/libssl/src/crypto/asn1/a_bitstr.c +++ b/src/lib/libssl/src/crypto/asn1/a_bitstr.c @@ -194,8 +194,12 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) c=(unsigned char *)OPENSSL_realloc_clean(a->data, a->length, w+1); - if (c == NULL) return(0); - if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length); + if (c == NULL) + { + ASN1err(ASN1_F_ASN1_BIT_STRING_SET_BIT,ERR_R_MALLOC_FAILURE); + return 0; + } + if (w+1-a->length > 0) memset(c+a->length, 0, w+1-a->length); a->data=c; a->length=w+1; } diff --git a/src/lib/libssl/src/crypto/asn1/a_digest.c b/src/lib/libssl/src/crypto/asn1/a_digest.c index 4931e222a0..7182e9fa5d 100644 --- a/src/lib/libssl/src/crypto/asn1/a_digest.c +++ b/src/lib/libssl/src/crypto/asn1/a_digest.c @@ -65,6 +65,7 @@ # include #endif +#include #include #include #include @@ -78,7 +79,11 @@ int ASN1_digest(int (*i2d)(), const EVP_MD *type, char *data, unsigned char *str,*p; i=i2d(data,NULL); - if ((str=(unsigned char *)OPENSSL_malloc(i)) == NULL) return(0); + if ((str=(unsigned char *)OPENSSL_malloc(i)) == NULL) + { + ASN1err(ASN1_F_ASN1_DIGEST,ERR_R_MALLOC_FAILURE); + return(0); + } p=str; i2d(data,&p); diff --git a/src/lib/libssl/src/crypto/asn1/a_enum.c b/src/lib/libssl/src/crypto/asn1/a_enum.c index ad8f0ffd1a..03ede68d1c 100644 --- a/src/lib/libssl/src/crypto/asn1/a_enum.c +++ b/src/lib/libssl/src/crypto/asn1/a_enum.c @@ -156,7 +156,7 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai) unsigned char *new_data=OPENSSL_realloc(ret->data, len+4); if (!new_data) { - ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_MALLOC_FAILURE); + ASN1err(ASN1_F_BN_TO_ASN1_ENUMERATED,ERR_R_MALLOC_FAILURE); goto err; } ret->data=new_data; diff --git a/src/lib/libssl/src/crypto/asn1/a_gentm.c b/src/lib/libssl/src/crypto/asn1/a_gentm.c index 8581007868..0dfd576211 100644 --- a/src/lib/libssl/src/crypto/asn1/a_gentm.c +++ b/src/lib/libssl/src/crypto/asn1/a_gentm.c @@ -192,8 +192,9 @@ int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str) { if (s != NULL) { - ASN1_STRING_set((ASN1_STRING *)s, - (unsigned char *)str,t.length); + if (!ASN1_STRING_set((ASN1_STRING *)s, + (unsigned char *)str,t.length)) + return 0; s->type=V_ASN1_GENERALIZEDTIME; } return(1); @@ -223,7 +224,12 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, if ((p == NULL) || ((size_t)s->length < len)) { p=OPENSSL_malloc(len); - if (p == NULL) return(NULL); + if (p == NULL) + { + ASN1err(ASN1_F_ASN1_GENERALIZEDTIME_SET, + ERR_R_MALLOC_FAILURE); + return(NULL); + } if (s->data != NULL) OPENSSL_free(s->data); s->data=(unsigned char *)p; diff --git a/src/lib/libssl/src/crypto/asn1/a_int.c b/src/lib/libssl/src/crypto/asn1/a_int.c index edb243c021..21cc64bb23 100644 --- a/src/lib/libssl/src/crypto/asn1/a_int.c +++ b/src/lib/libssl/src/crypto/asn1/a_int.c @@ -64,7 +64,26 @@ ASN1_INTEGER *ASN1_INTEGER_dup(ASN1_INTEGER *x) { return M_ASN1_INTEGER_dup(x);} int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y) -{ return M_ASN1_INTEGER_cmp(x,y);} + { + int neg, ret; + /* Compare signs */ + neg = x->type & V_ASN1_NEG; + if (neg != (y->type & V_ASN1_NEG)) + { + if (neg) + return -1; + else + return 1; + } + + ret = ASN1_STRING_cmp(x, y); + + if (neg) + return -ret; + else + return ret; + } + /* * This converts an ASN1 INTEGER into its content encoding. diff --git a/src/lib/libssl/src/crypto/asn1/a_print.c b/src/lib/libssl/src/crypto/asn1/a_print.c index 8035513f04..d18e772320 100644 --- a/src/lib/libssl/src/crypto/asn1/a_print.c +++ b/src/lib/libssl/src/crypto/asn1/a_print.c @@ -60,7 +60,7 @@ #include "cryptlib.h" #include -int ASN1_PRINTABLE_type(unsigned char *s, int len) +int ASN1_PRINTABLE_type(const unsigned char *s, int len) { int c; int ia5=0; diff --git a/src/lib/libssl/src/crypto/asn1/a_set.c b/src/lib/libssl/src/crypto/asn1/a_set.c index 0f839822ff..e24061c545 100644 --- a/src/lib/libssl/src/crypto/asn1/a_set.c +++ b/src/lib/libssl/src/crypto/asn1/a_set.c @@ -118,8 +118,13 @@ int i2d_ASN1_SET(STACK *a, unsigned char **pp, int (*func)(), int ex_tag, } pStart = p; /* Catch the beg of Setblobs*/ - if (!(rgSetBlob = (MYBLOB *)OPENSSL_malloc( sk_num(a) * sizeof(MYBLOB)))) return 0; /* In this array -we will store the SET blobs */ + /* In this array we will store the SET blobs */ + rgSetBlob = (MYBLOB *)OPENSSL_malloc(sk_num(a) * sizeof(MYBLOB)); + if (rgSetBlob == NULL) + { + ASN1err(ASN1_F_I2D_ASN1_SET,ERR_R_MALLOC_FAILURE); + return(0); + } for (i=0; i 30)) return -1; mbflag = tag2nbyte[type]; if(mbflag == -1) return -1; - mbflag |= MBSTRING_FLAG; + if (mbflag == 0) + mbflag = MBSTRING_UTF8; + else if (mbflag == 4) + mbflag = MBSTRING_UNIV; + else + mbflag |= MBSTRING_FLAG; stmp.data = NULL; ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING); if(ret < 0) return ret; diff --git a/src/lib/libssl/src/crypto/asn1/a_type.c b/src/lib/libssl/src/crypto/asn1/a_type.c index fe3fcd40b0..2292d49b93 100644 --- a/src/lib/libssl/src/crypto/asn1/a_type.c +++ b/src/lib/libssl/src/crypto/asn1/a_type.c @@ -71,7 +71,10 @@ int ASN1_TYPE_get(ASN1_TYPE *a) void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value) { if (a->value.ptr != NULL) - ASN1_primitive_free((ASN1_VALUE **)&a, NULL); + { + ASN1_TYPE **tmp_a = &a; + ASN1_primitive_free((ASN1_VALUE **)tmp_a, NULL); + } a->type=type; a->value.ptr=value; } diff --git a/src/lib/libssl/src/crypto/asn1/a_utctm.c b/src/lib/libssl/src/crypto/asn1/a_utctm.c index 999852dae5..7b25fed331 100644 --- a/src/lib/libssl/src/crypto/asn1/a_utctm.c +++ b/src/lib/libssl/src/crypto/asn1/a_utctm.c @@ -173,8 +173,9 @@ int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str) { if (s != NULL) { - ASN1_STRING_set((ASN1_STRING *)s, - (unsigned char *)str,t.length); + if (!ASN1_STRING_set((ASN1_STRING *)s, + (unsigned char *)str,t.length)) + return 0; s->type = V_ASN1_UTCTIME; } return(1); @@ -203,7 +204,11 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) if ((p == NULL) || ((size_t)s->length < len)) { p=OPENSSL_malloc(len); - if (p == NULL) return(NULL); + if (p == NULL) + { + ASN1err(ASN1_F_ASN1_UTCTIME_SET,ERR_R_MALLOC_FAILURE); + return(NULL); + } if (s->data != NULL) OPENSSL_free(s->data); s->data=(unsigned char *)p; diff --git a/src/lib/libssl/src/crypto/asn1/a_verify.c b/src/lib/libssl/src/crypto/asn1/a_verify.c index da2a0a6d69..18ef0acf00 100644 --- a/src/lib/libssl/src/crypto/asn1/a_verify.c +++ b/src/lib/libssl/src/crypto/asn1/a_verify.c @@ -142,6 +142,13 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat goto err; } + if (!EVP_VerifyInit_ex(&ctx,type, NULL)) + { + ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB); + ret=0; + goto err; + } + inl = ASN1_item_i2d(asn, &buf_in, it); if (buf_in == NULL) @@ -150,7 +157,6 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat goto err; } - EVP_VerifyInit_ex(&ctx,type, NULL); EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl); OPENSSL_cleanse(buf_in,(unsigned int)inl); diff --git a/src/lib/libssl/src/crypto/asn1/asn1.h b/src/lib/libssl/src/crypto/asn1/asn1.h index 3414509f1b..ceaeb4cbe3 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1.h +++ b/src/lib/libssl/src/crypto/asn1/asn1.h @@ -829,7 +829,7 @@ BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai,BIGNUM *bn); /* General */ /* given a string, return the correct type, max is the maximum length */ -int ASN1_PRINTABLE_type(unsigned char *s, int max); +int ASN1_PRINTABLE_type(const unsigned char *s, int max); int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass); ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp, @@ -950,16 +950,19 @@ void ERR_load_ASN1_strings(void); #define ASN1_F_A2I_ASN1_ENUMERATED 101 #define ASN1_F_A2I_ASN1_INTEGER 102 #define ASN1_F_A2I_ASN1_STRING 103 +#define ASN1_F_ASN1_BIT_STRING_SET_BIT 176 #define ASN1_F_ASN1_CHECK_TLEN 104 #define ASN1_F_ASN1_COLLATE_PRIMITIVE 105 #define ASN1_F_ASN1_COLLECT 106 #define ASN1_F_ASN1_D2I_BIO 107 #define ASN1_F_ASN1_D2I_EX_PRIMITIVE 108 #define ASN1_F_ASN1_D2I_FP 109 +#define ASN1_F_ASN1_DIGEST 177 #define ASN1_F_ASN1_DO_ADB 110 #define ASN1_F_ASN1_DUP 111 #define ASN1_F_ASN1_ENUMERATED_SET 112 #define ASN1_F_ASN1_ENUMERATED_TO_BN 113 +#define ASN1_F_ASN1_GENERALIZEDTIME_SET 178 #define ASN1_F_ASN1_GET_OBJECT 114 #define ASN1_F_ASN1_HEADER_NEW 115 #define ASN1_F_ASN1_I2D_BIO 116 @@ -975,6 +978,7 @@ void ERR_load_ASN1_strings(void); #define ASN1_F_ASN1_SEQ_PACK 126 #define ASN1_F_ASN1_SEQ_UNPACK 127 #define ASN1_F_ASN1_SIGN 128 +#define ASN1_F_ASN1_STRING_SET 179 #define ASN1_F_ASN1_STRING_TABLE_ADD 129 #define ASN1_F_ASN1_STRING_TYPE_NEW 130 #define ASN1_F_ASN1_TEMPLATE_D2I 131 @@ -984,6 +988,7 @@ void ERR_load_ASN1_strings(void); #define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134 #define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135 #define ASN1_F_ASN1_UNPACK_STRING 136 +#define ASN1_F_ASN1_UTCTIME_SET 180 #define ASN1_F_ASN1_VERIFY 137 #define ASN1_F_BN_TO_ASN1_ENUMERATED 138 #define ASN1_F_BN_TO_ASN1_INTEGER 139 @@ -1007,6 +1012,7 @@ void ERR_load_ASN1_strings(void); #define ASN1_F_D2I_X509_CINF 157 #define ASN1_F_D2I_X509_NAME 158 #define ASN1_F_D2I_X509_PKEY 159 +#define ASN1_F_I2D_ASN1_SET 181 #define ASN1_F_I2D_ASN1_TIME 160 #define ASN1_F_I2D_DSA_PUBKEY 161 #define ASN1_F_I2D_NETSCAPE_RSA 162 diff --git a/src/lib/libssl/src/crypto/asn1/asn1_err.c b/src/lib/libssl/src/crypto/asn1/asn1_err.c index 094ec06fda..3b57c8fbae 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_err.c +++ b/src/lib/libssl/src/crypto/asn1/asn1_err.c @@ -1,6 +1,6 @@ /* crypto/asn1/asn1_err.c */ /* ==================================================================== - * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -70,16 +70,19 @@ static ERR_STRING_DATA ASN1_str_functs[]= {ERR_PACK(0,ASN1_F_A2I_ASN1_ENUMERATED,0), "a2i_ASN1_ENUMERATED"}, {ERR_PACK(0,ASN1_F_A2I_ASN1_INTEGER,0), "a2i_ASN1_INTEGER"}, {ERR_PACK(0,ASN1_F_A2I_ASN1_STRING,0), "a2i_ASN1_STRING"}, +{ERR_PACK(0,ASN1_F_ASN1_BIT_STRING_SET_BIT,0), "ASN1_BIT_STRING_set_bit"}, {ERR_PACK(0,ASN1_F_ASN1_CHECK_TLEN,0), "ASN1_CHECK_TLEN"}, {ERR_PACK(0,ASN1_F_ASN1_COLLATE_PRIMITIVE,0), "ASN1_COLLATE_PRIMITIVE"}, {ERR_PACK(0,ASN1_F_ASN1_COLLECT,0), "ASN1_COLLECT"}, {ERR_PACK(0,ASN1_F_ASN1_D2I_BIO,0), "ASN1_d2i_bio"}, {ERR_PACK(0,ASN1_F_ASN1_D2I_EX_PRIMITIVE,0), "ASN1_D2I_EX_PRIMITIVE"}, {ERR_PACK(0,ASN1_F_ASN1_D2I_FP,0), "ASN1_d2i_fp"}, +{ERR_PACK(0,ASN1_F_ASN1_DIGEST,0), "ASN1_digest"}, {ERR_PACK(0,ASN1_F_ASN1_DO_ADB,0), "ASN1_DO_ADB"}, {ERR_PACK(0,ASN1_F_ASN1_DUP,0), "ASN1_dup"}, {ERR_PACK(0,ASN1_F_ASN1_ENUMERATED_SET,0), "ASN1_ENUMERATED_set"}, {ERR_PACK(0,ASN1_F_ASN1_ENUMERATED_TO_BN,0), "ASN1_ENUMERATED_to_BN"}, +{ERR_PACK(0,ASN1_F_ASN1_GENERALIZEDTIME_SET,0), "ASN1_GENERALIZEDTIME_set"}, {ERR_PACK(0,ASN1_F_ASN1_GET_OBJECT,0), "ASN1_get_object"}, {ERR_PACK(0,ASN1_F_ASN1_HEADER_NEW,0), "ASN1_HEADER_new"}, {ERR_PACK(0,ASN1_F_ASN1_I2D_BIO,0), "ASN1_i2d_bio"}, @@ -95,6 +98,7 @@ static ERR_STRING_DATA ASN1_str_functs[]= {ERR_PACK(0,ASN1_F_ASN1_SEQ_PACK,0), "ASN1_seq_pack"}, {ERR_PACK(0,ASN1_F_ASN1_SEQ_UNPACK,0), "ASN1_seq_unpack"}, {ERR_PACK(0,ASN1_F_ASN1_SIGN,0), "ASN1_sign"}, +{ERR_PACK(0,ASN1_F_ASN1_STRING_SET,0), "ASN1_STRING_set"}, {ERR_PACK(0,ASN1_F_ASN1_STRING_TABLE_ADD,0), "ASN1_STRING_TABLE_add"}, {ERR_PACK(0,ASN1_F_ASN1_STRING_TYPE_NEW,0), "ASN1_STRING_type_new"}, {ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_D2I,0), "ASN1_TEMPLATE_D2I"}, @@ -104,6 +108,7 @@ static ERR_STRING_DATA ASN1_str_functs[]= {ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING,0), "ASN1_TYPE_get_int_octetstring"}, {ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_OCTETSTRING,0), "ASN1_TYPE_get_octetstring"}, {ERR_PACK(0,ASN1_F_ASN1_UNPACK_STRING,0), "ASN1_unpack_string"}, +{ERR_PACK(0,ASN1_F_ASN1_UTCTIME_SET,0), "ASN1_UTCTIME_set"}, {ERR_PACK(0,ASN1_F_ASN1_VERIFY,0), "ASN1_verify"}, {ERR_PACK(0,ASN1_F_BN_TO_ASN1_ENUMERATED,0), "BN_to_ASN1_ENUMERATED"}, {ERR_PACK(0,ASN1_F_BN_TO_ASN1_INTEGER,0), "BN_to_ASN1_INTEGER"}, @@ -127,6 +132,7 @@ static ERR_STRING_DATA ASN1_str_functs[]= {ERR_PACK(0,ASN1_F_D2I_X509_CINF,0), "D2I_X509_CINF"}, {ERR_PACK(0,ASN1_F_D2I_X509_NAME,0), "D2I_X509_NAME"}, {ERR_PACK(0,ASN1_F_D2I_X509_PKEY,0), "d2i_X509_PKEY"}, +{ERR_PACK(0,ASN1_F_I2D_ASN1_SET,0), "i2d_ASN1_SET"}, {ERR_PACK(0,ASN1_F_I2D_ASN1_TIME,0), "I2D_ASN1_TIME"}, {ERR_PACK(0,ASN1_F_I2D_DSA_PUBKEY,0), "i2d_DSA_PUBKEY"}, {ERR_PACK(0,ASN1_F_I2D_NETSCAPE_RSA,0), "i2d_Netscape_RSA"}, diff --git a/src/lib/libssl/src/crypto/asn1/asn1_lib.c b/src/lib/libssl/src/crypto/asn1/asn1_lib.c index a74f1368d3..97b9b35f4b 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_lib.c +++ b/src/lib/libssl/src/crypto/asn1/asn1_lib.c @@ -349,6 +349,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len) if (str->data == NULL) { + ASN1err(ASN1_F_ASN1_STRING_SET,ERR_R_MALLOC_FAILURE); str->data=c; return(0); } diff --git a/src/lib/libssl/src/crypto/asn1/evp_asn1.c b/src/lib/libssl/src/crypto/asn1/evp_asn1.c index 3506005a71..f92ce6cb5d 100644 --- a/src/lib/libssl/src/crypto/asn1/evp_asn1.c +++ b/src/lib/libssl/src/crypto/asn1/evp_asn1.c @@ -115,7 +115,11 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data, if ((osp=ASN1_STRING_new()) == NULL) return(0); /* Grow the 'string' */ - ASN1_STRING_set(osp,NULL,size); + if (!ASN1_STRING_set(osp,NULL,size)) + { + ASN1_STRING_free(osp); + return(0); + } M_ASN1_STRING_length_set(osp, size); p=M_ASN1_STRING_data(osp); diff --git a/src/lib/libssl/src/crypto/asn1/p5_pbe.c b/src/lib/libssl/src/crypto/asn1/p5_pbe.c index 891150638e..ec788267e0 100644 --- a/src/lib/libssl/src/crypto/asn1/p5_pbe.c +++ b/src/lib/libssl/src/crypto/asn1/p5_pbe.c @@ -76,47 +76,55 @@ IMPLEMENT_ASN1_FUNCTIONS(PBEPARAM) X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt, int saltlen) { - PBEPARAM *pbe; + PBEPARAM *pbe=NULL; ASN1_OBJECT *al; X509_ALGOR *algor; - ASN1_TYPE *astype; + ASN1_TYPE *astype=NULL; if (!(pbe = PBEPARAM_new ())) { ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } if(iter <= 0) iter = PKCS5_DEFAULT_ITER; - ASN1_INTEGER_set (pbe->iter, iter); + if (!ASN1_INTEGER_set(pbe->iter, iter)) { + ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE); + goto err; + } if (!saltlen) saltlen = PKCS5_SALT_LEN; if (!(pbe->salt->data = OPENSSL_malloc (saltlen))) { ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } pbe->salt->length = saltlen; if (salt) memcpy (pbe->salt->data, salt, saltlen); else if (RAND_pseudo_bytes (pbe->salt->data, saltlen) < 0) - return NULL; + goto err; if (!(astype = ASN1_TYPE_new())) { ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } astype->type = V_ASN1_SEQUENCE; if(!ASN1_pack_string(pbe, i2d_PBEPARAM, &astype->value.sequence)) { ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } PBEPARAM_free (pbe); + pbe = NULL; al = OBJ_nid2obj(alg); /* never need to free al */ if (!(algor = X509_ALGOR_new())) { ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } ASN1_OBJECT_free(algor->algorithm); algor->algorithm = al; algor->parameter = astype; return (algor); +err: + if (pbe != NULL) PBEPARAM_free(pbe); + if (astype != NULL) ASN1_TYPE_free(astype); + return NULL; } diff --git a/src/lib/libssl/src/crypto/asn1/p5_pbev2.c b/src/lib/libssl/src/crypto/asn1/p5_pbev2.c index 91e1c8987d..e0dc0ec4ee 100644 --- a/src/lib/libssl/src/crypto/asn1/p5_pbev2.c +++ b/src/lib/libssl/src/crypto/asn1/p5_pbev2.c @@ -1,6 +1,6 @@ /* p5_pbev2.c */ /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL - * project 1999. + * project 1999-2004. */ /* ==================================================================== * Copyright (c) 1999 The OpenSSL Project. All rights reserved. @@ -113,7 +113,8 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, if(!(scheme->parameter = ASN1_TYPE_new())) goto merr; /* Create random IV */ - if (RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) + if (EVP_CIPHER_iv_length(cipher) && + RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) goto err; EVP_CIPHER_CTX_init(&ctx); @@ -123,6 +124,7 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) { ASN1err(ASN1_F_PKCS5_PBE2_SET, ASN1_R_ERROR_SETTING_CIPHER_PARAMS); + EVP_CIPHER_CTX_cleanup(&ctx); goto err; } EVP_CIPHER_CTX_cleanup(&ctx); diff --git a/src/lib/libssl/src/crypto/asn1/t_bitst.c b/src/lib/libssl/src/crypto/asn1/t_bitst.c index 8ee789f082..397332d9b8 100644 --- a/src/lib/libssl/src/crypto/asn1/t_bitst.c +++ b/src/lib/libssl/src/crypto/asn1/t_bitst.c @@ -84,7 +84,10 @@ int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value, int bitnum; bitnum = ASN1_BIT_STRING_num_asc(name, tbl); if(bitnum < 0) return 0; - if(bs) ASN1_BIT_STRING_set_bit(bs, bitnum, value); + if(bs) { + if(!ASN1_BIT_STRING_set_bit(bs, bitnum, value)) + return 0; + } return 1; } diff --git a/src/lib/libssl/src/crypto/asn1/x_crl.c b/src/lib/libssl/src/crypto/asn1/x_crl.c index 11fce96825..b99f8fc522 100644 --- a/src/lib/libssl/src/crypto/asn1/x_crl.c +++ b/src/lib/libssl/src/crypto/asn1/x_crl.c @@ -63,8 +63,6 @@ static int X509_REVOKED_cmp(const X509_REVOKED * const *a, const X509_REVOKED * const *b); -static int X509_REVOKED_seq_cmp(const X509_REVOKED * const *a, - const X509_REVOKED * const *b); ASN1_SEQUENCE(X509_REVOKED) = { ASN1_SIMPLE(X509_REVOKED,serialNumber, ASN1_INTEGER), @@ -72,43 +70,28 @@ ASN1_SEQUENCE(X509_REVOKED) = { ASN1_SEQUENCE_OF_OPT(X509_REVOKED,extensions, X509_EXTENSION) } ASN1_SEQUENCE_END(X509_REVOKED) -/* The X509_CRL_INFO structure needs a bit of customisation. This is actually - * mirroring the old behaviour: its purpose is to allow the use of - * sk_X509_REVOKED_find to lookup revoked certificates. Unfortunately - * this will zap the original order and the signature so we keep a copy - * of the original positions and reorder appropriately before encoding. - * - * Might want to see if there's a better way of doing this later... +/* The X509_CRL_INFO structure needs a bit of customisation. + * Since we cache the original encoding the signature wont be affected by + * reordering of the revoked field. */ static int crl_inf_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it) { X509_CRL_INFO *a = (X509_CRL_INFO *)*pval; - int i; - int (*old_cmp)(const X509_REVOKED * const *, - const X509_REVOKED * const *); if(!a || !a->revoked) return 1; switch(operation) { - - /* Save original order */ + /* Just set cmp function here. We don't sort because that + * would affect the output of X509_CRL_print(). + */ case ASN1_OP_D2I_POST: - for (i=0; irevoked); i++) - sk_X509_REVOKED_value(a->revoked,i)->sequence=i; sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_cmp); break; - - /* Restore original order */ - case ASN1_OP_I2D_PRE: - old_cmp=sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_seq_cmp); - sk_X509_REVOKED_sort(a->revoked); - sk_X509_REVOKED_set_cmp_func(a->revoked,old_cmp); - break; } return 1; } -ASN1_SEQUENCE_cb(X509_CRL_INFO, crl_inf_cb) = { +ASN1_SEQUENCE_enc(X509_CRL_INFO, enc, crl_inf_cb) = { ASN1_OPT(X509_CRL_INFO, version, ASN1_INTEGER), ASN1_SIMPLE(X509_CRL_INFO, sig_alg, X509_ALGOR), ASN1_SIMPLE(X509_CRL_INFO, issuer, X509_NAME), @@ -116,7 +99,7 @@ ASN1_SEQUENCE_cb(X509_CRL_INFO, crl_inf_cb) = { ASN1_OPT(X509_CRL_INFO, nextUpdate, ASN1_TIME), ASN1_SEQUENCE_OF_OPT(X509_CRL_INFO, revoked, X509_REVOKED), ASN1_EXP_SEQUENCE_OF_OPT(X509_CRL_INFO, extensions, X509_EXTENSION, 0) -} ASN1_SEQUENCE_END_cb(X509_CRL_INFO, X509_CRL_INFO) +} ASN1_SEQUENCE_END_enc(X509_CRL_INFO, X509_CRL_INFO) ASN1_SEQUENCE_ref(X509_CRL, 0, CRYPTO_LOCK_X509_CRL) = { ASN1_SIMPLE(X509_CRL, crl, X509_CRL_INFO), @@ -137,12 +120,6 @@ static int X509_REVOKED_cmp(const X509_REVOKED * const *a, (ASN1_STRING *)(*b)->serialNumber)); } -static int X509_REVOKED_seq_cmp(const X509_REVOKED * const *a, - const X509_REVOKED * const *b) - { - return((*a)->sequence-(*b)->sequence); - } - int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) { X509_CRL_INFO *inf; @@ -153,6 +130,7 @@ int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) ASN1err(ASN1_F_X509_CRL_ADD0_REVOKED, ERR_R_MALLOC_FAILURE); return 0; } + inf->enc.modified = 1; return 1; } diff --git a/src/lib/libssl/src/crypto/asn1/x_name.c b/src/lib/libssl/src/crypto/asn1/x_name.c index caece0f158..31f3377b64 100644 --- a/src/lib/libssl/src/crypto/asn1/x_name.c +++ b/src/lib/libssl/src/crypto/asn1/x_name.c @@ -160,21 +160,22 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, unsigned char **in, long len, cons int tag, int aclass, char opt, ASN1_TLC *ctx) { unsigned char *p = *in, *q; - STACK *intname = NULL; + STACK *intname = NULL, **intname_pp = &intname; int i, j, ret; - X509_NAME *nm = NULL; + X509_NAME *nm = NULL, **nm_pp = &nm; STACK_OF(X509_NAME_ENTRY) *entries; X509_NAME_ENTRY *entry; q = p; /* Get internal representation of Name */ - ret = ASN1_item_ex_d2i((ASN1_VALUE **)&intname, &p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL), - tag, aclass, opt, ctx); + ret = ASN1_item_ex_d2i((ASN1_VALUE **)intname_pp, + &p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL), + tag, aclass, opt, ctx); if(ret <= 0) return ret; if(*val) x509_name_ex_free(val, NULL); - if(!x509_name_ex_new((ASN1_VALUE **)&nm, NULL)) goto err; + if(!x509_name_ex_new((ASN1_VALUE **)nm_pp, NULL)) goto err; /* We've decoded it: now cache encoding */ if(!BUF_MEM_grow(nm->bytes, p - q)) goto err; memcpy(nm->bytes->data, q, p - q); @@ -218,7 +219,7 @@ static int x509_name_ex_i2d(ASN1_VALUE **val, unsigned char **out, const ASN1_IT static int x509_name_encode(X509_NAME *a) { - STACK *intname = NULL; + STACK *intname = NULL, **intname_pp = &intname; int len; unsigned char *p; STACK_OF(X509_NAME_ENTRY) *entries = NULL; @@ -236,10 +237,12 @@ static int x509_name_encode(X509_NAME *a) } if(!sk_X509_NAME_ENTRY_push(entries, entry)) goto memerr; } - len = ASN1_item_ex_i2d((ASN1_VALUE **)&intname, NULL, ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1); + len = ASN1_item_ex_i2d((ASN1_VALUE **)intname_pp, NULL, + ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1); if (!BUF_MEM_grow(a->bytes,len)) goto memerr; p=(unsigned char *)a->bytes->data; - ASN1_item_ex_i2d((ASN1_VALUE **)&intname, &p, ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1); + ASN1_item_ex_i2d((ASN1_VALUE **)intname_pp, + &p, ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1); sk_pop_free(intname, sk_internal_free); a->modified = 0; return len; diff --git a/src/lib/libssl/src/crypto/asn1/x_pubkey.c b/src/lib/libssl/src/crypto/asn1/x_pubkey.c index d958540120..7d6d71af88 100644 --- a/src/lib/libssl/src/crypto/asn1/x_pubkey.c +++ b/src/lib/libssl/src/crypto/asn1/x_pubkey.c @@ -80,8 +80,7 @@ IMPLEMENT_ASN1_FUNCTIONS(X509_PUBKEY) int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) { - int ok=0; - X509_PUBKEY *pk; + X509_PUBKEY *pk=NULL; X509_ALGOR *a; ASN1_OBJECT *o; unsigned char *s,*p = NULL; @@ -104,7 +103,11 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) (a->parameter->type != V_ASN1_NULL)) { ASN1_TYPE_free(a->parameter); - a->parameter=ASN1_TYPE_new(); + if (!(a->parameter=ASN1_TYPE_new())) + { + X509err(X509_F_X509_PUBKEY_SET,ERR_R_MALLOC_FAILURE); + goto err; + } a->parameter->type=V_ASN1_NULL; } } @@ -118,14 +121,34 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) dsa=pkey->pkey.dsa; dsa->write_params=0; ASN1_TYPE_free(a->parameter); - i=i2d_DSAparams(dsa,NULL); - if ((p=(unsigned char *)OPENSSL_malloc(i)) == NULL) goto err; + if ((i=i2d_DSAparams(dsa,NULL)) <= 0) + goto err; + if (!(p=(unsigned char *)OPENSSL_malloc(i))) + { + X509err(X509_F_X509_PUBKEY_SET,ERR_R_MALLOC_FAILURE); + goto err; + } pp=p; i2d_DSAparams(dsa,&pp); - a->parameter=ASN1_TYPE_new(); + if (!(a->parameter=ASN1_TYPE_new())) + { + OPENSSL_free(p); + X509err(X509_F_X509_PUBKEY_SET,ERR_R_MALLOC_FAILURE); + goto err; + } a->parameter->type=V_ASN1_SEQUENCE; - a->parameter->value.sequence=ASN1_STRING_new(); - ASN1_STRING_set(a->parameter->value.sequence,p,i); + if (!(a->parameter->value.sequence=ASN1_STRING_new())) + { + OPENSSL_free(p); + X509err(X509_F_X509_PUBKEY_SET,ERR_R_MALLOC_FAILURE); + goto err; + } + if (!ASN1_STRING_set(a->parameter->value.sequence,p,i)) + { + OPENSSL_free(p); + X509err(X509_F_X509_PUBKEY_SET,ERR_R_MALLOC_FAILURE); + goto err; + } OPENSSL_free(p); } else @@ -143,7 +166,11 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) } p=s; i2d_PublicKey(pkey,&p); - if (!M_ASN1_BIT_STRING_set(pk->public_key,s,i)) goto err; + if (!M_ASN1_BIT_STRING_set(pk->public_key,s,i)) + { + X509err(X509_F_X509_PUBKEY_SET,ERR_R_MALLOC_FAILURE); + goto err; + } /* Set number of unused bits to zero */ pk->public_key->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); pk->public_key->flags|=ASN1_STRING_FLAG_BITS_LEFT; @@ -159,12 +186,11 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) X509_PUBKEY_free(*x); *x=pk; - pk=NULL; - ok=1; + return 1; err: if (pk != NULL) X509_PUBKEY_free(pk); - return(ok); + return 0; } EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key) diff --git a/src/lib/libssl/src/crypto/bf/Makefile b/src/lib/libssl/src/crypto/bf/Makefile new file mode 100644 index 0000000000..0e2121efdc --- /dev/null +++ b/src/lib/libssl/src/crypto/bf/Makefile @@ -0,0 +1,116 @@ +# +# SSLeay/crypto/blowfish/Makefile +# + +DIR= bf +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +BF_ENC= bf_enc.o +# or use +#DES_ENC= bx86-elf.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=bftest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c +LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o + +SRC= $(LIBSRC) + +EXHEADER= blowfish.h +HEADER= bf_pi.h bf_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > bx86-elf.s) + +# a.out +asm/bx86-out.o: asm/bx86unix.cpp + $(CPP) -DOUT asm/bx86unix.cpp | as -o asm/bx86-out.o + +# bsdi +asm/bx86bsdi.o: asm/bx86unix.cpp + $(CPP) -DBSDI asm/bx86unix.cpp | sed 's/ :/:/' | as -o asm/bx86bsdi.o + +asm/bx86unix.cpp: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) bf-586.pl cpp $(PROCESSOR) >bx86unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: installs + +installs: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/bx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +bf_cfb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h +bf_cfb64.o: ../../include/openssl/opensslconf.h bf_cfb64.c bf_locl.h +bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h +bf_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bf_ecb.o: bf_ecb.c bf_locl.h +bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h +bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h +bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h +bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c +bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/crypto.h +bf_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +bf_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bf_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bf_skey.o: bf_locl.h bf_pi.h bf_skey.c diff --git a/src/lib/libssl/src/crypto/bf/bf_skey.c b/src/lib/libssl/src/crypto/bf/bf_skey.c index 3673cdee6e..fc5bebefce 100644 --- a/src/lib/libssl/src/crypto/bf/bf_skey.c +++ b/src/lib/libssl/src/crypto/bf/bf_skey.c @@ -58,11 +58,12 @@ #include #include +#include #include #include "bf_locl.h" #include "bf_pi.h" -void BF_set_key(BF_KEY *key, int len, const unsigned char *data) +FIPS_NON_FIPS_VCIPHER_Init(BF) { int i; BF_LONG *p,ri,in[2]; diff --git a/src/lib/libssl/src/crypto/bf/blowfish.h b/src/lib/libssl/src/crypto/bf/blowfish.h index cd49e85ab2..b4d8774961 100644 --- a/src/lib/libssl/src/crypto/bf/blowfish.h +++ b/src/lib/libssl/src/crypto/bf/blowfish.h @@ -104,7 +104,10 @@ typedef struct bf_key_st BF_LONG S[4*256]; } BF_KEY; - + +#ifdef OPENSSL_FIPS +void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data); +#endif void BF_set_key(BF_KEY *key, int len, const unsigned char *data); void BF_encrypt(BF_LONG *data,const BF_KEY *key); diff --git a/src/lib/libssl/src/crypto/bio/Makefile b/src/lib/libssl/src/crypto/bio/Makefile new file mode 100644 index 0000000000..19d9350760 --- /dev/null +++ b/src/lib/libssl/src/crypto/bio/Makefile @@ -0,0 +1,214 @@ +# +# SSLeay/crypto/bio/Makefile +# + +DIR= bio +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +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 bss_log.c bss_bio.c +# bf_lbuf.c +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 bss_log.o bss_bio.o +# bf_lbuf.o + +SRC= $(LIBSRC) + +EXHEADER= bio.h +HEADER= bss_file.c $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +b_dump.o: ../../e_os.h ../../include/openssl/bio.h +b_dump.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +b_dump.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +b_dump.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +b_dump.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +b_dump.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +b_dump.o: ../cryptlib.h b_dump.c +b_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +b_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +b_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +b_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +b_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +b_print.o: ../cryptlib.h b_print.c +b_sock.o: ../../e_os.h ../../include/openssl/bio.h +b_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +b_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +b_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +b_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +b_sock.o: ../cryptlib.h b_sock.c +bf_buff.o: ../../e_os.h ../../include/openssl/bio.h +bf_buff.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bf_buff.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bf_buff.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bf_buff.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bf_buff.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bf_buff.o: ../cryptlib.h bf_buff.c +bf_nbio.o: ../../e_os.h ../../include/openssl/bio.h +bf_nbio.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bf_nbio.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bf_nbio.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bf_nbio.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bf_nbio.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +bf_nbio.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bf_nbio.o: ../cryptlib.h bf_nbio.c +bf_null.o: ../../e_os.h ../../include/openssl/bio.h +bf_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bf_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bf_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bf_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bf_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bf_null.o: ../cryptlib.h bf_null.c +bio_cb.o: ../../e_os.h ../../include/openssl/bio.h +bio_cb.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bio_cb.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_cb.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bio_cb.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bio_cb.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_cb.o: ../cryptlib.h bio_cb.c +bio_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +bio_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bio_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bio_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_err.o: bio_err.c +bio_lib.o: ../../e_os.h ../../include/openssl/bio.h +bio_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bio_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bio_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bio_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_lib.o: ../cryptlib.h bio_lib.c +bss_acpt.o: ../../e_os.h ../../include/openssl/bio.h +bss_acpt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_acpt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_acpt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_acpt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_acpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_acpt.o: ../cryptlib.h bss_acpt.c +bss_bio.o: ../../e_os.h ../../include/openssl/bio.h +bss_bio.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +bss_bio.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +bss_bio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bss_bio.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bss_bio.o: ../../include/openssl/symhacks.h bss_bio.c +bss_conn.o: ../../e_os.h ../../include/openssl/bio.h +bss_conn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_conn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_conn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_conn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_conn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_conn.o: ../cryptlib.h bss_conn.c +bss_fd.o: ../../e_os.h ../../include/openssl/bio.h +bss_fd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_fd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_fd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_fd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_fd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_fd.o: ../cryptlib.h bss_fd.c +bss_file.o: ../../e_os.h ../../include/openssl/bio.h +bss_file.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_file.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_file.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_file.o: ../cryptlib.h bss_file.c +bss_log.o: ../../e_os.h ../../include/openssl/bio.h +bss_log.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_log.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_log.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_log.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_log.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_log.o: ../cryptlib.h bss_log.c +bss_mem.o: ../../e_os.h ../../include/openssl/bio.h +bss_mem.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_mem.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_mem.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_mem.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_mem.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_mem.o: ../cryptlib.h bss_mem.c +bss_null.o: ../../e_os.h ../../include/openssl/bio.h +bss_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_null.o: ../cryptlib.h bss_null.c +bss_sock.o: ../../e_os.h ../../include/openssl/bio.h +bss_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bss_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bss_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bss_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bss_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bss_sock.o: ../cryptlib.h bss_sock.c diff --git a/src/lib/libssl/src/crypto/bio/b_print.c b/src/lib/libssl/src/crypto/bio/b_print.c index fbff331796..c2bb357b4c 100644 --- a/src/lib/libssl/src/crypto/bio/b_print.c +++ b/src/lib/libssl/src/crypto/bio/b_print.c @@ -641,7 +641,7 @@ fmtfp( multiplying by a factor of 10 */ fracpart = roundv((pow10(max)) * (ufvalue - intpart)); - if (fracpart >= pow10(max)) { + if (fracpart >= (long)pow10(max)) { intpart++; fracpart -= (long)pow10(max); } diff --git a/src/lib/libssl/src/crypto/bio/bio.h b/src/lib/libssl/src/crypto/bio/bio.h index fbbc16d00c..2eb703830f 100644 --- a/src/lib/libssl/src/crypto/bio/bio.h +++ b/src/lib/libssl/src/crypto/bio/bio.h @@ -347,6 +347,7 @@ typedef struct bio_f_buffer_ctx_struct #define BIO_C_NWRITE0 145 #define BIO_C_NWRITE 146 #define BIO_C_RESET_READ_REQUEST 147 +#define BIO_C_SET_MD_CTX 148 #define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg) diff --git a/src/lib/libssl/src/crypto/bio/bss_file.c b/src/lib/libssl/src/crypto/bio/bss_file.c index 9cdf159f82..8034ac93f9 100644 --- a/src/lib/libssl/src/crypto/bio/bss_file.c +++ b/src/lib/libssl/src/crypto/bio/bss_file.c @@ -213,13 +213,14 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr) b->shutdown=(int)num&BIO_CLOSE; b->ptr=(char *)ptr; b->init=1; + { #if defined(OPENSSL_SYS_WINDOWS) + int fd = fileno((FILE*)ptr); if (num & BIO_FP_TEXT) - _setmode(fileno((FILE *)ptr),_O_TEXT); + _setmode(fd,_O_TEXT); else - _setmode(fileno((FILE *)ptr),_O_BINARY); + _setmode(fd,_O_BINARY); #elif defined(OPENSSL_SYS_MSDOS) - { int fd = fileno((FILE*)ptr); /* Set correct text/binary mode */ if (num & BIO_FP_TEXT) @@ -235,13 +236,14 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr) else _setmode(fd,_O_BINARY); } - } #elif defined(OPENSSL_SYS_OS2) + int fd = fileno((FILE*)ptr); if (num & BIO_FP_TEXT) - setmode(fileno((FILE *)ptr), O_TEXT); + setmode(fd, O_TEXT); else - setmode(fileno((FILE *)ptr), O_BINARY); + setmode(fd, O_BINARY); #endif + } break; case BIO_C_SET_FILENAME: file_free(b); @@ -264,7 +266,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr) ret=0; break; } -#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_OS2) +#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_WIN32_CYGWIN) if (!(num & BIO_FP_TEXT)) strcat(p,"b"); else diff --git a/src/lib/libssl/src/crypto/bn/Makefile b/src/lib/libssl/src/crypto/bn/Makefile new file mode 100644 index 0000000000..f693d35d87 --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/Makefile @@ -0,0 +1,331 @@ +# +# SSLeay/crypto/bn/Makefile +# + +DIR= bn +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +BN_ASM= bn_asm.o +# or use +#BN_ASM= bn86-elf.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=bntest.c exptest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \ + bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ + bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \ + bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c + +LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \ + bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \ + bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \ + bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o + +SRC= $(LIBSRC) + +EXHEADER= bn.h +HEADER= bn_lcl.h bn_prime.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +bn_prime.h: bn_prime.pl + $(PERL) bn_prime.pl >bn_prime.h + +divtest: divtest.c ../../libcrypto.a + cc -I../../include divtest.c -o divtest ../../libcrypto.a + +bnbug: bnbug.c ../../libcrypto.a top + cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/bn86-elf.s: asm/bn-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) bn-586.pl elf $(CFLAGS) > bn86-elf.s) + +asm/co86-elf.s: asm/co-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) co-586.pl elf $(CFLAGS) > co86-elf.s) + +# a.out +asm/bn86-out.o: asm/bn86unix.cpp + $(CPP) -DOUT asm/bn86unix.cpp | as -o asm/bn86-out.o + +asm/co86-out.o: asm/co86unix.cpp + $(CPP) -DOUT asm/co86unix.cpp | as -o asm/co86-out.o + +# bsdi +asm/bn86bsdi.o: asm/bn86unix.cpp + $(CPP) -DBSDI asm/bn86unix.cpp | sed 's/ :/:/' | as -o asm/bn86bsdi.o + +asm/co86bsdi.o: asm/co86unix.cpp + $(CPP) -DBSDI asm/co86unix.cpp | sed 's/ :/:/' | as -o asm/co86bsdi.o + +asm/bn86unix.cpp: asm/bn-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) bn-586.pl cpp >bn86unix.cpp ) + +asm/co86unix.cpp: asm/co-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) co-586.pl cpp >co86unix.cpp ) + +asm/sparcv8.o: asm/sparcv8.S + +asm/sparcv8plus.o: asm/sparcv8plus.S + +# Old GNU assembler doesn't understand V9 instructions, so we +# hire /usr/ccs/bin/as to do the job. Note that option is called +# *-gcc27, but even gcc 2>=8 users may experience similar problem +# if they didn't bother to upgrade GNU assembler. Such users should +# not choose this option, but be adviced to *remove* GNU assembler +# or upgrade it. +asm/sparcv8plus-gcc27.o: asm/sparcv8plus.S + $(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \ + /usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o + + +asm/ia64.o: asm/ia64.S + +# Some compiler drivers (most notably HP-UX and Intel C++) don't +# understand .S extension:-( I wish I could pipe output from cc -E, +# but it's too compiler driver/ABI dependent to cover with a single +# rule... +asm/ia64-cpp.o: asm/ia64.S + $(CC) $(ASFLAGS) -E asm/ia64.S > /tmp/ia64.$$$$.s && \ + $(CC) $(ASFLAGS) -c -o asm/ia64-cpp.o /tmp/ia64.$$$$.s; \ + rm -f /tmp/ia64.$$$$.s + +asm/x86_64-gcc.o: asm/x86_64-gcc.c + $(CC) $(ASFLAGS) -c -o $@ $< + +asm/pa-risc2W.o: asm/pa-risc2W.s + /usr/ccs/bin/as -o asm/pa-risc2W.o asm/pa-risc2W.s + +asm/linux_ppc32.s: asm/ppc.pl; $(PERL) $< $@ +asm/linux_ppc64.s: asm/ppc.pl; $(PERL) $< $@ +asm/aix_ppc32.s: asm/ppc.pl; $(PERL) asm/ppc.pl $@ +asm/aix_ppc64.s: asm/ppc.pl; $(PERL) asm/ppc.pl $@ +asm/osx_ppc32.s: asm/ppc.pl; $(PERL) $< $@ + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +exptest: + rm -f exptest + gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a + +div: + rm -f a.out + gcc -I.. -g div.c ../../libcrypto.a + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-elf.* *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +bn_add.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_add.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_add.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_add.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_add.o: ../cryptlib.h bn_add.c bn_lcl.h +bn_asm.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_asm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_asm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_asm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_asm.o: ../cryptlib.h bn_asm.c bn_lcl.h +bn_blind.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_blind.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_blind.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_blind.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_blind.o: ../cryptlib.h bn_blind.c bn_lcl.h +bn_ctx.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_ctx.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_ctx.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_ctx.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_ctx.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_ctx.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_ctx.o: ../cryptlib.h bn_ctx.c bn_lcl.h +bn_div.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_div.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_div.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_div.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_div.o: ../cryptlib.h bn_div.c bn_lcl.h +bn_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +bn_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +bn_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bn_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +bn_err.o: ../../include/openssl/symhacks.h bn_err.c +bn_exp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_exp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_exp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_exp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_exp.o: ../cryptlib.h bn_exp.c bn_lcl.h +bn_exp2.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_exp2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_exp2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_exp2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_exp2.o: ../cryptlib.h bn_exp2.c bn_lcl.h +bn_gcd.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_gcd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_gcd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_gcd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_gcd.o: ../cryptlib.h bn_gcd.c bn_lcl.h +bn_kron.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h +bn_kron.o: ../../include/openssl/opensslconf.h bn_kron.c bn_lcl.h +bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_lib.o: ../cryptlib.h bn_lcl.h bn_lib.c +bn_mod.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_mod.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_mod.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_mod.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_mod.o: ../cryptlib.h bn_lcl.h bn_mod.c +bn_mont.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_mont.o: ../cryptlib.h bn_lcl.h bn_mont.c +bn_mpi.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_mpi.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_mpi.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mpi.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_mpi.o: ../cryptlib.h bn_lcl.h bn_mpi.c +bn_mul.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_mul.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_mul.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_mul.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_mul.o: ../cryptlib.h bn_lcl.h bn_mul.c +bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_prime.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bn_prime.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +bn_prime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_prime.o: ../cryptlib.h bn_lcl.h bn_prime.c bn_prime.h +bn_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_print.o: ../cryptlib.h bn_lcl.h bn_print.c +bn_rand.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_rand.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bn_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +bn_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_rand.o: ../cryptlib.h bn_lcl.h bn_rand.c +bn_recp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_recp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_recp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_recp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_recp.o: ../cryptlib.h bn_lcl.h bn_recp.c +bn_shift.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_shift.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_shift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_shift.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_shift.o: ../cryptlib.h bn_lcl.h bn_shift.c +bn_sqr.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_sqr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_sqr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_sqr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_sqr.o: ../cryptlib.h bn_lcl.h bn_sqr.c +bn_sqrt.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_sqrt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_sqrt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_sqrt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_sqrt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_sqrt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_sqrt.o: ../cryptlib.h bn_lcl.h bn_sqrt.c +bn_word.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_word.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_word.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_word.o: ../cryptlib.h bn_lcl.h bn_word.c diff --git a/src/lib/libssl/src/crypto/bn/asm/ia64.S b/src/lib/libssl/src/crypto/bn/asm/ia64.S index 7dfda85566..7b82b820e6 100644 --- a/src/lib/libssl/src/crypto/bn/asm/ia64.S +++ b/src/lib/libssl/src/crypto/bn/asm/ia64.S @@ -1,6 +1,6 @@ .explicit .text -.ident "ia64.S, Version 2.0" +.ident "ia64.S, Version 2.1" .ident "IA-64 ISA artwork by Andy Polyakov " // @@ -35,7 +35,7 @@ // What does it mean? You might ratiocinate that the original code // should run just faster... Because sum of latencies is smaller... // Wrong! Note that getf latency increased. This means that if a loop is -// scheduled for lower latency (and they are), then it will suffer from +// scheduled for lower latency (as they were), then it will suffer from // stall condition and the code will therefore turn anti-scalable, e.g. // original bn_mul_words spun at 5*n or 2.5 times slower than expected // on Itanium2! What to do? Reschedule loops for Itanium2? But then @@ -145,6 +145,12 @@ // -Drum=nop.m in command line. // +#if defined(_HPUX_SOURCE) && !defined(_LP64) +#define ADDP addp4 +#else +#define ADDP add +#endif + #if 1 // // bn_[add|sub]_words routines. @@ -178,27 +184,12 @@ bn_add_words: brp.loop.imp .L_bn_add_words_ctop,.L_bn_add_words_cend-16 } .body -{ .mib; -#if defined(_HPUX_SOURCE) && defined(_ILP32) - addp4 r14=0,r32 // rp -#else - mov r14=r32 // rp -#endif +{ .mib; ADDP r14=0,r32 // rp mov r9=pr };; -{ .mii; -#if defined(_HPUX_SOURCE) && defined(_ILP32) - addp4 r15=0,r33 // ap -#else - mov r15=r33 // ap -#endif +{ .mii; ADDP r15=0,r33 // ap mov ar.lc=r10 mov ar.ec=6 } -{ .mib; -#if defined(_HPUX_SOURCE) && defined(_ILP32) - addp4 r16=0,r34 // bp -#else - mov r16=r34 // bp -#endif +{ .mib; ADDP r16=0,r34 // bp mov pr.rot=1<<16 };; .L_bn_add_words_ctop: @@ -246,27 +237,12 @@ bn_sub_words: brp.loop.imp .L_bn_sub_words_ctop,.L_bn_sub_words_cend-16 } .body -{ .mib; -#if defined(_HPUX_SOURCE) && defined(_ILP32) - addp4 r14=0,r32 // rp -#else - mov r14=r32 // rp -#endif +{ .mib; ADDP r14=0,r32 // rp mov r9=pr };; -{ .mii; -#if defined(_HPUX_SOURCE) && defined(_ILP32) - addp4 r15=0,r33 // ap -#else - mov r15=r33 // ap -#endif +{ .mii; ADDP r15=0,r33 // ap mov ar.lc=r10 mov ar.ec=6 } -{ .mib; -#if defined(_HPUX_SOURCE) && defined(_ILP32) - addp4 r16=0,r34 // bp -#else - mov r16=r34 // bp -#endif +{ .mib; ADDP r16=0,r34 // bp mov pr.rot=1<<16 };; .L_bn_sub_words_ctop: @@ -332,16 +308,10 @@ bn_mul_words: #ifndef XMA_TEMPTATION -{ .mii; -#if defined(_HPUX_SOURCE) && defined(_ILP32) - addp4 r14=0,r32 // rp - addp4 r15=0,r33 // ap -#else - mov r14=r32 // rp - mov r15=r33 // ap -#endif +{ .mmi; ADDP r14=0,r32 // rp + ADDP r15=0,r33 // ap mov ar.lc=r10 } -{ .mii; mov r40=0 // serves as r35 at first (p27) +{ .mmi; mov r40=0 // serves as r35 at first (p27) mov ar.ec=13 };; // This loop spins in 2*(n+12) ticks. It's scheduled for data in Itanium @@ -424,89 +394,64 @@ bn_mul_words: .global bn_mul_add_words# .proc bn_mul_add_words# .align 64 -//.skip 0 // makes the loop split at 64-byte boundary +.skip 48 // makes the loop body aligned at 64-byte boundary bn_mul_add_words: .prologue .fframe 0 .save ar.pfs,r2 -{ .mii; alloc r2=ar.pfs,4,12,0,16 - cmp4.le p6,p0=r34,r0 };; -{ .mfb; mov r8=r0 // return value -(p6) br.ret.spnt.many b0 };; - .save ar.lc,r3 -{ .mii; sub r10=r34,r0,1 - mov r3=ar.lc - mov r9=pr };; + .save pr,r9 +{ .mmi; alloc r2=ar.pfs,4,4,0,8 + cmp4.le p6,p0=r34,r0 + mov r3=ar.lc };; +{ .mib; mov r8=r0 // return value + sub r10=r34,r0,1 +(p6) br.ret.spnt.many b0 };; .body -{ .mib; setf.sig f8=r35 // w - mov pr.rot=0x800001<<16 - // ------^----- serves as (p50) at first (p27) +{ .mib; setf.sig f8=r35 // w + mov r9=pr brp.loop.imp .L_bn_mul_add_words_ctop,.L_bn_mul_add_words_cend-16 } -{ .mii; -#if defined(_HPUX_SOURCE) && defined(_ILP32) - addp4 r14=0,r32 // rp - addp4 r15=0,r33 // ap -#else - mov r14=r32 // rp - mov r15=r33 // ap -#endif +{ .mmi; ADDP r14=0,r32 // rp + ADDP r15=0,r33 // ap mov ar.lc=r10 } -{ .mii; mov r40=0 // serves as r35 at first (p27) -#if defined(_HPUX_SOURCE) && defined(_ILP32) - addp4 r18=0,r32 // rp copy -#else - mov r18=r32 // rp copy -#endif - mov ar.ec=15 };; - -// This loop spins in 3*(n+14) ticks on Itanium and should spin in -// 2*(n+14) on "wider" IA-64 implementations (to be verified with new -// µ-architecture manuals as they become available). As usual it's -// possible to compress the epilogue, down to 10 in this case, at the -// cost of scalability. Compressed (and therefore non-scalable) loop -// running at 3*(n+11) would buy you ~10% on Itanium but take ~35% -// from "wider" IA-64 so let it be scalable! Special attention was -// paid for having the loop body split at 64-byte boundary. ld8 is -// scheduled for L1 cache as the data is more than likely there. -// Indeed, bn_mul_words has put it there a moment ago:-) +{ .mii; ADDP r16=0,r32 // rp copy + mov pr.rot=0x2001<<16 + // ------^----- serves as (p40) at first (p27) + mov ar.ec=11 };; + +// This loop spins in 3*(n+10) ticks on Itanium and in 2*(n+10) on +// Itanium 2. Yes, unlike previous versions it scales:-) Previous +// version was peforming *all* additions in IALU and was starving +// for those even on Itanium 2. In this version one addition is +// moved to FPU and is folded with multiplication. This is at cost +// of propogating the result from previous call to this subroutine +// to L2 cache... In other words negligible even for shorter keys. +// *Overall* performance improvement [over previous version] varies +// from 11 to 22 percent depending on key length. .L_bn_mul_add_words_ctop: -{ .mfi; (p25) getf.sig r36=f52 // low - (p21) xmpy.lu f48=f37,f8 - (p28) cmp.ltu p54,p50=r41,r39 } -{ .mfi; (p16) ldf8 f32=[r15],8 - (p21) xmpy.hu f40=f37,f8 - (p28) add r45=r45,r41 };; -{ .mii; (p25) getf.sig r32=f44 // high - .pred.rel "mutex",p50,p54 - (p50) add r40=r38,r35 // (p27) - (p54) add r40=r38,r35,1 } // (p27) -{ .mfb; (p28) cmp.ltu.unc p60,p0=r45,r41 - (p0) nop.f 0x0 - (p0) nop.b 0x0 } -{ .mii; (p27) ld8 r44=[r18],8 - (p62) cmp.eq.or p61,p0=-1,r46 - (p62) add r46=1,r46 } -{ .mfb; (p30) st8 [r14]=r47,8 - (p0) nop.f 0x0 +.pred.rel "mutex",p40,p42 +{ .mfi; (p23) getf.sig r36=f45 // low + (p20) xma.lu f42=f36,f8,f50 // low + (p40) add r39=r39,r35 } // (p27) +{ .mfi; (p16) ldf8 f32=[r15],8 // *(ap++) + (p20) xma.hu f36=f36,f8,f50 // high + (p42) add r39=r39,r35,1 };; // (p27) +{ .mmi; (p24) getf.sig r32=f40 // high + (p16) ldf8 f46=[r16],8 // *(rp1++) + (p40) cmp.ltu p41,p39=r39,r35 } // (p27) +{ .mib; (p26) st8 [r14]=r39,8 // *(rp2++) + (p42) cmp.leu p41,p39=r39,r35 // (p27) br.ctop.sptk .L_bn_mul_add_words_ctop};; .L_bn_mul_add_words_cend: -{ .mii; nop.m 0x0 -.pred.rel "mutex",p53,p57 -(p53) add r8=r38,r0 -(p57) add r8=r38,r0,1 } -{ .mfb; nop.m 0x0 - nop.f 0x0 - nop.b 0x0 };; -{ .mii; -(p63) add r8=1,r8 - mov pr=r9,0x1ffff - mov ar.lc=r3 } -{ .mfb; rum 1<<5 // clear um.mfh - nop.f 0x0 +{ .mmi; .pred.rel "mutex",p40,p42 +(p40) add r8=r35,r0 +(p42) add r8=r35,r0,1 + mov pr=r9,0x1ffff } +{ .mib; rum 1<<5 // clear um.mfh + mov ar.lc=r3 br.ret.sptk.many b0 };; .endp bn_mul_add_words# #endif @@ -527,7 +472,8 @@ bn_sqr_words: sxt4 r34=r34 };; { .mii; cmp.le p6,p0=r34,r0 mov r8=r0 } // return value -{ .mfb; nop.f 0x0 +{ .mfb; ADDP r32=0,r32 + nop.f 0x0 (p6) br.ret.spnt.many b0 };; .save ar.lc,r3 @@ -536,11 +482,7 @@ bn_sqr_words: mov r9=pr };; .body -#if defined(_HPUX_SOURCE) && defined(_ILP32) -{ .mii; addp4 r32=0,r32 - addp4 r33=0,r33 };; -#endif -{ .mib; +{ .mib; ADDP r33=0,r33 mov pr.rot=1<<16 brp.loop.imp .L_bn_sqr_words_ctop,.L_bn_sqr_words_cend-16 } @@ -605,7 +547,7 @@ bn_sqr_comba8: .prologue .fframe 0 .save ar.pfs,r2 -#if defined(_HPUX_SOURCE) && defined(_ILP32) +#if defined(_HPUX_SOURCE) && !defined(_LP64) { .mii; alloc r2=ar.pfs,2,1,0,0 addp4 r33=0,r33 addp4 r32=0,r32 };; @@ -631,6 +573,10 @@ bn_sqr_comba8: // clause in Itanium µ-architecture manual? Comments are welcomed and // highly appreciated. // +// On Itanium 2 it takes ~190 ticks. This is because of stalls on +// result from getf.sig. I do nothing about it at this point for +// reasons depicted below. +// // However! It should be noted that even 160 ticks is darn good result // as it's over 10 (yes, ten, spelled as t-e-n) times faster than the // C version (compiled with gcc with inline assembler). I really @@ -673,7 +619,7 @@ bn_mul_comba8: .prologue .fframe 0 .save ar.pfs,r2 -#if defined(_HPUX_SOURCE) && defined(_ILP32) +#if defined(_HPUX_SOURCE) && !defined(_LP64) { .mii; alloc r2=ar.pfs,3,0,0,0 addp4 r33=0,r33 addp4 r34=0,r34 };; @@ -1231,7 +1177,7 @@ bn_sqr_comba4: .prologue .fframe 0 .save ar.pfs,r2 -#if defined(_HPUX_SOURCE) && defined(_ILP32) +#if defined(_HPUX_SOURCE) && !defined(_LP64) { .mii; alloc r2=ar.pfs,2,1,0,0 addp4 r32=0,r32 addp4 r33=0,r33 };; @@ -1264,7 +1210,7 @@ bn_mul_comba4: .prologue .fframe 0 .save ar.pfs,r2 -#if defined(_HPUX_SOURCE) && defined(_ILP32) +#if defined(_HPUX_SOURCE) && !defined(_LP64) { .mii; alloc r2=ar.pfs,3,0,0,0 addp4 r33=0,r33 addp4 r34=0,r34 };; @@ -1448,8 +1394,8 @@ bn_mul_comba4: #define I r21 #if 0 -// Some preprocessors (most notably HP-UX) apper to be allergic to -// macros enclosed to parenthesis as these three will be. +// Some preprocessors (most notably HP-UX) appear to be allergic to +// macros enclosed to parenthesis [as these three were]. #define cont p16 #define break p0 // p20 #define equ p24 @@ -1581,9 +1527,18 @@ bn_div_words: // output: f8 = (int)(a/b) // clobbered: f8,f9,f10,f11,pred pred=p15 -// This procedure is essentially Intel code and therefore is -// copyrighted to Intel Corporation (I suppose...). It's sligtly -// modified for specific needs. +// One can argue that this snippet is copyrighted to Intel +// Corporation, as it's essentially identical to one of those +// found in "Divide, Square Root and Remainder" section at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// Yes, I admit that the referred code was used as template, +// but after I realized that there hardly is any other instruction +// sequence which would perform this operation. I mean I figure that +// any independent attempt to implement high-performance division +// will result in code virtually identical to the Intel code. It +// should be noted though that below division kernel is 1 cycle +// faster than Intel one (note commented splits:-), not to mention +// original prologue (rather lack of one) and epilogue. .align 32 .skip 16 .L_udiv64_32_b6: diff --git a/src/lib/libssl/src/crypto/bn/asm/ppc.pl b/src/lib/libssl/src/crypto/bn/asm/ppc.pl new file mode 100644 index 0000000000..307c7ccb35 --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/asm/ppc.pl @@ -0,0 +1,2081 @@ +#!/usr/bin/env perl +# +# Implemented as a Perl wrapper as we want to support several different +# architectures with single file. We pick up the target based on the +# file name we are asked to generate. +# +# It should be noted though that this perl code is nothing like +# /crypto/perlasm/x86*. In this case perl is used pretty much +# as pre-processor to cover for platform differences in name decoration, +# linker tables, 32-/64-bit instruction sets... +# +# As you might know there're several PowerPC ABI in use. Most notably +# Linux and AIX use different 32-bit ABIs. Good news are that these ABIs +# are similar enough to implement leaf(!) functions, which would be ABI +# neutral. And that's what you find here: ABI neutral leaf functions. +# In case you wonder what that is... +# +# AIX performance +# +# MEASUREMENTS WITH cc ON a 200 MhZ PowerPC 604e. +# +# The following is the performance of 32-bit compiler +# generated code: +# +# OpenSSL 0.9.6c 21 dec 2001 +# built on: Tue Jun 11 11:06:51 EDT 2002 +# options:bn(64,32) ... +#compiler: cc -DTHREADS -DAIX -DB_ENDIAN -DBN_LLONG -O3 +# sign verify sign/s verify/s +#rsa 512 bits 0.0098s 0.0009s 102.0 1170.6 +#rsa 1024 bits 0.0507s 0.0026s 19.7 387.5 +#rsa 2048 bits 0.3036s 0.0085s 3.3 117.1 +#rsa 4096 bits 2.0040s 0.0299s 0.5 33.4 +#dsa 512 bits 0.0087s 0.0106s 114.3 94.5 +#dsa 1024 bits 0.0256s 0.0313s 39.0 32.0 +# +# Same bechmark with this assembler code: +# +#rsa 512 bits 0.0056s 0.0005s 178.6 2049.2 +#rsa 1024 bits 0.0283s 0.0015s 35.3 674.1 +#rsa 2048 bits 0.1744s 0.0050s 5.7 201.2 +#rsa 4096 bits 1.1644s 0.0179s 0.9 55.7 +#dsa 512 bits 0.0052s 0.0062s 191.6 162.0 +#dsa 1024 bits 0.0149s 0.0180s 67.0 55.5 +# +# Number of operations increases by at almost 75% +# +# Here are performance numbers for 64-bit compiler +# generated code: +# +# OpenSSL 0.9.6g [engine] 9 Aug 2002 +# built on: Fri Apr 18 16:59:20 EDT 2003 +# options:bn(64,64) ... +# compiler: cc -DTHREADS -D_REENTRANT -q64 -DB_ENDIAN -O3 +# sign verify sign/s verify/s +#rsa 512 bits 0.0028s 0.0003s 357.1 3844.4 +#rsa 1024 bits 0.0148s 0.0008s 67.5 1239.7 +#rsa 2048 bits 0.0963s 0.0028s 10.4 353.0 +#rsa 4096 bits 0.6538s 0.0102s 1.5 98.1 +#dsa 512 bits 0.0026s 0.0032s 382.5 313.7 +#dsa 1024 bits 0.0081s 0.0099s 122.8 100.6 +# +# Same benchmark with this assembler code: +# +#rsa 512 bits 0.0020s 0.0002s 510.4 6273.7 +#rsa 1024 bits 0.0088s 0.0005s 114.1 2128.3 +#rsa 2048 bits 0.0540s 0.0016s 18.5 622.5 +#rsa 4096 bits 0.3700s 0.0058s 2.7 171.0 +#dsa 512 bits 0.0016s 0.0020s 610.7 507.1 +#dsa 1024 bits 0.0047s 0.0058s 212.5 173.2 +# +# Again, performance increases by at about 75% +# +# Mac OS X, Apple G5 1.8GHz (Note this is 32 bit code) +# OpenSSL 0.9.7c 30 Sep 2003 +# +# Original code. +# +#rsa 512 bits 0.0011s 0.0001s 906.1 11012.5 +#rsa 1024 bits 0.0060s 0.0003s 166.6 3363.1 +#rsa 2048 bits 0.0370s 0.0010s 27.1 982.4 +#rsa 4096 bits 0.2426s 0.0036s 4.1 280.4 +#dsa 512 bits 0.0010s 0.0012s 1038.1 841.5 +#dsa 1024 bits 0.0030s 0.0037s 329.6 269.7 +#dsa 2048 bits 0.0101s 0.0127s 98.9 78.6 +# +# Same benchmark with this assembler code: +# +#rsa 512 bits 0.0007s 0.0001s 1416.2 16645.9 +#rsa 1024 bits 0.0036s 0.0002s 274.4 5380.6 +#rsa 2048 bits 0.0222s 0.0006s 45.1 1589.5 +#rsa 4096 bits 0.1469s 0.0022s 6.8 449.6 +#dsa 512 bits 0.0006s 0.0007s 1664.2 1376.2 +#dsa 1024 bits 0.0018s 0.0023s 545.0 442.2 +#dsa 2048 bits 0.0061s 0.0075s 163.5 132.8 +# +# Performance increase of ~60% +# +# If you have comments or suggestions to improve code send +# me a note at schari@us.ibm.com +# + +$opf = shift; + +if ($opf =~ /32\.s/) { + $BITS= 32; + $BNSZ= $BITS/8; + $ISA= "\"ppc\""; + + $LD= "lwz"; # load + $LDU= "lwzu"; # load and update + $ST= "stw"; # store + $STU= "stwu"; # store and update + $UMULL= "mullw"; # unsigned multiply low + $UMULH= "mulhwu"; # unsigned multiply high + $UDIV= "divwu"; # unsigned divide + $UCMPI= "cmplwi"; # unsigned compare with immediate + $UCMP= "cmplw"; # unsigned compare + $COUNTZ="cntlzw"; # count leading zeros + $SHL= "slw"; # shift left + $SHR= "srw"; # unsigned shift right + $SHRI= "srwi"; # unsigned shift right by immediate + $SHLI= "slwi"; # shift left by immediate + $CLRU= "clrlwi"; # clear upper bits + $INSR= "insrwi"; # insert right + $ROTL= "rotlwi"; # rotate left by immediate +} elsif ($opf =~ /64\.s/) { + $BITS= 64; + $BNSZ= $BITS/8; + $ISA= "\"ppc64\""; + + # same as above, but 64-bit mnemonics... + $LD= "ld"; # load + $LDU= "ldu"; # load and update + $ST= "std"; # store + $STU= "stdu"; # store and update + $UMULL= "mulld"; # unsigned multiply low + $UMULH= "mulhdu"; # unsigned multiply high + $UDIV= "divdu"; # unsigned divide + $UCMPI= "cmpldi"; # unsigned compare with immediate + $UCMP= "cmpld"; # unsigned compare + $COUNTZ="cntlzd"; # count leading zeros + $SHL= "sld"; # shift left + $SHR= "srd"; # unsigned shift right + $SHRI= "srdi"; # unsigned shift right by immediate + $SHLI= "sldi"; # shift left by immediate + $CLRU= "clrldi"; # clear upper bits + $INSR= "insrdi"; # insert right + $ROTL= "rotldi"; # rotate left by immediate +} else { die "nonsense $opf"; } + +( defined shift || open STDOUT,">$opf" ) || die "can't open $opf: $!"; + +# function entry points from the AIX code +# +# There are other, more elegant, ways to handle this. We (IBM) chose +# this approach as it plays well with scripts we run to 'namespace' +# OpenSSL .i.e. we add a prefix to all the public symbols so we can +# co-exist in the same process with other implementations of OpenSSL. +# 'cleverer' ways of doing these substitutions tend to hide data we +# need to be obvious. +# +my @items = ("bn_sqr_comba4", + "bn_sqr_comba8", + "bn_mul_comba4", + "bn_mul_comba8", + "bn_sub_words", + "bn_add_words", + "bn_div_words", + "bn_sqr_words", + "bn_mul_words", + "bn_mul_add_words"); + +if ($opf =~ /linux/) { do_linux(); } +elsif ($opf =~ /aix/) { do_aix(); } +elsif ($opf =~ /osx/) { do_osx(); } +else { do_bsd(); } + +sub do_linux { + $d=&data(); + + if ($BITS==64) { + foreach $t (@items) { + $d =~ s/\.$t:/\ +\t.section\t".opd","aw"\ +\t.align\t3\ +\t.globl\t$t\ +$t:\ +\t.quad\t.$t,.TOC.\@tocbase,0\ +\t.size\t$t,24\ +\t.previous\n\ +\t.type\t.$t,\@function\ +\t.globl\t.$t\ +.$t:/g; + } + } + else { + foreach $t (@items) { + $d=~s/\.$t/$t/g; + } + } + # hide internal labels to avoid pollution of name table... + $d=~s/Lppcasm_/.Lppcasm_/gm; + print $d; +} + +sub do_aix { + # AIX assembler is smart enough to please the linker without + # making us do something special... + print &data(); +} + +# MacOSX 32 bit +sub do_osx { + $d=&data(); + # Change the bn symbol prefix from '.' to '_' + foreach $t (@items) { + $d=~s/\.$t/_$t/g; + } + # Change .machine to something OS X asm will accept + $d=~s/\.machine.*/.text/g; + $d=~s/\#/;/g; # change comment from '#' to ';' + print $d; +} + +# BSD (Untested) +sub do_bsd { + $d=&data(); + foreach $t (@items) { + $d=~s/\.$t/_$t/g; + } + print $d; +} + +sub data { + local($data)=< 0 then result !=0 + # In either case carry bit is set. + bc BO_IF,CR0_EQ,Lppcasm_sub_adios + addi r4,r4,-$BNSZ + addi r3,r3,-$BNSZ + addi r5,r5,-$BNSZ + mtctr r6 +Lppcasm_sub_mainloop: + $LDU r7,$BNSZ(r4) + $LDU r8,$BNSZ(r5) + subfe r6,r8,r7 # r6 = r7+carry bit + onescomplement(r8) + # if carry = 1 this is r7-r8. Else it + # is r7-r8 -1 as we need. + $STU r6,$BNSZ(r3) + bc BO_dCTR_NZERO,CR0_EQ,Lppcasm_sub_mainloop +Lppcasm_sub_adios: + subfze r3,r0 # if carry bit is set then r3 = 0 else -1 + andi. r3,r3,1 # keep only last bit. + bclr BO_ALWAYS,CR0_LT + .long 0x00000000 + + +# +# NOTE: The following label name should be changed to +# "bn_add_words" i.e. remove the first dot +# for the gcc compiler. This should be automatically +# done in the build +# + +.align 4 +.bn_add_words: +# +# Handcoded version of bn_add_words +# +#BN_ULONG bn_add_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) +# +# r3 = r +# r4 = a +# r5 = b +# r6 = n +# +# Note: No loop unrolling done since this is not a performance +# critical loop. + + xor r0,r0,r0 +# +# check for r6 = 0. Is this needed? +# + addic. r6,r6,0 #test r6 and clear carry bit. + bc BO_IF,CR0_EQ,Lppcasm_add_adios + addi r4,r4,-$BNSZ + addi r3,r3,-$BNSZ + addi r5,r5,-$BNSZ + mtctr r6 +Lppcasm_add_mainloop: + $LDU r7,$BNSZ(r4) + $LDU r8,$BNSZ(r5) + adde r8,r7,r8 + $STU r8,$BNSZ(r3) + bc BO_dCTR_NZERO,CR0_EQ,Lppcasm_add_mainloop +Lppcasm_add_adios: + addze r3,r0 #return carry bit. + bclr BO_ALWAYS,CR0_LT + .long 0x00000000 + +# +# NOTE: The following label name should be changed to +# "bn_div_words" i.e. remove the first dot +# for the gcc compiler. This should be automatically +# done in the build +# + +.align 4 +.bn_div_words: +# +# This is a cleaned up version of code generated by +# the AIX compiler. The only optimization is to use +# the PPC instruction to count leading zeros instead +# of call to num_bits_word. Since this was compiled +# only at level -O2 we can possibly squeeze it more? +# +# r3 = h +# r4 = l +# r5 = d + + $UCMPI 0,r5,0 # compare r5 and 0 + bc BO_IF_NOT,CR0_EQ,Lppcasm_div1 # proceed if d!=0 + li r3,-1 # d=0 return -1 + bclr BO_ALWAYS,CR0_LT +Lppcasm_div1: + xor r0,r0,r0 #r0=0 + $COUNTZ r7,r5 #r7 = num leading 0s in d. + subfic r8,r7,$BITS #r8 = BN_num_bits_word(d) + cmpi 0,0,r8,$BITS # + bc BO_IF,CR0_EQ,Lppcasm_div2 #proceed if (r8==$BITS) + li r9,1 # r9=1 + $SHL r10,r9,r8 # r9<<=r8 + $UCMP 0,r3,r10 # + bc BO_IF,CR0_GT,Lppcasm_div2 #or if (h > (1<=d? + bc BO_IF,CR0_LT,Lppcasm_div3 #goto Lppcasm_div3 if not + subf r3,r5,r3 #h-=d ; +Lppcasm_div3: #r7 = BN_BITS2-i. so r7=i + cmpi 0,0,r7,0 # is (i == 0)? + bc BO_IF,CR0_EQ,Lppcasm_div4 + $SHL r3,r3,r7 # h = (h<< i) + $SHR r8,r4,r8 # r8 = (l >> BN_BITS2 -i) + $SHL r5,r5,r7 # d<<=i + or r3,r3,r8 # h = (h<>(BN_BITS2-i)) + $SHL r4,r4,r7 # l <<=i +Lppcasm_div4: + $SHRI r9,r5,`$BITS/2` # r9 = dh + # dl will be computed when needed + # as it saves registers. + li r6,2 #r6=2 + mtctr r6 #counter will be in count. +Lppcasm_divouterloop: + $SHRI r8,r3,`$BITS/2` #r8 = (h>>BN_BITS4) + $SHRI r11,r4,`$BITS/2` #r11= (l&BN_MASK2h)>>BN_BITS4 + # compute here for innerloop. + $UCMP 0,r8,r9 # is (h>>BN_BITS4)==dh + bc BO_IF_NOT,CR0_EQ,Lppcasm_div5 # goto Lppcasm_div5 if not + + li r8,-1 + $CLRU r8,r8,`$BITS/2` #q = BN_MASK2l + b Lppcasm_div6 +Lppcasm_div5: + $UDIV r8,r3,r9 #q = h/dh +Lppcasm_div6: + $UMULL r12,r9,r8 #th = q*dh + $CLRU r10,r5,`$BITS/2` #r10=dl + $UMULL r6,r8,r10 #tl = q*dl + +Lppcasm_divinnerloop: + subf r10,r12,r3 #t = h -th + $SHRI r7,r10,`$BITS/2` #r7= (t &BN_MASK2H), sort of... + addic. r7,r7,0 #test if r7 == 0. used below. + # now want to compute + # r7 = (t<>BN_BITS4) + # the following 2 instructions do that + $SHLI r7,r10,`$BITS/2` # r7 = (t<>BN_BITS4) + $UCMP 1,r6,r7 # compare (tl <= r7) + bc BO_IF_NOT,CR0_EQ,Lppcasm_divinnerexit + bc BO_IF_NOT,CR1_FEX,Lppcasm_divinnerexit + addi r8,r8,-1 #q-- + subf r12,r9,r12 #th -=dh + $CLRU r10,r5,`$BITS/2` #r10=dl. t is no longer needed in loop. + subf r6,r10,r6 #tl -=dl + b Lppcasm_divinnerloop +Lppcasm_divinnerexit: + $SHRI r10,r6,`$BITS/2` #t=(tl>>BN_BITS4) + $SHLI r11,r6,`$BITS/2` #tl=(tl<=tl) goto Lppcasm_div7 + addi r12,r12,1 # th++ +Lppcasm_div7: + subf r11,r11,r4 #r11=l-tl + $UCMP 1,r3,r12 #compare h and th + bc BO_IF_NOT,CR1_FX,Lppcasm_div8 #if (h>=th) goto Lppcasm_div8 + addi r8,r8,-1 # q-- + add r3,r5,r3 # h+=d +Lppcasm_div8: + subf r12,r12,r3 #r12 = h-th + $SHLI r4,r11,`$BITS/2` #l=(l&BN_MASK2l)<>BN_BITS4))&BN_MASK2 + # the following 2 instructions will do this. + $INSR r11,r12,`$BITS/2`,`$BITS/2` # r11 is the value we want rotated $BITS/2. + $ROTL r3,r11,`$BITS/2` # rotate by $BITS/2 and store in r3 + bc BO_dCTR_ZERO,CR0_EQ,Lppcasm_div9#if (count==0) break ; + $SHLI r0,r8,`$BITS/2` #ret =q<> 2 + bc BO_IF,CR0_EQ,Lppcasm_mw_REM + mtctr r7 +Lppcasm_mw_LOOP: + #mul(rp[0],ap[0],w,c1); + $LD r8,`0*$BNSZ`(r4) + $UMULL r9,r6,r8 + $UMULH r10,r6,r8 + addc r9,r9,r12 + #addze r10,r10 #carry is NOT ignored. + #will be taken care of + #in second spin below + #using adde. + $ST r9,`0*$BNSZ`(r3) + #mul(rp[1],ap[1],w,c1); + $LD r8,`1*$BNSZ`(r4) + $UMULL r11,r6,r8 + $UMULH r12,r6,r8 + adde r11,r11,r10 + #addze r12,r12 + $ST r11,`1*$BNSZ`(r3) + #mul(rp[2],ap[2],w,c1); + $LD r8,`2*$BNSZ`(r4) + $UMULL r9,r6,r8 + $UMULH r10,r6,r8 + adde r9,r9,r12 + #addze r10,r10 + $ST r9,`2*$BNSZ`(r3) + #mul_add(rp[3],ap[3],w,c1); + $LD r8,`3*$BNSZ`(r4) + $UMULL r11,r6,r8 + $UMULH r12,r6,r8 + adde r11,r11,r10 + addze r12,r12 #this spin we collect carry into + #r12 + $ST r11,`3*$BNSZ`(r3) + + addi r3,r3,`4*$BNSZ` + addi r4,r4,`4*$BNSZ` + bc BO_dCTR_NZERO,CR0_EQ,Lppcasm_mw_LOOP + +Lppcasm_mw_REM: + andi. r5,r5,0x3 + bc BO_IF,CR0_EQ,Lppcasm_mw_OVER + #mul(rp[0],ap[0],w,c1); + $LD r8,`0*$BNSZ`(r4) + $UMULL r9,r6,r8 + $UMULH r10,r6,r8 + addc r9,r9,r12 + addze r10,r10 + $ST r9,`0*$BNSZ`(r3) + addi r12,r10,0 + + addi r5,r5,-1 + cmpli 0,0,r5,0 + bc BO_IF,CR0_EQ,Lppcasm_mw_OVER + + + #mul(rp[1],ap[1],w,c1); + $LD r8,`1*$BNSZ`(r4) + $UMULL r9,r6,r8 + $UMULH r10,r6,r8 + addc r9,r9,r12 + addze r10,r10 + $ST r9,`1*$BNSZ`(r3) + addi r12,r10,0 + + addi r5,r5,-1 + cmpli 0,0,r5,0 + bc BO_IF,CR0_EQ,Lppcasm_mw_OVER + + #mul_add(rp[2],ap[2],w,c1); + $LD r8,`2*$BNSZ`(r4) + $UMULL r9,r6,r8 + $UMULH r10,r6,r8 + addc r9,r9,r12 + addze r10,r10 + $ST r9,`2*$BNSZ`(r3) + addi r12,r10,0 + +Lppcasm_mw_OVER: + addi r3,r12,0 + bclr BO_ALWAYS,CR0_LT + .long 0x00000000 + +# +# NOTE: The following label name should be changed to +# "bn_mul_add_words" i.e. remove the first dot +# for the gcc compiler. This should be automatically +# done in the build +# + +.align 4 +.bn_mul_add_words: +# +# BN_ULONG bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w) +# +# r3 = rp +# r4 = ap +# r5 = num +# r6 = w +# +# empirical evidence suggests that unrolled version performs best!! +# + xor r0,r0,r0 #r0 = 0 + xor r12,r12,r12 #r12 = 0 . used for carry + rlwinm. r7,r5,30,2,31 # num >> 2 + bc BO_IF,CR0_EQ,Lppcasm_maw_leftover # if (num < 4) go LPPCASM_maw_leftover + mtctr r7 +Lppcasm_maw_mainloop: + #mul_add(rp[0],ap[0],w,c1); + $LD r8,`0*$BNSZ`(r4) + $LD r11,`0*$BNSZ`(r3) + $UMULL r9,r6,r8 + $UMULH r10,r6,r8 + addc r9,r9,r12 #r12 is carry. + addze r10,r10 + addc r9,r9,r11 + #addze r10,r10 + #the above instruction addze + #is NOT needed. Carry will NOT + #be ignored. It's not affected + #by multiply and will be collected + #in the next spin + $ST r9,`0*$BNSZ`(r3) + + #mul_add(rp[1],ap[1],w,c1); + $LD r8,`1*$BNSZ`(r4) + $LD r9,`1*$BNSZ`(r3) + $UMULL r11,r6,r8 + $UMULH r12,r6,r8 + adde r11,r11,r10 #r10 is carry. + addze r12,r12 + addc r11,r11,r9 + #addze r12,r12 + $ST r11,`1*$BNSZ`(r3) + + #mul_add(rp[2],ap[2],w,c1); + $LD r8,`2*$BNSZ`(r4) + $UMULL r9,r6,r8 + $LD r11,`2*$BNSZ`(r3) + $UMULH r10,r6,r8 + adde r9,r9,r12 + addze r10,r10 + addc r9,r9,r11 + #addze r10,r10 + $ST r9,`2*$BNSZ`(r3) + + #mul_add(rp[3],ap[3],w,c1); + $LD r8,`3*$BNSZ`(r4) + $UMULL r11,r6,r8 + $LD r9,`3*$BNSZ`(r3) + $UMULH r12,r6,r8 + adde r11,r11,r10 + addze r12,r12 + addc r11,r11,r9 + addze r12,r12 + $ST r11,`3*$BNSZ`(r3) + addi r3,r3,`4*$BNSZ` + addi r4,r4,`4*$BNSZ` + bc BO_dCTR_NZERO,CR0_EQ,Lppcasm_maw_mainloop + +Lppcasm_maw_leftover: + andi. r5,r5,0x3 + bc BO_IF,CR0_EQ,Lppcasm_maw_adios + addi r3,r3,-$BNSZ + addi r4,r4,-$BNSZ + #mul_add(rp[0],ap[0],w,c1); + mtctr r5 + $LDU r8,$BNSZ(r4) + $UMULL r9,r6,r8 + $UMULH r10,r6,r8 + $LDU r11,$BNSZ(r3) + addc r9,r9,r11 + addze r10,r10 + addc r9,r9,r12 + addze r12,r10 + $ST r9,0(r3) + + bc BO_dCTR_ZERO,CR0_EQ,Lppcasm_maw_adios + #mul_add(rp[1],ap[1],w,c1); + $LDU r8,$BNSZ(r4) + $UMULL r9,r6,r8 + $UMULH r10,r6,r8 + $LDU r11,$BNSZ(r3) + addc r9,r9,r11 + addze r10,r10 + addc r9,r9,r12 + addze r12,r10 + $ST r9,0(r3) + + bc BO_dCTR_ZERO,CR0_EQ,Lppcasm_maw_adios + #mul_add(rp[2],ap[2],w,c1); + $LDU r8,$BNSZ(r4) + $UMULL r9,r6,r8 + $UMULH r10,r6,r8 + $LDU r11,$BNSZ(r3) + addc r9,r9,r11 + addze r10,r10 + addc r9,r9,r12 + addze r12,r10 + $ST r9,0(r3) + +Lppcasm_maw_adios: + addi r3,r12,0 + bclr BO_ALWAYS,CR0_LT + .long 0x00000000 + .align 4 +EOF + $data =~ s/\`([^\`]*)\`/eval $1/gem; + + # if some assembler chokes on some simplified mnemonic, + # this is the spot to fix it up, e.g.: + # GNU as doesn't seem to accept cmplw, 32-bit unsigned compare + $data =~ s/^(\s*)cmplw(\s+)([^,]+),(.*)/$1cmpl$2$3,0,$4/gm; + # assembler X doesn't accept li, load immediate value + #$data =~ s/^(\s*)li(\s+)([^,]+),(.*)/$1addi$2$3,0,$4/gm; + return($data); +} diff --git a/src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c b/src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c index 450e8e4322..7378344251 100644 --- a/src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c +++ b/src/lib/libssl/src/crypto/bn/asm/x86_64-gcc.c @@ -13,20 +13,42 @@ * A. Well, that's because this code is basically a quick-n-dirty * proof-of-concept hack. As you can see it's implemented with * inline assembler, which means that you're bound to GCC and that - * there must be a room for fine-tuning. + * there might be enough room for further improvement. * * Q. Why inline assembler? - * A. x86_64 features own ABI I'm not familiar with. Which is why - * I decided to let the compiler take care of subroutine - * prologue/epilogue as well as register allocation. + * A. x86_64 features own ABI which I'm not familiar with. This is + * why I decided to let the compiler take care of subroutine + * prologue/epilogue as well as register allocation. For reference. + * Win64 implements different ABI for AMD64, different from Linux. * * Q. How much faster does it get? - * A. Unfortunately people sitting on x86_64 hardware are prohibited - * to disclose the performance numbers, so they (SuSE labs to be - * specific) wouldn't tell me. However! Very similar coding technique - * (reaching out for 128-bit result from 64x64-bit multiplication) - * results in >3 times performance improvement on MIPS and I see no - * reason why gain on x86_64 would be so much different:-) + * A. 'apps/openssl speed rsa dsa' output with no-asm: + * + * sign verify sign/s verify/s + * rsa 512 bits 0.0006s 0.0001s 1683.8 18456.2 + * rsa 1024 bits 0.0028s 0.0002s 356.0 6407.0 + * rsa 2048 bits 0.0172s 0.0005s 58.0 1957.8 + * rsa 4096 bits 0.1155s 0.0018s 8.7 555.6 + * sign verify sign/s verify/s + * dsa 512 bits 0.0005s 0.0006s 2100.8 1768.3 + * dsa 1024 bits 0.0014s 0.0018s 692.3 559.2 + * dsa 2048 bits 0.0049s 0.0061s 204.7 165.0 + * + * 'apps/openssl speed rsa dsa' output with this module: + * + * sign verify sign/s verify/s + * rsa 512 bits 0.0004s 0.0000s 2767.1 33297.9 + * rsa 1024 bits 0.0012s 0.0001s 867.4 14674.7 + * rsa 2048 bits 0.0061s 0.0002s 164.0 5270.0 + * rsa 4096 bits 0.0384s 0.0006s 26.1 1650.8 + * sign verify sign/s verify/s + * dsa 512 bits 0.0002s 0.0003s 4442.2 3786.3 + * dsa 1024 bits 0.0005s 0.0007s 1835.1 1497.4 + * dsa 2048 bits 0.0016s 0.0020s 620.4 504.6 + * + * For the reference. IA-32 assembler implementation performs + * very much like 64-bit code compiled with no-asm on the same + * machine. */ #define BN_ULONG unsigned long @@ -151,7 +173,7 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) } BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n) -{ BN_ULONG ret,i; +{ BN_ULONG ret=0,i=0; if (n <= 0) return 0; @@ -164,7 +186,7 @@ BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n) " leaq 1(%2),%2 \n" " loop 1b \n" " sbbq %0,%0 \n" - : "+a"(ret),"+c"(n),"+r"(i) + : "=&a"(ret),"+c"(n),"=&r"(i) : "r"(rp),"r"(ap),"r"(bp) : "cc" ); @@ -174,7 +196,7 @@ BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n) #ifndef SIMICS BN_ULONG bn_sub_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n) -{ BN_ULONG ret,i; +{ BN_ULONG ret=0,i=0; if (n <= 0) return 0; @@ -187,7 +209,7 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n) " leaq 1(%2),%2 \n" " loop 1b \n" " sbbq %0,%0 \n" - : "+a"(ret),"+c"(n),"+r"(i) + : "=&a"(ret),"+c"(n),"=&r"(i) : "r"(rp),"r"(ap),"r"(bp) : "cc" ); @@ -318,7 +340,6 @@ BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) { - BN_ULONG bl,bh; BN_ULONG t1,t2; BN_ULONG c1,c2,c3; @@ -423,7 +444,6 @@ void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) { - BN_ULONG bl,bh; BN_ULONG t1,t2; BN_ULONG c1,c2,c3; @@ -464,7 +484,6 @@ void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b) void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a) { - BN_ULONG bl,bh; BN_ULONG t1,t2; BN_ULONG c1,c2,c3; @@ -541,7 +560,6 @@ void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a) void bn_sqr_comba4(BN_ULONG *r, BN_ULONG *a) { - BN_ULONG bl,bh; BN_ULONG t1,t2; BN_ULONG c1,c2,c3; diff --git a/src/lib/libssl/src/crypto/bn/bn_mont.c b/src/lib/libssl/src/crypto/bn/bn_mont.c index c9ebdbaabe..b79b1b60da 100644 --- a/src/lib/libssl/src/crypto/bn/bn_mont.c +++ b/src/lib/libssl/src/crypto/bn/bn_mont.c @@ -273,7 +273,7 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx) BN_init(&Ri); R= &(mont->RR); /* grab RR as a temp */ - BN_copy(&(mont->N),mod); /* Set N */ + if (!BN_copy(&(mont->N),mod)) goto err; /* Set N */ mont->N.neg = 0; #ifdef MONT_WORD diff --git a/src/lib/libssl/src/crypto/bn/bntest.c b/src/lib/libssl/src/crypto/bn/bntest.c index 3c8c540387..28cd3339da 100644 --- a/src/lib/libssl/src/crypto/bn/bntest.c +++ b/src/lib/libssl/src/crypto/bn/bntest.c @@ -232,7 +232,7 @@ int main(int argc, char *argv[]) EXIT(0); err: BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices - * the failure, see test_bn in test/Makefile.ssl*/ + * the failure, see test_bn in test/Makefile */ BIO_flush(out); ERR_load_crypto_strings(); ERR_print_errors_fp(stderr); diff --git a/src/lib/libssl/src/crypto/buffer/Makefile b/src/lib/libssl/src/crypto/buffer/Makefile new file mode 100644 index 0000000000..3911baf513 --- /dev/null +++ b/src/lib/libssl/src/crypto/buffer/Makefile @@ -0,0 +1,92 @@ +# +# SSLeay/crypto/buffer/Makefile +# + +DIR= buffer +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= buffer.c buf_err.c +LIBOBJ= buffer.o buf_err.o + +SRC= $(LIBSRC) + +EXHEADER= buffer.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +buf_err.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h +buf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +buf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +buf_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +buf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +buf_err.o: ../../include/openssl/symhacks.h buf_err.c +buffer.o: ../../e_os.h ../../include/openssl/bio.h +buffer.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +buffer.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +buffer.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +buffer.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +buffer.o: ../cryptlib.h buffer.c diff --git a/src/lib/libssl/src/crypto/cast/Makefile b/src/lib/libssl/src/crypto/cast/Makefile new file mode 100644 index 0000000000..8b0d04bb7c --- /dev/null +++ b/src/lib/libssl/src/crypto/cast/Makefile @@ -0,0 +1,120 @@ +# +# SSLeay/crypto/cast/Makefile +# + +DIR= cast +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CAST_ENC=c_enc.o +# or use +#CAST_ENC=asm/cx86-elf.o +#CAST_ENC=asm/cx86-out.o +#CAST_ENC=asm/cx86-sol.o +#CAST_ENC=asm/cx86bdsi.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=casttest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c +LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o + +SRC= $(LIBSRC) + +EXHEADER= cast.h +HEADER= cast_s.h cast_lcl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/cx86-elf.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) cast-586.pl elf $(CLAGS) $(PROCESSOR) > cx86-elf.s) + +# a.out +asm/cx86-out.o: asm/cx86unix.cpp + $(CPP) -DOUT asm/cx86unix.cpp | as -o asm/cx86-out.o + +# bsdi +asm/cx86bsdi.o: asm/cx86unix.cpp + $(CPP) -DBSDI asm/cx86unix.cpp | sed 's/ :/:/' | as -o asm/cx86bsdi.o + +asm/cx86unix.cpp: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) cast-586.pl cpp $(PROCESSOR) >cx86unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/cx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +c_cfb64.o: ../../e_os.h ../../include/openssl/cast.h +c_cfb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +c_cfb64.o: c_cfb64.c cast_lcl.h +c_ecb.o: ../../e_os.h ../../include/openssl/cast.h +c_ecb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +c_ecb.o: ../../include/openssl/opensslv.h c_ecb.c cast_lcl.h +c_enc.o: ../../e_os.h ../../include/openssl/cast.h +c_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +c_enc.o: c_enc.c cast_lcl.h +c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h +c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +c_ofb64.o: c_ofb64.c cast_lcl.h +c_skey.o: ../../e_os.h ../../include/openssl/cast.h +c_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +c_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +c_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +c_skey.o: ../../include/openssl/symhacks.h c_skey.c cast_lcl.h cast_s.h diff --git a/src/lib/libssl/src/crypto/cast/c_skey.c b/src/lib/libssl/src/crypto/cast/c_skey.c index 76e40005c9..dc4791a8cf 100644 --- a/src/lib/libssl/src/crypto/cast/c_skey.c +++ b/src/lib/libssl/src/crypto/cast/c_skey.c @@ -56,7 +56,9 @@ * [including the GNU Public Licence.] */ +#include #include + #include "cast_lcl.h" #include "cast_s.h" @@ -72,7 +74,7 @@ #define S6 CAST_S_table6 #define S7 CAST_S_table7 -void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data) +FIPS_NON_FIPS_VCIPHER_Init(CAST) { CAST_LONG x[16]; CAST_LONG z[16]; diff --git a/src/lib/libssl/src/crypto/cast/cast.h b/src/lib/libssl/src/crypto/cast/cast.h index b28e4e4f3b..9e300178d9 100644 --- a/src/lib/libssl/src/crypto/cast/cast.h +++ b/src/lib/libssl/src/crypto/cast/cast.h @@ -81,7 +81,10 @@ typedef struct cast_key_st int short_key; /* Use reduced rounds for short key */ } CAST_KEY; - + +#ifdef OPENSSL_FIPS +void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); +#endif void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key, int enc); diff --git a/src/lib/libssl/src/crypto/comp/Makefile b/src/lib/libssl/src/crypto/comp/Makefile new file mode 100644 index 0000000000..68109a8013 --- /dev/null +++ b/src/lib/libssl/src/crypto/comp/Makefile @@ -0,0 +1,113 @@ +# +# SSLeay/crypto/comp/Makefile +# + +DIR= comp +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= comp_lib.c comp_err.c \ + c_rle.c c_zlib.c + +LIBOBJ= comp_lib.o comp_err.o \ + c_rle.o c_zlib.o + +SRC= $(LIBSRC) + +EXHEADER= comp.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +c_rle.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +c_rle.o: ../../include/openssl/bn.h ../../include/openssl/comp.h +c_rle.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +c_rle.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +c_rle.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +c_rle.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +c_rle.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h c_rle.c +c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +c_zlib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h +c_zlib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +c_zlib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +c_zlib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +c_zlib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +c_zlib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +c_zlib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +c_zlib.o: c_zlib.c +comp_err.o: ../../include/openssl/bio.h ../../include/openssl/comp.h +comp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +comp_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +comp_err.o: ../../include/openssl/opensslconf.h +comp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +comp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +comp_err.o: comp_err.c +comp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +comp_lib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h +comp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +comp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +comp_lib.o: ../../include/openssl/opensslconf.h +comp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +comp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +comp_lib.o: ../../include/openssl/symhacks.h comp_lib.c diff --git a/src/lib/libssl/src/crypto/comp/c_zlib.c b/src/lib/libssl/src/crypto/comp/c_zlib.c index 8c0876151a..1bd2850d15 100644 --- a/src/lib/libssl/src/crypto/comp/c_zlib.c +++ b/src/lib/libssl/src/crypto/comp/c_zlib.c @@ -3,6 +3,7 @@ #include #include #include +#include COMP_METHOD *COMP_zlib(void ); @@ -189,7 +190,17 @@ COMP_METHOD *COMP_zlib(void) if (!zlib_loaded) { #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) - zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0); + zlib_dso = DSO_load(NULL, "ZLIB1", NULL, 0); + if (!zlib_dso) + { + zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0); + if (zlib_dso) + { + /* Clear the errors from the first failed + DSO_load() */ + ERR_clear_error(); + } + } #else zlib_dso = DSO_load(NULL, "z", NULL, 0); #endif diff --git a/src/lib/libssl/src/crypto/conf/Makefile b/src/lib/libssl/src/crypto/conf/Makefile new file mode 100644 index 0000000000..6d2f8ffd9a --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/Makefile @@ -0,0 +1,181 @@ +# +# SSLeay/crypto/conf/Makefile +# + +DIR= conf +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c \ + conf_mall.c conf_sap.c + +LIBOBJ= conf_err.o conf_lib.o conf_api.o conf_def.o conf_mod.o \ + conf_mall.o conf_sap.o + +SRC= $(LIBSRC) + +EXHEADER= conf.h conf_api.h +HEADER= conf_def.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +conf_api.o: ../../e_os.h ../../include/openssl/bio.h +conf_api.o: ../../include/openssl/conf.h ../../include/openssl/conf_api.h +conf_api.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +conf_api.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +conf_api.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +conf_api.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_api.o: conf_api.c +conf_def.o: ../../e_os.h ../../include/openssl/bio.h +conf_def.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +conf_def.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h +conf_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +conf_def.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +conf_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_def.o: ../cryptlib.h conf_def.c conf_def.h +conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h +conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +conf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +conf_err.o: ../../include/openssl/opensslconf.h +conf_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +conf_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_err.o: conf_err.c +conf_lib.o: ../../include/openssl/bio.h ../../include/openssl/conf.h +conf_lib.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h +conf_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +conf_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +conf_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_lib.o: conf_lib.c +conf_mall.o: ../../e_os.h ../../include/openssl/aes.h +conf_mall.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_mall.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_mall.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_mall.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_mall.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_mall.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_mall.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_mall.o: ../../include/openssl/engine.h ../../include/openssl/err.h +conf_mall.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +conf_mall.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +conf_mall.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +conf_mall.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +conf_mall.o: ../../include/openssl/objects.h +conf_mall.o: ../../include/openssl/opensslconf.h +conf_mall.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +conf_mall.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +conf_mall.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +conf_mall.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +conf_mall.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +conf_mall.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +conf_mall.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +conf_mall.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +conf_mall.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_mall.c +conf_mod.o: ../../e_os.h ../../include/openssl/aes.h +conf_mod.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_mod.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_mod.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_mod.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_mod.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_mod.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_mod.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_mod.o: ../../include/openssl/err.h ../../include/openssl/evp.h +conf_mod.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +conf_mod.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +conf_mod.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +conf_mod.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +conf_mod.o: ../../include/openssl/opensslconf.h +conf_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +conf_mod.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +conf_mod.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +conf_mod.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +conf_mod.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +conf_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +conf_mod.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +conf_mod.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +conf_mod.o: ../cryptlib.h conf_mod.c +conf_sap.o: ../../e_os.h ../../include/openssl/aes.h +conf_sap.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_sap.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_sap.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_sap.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_sap.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_sap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_sap.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_sap.o: ../../include/openssl/engine.h ../../include/openssl/err.h +conf_sap.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +conf_sap.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +conf_sap.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +conf_sap.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +conf_sap.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +conf_sap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +conf_sap.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +conf_sap.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +conf_sap.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +conf_sap.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +conf_sap.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +conf_sap.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +conf_sap.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +conf_sap.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_sap.c diff --git a/src/lib/libssl/src/crypto/conf/conf_def.c b/src/lib/libssl/src/crypto/conf/conf_def.c index 2e9f52f1fd..b5a876ae68 100644 --- a/src/lib/libssl/src/crypto/conf/conf_def.c +++ b/src/lib/libssl/src/crypto/conf/conf_def.c @@ -632,6 +632,11 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from) BUF_MEM_grow_clean(buf,(strlen(p)+len-(e-from))); while (*p) buf->data[to++]= *(p++); + + /* Since we change the pointer 'from', we also have + to change the perceived length of the string it + points at. /RL */ + len -= e-from; from=e; } else diff --git a/src/lib/libssl/src/crypto/cryptlib.c b/src/lib/libssl/src/crypto/cryptlib.c index 2924def2bb..fef0afb29f 100644 --- a/src/lib/libssl/src/crypto/cryptlib.c +++ b/src/lib/libssl/src/crypto/cryptlib.c @@ -105,7 +105,9 @@ static const char* lock_names[CRYPTO_NUM_LOCKS] = "engine", "ui", "hwcrhk", /* This is a HACK which will disappear in 0.9.8 */ -#if CRYPTO_NUM_LOCKS != 33 + "fips", + "fips2", +#if CRYPTO_NUM_LOCKS != 35 # error "Inconsistency between crypto.h and cryptlib.c" #endif }; @@ -478,13 +480,12 @@ const char *CRYPTO_get_lock_name(int type) return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS)); } -#ifdef _DLL -#ifdef OPENSSL_SYS_WIN32 +#if defined(_WIN32) && defined(_WINDLL) /* All we really need to do is remove the 'error' state when a thread * detaches */ -BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch(fdwReason) @@ -503,8 +504,6 @@ BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, } #endif -#endif - void OpenSSLDie(const char *file,int line,const char *assertion) { fprintf(stderr, @@ -512,3 +511,122 @@ void OpenSSLDie(const char *file,int line,const char *assertion) file,line,assertion); abort(); } + +#ifdef OPENSSL_FIPS +static int fips_started = 0; +static int fips_mode = 0; +static void *fips_rand_check = 0; +static unsigned long fips_thread = 0; + +void fips_set_started(void) + { + fips_started = 1; + } + +int fips_is_started(void) + { + return fips_started; + } + +int fips_is_owning_thread(void) + { + int ret = 0; + + if (fips_is_started()) + { + CRYPTO_r_lock(CRYPTO_LOCK_FIPS2); + if (fips_thread != 0 && fips_thread == CRYPTO_thread_id()) + ret = 1; + CRYPTO_r_unlock(CRYPTO_LOCK_FIPS2); + } + return ret; + } + +int fips_set_owning_thread(void) + { + int ret = 0; + + if (fips_is_started()) + { + CRYPTO_w_lock(CRYPTO_LOCK_FIPS2); + if (fips_thread == 0) + { + fips_thread = CRYPTO_thread_id(); + ret = 1; + } + CRYPTO_w_unlock(CRYPTO_LOCK_FIPS2); + } + return ret; + } + +int fips_clear_owning_thread(void) + { + int ret = 0; + + if (fips_is_started()) + { + CRYPTO_w_lock(CRYPTO_LOCK_FIPS2); + if (fips_thread == CRYPTO_thread_id()) + { + fips_thread = 0; + ret = 1; + } + CRYPTO_w_unlock(CRYPTO_LOCK_FIPS2); + } + return ret; + } + +void fips_set_mode(int onoff) + { + int owning_thread = fips_is_owning_thread(); + + if (fips_is_started()) + { + if (!owning_thread) CRYPTO_w_lock(CRYPTO_LOCK_FIPS); + fips_mode = onoff; + if (!owning_thread) CRYPTO_w_unlock(CRYPTO_LOCK_FIPS); + } + } + +void fips_set_rand_check(void *rand_check) + { + int owning_thread = fips_is_owning_thread(); + + if (fips_is_started()) + { + if (!owning_thread) CRYPTO_w_lock(CRYPTO_LOCK_FIPS); + fips_rand_check = rand_check; + if (!owning_thread) CRYPTO_w_unlock(CRYPTO_LOCK_FIPS); + } + } + +int FIPS_mode(void) + { + int ret = 0; + int owning_thread = fips_is_owning_thread(); + + if (fips_is_started()) + { + if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS); + ret = fips_mode; + if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS); + } + return ret; + } + +void *FIPS_rand_check(void) + { + void *ret = 0; + int owning_thread = fips_is_owning_thread(); + + if (fips_is_started()) + { + if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS); + ret = fips_rand_check; + if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS); + } + return ret; + } + +#endif /* OPENSSL_FIPS */ + diff --git a/src/lib/libssl/src/crypto/crypto-lib.com b/src/lib/libssl/src/crypto/crypto-lib.com index 39e78c69e5..c044ce0099 100644 --- a/src/lib/libssl/src/crypto/crypto-lib.com +++ b/src/lib/libssl/src/crypto/crypto-lib.com @@ -158,7 +158,7 @@ $! $ APPS_DES = "DES/DES,CBC3_ENC" $ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE" $ -$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time" +$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time,o_str" $ LIB_MD2 = "md2_dgst,md2_one" $ LIB_MD4 = "md4_dgst,md4_one" $ LIB_MD5 = "md5_dgst,md5_one" @@ -247,7 +247,7 @@ $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ - $ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ - "v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ - "v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info,"+ - - "v3_ocsp,v3_akeya" + "v3_ocsp,v3_akeya,v3_pcia,v3_pci" $ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def,conf_mod,conf_mall,conf_sap" $ LIB_TXT_DB = "txt_db" $ LIB_PKCS7 = "pk7_asn1,pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,"+ - @@ -752,8 +752,8 @@ $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT " ALL : Just Build Everything." -$ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.SSL]LIBCRYPTO.OLB Library." -$ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.SSL]*.EXE Programs." +$ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library." +$ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.EXE Programs." $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" $ WRITE SYS$OUTPUT "" diff --git a/src/lib/libssl/src/crypto/crypto.h b/src/lib/libssl/src/crypto/crypto.h index 273bc5e3f8..4d1dfac7f1 100644 --- a/src/lib/libssl/src/crypto/crypto.h +++ b/src/lib/libssl/src/crypto/crypto.h @@ -128,7 +128,9 @@ extern "C" { #define CRYPTO_LOCK_ENGINE 30 #define CRYPTO_LOCK_UI 31 #define CRYPTO_LOCK_HWCRHK 32 /* This is a HACK which will disappear in 0.9.8 */ -#define CRYPTO_NUM_LOCKS 33 +#define CRYPTO_LOCK_FIPS 33 +#define CRYPTO_LOCK_FIPS2 34 +#define CRYPTO_NUM_LOCKS 35 #define CRYPTO_LOCK 1 #define CRYPTO_UNLOCK 2 @@ -434,6 +436,63 @@ void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb); void OpenSSLDie(const char *file,int line,const char *assertion); #define OPENSSL_assert(e) ((e) ? (void)0 : OpenSSLDie(__FILE__, __LINE__, #e)) +#ifdef OPENSSL_FIPS +int FIPS_mode(void); +void *FIPS_rand_check(void); + +#define FIPS_ERROR_IGNORED(alg) OpenSSLDie(__FILE__, __LINE__, \ + alg " previous FIPS forbidden algorithm error ignored"); + +#define FIPS_BAD_ABORT(alg) OpenSSLDie(__FILE__, __LINE__, \ + #alg " Algorithm forbidden in FIPS mode"); + +#ifdef OPENSSL_FIPS_STRICT +#define FIPS_BAD_ALGORITHM(alg) FIPS_BAD_ABORT(alg) +#else +#define FIPS_BAD_ALGORITHM(alg) \ + { \ + FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_NON_FIPS_METHOD); \ + ERR_add_error_data(2, "Algorithm=", #alg); \ + return 0; \ + } +#endif + +/* Low level digest API blocking macro */ + +#define FIPS_NON_FIPS_MD_Init(alg) \ + int alg##_Init(alg##_CTX *c) \ + { \ + if (FIPS_mode()) \ + FIPS_BAD_ALGORITHM(alg) \ + return private_##alg##_Init(c); \ + } \ + int private_##alg##_Init(alg##_CTX *c) + +/* For ciphers the API often varies from cipher to cipher and each needs to + * be treated as a special case. Variable key length ciphers (Blowfish, RC4, + * CAST) however are very similar and can use a blocking macro. + */ + +#define FIPS_NON_FIPS_VCIPHER_Init(alg) \ + void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data) \ + { \ + if (FIPS_mode()) \ + FIPS_BAD_ABORT(alg) \ + private_##alg##_set_key(key, len, data); \ + } \ + void private_##alg##_set_key(alg##_KEY *key, int len, \ + const unsigned char *data) + +#else + +#define FIPS_NON_FIPS_VCIPHER_Init(alg) \ + void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data) + +#define FIPS_NON_FIPS_MD_Init(alg) \ + int alg##_Init(alg##_CTX *c) + +#endif /* def OPENSSL_FIPS */ + /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes * made after this point may be overwritten when the script is next run. diff --git a/src/lib/libssl/src/crypto/des/FILES0 b/src/lib/libssl/src/crypto/des/FILES0 index 4c7ea2de7a..1c2e1f75b9 100644 --- a/src/lib/libssl/src/crypto/des/FILES0 +++ b/src/lib/libssl/src/crypto/des/FILES0 @@ -8,7 +8,7 @@ README - What this package is. VERSION - Which version this is and what was changed. KERBEROS - Kerberos version 4 notes. Makefile.PL - An old makefile to build with perl5, not current. -Makefile.ssl - The SSLeay makefile +Makefile - The SSLeay makefile Makefile.uni - The normal unix makefile. GNUmakefile - The makefile for use with glibc. makefile.bc - A Borland C makefile diff --git a/src/lib/libssl/src/crypto/des/Makefile b/src/lib/libssl/src/crypto/des/Makefile new file mode 100644 index 0000000000..655f2ea1a8 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/Makefile @@ -0,0 +1,314 @@ +# +# SSLeay/crypto/des/Makefile +# + +DIR= des +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES=-I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r +RANLIB= ranlib +DES_ENC= des_enc.o fcrypt_b.o +# or use +#DES_ENC= dx86-elf.o yx86-elf.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=destest.c +APPS= + +LIB=$(TOP)/libcrypto.a +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 rpc_enc.c set_key.c \ + des_enc.c fcrypt_b.c \ + xcbc_enc.c \ + str2key.c cfb64ede.c ofb64ede.c ede_cbcm_enc.c des_old.c des_old2.c \ + read2pwd.c + +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} \ + fcrypt.o xcbc_enc.o rpc_enc.o cbc_cksm.o \ + ede_cbcm_enc.o des_old.o des_old2.o read2pwd.o + +SRC= $(LIBSRC) + +EXHEADER= des.h des_old.h +HEADER= des_locl.h rpc_des.h spr.h des_ver.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +des: des.o cbc3_enc.o lib + $(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB) + +# elf +asm/dx86-elf.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) des-586.pl elf $(CFLAGS) > dx86-elf.s) + +asm/yx86-elf.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) crypt586.pl elf $(CFLAGS) > yx86-elf.s) + +# a.out +asm/dx86-out.o: asm/dx86unix.cpp + $(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o + +asm/yx86-out.o: asm/yx86unix.cpp + $(CPP) -DOUT asm/yx86unix.cpp | as -o asm/yx86-out.o + +# bsdi +asm/dx86bsdi.o: asm/dx86unix.cpp + $(CPP) -DBSDI asm/dx86unix.cpp | sed 's/ :/:/' | as -o asm/dx86bsdi.o + +asm/yx86bsdi.o: asm/yx86unix.cpp + $(CPP) -DBSDI asm/yx86unix.cpp | sed 's/ :/:/' | as -o asm/yx86bsdi.o + +asm/dx86unix.cpp: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) des-586.pl cpp >dx86unix.cpp) + +asm/yx86unix.cpp: asm/crypt586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: installs + +installs: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +cbc_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +cbc_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +cbc_cksm.o: ../../include/openssl/opensslconf.h +cbc_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +cbc_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +cbc_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +cbc_cksm.o: cbc_cksm.c des_locl.h +cbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +cbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +cbc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +cbc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +cbc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +cbc_enc.o: ../../include/openssl/ui_compat.h cbc_enc.c des_locl.h ncbc_enc.c +cfb64ede.o: ../../e_os.h ../../include/openssl/crypto.h +cfb64ede.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +cfb64ede.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +cfb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +cfb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +cfb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +cfb64ede.o: cfb64ede.c des_locl.h +cfb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +cfb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +cfb64enc.o: ../../include/openssl/opensslconf.h +cfb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +cfb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +cfb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +cfb64enc.o: cfb64enc.c des_locl.h +cfb_enc.o: ../../e_os.h ../../include/openssl/crypto.h +cfb_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +cfb_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +cfb_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +cfb_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +cfb_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +cfb_enc.o: cfb_enc.c des_locl.h +des_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +des_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +des_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +des_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +des_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +des_enc.o: ../../include/openssl/ui_compat.h des_enc.c des_locl.h ncbc_enc.c +des_old.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +des_old.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +des_old.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +des_old.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +des_old.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +des_old.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +des_old.o: ../../include/openssl/ui_compat.h des_old.c +des_old2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +des_old2.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +des_old2.o: ../../include/openssl/opensslconf.h +des_old2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +des_old2.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +des_old2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +des_old2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +des_old2.o: des_old2.c +ecb3_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ecb3_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ecb3_enc.o: ../../include/openssl/opensslconf.h +ecb3_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ecb3_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ecb3_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ecb3_enc.o: des_locl.h ecb3_enc.c +ecb_enc.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ecb_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +ecb_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ecb_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ecb_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ecb_enc.o: des_locl.h des_ver.h ecb_enc.c spr.h +ede_cbcm_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ede_cbcm_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ede_cbcm_enc.o: ../../include/openssl/opensslconf.h +ede_cbcm_enc.o: ../../include/openssl/opensslv.h +ede_cbcm_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ede_cbcm_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ede_cbcm_enc.o: ../../include/openssl/ui_compat.h des_locl.h ede_cbcm_enc.c +enc_read.o: ../../e_os.h ../../include/openssl/bio.h +enc_read.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +enc_read.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +enc_read.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +enc_read.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +enc_read.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +enc_read.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +enc_read.o: ../cryptlib.h des_locl.h enc_read.c +enc_writ.o: ../../e_os.h ../../include/openssl/bio.h +enc_writ.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +enc_writ.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +enc_writ.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +enc_writ.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +enc_writ.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +enc_writ.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +enc_writ.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +enc_writ.o: ../cryptlib.h des_locl.h enc_writ.c +fcrypt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +fcrypt.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +fcrypt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +fcrypt.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +fcrypt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +fcrypt.o: ../../include/openssl/ui_compat.h des_locl.h fcrypt.c +fcrypt_b.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +fcrypt_b.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +fcrypt_b.o: ../../include/openssl/opensslconf.h +fcrypt_b.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +fcrypt_b.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fcrypt_b.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +fcrypt_b.o: des_locl.h fcrypt_b.c +ofb64ede.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ofb64ede.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ofb64ede.o: ../../include/openssl/opensslconf.h +ofb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ofb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ofb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ofb64ede.o: des_locl.h ofb64ede.c +ofb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ofb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ofb64enc.o: ../../include/openssl/opensslconf.h +ofb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ofb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ofb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ofb64enc.o: des_locl.h ofb64enc.c +ofb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ofb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +ofb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +ofb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ofb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ofb_enc.o: ../../include/openssl/ui_compat.h des_locl.h ofb_enc.c +pcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +pcbc_enc.o: ../../include/openssl/opensslconf.h +pcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +pcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pcbc_enc.o: des_locl.h pcbc_enc.c +qud_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +qud_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +qud_cksm.o: ../../include/openssl/opensslconf.h +qud_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +qud_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +qud_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +qud_cksm.o: des_locl.h qud_cksm.c +rand_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rand_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +rand_key.o: ../../include/openssl/opensslconf.h +rand_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +rand_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rand_key.o: rand_key.c +read2pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +read2pwd.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +read2pwd.o: ../../include/openssl/opensslconf.h +read2pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +read2pwd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +read2pwd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +read2pwd.o: read2pwd.c +rpc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rpc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +rpc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +rpc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rpc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +rpc_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h rpc_des.h +rpc_enc.o: rpc_enc.c +set_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +set_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +set_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +set_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +set_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +set_key.o: ../../include/openssl/ui_compat.h des_locl.h set_key.c +str2key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +str2key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +str2key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +str2key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +str2key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +str2key.o: ../../include/openssl/ui_compat.h des_locl.h str2key.c +xcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +xcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +xcbc_enc.o: ../../include/openssl/opensslconf.h +xcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +xcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +xcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +xcbc_enc.o: des_locl.h xcbc_enc.c diff --git a/src/lib/libssl/src/crypto/des/cfb64ede.c b/src/lib/libssl/src/crypto/des/cfb64ede.c index 60c1aa08db..f3c6018528 100644 --- a/src/lib/libssl/src/crypto/des/cfb64ede.c +++ b/src/lib/libssl/src/crypto/des/cfb64ede.c @@ -57,6 +57,7 @@ */ #include "des_locl.h" +#include "e_os.h" /* The input and output encrypted as though 64bit cfb mode is being * used. The extra state information to record how much of the @@ -140,3 +141,114 @@ void DES_ede2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, DES_ede3_cfb64_encrypt(in,out,length,ks1,ks2,ks1,ivec,num,enc); } #endif + +/* This is compatible with the single key CFB-r for DES, even thought that's + * not what EVP needs. + */ + +void DES_ede3_cfb_encrypt(const unsigned char *in,unsigned char *out, + int numbits,long length,DES_key_schedule *ks1, + DES_key_schedule *ks2,DES_key_schedule *ks3, + DES_cblock *ivec,int enc) + { + register DES_LONG d0,d1,v0,v1; + register long l=length; + register int num=numbits,n=(numbits+7)/8,i; + DES_LONG ti[2]; + unsigned char *iv; + unsigned char ovec[16]; + + if (num > 64) return; + iv = &(*ivec)[0]; + c2l(iv,v0); + c2l(iv,v1); + if (enc) + { + while (l >= n) + { + l-=n; + ti[0]=v0; + ti[1]=v1; + DES_encrypt3(ti,ks1,ks2,ks3); + c2ln(in,d0,d1,n); + in+=n; + d0^=ti[0]; + d1^=ti[1]; + l2cn(d0,d1,out,n); + out+=n; + /* 30-08-94 - eay - changed because l>>32 and + * l<<32 are bad under gcc :-( */ + if (num == 32) + { v0=v1; v1=d0; } + else if (num == 64) + { v0=d0; v1=d1; } + else + { + iv=&ovec[0]; + l2c(v0,iv); + l2c(v1,iv); + l2c(d0,iv); + l2c(d1,iv); + /* shift ovec left most of the bits... */ + memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0)); + /* now the remaining bits */ + if(num%8 != 0) + for(i=0 ; i < 8 ; ++i) + { + ovec[i]<<=num%8; + ovec[i]|=ovec[i+1]>>(8-num%8); + } + iv=&ovec[0]; + c2l(iv,v0); + c2l(iv,v1); + } + } + } + else + { + while (l >= n) + { + l-=n; + ti[0]=v0; + ti[1]=v1; + DES_encrypt3(ti,ks1,ks2,ks3); + c2ln(in,d0,d1,n); + in+=n; + /* 30-08-94 - eay - changed because l>>32 and + * l<<32 are bad under gcc :-( */ + if (num == 32) + { v0=v1; v1=d0; } + else if (num == 64) + { v0=d0; v1=d1; } + else + { + iv=&ovec[0]; + l2c(v0,iv); + l2c(v1,iv); + l2c(d0,iv); + l2c(d1,iv); + /* shift ovec left most of the bits... */ + memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0)); + /* now the remaining bits */ + if(num%8 != 0) + for(i=0 ; i < 8 ; ++i) + { + ovec[i]<<=num%8; + ovec[i]|=ovec[i+1]>>(8-num%8); + } + iv=&ovec[0]; + c2l(iv,v0); + c2l(iv,v1); + } + d0^=ti[0]; + d1^=ti[1]; + l2cn(d0,d1,out,n); + out+=n; + } + } + iv = &(*ivec)[0]; + l2c(v0,iv); + l2c(v1,iv); + v0=v1=d0=d1=ti[0]=ti[1]=0; + } + diff --git a/src/lib/libssl/src/crypto/des/des.h b/src/lib/libssl/src/crypto/des/des.h index daaf239dbe..c5df1c9c7b 100644 --- a/src/lib/libssl/src/crypto/des/des.h +++ b/src/lib/libssl/src/crypto/des/des.h @@ -128,7 +128,7 @@ OPENSSL_DECLARE_GLOBAL(int,DES_rw_mode); /* defaults to DES_PCBC_MODE */ #define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode) const char *DES_options(void); -void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output, +void DES_ecb3_encrypt(const unsigned char *input, unsigned char *output, DES_key_schedule *ks1,DES_key_schedule *ks2, DES_key_schedule *ks3, int enc); DES_LONG DES_cbc_cksum(const unsigned char *input,DES_cblock *output, @@ -187,6 +187,10 @@ void DES_ede3_cfb64_encrypt(const unsigned char *in,unsigned char *out, long length,DES_key_schedule *ks1, DES_key_schedule *ks2,DES_key_schedule *ks3, DES_cblock *ivec,int *num,int enc); +void DES_ede3_cfb_encrypt(const unsigned char *in,unsigned char *out, + int numbits,long length,DES_key_schedule *ks1, + DES_key_schedule *ks2,DES_key_schedule *ks3, + DES_cblock *ivec,int enc); void DES_ede3_ofb64_encrypt(const unsigned char *in,unsigned char *out, long length,DES_key_schedule *ks1, DES_key_schedule *ks2,DES_key_schedule *ks3, diff --git a/src/lib/libssl/src/crypto/des/des_enc.c b/src/lib/libssl/src/crypto/des/des_enc.c index 1c37ab96d3..72be2d98d7 100644 --- a/src/lib/libssl/src/crypto/des/des_enc.c +++ b/src/lib/libssl/src/crypto/des/des_enc.c @@ -58,6 +58,8 @@ #include "des_locl.h" +#ifndef OPENSSL_FIPS + void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc) { register DES_LONG l,r,t,u; @@ -287,8 +289,12 @@ void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, data[1]=r; } +#endif /* ndef OPENSSL_FIPS */ + #ifndef DES_DEFAULT_OPTIONS +#if !defined(OPENSSL_FIPS_DES_ASM) + #undef CBC_ENC_C__DONT_UPDATE_IV #include "ncbc_enc.c" /* DES_ncbc_encrypt */ @@ -404,4 +410,6 @@ void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, tin[0]=tin[1]=0; } +#endif /* !defined(OPENSSL_FIPS_DES_ASM) */ + #endif /* DES_DEFAULT_OPTIONS */ diff --git a/src/lib/libssl/src/crypto/des/des_old.c b/src/lib/libssl/src/crypto/des/des_old.c index 7e4cd7180d..88e9802aad 100644 --- a/src/lib/libssl/src/crypto/des/des_old.c +++ b/src/lib/libssl/src/crypto/des/des_old.c @@ -84,7 +84,7 @@ void _ossl_old_des_ecb3_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock des_key_schedule ks1,des_key_schedule ks2, des_key_schedule ks3, int enc) { - DES_ecb3_encrypt((const_DES_cblock *)input, output, + DES_ecb3_encrypt((const unsigned char *)input, (unsigned char *)output, (DES_key_schedule *)ks1, (DES_key_schedule *)ks2, (DES_key_schedule *)ks3, enc); } diff --git a/src/lib/libssl/src/crypto/des/destest.c b/src/lib/libssl/src/crypto/des/destest.c index 3983ac8e5f..e3e9d77f14 100644 --- a/src/lib/libssl/src/crypto/des/destest.c +++ b/src/lib/libssl/src/crypto/des/destest.c @@ -439,8 +439,8 @@ int main(int argc, char *argv[]) memcpy(in,plain_data[i],8); memset(out,0,8); memset(outin,0,8); - des_ecb2_encrypt(&in,&out,ks,ks2,DES_ENCRYPT); - des_ecb2_encrypt(&out,&outin,ks,ks2,DES_DECRYPT); + des_ecb2_encrypt(in,out,ks,ks2,DES_ENCRYPT); + des_ecb2_encrypt(out,outin,ks,ks2,DES_DECRYPT); if (memcmp(out,cipher_ecb2[i],8) != 0) { diff --git a/src/lib/libssl/src/crypto/des/ecb3_enc.c b/src/lib/libssl/src/crypto/des/ecb3_enc.c index c3437bc606..fa0c9c4d4f 100644 --- a/src/lib/libssl/src/crypto/des/ecb3_enc.c +++ b/src/lib/libssl/src/crypto/des/ecb3_enc.c @@ -58,15 +58,13 @@ #include "des_locl.h" -void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output, +void DES_ecb3_encrypt(const unsigned char *in, unsigned char *out, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, int enc) { register DES_LONG l0,l1; DES_LONG ll[2]; - const unsigned char *in = &(*input)[0]; - unsigned char *out = &(*output)[0]; c2l(in,l0); c2l(in,l1); diff --git a/src/lib/libssl/src/crypto/des/set_key.c b/src/lib/libssl/src/crypto/des/set_key.c index 143008ed9c..8881d46a7a 100644 --- a/src/lib/libssl/src/crypto/des/set_key.c +++ b/src/lib/libssl/src/crypto/des/set_key.c @@ -65,6 +65,8 @@ */ #include "des_locl.h" +#ifndef OPENSSL_FIPS + OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */ static const unsigned char odd_parity[256]={ @@ -405,3 +407,5 @@ void des_fixup_key_parity(des_cblock *key) des_set_odd_parity(key); } */ + +#endif /* ndef OPENSSL_FIPS */ diff --git a/src/lib/libssl/src/crypto/dh/Makefile b/src/lib/libssl/src/crypto/dh/Makefile new file mode 100644 index 0000000000..c091a8130a --- /dev/null +++ b/src/lib/libssl/src/crypto/dh/Makefile @@ -0,0 +1,131 @@ +# +# SSLeay/crypto/dh/Makefile +# + +DIR= dh +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= dhtest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= dh_asn1.c dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c +LIBOBJ= dh_asn1.o dh_gen.o dh_key.o dh_lib.o dh_check.o dh_err.o + +SRC= $(LIBSRC) + +EXHEADER= dh.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +dh_asn1.o: ../../e_os.h ../../include/openssl/asn1.h +dh_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +dh_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dh_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dh_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +dh_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +dh_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +dh_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dh_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_asn1.c +dh_check.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +dh_check.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dh_check.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h +dh_check.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_check.o: ../../include/openssl/opensslconf.h +dh_check.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dh_check.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_check.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_check.c +dh_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dh_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dh_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +dh_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dh_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dh_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_err.o: ../../include/openssl/symhacks.h dh_err.c +dh_gen.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +dh_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dh_gen.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h +dh_gen.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dh_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dh_gen.o: ../cryptlib.h dh_gen.c +dh_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dh_key.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h +dh_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dh_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_key.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_key.c +dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h +dh_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dh_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h +dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dh_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +dh_lib.o: ../cryptlib.h dh_lib.c diff --git a/src/lib/libssl/src/crypto/dh/dh_check.c b/src/lib/libssl/src/crypto/dh/dh_check.c index f0373f7d68..a7e9920efb 100644 --- a/src/lib/libssl/src/crypto/dh/dh_check.c +++ b/src/lib/libssl/src/crypto/dh/dh_check.c @@ -70,6 +70,8 @@ * should hold. */ +#ifndef OPENSSL_FIPS + int DH_check(const DH *dh, int *ret) { int ok=0; @@ -118,3 +120,5 @@ err: if (q != NULL) BN_free(q); return(ok); } + +#endif diff --git a/src/lib/libssl/src/crypto/dh/dh_err.c b/src/lib/libssl/src/crypto/dh/dh_err.c index d837950aec..c2715044c9 100644 --- a/src/lib/libssl/src/crypto/dh/dh_err.c +++ b/src/lib/libssl/src/crypto/dh/dh_err.c @@ -1,6 +1,6 @@ /* crypto/dh/dh_err.c */ /* ==================================================================== - * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/lib/libssl/src/crypto/dh/dh_gen.c b/src/lib/libssl/src/crypto/dh/dh_gen.c index 06f78b35ab..23777f5a16 100644 --- a/src/lib/libssl/src/crypto/dh/dh_gen.c +++ b/src/lib/libssl/src/crypto/dh/dh_gen.c @@ -86,6 +86,9 @@ * It's just as OK (and in some sense better) to use a generator of the * order-q subgroup. */ + +#ifndef OPENSSL_FIPS + DH *DH_generate_parameters(int prime_len, int generator, void (*callback)(int,int,void *), void *cb_arg) { @@ -146,6 +149,7 @@ DH *DH_generate_parameters(int prime_len, int generator, if (callback != NULL) callback(3,0,cb_arg); ret->p=p; ret->g=BN_new(); + if (ret->g == NULL) goto err; if (!BN_set_word(ret->g,g)) goto err; ok=1; err: @@ -167,3 +171,5 @@ err: } return(ret); } + +#endif diff --git a/src/lib/libssl/src/crypto/dh/dh_key.c b/src/lib/libssl/src/crypto/dh/dh_key.c index 77f2f50b51..ff125c2296 100644 --- a/src/lib/libssl/src/crypto/dh/dh_key.c +++ b/src/lib/libssl/src/crypto/dh/dh_key.c @@ -62,6 +62,8 @@ #include #include +#ifndef OPENSSL_FIPS + static int generate_key(DH *dh); static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, @@ -220,3 +222,5 @@ static int dh_finish(DH *dh) BN_MONT_CTX_free((BN_MONT_CTX *)dh->method_mont_p); return(1); } + +#endif diff --git a/src/lib/libssl/src/crypto/dsa/Makefile b/src/lib/libssl/src/crypto/dsa/Makefile new file mode 100644 index 0000000000..3a55058973 --- /dev/null +++ b/src/lib/libssl/src/crypto/dsa/Makefile @@ -0,0 +1,173 @@ +# +# SSLeay/crypto/dsa/Makefile +# + +DIR= dsa +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=dsatest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c \ + dsa_err.c dsa_ossl.c +LIBOBJ= dsa_gen.o dsa_key.o dsa_lib.o dsa_asn1.o dsa_vrf.o dsa_sign.o \ + dsa_err.o dsa_ossl.o + +SRC= $(LIBSRC) + +EXHEADER= dsa.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +dsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +dsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dsa_asn1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dsa_asn1.o: ../../include/openssl/opensslconf.h +dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dsa_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_asn1.c +dsa_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dsa_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dsa_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dsa_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h +dsa_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_err.o: dsa_err.c +dsa_gen.o: ../../e_os.h ../../include/openssl/aes.h +dsa_gen.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +dsa_gen.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +dsa_gen.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +dsa_gen.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h +dsa_gen.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +dsa_gen.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +dsa_gen.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +dsa_gen.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +dsa_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dsa_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dsa_gen.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +dsa_gen.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +dsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dsa_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +dsa_gen.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +dsa_gen.o: ../../include/openssl/ui_compat.h ../cryptlib.h dsa_gen.c +dsa_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_key.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +dsa_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dsa_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dsa_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +dsa_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_key.o: ../cryptlib.h dsa_key.c +dsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +dsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_lib.o: ../../include/openssl/ui.h ../cryptlib.h dsa_lib.c +dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dsa_ossl.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +dsa_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_ossl.o: ../cryptlib.h dsa_ossl.c +dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/fips.h +dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dsa_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +dsa_sign.o: ../cryptlib.h dsa_sign.c +dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h +dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_vrf.o: ../../include/openssl/engine.h ../../include/openssl/err.h +dsa_vrf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dsa_vrf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dsa_vrf.o: ../../include/openssl/ui.h ../cryptlib.h dsa_vrf.c diff --git a/src/lib/libssl/src/crypto/dsa/dsa.h b/src/lib/libssl/src/crypto/dsa/dsa.h index 9b3baadf2c..225ff391f9 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa.h +++ b/src/lib/libssl/src/crypto/dsa/dsa.h @@ -81,6 +81,10 @@ #define DSA_FLAG_CACHE_MONT_P 0x01 +#if defined(OPENSSL_FIPS) +#define FIPS_DSA_SIZE_T int +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/src/lib/libssl/src/crypto/dsa/dsa_gen.c b/src/lib/libssl/src/crypto/dsa/dsa_gen.c index dc9c249310..e40afeea51 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_gen.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_gen.c @@ -80,6 +80,7 @@ #include #include +#ifndef OPENSSL_FIPS DSA *DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len, int *counter_ret, unsigned long *h_ret, @@ -127,8 +128,9 @@ DSA *DSA_generate_parameters(int bits, c = BN_CTX_get(ctx2); p = BN_CTX_get(ctx2); test = BN_CTX_get(ctx2); + if (test == NULL) goto err; - BN_lshift(test,BN_value_one(),bits-1); + if (!BN_lshift(test,BN_value_one(),bits-1)) goto err; for (;;) { @@ -196,7 +198,7 @@ DSA *DSA_generate_parameters(int bits, callback(0,counter,cb_arg); /* step 7 */ - BN_zero(W); + if (!BN_zero(W)) goto err; /* now 'buf' contains "SEED + offset - 1" */ for (k=0; k<=n; k++) { @@ -212,20 +214,20 @@ DSA *DSA_generate_parameters(int bits, /* step 8 */ if (!BN_bin2bn(md,SHA_DIGEST_LENGTH,r0)) goto err; - BN_lshift(r0,r0,160*k); - BN_add(W,W,r0); + if (!BN_lshift(r0,r0,160*k)) goto err; + if (!BN_add(W,W,r0)) goto err; } /* more of step 8 */ - BN_mask_bits(W,bits-1); - BN_copy(X,W); /* this should be ok */ - BN_add(X,X,test); /* this should be ok */ + if (!BN_mask_bits(W,bits-1)) goto err; + if (!BN_copy(X,W)) goto err; + if (!BN_add(X,X,test)) goto err; /* step 9 */ - BN_lshift1(r0,q); - BN_mod(c,X,r0,ctx); - BN_sub(r0,c,BN_value_one()); - BN_sub(p,X,r0); + if (!BN_lshift1(r0,q)) goto err; + if (!BN_mod(c,X,r0,ctx)) goto err; + if (!BN_sub(r0,c,BN_value_one())) goto err; + if (!BN_sub(p,X,r0)) goto err; /* step 10 */ if (BN_cmp(p,test) >= 0) @@ -251,18 +253,18 @@ end: /* We now need to generate g */ /* Set r0=(p-1)/q */ - BN_sub(test,p,BN_value_one()); - BN_div(r0,NULL,test,q,ctx); + if (!BN_sub(test,p,BN_value_one())) goto err; + if (!BN_div(r0,NULL,test,q,ctx)) goto err; - BN_set_word(test,h); - BN_MONT_CTX_set(mont,p,ctx); + if (!BN_set_word(test,h)) goto err; + if (!BN_MONT_CTX_set(mont,p,ctx)) goto err; for (;;) { /* g=test^r0%p */ - BN_mod_exp_mont(g,test,r0,p,ctx,mont); + if (!BN_mod_exp_mont(g,test,r0,p,ctx,mont)) goto err; if (!BN_is_one(g)) break; - BN_add(test,test,BN_value_one()); + if (!BN_add(test,test,BN_value_one())) goto err; h++; } @@ -279,6 +281,11 @@ err: ret->p=BN_dup(p); ret->q=BN_dup(q); ret->g=BN_dup(g); + if (ret->p == NULL || ret->q == NULL || ret->g == NULL) + { + ok=0; + goto err; + } if ((m > 1) && (seed_in != NULL)) memcpy(seed_in,seed,20); if (counter_ret != NULL) *counter_ret=counter; if (h_ret != NULL) *h_ret=h; @@ -293,4 +300,6 @@ err: if (mont != NULL) BN_MONT_CTX_free(mont); return(ok?ret:NULL); } -#endif +#endif /* ndef OPENSSL_FIPS */ +#endif /* ndef OPENSSL_NO_SHA */ + diff --git a/src/lib/libssl/src/crypto/dsa/dsa_key.c b/src/lib/libssl/src/crypto/dsa/dsa_key.c index ef87c3e637..30607ca579 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_key.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_key.c @@ -64,6 +64,7 @@ #include #include +#ifndef OPENSSL_FIPS int DSA_generate_key(DSA *dsa) { int ok=0; @@ -103,3 +104,4 @@ err: return(ok); } #endif +#endif diff --git a/src/lib/libssl/src/crypto/dsa/dsa_ossl.c b/src/lib/libssl/src/crypto/dsa/dsa_ossl.c index b9e7f3ea5c..f1a85afcde 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_ossl.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_ossl.c @@ -65,6 +65,7 @@ #include #include +#ifndef OPENSSL_FIPS static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp); static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, @@ -346,3 +347,4 @@ static int dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, { return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx); } +#endif diff --git a/src/lib/libssl/src/crypto/dsa/dsa_sign.c b/src/lib/libssl/src/crypto/dsa/dsa_sign.c index 89205026f0..3c9753bac3 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_sign.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_sign.c @@ -64,9 +64,17 @@ #include #include #include +#ifndef OPENSSL_NO_ENGINE +#include +#endif +#include DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) { +#ifdef OPENSSL_FIPS + if(FIPS_mode() && !FIPS_dsa_check(dsa)) + return NULL; +#endif return dsa->meth->dsa_do_sign(dgst, dlen, dsa); } @@ -87,6 +95,10 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) { +#ifdef OPENSSL_FIPS + if(FIPS_mode() && !FIPS_dsa_check(dsa)) + return 0; +#endif return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp); } diff --git a/src/lib/libssl/src/crypto/dsa/dsa_vrf.c b/src/lib/libssl/src/crypto/dsa/dsa_vrf.c index c4aeddd056..8ef0c45025 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_vrf.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_vrf.c @@ -65,10 +65,18 @@ #include #include #include +#ifndef OPENSSL_NO_ENGINE +#include +#endif +#include int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) { +#ifdef OPENSSL_FIPS + if(FIPS_mode() && !FIPS_dsa_check(dsa)) + return -1; +#endif return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa); } diff --git a/src/lib/libssl/src/crypto/dso/Makefile b/src/lib/libssl/src/crypto/dso/Makefile new file mode 100644 index 0000000000..168951bc3e --- /dev/null +++ b/src/lib/libssl/src/crypto/dso/Makefile @@ -0,0 +1,140 @@ +# +# SSLeay/crypto/dso/Makefile +# + +DIR= dso +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c \ + dso_openssl.c dso_win32.c dso_vms.c +LIBOBJ= dso_dl.o dso_dlfcn.o dso_err.o dso_lib.o dso_null.o \ + dso_openssl.o dso_win32.o dso_vms.o + +SRC= $(LIBSRC) + +EXHEADER= dso.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +dso_dl.o: ../../e_os.h ../../include/openssl/bio.h +dso_dl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_dl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_dl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_dl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dso_dl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_dl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_dl.c +dso_dlfcn.o: ../../e_os.h ../../include/openssl/bio.h +dso_dlfcn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_dlfcn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_dlfcn.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_dlfcn.o: ../../include/openssl/opensslconf.h +dso_dlfcn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +dso_dlfcn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dso_dlfcn.o: ../cryptlib.h dso_dlfcn.c +dso_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +dso_err.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dso_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_err.o: ../../include/openssl/symhacks.h dso_err.c +dso_lib.o: ../../e_os.h ../../include/openssl/bio.h +dso_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_lib.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dso_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_lib.c +dso_null.o: ../../e_os.h ../../include/openssl/bio.h +dso_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_null.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_null.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_null.o: ../../include/openssl/opensslconf.h +dso_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +dso_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dso_null.o: ../cryptlib.h dso_null.c +dso_openssl.o: ../../e_os.h ../../include/openssl/bio.h +dso_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_openssl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_openssl.o: ../../include/openssl/opensslconf.h +dso_openssl.o: ../../include/openssl/opensslv.h +dso_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_openssl.c +dso_vms.o: ../../e_os.h ../../include/openssl/bio.h +dso_vms.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_vms.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_vms.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_vms.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dso_vms.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +dso_vms.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_vms.c +dso_win32.o: ../../e_os.h ../../include/openssl/bio.h +dso_win32.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dso_win32.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +dso_win32.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dso_win32.o: ../../include/openssl/opensslconf.h +dso_win32.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +dso_win32.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dso_win32.o: ../cryptlib.h dso_win32.c diff --git a/src/lib/libssl/src/crypto/dso/dso_win32.c b/src/lib/libssl/src/crypto/dso/dso_win32.c index 6c30deb250..3fa90eb27c 100644 --- a/src/lib/libssl/src/crypto/dso/dso_win32.c +++ b/src/lib/libssl/src/crypto/dso/dso_win32.c @@ -61,7 +61,7 @@ #include "cryptlib.h" #include -#if !defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WINCE) +#if !defined(DSO_WIN32) DSO_METHOD *DSO_METHOD_win32(void) { return NULL; diff --git a/src/lib/libssl/src/crypto/ec/Makefile b/src/lib/libssl/src/crypto/ec/Makefile new file mode 100644 index 0000000000..8f03658ad4 --- /dev/null +++ b/src/lib/libssl/src/crypto/ec/Makefile @@ -0,0 +1,126 @@ +# +# crypto/ec/Makefile +# + +DIR= ec +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=ectest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_recp.c ecp_nist.c ec_cvt.c ec_mult.c \ + ec_err.c + +LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_recp.o ecp_nist.o ec_cvt.o ec_mult.o \ + ec_err.o + +SRC= $(LIBSRC) + +EXHEADER= ec.h +HEADER= ec_lcl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +ec_cvt.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h +ec_cvt.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h +ec_cvt.o: ../../include/openssl/symhacks.h ec_cvt.c ec_lcl.h +ec_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ec_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ec_err.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ec_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ec_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ec_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ec_err.o: ec_err.c +ec_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ec_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ec_lib.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ec_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ec_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ec_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ec_lib.o: ec_lcl.h ec_lib.c +ec_mult.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ec_mult.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ec_mult.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ec_mult.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ec_mult.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ec_mult.o: ec_lcl.h ec_mult.c +ecp_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ecp_mont.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ecp_mont.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ecp_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ecp_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ecp_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ecp_mont.o: ec_lcl.h ecp_mont.c +ecp_nist.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h +ecp_nist.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h +ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c +ecp_recp.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h +ecp_recp.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h +ecp_recp.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_recp.c +ecp_smpl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +ecp_smpl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ecp_smpl.o: ../../include/openssl/ec.h ../../include/openssl/err.h +ecp_smpl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ecp_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ecp_smpl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ecp_smpl.o: ec_lcl.h ecp_smpl.c diff --git a/src/lib/libssl/src/crypto/engine/Makefile b/src/lib/libssl/src/crypto/engine/Makefile new file mode 100644 index 0000000000..38f83f1654 --- /dev/null +++ b/src/lib/libssl/src/crypto/engine/Makefile @@ -0,0 +1,536 @@ +# +# OpenSSL/crypto/engine/Makefile +# + +DIR= engine +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= enginetest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \ + eng_table.c eng_pkey.c eng_fat.c eng_all.c \ + tb_rsa.c tb_dsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c \ + eng_openssl.c eng_dyn.c eng_cnf.c \ + hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c \ + hw_cryptodev.c hw_aep.c hw_sureware.c hw_4758_cca.c +LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ + eng_table.o eng_pkey.o eng_fat.o eng_all.o \ + tb_rsa.o tb_dsa.o tb_dh.o tb_rand.o tb_cipher.o tb_digest.o \ + eng_openssl.o eng_dyn.o eng_cnf.o \ + hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o \ + hw_cryptodev.o hw_aep.o hw_sureware.o hw_4758_cca.o + +SRC= $(LIBSRC) + +EXHEADER= engine.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +errors: + $(PERL) $(TOP)/util/mkerr.pl -conf hw.ec \ + -nostatic -staticloader -write hw_*.c + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +eng_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_all.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +eng_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_all.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +eng_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +eng_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +eng_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_all.o: ../../include/openssl/ui.h eng_all.c eng_int.h +eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h +eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_cnf.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +eng_cnf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +eng_cnf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h +eng_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +eng_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_cnf.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_cnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_cnf.o: ../cryptlib.h eng_cnf.c +eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h +eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_ctrl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_ctrl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_ctrl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_ctrl.o: ../../include/openssl/opensslconf.h +eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_ctrl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_ctrl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_ctrl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_ctrl.o: ../cryptlib.h eng_ctrl.c eng_int.h +eng_dyn.o: ../../e_os.h ../../include/openssl/asn1.h +eng_dyn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_dyn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_dyn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_dyn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h +eng_dyn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +eng_dyn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_dyn.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_dyn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_dyn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_dyn.o: ../cryptlib.h eng_dyn.c eng_int.h +eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +eng_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +eng_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +eng_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +eng_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_err.o: ../../include/openssl/ui.h eng_err.c +eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h +eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_fat.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +eng_fat.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +eng_fat.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h +eng_fat.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +eng_fat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_fat.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_fat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_fat.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_fat.o: ../cryptlib.h eng_fat.c eng_int.h +eng_init.o: ../../e_os.h ../../include/openssl/asn1.h +eng_init.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_init.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_init.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_init.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_init.o: ../../include/openssl/opensslconf.h +eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_init.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_init.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_init.o: ../cryptlib.h eng_init.c eng_int.h +eng_lib.o: ../../e_os.h ../../include/openssl/asn1.h +eng_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +eng_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +eng_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +eng_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_lib.o: ../../include/openssl/ui.h ../cryptlib.h eng_int.h eng_lib.c +eng_list.o: ../../e_os.h ../../include/openssl/asn1.h +eng_list.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_list.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_list.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_list.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_list.o: ../../include/openssl/opensslconf.h +eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_list.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_list.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_list.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_list.o: ../cryptlib.h eng_int.h eng_list.c +eng_openssl.o: ../../e_os.h ../../include/openssl/aes.h +eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +eng_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +eng_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +eng_openssl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_openssl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +eng_openssl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +eng_openssl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +eng_openssl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +eng_openssl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +eng_openssl.o: ../../include/openssl/opensslconf.h +eng_openssl.o: ../../include/openssl/opensslv.h +eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +eng_openssl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +eng_openssl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +eng_openssl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +eng_openssl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +eng_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +eng_openssl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_openssl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +eng_openssl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +eng_openssl.o: ../cryptlib.h eng_openssl.c +eng_pkey.o: ../../e_os.h ../../include/openssl/asn1.h +eng_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +eng_pkey.o: ../../include/openssl/opensslconf.h +eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +eng_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +eng_pkey.o: ../cryptlib.h eng_int.h eng_pkey.c +eng_table.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +eng_table.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +eng_table.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +eng_table.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +eng_table.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_table.o: ../../include/openssl/engine.h ../../include/openssl/err.h +eng_table.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +eng_table.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +eng_table.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +eng_table.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +eng_table.o: ../../include/openssl/objects.h +eng_table.o: ../../include/openssl/opensslconf.h +eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +eng_table.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +eng_table.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +eng_table.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +eng_table.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +eng_table.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +eng_table.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +eng_table.o: eng_int.h eng_table.c +hw_4758_cca.o: ../../e_os.h ../../include/openssl/aes.h +hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_4758_cca.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_4758_cca.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_4758_cca.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_4758_cca.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_4758_cca.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_4758_cca.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +hw_4758_cca.o: ../../include/openssl/err.h ../../include/openssl/evp.h +hw_4758_cca.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +hw_4758_cca.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +hw_4758_cca.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +hw_4758_cca.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +hw_4758_cca.o: ../../include/openssl/opensslconf.h +hw_4758_cca.o: ../../include/openssl/opensslv.h +hw_4758_cca.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +hw_4758_cca.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +hw_4758_cca.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +hw_4758_cca.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +hw_4758_cca.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +hw_4758_cca.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +hw_4758_cca.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +hw_4758_cca.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +hw_4758_cca.o: ../cryptlib.h hw_4758_cca.c hw_4758_cca_err.c hw_4758_cca_err.h +hw_4758_cca.o: vendor_defns/hw_4758_cca.h +hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_aep.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +hw_aep.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +hw_aep.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +hw_aep.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +hw_aep.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +hw_aep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +hw_aep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +hw_aep.o: ../../include/openssl/ui.h hw_aep.c hw_aep_err.c hw_aep_err.h +hw_aep.o: vendor_defns/aep.h +hw_atalla.o: ../../e_os.h ../../include/openssl/asn1.h +hw_atalla.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_atalla.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_atalla.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +hw_atalla.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_atalla.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +hw_atalla.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +hw_atalla.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_atalla.o: ../cryptlib.h hw_atalla.c hw_atalla_err.c hw_atalla_err.h +hw_atalla.o: vendor_defns/atalla.h +hw_cryptodev.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +hw_cryptodev.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +hw_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +hw_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_cryptodev.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_cryptodev.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +hw_cryptodev.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +hw_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +hw_cryptodev.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +hw_cryptodev.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +hw_cryptodev.o: ../../include/openssl/objects.h +hw_cryptodev.o: ../../include/openssl/opensslconf.h +hw_cryptodev.o: ../../include/openssl/opensslv.h +hw_cryptodev.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +hw_cryptodev.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +hw_cryptodev.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +hw_cryptodev.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +hw_cryptodev.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +hw_cryptodev.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_cryptodev.o: ../../include/openssl/ui_compat.h hw_cryptodev.c +hw_cswift.o: ../../e_os.h ../../include/openssl/asn1.h +hw_cswift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_cswift.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_cswift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +hw_cswift.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_cswift.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +hw_cswift.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +hw_cswift.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_cswift.o: ../cryptlib.h hw_cswift.c hw_cswift_err.c hw_cswift_err.h +hw_cswift.o: vendor_defns/cswift.h +hw_ncipher.o: ../../e_os.h ../../include/openssl/aes.h +hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_ncipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_ncipher.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +hw_ncipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h +hw_ncipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +hw_ncipher.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +hw_ncipher.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +hw_ncipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +hw_ncipher.o: ../../include/openssl/opensslconf.h +hw_ncipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_ncipher.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +hw_ncipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +hw_ncipher.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +hw_ncipher.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +hw_ncipher.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +hw_ncipher.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +hw_ncipher.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_ncipher.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +hw_ncipher.o: ../../include/openssl/x509_vfy.h ../cryptlib.h hw_ncipher.c +hw_ncipher.o: hw_ncipher_err.c hw_ncipher_err.h vendor_defns/hwcryptohook.h +hw_nuron.o: ../../e_os.h ../../include/openssl/asn1.h +hw_nuron.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_nuron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_nuron.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_nuron.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_nuron.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_nuron.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +hw_nuron.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_nuron.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +hw_nuron.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_nuron.o: ../cryptlib.h hw_nuron.c hw_nuron_err.c hw_nuron_err.h +hw_sureware.o: ../../e_os.h ../../include/openssl/aes.h +hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_sureware.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_sureware.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_sureware.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_sureware.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_sureware.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_sureware.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +hw_sureware.o: ../../include/openssl/err.h ../../include/openssl/evp.h +hw_sureware.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +hw_sureware.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +hw_sureware.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +hw_sureware.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +hw_sureware.o: ../../include/openssl/opensslconf.h +hw_sureware.o: ../../include/openssl/opensslv.h +hw_sureware.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +hw_sureware.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +hw_sureware.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +hw_sureware.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +hw_sureware.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +hw_sureware.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +hw_sureware.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +hw_sureware.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +hw_sureware.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +hw_sureware.o: ../cryptlib.h eng_int.h engine.h hw_sureware.c hw_sureware_err.c +hw_sureware.o: hw_sureware_err.h vendor_defns/sureware.h +hw_ubsec.o: ../../e_os.h ../../include/openssl/asn1.h +hw_ubsec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_ubsec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_ubsec.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_ubsec.o: ../../include/openssl/engine.h ../../include/openssl/err.h +hw_ubsec.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +hw_ubsec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +hw_ubsec.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +hw_ubsec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +hw_ubsec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +hw_ubsec.o: ../cryptlib.h hw_ubsec.c hw_ubsec_err.c hw_ubsec_err.h +hw_ubsec.o: vendor_defns/hw_ubsec.h +tb_cipher.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_cipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_cipher.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_cipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_cipher.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_cipher.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_cipher.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_cipher.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_cipher.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_cipher.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_cipher.o: ../../include/openssl/objects.h +tb_cipher.o: ../../include/openssl/opensslconf.h +tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_cipher.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_cipher.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_cipher.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_cipher.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_cipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_cipher.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_cipher.o: eng_int.h tb_cipher.c +tb_dh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_dh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_dh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_dh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_dh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_dh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_dh.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_dh.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_dh.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_dh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tb_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_dh.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_dh.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_dh.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_dh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_dh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_dh.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_int.h +tb_dh.o: tb_dh.c +tb_digest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_digest.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_digest.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_digest.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_digest.o: ../../include/openssl/objects.h +tb_digest.o: ../../include/openssl/opensslconf.h +tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_digest.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_digest.o: eng_int.h tb_digest.c +tb_dsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_dsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_dsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_dsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_dsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_dsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_dsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_dsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_dsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_dsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tb_dsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_dsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_dsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_dsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_dsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_dsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_dsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_dsa.o: eng_int.h tb_dsa.c +tb_rand.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_rand.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_rand.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_rand.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_rand.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_rand.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_rand.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_rand.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_rand.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_rand.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tb_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_rand.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_rand.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_rand.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_rand.o: eng_int.h tb_rand.c +tb_rsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_rsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_rsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_rsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_rsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_rsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h +tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +tb_rsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +tb_rsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +tb_rsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +tb_rsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +tb_rsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +tb_rsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +tb_rsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +tb_rsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +tb_rsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +tb_rsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +tb_rsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +tb_rsa.o: eng_int.h tb_rsa.c diff --git a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c index 467c0daa1b..3e7fff1c1e 100644 --- a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c +++ b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c @@ -77,7 +77,7 @@ static int cryptodev_max_iv(int cipher); static int cryptodev_key_length_valid(int cipher, int len); static int cipher_nid_to_cryptodev(int nid); static int get_cryptodev_ciphers(const int **cnids); -static int get_cryptodev_digests(const int **cnids); +/*static int get_cryptodev_digests(const int **cnids);*/ static int cryptodev_usable_ciphers(const int **nids); static int cryptodev_usable_digests(const int **nids); static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, @@ -137,6 +137,7 @@ static struct { { 0, NID_undef, 0, 0, }, }; +#if 0 /* UNUSED */ static struct { int id; int nid; @@ -149,6 +150,7 @@ static struct { { CRYPTO_SHA1, NID_undef, }, { 0, NID_undef, }, }; +#endif /* * Return a fd if /dev/crypto seems usable, 0 otherwise. @@ -258,7 +260,7 @@ get_cryptodev_ciphers(const int **cnids) int fd, i, count = 0; if ((fd = get_dev_crypto()) < 0) { - *nids = NULL; + *cnids = NULL; return (0); } memset(&sess, 0, sizeof(sess)); @@ -289,6 +291,7 @@ get_cryptodev_ciphers(const int **cnids) * returning them here is harmless, as long as we return NULL * when asked for a handler in the cryptodev_engine_digests routine */ +#if 0 /* UNUSED */ static int get_cryptodev_digests(const int **cnids) { @@ -297,7 +300,7 @@ get_cryptodev_digests(const int **cnids) int fd, i, count = 0; if ((fd = get_dev_crypto()) < 0) { - *nids = NULL; + *cnids = NULL; return (0); } memset(&sess, 0, sizeof(sess)); @@ -318,6 +321,7 @@ get_cryptodev_digests(const int **cnids) *cnids = NULL; return (count); } +#endif /* * Find the useable ciphers|digests from dev/crypto - this is the first @@ -623,7 +627,7 @@ static int bn2crparam(const BIGNUM *a, struct crparam *crp) { int i, j, k; - ssize_t words, bytes, bits; + ssize_t bytes, bits; u_char *b; crp->crp_p = NULL; diff --git a/src/lib/libssl/src/crypto/engine/vendor_defns/sureware.h b/src/lib/libssl/src/crypto/engine/vendor_defns/sureware.h index 1d3789219d..4bc22027f9 100644 --- a/src/lib/libssl/src/crypto/engine/vendor_defns/sureware.h +++ b/src/lib/libssl/src/crypto/engine/vendor_defns/sureware.h @@ -232,7 +232,7 @@ extern SW_EXPORT SureWareHook_Dsa_Sign_t SureWareHook_Dsa_Sign; * mlen,elen and dlen are all multiple of sizeof(unsigned long) */ typedef int SureWareHook_Mod_Exp_t(char*const msg,int mlen,const unsigned long *mod, - int elen,const unsigned long *exp, + int elen,const unsigned long *exponent, int dlen,unsigned long *data, unsigned long *res); extern SW_EXPORT SureWareHook_Mod_Exp_t SureWareHook_Mod_Exp; diff --git a/src/lib/libssl/src/crypto/err/Makefile b/src/lib/libssl/src/crypto/err/Makefile new file mode 100644 index 0000000000..149f3e0eb9 --- /dev/null +++ b/src/lib/libssl/src/crypto/err/Makefile @@ -0,0 +1,118 @@ +# +# SSLeay/crypto/err/Makefile +# + +DIR= err +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=err.c err_all.c err_prn.c +LIBOBJ=err.o err_all.o err_prn.o + +SRC= $(LIBSRC) + +EXHEADER= err.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +err.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/buffer.h +err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +err.o: ../../include/openssl/symhacks.h ../cryptlib.h err.c +err_all.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +err_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +err_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +err_all.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +err_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +err_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h +err_all.o: ../../include/openssl/evp.h ../../include/openssl/fips.h +err_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +err_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +err_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +err_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +err_all.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +err_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h +err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +err_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +err_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +err_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +err_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +err_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +err_all.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +err_all.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +err_all.o: err_all.c +err_prn.o: ../../e_os.h ../../include/openssl/bio.h +err_prn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +err_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +err_prn.o: ../cryptlib.h err_prn.c diff --git a/src/lib/libssl/src/crypto/err/err.c b/src/lib/libssl/src/crypto/err/err.c index 792f329600..c78790a54c 100644 --- a/src/lib/libssl/src/crypto/err/err.c +++ b/src/lib/libssl/src/crypto/err/err.c @@ -149,6 +149,7 @@ static ERR_STRING_DATA ERR_str_libraries[]= {ERR_PACK(ERR_LIB_DSO,0,0) ,"DSO support routines"}, {ERR_PACK(ERR_LIB_ENGINE,0,0) ,"engine routines"}, {ERR_PACK(ERR_LIB_OCSP,0,0) ,"OCSP routines"}, +{ERR_PACK(ERR_LIB_FIPS,0,0) ,"FIPS routines"}, {0,NULL}, }; @@ -167,6 +168,7 @@ static ERR_STRING_DATA ERR_str_functs[]= #endif {ERR_PACK(0,SYS_F_OPENDIR,0), "opendir"}, {ERR_PACK(0,SYS_F_FREAD,0), "fread"}, + {ERR_PACK(0,SYS_F_GETADDRINFO,0), "getaddrinfo"}, {0,NULL}, }; diff --git a/src/lib/libssl/src/crypto/err/err.h b/src/lib/libssl/src/crypto/err/err.h index 8faa3a7b4f..2efa18866a 100644 --- a/src/lib/libssl/src/crypto/err/err.h +++ b/src/lib/libssl/src/crypto/err/err.h @@ -131,6 +131,7 @@ typedef struct err_state_st #define ERR_LIB_OCSP 39 #define ERR_LIB_UI 40 #define ERR_LIB_COMP 41 +#define ERR_LIB_FIPS 42 #define ERR_LIB_USER 128 @@ -159,6 +160,7 @@ typedef struct err_state_st #define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__) #define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__) #define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__) +#define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__) /* Borland C seems too stupid to be able to shift and do longs in * the pre-processor :-( */ @@ -183,6 +185,7 @@ typedef struct err_state_st #define SYS_F_WSASTARTUP 9 /* Winsock stuff */ #define SYS_F_OPENDIR 10 #define SYS_F_FREAD 11 +#define SYS_F_GETADDRINFO 12 /* reasons */ diff --git a/src/lib/libssl/src/crypto/err/err_all.c b/src/lib/libssl/src/crypto/err/err_all.c index dc505d9d9d..4dc9300892 100644 --- a/src/lib/libssl/src/crypto/err/err_all.c +++ b/src/lib/libssl/src/crypto/err/err_all.c @@ -87,6 +87,7 @@ #endif #include #include +#include void ERR_load_crypto_strings(void) { @@ -129,5 +130,8 @@ void ERR_load_crypto_strings(void) #endif ERR_load_OCSP_strings(); ERR_load_UI_strings(); +#endif +#ifdef OPENSSL_FIPS + ERR_load_FIPS_strings(); #endif } diff --git a/src/lib/libssl/src/crypto/err/openssl.ec b/src/lib/libssl/src/crypto/err/openssl.ec index 29a69dfdd4..447a7f87ed 100644 --- a/src/lib/libssl/src/crypto/err/openssl.ec +++ b/src/lib/libssl/src/crypto/err/openssl.ec @@ -27,6 +27,7 @@ L DSO crypto/dso/dso.h crypto/dso/dso_err.c L ENGINE crypto/engine/engine.h crypto/engine/eng_err.c L OCSP crypto/ocsp/ocsp.h crypto/ocsp/ocsp_err.c L UI crypto/ui/ui.h crypto/ui/ui_err.c +L FIPS fips/fips.h fips/fips_err.h # additional header files to be scanned for function names L NONE crypto/x509/x509_vfy.h NONE diff --git a/src/lib/libssl/src/crypto/evp/Makefile b/src/lib/libssl/src/crypto/evp/Makefile new file mode 100644 index 0000000000..5027a3855a --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/Makefile @@ -0,0 +1,1076 @@ +# +# SSLeay/crypto/evp/Makefile +# + +DIR= evp +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=evp_test.c +TESTDATA=evptests.txt +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \ + e_des.c e_bf.c e_idea.c e_des3.c \ + e_rc4.c e_aes.c names.c \ + e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \ + m_null.c m_md2.c m_md4.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 c_allc.c c_alld.c evp_lib.c bio_ok.c \ + evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \ + e_old.c + +LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \ + e_des.o e_bf.o e_idea.o e_des3.o \ + e_rc4.o e_aes.o names.o \ + e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \ + m_null.o m_md2.o m_md4.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 c_allc.o c_alld.o evp_lib.o bio_ok.o \ + evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o \ + e_old.o + +SRC= $(LIBSRC) + +EXHEADER= evp.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + cp $(TESTDATA) ../../test + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +bio_b64.o: ../../e_os.h ../../include/openssl/aes.h +bio_b64.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +bio_b64.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +bio_b64.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +bio_b64.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +bio_b64.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h +bio_b64.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +bio_b64.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +bio_b64.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +bio_b64.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +bio_b64.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bio_b64.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +bio_b64.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +bio_b64.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +bio_b64.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +bio_b64.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_b64.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +bio_b64.o: ../cryptlib.h bio_b64.c +bio_enc.o: ../../e_os.h ../../include/openssl/aes.h +bio_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +bio_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +bio_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +bio_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +bio_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h +bio_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +bio_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +bio_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +bio_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +bio_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +bio_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +bio_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +bio_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +bio_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +bio_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +bio_enc.o: ../cryptlib.h bio_enc.c +bio_md.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +bio_md.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +bio_md.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +bio_md.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +bio_md.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +bio_md.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +bio_md.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_md.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +bio_md.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +bio_md.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +bio_md.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +bio_md.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +bio_md.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bio_md.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +bio_md.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +bio_md.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +bio_md.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +bio_md.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +bio_md.o: ../../include/openssl/ui_compat.h ../cryptlib.h bio_md.c +bio_ok.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +bio_ok.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +bio_ok.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +bio_ok.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +bio_ok.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +bio_ok.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +bio_ok.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bio_ok.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +bio_ok.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +bio_ok.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +bio_ok.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +bio_ok.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +bio_ok.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +bio_ok.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +bio_ok.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +bio_ok.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +bio_ok.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bio_ok.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +bio_ok.o: ../cryptlib.h bio_ok.c +c_all.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +c_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h +c_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +c_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +c_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +c_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +c_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +c_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +c_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +c_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +c_all.o: ../../include/openssl/ui_compat.h ../cryptlib.h c_all.c +c_allc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +c_allc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_allc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_allc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_allc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +c_allc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +c_allc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +c_allc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +c_allc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +c_allc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +c_allc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +c_allc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +c_allc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +c_allc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +c_allc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_allc.c +c_alld.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +c_alld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_alld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_alld.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_alld.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +c_alld.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +c_alld.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +c_alld.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +c_alld.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +c_alld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +c_alld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +c_alld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +c_alld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +c_alld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +c_alld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_alld.c +digest.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h +digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +digest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +digest.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +digest.o: ../../include/openssl/ui_compat.h ../cryptlib.h digest.c +e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_aes.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_aes.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +e_aes.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +e_aes.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +e_aes.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +e_aes.o: ../../include/openssl/err.h ../../include/openssl/evp.h +e_aes.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +e_aes.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +e_aes.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +e_aes.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +e_aes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +e_aes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +e_aes.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +e_aes.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +e_aes.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +e_aes.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h e_aes.c +e_aes.o: evp_locl.h +e_bf.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_bf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_bf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_bf.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_bf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_bf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_bf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_bf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_bf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_bf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_bf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_bf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_bf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_bf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_bf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_bf.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_bf.c evp_locl.h +e_cast.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_cast.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_cast.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_cast.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_cast.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_cast.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_cast.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_cast.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_cast.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_cast.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_cast.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_cast.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_cast.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_cast.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_cast.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_cast.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_cast.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_cast.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_cast.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_cast.c evp_locl.h +e_des.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_des.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_des.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_des.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_des.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_des.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_des.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_des.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_des.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_des.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_des.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_des.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_des.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_des.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_des.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_des.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_des.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des.c evp_locl.h +e_des3.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_des3.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_des3.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_des3.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_des3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_des3.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_des3.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_des3.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_des3.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_des3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_des3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_des3.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_des3.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_des3.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_des3.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_des3.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_des3.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des3.c evp_locl.h +e_idea.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_idea.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_idea.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_idea.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_idea.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_idea.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_idea.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_idea.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_idea.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_idea.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_idea.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_idea.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_idea.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_idea.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_idea.c evp_locl.h +e_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_null.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_null.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_null.c +e_old.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_old.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_old.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +e_old.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +e_old.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +e_old.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +e_old.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_old.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +e_old.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +e_old.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +e_old.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +e_old.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +e_old.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +e_old.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +e_old.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +e_old.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +e_old.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h e_old.c +e_rc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_rc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_rc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_rc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_rc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_rc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_rc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_rc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_rc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_rc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_rc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_rc2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_rc2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_rc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_rc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_rc2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_rc2.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc2.c evp_locl.h +e_rc4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_rc4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_rc4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_rc4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_rc4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_rc4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_rc4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_rc4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_rc4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_rc4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_rc4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_rc4.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_rc4.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_rc4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_rc4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_rc4.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_rc4.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc4.c evp_locl.h +e_rc5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +e_rc5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +e_rc5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +e_rc5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +e_rc5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +e_rc5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +e_rc5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +e_rc5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +e_rc5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +e_rc5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +e_rc5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +e_rc5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_rc5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_rc5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_rc5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_rc5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_rc5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_rc5.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc5.c evp_locl.h +e_xcbc_d.o: ../../e_os.h ../../include/openssl/aes.h +e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +e_xcbc_d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h +e_xcbc_d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +e_xcbc_d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +e_xcbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +e_xcbc_d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +e_xcbc_d.o: ../../include/openssl/opensslconf.h +e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +e_xcbc_d.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +e_xcbc_d.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +e_xcbc_d.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +e_xcbc_d.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c +encode.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +encode.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +encode.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +encode.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +encode.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +encode.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +encode.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +encode.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +encode.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +encode.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +encode.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +encode.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +encode.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +encode.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +encode.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +encode.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +encode.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +encode.o: ../../include/openssl/ui_compat.h ../cryptlib.h encode.c +evp_acnf.o: ../../e_os.h ../../include/openssl/aes.h +evp_acnf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_acnf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_acnf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +evp_acnf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +evp_acnf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +evp_acnf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +evp_acnf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +evp_acnf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +evp_acnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +evp_acnf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +evp_acnf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +evp_acnf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +evp_acnf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +evp_acnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +evp_acnf.o: ../../include/openssl/ui_compat.h ../cryptlib.h evp_acnf.c +evp_enc.o: ../../e_os.h ../../include/openssl/aes.h +evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_enc.o: ../../include/openssl/engine.h ../../include/openssl/err.h +evp_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +evp_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +evp_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +evp_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +evp_enc.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +evp_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +evp_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +evp_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +evp_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +evp_enc.o: ../cryptlib.h evp_enc.c evp_locl.h +evp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +evp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +evp_err.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +evp_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +evp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +evp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +evp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +evp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +evp_err.o: evp_err.c +evp_key.o: ../../e_os.h ../../include/openssl/aes.h +evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +evp_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +evp_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +evp_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +evp_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +evp_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +evp_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +evp_key.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +evp_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_key.c +evp_lib.o: ../../e_os.h ../../include/openssl/aes.h +evp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +evp_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +evp_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +evp_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +evp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +evp_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +evp_lib.o: ../cryptlib.h evp_lib.c +evp_pbe.o: ../../e_os.h ../../include/openssl/aes.h +evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +evp_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +evp_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +evp_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +evp_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +evp_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +evp_pbe.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +evp_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pbe.c +evp_pkey.o: ../../e_os.h ../../include/openssl/aes.h +evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +evp_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +evp_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +evp_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +evp_pkey.o: ../../include/openssl/opensslconf.h +evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +evp_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +evp_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +evp_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +evp_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +evp_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pkey.c +m_dss.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_dss.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_dss.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_dss.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_dss.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_dss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_dss.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_dss.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_dss.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_dss.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_dss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_dss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_dss.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_dss.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_dss.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_dss.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_dss.o: ../cryptlib.h m_dss.c +m_dss1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_dss1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_dss1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_dss1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_dss1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_dss1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_dss1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_dss1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_dss1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_dss1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_dss1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_dss1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_dss1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_dss1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_dss1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_dss1.o: ../cryptlib.h m_dss1.c +m_md2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_md2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_md2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_md2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_md2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_md2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_md2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_md2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_md2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_md2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_md2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_md2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_md2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_md2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_md2.o: ../cryptlib.h evp_locl.h m_md2.c +m_md4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_md4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_md4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_md4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_md4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_md4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_md4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_md4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_md4.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_md4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_md4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_md4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_md4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_md4.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_md4.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_md4.o: ../cryptlib.h evp_locl.h m_md4.c +m_md5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_md5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_md5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_md5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_md5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_md5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_md5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_md5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_md5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_md5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_md5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_md5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_md5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_md5.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_md5.o: ../cryptlib.h evp_locl.h m_md5.c +m_mdc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_mdc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_mdc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_mdc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_mdc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_mdc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_mdc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_mdc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_mdc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_mdc2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_mdc2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_mdc2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_mdc2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_mdc2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_mdc2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_mdc2.o: ../cryptlib.h evp_locl.h m_mdc2.c +m_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_null.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_null.o: ../cryptlib.h m_null.c +m_ripemd.o: ../../e_os.h ../../include/openssl/aes.h +m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +m_ripemd.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +m_ripemd.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +m_ripemd.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +m_ripemd.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +m_ripemd.o: ../../include/openssl/err.h ../../include/openssl/evp.h +m_ripemd.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +m_ripemd.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +m_ripemd.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +m_ripemd.o: ../../include/openssl/opensslconf.h +m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_ripemd.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_ripemd.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_ripemd.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_ripemd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_ripemd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_ripemd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_ripemd.o: ../cryptlib.h m_ripemd.c +m_sha.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_sha.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_sha.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_sha.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_sha.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_sha.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_sha.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_sha.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_sha.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_sha.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_sha.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_sha.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_sha.o: ../cryptlib.h evp_locl.h m_sha.c +m_sha1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +m_sha1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_sha1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_sha1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_sha1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +m_sha1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +m_sha1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +m_sha1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +m_sha1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +m_sha1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +m_sha1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +m_sha1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +m_sha1.o: ../cryptlib.h m_sha1.c +names.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +names.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +names.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +names.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +names.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +names.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +names.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +names.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +names.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +names.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +names.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +names.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +names.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +names.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +names.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +names.o: ../cryptlib.h names.c +p5_crpt.o: ../../e_os.h ../../include/openssl/aes.h +p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p5_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p5_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p5_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p5_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p5_crpt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +p5_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p5_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p5_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p5_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p5_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p5_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p5_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_crpt.c +p5_crpt2.o: ../../e_os.h ../../include/openssl/aes.h +p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p5_crpt2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_crpt2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_crpt2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_crpt2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_crpt2.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h +p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p5_crpt2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p5_crpt2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p5_crpt2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p5_crpt2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p5_crpt2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p5_crpt2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p5_crpt2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p5_crpt2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p5_crpt2.o: ../cryptlib.h p5_crpt2.c +p_dec.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_dec.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_dec.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_dec.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_dec.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_dec.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_dec.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_dec.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_dec.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p_dec.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p_dec.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p_dec.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_dec.c +p_enc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_enc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_enc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p_enc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_enc.c +p_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +p_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +p_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_lib.c +p_open.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_open.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_open.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_open.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_open.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_open.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_open.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_open.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_open.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p_open.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p_open.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p_open.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p_open.o: ../cryptlib.h p_open.c +p_seal.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_seal.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_seal.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_seal.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_seal.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_seal.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_seal.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_seal.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_seal.c +p_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +p_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p_sign.o: ../cryptlib.h p_sign.c +p_verify.o: ../../e_os.h ../../include/openssl/aes.h +p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p_verify.o: ../../include/openssl/opensslconf.h +p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p_verify.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p_verify.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p_verify.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p_verify.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p_verify.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p_verify.o: ../cryptlib.h p_verify.c diff --git a/src/lib/libssl/src/crypto/evp/bio_md.c b/src/lib/libssl/src/crypto/evp/bio_md.c index c632dfb202..f4aa41ac4b 100644 --- a/src/lib/libssl/src/crypto/evp/bio_md.c +++ b/src/lib/libssl/src/crypto/evp/bio_md.c @@ -176,10 +176,11 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr) { case BIO_CTRL_RESET: if (b->init) - EVP_DigestInit_ex(ctx,ctx->digest, NULL); + ret = EVP_DigestInit_ex(ctx,ctx->digest, NULL); else ret=0; - ret=BIO_ctrl(b->next_bio,cmd,num,ptr); + if (ret > 0) + ret=BIO_ctrl(b->next_bio,cmd,num,ptr); break; case BIO_C_GET_MD: if (b->init) @@ -191,11 +192,12 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr) ret=0; break; case BIO_C_GET_MD_CTX: + pctx=ptr; + *pctx=ctx; + break; + case BIO_C_SET_MD_CTX: if (b->init) - { - pctx=ptr; - *pctx=ctx; - } + b->ptr=ptr; else ret=0; break; @@ -207,8 +209,9 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_C_SET_MD: md=ptr; - EVP_DigestInit_ex(ctx,md, NULL); - b->init=1; + ret = EVP_DigestInit_ex(ctx,md, NULL); + if (ret > 0) + b->init=1; break; case BIO_CTRL_DUP: dbio=ptr; diff --git a/src/lib/libssl/src/crypto/evp/c_allc.c b/src/lib/libssl/src/crypto/evp/c_allc.c index 341a958fd4..fc96812365 100644 --- a/src/lib/libssl/src/crypto/evp/c_allc.c +++ b/src/lib/libssl/src/crypto/evp/c_allc.c @@ -67,6 +67,8 @@ void OpenSSL_add_all_ciphers(void) #ifndef OPENSSL_NO_DES EVP_add_cipher(EVP_des_cfb()); + EVP_add_cipher(EVP_des_cfb1()); + EVP_add_cipher(EVP_des_cfb8()); EVP_add_cipher(EVP_des_ede_cfb()); EVP_add_cipher(EVP_des_ede3_cfb()); @@ -150,6 +152,8 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_128_ecb()); EVP_add_cipher(EVP_aes_128_cbc()); EVP_add_cipher(EVP_aes_128_cfb()); + EVP_add_cipher(EVP_aes_128_cfb1()); + EVP_add_cipher(EVP_aes_128_cfb8()); EVP_add_cipher(EVP_aes_128_ofb()); #if 0 EVP_add_cipher(EVP_aes_128_ctr()); @@ -159,6 +163,8 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_192_ecb()); EVP_add_cipher(EVP_aes_192_cbc()); EVP_add_cipher(EVP_aes_192_cfb()); + EVP_add_cipher(EVP_aes_192_cfb1()); + EVP_add_cipher(EVP_aes_192_cfb8()); EVP_add_cipher(EVP_aes_192_ofb()); #if 0 EVP_add_cipher(EVP_aes_192_ctr()); @@ -168,6 +174,8 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_256_ecb()); EVP_add_cipher(EVP_aes_256_cbc()); EVP_add_cipher(EVP_aes_256_cfb()); + EVP_add_cipher(EVP_aes_256_cfb1()); + EVP_add_cipher(EVP_aes_256_cfb8()); EVP_add_cipher(EVP_aes_256_ofb()); #if 0 EVP_add_cipher(EVP_aes_256_ctr()); diff --git a/src/lib/libssl/src/crypto/evp/c_alld.c b/src/lib/libssl/src/crypto/evp/c_alld.c index be91cdb037..aae7bf7482 100644 --- a/src/lib/libssl/src/crypto/evp/c_alld.c +++ b/src/lib/libssl/src/crypto/evp/c_alld.c @@ -75,7 +75,7 @@ void OpenSSL_add_all_digests(void) EVP_add_digest_alias(SN_md5,"ssl2-md5"); EVP_add_digest_alias(SN_md5,"ssl3-md5"); #endif -#ifndef OPENSSL_NO_SHA +#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) EVP_add_digest(EVP_sha()); #ifndef OPENSSL_NO_DSA EVP_add_digest(EVP_dss()); diff --git a/src/lib/libssl/src/crypto/evp/digest.c b/src/lib/libssl/src/crypto/evp/digest.c index 0623ddf1f0..f21c63842c 100644 --- a/src/lib/libssl/src/crypto/evp/digest.c +++ b/src/lib/libssl/src/crypto/evp/digest.c @@ -137,6 +137,39 @@ int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) return EVP_DigestInit_ex(ctx, type, NULL); } +#ifdef OPENSSL_FIPS + +/* The purpose of these is to trap programs that attempt to use non FIPS + * algorithms in FIPS mode and ignore the errors. + */ + +static int bad_init(EVP_MD_CTX *ctx) + { FIPS_ERROR_IGNORED("Digest init"); return 0;} + +static int bad_update(EVP_MD_CTX *ctx,const void *data,unsigned long count) + { FIPS_ERROR_IGNORED("Digest update"); return 0;} + +static int bad_final(EVP_MD_CTX *ctx,unsigned char *md) + { FIPS_ERROR_IGNORED("Digest Final"); return 0;} + +static const EVP_MD bad_md = + { + 0, + 0, + 0, + 0, + bad_init, + bad_update, + bad_final, + NULL, + NULL, + NULL, + 0, + {0,0,0,0}, + }; + +#endif + int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) { EVP_MD_CTX_clear_flags(ctx,EVP_MD_CTX_FLAG_CLEANED); @@ -195,6 +228,18 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) #endif if (ctx->digest != type) { +#ifdef OPENSSL_FIPS + if (FIPS_mode()) + { + if (!(type->flags & EVP_MD_FLAG_FIPS) + && !(ctx->flags & EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)) + { + EVPerr(EVP_F_EVP_DIGESTINIT, EVP_R_DISABLED_FOR_FIPS); + ctx->digest = &bad_md; + return 0; + } + } +#endif if (ctx->digest && ctx->digest->ctx_size) OPENSSL_free(ctx->md_data); ctx->digest=type; diff --git a/src/lib/libssl/src/crypto/evp/e_aes.c b/src/lib/libssl/src/crypto/evp/e_aes.c index fe8bcda631..f35036c9d7 100644 --- a/src/lib/libssl/src/crypto/evp/e_aes.c +++ b/src/lib/libssl/src/crypto/evp/e_aes.c @@ -67,34 +67,52 @@ typedef struct IMPLEMENT_BLOCK_CIPHER(aes_128, ks, AES, EVP_AES_KEY, NID_aes_128, 16, 16, 16, 128, - 0, aes_init_key, NULL, + EVP_CIPH_FLAG_FIPS, aes_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) IMPLEMENT_BLOCK_CIPHER(aes_192, ks, AES, EVP_AES_KEY, NID_aes_192, 16, 24, 16, 128, - 0, aes_init_key, NULL, + EVP_CIPH_FLAG_FIPS, aes_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY, NID_aes_256, 16, 32, 16, 128, - 0, aes_init_key, NULL, + EVP_CIPH_FLAG_FIPS, aes_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) +#define IMPLEMENT_AES_CFBR(ksize,cbits,flags) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16,flags) + +IMPLEMENT_AES_CFBR(128,1,0) +IMPLEMENT_AES_CFBR(192,1,0) +IMPLEMENT_AES_CFBR(256,1,0) + +IMPLEMENT_AES_CFBR(128,8,EVP_CIPH_FLAG_FIPS) +IMPLEMENT_AES_CFBR(192,8,EVP_CIPH_FLAG_FIPS) +IMPLEMENT_AES_CFBR(256,8,EVP_CIPH_FLAG_FIPS) + static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, - const unsigned char *iv, int enc) { + const unsigned char *iv, int enc) + { + int ret; if ((ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_CFB_MODE || (ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_OFB_MODE || enc) - AES_set_encrypt_key(key, ctx->key_len * 8, ctx->cipher_data); + ret=AES_set_encrypt_key(key, ctx->key_len * 8, ctx->cipher_data); else - AES_set_decrypt_key(key, ctx->key_len * 8, ctx->cipher_data); + ret=AES_set_decrypt_key(key, ctx->key_len * 8, ctx->cipher_data); + + if(ret < 0) + { + EVPerr(EVP_F_AES_INIT_KEY,EVP_R_AES_KEY_SETUP_FAILED); + return 0; + } return 1; -} + } #endif diff --git a/src/lib/libssl/src/crypto/evp/e_des.c b/src/lib/libssl/src/crypto/evp/e_des.c index 105266a4b3..46e2899825 100644 --- a/src/lib/libssl/src/crypto/evp/e_des.c +++ b/src/lib/libssl/src/crypto/evp/e_des.c @@ -56,9 +56,9 @@ * [including the GNU Public Licence.] */ -#ifndef OPENSSL_NO_DES #include #include "cryptlib.h" +#ifndef OPENSSL_NO_DES #include #include #include "evp_locl.h" @@ -92,20 +92,55 @@ static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, return 1; } -static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, - const unsigned char *in, unsigned int inl) +static int des_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) { DES_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data, (DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt); return 1; } +/* Although we have a CFB-r implementation for DES, it doesn't pack the right + way, so wrap it here */ +static int des_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) + { + unsigned int n; + unsigned char c[1],d[1]; + + for(n=0 ; n < inl ; ++n) + { + c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0; + DES_cfb_encrypt(c,d,1,1,ctx->cipher_data,(DES_cblock *)ctx->iv, + ctx->encrypt); + out[n/8]=(out[n/8]&~(0x80 >> (n%8)))|((d[0]&0x80) >> (n%8)); + } + return 1; + } + +static int des_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) + { + DES_cfb_encrypt(in,out,8,inl,ctx->cipher_data,(DES_cblock *)ctx->iv, + ctx->encrypt); + return 1; + } + BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64, - 0, des_init_key, NULL, + EVP_CIPH_FLAG_FIPS, des_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) +BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,1, + EVP_CIPH_FLAG_FIPS,des_init_key,NULL, + EVP_CIPHER_set_asn1_iv, + EVP_CIPHER_get_asn1_iv,NULL) + +BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,8, + EVP_CIPH_FLAG_FIPS,des_init_key,NULL, + EVP_CIPHER_set_asn1_iv, + EVP_CIPHER_get_asn1_iv,NULL) static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) diff --git a/src/lib/libssl/src/crypto/evp/e_des3.c b/src/lib/libssl/src/crypto/evp/e_des3.c index 077860e7b6..677322bf02 100644 --- a/src/lib/libssl/src/crypto/evp/e_des3.c +++ b/src/lib/libssl/src/crypto/evp/e_des3.c @@ -56,9 +56,9 @@ * [including the GNU Public Licence.] */ -#ifndef OPENSSL_NO_DES #include #include "cryptlib.h" +#ifndef OPENSSL_NO_DES #include #include #include "evp_locl.h" @@ -85,7 +85,7 @@ static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) { BLOCK_CIPHER_ecb_loop() - DES_ecb3_encrypt((DES_cblock *)(in + i), (DES_cblock *)(out + i), + DES_ecb3_encrypt(in + i,out + i, &data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3, ctx->encrypt); @@ -121,7 +121,7 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, return 1; } -static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, +static int des_ede_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) { DES_ede3_cfb64_encrypt(in, out, (long)inl, @@ -130,23 +130,62 @@ static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, return 1; } +/* Although we have a CFB-r implementation for 3-DES, it doesn't pack the right + way, so wrap it here */ +static int des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) + { + unsigned int n; + unsigned char c[1],d[1]; + + for(n=0 ; n < inl ; ++n) + { + c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0; + DES_ede3_cfb_encrypt(c,d,1,1, + &data(ctx)->ks1,&data(ctx)->ks2,&data(ctx)->ks3, + (DES_cblock *)ctx->iv,ctx->encrypt); + out[n/8]=(out[n/8]&~(0x80 >> (n%8)))|((d[0]&0x80) >> (n%8)); + } + + return 1; + } + +static int des_ede3_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) + { + DES_ede3_cfb_encrypt(in,out,8,inl, + &data(ctx)->ks1,&data(ctx)->ks2,&data(ctx)->ks3, + (DES_cblock *)ctx->iv,ctx->encrypt); + return 1; + } + BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64, - 0, des_ede_init_key, NULL, + EVP_CIPH_FLAG_FIPS, des_ede_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) -#define des_ede3_cfb_cipher des_ede_cfb_cipher +#define des_ede3_cfb64_cipher des_ede_cfb64_cipher #define des_ede3_ofb_cipher des_ede_ofb_cipher #define des_ede3_cbc_cipher des_ede_cbc_cipher #define des_ede3_ecb_cipher des_ede_ecb_cipher BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64, - 0, des_ede3_init_key, NULL, + EVP_CIPH_FLAG_FIPS, des_ede3_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL) +BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,1, + EVP_CIPH_FLAG_FIPS, des_ede3_init_key,NULL, + EVP_CIPHER_set_asn1_iv, + EVP_CIPHER_get_asn1_iv,NULL) + +BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,8, + EVP_CIPH_FLAG_FIPS, des_ede3_init_key,NULL, + EVP_CIPHER_set_asn1_iv, + EVP_CIPHER_get_asn1_iv,NULL) + static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { diff --git a/src/lib/libssl/src/crypto/evp/e_null.c b/src/lib/libssl/src/crypto/evp/e_null.c index 2420d7e5af..a84b0f14b1 100644 --- a/src/lib/libssl/src/crypto/evp/e_null.c +++ b/src/lib/libssl/src/crypto/evp/e_null.c @@ -69,7 +69,7 @@ static const EVP_CIPHER n_cipher= { NID_undef, 1,0,0, - 0, + EVP_CIPH_FLAG_FIPS, null_init_key, null_cipher, NULL, diff --git a/src/lib/libssl/src/crypto/evp/e_old.c b/src/lib/libssl/src/crypto/evp/e_old.c new file mode 100644 index 0000000000..92dc498945 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_old.c @@ -0,0 +1,108 @@ +/* crypto/evp/e_old.c -*- mode:C; c-file-style: "eay" -*- */ +/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL + * project 2004. + */ +/* ==================================================================== + * Copyright (c) 2004 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + +#include + +/* Define some deprecated functions, so older programs + don't crash and burn too quickly. On Windows and VMS, + these will never be used, since functions and variables + in shared libraries are selected by entry point location, + not by name. */ + +#ifndef OPENSSL_NO_BF +#undef EVP_bf_cfb +const EVP_CIPHER *EVP_bf_cfb(void) { return EVP_bf_cfb64(); } +#endif + +#ifndef OPENSSL_NO_DES +#undef EVP_des_cfb +const EVP_CIPHER *EVP_des_cfb(void) { return EVP_des_cfb64(); } +#undef EVP_des_ede3_cfb +const EVP_CIPHER *EVP_des_ede3_cfb(void) { return EVP_des_ede3_cfb64(); } +#undef EVP_des_ede_cfb +const EVP_CIPHER *EVP_des_ede_cfb(void) { return EVP_des_ede_cfb64(); } +#endif + +#ifndef OPENSSL_NO_IDEA +#undef EVP_idea_cfb +const EVP_CIPHER *EVP_idea_cfb(void) { return EVP_idea_cfb64(); } +#endif + +#ifndef OPENSSL_NO_RC2 +#undef EVP_rc2_cfb +const EVP_CIPHER *EVP_rc2_cfb(void) { return EVP_rc2_cfb64(); } +#endif + +#ifndef OPENSSL_NO_CAST +#undef EVP_cast5_cfb +const EVP_CIPHER *EVP_cast5_cfb(void) { return EVP_cast5_cfb64(); } +#endif + +#ifndef OPENSSL_NO_RC5 +#undef EVP_rc5_32_12_16_cfb +const EVP_CIPHER *EVP_rc5_32_12_16_cfb(void) { return EVP_rc5_32_12_16_cfb64(); } +#endif + +#ifndef OPENSSL_NO_AES +#undef EVP_aes_128_cfb +const EVP_CIPHER *EVP_aes_128_cfb(void) { return EVP_aes_128_cfb128(); } +#undef EVP_aes_192_cfb +const EVP_CIPHER *EVP_aes_192_cfb(void) { return EVP_aes_192_cfb128(); } +#undef EVP_aes_256_cfb +const EVP_CIPHER *EVP_aes_256_cfb(void) { return EVP_aes_256_cfb128(); } +#endif diff --git a/src/lib/libssl/src/crypto/evp/e_rc4.c b/src/lib/libssl/src/crypto/evp/e_rc4.c index d58f507837..8aa70585b9 100644 --- a/src/lib/libssl/src/crypto/evp/e_rc4.c +++ b/src/lib/libssl/src/crypto/evp/e_rc4.c @@ -62,6 +62,7 @@ #include "cryptlib.h" #include #include +#include "evp_locl.h" #include /* FIXME: surely this is available elsewhere? */ diff --git a/src/lib/libssl/src/crypto/evp/evp.h b/src/lib/libssl/src/crypto/evp/evp.h index 4801d8eaa3..5cde88ae76 100644 --- a/src/lib/libssl/src/crypto/evp/evp.h +++ b/src/lib/libssl/src/crypto/evp/evp.h @@ -117,6 +117,10 @@ #include #endif +#ifdef OPENSSL_FIPS +#include +#endif + /* #define EVP_RC2_KEY_SIZE 16 #define EVP_RC4_KEY_SIZE 16 @@ -290,6 +294,7 @@ struct env_md_st #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single * block */ +#define EVP_MD_FLAG_FIPS 0x0400 /* Note if suitable for use in FIPS mode */ #define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0} @@ -332,6 +337,9 @@ struct env_md_ctx_st #define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data * in EVP_MD_CTX_cleanup */ +#define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008 /* Allow use of non FIPS digest + * in FIPS mode */ + struct evp_cipher_st { int nid; @@ -373,6 +381,10 @@ struct evp_cipher_st #define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80 /* Don't use standard block padding */ #define EVP_CIPH_NO_PADDING 0x100 +/* Note if suitable for use in FIPS mode */ +#define EVP_CIPH_FLAG_FIPS 0x400 +/* Allow non FIPS cipher in FIPS mode */ +#define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0x800 /* ctrl() values */ @@ -478,6 +490,9 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, #define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d)) #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) #define EVP_CIPHER_CTX_flags(e) ((e)->cipher->flags) +#define EVP_CIPHER_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs)) +#define EVP_CIPHER_CTX_clear_flags(ctx,flgs) ((ctx)->flags&=~(flgs)) +#define EVP_CIPHER_CTX_test_flags(ctx,flgs) ((ctx)->flags&(flgs)) #define EVP_CIPHER_CTX_mode(e) ((e)->cipher->flags & EVP_CIPH_MODE) #define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) @@ -499,6 +514,7 @@ void BIO_set_md(BIO *,const EVP_MD *md); #endif #define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp) #define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp) +#define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp) #define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL) #define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(char *)c_pp) @@ -640,9 +656,20 @@ const EVP_CIPHER *EVP_des_ede(void); const EVP_CIPHER *EVP_des_ede3(void); const EVP_CIPHER *EVP_des_ede_ecb(void); const EVP_CIPHER *EVP_des_ede3_ecb(void); -const EVP_CIPHER *EVP_des_cfb(void); -const EVP_CIPHER *EVP_des_ede_cfb(void); -const EVP_CIPHER *EVP_des_ede3_cfb(void); +const EVP_CIPHER *EVP_des_cfb64(void); +# define EVP_des_cfb EVP_des_cfb64 +const EVP_CIPHER *EVP_des_cfb1(void); +const EVP_CIPHER *EVP_des_cfb8(void); +const EVP_CIPHER *EVP_des_ede_cfb64(void); +# define EVP_des_ede_cfb EVP_des_ede_cfb64 +#if 0 +const EVP_CIPHER *EVP_des_ede_cfb1(void); +const EVP_CIPHER *EVP_des_ede_cfb8(void); +#endif +const EVP_CIPHER *EVP_des_ede3_cfb64(void); +# define EVP_des_ede3_cfb EVP_des_ede3_cfb64 +const EVP_CIPHER *EVP_des_ede3_cfb1(void); +const EVP_CIPHER *EVP_des_ede3_cfb8(void); const EVP_CIPHER *EVP_des_ofb(void); const EVP_CIPHER *EVP_des_ede_ofb(void); const EVP_CIPHER *EVP_des_ede3_ofb(void); @@ -666,7 +693,8 @@ const EVP_CIPHER *EVP_rc4_40(void); #endif #ifndef OPENSSL_NO_IDEA const EVP_CIPHER *EVP_idea_ecb(void); -const EVP_CIPHER *EVP_idea_cfb(void); +const EVP_CIPHER *EVP_idea_cfb64(void); +# define EVP_idea_cfb EVP_idea_cfb64 const EVP_CIPHER *EVP_idea_ofb(void); const EVP_CIPHER *EVP_idea_cbc(void); #endif @@ -675,45 +703,58 @@ const EVP_CIPHER *EVP_rc2_ecb(void); const EVP_CIPHER *EVP_rc2_cbc(void); const EVP_CIPHER *EVP_rc2_40_cbc(void); const EVP_CIPHER *EVP_rc2_64_cbc(void); -const EVP_CIPHER *EVP_rc2_cfb(void); +const EVP_CIPHER *EVP_rc2_cfb64(void); +# define EVP_rc2_cfb EVP_rc2_cfb64 const EVP_CIPHER *EVP_rc2_ofb(void); #endif #ifndef OPENSSL_NO_BF const EVP_CIPHER *EVP_bf_ecb(void); const EVP_CIPHER *EVP_bf_cbc(void); -const EVP_CIPHER *EVP_bf_cfb(void); +const EVP_CIPHER *EVP_bf_cfb64(void); +# define EVP_bf_cfb EVP_bf_cfb64 const EVP_CIPHER *EVP_bf_ofb(void); #endif #ifndef OPENSSL_NO_CAST const EVP_CIPHER *EVP_cast5_ecb(void); const EVP_CIPHER *EVP_cast5_cbc(void); -const EVP_CIPHER *EVP_cast5_cfb(void); +const EVP_CIPHER *EVP_cast5_cfb64(void); +# define EVP_cast5_cfb EVP_cast5_cfb64 const EVP_CIPHER *EVP_cast5_ofb(void); #endif #ifndef OPENSSL_NO_RC5 const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void); const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void); -const EVP_CIPHER *EVP_rc5_32_12_16_cfb(void); +const EVP_CIPHER *EVP_rc5_32_12_16_cfb64(void); +# define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64 const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void); #endif #ifndef OPENSSL_NO_AES const EVP_CIPHER *EVP_aes_128_ecb(void); const EVP_CIPHER *EVP_aes_128_cbc(void); -const EVP_CIPHER *EVP_aes_128_cfb(void); +const EVP_CIPHER *EVP_aes_128_cfb1(void); +const EVP_CIPHER *EVP_aes_128_cfb8(void); +const EVP_CIPHER *EVP_aes_128_cfb128(void); +# define EVP_aes_128_cfb EVP_aes_128_cfb128 const EVP_CIPHER *EVP_aes_128_ofb(void); #if 0 const EVP_CIPHER *EVP_aes_128_ctr(void); #endif const EVP_CIPHER *EVP_aes_192_ecb(void); const EVP_CIPHER *EVP_aes_192_cbc(void); -const EVP_CIPHER *EVP_aes_192_cfb(void); +const EVP_CIPHER *EVP_aes_192_cfb1(void); +const EVP_CIPHER *EVP_aes_192_cfb8(void); +const EVP_CIPHER *EVP_aes_192_cfb128(void); +# define EVP_aes_192_cfb EVP_aes_192_cfb128 const EVP_CIPHER *EVP_aes_192_ofb(void); #if 0 const EVP_CIPHER *EVP_aes_192_ctr(void); #endif const EVP_CIPHER *EVP_aes_256_ecb(void); const EVP_CIPHER *EVP_aes_256_cbc(void); -const EVP_CIPHER *EVP_aes_256_cfb(void); +const EVP_CIPHER *EVP_aes_256_cfb1(void); +const EVP_CIPHER *EVP_aes_256_cfb8(void); +const EVP_CIPHER *EVP_aes_256_cfb128(void); +# define EVP_aes_256_cfb EVP_aes_256_cfb128 const EVP_CIPHER *EVP_aes_256_ofb(void); #if 0 const EVP_CIPHER *EVP_aes_256_ctr(void); @@ -825,13 +866,18 @@ void ERR_load_EVP_strings(void); /* Error codes for the EVP functions. */ /* Function codes. */ +#define EVP_F_AES_INIT_KEY 129 #define EVP_F_D2I_PKEY 100 +#define EVP_F_EVP_ADD_CIPHER 130 +#define EVP_F_EVP_ADD_DIGEST 131 #define EVP_F_EVP_CIPHERINIT 123 #define EVP_F_EVP_CIPHER_CTX_CTRL 124 #define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 #define EVP_F_EVP_DECRYPTFINAL 101 #define EVP_F_EVP_DIGESTINIT 128 #define EVP_F_EVP_ENCRYPTFINAL 127 +#define EVP_F_EVP_GET_CIPHERBYNAME 132 +#define EVP_F_EVP_GET_DIGESTBYNAME 133 #define EVP_F_EVP_MD_CTX_COPY 110 #define EVP_F_EVP_OPENINIT 102 #define EVP_F_EVP_PBE_ALG_ADD 115 @@ -855,6 +901,7 @@ void ERR_load_EVP_strings(void); #define EVP_F_RC5_CTRL 125 /* Reason codes. */ +#define EVP_R_AES_KEY_SETUP_FAILED 140 #define EVP_R_BAD_BLOCK_LENGTH 136 #define EVP_R_BAD_DECRYPT 100 #define EVP_R_BAD_KEY_LENGTH 137 @@ -866,6 +913,7 @@ void ERR_load_EVP_strings(void); #define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 #define EVP_R_DECODE_ERROR 114 #define EVP_R_DIFFERENT_KEY_TYPES 101 +#define EVP_R_DISABLED_FOR_FIPS 141 #define EVP_R_ENCODE_ERROR 115 #define EVP_R_EVP_PBE_CIPHERINIT_ERROR 119 #define EVP_R_EXPECTING_AN_RSA_KEY 127 diff --git a/src/lib/libssl/src/crypto/evp/evp_enc.c b/src/lib/libssl/src/crypto/evp/evp_enc.c index 8ea5aa935d..f549eeb437 100644 --- a/src/lib/libssl/src/crypto/evp/evp_enc.c +++ b/src/lib/libssl/src/crypto/evp/evp_enc.c @@ -82,6 +82,48 @@ int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc); } +#ifdef OPENSSL_FIPS + +/* The purpose of these is to trap programs that attempt to use non FIPS + * algorithms in FIPS mode and ignore the errors. + */ + +int bad_init(EVP_CIPHER_CTX *ctx, const unsigned char *key, + const unsigned char *iv, int enc) + { FIPS_ERROR_IGNORED("Cipher init"); return 0;} + +int bad_do_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + const unsigned char *in, unsigned int inl) + { FIPS_ERROR_IGNORED("Cipher update"); return 0;} + +/* NB: no cleanup because it is allowed after failed init */ + +int bad_set_asn1(EVP_CIPHER_CTX *ctx, ASN1_TYPE *typ) + { FIPS_ERROR_IGNORED("Cipher set_asn1"); return 0;} +int bad_get_asn1(EVP_CIPHER_CTX *ctx, ASN1_TYPE *typ) + { FIPS_ERROR_IGNORED("Cipher get_asn1"); return 0;} +int bad_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) + { FIPS_ERROR_IGNORED("Cipher ctrl"); return 0;} + +static const EVP_CIPHER bad_cipher = + { + 0, + 0, + 0, + 0, + 0, + bad_init, + bad_do_cipher, + NULL, + 0, + bad_set_asn1, + bad_get_asn1, + bad_ctrl, + NULL + }; + +#endif + int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv, int enc) { @@ -146,7 +188,6 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp else ctx->engine = NULL; #endif - ctx->cipher=cipher; if (ctx->cipher->ctx_size) { @@ -210,6 +251,24 @@ skip_to_init: } } +#ifdef OPENSSL_FIPS + /* After 'key' is set no further parameters changes are permissible. + * So only check for non FIPS enabling at this point. + */ + if (key && FIPS_mode()) + { + if (!(ctx->cipher->flags & EVP_CIPH_FLAG_FIPS) + & !(ctx->flags & EVP_CIPH_FLAG_NON_FIPS_ALLOW)) + { + EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_DISABLED_FOR_FIPS); + ERR_add_error_data(2, "cipher=", + EVP_CIPHER_name(ctx->cipher)); + ctx->cipher = &bad_cipher; + return 0; + } + } +#endif + if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) { if(!ctx->cipher->init(ctx,key,iv,enc)) return 0; } diff --git a/src/lib/libssl/src/crypto/evp/evp_err.c b/src/lib/libssl/src/crypto/evp/evp_err.c index 3a23d21c21..40135d0729 100644 --- a/src/lib/libssl/src/crypto/evp/evp_err.c +++ b/src/lib/libssl/src/crypto/evp/evp_err.c @@ -1,6 +1,6 @@ /* crypto/evp/evp_err.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -66,13 +66,18 @@ #ifndef OPENSSL_NO_ERR static ERR_STRING_DATA EVP_str_functs[]= { +{ERR_PACK(0,EVP_F_AES_INIT_KEY,0), "AES_INIT_KEY"}, {ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"}, +{ERR_PACK(0,EVP_F_EVP_ADD_CIPHER,0), "EVP_add_cipher"}, +{ERR_PACK(0,EVP_F_EVP_ADD_DIGEST,0), "EVP_add_digest"}, {ERR_PACK(0,EVP_F_EVP_CIPHERINIT,0), "EVP_CipherInit"}, {ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_CTRL,0), "EVP_CIPHER_CTX_ctrl"}, {ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH,0), "EVP_CIPHER_CTX_set_key_length"}, {ERR_PACK(0,EVP_F_EVP_DECRYPTFINAL,0), "EVP_DecryptFinal"}, {ERR_PACK(0,EVP_F_EVP_DIGESTINIT,0), "EVP_DigestInit"}, {ERR_PACK(0,EVP_F_EVP_ENCRYPTFINAL,0), "EVP_EncryptFinal"}, +{ERR_PACK(0,EVP_F_EVP_GET_CIPHERBYNAME,0), "EVP_get_cipherbyname"}, +{ERR_PACK(0,EVP_F_EVP_GET_DIGESTBYNAME,0), "EVP_get_digestbyname"}, {ERR_PACK(0,EVP_F_EVP_MD_CTX_COPY,0), "EVP_MD_CTX_copy"}, {ERR_PACK(0,EVP_F_EVP_OPENINIT,0), "EVP_OpenInit"}, {ERR_PACK(0,EVP_F_EVP_PBE_ALG_ADD,0), "EVP_PBE_alg_add"}, @@ -99,6 +104,7 @@ static ERR_STRING_DATA EVP_str_functs[]= static ERR_STRING_DATA EVP_str_reasons[]= { +{EVP_R_AES_KEY_SETUP_FAILED ,"aes key setup failed"}, {EVP_R_BAD_BLOCK_LENGTH ,"bad block length"}, {EVP_R_BAD_DECRYPT ,"bad decrypt"}, {EVP_R_BAD_KEY_LENGTH ,"bad key length"}, @@ -110,6 +116,7 @@ static ERR_STRING_DATA EVP_str_reasons[]= {EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH ,"data not multiple of block length"}, {EVP_R_DECODE_ERROR ,"decode error"}, {EVP_R_DIFFERENT_KEY_TYPES ,"different key types"}, +{EVP_R_DISABLED_FOR_FIPS ,"disabled for fips"}, {EVP_R_ENCODE_ERROR ,"encode error"}, {EVP_R_EVP_PBE_CIPHERINIT_ERROR ,"evp pbe cipherinit error"}, {EVP_R_EXPECTING_AN_RSA_KEY ,"expecting an rsa key"}, diff --git a/src/lib/libssl/src/crypto/evp/evp_lib.c b/src/lib/libssl/src/crypto/evp/evp_lib.c index 52a3b287be..a63ba19317 100644 --- a/src/lib/libssl/src/crypto/evp/evp_lib.c +++ b/src/lib/libssl/src/crypto/evp/evp_lib.c @@ -68,7 +68,7 @@ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type) if (c->cipher->set_asn1_parameters != NULL) ret=c->cipher->set_asn1_parameters(c,type); else - ret=1; + return -1; return(ret); } @@ -79,7 +79,7 @@ int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type) if (c->cipher->get_asn1_parameters != NULL) ret=c->cipher->get_asn1_parameters(c,type); else - ret=1; + return -1; return(ret); } @@ -133,6 +133,30 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx) return NID_rc4; + case NID_aes_128_cfb128: + case NID_aes_128_cfb8: + case NID_aes_128_cfb1: + + return NID_aes_128_cfb128; + + case NID_aes_192_cfb128: + case NID_aes_192_cfb8: + case NID_aes_192_cfb1: + + return NID_aes_192_cfb128; + + case NID_aes_256_cfb128: + case NID_aes_256_cfb8: + case NID_aes_256_cfb1: + + return NID_aes_256_cfb128; + + case NID_des_cfb64: + case NID_des_cfb8: + case NID_des_cfb1: + + return NID_des_cfb64; + default: /* Check it has an OID and it is valid */ otmp = OBJ_nid2obj(nid); diff --git a/src/lib/libssl/src/crypto/evp/evp_locl.h b/src/lib/libssl/src/crypto/evp/evp_locl.h index 4d81a3bf4c..f8c5343620 100644 --- a/src/lib/libssl/src/crypto/evp/evp_locl.h +++ b/src/lib/libssl/src/crypto/evp/evp_locl.h @@ -90,7 +90,7 @@ static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns } #define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \ -static int cname##_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ +static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ {\ cprefix##_cfb##cbits##_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\ return 1;\ @@ -127,7 +127,7 @@ BLOCK_CIPHER_def1(cname, cbc, cbc, CBC, kstruct, nid, block_size, key_len, \ #define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \ iv_len, cbits, flags, init_key, cleanup, \ set_asn1, get_asn1, ctrl) \ -BLOCK_CIPHER_def1(cname, cfb##cbits, cfb, CFB, kstruct, nid, 1, \ +BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, 1, \ key_len, iv_len, flags, init_key, cleanup, set_asn1, \ get_asn1, ctrl) @@ -225,3 +225,28 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; } get_asn1, ctrl) #define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data) + +#define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len,flags) \ + BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \ + BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \ + NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \ + flags, cipher##_init_key, NULL, \ + EVP_CIPHER_set_asn1_iv, \ + EVP_CIPHER_get_asn1_iv, \ + NULL) + +#ifdef OPENSSL_FIPS +#define RC2_set_key private_RC2_set_key +#define RC4_set_key private_RC4_set_key +#define CAST_set_key private_CAST_set_key +#define RC5_32_set_key private_RC5_32_set_key +#define BF_set_key private_BF_set_key +#define idea_set_encrypt_key private_idea_set_encrypt_key + +#define MD5_Init private_MD5_Init +#define MD4_Init private_MD4_Init +#define MD2_Init private_MD2_Init +#define MDC2_Init private_MDC2_Init +#define SHA_Init private_SHA_Init + +#endif diff --git a/src/lib/libssl/src/crypto/evp/evp_pkey.c b/src/lib/libssl/src/crypto/evp/evp_pkey.c index eb481ec661..47a69932a5 100644 --- a/src/lib/libssl/src/crypto/evp/evp_pkey.c +++ b/src/lib/libssl/src/crypto/evp/evp_pkey.c @@ -235,7 +235,11 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken) return NULL; } p8->broken = broken; - ASN1_INTEGER_set (p8->version, 0); + if (!ASN1_INTEGER_set(p8->version, 0)) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + PKCS8_PRIV_KEY_INFO_free (p8); + return NULL; + } if (!(p8->pkeyalg->parameter = ASN1_TYPE_new ())) { EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); PKCS8_PRIV_KEY_INFO_free (p8); @@ -303,29 +307,35 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken) #ifndef OPENSSL_NO_DSA static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) { - ASN1_STRING *params; - ASN1_INTEGER *prkey; - ASN1_TYPE *ttmp; - STACK_OF(ASN1_TYPE) *ndsa; - unsigned char *p, *q; + ASN1_STRING *params = NULL; + ASN1_INTEGER *prkey = NULL; + ASN1_TYPE *ttmp = NULL; + STACK_OF(ASN1_TYPE) *ndsa = NULL; + unsigned char *p = NULL, *q; int len; p8->pkeyalg->algorithm = OBJ_nid2obj(NID_dsa); len = i2d_DSAparams (pkey->pkey.dsa, NULL); if (!(p = OPENSSL_malloc(len))) { EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); - PKCS8_PRIV_KEY_INFO_free (p8); - return 0; + goto err; } q = p; i2d_DSAparams (pkey->pkey.dsa, &q); - params = ASN1_STRING_new(); - ASN1_STRING_set(params, p, len); + if (!(params = ASN1_STRING_new())) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } + if (!ASN1_STRING_set(params, p, len)) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } OPENSSL_free(p); + p = NULL; /* Get private key into integer */ if (!(prkey = BN_to_ASN1_INTEGER (pkey->pkey.dsa->priv_key, NULL))) { EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); - return 0; + goto err; } switch(p8->broken) { @@ -336,12 +346,13 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) if (!ASN1_pack_string((char *)prkey, i2d_ASN1_INTEGER, &p8->pkey->value.octet_string)) { EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); - M_ASN1_INTEGER_free (prkey); - return 0; + goto err; } M_ASN1_INTEGER_free (prkey); + prkey = NULL; p8->pkeyalg->parameter->value.sequence = params; + params = NULL; p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; break; @@ -349,32 +360,51 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) case PKCS8_NS_DB: p8->pkeyalg->parameter->value.sequence = params; + params = NULL; p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; - ndsa = sk_ASN1_TYPE_new_null(); - ttmp = ASN1_TYPE_new(); - if (!(ttmp->value.integer = BN_to_ASN1_INTEGER (pkey->pkey.dsa->pub_key, NULL))) { + if (!(ndsa = sk_ASN1_TYPE_new_null())) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } + if (!(ttmp = ASN1_TYPE_new())) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } + if (!(ttmp->value.integer = + BN_to_ASN1_INTEGER(pkey->pkey.dsa->pub_key, NULL))) { EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); - PKCS8_PRIV_KEY_INFO_free(p8); - return 0; + goto err; } ttmp->type = V_ASN1_INTEGER; - sk_ASN1_TYPE_push(ndsa, ttmp); + if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } - ttmp = ASN1_TYPE_new(); + if (!(ttmp = ASN1_TYPE_new())) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } ttmp->value.integer = prkey; + prkey = NULL; ttmp->type = V_ASN1_INTEGER; - sk_ASN1_TYPE_push(ndsa, ttmp); + if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } + ttmp = NULL; - p8->pkey->value.octet_string = ASN1_OCTET_STRING_new(); + if (!(p8->pkey->value.octet_string = ASN1_OCTET_STRING_new())) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } if (!ASN1_seq_pack_ASN1_TYPE(ndsa, i2d_ASN1_TYPE, &p8->pkey->value.octet_string->data, &p8->pkey->value.octet_string->length)) { EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); - M_ASN1_INTEGER_free(prkey); - return 0; + goto err; } sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); break; @@ -382,31 +412,57 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) case PKCS8_EMBEDDED_PARAM: p8->pkeyalg->parameter->type = V_ASN1_NULL; - ndsa = sk_ASN1_TYPE_new_null(); - ttmp = ASN1_TYPE_new(); + if (!(ndsa = sk_ASN1_TYPE_new_null())) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } + if (!(ttmp = ASN1_TYPE_new())) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } ttmp->value.sequence = params; + params = NULL; ttmp->type = V_ASN1_SEQUENCE; - sk_ASN1_TYPE_push(ndsa, ttmp); + if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } - ttmp = ASN1_TYPE_new(); + if (!(ttmp = ASN1_TYPE_new())) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } ttmp->value.integer = prkey; + prkey = NULL; ttmp->type = V_ASN1_INTEGER; - sk_ASN1_TYPE_push(ndsa, ttmp); + if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } + ttmp = NULL; - p8->pkey->value.octet_string = ASN1_OCTET_STRING_new(); + if (!(p8->pkey->value.octet_string = ASN1_OCTET_STRING_new())) { + EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); + goto err; + } if (!ASN1_seq_pack_ASN1_TYPE(ndsa, i2d_ASN1_TYPE, &p8->pkey->value.octet_string->data, &p8->pkey->value.octet_string->length)) { EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); - M_ASN1_INTEGER_free (prkey); - return 0; + goto err; } sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); break; } return 1; +err: + if (p != NULL) OPENSSL_free(p); + if (params != NULL) ASN1_STRING_free(params); + if (prkey != NULL) M_ASN1_INTEGER_free(prkey); + if (ttmp != NULL) ASN1_TYPE_free(ttmp); + if (ndsa != NULL) sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); + return 0; } #endif diff --git a/src/lib/libssl/src/crypto/evp/evp_test.c b/src/lib/libssl/src/crypto/evp/evp_test.c index 28460173f7..a624cfd248 100644 --- a/src/lib/libssl/src/crypto/evp/evp_test.c +++ b/src/lib/libssl/src/crypto/evp/evp_test.c @@ -136,7 +136,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, const unsigned char *iv,int in, const unsigned char *plaintext,int pn, const unsigned char *ciphertext,int cn, - int encdec) + int encdec,int multiplier) { EVP_CIPHER_CTX ctx; unsigned char out[4096]; @@ -162,22 +162,25 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, if(!EVP_EncryptInit_ex(&ctx,c,NULL,key,iv)) { fprintf(stderr,"EncryptInit failed\n"); + ERR_print_errors_fp(stderr); test1_exit(10); } EVP_CIPHER_CTX_set_padding(&ctx,0); - if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn)) + if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn*multiplier)) { fprintf(stderr,"Encrypt failed\n"); + ERR_print_errors_fp(stderr); test1_exit(6); } if(!EVP_EncryptFinal_ex(&ctx,out+outl,&outl2)) { fprintf(stderr,"EncryptFinal failed\n"); + ERR_print_errors_fp(stderr); test1_exit(7); } - if(outl+outl2 != cn) + if(outl+outl2 != cn*multiplier) { fprintf(stderr,"Ciphertext length mismatch got %d expected %d\n", outl+outl2,cn); @@ -198,22 +201,25 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, if(!EVP_DecryptInit_ex(&ctx,c,NULL,key,iv)) { fprintf(stderr,"DecryptInit failed\n"); + ERR_print_errors_fp(stderr); test1_exit(11); } EVP_CIPHER_CTX_set_padding(&ctx,0); - if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn)) + if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn*multiplier)) { fprintf(stderr,"Decrypt failed\n"); + ERR_print_errors_fp(stderr); test1_exit(6); } if(!EVP_DecryptFinal_ex(&ctx,out+outl,&outl2)) { fprintf(stderr,"DecryptFinal failed\n"); + ERR_print_errors_fp(stderr); test1_exit(7); } - if(outl+outl2 != cn) + if(outl+outl2 != cn*multiplier) { fprintf(stderr,"Plaintext length mismatch got %d expected %d\n", outl+outl2,cn); @@ -238,7 +244,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn, const unsigned char *iv,int in, const unsigned char *plaintext,int pn, const unsigned char *ciphertext,int cn, - int encdec) + int encdec,int multiplier) { const EVP_CIPHER *c; @@ -246,7 +252,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn, if(!c) return 0; - test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec); + test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec,multiplier); return 1; } @@ -272,16 +278,19 @@ static int test_digest(const char *digest, if(!EVP_DigestInit_ex(&ctx,d, NULL)) { fprintf(stderr,"DigestInit failed\n"); + ERR_print_errors_fp(stderr); EXIT(100); } if(!EVP_DigestUpdate(&ctx,plaintext,pn)) { fprintf(stderr,"DigestUpdate failed\n"); + ERR_print_errors_fp(stderr); EXIT(101); } if(!EVP_DigestFinal_ex(&ctx,md,&mdn)) { fprintf(stderr,"DigestFinal failed\n"); + ERR_print_errors_fp(stderr); EXIT(101); } EVP_MD_CTX_cleanup(&ctx); @@ -359,6 +368,7 @@ int main(int argc,char **argv) unsigned char *iv,*key,*plaintext,*ciphertext; int encdec; int kn,in,pn,cn; + int multiplier=1; if(!fgets((char *)line,sizeof line,f)) break; @@ -383,7 +393,15 @@ int main(int argc,char **argv) pn=convert(plaintext); cn=convert(ciphertext); - if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec) + if(strchr(cipher,'*')) + { + p=cipher; + sstrsep(&p,"*"); + multiplier=atoi(sstrsep(&p,"*")); + } + + if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec, + multiplier) && !test_digest(cipher,plaintext,pn,ciphertext,cn)) { fprintf(stderr,"Can't find %s\n",cipher); diff --git a/src/lib/libssl/src/crypto/evp/evptests.txt b/src/lib/libssl/src/crypto/evp/evptests.txt index 80bd9c7765..dfe91a5bc0 100644 --- a/src/lib/libssl/src/crypto/evp/evptests.txt +++ b/src/lib/libssl/src/crypto/evp/evptests.txt @@ -92,7 +92,102 @@ AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000 AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:F58C4C04D6E5F1BA779EABFB5F7BFBD6:AE2D8A571E03AC9C9EB76FAC45AF8E51:9CFC4E967EDB808D679F777BC6702C7D AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:9CFC4E967EDB808D679F777BC6702C7D:30C81C46A35CE411E5FBC1191A0A52EF:39F23369A9D9BACFA530E26304231461 AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39F23369A9D9BACFA530E26304231461:F69F2445DF4F9B17AD2B417BE66C3710:B2EB05E2C39BE9FCDA6C19078C6A9D1B -# We don't support CFB{1,8}-AESxxx.{En,De}crypt + +# CFB1-AES128.Encrypt + +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:1 +# all of the above packed into one... +# in: 0110 1011 1100 0001 = 6bc1 +# out: 0110 1000 1011 0011 = 68b3 +AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:1 + +# CFB1-AES128.Decrypt +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:0 +# all of the above packed into one... +# in: 0110 1000 1011 0011 = 68b3 +# out: 0110 1011 1100 0001 = 6bc1 +AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:0 + +# TODO: CFB1-AES192 and 256 + +# CFB8-AES128.Encrypt + +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:1 +# all of the above packed into one +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:1 + +# CFB8-AES128.Decrypt + +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:0 +# all of the above packed into one +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:0 + +# TODO: 192 and 256 bit keys + # For all CFB128 encrypts and decrypts, the transformed sequence is # AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec # CFB128-AES128.Encrypt @@ -174,6 +269,16 @@ DESX-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363 # DES EDE3 CBC tests (from destest) DES-EDE3-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363534333231204E6F77206973207468652074696D6520666F722000000000:3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D41C673812CFDE9675 +# DES CFB1 from FIPS 81 +# plaintext: 0100 1110 0110 1111 0111 0111 = 4e6f77 +# ciphertext: 1100 1101 0001 1110 1100 1001 = cd1ec9 + +DES-CFB1*8:0123456789abcdef:1234567890abcdef:4e6f77:cd1ec9 + +# DES CFB8 from FIPS 81 + +DES-CFB8:0123456789abcdef:1234567890abcdef:4e6f7720697320746865:f31fda07011462ee187f + # RC4 tests (from rc4test) RC4:0123456789abcdef0123456789abcdef::0123456789abcdef:75b7878099e0c596 RC4:0123456789abcdef0123456789abcdef::0000000000000000:7494c2e7104b0879 diff --git a/src/lib/libssl/src/crypto/evp/m_dss.c b/src/lib/libssl/src/crypto/evp/m_dss.c index beb8d7fc5c..d393eb3400 100644 --- a/src/lib/libssl/src/crypto/evp/m_dss.c +++ b/src/lib/libssl/src/crypto/evp/m_dss.c @@ -77,7 +77,7 @@ static const EVP_MD dsa_md= NID_dsaWithSHA, NID_dsaWithSHA, SHA_DIGEST_LENGTH, - 0, + EVP_MD_FLAG_FIPS, init, update, final, diff --git a/src/lib/libssl/src/crypto/evp/m_md2.c b/src/lib/libssl/src/crypto/evp/m_md2.c index 50914c83b3..0df48e5199 100644 --- a/src/lib/libssl/src/crypto/evp/m_md2.c +++ b/src/lib/libssl/src/crypto/evp/m_md2.c @@ -60,6 +60,7 @@ #include #include "cryptlib.h" #include +#include "evp_locl.h" #include #include #include diff --git a/src/lib/libssl/src/crypto/evp/m_md4.c b/src/lib/libssl/src/crypto/evp/m_md4.c index e19b663754..0605e4b707 100644 --- a/src/lib/libssl/src/crypto/evp/m_md4.c +++ b/src/lib/libssl/src/crypto/evp/m_md4.c @@ -60,6 +60,7 @@ #include #include "cryptlib.h" #include +#include "evp_locl.h" #include #include #include diff --git a/src/lib/libssl/src/crypto/evp/m_md5.c b/src/lib/libssl/src/crypto/evp/m_md5.c index b00a03e048..752615d473 100644 --- a/src/lib/libssl/src/crypto/evp/m_md5.c +++ b/src/lib/libssl/src/crypto/evp/m_md5.c @@ -60,6 +60,7 @@ #include #include "cryptlib.h" #include +#include "evp_locl.h" #include #include #include diff --git a/src/lib/libssl/src/crypto/evp/m_mdc2.c b/src/lib/libssl/src/crypto/evp/m_mdc2.c index 9f6467c931..62de1336b8 100644 --- a/src/lib/libssl/src/crypto/evp/m_mdc2.c +++ b/src/lib/libssl/src/crypto/evp/m_mdc2.c @@ -60,6 +60,7 @@ #include #include "cryptlib.h" #include +#include "evp_locl.h" #include #include #include diff --git a/src/lib/libssl/src/crypto/evp/m_sha.c b/src/lib/libssl/src/crypto/evp/m_sha.c index 10697c7ed3..d1785e5f74 100644 --- a/src/lib/libssl/src/crypto/evp/m_sha.c +++ b/src/lib/libssl/src/crypto/evp/m_sha.c @@ -56,10 +56,11 @@ * [including the GNU Public Licence.] */ -#ifndef OPENSSL_NO_SHA +#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) #include #include "cryptlib.h" #include +#include "evp_locl.h" #include #include diff --git a/src/lib/libssl/src/crypto/evp/m_sha1.c b/src/lib/libssl/src/crypto/evp/m_sha1.c index d6be3502f0..fe4402389a 100644 --- a/src/lib/libssl/src/crypto/evp/m_sha1.c +++ b/src/lib/libssl/src/crypto/evp/m_sha1.c @@ -77,7 +77,7 @@ static const EVP_MD sha1_md= NID_sha1, NID_sha1WithRSAEncryption, SHA_DIGEST_LENGTH, - 0, + EVP_MD_FLAG_FIPS, init, update, final, diff --git a/src/lib/libssl/src/crypto/evp/names.c b/src/lib/libssl/src/crypto/evp/names.c index eb9f4329cd..7712453046 100644 --- a/src/lib/libssl/src/crypto/evp/names.c +++ b/src/lib/libssl/src/crypto/evp/names.c @@ -61,6 +61,9 @@ #include #include #include +#ifdef OPENSSL_FIPS +#include +#endif int EVP_add_cipher(const EVP_CIPHER *c) { diff --git a/src/lib/libssl/src/crypto/hmac/Makefile b/src/lib/libssl/src/crypto/hmac/Makefile new file mode 100644 index 0000000000..f634dab79d --- /dev/null +++ b/src/lib/libssl/src/crypto/hmac/Makefile @@ -0,0 +1,99 @@ +# +# SSLeay/crypto/md/Makefile +# + +DIR= hmac +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=hmactest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=hmac.c +LIBOBJ=hmac.o + +SRC= $(LIBSRC) + +EXHEADER= hmac.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +hmac.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +hmac.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +hmac.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +hmac.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +hmac.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +hmac.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hmac.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +hmac.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h +hmac.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +hmac.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +hmac.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +hmac.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +hmac.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +hmac.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +hmac.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +hmac.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +hmac.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +hmac.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +hmac.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +hmac.o: ../cryptlib.h hmac.c diff --git a/src/lib/libssl/src/crypto/hmac/hmac.c b/src/lib/libssl/src/crypto/hmac/hmac.c index 4c91f919d5..06ee80761f 100644 --- a/src/lib/libssl/src/crypto/hmac/hmac.c +++ b/src/lib/libssl/src/crypto/hmac/hmac.c @@ -77,6 +77,15 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, if (key != NULL) { +#ifdef OPENSSL_FIPS + if (FIPS_mode() && !(md->flags & EVP_MD_FLAG_FIPS) + && (!(ctx->md_ctx.flags & EVP_MD_CTX_FLAG_NON_FIPS_ALLOW) + || !(ctx->i_ctx.flags & EVP_MD_CTX_FLAG_NON_FIPS_ALLOW) + || !(ctx->o_ctx.flags & EVP_MD_CTX_FLAG_NON_FIPS_ALLOW))) + OpenSSLDie(__FILE__,__LINE__, + "HMAC: digest not allowed in FIPS mode"); +#endif + reset=1; j=EVP_MD_block_size(md); OPENSSL_assert(j <= sizeof ctx->key); @@ -171,3 +180,10 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, return(md); } +void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags) + { + EVP_MD_CTX_set_flags(&ctx->i_ctx, flags); + EVP_MD_CTX_set_flags(&ctx->o_ctx, flags); + EVP_MD_CTX_set_flags(&ctx->md_ctx, flags); + } + diff --git a/src/lib/libssl/src/crypto/hmac/hmac.h b/src/lib/libssl/src/crypto/hmac/hmac.h index 0364a1fcbd..294ab3b36a 100644 --- a/src/lib/libssl/src/crypto/hmac/hmac.h +++ b/src/lib/libssl/src/crypto/hmac/hmac.h @@ -98,6 +98,7 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, const unsigned char *d, int n, unsigned char *md, unsigned int *md_len); +void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); #ifdef __cplusplus } diff --git a/src/lib/libssl/src/crypto/idea/Makefile b/src/lib/libssl/src/crypto/idea/Makefile new file mode 100644 index 0000000000..f652783027 --- /dev/null +++ b/src/lib/libssl/src/crypto/idea/Makefile @@ -0,0 +1,92 @@ +# +# SSLeay/crypto/idea/Makefile +# + +DIR= idea +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=ideatest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c +LIBOBJ=i_cbc.o i_cfb64.o i_ofb64.o i_ecb.o i_skey.o + +SRC= $(LIBSRC) + +EXHEADER= idea.h +HEADER= idea_lcl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +i_cbc.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_cbc.o: i_cbc.c idea_lcl.h +i_cfb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_cfb64.o: i_cfb64.c idea_lcl.h +i_ecb.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_ecb.o: ../../include/openssl/opensslv.h i_ecb.c idea_lcl.h +i_ofb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_ofb64.o: i_ofb64.c idea_lcl.h +i_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +i_skey.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h +i_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +i_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +i_skey.o: i_skey.c idea_lcl.h diff --git a/src/lib/libssl/src/crypto/idea/idea.h b/src/lib/libssl/src/crypto/idea/idea.h index 67132414ee..bf41844fd7 100644 --- a/src/lib/libssl/src/crypto/idea/idea.h +++ b/src/lib/libssl/src/crypto/idea/idea.h @@ -82,6 +82,10 @@ typedef struct idea_key_st const char *idea_options(void); void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, IDEA_KEY_SCHEDULE *ks); +#ifdef OPENSSL_FIPS +void private_idea_set_encrypt_key(const unsigned char *key, + IDEA_KEY_SCHEDULE *ks); +#endif void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, diff --git a/src/lib/libssl/src/crypto/krb5/Makefile b/src/lib/libssl/src/crypto/krb5/Makefile new file mode 100644 index 0000000000..25cc695e8d --- /dev/null +++ b/src/lib/libssl/src/crypto/krb5/Makefile @@ -0,0 +1,88 @@ +# +# OpenSSL/krb5/Makefile +# + +DIR= krb5 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= krb5_asn.c + +LIBOBJ= krb5_asn.o + +SRC= $(LIBSRC) + +EXHEADER= krb5_asn.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +krb5_asn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +krb5_asn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +krb5_asn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +krb5_asn.o: ../../include/openssl/krb5_asn.h +krb5_asn.o: ../../include/openssl/opensslconf.h +krb5_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +krb5_asn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +krb5_asn.o: ../../include/openssl/symhacks.h krb5_asn.c diff --git a/src/lib/libssl/src/crypto/lhash/Makefile b/src/lib/libssl/src/crypto/lhash/Makefile new file mode 100644 index 0000000000..d325a1644d --- /dev/null +++ b/src/lib/libssl/src/crypto/lhash/Makefile @@ -0,0 +1,91 @@ +# +# SSLeay/crypto/lhash/Makefile +# + +DIR= lhash +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=lhash.c lh_stats.c +LIBOBJ=lhash.o lh_stats.o + +SRC= $(LIBSRC) + +EXHEADER= lhash.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +lh_stats.o: ../../e_os.h ../../include/openssl/bio.h +lh_stats.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +lh_stats.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +lh_stats.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +lh_stats.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +lh_stats.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +lh_stats.o: ../cryptlib.h lh_stats.c +lhash.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +lhash.o: ../../include/openssl/e_os2.h ../../include/openssl/lhash.h +lhash.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +lhash.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +lhash.o: ../../include/openssl/symhacks.h lhash.c diff --git a/src/lib/libssl/src/crypto/md2/Makefile b/src/lib/libssl/src/crypto/md2/Makefile new file mode 100644 index 0000000000..90628511da --- /dev/null +++ b/src/lib/libssl/src/crypto/md2/Makefile @@ -0,0 +1,93 @@ +# +# SSLeay/crypto/md/Makefile +# + +DIR= md2 +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=md2test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=md2_dgst.c md2_one.c +LIBOBJ=md2_dgst.o md2_one.o + +SRC= $(LIBSRC) + +EXHEADER= md2.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +md2_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +md2_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md2_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +md2_dgst.o: ../../include/openssl/md2.h ../../include/openssl/opensslconf.h +md2_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md2_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md2_dgst.o: md2_dgst.c +md2_one.o: ../../e_os.h ../../include/openssl/bio.h +md2_one.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +md2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md2_one.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +md2_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +md2_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +md2_one.o: ../../include/openssl/symhacks.h ../cryptlib.h md2_one.c diff --git a/src/lib/libssl/src/crypto/md2/md2.h b/src/lib/libssl/src/crypto/md2/md2.h index ad9241455c..d0ef9da08e 100644 --- a/src/lib/libssl/src/crypto/md2/md2.h +++ b/src/lib/libssl/src/crypto/md2/md2.h @@ -80,6 +80,9 @@ typedef struct MD2state_st } MD2_CTX; const char *MD2_options(void); +#ifdef OPENSSL_FIPS +int private_MD2_Init(MD2_CTX *c); +#endif int MD2_Init(MD2_CTX *c); int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len); int MD2_Final(unsigned char *md, MD2_CTX *c); diff --git a/src/lib/libssl/src/crypto/md2/md2_dgst.c b/src/lib/libssl/src/crypto/md2/md2_dgst.c index ecb64f0ec4..8124acd687 100644 --- a/src/lib/libssl/src/crypto/md2/md2_dgst.c +++ b/src/lib/libssl/src/crypto/md2/md2_dgst.c @@ -62,6 +62,8 @@ #include #include #include +#include +#include const char *MD2_version="MD2" OPENSSL_VERSION_PTEXT; @@ -116,7 +118,7 @@ const char *MD2_options(void) return("md2(int)"); } -int MD2_Init(MD2_CTX *c) +FIPS_NON_FIPS_MD_Init(MD2) { c->num=0; memset(c->state,0,sizeof c->state); diff --git a/src/lib/libssl/src/crypto/md32_common.h b/src/lib/libssl/src/crypto/md32_common.h index 573850b122..733da6acaf 100644 --- a/src/lib/libssl/src/crypto/md32_common.h +++ b/src/lib/libssl/src/crypto/md32_common.h @@ -128,6 +128,10 @@ * */ +#include +#include +#include + #if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN) #error "DATA_ORDER must be defined!" #endif @@ -207,7 +211,7 @@ : "cc"); \ ret; \ }) -# elif defined(__powerpc) || defined(__ppc) +# elif defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) # define ROTATE(a,n) ({ register unsigned int ret; \ asm ( \ "rlwinm %0,%1,%2,0,31" \ @@ -555,6 +559,14 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c) static const unsigned char end[4]={0x80,0x00,0x00,0x00}; const unsigned char *cp=end; +#if 0 + if(FIPS_mode() && !FIPS_md5_allowed()) + { + FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_NON_FIPS_METHOD); + return 0; + } +#endif + /* c->num should definitly have room for at least one more byte. */ p=c->data; i=c->num>>2; diff --git a/src/lib/libssl/src/crypto/md4/Makefile b/src/lib/libssl/src/crypto/md4/Makefile new file mode 100644 index 0000000000..0b7c8d7ad8 --- /dev/null +++ b/src/lib/libssl/src/crypto/md4/Makefile @@ -0,0 +1,92 @@ +# +# SSLeay/crypto/md4/Makefile +# + +DIR= md4 +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=md4test.c +APPS=md4.c + +LIB=$(TOP)/libcrypto.a +LIBSRC=md4_dgst.c md4_one.c +LIBOBJ=md4_dgst.o md4_one.o + +SRC= $(LIBSRC) + +EXHEADER= md4.h +HEADER= md4_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/mx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +md4_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +md4_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md4_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +md4_dgst.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h +md4_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md4_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md4_dgst.o: ../md32_common.h md4_dgst.c md4_locl.h +md4_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +md4_one.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h +md4_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md4_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md4_one.o: md4_one.c diff --git a/src/lib/libssl/src/crypto/md4/md4.h b/src/lib/libssl/src/crypto/md4/md4.h index 7a7b23682f..7e761efb62 100644 --- a/src/lib/libssl/src/crypto/md4/md4.h +++ b/src/lib/libssl/src/crypto/md4/md4.h @@ -104,6 +104,9 @@ typedef struct MD4state_st int num; } MD4_CTX; +#ifdef OPENSSL_FIPS +int private_MD4_Init(MD4_CTX *c); +#endif int MD4_Init(MD4_CTX *c); int MD4_Update(MD4_CTX *c, const void *data, unsigned long len); int MD4_Final(unsigned char *md, MD4_CTX *c); diff --git a/src/lib/libssl/src/crypto/md4/md4_dgst.c b/src/lib/libssl/src/crypto/md4/md4_dgst.c index 7afb7185b6..ee7cc72262 100644 --- a/src/lib/libssl/src/crypto/md4/md4_dgst.c +++ b/src/lib/libssl/src/crypto/md4/md4_dgst.c @@ -70,7 +70,7 @@ const char *MD4_version="MD4" OPENSSL_VERSION_PTEXT; #define INIT_DATA_C (unsigned long)0x98badcfeL #define INIT_DATA_D (unsigned long)0x10325476L -int MD4_Init(MD4_CTX *c) +FIPS_NON_FIPS_MD_Init(MD4) { c->A=INIT_DATA_A; c->B=INIT_DATA_B; diff --git a/src/lib/libssl/src/crypto/md5/Makefile b/src/lib/libssl/src/crypto/md5/Makefile new file mode 100644 index 0000000000..832446fff2 --- /dev/null +++ b/src/lib/libssl/src/crypto/md5/Makefile @@ -0,0 +1,128 @@ +# +# SSLeay/crypto/md5/Makefile +# + +DIR= md5 +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES=-I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +MD5_ASM_OBJ= + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=md5test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=md5_dgst.c md5_one.c +LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ) + +SRC= $(LIBSRC) + +EXHEADER= md5.h +HEADER= md5_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/mx86-elf.s: asm/md5-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) md5-586.pl elf $(CFLAGS) > mx86-elf.s) + +# a.out +asm/mx86-out.o: asm/mx86unix.cpp + $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o + +# bsdi +asm/mx86bsdi.o: asm/mx86unix.cpp + $(CPP) -DBSDI asm/mx86unix.cpp | sed 's/ :/:/' | as -o asm/mx86bsdi.o + +asm/mx86unix.cpp: asm/md5-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) md5-586.pl cpp >mx86unix.cpp) + +asm/md5-sparcv8plus.o: asm/md5-sparcv9.S + $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \ + -o asm/md5-sparcv8plus.o asm/md5-sparcv9.S + +# Old GNU assembler doesn't understand V9 instructions, so we +# hire /usr/ccs/bin/as to do the job. Note that option is called +# *-gcc27, but even gcc 2>=8 users may experience similar problem +# if they didn't bother to upgrade GNU assembler. Such users should +# not choose this option, but be adviced to *remove* GNU assembler +# or upgrade it. +asm/md5-sparcv8plus-gcc27.o: asm/md5-sparcv9.S + $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -E asm/md5-sparcv9.S | \ + /usr/ccs/bin/as -xarch=v8plus - -o asm/md5-sparcv8plus-gcc27.o + +asm/md5-sparcv9.o: asm/md5-sparcv9.S + $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \ + -o asm/md5-sparcv9.o asm/md5-sparcv9.S + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/mx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +md5_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +md5_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md5_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +md5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h +md5_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md5_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md5_dgst.o: ../md32_common.h md5_dgst.c md5_locl.h +md5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +md5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h +md5_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +md5_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +md5_one.o: md5_one.c diff --git a/src/lib/libssl/src/crypto/md5/md5.h b/src/lib/libssl/src/crypto/md5/md5.h index a252e02115..c663dd1816 100644 --- a/src/lib/libssl/src/crypto/md5/md5.h +++ b/src/lib/libssl/src/crypto/md5/md5.h @@ -104,6 +104,9 @@ typedef struct MD5state_st int num; } MD5_CTX; +#ifdef OPENSSL_FIPS +int private_MD5_Init(MD5_CTX *c); +#endif int MD5_Init(MD5_CTX *c); int MD5_Update(MD5_CTX *c, const void *data, unsigned long len); int MD5_Final(unsigned char *md, MD5_CTX *c); diff --git a/src/lib/libssl/src/crypto/md5/md5_dgst.c b/src/lib/libssl/src/crypto/md5/md5_dgst.c index 9c7abc3697..54b33c6509 100644 --- a/src/lib/libssl/src/crypto/md5/md5_dgst.c +++ b/src/lib/libssl/src/crypto/md5/md5_dgst.c @@ -70,7 +70,7 @@ const char *MD5_version="MD5" OPENSSL_VERSION_PTEXT; #define INIT_DATA_C (unsigned long)0x98badcfeL #define INIT_DATA_D (unsigned long)0x10325476L -int MD5_Init(MD5_CTX *c) +FIPS_NON_FIPS_MD_Init(MD5) { c->A=INIT_DATA_A; c->B=INIT_DATA_B; diff --git a/src/lib/libssl/src/crypto/mdc2/Makefile b/src/lib/libssl/src/crypto/mdc2/Makefile new file mode 100644 index 0000000000..38c785bf95 --- /dev/null +++ b/src/lib/libssl/src/crypto/mdc2/Makefile @@ -0,0 +1,98 @@ +# +# SSLeay/crypto/mdc2/Makefile +# + +DIR= mdc2 +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= mdc2test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=mdc2dgst.c mdc2_one.c +LIBOBJ=mdc2dgst.o mdc2_one.o + +SRC= $(LIBSRC) + +EXHEADER= mdc2.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +mdc2_one.o: ../../e_os.h ../../include/openssl/bio.h +mdc2_one.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +mdc2_one.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +mdc2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +mdc2_one.o: ../../include/openssl/lhash.h ../../include/openssl/mdc2.h +mdc2_one.o: ../../include/openssl/opensslconf.h +mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +mdc2_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +mdc2_one.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +mdc2_one.o: ../cryptlib.h mdc2_one.c +mdc2dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +mdc2dgst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +mdc2dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +mdc2dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +mdc2dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/opensslconf.h +mdc2dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +mdc2dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +mdc2dgst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +mdc2dgst.o: mdc2dgst.c diff --git a/src/lib/libssl/src/crypto/mdc2/mdc2.h b/src/lib/libssl/src/crypto/mdc2/mdc2.h index 793a8a0f13..4cba101f37 100644 --- a/src/lib/libssl/src/crypto/mdc2/mdc2.h +++ b/src/lib/libssl/src/crypto/mdc2/mdc2.h @@ -80,7 +80,9 @@ typedef struct mdc2_ctx_st int pad_type; /* either 1 or 2, default 1 */ } MDC2_CTX; - +#ifdef OPENSSL_FIPS +int private_MDC2_Init(MDC2_CTX *c); +#endif int MDC2_Init(MDC2_CTX *c); int MDC2_Update(MDC2_CTX *c, const unsigned char *data, unsigned long len); int MDC2_Final(unsigned char *md, MDC2_CTX *c); diff --git a/src/lib/libssl/src/crypto/o_str.c b/src/lib/libssl/src/crypto/o_str.c new file mode 100644 index 0000000000..da8860491d --- /dev/null +++ b/src/lib/libssl/src/crypto/o_str.c @@ -0,0 +1,96 @@ +/* crypto/o_str.c -*- mode:C; c-file-style: "eay" -*- */ +/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL + * project 2003. + */ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + +#include +#include +#include "o_str.h" + +int OPENSSL_strncasecmp(const char *str1, const char *str2, size_t n) + { +#if defined(OPENSSL_IMPLEMENTS_strncasecmp) + while (*str1 && *str2 && n) + { + int res = toupper(*str1) - toupper(*str2); + if (res) return res < 0 ? -1 : 1; + str1++; + str2++; + n--; + } + if (n == 0) + return 0; + if (*str1) + return 1; + if (*str2) + return -1; + return 0; +#else + /* Recursion hazard warning! Whenever strncasecmp is #defined as + * OPENSSL_strncasecmp, OPENSSL_IMPLEMENTS_strncasecmp must be + * defined as well. */ + return strncasecmp(str1, str2, n); +#endif + } +int OPENSSL_strcasecmp(const char *str1, const char *str2) + { +#if defined(OPENSSL_IMPLEMENTS_strncasecmp) + return OPENSSL_strncasecmp(str1, str2, (size_t)-1); +#else + return strcasecmp(str1, str2); +#endif + } + diff --git a/src/lib/libssl/src/crypto/o_str.h b/src/lib/libssl/src/crypto/o_str.h new file mode 100644 index 0000000000..4a70a9e00b --- /dev/null +++ b/src/lib/libssl/src/crypto/o_str.h @@ -0,0 +1,67 @@ +/* crypto/o_str.h -*- mode:C; c-file-style: "eay" -*- */ +/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL + * project 2003. + */ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * licensing@OpenSSL.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + +#ifndef HEADER_O_STR_H +#define HEADER_O_STR_H + +#include /* to get size_t */ + +int OPENSSL_strcasecmp(const char *str1, const char *str2); +int OPENSSL_strncasecmp(const char *str1, const char *str2, size_t n); + +#endif diff --git a/src/lib/libssl/src/crypto/o_time.c b/src/lib/libssl/src/crypto/o_time.c index 785468131e..e29091d650 100644 --- a/src/lib/libssl/src/crypto/o_time.c +++ b/src/lib/libssl/src/crypto/o_time.c @@ -114,16 +114,28 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) return NULL; logvalue[reslen] = '\0'; + t = *timer; + +/* The following is extracted from the DEC C header time.h */ +/* +** Beginning in OpenVMS Version 7.0 mktime, time, ctime, strftime +** have two implementations. One implementation is provided +** for compatibility and deals with time in terms of local time, +** the other __utc_* deals with time in terms of UTC. +*/ +/* We use the same conditions as in said time.h to check if we should + assume that t contains local time (and should therefore be adjusted) + or UTC (and should therefore be left untouched). */ +#if __CRTL_VER < 70000000 || defined _VMS_V6_SOURCE /* Get the numerical value of the equivalence string */ status = atoi(logvalue); /* and use it to move time to GMT */ - t = *timer - status; + t -= status; +#endif /* then convert the result to the time structure */ -#ifndef OPENSSL_THREADS - ts=(struct tm *)localtime(&t); -#else + /* Since there was no gmtime_r() to do this stuff for us, we have to do it the hard way. */ { @@ -198,7 +210,6 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) result->tm_isdst = 0; /* There's no way to know... */ ts = result; -#endif } } #endif diff --git a/src/lib/libssl/src/crypto/objects/Makefile b/src/lib/libssl/src/crypto/objects/Makefile new file mode 100644 index 0000000000..e449147129 --- /dev/null +++ b/src/lib/libssl/src/crypto/objects/Makefile @@ -0,0 +1,122 @@ +# +# SSLeay/crypto/objects/Makefile +# + +DIR= objects +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r +PERL= perl + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= o_names.c obj_dat.c obj_lib.c obj_err.c +LIBOBJ= o_names.o obj_dat.o obj_lib.o obj_err.o + +SRC= $(LIBSRC) + +EXHEADER= objects.h obj_mac.h +HEADER= $(EXHEADER) obj_dat.h + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: obj_dat.h lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +obj_dat.h: obj_dat.pl obj_mac.h + $(PERL) obj_dat.pl obj_mac.h obj_dat.h + +# objects.pl both reads and writes obj_mac.num +obj_mac.h: objects.pl objects.txt obj_mac.num + $(PERL) objects.pl objects.txt obj_mac.num obj_mac.h + @sleep 1; touch obj_mac.h; sleep 1 + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +o_names.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +o_names.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +o_names.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +o_names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +o_names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +o_names.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +o_names.o: ../../include/openssl/symhacks.h o_names.c +obj_dat.o: ../../e_os.h ../../include/openssl/asn1.h +obj_dat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +obj_dat.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +obj_dat.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +obj_dat.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +obj_dat.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +obj_dat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +obj_dat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +obj_dat.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_dat.c obj_dat.h +obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +obj_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +obj_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +obj_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +obj_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +obj_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +obj_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +obj_err.o: ../../include/openssl/symhacks.h obj_err.c +obj_lib.o: ../../e_os.h ../../include/openssl/asn1.h +obj_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +obj_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +obj_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +obj_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +obj_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +obj_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +obj_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +obj_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_lib.c diff --git a/src/lib/libssl/src/crypto/objects/o_names.c b/src/lib/libssl/src/crypto/objects/o_names.c index b4453b4a98..28c9370ca3 100644 --- a/src/lib/libssl/src/crypto/objects/o_names.c +++ b/src/lib/libssl/src/crypto/objects/o_names.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -80,7 +81,11 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), MemCheck_off(); name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS)); MemCheck_on(); - if (!name_funcs) return(0); + if (!name_funcs) + { + OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX,ERR_R_MALLOC_FAILURE); + return(0); + } name_funcs->hash_func = lh_strhash; name_funcs->cmp_func = OPENSSL_strcmp; name_funcs->free_func = 0; /* NULL is often declared to diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.c b/src/lib/libssl/src/crypto/objects/obj_dat.c index 4534dc0985..f549d078ef 100644 --- a/src/lib/libssl/src/crypto/objects/obj_dat.c +++ b/src/lib/libssl/src/crypto/objects/obj_dat.c @@ -236,13 +236,13 @@ int OBJ_add_object(const ASN1_OBJECT *obj) if (added == NULL) if (!init_added()) return(0); if ((o=OBJ_dup(obj)) == NULL) goto err; - if (!(ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err; + if (!(ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2; if ((o->length != 0) && (obj->data != NULL)) - ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); + if (!(ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2; if (o->sn != NULL) - ao[ADDED_SNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); + if (!(ao[ADDED_SNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2; if (o->ln != NULL) - ao[ADDED_LNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); + if (!(ao[ADDED_LNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2; for (i=ADDED_DATA; i<=ADDED_NID; i++) { @@ -260,6 +260,8 @@ int OBJ_add_object(const ASN1_OBJECT *obj) ASN1_OBJECT_FLAG_DYNAMIC_DATA); return(o->nid); +err2: + OBJerr(OBJ_F_OBJ_ADD_OBJECT,ERR_R_MALLOC_FAILURE); err: for (i=ADDED_DATA; i<=ADDED_NID; i++) if (ao[i] != NULL) OPENSSL_free(ao[i]); @@ -648,7 +650,7 @@ int OBJ_create(const char *oid, const char *sn, const char *ln) if ((buf=(unsigned char *)OPENSSL_malloc(i)) == NULL) { - OBJerr(OBJ_F_OBJ_CREATE,OBJ_R_MALLOC_FAILURE); + OBJerr(OBJ_F_OBJ_CREATE,ERR_R_MALLOC_FAILURE); return(0); } i=a2d_ASN1_OBJECT(buf,i,oid,-1); diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.h b/src/lib/libssl/src/crypto/objects/obj_dat.h index 969b18a341..8785127055 100644 --- a/src/lib/libssl/src/crypto/objects/obj_dat.h +++ b/src/lib/libssl/src/crypto/objects/obj_dat.h @@ -62,12 +62,12 @@ * [including the GNU Public Licence.] */ -#define NUM_NID 650 -#define NUM_SN 643 -#define NUM_LN 643 -#define NUM_OBJ 617 +#define NUM_NID 668 +#define NUM_SN 660 +#define NUM_LN 660 +#define NUM_OBJ 624 -static unsigned char lvalues[4455]={ +static unsigned char lvalues[4500]={ 0x00, /* [ 0] OBJ_undef */ 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ @@ -685,6 +685,13 @@ static unsigned char lvalues[4455]={ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x06,/* [4425] OBJ_rsaOAEPEncryptionSET */ 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x02,/* [4434] OBJ_ms_smartcard_login */ 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x03,/* [4444] OBJ_ms_upn */ +0x55,0x04,0x09, /* [4454] OBJ_streetAddress */ +0x55,0x04,0x11, /* [4457] OBJ_postalCode */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x15, /* [4460] OBJ_id_ppl */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0E, /* [4467] OBJ_proxyCertInfo */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x00, /* [4475] OBJ_id_ppl_anyLanguage */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x01, /* [4483] OBJ_id_ppl_inheritAll */ +0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x02, /* [4491] OBJ_Independent */ }; static ASN1_OBJECT nid_objs[NUM_NID]={ @@ -1728,20 +1735,47 @@ static ASN1_OBJECT nid_objs[NUM_NID]={ 10,&(lvalues[4434]),0}, {"msUPN","Microsoft Universal Principal Name",NID_ms_upn,10, &(lvalues[4444]),0}, +{"AES-128-CFB1","aes-128-cfb1",NID_aes_128_cfb1,0,NULL}, +{"AES-192-CFB1","aes-192-cfb1",NID_aes_192_cfb1,0,NULL}, +{"AES-256-CFB1","aes-256-cfb1",NID_aes_256_cfb1,0,NULL}, +{"AES-128-CFB8","aes-128-cfb8",NID_aes_128_cfb8,0,NULL}, +{"AES-192-CFB8","aes-192-cfb8",NID_aes_192_cfb8,0,NULL}, +{"AES-256-CFB8","aes-256-cfb8",NID_aes_256_cfb8,0,NULL}, +{"DES-CFB1","des-cfb1",NID_des_cfb1,0,NULL}, +{"DES-CFB8","des-cfb8",NID_des_cfb8,0,NULL}, +{"DES-EDE3-CFB1","des-ede3-cfb1",NID_des_ede3_cfb1,0,NULL}, +{"DES-EDE3-CFB8","des-ede3-cfb8",NID_des_ede3_cfb8,0,NULL}, +{"streetAddress","streetAddress",NID_streetAddress,3,&(lvalues[4454]),0}, +{"postalCode","postalCode",NID_postalCode,3,&(lvalues[4457]),0}, +{"id-ppl","id-ppl",NID_id_ppl,7,&(lvalues[4460]),0}, +{"proxyCertInfo","Proxy Certificate Information",NID_proxyCertInfo,8, + &(lvalues[4467]),0}, +{"id-ppl-anyLanguage","Any language",NID_id_ppl_anyLanguage,8, + &(lvalues[4475]),0}, +{"id-ppl-inheritAll","Inherit all",NID_id_ppl_inheritAll,8, + &(lvalues[4483]),0}, +{NULL,NULL,NID_undef,0,NULL}, +{"id-ppl-independent","Independent",NID_Independent,8,&(lvalues[4491]),0}, }; static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[364]),/* "AD_DVCS" */ &(nid_objs[419]),/* "AES-128-CBC" */ &(nid_objs[421]),/* "AES-128-CFB" */ +&(nid_objs[650]),/* "AES-128-CFB1" */ +&(nid_objs[653]),/* "AES-128-CFB8" */ &(nid_objs[418]),/* "AES-128-ECB" */ &(nid_objs[420]),/* "AES-128-OFB" */ &(nid_objs[423]),/* "AES-192-CBC" */ &(nid_objs[425]),/* "AES-192-CFB" */ +&(nid_objs[651]),/* "AES-192-CFB1" */ +&(nid_objs[654]),/* "AES-192-CFB8" */ &(nid_objs[422]),/* "AES-192-ECB" */ &(nid_objs[424]),/* "AES-192-OFB" */ &(nid_objs[427]),/* "AES-256-CBC" */ &(nid_objs[429]),/* "AES-256-CFB" */ +&(nid_objs[652]),/* "AES-256-CFB1" */ +&(nid_objs[655]),/* "AES-256-CFB8" */ &(nid_objs[426]),/* "AES-256-ECB" */ &(nid_objs[428]),/* "AES-256-OFB" */ &(nid_objs[91]),/* "BF-CBC" */ @@ -1762,6 +1796,8 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[31]),/* "DES-CBC" */ &(nid_objs[643]),/* "DES-CDMF" */ &(nid_objs[30]),/* "DES-CFB" */ +&(nid_objs[656]),/* "DES-CFB1" */ +&(nid_objs[657]),/* "DES-CFB8" */ &(nid_objs[29]),/* "DES-ECB" */ &(nid_objs[32]),/* "DES-EDE" */ &(nid_objs[43]),/* "DES-EDE-CBC" */ @@ -1770,6 +1806,8 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[33]),/* "DES-EDE3" */ &(nid_objs[44]),/* "DES-EDE3-CBC" */ &(nid_objs[61]),/* "DES-EDE3-CFB" */ +&(nid_objs[658]),/* "DES-EDE3-CFB1" */ +&(nid_objs[659]),/* "DES-EDE3-CFB8" */ &(nid_objs[63]),/* "DES-EDE3-OFB" */ &(nid_objs[45]),/* "DES-OFB" */ &(nid_objs[80]),/* "DESX-CBC" */ @@ -2022,6 +2060,10 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[271]),/* "id-pkix1-explicit-93" */ &(nid_objs[270]),/* "id-pkix1-implicit-88" */ &(nid_objs[272]),/* "id-pkix1-implicit-93" */ +&(nid_objs[662]),/* "id-ppl" */ +&(nid_objs[664]),/* "id-ppl-anyLanguage" */ +&(nid_objs[667]),/* "id-ppl-independent" */ +&(nid_objs[665]),/* "id-ppl-inheritAll" */ &(nid_objs[267]),/* "id-qcs" */ &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ &(nid_objs[259]),/* "id-qt" */ @@ -2186,6 +2228,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ &(nid_objs[47]),/* "pkcs9" */ &(nid_objs[401]),/* "policyConstraints" */ +&(nid_objs[661]),/* "postalCode" */ &(nid_objs[406]),/* "prime-field" */ &(nid_objs[409]),/* "prime192v1" */ &(nid_objs[410]),/* "prime192v2" */ @@ -2196,6 +2239,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[415]),/* "prime256v1" */ &(nid_objs[385]),/* "private" */ &(nid_objs[84]),/* "privateKeyUsagePeriod" */ +&(nid_objs[663]),/* "proxyCertInfo" */ &(nid_objs[510]),/* "pseudonym" */ &(nid_objs[435]),/* "pss" */ &(nid_objs[286]),/* "qcStatements" */ @@ -2355,6 +2399,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[454]),/* "simpleSecurityObject" */ &(nid_objs[496]),/* "singleLevelQuality" */ &(nid_objs[387]),/* "snmpv2" */ +&(nid_objs[660]),/* "streetAddress" */ &(nid_objs[85]),/* "subjectAltName" */ &(nid_objs[398]),/* "subjectInfoAccess" */ &(nid_objs[82]),/* "subjectKeyIdentifier" */ @@ -2380,6 +2425,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[363]),/* "AD Time Stamping" */ &(nid_objs[405]),/* "ANSI X9.62" */ &(nid_objs[368]),/* "Acceptable OCSP Responses" */ +&(nid_objs[664]),/* "Any language" */ &(nid_objs[177]),/* "Authority Information Access" */ &(nid_objs[365]),/* "Basic OCSP Response" */ &(nid_objs[285]),/* "Biometric Info" */ @@ -2402,6 +2448,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[296]),/* "IPSec User" */ &(nid_objs[182]),/* "ISO Member Body" */ &(nid_objs[183]),/* "ISO US Member Body" */ +&(nid_objs[667]),/* "Independent" */ +&(nid_objs[665]),/* "Inherit all" */ &(nid_objs[142]),/* "Invalidity Date" */ &(nid_objs[504]),/* "MIME MHS" */ &(nid_objs[388]),/* "Mail" */ @@ -2442,6 +2490,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[164]),/* "Policy Qualifier CPS" */ &(nid_objs[165]),/* "Policy Qualifier User Notice" */ &(nid_objs[385]),/* "Private" */ +&(nid_objs[663]),/* "Proxy Certificate Information" */ &(nid_objs[ 1]),/* "RSA Data Security, Inc." */ &(nid_objs[ 2]),/* "RSA Data Security, Inc. PKCS" */ &(nid_objs[188]),/* "S/MIME" */ @@ -2485,14 +2534,20 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[606]),/* "additional verification" */ &(nid_objs[419]),/* "aes-128-cbc" */ &(nid_objs[421]),/* "aes-128-cfb" */ +&(nid_objs[650]),/* "aes-128-cfb1" */ +&(nid_objs[653]),/* "aes-128-cfb8" */ &(nid_objs[418]),/* "aes-128-ecb" */ &(nid_objs[420]),/* "aes-128-ofb" */ &(nid_objs[423]),/* "aes-192-cbc" */ &(nid_objs[425]),/* "aes-192-cfb" */ +&(nid_objs[651]),/* "aes-192-cfb1" */ +&(nid_objs[654]),/* "aes-192-cfb8" */ &(nid_objs[422]),/* "aes-192-ecb" */ &(nid_objs[424]),/* "aes-192-ofb" */ &(nid_objs[427]),/* "aes-256-cbc" */ &(nid_objs[429]),/* "aes-256-cfb" */ +&(nid_objs[652]),/* "aes-256-cfb1" */ +&(nid_objs[655]),/* "aes-256-cfb8" */ &(nid_objs[426]),/* "aes-256-ecb" */ &(nid_objs[428]),/* "aes-256-ofb" */ &(nid_objs[376]),/* "algorithm" */ @@ -2531,6 +2586,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[31]),/* "des-cbc" */ &(nid_objs[643]),/* "des-cdmf" */ &(nid_objs[30]),/* "des-cfb" */ +&(nid_objs[656]),/* "des-cfb1" */ +&(nid_objs[657]),/* "des-cfb8" */ &(nid_objs[29]),/* "des-ecb" */ &(nid_objs[32]),/* "des-ede" */ &(nid_objs[43]),/* "des-ede-cbc" */ @@ -2539,6 +2596,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[33]),/* "des-ede3" */ &(nid_objs[44]),/* "des-ede3-cbc" */ &(nid_objs[61]),/* "des-ede3-cfb" */ +&(nid_objs[658]),/* "des-ede3-cfb1" */ +&(nid_objs[659]),/* "des-ede3-cfb8" */ &(nid_objs[63]),/* "des-ede3-ofb" */ &(nid_objs[45]),/* "des-ofb" */ &(nid_objs[107]),/* "description" */ @@ -2668,6 +2727,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[271]),/* "id-pkix1-explicit-93" */ &(nid_objs[270]),/* "id-pkix1-implicit-88" */ &(nid_objs[272]),/* "id-pkix1-implicit-93" */ +&(nid_objs[662]),/* "id-ppl" */ &(nid_objs[267]),/* "id-qcs" */ &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ &(nid_objs[259]),/* "id-qt" */ @@ -2831,6 +2891,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[22]),/* "pkcs7-signedData" */ &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ &(nid_objs[47]),/* "pkcs9" */ +&(nid_objs[661]),/* "postalCode" */ &(nid_objs[406]),/* "prime-field" */ &(nid_objs[409]),/* "prime192v1" */ &(nid_objs[410]),/* "prime192v2" */ @@ -3003,6 +3064,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[454]),/* "simpleSecurityObject" */ &(nid_objs[496]),/* "singleLevelQuality" */ &(nid_objs[16]),/* "stateOrProvinceName" */ +&(nid_objs[660]),/* "streetAddress" */ &(nid_objs[498]),/* "subtreeMaximumQuality" */ &(nid_objs[497]),/* "subtreeMinimumQuality" */ &(nid_objs[100]),/* "surname" */ @@ -3046,10 +3108,12 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[14]),/* OBJ_countryName 2 5 4 6 */ &(nid_objs[15]),/* OBJ_localityName 2 5 4 7 */ &(nid_objs[16]),/* OBJ_stateOrProvinceName 2 5 4 8 */ +&(nid_objs[660]),/* OBJ_streetAddress 2 5 4 9 */ &(nid_objs[17]),/* OBJ_organizationName 2 5 4 10 */ &(nid_objs[18]),/* OBJ_organizationalUnitName 2 5 4 11 */ &(nid_objs[106]),/* OBJ_title 2 5 4 12 */ &(nid_objs[107]),/* OBJ_description 2 5 4 13 */ +&(nid_objs[661]),/* OBJ_postalCode 2 5 4 17 */ &(nid_objs[173]),/* OBJ_name 2 5 4 41 */ &(nid_objs[99]),/* OBJ_givenName 2 5 4 42 */ &(nid_objs[101]),/* OBJ_initials 2 5 4 43 */ @@ -3270,6 +3334,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[266]),/* OBJ_id_aca 1 3 6 1 5 5 7 10 */ &(nid_objs[267]),/* OBJ_id_qcs 1 3 6 1 5 5 7 11 */ &(nid_objs[268]),/* OBJ_id_cct 1 3 6 1 5 5 7 12 */ +&(nid_objs[662]),/* OBJ_id_ppl 1 3 6 1 5 5 7 21 */ &(nid_objs[176]),/* OBJ_id_ad 1 3 6 1 5 5 7 48 */ &(nid_objs[507]),/* OBJ_id_hex_partial_message 1 3 6 1 7 1 1 1 */ &(nid_objs[508]),/* OBJ_id_hex_multipart_message 1 3 6 1 7 1 1 2 */ @@ -3323,6 +3388,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[292]),/* OBJ_sbqp_routerIdentifier 1 3 6 1 5 5 7 1 9 */ &(nid_objs[397]),/* OBJ_ac_proxying 1 3 6 1 5 5 7 1 10 */ &(nid_objs[398]),/* OBJ_sinfo_access 1 3 6 1 5 5 7 1 11 */ +&(nid_objs[663]),/* OBJ_proxyCertInfo 1 3 6 1 5 5 7 1 14 */ &(nid_objs[164]),/* OBJ_id_qt_cps 1 3 6 1 5 5 7 2 1 */ &(nid_objs[165]),/* OBJ_id_qt_unotice 1 3 6 1 5 5 7 2 2 */ &(nid_objs[293]),/* OBJ_textNotice 1 3 6 1 5 5 7 2 3 */ @@ -3393,6 +3459,9 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[360]),/* OBJ_id_cct_crs 1 3 6 1 5 5 7 12 1 */ &(nid_objs[361]),/* OBJ_id_cct_PKIData 1 3 6 1 5 5 7 12 2 */ &(nid_objs[362]),/* OBJ_id_cct_PKIResponse 1 3 6 1 5 5 7 12 3 */ +&(nid_objs[664]),/* OBJ_id_ppl_anyLanguage 1 3 6 1 5 5 7 21 0 */ +&(nid_objs[665]),/* OBJ_id_ppl_inheritAll 1 3 6 1 5 5 7 21 1 */ +&(nid_objs[667]),/* OBJ_Independent 1 3 6 1 5 5 7 21 2 */ &(nid_objs[178]),/* OBJ_ad_OCSP 1 3 6 1 5 5 7 48 1 */ &(nid_objs[179]),/* OBJ_ad_ca_issuers 1 3 6 1 5 5 7 48 2 */ &(nid_objs[363]),/* OBJ_ad_timeStamping 1 3 6 1 5 5 7 48 3 */ diff --git a/src/lib/libssl/src/crypto/objects/obj_err.c b/src/lib/libssl/src/crypto/objects/obj_err.c index 80ab6855af..2b5f43e3cc 100644 --- a/src/lib/libssl/src/crypto/objects/obj_err.c +++ b/src/lib/libssl/src/crypto/objects/obj_err.c @@ -1,6 +1,6 @@ /* crypto/objects/obj_err.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -66,8 +66,10 @@ #ifndef OPENSSL_NO_ERR static ERR_STRING_DATA OBJ_str_functs[]= { +{ERR_PACK(0,OBJ_F_OBJ_ADD_OBJECT,0), "OBJ_add_object"}, {ERR_PACK(0,OBJ_F_OBJ_CREATE,0), "OBJ_create"}, {ERR_PACK(0,OBJ_F_OBJ_DUP,0), "OBJ_dup"}, +{ERR_PACK(0,OBJ_F_OBJ_NAME_NEW_INDEX,0), "OBJ_NAME_new_index"}, {ERR_PACK(0,OBJ_F_OBJ_NID2LN,0), "OBJ_nid2ln"}, {ERR_PACK(0,OBJ_F_OBJ_NID2OBJ,0), "OBJ_nid2obj"}, {ERR_PACK(0,OBJ_F_OBJ_NID2SN,0), "OBJ_nid2sn"}, diff --git a/src/lib/libssl/src/crypto/objects/obj_mac.h b/src/lib/libssl/src/crypto/objects/obj_mac.h index 7645012298..d28894cf41 100644 --- a/src/lib/libssl/src/crypto/objects/obj_mac.h +++ b/src/lib/libssl/src/crypto/objects/obj_mac.h @@ -950,6 +950,10 @@ #define NID_id_cct 268 #define OBJ_id_cct OBJ_id_pkix,12L +#define SN_id_ppl "id-ppl" +#define NID_id_ppl 662 +#define OBJ_id_ppl OBJ_id_pkix,21L + #define SN_id_ad "id-ad" #define NID_id_ad 176 #define OBJ_id_ad OBJ_id_pkix,48L @@ -1065,6 +1069,11 @@ #define NID_sinfo_access 398 #define OBJ_sinfo_access OBJ_id_pe,11L +#define SN_proxyCertInfo "proxyCertInfo" +#define LN_proxyCertInfo "Proxy Certificate Information" +#define NID_proxyCertInfo 663 +#define OBJ_proxyCertInfo OBJ_id_pe,14L + #define SN_id_qt_cps "id-qt-cps" #define LN_id_qt_cps "Policy Qualifier CPS" #define NID_id_qt_cps 164 @@ -1389,6 +1398,21 @@ #define NID_id_cct_PKIResponse 362 #define OBJ_id_cct_PKIResponse OBJ_id_cct,3L +#define SN_id_ppl_anyLanguage "id-ppl-anyLanguage" +#define LN_id_ppl_anyLanguage "Any language" +#define NID_id_ppl_anyLanguage 664 +#define OBJ_id_ppl_anyLanguage OBJ_id_ppl,0L + +#define SN_id_ppl_inheritAll "id-ppl-inheritAll" +#define LN_id_ppl_inheritAll "Inherit all" +#define NID_id_ppl_inheritAll 665 +#define OBJ_id_ppl_inheritAll OBJ_id_ppl,1L + +#define SN_Independent "id-ppl-independent" +#define LN_Independent "Independent" +#define NID_Independent 667 +#define OBJ_Independent OBJ_id_ppl,2L + #define SN_ad_OCSP "OCSP" #define LN_ad_OCSP "OCSP" #define NID_ad_OCSP 178 @@ -1619,6 +1643,10 @@ #define NID_stateOrProvinceName 16 #define OBJ_stateOrProvinceName OBJ_X509,8L +#define LN_streetAddress "streetAddress" +#define NID_streetAddress 660 +#define OBJ_streetAddress OBJ_X509,9L + #define SN_organizationName "O" #define LN_organizationName "organizationName" #define NID_organizationName 17 @@ -1637,6 +1665,10 @@ #define NID_description 107 #define OBJ_description OBJ_X509,13L +#define LN_postalCode "postalCode" +#define NID_postalCode 661 +#define OBJ_postalCode OBJ_X509,17L + #define SN_name "name" #define LN_name "name" #define NID_name 173 @@ -2009,6 +2041,46 @@ #define NID_aes_256_cfb128 429 #define OBJ_aes_256_cfb128 OBJ_aes,44L +#define SN_aes_128_cfb1 "AES-128-CFB1" +#define LN_aes_128_cfb1 "aes-128-cfb1" +#define NID_aes_128_cfb1 650 + +#define SN_aes_192_cfb1 "AES-192-CFB1" +#define LN_aes_192_cfb1 "aes-192-cfb1" +#define NID_aes_192_cfb1 651 + +#define SN_aes_256_cfb1 "AES-256-CFB1" +#define LN_aes_256_cfb1 "aes-256-cfb1" +#define NID_aes_256_cfb1 652 + +#define SN_aes_128_cfb8 "AES-128-CFB8" +#define LN_aes_128_cfb8 "aes-128-cfb8" +#define NID_aes_128_cfb8 653 + +#define SN_aes_192_cfb8 "AES-192-CFB8" +#define LN_aes_192_cfb8 "aes-192-cfb8" +#define NID_aes_192_cfb8 654 + +#define SN_aes_256_cfb8 "AES-256-CFB8" +#define LN_aes_256_cfb8 "aes-256-cfb8" +#define NID_aes_256_cfb8 655 + +#define SN_des_cfb1 "DES-CFB1" +#define LN_des_cfb1 "des-cfb1" +#define NID_des_cfb1 656 + +#define SN_des_cfb8 "DES-CFB8" +#define LN_des_cfb8 "des-cfb8" +#define NID_des_cfb8 657 + +#define SN_des_ede3_cfb1 "DES-EDE3-CFB1" +#define LN_des_ede3_cfb1 "des-ede3-cfb1" +#define NID_des_ede3_cfb1 658 + +#define SN_des_ede3_cfb8 "DES-EDE3-CFB8" +#define LN_des_ede3_cfb8 "des-ede3-cfb8" +#define NID_des_ede3_cfb8 659 + #define SN_hold_instruction_code "holdInstructionCode" #define LN_hold_instruction_code "Hold Instruction Code" #define NID_hold_instruction_code 430 diff --git a/src/lib/libssl/src/crypto/objects/obj_mac.num b/src/lib/libssl/src/crypto/objects/obj_mac.num index 9838072b65..0e64a929ba 100644 --- a/src/lib/libssl/src/crypto/objects/obj_mac.num +++ b/src/lib/libssl/src/crypto/objects/obj_mac.num @@ -647,3 +647,21 @@ joint_iso_itu_t 646 international_organizations 647 ms_smartcard_login 648 ms_upn 649 +aes_128_cfb1 650 +aes_192_cfb1 651 +aes_256_cfb1 652 +aes_128_cfb8 653 +aes_192_cfb8 654 +aes_256_cfb8 655 +des_cfb1 656 +des_cfb8 657 +des_ede3_cfb1 658 +des_ede3_cfb8 659 +streetAddress 660 +postalCode 661 +id_ppl 662 +proxyCertInfo 663 +id_ppl_anyLanguage 664 +id_ppl_inheritAll 665 +id_ppl_independent 666 +Independent 667 diff --git a/src/lib/libssl/src/crypto/objects/objects.h b/src/lib/libssl/src/crypto/objects/objects.h index de10532813..f859d859b8 100644 --- a/src/lib/libssl/src/crypto/objects/objects.h +++ b/src/lib/libssl/src/crypto/objects/objects.h @@ -1026,8 +1026,10 @@ void ERR_load_OBJ_strings(void); /* Error codes for the OBJ functions. */ /* Function codes. */ +#define OBJ_F_OBJ_ADD_OBJECT 105 #define OBJ_F_OBJ_CREATE 100 #define OBJ_F_OBJ_DUP 101 +#define OBJ_F_OBJ_NAME_NEW_INDEX 106 #define OBJ_F_OBJ_NID2LN 102 #define OBJ_F_OBJ_NID2OBJ 103 #define OBJ_F_OBJ_NID2SN 104 diff --git a/src/lib/libssl/src/crypto/objects/objects.txt b/src/lib/libssl/src/crypto/objects/objects.txt index 3ba11f65cc..50e9031e61 100644 --- a/src/lib/libssl/src/crypto/objects/objects.txt +++ b/src/lib/libssl/src/crypto/objects/objects.txt @@ -312,6 +312,7 @@ id-pkix 9 : id-pda id-pkix 10 : id-aca id-pkix 11 : id-qcs id-pkix 12 : id-cct +id-pkix 21 : id-ppl id-pkix 48 : id-ad # PKIX Modules @@ -346,6 +347,7 @@ id-pe 9 : sbqp-routerIdentifier id-pe 10 : ac-proxying !Cname sinfo-access id-pe 11 : subjectInfoAccess : Subject Information Access +id-pe 14 : proxyCertInfo : Proxy Certificate Information # PKIX policyQualifiers for Internet policy qualifiers id-qt 1 : id-qt-cps : Policy Qualifier CPS @@ -461,6 +463,11 @@ id-cct 1 : id-cct-crs id-cct 2 : id-cct-PKIData id-cct 3 : id-cct-PKIResponse +# Predefined Proxy Certificate policy languages +id-ppl 0 : id-ppl-anyLanguage : Any language +id-ppl 1 : id-ppl-inheritAll : Inherit all +id-ppl 2 : id-ppl-independent : Independent + # access descriptors for authority info access extension !Cname ad-OCSP id-ad 1 : OCSP : OCSP @@ -536,10 +543,12 @@ X509 5 : : serialNumber X509 6 : C : countryName X509 7 : L : localityName X509 8 : ST : stateOrProvinceName +X509 9 : : streetAddress X509 10 : O : organizationName X509 11 : OU : organizationalUnitName X509 12 : : title X509 13 : : description +X509 17 : : postalCode X509 41 : name : name X509 42 : GN : givenName X509 43 : : initials @@ -681,6 +690,19 @@ aes 43 : AES-256-OFB : aes-256-ofb !Cname aes-256-cfb128 aes 44 : AES-256-CFB : aes-256-cfb +# There are no OIDs for these modes... + + : AES-128-CFB1 : aes-128-cfb1 + : AES-192-CFB1 : aes-192-cfb1 + : AES-256-CFB1 : aes-256-cfb1 + : AES-128-CFB8 : aes-128-cfb8 + : AES-192-CFB8 : aes-192-cfb8 + : AES-256-CFB8 : aes-256-cfb8 + : DES-CFB1 : des-cfb1 + : DES-CFB8 : des-cfb8 + : DES-EDE3-CFB1 : des-ede3-cfb1 + : DES-EDE3-CFB8 : des-ede3-cfb8 + # Hold instruction CRL entry extension !Cname hold-instruction-code id-ce 23 : holdInstructionCode : Hold Instruction Code diff --git a/src/lib/libssl/src/crypto/ocsp/Makefile b/src/lib/libssl/src/crypto/ocsp/Makefile new file mode 100644 index 0000000000..59f7098d9e --- /dev/null +++ b/src/lib/libssl/src/crypto/ocsp/Makefile @@ -0,0 +1,291 @@ +# +# OpenSSL/ocsp/Makefile +# + +DIR= ocsp +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= ocsp_asn.c ocsp_ext.c ocsp_ht.c ocsp_lib.c ocsp_cl.c \ + ocsp_srv.c ocsp_prn.c ocsp_vfy.c ocsp_err.c + +LIBOBJ= ocsp_asn.o ocsp_ext.o ocsp_ht.o ocsp_lib.o ocsp_cl.o \ + ocsp_srv.o ocsp_prn.o ocsp_vfy.o ocsp_err.o + +SRC= $(LIBSRC) + +EXHEADER= ocsp.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +ocsp_asn.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_asn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +ocsp_asn.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_asn.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_asn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/evp.h +ocsp_asn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_asn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_asn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_asn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_asn.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_asn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_asn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_asn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_asn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_asn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_asn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_asn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_asn.o: ../../include/openssl/x509v3.h ocsp_asn.c +ocsp_cl.o: ../../e_os.h ../../include/openssl/aes.h +ocsp_cl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_cl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_cl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_cl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_cl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_cl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_cl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ocsp_cl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_cl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_cl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_cl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_cl.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_cl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +ocsp_cl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +ocsp_cl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +ocsp_cl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +ocsp_cl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_cl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_cl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_cl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_cl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_cl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_cl.o: ../../include/openssl/x509v3.h ../cryptlib.h ocsp_cl.c +ocsp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ocsp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_err.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_err.o: ../../include/openssl/x509v3.h ocsp_err.c +ocsp_ext.o: ../../e_os.h ../../include/openssl/aes.h +ocsp_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ocsp_ext.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_ext.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_ext.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_ext.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_ext.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_ext.o: ../../include/openssl/opensslconf.h +ocsp_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_ext.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +ocsp_ext.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +ocsp_ext.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +ocsp_ext.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +ocsp_ext.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +ocsp_ext.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ocsp_ext.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +ocsp_ext.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +ocsp_ext.o: ../cryptlib.h ocsp_ext.c +ocsp_ht.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_ht.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_ht.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_ht.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_ht.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_ht.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_ht.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_ht.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ocsp_ht.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_ht.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_ht.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_ht.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_ht.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_ht.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_ht.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_ht.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_ht.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_ht.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_ht.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_ht.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_ht.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_ht.o: ../../include/openssl/x509v3.h ocsp_ht.c +ocsp_lib.o: ../../e_os.h ../../include/openssl/aes.h +ocsp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ocsp_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_lib.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_lib.o: ../../include/openssl/opensslconf.h +ocsp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_lib.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +ocsp_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +ocsp_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +ocsp_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +ocsp_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +ocsp_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +ocsp_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ocsp_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +ocsp_lib.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +ocsp_lib.o: ../cryptlib.h ocsp_lib.c +ocsp_prn.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ocsp_prn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_prn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_prn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_prn.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_prn.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +ocsp_prn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_prn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_prn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_prn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_prn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_prn.o: ../../include/openssl/x509v3.h ocsp_prn.c +ocsp_srv.o: ../../e_os.h ../../include/openssl/aes.h +ocsp_srv.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_srv.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_srv.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_srv.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_srv.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_srv.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_srv.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ocsp_srv.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_srv.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_srv.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_srv.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_srv.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_srv.o: ../../include/openssl/opensslconf.h +ocsp_srv.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_srv.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +ocsp_srv.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +ocsp_srv.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +ocsp_srv.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +ocsp_srv.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +ocsp_srv.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +ocsp_srv.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ocsp_srv.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +ocsp_srv.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +ocsp_srv.o: ../cryptlib.h ocsp_srv.c +ocsp_vfy.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +ocsp_vfy.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_vfy.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_vfy.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_vfy.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_vfy.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_vfy.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ocsp_vfy.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +ocsp_vfy.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +ocsp_vfy.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +ocsp_vfy.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +ocsp_vfy.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ocsp_vfy.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +ocsp_vfy.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +ocsp_vfy.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +ocsp_vfy.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +ocsp_vfy.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ocsp_vfy.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ocsp_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +ocsp_vfy.o: ../../include/openssl/x509v3.h ocsp_vfy.c diff --git a/src/lib/libssl/src/crypto/opensslv.h b/src/lib/libssl/src/crypto/opensslv.h index 02f1710fb3..5d5f688edd 100644 --- a/src/lib/libssl/src/crypto/opensslv.h +++ b/src/lib/libssl/src/crypto/opensslv.h @@ -25,8 +25,12 @@ * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x0090704fL -#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7d 17 Mar 2004" +#define OPENSSL_VERSION_NUMBER 0x0090707fL +#ifdef OPENSSL_FIPS +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7g-fips 11 Apr 2005" +#else +#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7g 11 Apr 2005" +#endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT diff --git a/src/lib/libssl/src/crypto/pem/Makefile b/src/lib/libssl/src/crypto/pem/Makefile new file mode 100644 index 0000000000..f3dfea2ac8 --- /dev/null +++ b/src/lib/libssl/src/crypto/pem/Makefile @@ -0,0 +1,335 @@ +# +# SSLeay/crypto/pem/Makefile +# + +DIR= pem +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c \ + pem_x509.c pem_xaux.c pem_oth.c pem_pk8.c pem_pkey.c + +LIBOBJ= pem_sign.o pem_seal.o pem_info.o pem_lib.o pem_all.o pem_err.o \ + pem_x509.o pem_xaux.o pem_oth.o pem_pk8.o pem_pkey.o + +SRC= $(LIBSRC) + +EXHEADER= pem.h pem2.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +pem_all.o: ../../e_os.h ../../include/openssl/aes.h +pem_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_all.o: ../../include/openssl/fips.h ../../include/openssl/idea.h +pem_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pem_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pem_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pem_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pem_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_all.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_all.o: ../cryptlib.h pem_all.c +pem_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +pem_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pem_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pem_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pem_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pem_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pem_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pem_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pem_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pem_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pem_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pem_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_err.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_err.o: pem_err.c +pem_info.o: ../../e_os.h ../../include/openssl/aes.h +pem_info.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_info.o: ../../include/openssl/opensslconf.h +pem_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_info.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_info.o: ../cryptlib.h pem_info.c +pem_lib.o: ../../e_os.h ../../include/openssl/aes.h +pem_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +pem_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +pem_lib.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h +pem_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pem_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pem_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pem_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pem_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pem_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_lib.c +pem_oth.o: ../../e_os.h ../../include/openssl/aes.h +pem_oth.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_oth.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_oth.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_oth.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_oth.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_oth.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_oth.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_oth.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_oth.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_oth.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_oth.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_oth.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +pem_oth.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +pem_oth.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +pem_oth.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +pem_oth.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_oth.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_oth.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_oth.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_oth.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_oth.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_oth.o: ../cryptlib.h pem_oth.c +pem_pk8.o: ../../e_os.h ../../include/openssl/aes.h +pem_pk8.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_pk8.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_pk8.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_pk8.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_pk8.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_pk8.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_pk8.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_pk8.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_pk8.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_pk8.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_pk8.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_pk8.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +pem_pk8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +pem_pk8.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h +pem_pk8.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pem_pk8.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pem_pk8.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pem_pk8.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_pk8.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_pk8.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pem_pk8.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pem_pk8.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_pk8.c +pem_pkey.o: ../../e_os.h ../../include/openssl/aes.h +pem_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_pkey.o: ../../include/openssl/opensslconf.h +pem_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_pkey.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_pkey.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +pem_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +pem_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_pkey.o: ../cryptlib.h pem_pkey.c +pem_seal.o: ../../e_os.h ../../include/openssl/aes.h +pem_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_seal.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_seal.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_seal.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_seal.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_seal.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_seal.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_seal.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_seal.o: ../../include/openssl/opensslconf.h +pem_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_seal.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pem_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pem_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pem_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pem_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pem_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_seal.c +pem_sign.o: ../../e_os.h ../../include/openssl/aes.h +pem_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_sign.o: ../../include/openssl/opensslconf.h +pem_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_sign.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pem_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pem_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pem_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pem_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pem_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_sign.c +pem_x509.o: ../../e_os.h ../../include/openssl/aes.h +pem_x509.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_x509.o: ../../include/openssl/opensslconf.h +pem_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_x509.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_x509.o: ../cryptlib.h pem_x509.c +pem_xaux.o: ../../e_os.h ../../include/openssl/aes.h +pem_xaux.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_xaux.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_xaux.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_xaux.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_xaux.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_xaux.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_xaux.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_xaux.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pem_xaux.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pem_xaux.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pem_xaux.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_xaux.o: ../../include/openssl/opensslconf.h +pem_xaux.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_xaux.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_xaux.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pem_xaux.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pem_xaux.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pem_xaux.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_xaux.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pem_xaux.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pem_xaux.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pem_xaux.o: ../cryptlib.h pem_xaux.c diff --git a/src/lib/libssl/src/crypto/pem/pem_all.c b/src/lib/libssl/src/crypto/pem/pem_all.c index e72b7134ce..07963314c9 100644 --- a/src/lib/libssl/src/crypto/pem/pem_all.c +++ b/src/lib/libssl/src/crypto/pem/pem_all.c @@ -64,6 +64,7 @@ #include #include #include +#include #ifndef OPENSSL_NO_RSA static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa); @@ -128,7 +129,49 @@ RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb, #endif +#ifdef OPENSSL_FIPS + +int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc, + unsigned char *kstr, int klen, + pem_password_cb *cb, void *u) +{ + EVP_PKEY *k; + int ret; + k = EVP_PKEY_new(); + if (!k) + return 0; + EVP_PKEY_set1_RSA(k, x); + + ret = PEM_write_bio_PrivateKey(bp, k, enc, kstr, klen, cb, u); + EVP_PKEY_free(k); + return ret; +} + +#ifndef OPENSSL_NO_FP_API +int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc, + unsigned char *kstr, int klen, + pem_password_cb *cb, void *u) +{ + EVP_PKEY *k; + int ret; + k = EVP_PKEY_new(); + if (!k) + return 0; + + EVP_PKEY_set1_RSA(k, x); + + ret = PEM_write_PrivateKey(fp, k, enc, kstr, klen, cb, u); + EVP_PKEY_free(k); + return ret; +} +#endif + +#else + IMPLEMENT_PEM_write_cb(RSAPrivateKey, RSA, PEM_STRING_RSA, RSAPrivateKey) + +#endif + IMPLEMENT_PEM_rw(RSAPublicKey, RSA, PEM_STRING_RSA_PUBLIC, RSAPublicKey) IMPLEMENT_PEM_rw(RSA_PUBKEY, RSA, PEM_STRING_PUBLIC, RSA_PUBKEY) @@ -158,7 +201,48 @@ DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb, return pkey_get_dsa(pktmp, dsa); } + +#ifdef OPENSSL_FIPS + +int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, const EVP_CIPHER *enc, + unsigned char *kstr, int klen, + pem_password_cb *cb, void *u) +{ + EVP_PKEY *k; + int ret; + k = EVP_PKEY_new(); + if (!k) + return 0; + EVP_PKEY_set1_DSA(k, x); + + ret = PEM_write_bio_PrivateKey(bp, k, enc, kstr, klen, cb, u); + EVP_PKEY_free(k); + return ret; +} + +#ifndef OPENSSL_NO_FP_API +int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc, + unsigned char *kstr, int klen, + pem_password_cb *cb, void *u) +{ + EVP_PKEY *k; + int ret; + k = EVP_PKEY_new(); + if (!k) + return 0; + EVP_PKEY_set1_DSA(k, x); + ret = PEM_write_PrivateKey(fp, k, enc, kstr, klen, cb, u); + EVP_PKEY_free(k); + return ret; +} +#endif + +#else + IMPLEMENT_PEM_write_cb(DSAPrivateKey, DSA, PEM_STRING_DSA, DSAPrivateKey) + +#endif + IMPLEMENT_PEM_rw(DSA_PUBKEY, DSA, PEM_STRING_PUBLIC, DSA_PUBKEY) #ifndef OPENSSL_NO_FP_API @@ -190,7 +274,42 @@ IMPLEMENT_PEM_rw(DHparams, DH, PEM_STRING_DHPARAMS, DHparams) * (When reading, parameter PEM_STRING_EVP_PKEY is a wildcard for anything * appropriate.) */ + +#ifdef OPENSSL_FIPS + +int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, + unsigned char *kstr, int klen, + pem_password_cb *cb, void *u) + { + if (FIPS_mode()) + return PEM_write_bio_PKCS8PrivateKey(bp, x, enc, + (char *)kstr, klen, cb, u); + else + return PEM_ASN1_write_bio((int (*)())i2d_PrivateKey, + (((x)->type == EVP_PKEY_DSA)?PEM_STRING_DSA:PEM_STRING_RSA), + bp,(char *)x,enc,kstr,klen,cb,u); + } + +#ifndef OPENSSL_NO_FP_API +int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, + unsigned char *kstr, int klen, + pem_password_cb *cb, void *u) + { + if (FIPS_mode()) + return PEM_write_PKCS8PrivateKey(fp, x, enc, + (char *)kstr, klen, cb, u); + else + return PEM_ASN1_write((int (*)())i2d_PrivateKey, + (((x)->type == EVP_PKEY_DSA)?PEM_STRING_DSA:PEM_STRING_RSA), + fp,(char *)x,enc,kstr,klen,cb,u); + } +#endif + +#else + IMPLEMENT_PEM_write_cb(PrivateKey, EVP_PKEY, ((x->type == EVP_PKEY_DSA)?PEM_STRING_DSA:PEM_STRING_RSA), PrivateKey) +#endif + IMPLEMENT_PEM_rw(PUBKEY, EVP_PKEY, PEM_STRING_PUBLIC, PUBKEY) diff --git a/src/lib/libssl/src/crypto/pem/pem_lib.c b/src/lib/libssl/src/crypto/pem/pem_lib.c index 7785039b99..82815067b3 100644 --- a/src/lib/libssl/src/crypto/pem/pem_lib.c +++ b/src/lib/libssl/src/crypto/pem/pem_lib.c @@ -73,7 +73,7 @@ const char *PEM_version="PEM" OPENSSL_VERSION_PTEXT; #define MIN_LENGTH 4 -static int load_iv(unsigned char **fromp,unsigned char *to, int num); +static int load_iv(char **fromp,unsigned char *to, int num); static int check_pem(const char *nm, const char *name); int PEM_def_callback(char *buf, int num, int w, void *key) @@ -301,7 +301,7 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x, if ((dsize=i2d(x,NULL)) < 0) { - PEMerr(PEM_F_PEM_ASN1_WRITE_BIO,ERR_R_MALLOC_FAILURE); + PEMerr(PEM_F_PEM_ASN1_WRITE_BIO,ERR_R_ASN1_LIB); dsize=0; goto err; } @@ -432,6 +432,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) int o; const EVP_CIPHER *enc=NULL; char *p,c; + char **header_pp = &header; cipher->cipher=NULL; if ((header == NULL) || (*header == '\0') || (*header == '\n')) @@ -478,15 +479,16 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) PEMerr(PEM_F_PEM_GET_EVP_CIPHER_INFO,PEM_R_UNSUPPORTED_ENCRYPTION); return(0); } - if (!load_iv((unsigned char **)&header,&(cipher->iv[0]),enc->iv_len)) return(0); + if (!load_iv(header_pp,&(cipher->iv[0]),enc->iv_len)) + return(0); return(1); } -static int load_iv(unsigned char **fromp, unsigned char *to, int num) +static int load_iv(char **fromp, unsigned char *to, int num) { int v,i; - unsigned char *from; + char *from; from= *fromp; for (i=0; i> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +p12_add.o: ../../e_os.h ../../include/openssl/aes.h +p12_add.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_add.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_add.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_add.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_add.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_add.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_add.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_add.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_add.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_add.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_add.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_add.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_add.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_add.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_add.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_add.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_add.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_add.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_add.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_add.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_add.o: ../cryptlib.h p12_add.c +p12_asn.o: ../../e_os.h ../../include/openssl/aes.h +p12_asn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +p12_asn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p12_asn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p12_asn.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p12_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p12_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p12_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p12_asn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p12_asn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p12_asn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p12_asn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p12_asn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p12_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_asn.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_asn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_asn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_asn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_asn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_asn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_asn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_asn.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_asn.c +p12_attr.o: ../../e_os.h ../../include/openssl/aes.h +p12_attr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_attr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_attr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_attr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_attr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_attr.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_attr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_attr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_attr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_attr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_attr.o: ../../include/openssl/opensslconf.h +p12_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_attr.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_attr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_attr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_attr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_attr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_attr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_attr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_attr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_attr.c +p12_crpt.o: ../../e_os.h ../../include/openssl/aes.h +p12_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_crpt.o: ../../include/openssl/opensslconf.h +p12_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_crpt.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_crpt.c +p12_crt.o: ../../e_os.h ../../include/openssl/aes.h +p12_crt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_crt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_crt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_crt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_crt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_crt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_crt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_crt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_crt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_crt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_crt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_crt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_crt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_crt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_crt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_crt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_crt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_crt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_crt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_crt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_crt.o: ../cryptlib.h p12_crt.c +p12_decr.o: ../../e_os.h ../../include/openssl/aes.h +p12_decr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_decr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_decr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_decr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_decr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_decr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_decr.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_decr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_decr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_decr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_decr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_decr.o: ../../include/openssl/opensslconf.h +p12_decr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_decr.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_decr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_decr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_decr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_decr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_decr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_decr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_decr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_decr.c +p12_init.o: ../../e_os.h ../../include/openssl/aes.h +p12_init.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_init.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_init.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_init.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_init.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_init.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_init.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_init.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_init.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_init.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_init.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_init.o: ../../include/openssl/opensslconf.h +p12_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_init.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_init.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_init.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_init.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_init.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_init.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_init.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_init.c +p12_key.o: ../../e_os.h ../../include/openssl/aes.h +p12_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_key.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_key.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_key.o: ../cryptlib.h p12_key.c +p12_kiss.o: ../../e_os.h ../../include/openssl/aes.h +p12_kiss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_kiss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_kiss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_kiss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_kiss.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_kiss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_kiss.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_kiss.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_kiss.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_kiss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_kiss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_kiss.o: ../../include/openssl/opensslconf.h +p12_kiss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_kiss.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_kiss.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_kiss.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_kiss.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_kiss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_kiss.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_kiss.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_kiss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_kiss.c +p12_mutl.o: ../../e_os.h ../../include/openssl/aes.h +p12_mutl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_mutl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_mutl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_mutl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_mutl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_mutl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_mutl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_mutl.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h +p12_mutl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p12_mutl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p12_mutl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p12_mutl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p12_mutl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_mutl.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_mutl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +p12_mutl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_mutl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_mutl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_mutl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_mutl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_mutl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_mutl.o: ../cryptlib.h p12_mutl.c +p12_npas.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +p12_npas.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p12_npas.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p12_npas.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p12_npas.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p12_npas.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p12_npas.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +p12_npas.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p12_npas.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p12_npas.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p12_npas.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p12_npas.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p12_npas.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p12_npas.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +p12_npas.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +p12_npas.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p12_npas.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p12_npas.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p12_npas.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p12_npas.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p12_npas.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p12_npas.o: ../../include/openssl/x509_vfy.h p12_npas.c +p12_p8d.o: ../../e_os.h ../../include/openssl/aes.h +p12_p8d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_p8d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_p8d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_p8d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_p8d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_p8d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_p8d.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_p8d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_p8d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_p8d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_p8d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_p8d.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_p8d.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_p8d.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_p8d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_p8d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_p8d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_p8d.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_p8d.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_p8d.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_p8d.o: ../cryptlib.h p12_p8d.c +p12_p8e.o: ../../e_os.h ../../include/openssl/aes.h +p12_p8e.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_p8e.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_p8e.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_p8e.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_p8e.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_p8e.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_p8e.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_p8e.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_p8e.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_p8e.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_p8e.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_p8e.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_p8e.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_p8e.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_p8e.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_p8e.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_p8e.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_p8e.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_p8e.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_p8e.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_p8e.o: ../cryptlib.h p12_p8e.c +p12_utl.o: ../../e_os.h ../../include/openssl/aes.h +p12_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_utl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_utl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_utl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_utl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_utl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_utl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_utl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_utl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_utl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_utl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_utl.o: ../cryptlib.h p12_utl.c +pk12err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +pk12err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk12err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk12err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk12err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk12err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk12err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk12err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk12err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk12err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk12err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk12err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk12err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk12err.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +pk12err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pk12err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pk12err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pk12err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pk12err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pk12err.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pk12err.o: ../../include/openssl/x509_vfy.h pk12err.c diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_crpt.c b/src/lib/libssl/src/crypto/pkcs12/p12_crpt.c index 5e8958612b..003ec7a33e 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_crpt.c +++ b/src/lib/libssl/src/crypto/pkcs12/p12_crpt.c @@ -88,7 +88,7 @@ int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de) { PBEPARAM *pbe; - int saltlen, iter; + int saltlen, iter, ret; unsigned char *salt, *pbuf; unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH]; @@ -117,8 +117,8 @@ int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, return 0; } PBEPARAM_free(pbe); - EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de); + ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de); OPENSSL_cleanse(key, EVP_MAX_KEY_LENGTH); OPENSSL_cleanse(iv, EVP_MAX_IV_LENGTH); - return 1; + return ret; } diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_init.c b/src/lib/libssl/src/crypto/pkcs12/p12_init.c index eb837a78cf..5276b12669 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_init.c +++ b/src/lib/libssl/src/crypto/pkcs12/p12_init.c @@ -76,15 +76,17 @@ PKCS12 *PKCS12_init (int mode) if (!(pkcs12->authsafes->d.data = M_ASN1_OCTET_STRING_new())) { PKCS12err(PKCS12_F_PKCS12_INIT,ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } break; default: - PKCS12err(PKCS12_F_PKCS12_INIT,PKCS12_R_UNSUPPORTED_PKCS12_MODE); - PKCS12_free(pkcs12); - return NULL; - break; + PKCS12err(PKCS12_F_PKCS12_INIT, + PKCS12_R_UNSUPPORTED_PKCS12_MODE); + goto err; } return pkcs12; +err: + if (pkcs12 != NULL) PKCS12_free(pkcs12); + return NULL; } diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c b/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c index 885087ad00..2b31999e11 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c +++ b/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c @@ -249,14 +249,26 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, if (M_PKCS12_cert_bag_type(bag) != NID_x509Certificate ) return 1; if (!(x509 = PKCS12_certbag2x509(bag))) return 0; - if(ckid) X509_keyid_set1(x509, ckid->data, ckid->length); + if(ckid) + { + if (!X509_keyid_set1(x509, ckid->data, ckid->length)) + { + X509_free(x509); + return 0; + } + } if(fname) { - int len; + int len, r; unsigned char *data; len = ASN1_STRING_to_UTF8(&data, fname); if(len > 0) { - X509_alias_set1(x509, data, len); + r = X509_alias_set1(x509, data, len); OPENSSL_free(data); + if (!r) + { + X509_free(x509); + return 0; + } } } diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c b/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c index 0fb67f74b8..4886b9b289 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c +++ b/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c @@ -148,7 +148,10 @@ int PKCS12_setup_mac (PKCS12 *p12, int iter, unsigned char *salt, int saltlen, PKCS12err(PKCS12_F_PKCS12_SETUP_MAC, ERR_R_MALLOC_FAILURE); return 0; } - ASN1_INTEGER_set(p12->mac->iter, iter); + if (!ASN1_INTEGER_set(p12->mac->iter, iter)) { + PKCS12err(PKCS12_F_PKCS12_SETUP_MAC, ERR_R_MALLOC_FAILURE); + return 0; + } } if (!saltlen) saltlen = PKCS12_SALT_LEN; p12->mac->salt->length = saltlen; diff --git a/src/lib/libssl/src/crypto/pkcs7/Makefile b/src/lib/libssl/src/crypto/pkcs7/Makefile new file mode 100644 index 0000000000..f15c65f690 --- /dev/null +++ b/src/lib/libssl/src/crypto/pkcs7/Makefile @@ -0,0 +1,241 @@ +# +# SSLeay/crypto/pkcs7/Makefile +# + +DIR= pkcs7 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +PEX_LIBS= +EX_LIBS= + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= pk7_asn1.c pk7_lib.c pkcs7err.c pk7_doit.c pk7_smime.c pk7_attr.c \ + pk7_mime.c +LIBOBJ= pk7_asn1.o pk7_lib.o pkcs7err.o pk7_doit.o pk7_smime.o pk7_attr.o \ + pk7_mime.o + +SRC= $(LIBSRC) + +EXHEADER= pkcs7.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +test: + +all: lib + +testapps: enc dec sign verify + +enc: enc.o lib + $(CC) $(CFLAGS) -o enc enc.o $(PEX_LIBS) $(LIB) $(EX_LIBS) + +dec: dec.o lib + $(CC) $(CFLAGS) -o dec dec.o $(PEX_LIBS) $(LIB) $(EX_LIBS) + +sign: sign.o lib + $(CC) $(CFLAGS) -o sign sign.o $(PEX_LIBS) $(LIB) $(EX_LIBS) + +verify: verify.o example.o lib + $(CC) $(CFLAGS) -o verify verify.o $(PEX_LIBS) example.o $(LIB) $(EX_LIBS) + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff enc dec sign verify + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +pk7_asn1.o: ../../e_os.h ../../include/openssl/aes.h +pk7_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +pk7_asn1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk7_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk7_asn1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk7_asn1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_asn1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk7_asn1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk7_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk7_asn1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk7_asn1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk7_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk7_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_asn1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pk7_asn1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pk7_asn1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pk7_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pk7_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pk7_asn1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pk7_asn1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pk7_asn1.o: ../cryptlib.h pk7_asn1.c +pk7_attr.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +pk7_attr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk7_attr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk7_attr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk7_attr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_attr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk7_attr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk7_attr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk7_attr.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk7_attr.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk7_attr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk7_attr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_attr.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pk7_attr.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pk7_attr.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pk7_attr.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pk7_attr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pk7_attr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pk7_attr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pk7_attr.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pk7_attr.o: pk7_attr.c +pk7_doit.o: ../../e_os.h ../../include/openssl/aes.h +pk7_doit.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_doit.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_doit.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_doit.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +pk7_doit.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_doit.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_doit.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk7_doit.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk7_doit.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk7_doit.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk7_doit.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk7_doit.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk7_doit.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_doit.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pk7_doit.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pk7_doit.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pk7_doit.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pk7_doit.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pk7_doit.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pk7_doit.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pk7_doit.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +pk7_doit.o: ../cryptlib.h pk7_doit.c +pk7_lib.o: ../../e_os.h ../../include/openssl/aes.h +pk7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pk7_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pk7_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pk7_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pk7_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pk7_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pk7_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pk7_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pk7_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +pk7_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +pk7_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pk7_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pk7_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pk7_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pk7_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pk7_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pk7_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pk7_lib.c +pk7_mime.o: ../../e_os.h ../../include/openssl/aes.h +pk7_mime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_mime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_mime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_mime.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pk7_mime.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pk7_mime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pk7_mime.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pk7_mime.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pk7_mime.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pk7_mime.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pk7_mime.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pk7_mime.o: ../../include/openssl/opensslconf.h +pk7_mime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_mime.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pk7_mime.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +pk7_mime.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +pk7_mime.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pk7_mime.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pk7_mime.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +pk7_mime.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +pk7_mime.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pk7_mime.c +pk7_smime.o: ../../e_os.h ../../include/openssl/aes.h +pk7_smime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_smime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_smime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_smime.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +pk7_smime.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_smime.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_smime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pk7_smime.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +pk7_smime.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +pk7_smime.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +pk7_smime.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +pk7_smime.o: ../../include/openssl/objects.h +pk7_smime.o: ../../include/openssl/opensslconf.h +pk7_smime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pk7_smime.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +pk7_smime.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +pk7_smime.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +pk7_smime.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pk7_smime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pk7_smime.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +pk7_smime.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +pk7_smime.o: ../../include/openssl/x509v3.h ../cryptlib.h pk7_smime.c +pkcs7err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pkcs7err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +pkcs7err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +pkcs7err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +pkcs7err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pkcs7err.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h +pkcs7err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +pkcs7err.o: pkcs7err.c diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c b/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c index 5ff5a88b5c..039141027a 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c @@ -3,7 +3,7 @@ * project 2001. */ /* ==================================================================== - * Copyright (c) 2001 The OpenSSL Project. All rights reserved. + * Copyright (c) 2001-2004 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -94,17 +94,18 @@ int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK_OF(X509_ALGOR) *cap) } STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si) -{ + { ASN1_TYPE *cap; unsigned char *p; cap = PKCS7_get_signed_attribute(si, NID_SMIMECapabilities); - if (!cap) return NULL; + if (!cap || (cap->type != V_ASN1_SEQUENCE)) + return NULL; p = cap->value.sequence->data; return d2i_ASN1_SET_OF_X509_ALGOR(NULL, &p, cap->value.sequence->length, d2i_X509_ALGOR, X509_ALGOR_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); -} + } /* Basic smime-capabilities OID and optional integer arg */ int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg) diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c index 35c7dcd0b3..4ac29ae14d 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c @@ -239,7 +239,13 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio) OPENSSL_free(tmp); goto err; } - M_ASN1_OCTET_STRING_set(ri->enc_key,tmp,jj); + if (!M_ASN1_OCTET_STRING_set(ri->enc_key,tmp,jj)) + { + PKCS7err(PKCS7_F_PKCS7_DATAINIT, + ERR_R_MALLOC_FAILURE); + OPENSSL_free(tmp); + goto err; + } } OPENSSL_free(tmp); OPENSSL_cleanse(key, keylen); @@ -257,10 +263,15 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio) bio=BIO_new(BIO_s_null()); else { - ASN1_OCTET_STRING *os; - os = PKCS7_get_octet_string(p7->d.sign->contents); - if (os && os->length > 0) - bio = BIO_new_mem_buf(os->data, os->length); + if (PKCS7_type_is_signed(p7)) + { + ASN1_OCTET_STRING *os; + os = PKCS7_get_octet_string( + p7->d.sign->contents); + if (os && os->length > 0) + bio = BIO_new_mem_buf(os->data, + os->length); + } if(bio == NULL) { bio=BIO_new(BIO_s_mem()); @@ -515,12 +526,20 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) case NID_pkcs7_signedAndEnveloped: /* XXXXXXXXXXXXXXXX */ si_sk=p7->d.signed_and_enveloped->signer_info; - os=M_ASN1_OCTET_STRING_new(); + if (!(os=M_ASN1_OCTET_STRING_new())) + { + PKCS7err(PKCS7_F_PKCS7_DATASIGN,ERR_R_MALLOC_FAILURE); + goto err; + } p7->d.signed_and_enveloped->enc_data->enc_data=os; break; case NID_pkcs7_enveloped: /* XXXXXXXXXXXXXXXX */ - os=M_ASN1_OCTET_STRING_new(); + if (!(os=M_ASN1_OCTET_STRING_new())) + { + PKCS7err(PKCS7_F_PKCS7_DATASIGN,ERR_R_MALLOC_FAILURE); + goto err; + } p7->d.enveloped->enc_data->enc_data=os; break; case NID_pkcs7_signed: @@ -594,7 +613,12 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) if (!PKCS7_get_signed_attribute(si, NID_pkcs9_signingTime)) { - sign_time=X509_gmtime_adj(NULL,0); + if (!(sign_time=X509_gmtime_adj(NULL,0))) + { + PKCS7err(PKCS7_F_PKCS7_DATASIGN, + ERR_R_MALLOC_FAILURE); + goto err; + } PKCS7_add_signed_attribute(si, NID_pkcs9_signingTime, V_ASN1_UTCTIME,sign_time); @@ -603,8 +627,19 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) /* Add digest */ md_tmp=EVP_MD_CTX_md(&ctx_tmp); EVP_DigestFinal_ex(&ctx_tmp,md_data,&md_len); - digest=M_ASN1_OCTET_STRING_new(); - M_ASN1_OCTET_STRING_set(digest,md_data,md_len); + if (!(digest=M_ASN1_OCTET_STRING_new())) + { + PKCS7err(PKCS7_F_PKCS7_DATASIGN, + ERR_R_MALLOC_FAILURE); + goto err; + } + if (!M_ASN1_OCTET_STRING_set(digest,md_data, + md_len)) + { + PKCS7err(PKCS7_F_PKCS7_DATASIGN, + ERR_R_MALLOC_FAILURE); + goto err; + } PKCS7_add_signed_attribute(si, NID_pkcs9_messageDigest, V_ASN1_OCTET_STRING,digest); diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c b/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c index 985b07245c..ee1817c7af 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c @@ -164,7 +164,12 @@ int PKCS7_set_type(PKCS7 *p7, int type) p7->type=obj; if ((p7->d.sign=PKCS7_SIGNED_new()) == NULL) goto err; - ASN1_INTEGER_set(p7->d.sign->version,1); + if (!ASN1_INTEGER_set(p7->d.sign->version,1)) + { + PKCS7_SIGNED_free(p7->d.sign); + p7->d.sign=NULL; + goto err; + } break; case NID_pkcs7_data: p7->type=obj; @@ -176,6 +181,8 @@ int PKCS7_set_type(PKCS7 *p7, int type) if ((p7->d.signed_and_enveloped=PKCS7_SIGN_ENVELOPE_new()) == NULL) goto err; ASN1_INTEGER_set(p7->d.signed_and_enveloped->version,1); + if (!ASN1_INTEGER_set(p7->d.signed_and_enveloped->version,1)) + goto err; p7->d.signed_and_enveloped->enc_data->content_type = OBJ_nid2obj(NID_pkcs7_data); break; @@ -183,7 +190,8 @@ int PKCS7_set_type(PKCS7 *p7, int type) p7->type=obj; if ((p7->d.enveloped=PKCS7_ENVELOPE_new()) == NULL) goto err; - ASN1_INTEGER_set(p7->d.enveloped->version,0); + if (!ASN1_INTEGER_set(p7->d.enveloped->version,0)) + goto err; p7->d.enveloped->enc_data->content_type = OBJ_nid2obj(NID_pkcs7_data); break; @@ -191,7 +199,8 @@ int PKCS7_set_type(PKCS7 *p7, int type) p7->type=obj; if ((p7->d.encrypted=PKCS7_ENCRYPT_new()) == NULL) goto err; - ASN1_INTEGER_set(p7->d.encrypted->version,0); + if (!ASN1_INTEGER_set(p7->d.encrypted->version,0)) + goto err; p7->d.encrypted->enc_data->content_type = OBJ_nid2obj(NID_pkcs7_data); break; @@ -318,15 +327,18 @@ int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, if (pkey->type == EVP_PKEY_DSA) is_dsa = 1; else is_dsa = 0; /* We now need to add another PKCS7_SIGNER_INFO entry */ - ASN1_INTEGER_set(p7i->version,1); - X509_NAME_set(&p7i->issuer_and_serial->issuer, - X509_get_issuer_name(x509)); + if (!ASN1_INTEGER_set(p7i->version,1)) + goto err; + if (!X509_NAME_set(&p7i->issuer_and_serial->issuer, + X509_get_issuer_name(x509))) + goto err; /* because ASN1_INTEGER_set is used to set a 'long' we will do * things the ugly way. */ M_ASN1_INTEGER_free(p7i->issuer_and_serial->serial); - p7i->issuer_and_serial->serial= - M_ASN1_INTEGER_dup(X509_get_serialNumber(x509)); + if (!(p7i->issuer_and_serial->serial= + M_ASN1_INTEGER_dup(X509_get_serialNumber(x509)))) + goto err; /* lets keep the pkey around for a while */ CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY); @@ -423,16 +435,20 @@ int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri) int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509) { - ASN1_INTEGER_set(p7i->version,0); - X509_NAME_set(&p7i->issuer_and_serial->issuer, - X509_get_issuer_name(x509)); + if (!ASN1_INTEGER_set(p7i->version,0)) + return 0; + if (!X509_NAME_set(&p7i->issuer_and_serial->issuer, + X509_get_issuer_name(x509))) + return 0; M_ASN1_INTEGER_free(p7i->issuer_and_serial->serial); - p7i->issuer_and_serial->serial= - M_ASN1_INTEGER_dup(X509_get_serialNumber(x509)); + if (!(p7i->issuer_and_serial->serial= + M_ASN1_INTEGER_dup(X509_get_serialNumber(x509)))) + return 0; X509_ALGOR_free(p7i->key_enc_algor); - p7i->key_enc_algor= X509_ALGOR_dup(x509->cert_info->key->algor); + if (!(p7i->key_enc_algor= X509_ALGOR_dup(x509->cert_info->key->algor))) + return 0; CRYPTO_add(&x509->references,1,CRYPTO_LOCK_X509); p7i->cert=x509; diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c b/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c index 6e5735de11..a852b49235 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c @@ -155,7 +155,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, char buf[4096]; int i, j=0, k, ret = 0; BIO *p7bio; - BIO *tmpout; + BIO *tmpin, *tmpout; if(!p7) { PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_INVALID_NULL_POINTER); @@ -228,7 +228,30 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, /* Check for revocation status here */ } - p7bio=PKCS7_dataInit(p7,indata); + /* Performance optimization: if the content is a memory BIO then + * store its contents in a temporary read only memory BIO. This + * avoids potentially large numbers of slow copies of data which will + * occur when reading from a read write memory BIO when signatures + * are calculated. + */ + + if (indata && (BIO_method_type(indata) == BIO_TYPE_MEM)) + { + char *ptr; + long len; + len = BIO_get_mem_data(indata, &ptr); + tmpin = BIO_new_mem_buf(ptr, len); + if (tmpin == NULL) + { + PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_MALLOC_FAILURE); + return 0; + } + } + else + tmpin = indata; + + + p7bio=PKCS7_dataInit(p7,tmpin); if(flags & PKCS7_TEXT) { if(!(tmpout = BIO_new(BIO_s_mem()))) { @@ -270,9 +293,15 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, ret = 1; err: + + if (tmpin == indata) + { + if(indata) BIO_pop(p7bio); + BIO_free_all(p7bio); + } + else + BIO_free_all(tmpin); - if(indata) BIO_pop(p7bio); - BIO_free_all(p7bio); sk_X509_free(signers); return ret; @@ -296,10 +325,6 @@ STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags) PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_WRONG_CONTENT_TYPE); return NULL; } - if(!(signers = sk_X509_new_null())) { - PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,ERR_R_MALLOC_FAILURE); - return NULL; - } /* Collect all the signers together */ @@ -310,6 +335,11 @@ STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags) return 0; } + if(!(signers = sk_X509_new_null())) { + PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,ERR_R_MALLOC_FAILURE); + return NULL; + } + for (i = 0; i < sk_PKCS7_SIGNER_INFO_num(sinfos); i++) { si = sk_PKCS7_SIGNER_INFO_value(sinfos, i); diff --git a/src/lib/libssl/src/crypto/rand/Makefile b/src/lib/libssl/src/crypto/rand/Makefile new file mode 100644 index 0000000000..665eaa18e5 --- /dev/null +++ b/src/lib/libssl/src/crypto/rand/Makefile @@ -0,0 +1,196 @@ +# +# SSLeay/crypto/rand/Makefile +# + +DIR= rand +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= randtest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \ + rand_win.c rand_unix.c rand_os2.c +LIBOBJ=md_rand.o randfile.o rand_lib.o rand_err.o rand_egd.o \ + rand_win.o rand_unix.o rand_os2.o + +SRC= $(LIBSRC) + +EXHEADER= rand.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +md_rand.o: ../../e_os.h ../../include/openssl/aes.h +md_rand.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +md_rand.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +md_rand.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +md_rand.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +md_rand.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +md_rand.o: ../../include/openssl/evp.h ../../include/openssl/fips.h +md_rand.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +md_rand.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +md_rand.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +md_rand.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +md_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +md_rand.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +md_rand.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +md_rand.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +md_rand.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +md_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +md_rand.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +md_rand.o: ../../include/openssl/ui_compat.h md_rand.c rand_lcl.h +rand_egd.o: ../../include/openssl/buffer.h ../../include/openssl/e_os2.h +rand_egd.o: ../../include/openssl/opensslconf.h +rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +rand_egd.o: rand_egd.c +rand_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +rand_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rand_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rand_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_err.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +rand_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_err.o: rand_err.c +rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h +rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rand_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rand_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +rand_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +rand_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +rand_lib.o: ../../include/openssl/err.h ../../include/openssl/fips.h +rand_lib.o: ../../include/openssl/fips_rand.h ../../include/openssl/lhash.h +rand_lib.o: ../../include/openssl/opensslconf.h +rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rand_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +rand_lib.o: ../../include/openssl/ui_compat.h ../cryptlib.h rand_lib.c +rand_os2.o: ../../e_os.h ../../include/openssl/aes.h +rand_os2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rand_os2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rand_os2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rand_os2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rand_os2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rand_os2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rand_os2.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rand_os2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rand_os2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rand_os2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rand_os2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rand_os2.o: ../../include/openssl/opensslconf.h +rand_os2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_os2.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +rand_os2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rand_os2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rand_os2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rand_os2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_os2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rand_os2.o: ../cryptlib.h rand_lcl.h rand_os2.c +rand_unix.o: ../../e_os.h ../../include/openssl/aes.h +rand_unix.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rand_unix.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rand_unix.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rand_unix.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rand_unix.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rand_unix.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rand_unix.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rand_unix.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rand_unix.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rand_unix.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rand_unix.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rand_unix.o: ../../include/openssl/opensslconf.h +rand_unix.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_unix.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +rand_unix.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rand_unix.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rand_unix.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rand_unix.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_unix.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rand_unix.o: ../cryptlib.h rand_lcl.h rand_unix.c +rand_win.o: ../../e_os.h ../../include/openssl/aes.h +rand_win.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rand_win.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rand_win.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rand_win.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rand_win.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rand_win.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rand_win.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rand_win.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rand_win.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rand_win.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rand_win.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rand_win.o: ../../include/openssl/opensslconf.h +rand_win.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rand_win.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +rand_win.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rand_win.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rand_win.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rand_win.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rand_win.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rand_win.o: ../cryptlib.h rand_lcl.h rand_win.c +randfile.o: ../../e_os.h ../../include/openssl/buffer.h +randfile.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +randfile.o: ../../include/openssl/opensslconf.h +randfile.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +randfile.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +randfile.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +randfile.o: randfile.c diff --git a/src/lib/libssl/src/crypto/rand/md_rand.c b/src/lib/libssl/src/crypto/rand/md_rand.c index eeffc0df4c..c84968df88 100644 --- a/src/lib/libssl/src/crypto/rand/md_rand.c +++ b/src/lib/libssl/src/crypto/rand/md_rand.c @@ -126,6 +126,7 @@ #include #include +#include #ifdef BN_DEBUG # define PREDICT @@ -332,6 +333,14 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) #endif int do_stir_pool = 0; +#ifdef OPENSSL_FIPS + if(FIPS_mode()) + { + FIPSerr(FIPS_F_SSLEAY_RAND_BYTES,FIPS_R_NON_FIPS_METHOD); + return 0; + } +#endif + #ifdef PREDICT if (rand_predictable) { diff --git a/src/lib/libssl/src/crypto/rand/rand.h b/src/lib/libssl/src/crypto/rand/rand.h index 606382dd21..604df9be6c 100644 --- a/src/lib/libssl/src/crypto/rand/rand.h +++ b/src/lib/libssl/src/crypto/rand/rand.h @@ -71,6 +71,10 @@ extern "C" { #endif +#if defined(OPENSSL_FIPS) +#define FIPS_RAND_SIZE_T int +#endif + typedef struct rand_meth_st { void (*seed)(const void *buf, int num); @@ -121,11 +125,17 @@ void ERR_load_RAND_strings(void); /* Error codes for the RAND functions. */ /* Function codes. */ +#define RAND_F_FIPS_RAND_BYTES 102 #define RAND_F_RAND_GET_RAND_METHOD 101 #define RAND_F_SSLEAY_RAND_BYTES 100 /* Reason codes. */ +#define RAND_R_NON_FIPS_METHOD 101 +#define RAND_R_PRNG_ASKING_FOR_TOO_MUCH 105 +#define RAND_R_PRNG_NOT_REKEYED 103 +#define RAND_R_PRNG_NOT_RESEEDED 104 #define RAND_R_PRNG_NOT_SEEDED 100 +#define RAND_R_PRNG_STUCK 102 #ifdef __cplusplus } diff --git a/src/lib/libssl/src/crypto/rand/rand_egd.c b/src/lib/libssl/src/crypto/rand/rand_egd.c index 6f742900a0..cd666abfcb 100644 --- a/src/lib/libssl/src/crypto/rand/rand_egd.c +++ b/src/lib/libssl/src/crypto/rand/rand_egd.c @@ -95,7 +95,7 @@ * RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255. */ -#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) +#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_VOS) int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) { return(-1); @@ -216,7 +216,9 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) while (numbytes != 1) { num = read(fd, egdbuf, 1); - if (num >= 0) + if (num == 0) + goto err; /* descriptor closed */ + else if (num > 0) numbytes += num; else { @@ -246,7 +248,9 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) while (numbytes != egdbuf[0]) { num = read(fd, retrievebuf + numbytes, egdbuf[0] - numbytes); - if (num >= 0) + if (num == 0) + goto err; /* descriptor closed */ + else if (num > 0) numbytes += num; else { diff --git a/src/lib/libssl/src/crypto/rand/rand_err.c b/src/lib/libssl/src/crypto/rand/rand_err.c index b77267e213..95574659ac 100644 --- a/src/lib/libssl/src/crypto/rand/rand_err.c +++ b/src/lib/libssl/src/crypto/rand/rand_err.c @@ -1,6 +1,6 @@ /* crypto/rand/rand_err.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -66,6 +66,7 @@ #ifndef OPENSSL_NO_ERR static ERR_STRING_DATA RAND_str_functs[]= { +{ERR_PACK(0,RAND_F_FIPS_RAND_BYTES,0), "FIPS_RAND_BYTES"}, {ERR_PACK(0,RAND_F_RAND_GET_RAND_METHOD,0), "RAND_get_rand_method"}, {ERR_PACK(0,RAND_F_SSLEAY_RAND_BYTES,0), "SSLEAY_RAND_BYTES"}, {0,NULL} @@ -73,7 +74,12 @@ static ERR_STRING_DATA RAND_str_functs[]= static ERR_STRING_DATA RAND_str_reasons[]= { +{RAND_R_NON_FIPS_METHOD ,"non fips method"}, +{RAND_R_PRNG_ASKING_FOR_TOO_MUCH ,"prng asking for too much"}, +{RAND_R_PRNG_NOT_REKEYED ,"prng not rekeyed"}, +{RAND_R_PRNG_NOT_RESEEDED ,"prng not reseeded"}, {RAND_R_PRNG_NOT_SEEDED ,"PRNG not seeded"}, +{RAND_R_PRNG_STUCK ,"prng stuck"}, {0,NULL} }; diff --git a/src/lib/libssl/src/crypto/rand/rand_lib.c b/src/lib/libssl/src/crypto/rand/rand_lib.c index 513e338985..88f1b56d91 100644 --- a/src/lib/libssl/src/crypto/rand/rand_lib.c +++ b/src/lib/libssl/src/crypto/rand/rand_lib.c @@ -63,6 +63,8 @@ #ifndef OPENSSL_NO_ENGINE #include #endif +#include +#include #ifndef OPENSSL_NO_ENGINE /* non-NULL if default_RAND_meth is ENGINE-provided */ @@ -85,6 +87,16 @@ int RAND_set_rand_method(const RAND_METHOD *meth) const RAND_METHOD *RAND_get_rand_method(void) { +#ifdef OPENSSL_FIPS + if(FIPS_mode() + && default_RAND_meth != FIPS_rand_check()) + { + RANDerr(RAND_F_RAND_GET_RAND_METHOD,RAND_R_NON_FIPS_METHOD); + return 0; + } +#endif + + if (!default_RAND_meth) { #ifndef OPENSSL_NO_ENGINE diff --git a/src/lib/libssl/src/crypto/rand/rand_unix.c b/src/lib/libssl/src/crypto/rand/rand_unix.c index 0599719dd1..9376554fae 100644 --- a/src/lib/libssl/src/crypto/rand/rand_unix.c +++ b/src/lib/libssl/src/crypto/rand/rand_unix.c @@ -120,6 +120,7 @@ #include #include #include +#include #include #include #include @@ -151,9 +152,9 @@ int RAND_poll(void) int n = 0; #endif #ifdef DEVRANDOM - static const char *randomfiles[] = { DEVRANDOM, NULL }; - const char **randomfile = NULL; - int fd; + static const char *randomfiles[] = { DEVRANDOM }; + struct stat randomstats[sizeof(randomfiles)/sizeof(randomfiles[0])]; + int fd,i; #endif #ifdef DEVRANDOM_EGD static const char *egdsockets[] = { DEVRANDOM_EGD, NULL }; @@ -161,26 +162,42 @@ int RAND_poll(void) #endif #ifdef DEVRANDOM + memset(randomstats,0,sizeof(randomstats)); /* Use a random entropy pool device. Linux, FreeBSD and OpenBSD * have this. Use /dev/urandom if you can as /dev/random may block * if it runs out of random entries. */ - for (randomfile = randomfiles; *randomfile && n < ENTROPY_NEEDED; randomfile++) + for (i=0; i= 0) { struct timeval t = { 0, 10*1000 }; /* Spend 10ms on each file. */ - int r; + int r,j; fd_set fset; + struct stat *st=&randomstats[i]; + + /* Avoid using same input... Used to be O_NOFOLLOW + * above, but it's not universally appropriate... */ + if (fstat(fd,st) != 0) { close(fd); continue; } + for (j=0;jst_ino && + randomstats[j].st_dev==st->st_dev) + break; + } + if (jlength) + while (pitems_data->length + && (total_length + pitems_data->length <= 256)) { pitem->length = pitems_data->length; pitem->code = pitems_data->code; - pitem->buffer = (long *)data_buffer[total_length]; + pitem->buffer = (long *)&data_buffer[total_length]; pitem->retlen = 0; total_length += pitems_data->length; pitems_data++; diff --git a/src/lib/libssl/src/crypto/rand/rand_win.c b/src/lib/libssl/src/crypto/rand/rand_win.c index 3584842224..30c69161ef 100644 --- a/src/lib/libssl/src/crypto/rand/rand_win.c +++ b/src/lib/libssl/src/crypto/rand/rand_win.c @@ -125,7 +125,7 @@ * http://developer.intel.com/design/security/rng/redist_license.htm */ #define PROV_INTEL_SEC 22 -#define INTEL_DEF_PROV TEXT("Intel Hardware Cryptographic Service Provider") +#define INTEL_DEF_PROV L"Intel Hardware Cryptographic Service Provider" static void readtimer(void); static void readscreen(void); @@ -152,7 +152,7 @@ typedef struct tagCURSORINFO #define CURSOR_SHOWING 0x00000001 #endif /* CURSOR_SHOWING */ -typedef BOOL (WINAPI *CRYPTACQUIRECONTEXT)(HCRYPTPROV *, LPCTSTR, LPCTSTR, +typedef BOOL (WINAPI *CRYPTACQUIRECONTEXTW)(HCRYPTPROV *, LPCWSTR, LPCWSTR, DWORD, DWORD); typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV, DWORD, BYTE *); typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV, DWORD); @@ -194,7 +194,7 @@ int RAND_poll(void) HWND h; HMODULE advapi, kernel, user, netapi; - CRYPTACQUIRECONTEXT acquire = 0; + CRYPTACQUIRECONTEXTW acquire = 0; CRYPTGENRANDOM gen = 0; CRYPTRELEASECONTEXT release = 0; #if 1 /* There was previously a problem with NETSTATGET. Currently, this @@ -213,6 +213,9 @@ int RAND_poll(void) GetVersionEx( &osverinfo ) ; #if defined(OPENSSL_SYS_WINCE) && WCEPLATFORM!=MS_HPC_PRO +#ifndef CryptAcquireContext +#define CryptAcquireContext CryptAcquireContextW +#endif /* poll the CryptoAPI PRNG */ /* The CryptoAPI returns sizeof(buf) bytes of randomness */ if (CryptAcquireContext(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) @@ -223,21 +226,35 @@ int RAND_poll(void) } #endif +#ifndef OPENSSL_SYS_WINCE + /* + * None of below libraries are present on Windows CE, which is + * why we #ifndef the whole section. This also excuses us from + * handling the GetProcAddress issue. The trouble is that in + * real Win32 API GetProcAddress is available in ANSI flavor + * only. In WinCE on the other hand GetProcAddress is a macro + * most commonly defined as GetProcAddressW, which accepts + * Unicode argument. If we were to call GetProcAddress under + * WinCE, I'd recommend to either redefine GetProcAddress as + * GetProcAddressA (there seem to be one in common CE spec) or + * implement own shim routine, which would accept ANSI argument + * and expand it to Unicode. + */ + /* load functions dynamically - not available on all systems */ advapi = LoadLibrary(TEXT("ADVAPI32.DLL")); kernel = LoadLibrary(TEXT("KERNEL32.DLL")); user = LoadLibrary(TEXT("USER32.DLL")); netapi = LoadLibrary(TEXT("NETAPI32.DLL")); -#ifndef OPENSSL_SYS_WINCE #if 1 /* There was previously a problem with NETSTATGET. Currently, this * section is still experimental, but if all goes well, this conditional * will be removed */ if (netapi) { - netstatget = (NETSTATGET) GetProcAddress(netapi,TEXT("NetStatisticsGet")); - netfree = (NETFREE) GetProcAddress(netapi,TEXT("NetApiBufferFree")); + netstatget = (NETSTATGET) GetProcAddress(netapi,"NetStatisticsGet"); + netfree = (NETFREE) GetProcAddress(netapi,"NetApiBufferFree"); } if (netstatget && netfree) @@ -264,9 +281,7 @@ int RAND_poll(void) if (netapi) FreeLibrary(netapi); #endif /* 1 */ -#endif /* !OPENSSL_SYS_WINCE */ - -#ifndef OPENSSL_SYS_WINCE + /* It appears like this can cause an exception deep within ADVAPI32.DLL * at random times on Windows 2000. Reported by Jeffrey Altman. * Only use it on NT. @@ -321,16 +336,20 @@ int RAND_poll(void) free(buf); } #endif -#endif /* !OPENSSL_SYS_WINCE */ if (advapi) { - acquire = (CRYPTACQUIRECONTEXT) GetProcAddress(advapi, - TEXT("CryptAcquireContextA")); + /* + * If it's available, then it's available in both ANSI + * and UNICODE flavors even in Win9x, documentation says. + * We favor Unicode... + */ + acquire = (CRYPTACQUIRECONTEXTW) GetProcAddress(advapi, + "CryptAcquireContextW"); gen = (CRYPTGENRANDOM) GetProcAddress(advapi, - TEXT("CryptGenRandom")); + "CryptGenRandom"); release = (CRYPTRELEASECONTEXT) GetProcAddress(advapi, - TEXT("CryptReleaseContext")); + "CryptReleaseContext"); } if (acquire && gen && release) @@ -367,26 +386,15 @@ int RAND_poll(void) if (advapi) FreeLibrary(advapi); - /* timer data */ - readtimer(); - - /* memory usage statistics */ - GlobalMemoryStatus(&m); - RAND_add(&m, sizeof(m), 1); - - /* process ID */ - w = GetCurrentProcessId(); - RAND_add(&w, sizeof(w), 1); - if (user) { GETCURSORINFO cursor; GETFOREGROUNDWINDOW win; GETQUEUESTATUS queue; - win = (GETFOREGROUNDWINDOW) GetProcAddress(user, TEXT("GetForegroundWindow")); - cursor = (GETCURSORINFO) GetProcAddress(user, TEXT("GetCursorInfo")); - queue = (GETQUEUESTATUS) GetProcAddress(user, TEXT("GetQueueStatus")); + win = (GETFOREGROUNDWINDOW) GetProcAddress(user, "GetForegroundWindow"); + cursor = (GETCURSORINFO) GetProcAddress(user, "GetCursorInfo"); + queue = (GETQUEUESTATUS) GetProcAddress(user, "GetQueueStatus"); if (win) { @@ -458,19 +466,19 @@ int RAND_poll(void) MODULEENTRY32 m; snap = (CREATETOOLHELP32SNAPSHOT) - GetProcAddress(kernel, TEXT("CreateToolhelp32Snapshot")); + GetProcAddress(kernel, "CreateToolhelp32Snapshot"); close_snap = (CLOSETOOLHELP32SNAPSHOT) - GetProcAddress(kernel, TEXT("CloseToolhelp32Snapshot")); - heap_first = (HEAP32FIRST) GetProcAddress(kernel, TEXT("Heap32First")); - heap_next = (HEAP32NEXT) GetProcAddress(kernel, TEXT("Heap32Next")); - heaplist_first = (HEAP32LIST) GetProcAddress(kernel, TEXT("Heap32ListFirst")); - heaplist_next = (HEAP32LIST) GetProcAddress(kernel, TEXT("Heap32ListNext")); - process_first = (PROCESS32) GetProcAddress(kernel, TEXT("Process32First")); - process_next = (PROCESS32) GetProcAddress(kernel, TEXT("Process32Next")); - thread_first = (THREAD32) GetProcAddress(kernel, TEXT("Thread32First")); - thread_next = (THREAD32) GetProcAddress(kernel, TEXT("Thread32Next")); - module_first = (MODULE32) GetProcAddress(kernel, TEXT("Module32First")); - module_next = (MODULE32) GetProcAddress(kernel, TEXT("Module32Next")); + GetProcAddress(kernel, "CloseToolhelp32Snapshot"); + heap_first = (HEAP32FIRST) GetProcAddress(kernel, "Heap32First"); + heap_next = (HEAP32NEXT) GetProcAddress(kernel, "Heap32Next"); + heaplist_first = (HEAP32LIST) GetProcAddress(kernel, "Heap32ListFirst"); + heaplist_next = (HEAP32LIST) GetProcAddress(kernel, "Heap32ListNext"); + process_first = (PROCESS32) GetProcAddress(kernel, "Process32First"); + process_next = (PROCESS32) GetProcAddress(kernel, "Process32Next"); + thread_first = (THREAD32) GetProcAddress(kernel, "Thread32First"); + thread_next = (THREAD32) GetProcAddress(kernel, "Thread32Next"); + module_first = (MODULE32) GetProcAddress(kernel, "Module32First"); + module_next = (MODULE32) GetProcAddress(kernel, "Module32Next"); if (snap && heap_first && heap_next && heaplist_first && heaplist_next && process_first && process_next && @@ -546,6 +554,18 @@ int RAND_poll(void) FreeLibrary(kernel); } +#endif /* !OPENSSL_SYS_WINCE */ + + /* timer data */ + readtimer(); + + /* memory usage statistics */ + GlobalMemoryStatus(&m); + RAND_add(&m, sizeof(m), 1); + + /* process ID */ + w = GetCurrentProcessId(); + RAND_add(&w, sizeof(w), 1); #if 0 printf("Exiting RAND_poll\n"); @@ -607,7 +627,7 @@ static void readtimer(void) DWORD w; LARGE_INTEGER l; static int have_perfc = 1; -#if defined(_MSC_VER) && !defined(OPENSSL_SYS_WINCE) +#if defined(_MSC_VER) && defined(_M_X86) static int have_tsc = 1; DWORD cyclecount; @@ -660,7 +680,7 @@ static void readtimer(void) static void readscreen(void) { -#ifndef OPENSSL_SYS_WINCE +#if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) HDC hScrDC; /* screen DC */ HDC hMemDC; /* memory DC */ HBITMAP hBitmap; /* handle for our bitmap */ diff --git a/src/lib/libssl/src/crypto/rand/randfile.c b/src/lib/libssl/src/crypto/rand/randfile.c index f5d0843d13..c7fba496a8 100644 --- a/src/lib/libssl/src/crypto/rand/randfile.c +++ b/src/lib/libssl/src/crypto/rand/randfile.c @@ -166,6 +166,7 @@ int RAND_write_file(const char *file) } #if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32) + { /* For some reason Win32 can't write to files created this way */ /* chmod(..., 0600) is too late to protect the file, @@ -173,6 +174,7 @@ int RAND_write_file(const char *file) int fd = open(file, O_CREAT, 0600); if (fd != -1) out = fdopen(fd, "wb"); + } #endif if (out == NULL) out = fopen(file,"wb"); diff --git a/src/lib/libssl/src/crypto/rc2/Makefile b/src/lib/libssl/src/crypto/rc2/Makefile new file mode 100644 index 0000000000..18edaca6c6 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc2/Makefile @@ -0,0 +1,92 @@ +# +# SSLeay/crypto/rc2/Makefile +# + +DIR= rc2 +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=rc2test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c +LIBOBJ=rc2_ecb.o rc2_skey.o rc2_cbc.o rc2cfb64.o rc2ofb64.o + +SRC= $(LIBSRC) + +EXHEADER= rc2.h +HEADER= rc2_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rc2_cbc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h +rc2_cbc.o: rc2_cbc.c rc2_locl.h +rc2_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +rc2_ecb.o: ../../include/openssl/rc2.h rc2_ecb.c rc2_locl.h +rc2_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +rc2_skey.o: ../../include/openssl/opensslconf.h +rc2_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h +rc2_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rc2_skey.o: ../../include/openssl/symhacks.h rc2_locl.h rc2_skey.c +rc2cfb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h +rc2cfb64.o: rc2_locl.h rc2cfb64.c +rc2ofb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h +rc2ofb64.o: rc2_locl.h rc2ofb64.c diff --git a/src/lib/libssl/src/crypto/rc2/rc2.h b/src/lib/libssl/src/crypto/rc2/rc2.h index 7816b454dc..71788158d8 100644 --- a/src/lib/libssl/src/crypto/rc2/rc2.h +++ b/src/lib/libssl/src/crypto/rc2/rc2.h @@ -79,7 +79,10 @@ typedef struct rc2_key_st RC2_INT data[64]; } RC2_KEY; - +#ifdef OPENSSL_FIPS +void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, + int bits); +#endif void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, int enc); diff --git a/src/lib/libssl/src/crypto/rc2/rc2_skey.c b/src/lib/libssl/src/crypto/rc2/rc2_skey.c index cab3080c73..22f372f85c 100644 --- a/src/lib/libssl/src/crypto/rc2/rc2_skey.c +++ b/src/lib/libssl/src/crypto/rc2/rc2_skey.c @@ -57,6 +57,7 @@ */ #include +#include #include "rc2_locl.h" static unsigned char key_table[256]={ @@ -90,7 +91,19 @@ static unsigned char key_table[256]={ * BSAFE uses the 'retarded' version. What I previously shipped is * the same as specifying 1024 for the 'bits' parameter. Bsafe uses * a version where the bits parameter is the same as len*8 */ + +#ifdef OPENSSL_FIPS +void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) + { + if (FIPS_mode()) + FIPS_BAD_ABORT(RC2) + private_RC2_set_key(key, len, data, bits); + } +void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, + int bits) +#else void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) +#endif { int i,j; unsigned char *k; diff --git a/src/lib/libssl/src/crypto/rc4/Makefile b/src/lib/libssl/src/crypto/rc4/Makefile new file mode 100644 index 0000000000..64e06924f4 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc4/Makefile @@ -0,0 +1,123 @@ +# +# SSLeay/crypto/rc4/Makefile +# + +DIR= rc4 +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +RC4_ENC=rc4_enc.o +# or use +#RC4_ENC=asm/rx86-elf.o +#RC4_ENC=asm/rx86-out.o +#RC4_ENC=asm/rx86-sol.o +#RC4_ENC=asm/rx86bdsi.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=rc4test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=rc4_skey.c rc4_enc.c +LIBOBJ=rc4_skey.o $(RC4_ENC) + +SRC= $(LIBSRC) + +EXHEADER= rc4.h +HEADER= $(EXHEADER) rc4_locl.h + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > rx86-elf.s) + +# a.out +asm/rx86-out.o: asm/rx86unix.cpp + $(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o + +# bsdi +asm/rx86bsdi.o: asm/rx86unix.cpp + $(CPP) -DBSDI asm/rx86unix.cpp | sed 's/ :/:/' | as -o asm/rx86bsdi.o + +asm/rx86unix.cpp: asm/rc4-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp) + +asm/rc4-amd64.s: asm/rc4-amd64.pl; $(PERL) asm/rc4-amd64.pl $@ + +asm/rc4-ia64.s: asm/rc4-ia64.S + $(CC) $(CFLAGS) -E asm/rc4-ia64.S > $@ + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/rx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rc4_enc.o: ../../e_os.h ../../include/openssl/bio.h +rc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h +rc4_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rc4_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h rc4_enc.c rc4_locl.h +rc4_skey.o: ../../e_os.h ../../include/openssl/bio.h +rc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rc4_skey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h +rc4_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rc4_skey.o: ../../include/openssl/symhacks.h ../cryptlib.h rc4_locl.h +rc4_skey.o: rc4_skey.c diff --git a/src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl b/src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl index 7ef889e5a1..d6e98f0811 100644 --- a/src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl +++ b/src/lib/libssl/src/crypto/rc4/asm/rc4-586.pl @@ -1,16 +1,37 @@ #!/usr/local/bin/perl -# define for pentium pro friendly version +# At some point it became apparent that the original SSLeay RC4 +# assembler implementation performs suboptimaly on latest IA-32 +# microarchitectures. After re-tuning performance has changed as +# following: +# +# Pentium +0% +# Pentium III +17% +# AMD +52%(*) +# P4 +180%(**) +# +# (*) This number is actually a trade-off:-) It's possible to +# achieve +72%, but at the cost of -48% off PIII performance. +# In other words code performing further 13% faster on AMD +# would perform almost 2 times slower on Intel PIII... +# For reference! This code delivers ~80% of rc4-amd64.pl +# performance on the same Opteron machine. +# (**) This number requires compressed key schedule set up by +# RC4_set_key and therefore doesn't apply to 0.9.7 [option for +# compressed key schedule is implemented in 0.9.8 and later, +# see commentary section in rc4_skey.c for further details]. +# +# push(@INC,"perlasm","../../perlasm"); require "x86asm.pl"; &asm_init($ARGV[0],"rc4-586.pl"); -$tx="eax"; -$ty="ebx"; -$x="ecx"; -$y="edx"; +$x="eax"; +$y="ebx"; +$tx="ecx"; +$ty="edx"; $in="esi"; $out="edi"; $d="ebp"; @@ -31,7 +52,7 @@ sub RC4_loop { &mov($ty, &swtmp(2)); &cmp($ty, $in); - &jle(&label("finished")); + &jbe(&label("finished")); &inc($in); } else @@ -39,27 +60,23 @@ sub RC4_loop &add($ty, 8); &inc($in); &cmp($ty, $in); - &jl(&label("finished")); + &jb(&label("finished")); &mov(&swtmp(2), $ty); } } # Moved out # &mov( $tx, &DWP(0,$d,$x,4)) if $p < 0; - &add( $y, $tx); - &and( $y, 0xff); - &inc( $x); # NEXT ROUND + &add( &LB($y), &LB($tx)); &mov( $ty, &DWP(0,$d,$y,4)); # XXX - &mov( &DWP(-4,$d,$x,4),$ty); # AGI + &mov( &DWP(0,$d,$x,4),$ty); &add( $ty, $tx); - &and( $x, 0xff); # NEXT ROUND - &and( $ty, 0xff); &mov( &DWP(0,$d,$y,4),$tx); - &nop(); - &mov( $ty, &DWP(0,$d,$ty,4)); - &mov( $tx, &DWP(0,$d,$x,4)) if $p < 1; # NEXT ROUND - # XXX + &and( $ty, 0xff); + &inc( &LB($x)); # NEXT ROUND + &mov( $tx, &DWP(0,$d,$x,4)) if $p < 1; # NEXT ROUND + &mov( $ty, &DWP(0,$d,$ty,4)); if (!$char) { @@ -88,35 +105,47 @@ sub RC4 &function_begin_B($name,""); + &mov($ty,&wparam(1)); # len + &cmp($ty,0); + &jne(&label("proceed")); + &ret(); + &set_label("proceed"); + &comment(""); &push("ebp"); &push("ebx"); - &mov( $d, &wparam(0)); # key - &mov( $ty, &wparam(1)); # num &push("esi"); - &push("edi"); + &xor( $x, $x); # avoid partial register stalls + &push("edi"); + &xor( $y, $y); # avoid partial register stalls + &mov( $d, &wparam(0)); # key + &mov( $in, &wparam(2)); - &mov( $x, &DWP(0,$d,"",1)); - &mov( $y, &DWP(4,$d,"",1)); + &movb( &LB($x), &BP(0,$d,"",1)); + &movb( &LB($y), &BP(4,$d,"",1)); - &mov( $in, &wparam(2)); - &inc( $x); + &mov( $out, &wparam(3)); + &inc( &LB($x)); &stack_push(3); # 3 temp variables &add( $d, 8); - &and( $x, 0xff); + + # detect compressed schedule, see commentary section in rc4_skey.c... + # in 0.9.7 context ~50 bytes below RC4_CHAR label remain redundant, + # as compressed key schedule is set up in 0.9.8 and later. + &cmp(&DWP(256,$d),-1); + &je(&label("RC4_CHAR")); &lea( $ty, &DWP(-8,$ty,$in)); # check for 0 length input - &mov( $out, &wparam(3)); &mov( &swtmp(2), $ty); # this is now address to exit at &mov( $tx, &DWP(0,$d,$x,4)); &cmp( $ty, $in); - &jl( &label("end")); # less than 8 bytes + &jb( &label("end")); # less than 8 bytes &set_label("start"); @@ -148,7 +177,7 @@ sub RC4 &mov( &DWP(-4,$out,"",0), $tx); &mov( $tx, &DWP(0,$d,$x,4)); &cmp($in, $ty); - &jle(&label("start")); + &jbe(&label("start")); &set_label("end"); @@ -162,10 +191,37 @@ sub RC4 &RC4_loop(5,0,1); &RC4_loop(6,1,1); + &jmp(&label("finished")); + + &align(16); + # this is essentially Intel P4 specific codepath, see rc4_skey.c, + # and is engaged in 0.9.8 and later context... + &set_label("RC4_CHAR"); + + &lea ($ty,&DWP(0,$in,$ty)); + &mov (&swtmp(2),$ty); + + # strangely enough unrolled loop performs over 20% slower... + &set_label("RC4_CHAR_loop"); + &movz ($tx,&BP(0,$d,$x)); + &add (&LB($y),&LB($tx)); + &movz ($ty,&BP(0,$d,$y)); + &movb (&BP(0,$d,$y),&LB($tx)); + &movb (&BP(0,$d,$x),&LB($ty)); + &add (&LB($ty),&LB($tx)); + &movz ($ty,&BP(0,$d,$ty)); + &xorb (&LB($ty),&BP(0,$in)); + &movb (&BP(0,$out),&LB($ty)); + &inc (&LB($x)); + &inc ($in); + &inc ($out); + &cmp ($in,&swtmp(2)); + &jb (&label("RC4_CHAR_loop")); + &set_label("finished"); &dec( $x); &stack_pop(3); - &mov( &DWP(-4,$d,"",0),$y); + &movb( &BP(-4,$d,"",0),&LB($y)); &movb( &BP(-8,$d,"",0),&LB($x)); &function_end($name); diff --git a/src/lib/libssl/src/crypto/rc4/asm/rc4-ia64.S b/src/lib/libssl/src/crypto/rc4/asm/rc4-ia64.S new file mode 100644 index 0000000000..b517d2e88f --- /dev/null +++ b/src/lib/libssl/src/crypto/rc4/asm/rc4-ia64.S @@ -0,0 +1,157 @@ +// ==================================================================== +// Written by Andy Polyakov for the OpenSSL +// project. +// +// Rights for redistribution and usage in source and binary forms are +// granted according to the OpenSSL license. Warranty of any kind is +// disclaimed. +// ==================================================================== + +.ident "rc4-ia64.S, Version 1.1" +.ident "IA-64 ISA artwork by Andy Polyakov " + +// What's wrong with compiler generated code? Because of the nature of +// C language, compiler doesn't [dare to] reorder load and stores. But +// being memory-bound, RC4 should benefit from reorder [on in-order- +// execution core such as IA-64]. But what can we reorder? At the very +// least we can safely reorder references to key schedule in respect +// to input and output streams. Secondly, from the first [close] glance +// it appeared that it's possible to pull up some references to +// elements of the key schedule itself. Original rationale ["prior +// loads are not safe only for "degenerated" key schedule, when some +// elements equal to the same value"] was kind of sloppy. I should have +// formulated as it really was: if we assume that pulling up reference +// to key[x+1] is not safe, then it would mean that key schedule would +// "degenerate," which is never the case. The problem is that this +// holds true in respect to references to key[x], but not to key[y]. +// Legitimate "collisions" do occur within every 256^2 bytes window. +// Fortunately there're enough free instruction slots to keep prior +// reference to key[x+1], detect "collision" and compensate for it. +// All this without sacrificing a single clock cycle:-) +// Furthermore. In order to compress loop body to the minimum, I chose +// to deploy deposit instruction, which substitutes for the whole +// key->data+((x&255)<data[0]))). This unfortunately +// requires key->data to be aligned at sizeof(key->data) boundary. +// This is why you'll find "RC4_INT pad[512-256-2];" addenum to RC4_KEY +// and "d=(RC4_INT *)(((size_t)(d+255))&~(sizeof(key->data)-1));" in +// rc4_skey.c [and rc4_enc.c, where it's retained for debugging +// purposes]. Throughput is ~210MBps on 900MHz CPU, which is is >3x +// faster than gcc generated code and +30% - if compared to HP-UX C. +// Unrolling loop below should give >30% on top of that... + +.text +.explicit + +#if defined(_HPUX_SOURCE) && !defined(_LP64) +# define ADDP addp4 +#else +# define ADDP add +#endif + +#define SZ 4 // this is set to sizeof(RC4_INT) +// SZ==4 seems to be optimal. At least SZ==8 is not any faster, not for +// assembler implementation, while SZ==1 code is ~30% slower. +#if SZ==1 // RC4_INT is unsigned char +# define LDKEY ld1 +# define STKEY st1 +# define OFF 0 +#elif SZ==4 // RC4_INT is unsigned int +# define LDKEY ld4 +# define STKEY st4 +# define OFF 2 +#elif SZ==8 // RC4_INT is unsigned long +# define LDKEY ld8 +# define STKEY st8 +# define OFF 3 +#endif + +out=r8; // [expanded] output pointer +inp=r9; // [expanded] output pointer +prsave=r10; +key=r28; // [expanded] pointer to RC4_KEY +ksch=r29; // (key->data+255)[&~(sizeof(key->data)-1)] +xx=r30; +yy=r31; + +// void RC4(RC4_KEY *key,size_t len,const void *inp,void *out); +.global RC4# +.proc RC4# +.align 32 +.skip 16 +RC4: + .prologue + .fframe 0 + .save ar.pfs,r2 + .save ar.lc,r3 + .save pr,prsave +{ .mii; alloc r2=ar.pfs,4,12,0,16 + mov prsave=pr + ADDP key=0,in0 };; +{ .mib; cmp.eq p6,p0=0,in1 // len==0? + mov r3=ar.lc +(p6) br.ret.spnt.many b0 };; // emergency exit + + .body + .rotr dat[4],key_x[4],tx[2],rnd[2],key_y[2],ty[1]; + +{ .mib; LDKEY xx=[key],SZ // load key->x + add in1=-1,in1 // adjust len for loop counter + nop.b 0 } +{ .mib; ADDP inp=0,in2 + ADDP out=0,in3 + brp.loop.imp .Ltop,.Lexit-16 };; +{ .mmi; LDKEY yy=[key] // load key->y + add ksch=(255+1)*SZ,key // as ksch will be used with + // deposit instruction only, + // I don't have to &~255... + mov ar.lc=in1 } +{ .mmi; mov key_y[1]=r0 // guarantee inequality + // in first iteration + add xx=1,xx + mov pr.rot=1<<16 };; +{ .mii; nop.m 0 + dep key_x[1]=xx,ksch,OFF,8 + mov ar.ec=3 };; // note that epilogue counter + // is off by 1. I compensate + // for this at exit... +.Ltop: +// The loop is scheduled for 3*(n+2) spin-rate on Itanium 2, which +// theoretically gives asymptotic performance of clock frequency +// divided by 3 bytes per seconds, or 500MBps on 1.5GHz CPU. Measured +// performance however is distinctly lower than 1/4:-( The culplrit +// seems to be *(out++)=dat, which inadvertently splits the bundle, +// even though there is M-port available... Unrolling is due... +// Unrolled loop should collect output with variable shift instruction +// in order to avoid starvation for integer shifter... It should be +// possible to get pretty close to theoretical peak... +{ .mmi; (p16) LDKEY tx[0]=[key_x[1]] // tx=key[xx] + (p17) LDKEY ty[0]=[key_y[1]] // ty=key[yy] + (p18) dep rnd[1]=rnd[1],ksch,OFF,8} // &key[(tx+ty)&255] +{ .mmi; (p19) st1 [out]=dat[3],1 // *(out++)=dat + (p16) add xx=1,xx // x++ + (p16) cmp.ne.unc p20,p21=key_x[1],key_y[1] };; +{ .mmi; (p18) LDKEY rnd[1]=[rnd[1]] // rnd=key[(tx+ty)&255] + (p16) ld1 dat[0]=[inp],1 // dat=*(inp++) + (p16) dep key_x[0]=xx,ksch,OFF,8 } // &key[xx&255] +.pred.rel "mutex",p20,p21 +{ .mmi; (p21) add yy=yy,tx[1] // (p16) + (p20) add yy=yy,tx[0] // (p16) y+=tx + (p21) mov tx[0]=tx[1] };; // (p16) +{ .mmi; (p17) STKEY [key_y[1]]=tx[1] // key[yy]=tx + (p17) STKEY [key_x[2]]=ty[0] // key[xx]=ty + (p16) dep key_y[0]=yy,ksch,OFF,8 } // &key[yy&255] +{ .mmb; (p17) add rnd[0]=tx[1],ty[0] // tx+=ty + (p18) xor dat[2]=dat[2],rnd[1] // dat^=rnd + br.ctop.sptk .Ltop };; +.Lexit: +{ .mib; STKEY [key]=yy,-SZ // save key->y + mov pr=prsave,0x1ffff + nop.b 0 } +{ .mib; st1 [out]=dat[3],1 // compensate for truncated + // epilogue counter + add xx=-1,xx + nop.b 0 };; +{ .mib; STKEY [key]=xx // save key->x + mov ar.lc=r3 + br.ret.sptk.many b0 };; +.endp RC4# diff --git a/src/lib/libssl/src/crypto/rc4/rc4.h b/src/lib/libssl/src/crypto/rc4/rc4.h index 8722091f2e..dd90d9fde0 100644 --- a/src/lib/libssl/src/crypto/rc4/rc4.h +++ b/src/lib/libssl/src/crypto/rc4/rc4.h @@ -73,10 +73,17 @@ typedef struct rc4_key_st { RC4_INT x,y; RC4_INT data[256]; +#if defined(__ia64) || defined(__ia64__) || defined(_M_IA64) + /* see crypto/rc4/asm/rc4-ia64.S for further details... */ + RC4_INT pad[512-256-2]; +#endif } RC4_KEY; const char *RC4_options(void); +#ifdef OPENSSL_FIPS +void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); +#endif void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, unsigned char *outdata); diff --git a/src/lib/libssl/src/crypto/rc4/rc4_enc.c b/src/lib/libssl/src/crypto/rc4/rc4_enc.c index d5f18a3a70..81a97ea3b7 100644 --- a/src/lib/libssl/src/crypto/rc4/rc4_enc.c +++ b/src/lib/libssl/src/crypto/rc4/rc4_enc.c @@ -77,6 +77,10 @@ void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, x=key->x; y=key->y; d=key->data; +#if defined(__ia64) || defined(__ia64__) || defined(_M_IA64) + /* see crypto/rc4/asm/rc4-ia64.S for further details... */ + d=(RC4_INT *)(((size_t)(d+255))&~(sizeof(key->data)-1)); +#endif #if defined(RC4_CHUNK) /* diff --git a/src/lib/libssl/src/crypto/rc4/rc4_locl.h b/src/lib/libssl/src/crypto/rc4/rc4_locl.h index 3bb80b6ce9..c712e1632e 100644 --- a/src/lib/libssl/src/crypto/rc4/rc4_locl.h +++ b/src/lib/libssl/src/crypto/rc4/rc4_locl.h @@ -1,4 +1,5 @@ #ifndef HEADER_RC4_LOCL_H #define HEADER_RC4_LOCL_H #include +#include #endif diff --git a/src/lib/libssl/src/crypto/rc4/rc4_skey.c b/src/lib/libssl/src/crypto/rc4/rc4_skey.c index bb10c1ebe2..07234f061a 100644 --- a/src/lib/libssl/src/crypto/rc4/rc4_skey.c +++ b/src/lib/libssl/src/crypto/rc4/rc4_skey.c @@ -57,6 +57,7 @@ */ #include +#include #include "rc4_locl.h" #include @@ -85,7 +86,7 @@ const char *RC4_options(void) * Date: Wed, 14 Sep 1994 06:35:31 GMT */ -void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) +FIPS_NON_FIPS_VCIPHER_Init(RC4) { register RC4_INT tmp; register int id1,id2; @@ -93,6 +94,11 @@ void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) unsigned int i; d= &(key->data[0]); +#if defined(__ia64) || defined(__ia64__) || defined(_M_IA64) + /* see crypto/rc4/asm/rc4-ia64.S for further details... */ + d=(RC4_INT *)(((size_t)(d+255))&~(sizeof(key->data)-1)); +#endif + for (i=0; i<256; i++) d[i]=i; key->x = 0; diff --git a/src/lib/libssl/src/crypto/rc5/Makefile b/src/lib/libssl/src/crypto/rc5/Makefile new file mode 100644 index 0000000000..3a8d309b29 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc5/Makefile @@ -0,0 +1,110 @@ +# +# SSLeay/crypto/rc5/Makefile +# + +DIR= rc5 +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +RC5_ENC= rc5_enc.o +# or use +#DES_ENC= r586-elf.o + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=rc5test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c +LIBOBJ=rc5_skey.o rc5_ecb.o $(RC5_ENC) rc5cfb64.o rc5ofb64.o + +SRC= $(LIBSRC) + +EXHEADER= rc5.h +HEADER= rc5_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/r586-elf.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) rc5-586.pl elf $(CFLAGS) > r586-elf.s) + +# a.out +asm/r586-out.o: asm/r586unix.cpp + $(CPP) -DOUT asm/r586unix.cpp | as -o asm/r586-out.o + +# bsdi +asm/r586bsdi.o: asm/r586unix.cpp + $(CPP) -DBSDI asm/r586unix.cpp | sed 's/ :/:/' | as -o asm/r586bsdi.o + +asm/r586unix.cpp: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) rc5-586.pl cpp >r586unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/r586unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rc5_ecb.o: ../../include/openssl/opensslv.h ../../include/openssl/rc5.h +rc5_ecb.o: rc5_ecb.c rc5_locl.h +rc5_enc.o: ../../include/openssl/rc5.h rc5_enc.c rc5_locl.h +rc5_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +rc5_skey.o: ../../include/openssl/opensslconf.h +rc5_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc5.h +rc5_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rc5_skey.o: ../../include/openssl/symhacks.h rc5_locl.h rc5_skey.c +rc5cfb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5cfb64.c +rc5ofb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5ofb64.c diff --git a/src/lib/libssl/src/crypto/rc5/rc5.h b/src/lib/libssl/src/crypto/rc5/rc5.h index 4adfd2db5a..aa3f26920b 100644 --- a/src/lib/libssl/src/crypto/rc5/rc5.h +++ b/src/lib/libssl/src/crypto/rc5/rc5.h @@ -92,7 +92,10 @@ typedef struct rc5_key_st RC5_32_INT data[2*(RC5_16_ROUNDS+1)]; } RC5_32_KEY; - +#ifdef OPENSSL_FIPS +void private_RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, + int rounds); +#endif void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, int rounds); void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key, diff --git a/src/lib/libssl/src/crypto/ripemd/Makefile b/src/lib/libssl/src/crypto/ripemd/Makefile new file mode 100644 index 0000000000..dc086e3434 --- /dev/null +++ b/src/lib/libssl/src/crypto/ripemd/Makefile @@ -0,0 +1,111 @@ +# +# SSLeay/crypto/ripemd/Makefile +# + +DIR= ripemd +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +RIP_ASM_OBJ= + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=rmdtest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=rmd_dgst.c rmd_one.c +LIBOBJ=rmd_dgst.o rmd_one.o $(RMD160_ASM_OBJ) + +SRC= $(LIBSRC) + +EXHEADER= ripemd.h +HEADER= rmd_locl.h rmdconst.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/rm86-elf.s: asm/rmd-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rmd-586.pl elf $(CFLAGS) > rm86-elf.s) + +# a.out +asm/rm86-out.o: asm/rm86unix.cpp + $(CPP) -DOUT asm/rm86unix.cpp | as -o asm/rm86-out.o + +# bsdi +asm/rm86bsdi.o: asm/rm86unix.cpp + $(CPP) -DBSDI asm/rm86unix.cpp | sed 's/ :/:/' | as -o asm/rm86bsdi.o + +asm/rm86unix.cpp: asm/rmd-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rmd-586.pl cpp >rm86unix.cpp) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/rm86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rmd_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +rmd_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rmd_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +rmd_dgst.o: ../../include/openssl/opensslconf.h +rmd_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ripemd.h +rmd_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rmd_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h rmd_dgst.c +rmd_dgst.o: rmd_locl.h rmdconst.h +rmd_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +rmd_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +rmd_one.o: ../../include/openssl/ripemd.h ../../include/openssl/safestack.h +rmd_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rmd_one.o: rmd_one.c diff --git a/src/lib/libssl/src/crypto/ripemd/ripemd.h b/src/lib/libssl/src/crypto/ripemd/ripemd.h index 78d5f36560..7d0d998189 100644 --- a/src/lib/libssl/src/crypto/ripemd/ripemd.h +++ b/src/lib/libssl/src/crypto/ripemd/ripemd.h @@ -90,6 +90,9 @@ typedef struct RIPEMD160state_st int num; } RIPEMD160_CTX; +#ifdef OPENSSL_FIPS +int private_RIPEMD160_Init(RIPEMD160_CTX *c); +#endif int RIPEMD160_Init(RIPEMD160_CTX *c); int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, unsigned long len); int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); diff --git a/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c b/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c index f351f00eea..5dff6bafa1 100644 --- a/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c +++ b/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c @@ -58,6 +58,7 @@ #include #include "rmd_locl.h" +#include #include const char *RMD160_version="RIPE-MD160" OPENSSL_VERSION_PTEXT; @@ -69,7 +70,7 @@ const char *RMD160_version="RIPE-MD160" OPENSSL_VERSION_PTEXT; void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,int num); # endif -int RIPEMD160_Init(RIPEMD160_CTX *c) +FIPS_NON_FIPS_MD_Init(RIPEMD160) { c->A=RIPEMD160_A; c->B=RIPEMD160_B; diff --git a/src/lib/libssl/src/crypto/rsa/Makefile b/src/lib/libssl/src/crypto/rsa/Makefile new file mode 100644 index 0000000000..5748b0d3d0 --- /dev/null +++ b/src/lib/libssl/src/crypto/rsa/Makefile @@ -0,0 +1,239 @@ +# +# SSLeay/crypto/rsa/Makefile +# + +DIR= rsa +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=rsa_test.c +APPS= + +LIB=$(TOP)/libcrypto.a +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 rsa_oaep.c rsa_chk.c rsa_null.c \ + rsa_asn1.c +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 rsa_oaep.o rsa_chk.o rsa_null.o \ + rsa_asn1.o + +SRC= $(LIBSRC) + +EXHEADER= rsa.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +rsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +rsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +rsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +rsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +rsa_asn1.o: ../../include/openssl/opensslconf.h +rsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_asn1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_asn1.o: ../cryptlib.h rsa_asn1.c +rsa_chk.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_chk.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +rsa_chk.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_chk.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_chk.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_chk.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_chk.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_chk.o: rsa_chk.c +rsa_eay.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_eay.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_eay.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_eay.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_eay.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_eay.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_eay.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_eay.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_eay.c +rsa_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +rsa_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_err.o: rsa_err.c +rsa_gen.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_gen.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_gen.o: ../cryptlib.h rsa_gen.c +rsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +rsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +rsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +rsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +rsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +rsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_lib.o: ../../include/openssl/ui.h ../cryptlib.h rsa_lib.c +rsa_none.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_none.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_none.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_none.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_none.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_none.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_none.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_none.c +rsa_null.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_null.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_null.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_null.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_null.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_null.c +rsa_oaep.o: ../../e_os.h ../../include/openssl/aes.h +rsa_oaep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_oaep.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_oaep.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_oaep.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_oaep.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_oaep.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rsa_oaep.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rsa_oaep.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rsa_oaep.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rsa_oaep.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rsa_oaep.o: ../../include/openssl/opensslconf.h +rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_oaep.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h +rsa_oaep.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rsa_oaep.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rsa_oaep.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rsa_oaep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_oaep.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rsa_oaep.o: ../cryptlib.h rsa_oaep.c +rsa_pk1.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_pk1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_pk1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_pk1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_pk1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_pk1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_pk1.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_pk1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pk1.c +rsa_saos.o: ../../e_os.h ../../include/openssl/aes.h +rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_saos.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_saos.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_saos.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_saos.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rsa_saos.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rsa_saos.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rsa_saos.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rsa_saos.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rsa_saos.o: ../../include/openssl/opensslconf.h +rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_saos.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +rsa_saos.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rsa_saos.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rsa_saos.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rsa_saos.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_saos.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rsa_saos.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +rsa_saos.o: ../cryptlib.h rsa_saos.c +rsa_sign.o: ../../e_os.h ../../include/openssl/aes.h +rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h +rsa_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +rsa_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +rsa_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +rsa_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +rsa_sign.o: ../../include/openssl/opensslconf.h +rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +rsa_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +rsa_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +rsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +rsa_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +rsa_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +rsa_sign.o: ../cryptlib.h rsa_sign.c +rsa_ssl.o: ../../e_os.h ../../include/openssl/asn1.h +rsa_ssl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_ssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_ssl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +rsa_ssl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +rsa_ssl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +rsa_ssl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +rsa_ssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +rsa_ssl.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_ssl.c diff --git a/src/lib/libssl/src/crypto/rsa/rsa.h b/src/lib/libssl/src/crypto/rsa/rsa.h index 62fa745f79..fc3bb5f86d 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa.h +++ b/src/lib/libssl/src/crypto/rsa/rsa.h @@ -72,6 +72,10 @@ #error RSA is disabled. #endif +#if defined(OPENSSL_FIPS) +#define FIPS_RSA_SIZE_T int +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/src/lib/libssl/src/crypto/rsa/rsa_eay.c b/src/lib/libssl/src/crypto/rsa/rsa_eay.c index e0d286266e..d4caab3f95 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_eay.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_eay.c @@ -62,7 +62,7 @@ #include #include -#ifndef RSA_NULL +#if !defined(RSA_NULL) && !defined(OPENSSL_FIPS) static int RSA_eay_public_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa,int padding); diff --git a/src/lib/libssl/src/crypto/rsa/rsa_gen.c b/src/lib/libssl/src/crypto/rsa/rsa_gen.c index 00c25adbc5..adb5e34da5 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_gen.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_gen.c @@ -62,6 +62,8 @@ #include #include +#ifndef OPENSSL_FIPS + RSA *RSA_generate_key(int bits, unsigned long e_value, void (*callback)(int,int,void *), void *cb_arg) { @@ -195,3 +197,4 @@ err: return(rsa); } +#endif diff --git a/src/lib/libssl/src/crypto/rsa/rsa_saos.c b/src/lib/libssl/src/crypto/rsa/rsa_saos.c index f462716a57..24fc94835e 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_saos.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_saos.c @@ -139,8 +139,11 @@ int RSA_verify_ASN1_OCTET_STRING(int dtype, ret=1; err: if (sig != NULL) M_ASN1_OCTET_STRING_free(sig); - OPENSSL_cleanse(s,(unsigned int)siglen); - OPENSSL_free(s); + if (s != NULL) + { + OPENSSL_cleanse(s,(unsigned int)siglen); + OPENSSL_free(s); + } return(ret); } diff --git a/src/lib/libssl/src/crypto/rsa/rsa_sign.c b/src/lib/libssl/src/crypto/rsa/rsa_sign.c index 8a1e642183..cee09eccb1 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_sign.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_sign.c @@ -169,7 +169,7 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, } if((dtype == NID_md5_sha1) && (m_len != SSL_SIG_LENGTH) ) { RSAerr(RSA_F_RSA_VERIFY,RSA_R_INVALID_MESSAGE_LENGTH); - return(0); + goto err; } i=RSA_public_decrypt((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING); @@ -222,8 +222,11 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, } err: if (sig != NULL) X509_SIG_free(sig); - OPENSSL_cleanse(s,(unsigned int)siglen); - OPENSSL_free(s); + if (s != NULL) + { + OPENSSL_cleanse(s,(unsigned int)siglen); + OPENSSL_free(s); + } return(ret); } diff --git a/src/lib/libssl/src/crypto/sha/Makefile b/src/lib/libssl/src/crypto/sha/Makefile new file mode 100644 index 0000000000..0426786aa0 --- /dev/null +++ b/src/lib/libssl/src/crypto/sha/Makefile @@ -0,0 +1,127 @@ +# +# SSLeay/crypto/sha/Makefile +# + +DIR= sha +TOP= ../.. +CC= cc +CPP= $(CC) -E +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +SHA1_ASM_OBJ= + +CFLAGS= $(INCLUDES) $(CFLAG) +ASFLAGS= $(INCLUDES) $(ASFLAG) + +GENERAL=Makefile +TEST=shatest.c sha1test.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c +LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA1_ASM_OBJ) + +SRC= $(LIBSRC) + +EXHEADER= sha.h +HEADER= sha_locl.h $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +# elf +asm/sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > sx86-elf.s) + +# a.out +asm/sx86-out.o: asm/sx86unix.cpp + $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o + +# bsdi +asm/sx86bsdi.o: asm/sx86unix.cpp + $(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o + +asm/sx86unix.cpp: asm/sha1-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp) + +asm/sha1-ia64.s: asm/sha1-ia64.pl + (cd asm; $(PERL) sha1-ia64.pl $(CFLAGS) ) > $@ + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f asm/sx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +sha1_one.o: ../../include/openssl/opensslconf.h +sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +sha1_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +sha1_one.o: ../../include/openssl/symhacks.h sha1_one.c +sha1dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +sha1dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +sha1dgst.o: ../../include/openssl/opensslconf.h +sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +sha1dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +sha1dgst.o: ../../include/openssl/symhacks.h ../md32_common.h sha1dgst.c +sha1dgst.o: sha_locl.h +sha_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +sha_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +sha_dgst.o: ../../include/openssl/opensslconf.h +sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +sha_dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +sha_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h sha_dgst.c +sha_dgst.o: sha_locl.h +sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +sha_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +sha_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +sha_one.o: sha_one.c diff --git a/src/lib/libssl/src/crypto/sha/asm/sha1-586.pl b/src/lib/libssl/src/crypto/sha/asm/sha1-586.pl index e00f709553..041acc0348 100644 --- a/src/lib/libssl/src/crypto/sha/asm/sha1-586.pl +++ b/src/lib/libssl/src/crypto/sha/asm/sha1-586.pl @@ -405,7 +405,7 @@ sub sha1_block_data &mov(&DWP(16,$tmp1,"",0),$E); &cmp("esi","eax"); &mov(&DWP( 4,$tmp1,"",0),$B); - &jl(&label("start")); + &jb(&label("start")); &stack_pop(18+9); &pop("edi"); diff --git a/src/lib/libssl/src/crypto/sha/asm/sha1-ia64.pl b/src/lib/libssl/src/crypto/sha/asm/sha1-ia64.pl new file mode 100644 index 0000000000..cb9dfad124 --- /dev/null +++ b/src/lib/libssl/src/crypto/sha/asm/sha1-ia64.pl @@ -0,0 +1,549 @@ +#!/usr/bin/env perl +# +# ==================================================================== +# Written by Andy Polyakov for the OpenSSL +# project. Rights for redistribution and usage in source and binary +# forms are granted according to the OpenSSL license. +# ==================================================================== +# +# Eternal question is what's wrong with compiler generated code? The +# trick is that it's possible to reduce the number of shifts required +# to perform rotations by maintaining copy of 32-bit value in upper +# bits of 64-bit register. Just follow mux2 and shrp instructions... +# Performance under big-endian OS such as HP-UX is 179MBps*1GHz, which +# is >50% better than HP C and >2x better than gcc. As of this moment +# performance under little-endian OS such as Linux and Windows will be +# a bit lower, because data has to be picked in reverse byte-order. +# It's possible to resolve this issue by implementing third function, +# sha1_block_asm_data_order_aligned, which would temporarily flip +# BE field in User Mask register... + +$code=<<___; +.ident \"sha1-ia64.s, version 1.0\" +.ident \"IA-64 ISA artwork by Andy Polyakov \" +.explicit + +___ + + +if ($^O eq "hpux") { + $ADDP="addp4"; + for (@ARGV) { $ADDP="add" if (/[\+DD|\-mlp]64/); } +} else { $ADDP="add"; } +for (@ARGV) { $big_endian=1 if (/\-DB_ENDIAN/); + $big_endian=0 if (/\-DL_ENDIAN/); } +if (!defined($big_endian)) + { $big_endian=(unpack('L',pack('N',1))==1); } + +#$human=1; +if ($human) { # useful for visual code auditing... + ($A,$B,$C,$D,$E,$T) = ("A","B","C","D","E","T"); + ($h0,$h1,$h2,$h3,$h4) = ("h0","h1","h2","h3","h4"); + ($K_00_19, $K_20_39, $K_40_59, $K_60_79) = + ( "K_00_19","K_20_39","K_40_59","K_60_79" ); + @X= ( "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", + "X8", "X9","X10","X11","X12","X13","X14","X15" ); +} +else { + ($A,$B,$C,$D,$E,$T) = ("loc0","loc1","loc2","loc3","loc4","loc5"); + ($h0,$h1,$h2,$h3,$h4) = ("loc6","loc7","loc8","loc9","loc10"); + ($K_00_19, $K_20_39, $K_40_59, $K_60_79) = + ( "r14", "r15", "loc11", "loc12" ); + @X= ( "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", + "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31" ); +} + +sub BODY_00_15 { +local *code=shift; +local ($i,$a,$b,$c,$d,$e,$f,$unaligned)=@_; + +if ($unaligned) { + $code.=<<___; +{ .mmi; ld1 tmp0=[inp],2 // MSB + ld1 tmp1=[tmp3],2 };; +{ .mmi; ld1 tmp2=[inp],2 + ld1 $X[$i&0xf]=[tmp3],2 // LSB + dep tmp1=tmp0,tmp1,8,8 };; +{ .mii; cmp.ne p16,p0=r0,r0 // no misaligned prefetch + dep $X[$i&0xf]=tmp2,$X[$i&0xf],8,8;; + dep $X[$i&0xf]=tmp1,$X[$i&0xf],16,16 };; +{ .mmi; nop.m 0 +___ + } +elsif ($i<15) { + $code.=<<___; +{ .mmi; ld4 $X[($i+1)&0xf]=[inp],4 // prefetch +___ + } +else { + $code.=<<___; +{ .mmi; nop.m 0 +___ + } +if ($i<15) { + $code.=<<___; + and tmp0=$c,$b + dep.z tmp5=$a,5,27 } // a<<5 +{ .mmi; andcm tmp1=$d,$b + add tmp4=$e,$K_00_19 };; +{ .mmi; or tmp0=tmp0,tmp1 // F_00_19(b,c,d)=(b&c)|(~b&d) + add $f=tmp4,$X[$i&0xf] // f=xi+e+K_00_19 + extr.u tmp1=$a,27,5 };; // a>>27 +{ .mib; add $f=$f,tmp0 // f+=F_00_19(b,c,d) + shrp $b=tmp6,tmp6,2 } // b=ROTATE(b,30) +{ .mib; or tmp1=tmp1,tmp5 // ROTATE(a,5) + mux2 tmp6=$a,0x44 };; // see b in next iteration +{ .mii; add $f=$f,tmp1 // f+=ROTATE(a,5) + mux2 $X[$i&0xf]=$X[$i&0xf],0x44 + nop.i 0 };; + +___ + } +else { + $code.=<<___; + and tmp0=$c,$b + dep.z tmp5=$a,5,27 } // a<<5 ;;? +{ .mmi; andcm tmp1=$d,$b + add tmp4=$e,$K_00_19 };; +{ .mmi; or tmp0=tmp0,tmp1 // F_00_19(b,c,d)=(b&c)|(~b&d) + add $f=tmp4,$X[$i&0xf] // f=xi+e+K_00_19 + extr.u tmp1=$a,27,5 } // a>>27 +{ .mmi; xor tmp2=$X[($i+0+1)&0xf],$X[($i+2+1)&0xf] // +1 + xor tmp3=$X[($i+8+1)&0xf],$X[($i+13+1)&0xf] // +1 + nop.i 0 };; +{ .mmi; add $f=$f,tmp0 // f+=F_00_19(b,c,d) + xor tmp2=tmp2,tmp3 // +1 + shrp $b=tmp6,tmp6,2 } // b=ROTATE(b,30) +{ .mmi; or tmp1=tmp1,tmp5 // ROTATE(a,5) + mux2 tmp6=$a,0x44 };; // see b in next iteration +{ .mii; add $f=$f,tmp1 // f+=ROTATE(a,5) + shrp $e=tmp2,tmp2,31 // f+1=ROTATE(x[0]^x[2]^x[8]^x[13],1) + mux2 $X[$i&0xf]=$X[$i&0xf],0x44 };; + +___ + } +} + +sub BODY_16_19 { +local *code=shift; +local ($i,$a,$b,$c,$d,$e,$f)=@_; + +$code.=<<___; +{ .mmi; mov $X[$i&0xf]=$f // Xupdate + and tmp0=$c,$b + dep.z tmp5=$a,5,27 } // a<<5 +{ .mmi; andcm tmp1=$d,$b + add tmp4=$e,$K_00_19 };; +{ .mmi; or tmp0=tmp0,tmp1 // F_00_19(b,c,d)=(b&c)|(~b&d) + add $f=$f,tmp4 // f+=e+K_00_19 + extr.u tmp1=$a,27,5 } // a>>27 +{ .mmi; xor tmp2=$X[($i+0+1)&0xf],$X[($i+2+1)&0xf] // +1 + xor tmp3=$X[($i+8+1)&0xf],$X[($i+13+1)&0xf] // +1 + nop.i 0 };; +{ .mmi; add $f=$f,tmp0 // f+=F_00_19(b,c,d) + xor tmp2=tmp2,tmp3 // +1 + shrp $b=tmp6,tmp6,2 } // b=ROTATE(b,30) +{ .mmi; or tmp1=tmp1,tmp5 // ROTATE(a,5) + mux2 tmp6=$a,0x44 };; // see b in next iteration +{ .mii; add $f=$f,tmp1 // f+=ROTATE(a,5) + shrp $e=tmp2,tmp2,31 // f+1=ROTATE(x[0]^x[2]^x[8]^x[13],1) + nop.i 0 };; + +___ +} + +sub BODY_20_39 { +local *code=shift; +local ($i,$a,$b,$c,$d,$e,$f,$Konst)=@_; + $Konst = $K_20_39 if (!defined($Konst)); + +if ($i<79) { +$code.=<<___; +{ .mib; mov $X[$i&0xf]=$f // Xupdate + dep.z tmp5=$a,5,27 } // a<<5 +{ .mib; xor tmp0=$c,$b + add tmp4=$e,$Konst };; +{ .mmi; xor tmp0=tmp0,$d // F_20_39(b,c,d)=b^c^d + add $f=$f,tmp4 // f+=e+K_20_39 + extr.u tmp1=$a,27,5 } // a>>27 +{ .mmi; xor tmp2=$X[($i+0+1)&0xf],$X[($i+2+1)&0xf] // +1 + xor tmp3=$X[($i+8+1)&0xf],$X[($i+13+1)&0xf] // +1 + nop.i 0 };; +{ .mmi; add $f=$f,tmp0 // f+=F_20_39(b,c,d) + xor tmp2=tmp2,tmp3 // +1 + shrp $b=tmp6,tmp6,2 } // b=ROTATE(b,30) +{ .mmi; or tmp1=tmp1,tmp5 // ROTATE(a,5) + mux2 tmp6=$a,0x44 };; // see b in next iteration +{ .mii; add $f=$f,tmp1 // f+=ROTATE(a,5) + shrp $e=tmp2,tmp2,31 // f+1=ROTATE(x[0]^x[2]^x[8]^x[13],1) + nop.i 0 };; + +___ +} +else { +$code.=<<___; +{ .mib; mov $X[$i&0xf]=$f // Xupdate + dep.z tmp5=$a,5,27 } // a<<5 +{ .mib; xor tmp0=$c,$b + add tmp4=$e,$Konst };; +{ .mib; xor tmp0=tmp0,$d // F_20_39(b,c,d)=b^c^d + extr.u tmp1=$a,27,5 } // a>>27 +{ .mib; add $f=$f,tmp4 // f+=e+K_20_39 + add $h1=$h1,$a };; // wrap up +{ .mmi; +(p16) ld4.s $X[0]=[inp],4 // non-faulting prefetch + add $f=$f,tmp0 // f+=F_20_39(b,c,d) + shrp $b=tmp6,tmp6,2 } // b=ROTATE(b,30) ;;? +{ .mmi; or tmp1=tmp1,tmp5 // ROTATE(a,5) + add $h3=$h3,$c };; // wrap up +{ .mib; add tmp3=1,inp // used in unaligned codepath + add $f=$f,tmp1 } // f+=ROTATE(a,5) +{ .mib; add $h2=$h2,$b // wrap up + add $h4=$h4,$d };; // wrap up + +___ +} +} + +sub BODY_40_59 { +local *code=shift; +local ($i,$a,$b,$c,$d,$e,$f)=@_; + +$code.=<<___; +{ .mmi; mov $X[$i&0xf]=$f // Xupdate + and tmp0=$c,$b + dep.z tmp5=$a,5,27 } // a<<5 +{ .mmi; and tmp1=$d,$b + add tmp4=$e,$K_40_59 };; +{ .mmi; or tmp0=tmp0,tmp1 // (b&c)|(b&d) + add $f=$f,tmp4 // f+=e+K_40_59 + extr.u tmp1=$a,27,5 } // a>>27 +{ .mmi; and tmp4=$c,$d + xor tmp2=$X[($i+0+1)&0xf],$X[($i+2+1)&0xf] // +1 + xor tmp3=$X[($i+8+1)&0xf],$X[($i+13+1)&0xf] // +1 + };; +{ .mmi; or tmp1=tmp1,tmp5 // ROTATE(a,5) + xor tmp2=tmp2,tmp3 // +1 + shrp $b=tmp6,tmp6,2 } // b=ROTATE(b,30) +{ .mmi; or tmp0=tmp0,tmp4 // F_40_59(b,c,d)=(b&c)|(b&d)|(c&d) + mux2 tmp6=$a,0x44 };; // see b in next iteration +{ .mii; add $f=$f,tmp0 // f+=F_40_59(b,c,d) + shrp $e=tmp2,tmp2,31;; // f+1=ROTATE(x[0]^x[2]^x[8]^x[13],1) + add $f=$f,tmp1 };; // f+=ROTATE(a,5) + +___ +} +sub BODY_60_79 { &BODY_20_39(@_,$K_60_79); } + +$code.=<<___; +.text + +tmp0=r8; +tmp1=r9; +tmp2=r10; +tmp3=r11; +ctx=r32; // in0 +inp=r33; // in1 + +// void sha1_block_asm_host_order(SHA_CTX *c,const void *p,size_t num); +.global sha1_block_asm_host_order# +.proc sha1_block_asm_host_order# +.align 32 +sha1_block_asm_host_order: + .prologue + .fframe 0 + .save ar.pfs,r0 + .save ar.lc,r3 +{ .mmi; alloc tmp1=ar.pfs,3,15,0,0 + $ADDP tmp0=4,ctx + mov r3=ar.lc } +{ .mmi; $ADDP ctx=0,ctx + $ADDP inp=0,inp + mov r2=pr };; +tmp4=in2; +tmp5=loc13; +tmp6=loc14; + .body +{ .mlx; ld4 $h0=[ctx],8 + movl $K_00_19=0x5a827999 } +{ .mlx; ld4 $h1=[tmp0],8 + movl $K_20_39=0x6ed9eba1 };; +{ .mlx; ld4 $h2=[ctx],8 + movl $K_40_59=0x8f1bbcdc } +{ .mlx; ld4 $h3=[tmp0] + movl $K_60_79=0xca62c1d6 };; +{ .mmi; ld4 $h4=[ctx],-16 + add in2=-1,in2 // adjust num for ar.lc + mov ar.ec=1 };; +{ .mmi; ld4 $X[0]=[inp],4 // prefetch + cmp.ne p16,p0=r0,in2 // prefecth at loop end + mov ar.lc=in2 };; // brp.loop.imp: too far + +.Lhtop: +{ .mmi; mov $A=$h0 + mov $B=$h1 + mux2 tmp6=$h1,0x44 } +{ .mmi; mov $C=$h2 + mov $D=$h3 + mov $E=$h4 };; + +___ + + &BODY_00_15(\$code, 0,$A,$B,$C,$D,$E,$T); + &BODY_00_15(\$code, 1,$T,$A,$B,$C,$D,$E); + &BODY_00_15(\$code, 2,$E,$T,$A,$B,$C,$D); + &BODY_00_15(\$code, 3,$D,$E,$T,$A,$B,$C); + &BODY_00_15(\$code, 4,$C,$D,$E,$T,$A,$B); + &BODY_00_15(\$code, 5,$B,$C,$D,$E,$T,$A); + &BODY_00_15(\$code, 6,$A,$B,$C,$D,$E,$T); + &BODY_00_15(\$code, 7,$T,$A,$B,$C,$D,$E); + &BODY_00_15(\$code, 8,$E,$T,$A,$B,$C,$D); + &BODY_00_15(\$code, 9,$D,$E,$T,$A,$B,$C); + &BODY_00_15(\$code,10,$C,$D,$E,$T,$A,$B); + &BODY_00_15(\$code,11,$B,$C,$D,$E,$T,$A); + &BODY_00_15(\$code,12,$A,$B,$C,$D,$E,$T); + &BODY_00_15(\$code,13,$T,$A,$B,$C,$D,$E); + &BODY_00_15(\$code,14,$E,$T,$A,$B,$C,$D); + &BODY_00_15(\$code,15,$D,$E,$T,$A,$B,$C); + + &BODY_16_19(\$code,16,$C,$D,$E,$T,$A,$B); + &BODY_16_19(\$code,17,$B,$C,$D,$E,$T,$A); + &BODY_16_19(\$code,18,$A,$B,$C,$D,$E,$T); + &BODY_16_19(\$code,19,$T,$A,$B,$C,$D,$E); + + &BODY_20_39(\$code,20,$E,$T,$A,$B,$C,$D); + &BODY_20_39(\$code,21,$D,$E,$T,$A,$B,$C); + &BODY_20_39(\$code,22,$C,$D,$E,$T,$A,$B); + &BODY_20_39(\$code,23,$B,$C,$D,$E,$T,$A); + &BODY_20_39(\$code,24,$A,$B,$C,$D,$E,$T); + &BODY_20_39(\$code,25,$T,$A,$B,$C,$D,$E); + &BODY_20_39(\$code,26,$E,$T,$A,$B,$C,$D); + &BODY_20_39(\$code,27,$D,$E,$T,$A,$B,$C); + &BODY_20_39(\$code,28,$C,$D,$E,$T,$A,$B); + &BODY_20_39(\$code,29,$B,$C,$D,$E,$T,$A); + &BODY_20_39(\$code,30,$A,$B,$C,$D,$E,$T); + &BODY_20_39(\$code,31,$T,$A,$B,$C,$D,$E); + &BODY_20_39(\$code,32,$E,$T,$A,$B,$C,$D); + &BODY_20_39(\$code,33,$D,$E,$T,$A,$B,$C); + &BODY_20_39(\$code,34,$C,$D,$E,$T,$A,$B); + &BODY_20_39(\$code,35,$B,$C,$D,$E,$T,$A); + &BODY_20_39(\$code,36,$A,$B,$C,$D,$E,$T); + &BODY_20_39(\$code,37,$T,$A,$B,$C,$D,$E); + &BODY_20_39(\$code,38,$E,$T,$A,$B,$C,$D); + &BODY_20_39(\$code,39,$D,$E,$T,$A,$B,$C); + + &BODY_40_59(\$code,40,$C,$D,$E,$T,$A,$B); + &BODY_40_59(\$code,41,$B,$C,$D,$E,$T,$A); + &BODY_40_59(\$code,42,$A,$B,$C,$D,$E,$T); + &BODY_40_59(\$code,43,$T,$A,$B,$C,$D,$E); + &BODY_40_59(\$code,44,$E,$T,$A,$B,$C,$D); + &BODY_40_59(\$code,45,$D,$E,$T,$A,$B,$C); + &BODY_40_59(\$code,46,$C,$D,$E,$T,$A,$B); + &BODY_40_59(\$code,47,$B,$C,$D,$E,$T,$A); + &BODY_40_59(\$code,48,$A,$B,$C,$D,$E,$T); + &BODY_40_59(\$code,49,$T,$A,$B,$C,$D,$E); + &BODY_40_59(\$code,50,$E,$T,$A,$B,$C,$D); + &BODY_40_59(\$code,51,$D,$E,$T,$A,$B,$C); + &BODY_40_59(\$code,52,$C,$D,$E,$T,$A,$B); + &BODY_40_59(\$code,53,$B,$C,$D,$E,$T,$A); + &BODY_40_59(\$code,54,$A,$B,$C,$D,$E,$T); + &BODY_40_59(\$code,55,$T,$A,$B,$C,$D,$E); + &BODY_40_59(\$code,56,$E,$T,$A,$B,$C,$D); + &BODY_40_59(\$code,57,$D,$E,$T,$A,$B,$C); + &BODY_40_59(\$code,58,$C,$D,$E,$T,$A,$B); + &BODY_40_59(\$code,59,$B,$C,$D,$E,$T,$A); + + &BODY_60_79(\$code,60,$A,$B,$C,$D,$E,$T); + &BODY_60_79(\$code,61,$T,$A,$B,$C,$D,$E); + &BODY_60_79(\$code,62,$E,$T,$A,$B,$C,$D); + &BODY_60_79(\$code,63,$D,$E,$T,$A,$B,$C); + &BODY_60_79(\$code,64,$C,$D,$E,$T,$A,$B); + &BODY_60_79(\$code,65,$B,$C,$D,$E,$T,$A); + &BODY_60_79(\$code,66,$A,$B,$C,$D,$E,$T); + &BODY_60_79(\$code,67,$T,$A,$B,$C,$D,$E); + &BODY_60_79(\$code,68,$E,$T,$A,$B,$C,$D); + &BODY_60_79(\$code,69,$D,$E,$T,$A,$B,$C); + &BODY_60_79(\$code,70,$C,$D,$E,$T,$A,$B); + &BODY_60_79(\$code,71,$B,$C,$D,$E,$T,$A); + &BODY_60_79(\$code,72,$A,$B,$C,$D,$E,$T); + &BODY_60_79(\$code,73,$T,$A,$B,$C,$D,$E); + &BODY_60_79(\$code,74,$E,$T,$A,$B,$C,$D); + &BODY_60_79(\$code,75,$D,$E,$T,$A,$B,$C); + &BODY_60_79(\$code,76,$C,$D,$E,$T,$A,$B); + &BODY_60_79(\$code,77,$B,$C,$D,$E,$T,$A); + &BODY_60_79(\$code,78,$A,$B,$C,$D,$E,$T); + &BODY_60_79(\$code,79,$T,$A,$B,$C,$D,$E); + +$code.=<<___; +{ .mmb; add $h0=$h0,$E + nop.m 0 + br.ctop.dptk.many .Lhtop };; +.Lhend: +{ .mmi; add tmp0=4,ctx + mov ar.lc=r3 };; +{ .mmi; st4 [ctx]=$h0,8 + st4 [tmp0]=$h1,8 };; +{ .mmi; st4 [ctx]=$h2,8 + st4 [tmp0]=$h3 };; +{ .mib; st4 [ctx]=$h4,-16 + mov pr=r2,0x1ffff + br.ret.sptk.many b0 };; +.endp sha1_block_asm_host_order# +___ + + +$code.=<<___; +// void sha1_block_asm_data_order(SHA_CTX *c,const void *p,size_t num); +.global sha1_block_asm_data_order# +.proc sha1_block_asm_data_order# +.align 32 +sha1_block_asm_data_order: +___ +$code.=<<___ if ($big_endian); +{ .mmi; and r2=3,inp };; +{ .mib; cmp.eq p6,p0=r0,r2 +(p6) br.dptk.many sha1_block_asm_host_order };; +___ +$code.=<<___; + .prologue + .fframe 0 + .save ar.pfs,r0 + .save ar.lc,r3 +{ .mmi; alloc tmp1=ar.pfs,3,15,0,0 + $ADDP tmp0=4,ctx + mov r3=ar.lc } +{ .mmi; $ADDP ctx=0,ctx + $ADDP inp=0,inp + mov r2=pr };; +tmp4=in2; +tmp5=loc13; +tmp6=loc14; + .body +{ .mlx; ld4 $h0=[ctx],8 + movl $K_00_19=0x5a827999 } +{ .mlx; ld4 $h1=[tmp0],8 + movl $K_20_39=0x6ed9eba1 };; +{ .mlx; ld4 $h2=[ctx],8 + movl $K_40_59=0x8f1bbcdc } +{ .mlx; ld4 $h3=[tmp0] + movl $K_60_79=0xca62c1d6 };; +{ .mmi; ld4 $h4=[ctx],-16 + add in2=-1,in2 // adjust num for ar.lc + mov ar.ec=1 };; +{ .mmi; nop.m 0 + add tmp3=1,inp + mov ar.lc=in2 };; // brp.loop.imp: too far + +.Ldtop: +{ .mmi; mov $A=$h0 + mov $B=$h1 + mux2 tmp6=$h1,0x44 } +{ .mmi; mov $C=$h2 + mov $D=$h3 + mov $E=$h4 };; + +___ + + &BODY_00_15(\$code, 0,$A,$B,$C,$D,$E,$T,1); + &BODY_00_15(\$code, 1,$T,$A,$B,$C,$D,$E,1); + &BODY_00_15(\$code, 2,$E,$T,$A,$B,$C,$D,1); + &BODY_00_15(\$code, 3,$D,$E,$T,$A,$B,$C,1); + &BODY_00_15(\$code, 4,$C,$D,$E,$T,$A,$B,1); + &BODY_00_15(\$code, 5,$B,$C,$D,$E,$T,$A,1); + &BODY_00_15(\$code, 6,$A,$B,$C,$D,$E,$T,1); + &BODY_00_15(\$code, 7,$T,$A,$B,$C,$D,$E,1); + &BODY_00_15(\$code, 8,$E,$T,$A,$B,$C,$D,1); + &BODY_00_15(\$code, 9,$D,$E,$T,$A,$B,$C,1); + &BODY_00_15(\$code,10,$C,$D,$E,$T,$A,$B,1); + &BODY_00_15(\$code,11,$B,$C,$D,$E,$T,$A,1); + &BODY_00_15(\$code,12,$A,$B,$C,$D,$E,$T,1); + &BODY_00_15(\$code,13,$T,$A,$B,$C,$D,$E,1); + &BODY_00_15(\$code,14,$E,$T,$A,$B,$C,$D,1); + &BODY_00_15(\$code,15,$D,$E,$T,$A,$B,$C,1); + + &BODY_16_19(\$code,16,$C,$D,$E,$T,$A,$B); + &BODY_16_19(\$code,17,$B,$C,$D,$E,$T,$A); + &BODY_16_19(\$code,18,$A,$B,$C,$D,$E,$T); + &BODY_16_19(\$code,19,$T,$A,$B,$C,$D,$E); + + &BODY_20_39(\$code,20,$E,$T,$A,$B,$C,$D); + &BODY_20_39(\$code,21,$D,$E,$T,$A,$B,$C); + &BODY_20_39(\$code,22,$C,$D,$E,$T,$A,$B); + &BODY_20_39(\$code,23,$B,$C,$D,$E,$T,$A); + &BODY_20_39(\$code,24,$A,$B,$C,$D,$E,$T); + &BODY_20_39(\$code,25,$T,$A,$B,$C,$D,$E); + &BODY_20_39(\$code,26,$E,$T,$A,$B,$C,$D); + &BODY_20_39(\$code,27,$D,$E,$T,$A,$B,$C); + &BODY_20_39(\$code,28,$C,$D,$E,$T,$A,$B); + &BODY_20_39(\$code,29,$B,$C,$D,$E,$T,$A); + &BODY_20_39(\$code,30,$A,$B,$C,$D,$E,$T); + &BODY_20_39(\$code,31,$T,$A,$B,$C,$D,$E); + &BODY_20_39(\$code,32,$E,$T,$A,$B,$C,$D); + &BODY_20_39(\$code,33,$D,$E,$T,$A,$B,$C); + &BODY_20_39(\$code,34,$C,$D,$E,$T,$A,$B); + &BODY_20_39(\$code,35,$B,$C,$D,$E,$T,$A); + &BODY_20_39(\$code,36,$A,$B,$C,$D,$E,$T); + &BODY_20_39(\$code,37,$T,$A,$B,$C,$D,$E); + &BODY_20_39(\$code,38,$E,$T,$A,$B,$C,$D); + &BODY_20_39(\$code,39,$D,$E,$T,$A,$B,$C); + + &BODY_40_59(\$code,40,$C,$D,$E,$T,$A,$B); + &BODY_40_59(\$code,41,$B,$C,$D,$E,$T,$A); + &BODY_40_59(\$code,42,$A,$B,$C,$D,$E,$T); + &BODY_40_59(\$code,43,$T,$A,$B,$C,$D,$E); + &BODY_40_59(\$code,44,$E,$T,$A,$B,$C,$D); + &BODY_40_59(\$code,45,$D,$E,$T,$A,$B,$C); + &BODY_40_59(\$code,46,$C,$D,$E,$T,$A,$B); + &BODY_40_59(\$code,47,$B,$C,$D,$E,$T,$A); + &BODY_40_59(\$code,48,$A,$B,$C,$D,$E,$T); + &BODY_40_59(\$code,49,$T,$A,$B,$C,$D,$E); + &BODY_40_59(\$code,50,$E,$T,$A,$B,$C,$D); + &BODY_40_59(\$code,51,$D,$E,$T,$A,$B,$C); + &BODY_40_59(\$code,52,$C,$D,$E,$T,$A,$B); + &BODY_40_59(\$code,53,$B,$C,$D,$E,$T,$A); + &BODY_40_59(\$code,54,$A,$B,$C,$D,$E,$T); + &BODY_40_59(\$code,55,$T,$A,$B,$C,$D,$E); + &BODY_40_59(\$code,56,$E,$T,$A,$B,$C,$D); + &BODY_40_59(\$code,57,$D,$E,$T,$A,$B,$C); + &BODY_40_59(\$code,58,$C,$D,$E,$T,$A,$B); + &BODY_40_59(\$code,59,$B,$C,$D,$E,$T,$A); + + &BODY_60_79(\$code,60,$A,$B,$C,$D,$E,$T); + &BODY_60_79(\$code,61,$T,$A,$B,$C,$D,$E); + &BODY_60_79(\$code,62,$E,$T,$A,$B,$C,$D); + &BODY_60_79(\$code,63,$D,$E,$T,$A,$B,$C); + &BODY_60_79(\$code,64,$C,$D,$E,$T,$A,$B); + &BODY_60_79(\$code,65,$B,$C,$D,$E,$T,$A); + &BODY_60_79(\$code,66,$A,$B,$C,$D,$E,$T); + &BODY_60_79(\$code,67,$T,$A,$B,$C,$D,$E); + &BODY_60_79(\$code,68,$E,$T,$A,$B,$C,$D); + &BODY_60_79(\$code,69,$D,$E,$T,$A,$B,$C); + &BODY_60_79(\$code,70,$C,$D,$E,$T,$A,$B); + &BODY_60_79(\$code,71,$B,$C,$D,$E,$T,$A); + &BODY_60_79(\$code,72,$A,$B,$C,$D,$E,$T); + &BODY_60_79(\$code,73,$T,$A,$B,$C,$D,$E); + &BODY_60_79(\$code,74,$E,$T,$A,$B,$C,$D); + &BODY_60_79(\$code,75,$D,$E,$T,$A,$B,$C); + &BODY_60_79(\$code,76,$C,$D,$E,$T,$A,$B); + &BODY_60_79(\$code,77,$B,$C,$D,$E,$T,$A); + &BODY_60_79(\$code,78,$A,$B,$C,$D,$E,$T); + &BODY_60_79(\$code,79,$T,$A,$B,$C,$D,$E); + +$code.=<<___; +{ .mmb; add $h0=$h0,$E + nop.m 0 + br.ctop.dptk.many .Ldtop };; +.Ldend: +{ .mmi; add tmp0=4,ctx + mov ar.lc=r3 };; +{ .mmi; st4 [ctx]=$h0,8 + st4 [tmp0]=$h1,8 };; +{ .mmi; st4 [ctx]=$h2,8 + st4 [tmp0]=$h3 };; +{ .mib; st4 [ctx]=$h4,-16 + mov pr=r2,0x1ffff + br.ret.sptk.many b0 };; +.endp sha1_block_asm_data_order# +___ + +print $code; diff --git a/src/lib/libssl/src/crypto/sha/sha.h b/src/lib/libssl/src/crypto/sha/sha.h index 3fd54a10cc..79c07b0fd1 100644 --- a/src/lib/libssl/src/crypto/sha/sha.h +++ b/src/lib/libssl/src/crypto/sha/sha.h @@ -69,6 +69,10 @@ extern "C" { #error SHA is disabled. #endif +#if defined(OPENSSL_FIPS) +#define FIPS_SHA_SIZE_T unsigned long +#endif + /* * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then ! @@ -101,6 +105,9 @@ typedef struct SHAstate_st } SHA_CTX; #ifndef OPENSSL_NO_SHA0 +#ifdef OPENSSL_FIPS +int private_SHA_Init(SHA_CTX *c); +#endif int SHA_Init(SHA_CTX *c); int SHA_Update(SHA_CTX *c, const void *data, unsigned long len); int SHA_Final(unsigned char *md, SHA_CTX *c); diff --git a/src/lib/libssl/src/crypto/sha/sha1dgst.c b/src/lib/libssl/src/crypto/sha/sha1dgst.c index 182f65982a..1e2009b760 100644 --- a/src/lib/libssl/src/crypto/sha/sha1dgst.c +++ b/src/lib/libssl/src/crypto/sha/sha1dgst.c @@ -62,12 +62,20 @@ #define SHA_1 #include +#include +#ifndef OPENSSL_FIPS const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT; /* The implementation is in ../md32_common.h */ #include "sha_locl.h" +#else /* ndef OPENSSL_FIPS */ + +static void *dummy=&dummy; + +#endif /* ndef OPENSSL_FIPS */ + #endif diff --git a/src/lib/libssl/src/crypto/sha/sha_locl.h b/src/lib/libssl/src/crypto/sha/sha_locl.h index 2dd63a62a6..a3623f72da 100644 --- a/src/lib/libssl/src/crypto/sha/sha_locl.h +++ b/src/lib/libssl/src/crypto/sha/sha_locl.h @@ -121,6 +121,11 @@ # define sha1_block_data_order sha1_block_asm_data_order # define DONT_IMPLEMENT_BLOCK_DATA_ORDER # define HASH_BLOCK_DATA_ORDER_ALIGNED sha1_block_asm_data_order +# elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) +# define sha1_block_host_order sha1_block_asm_host_order +# define DONT_IMPLEMENT_BLOCK_HOST_ORDER +# define sha1_block_data_order sha1_block_asm_data_order +# define DONT_IMPLEMENT_BLOCK_DATA_ORDER # endif # endif void sha1_block_host_order (SHA_CTX *c, const void *p,int num); @@ -138,7 +143,11 @@ #define INIT_DATA_h3 0x10325476UL #define INIT_DATA_h4 0xc3d2e1f0UL +#if defined(SHA_0) && defined(OPENSSL_FIPS) +FIPS_NON_FIPS_MD_Init(SHA) +#else int HASH_INIT (SHA_CTX *c) +#endif { c->h0=INIT_DATA_h0; c->h1=INIT_DATA_h1; diff --git a/src/lib/libssl/src/crypto/sha/shatest.c b/src/lib/libssl/src/crypto/sha/shatest.c index 5d2b1d3b1a..ff702aa53e 100644 --- a/src/lib/libssl/src/crypto/sha/shatest.c +++ b/src/lib/libssl/src/crypto/sha/shatest.c @@ -62,10 +62,10 @@ #include "../e_os.h" -#ifdef OPENSSL_NO_SHA +#if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA0) int main(int argc, char *argv[]) { - printf("No SHA support\n"); + printf("No SHA0 support\n"); return(0); } #else diff --git a/src/lib/libssl/src/crypto/stack/Makefile b/src/lib/libssl/src/crypto/stack/Makefile new file mode 100644 index 0000000000..4d5199a000 --- /dev/null +++ b/src/lib/libssl/src/crypto/stack/Makefile @@ -0,0 +1,86 @@ +# +# SSLeay/crypto/stack/Makefile +# + +DIR= stack +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=stack.c +LIBOBJ=stack.o + +SRC= $(LIBSRC) + +EXHEADER= stack.h safestack.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +stack.o: ../../e_os.h ../../include/openssl/bio.h +stack.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +stack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +stack.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +stack.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +stack.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +stack.o: ../cryptlib.h stack.c diff --git a/src/lib/libssl/src/crypto/stack/safestack.h b/src/lib/libssl/src/crypto/stack/safestack.h index ed9ed2c23a..bd1121c279 100644 --- a/src/lib/libssl/src/crypto/stack/safestack.h +++ b/src/lib/libssl/src/crypto/stack/safestack.h @@ -113,6 +113,8 @@ STACK_OF(type) \ ((type * (*)(STACK_OF(type) *))sk_pop)(st) #define SKM_sk_sort(type, st) \ ((void (*)(STACK_OF(type) *))sk_sort)(st) +#define SKM_sk_is_sorted(type, st) \ + ((int (*)(const STACK_OF(type) *))sk_is_sorted)(st) #define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ ((STACK_OF(type) * (*) (STACK_OF(type) **,unsigned char **, long , \ @@ -187,6 +189,8 @@ STACK_OF(type) \ ((type *)sk_pop(st)) #define SKM_sk_sort(type, st) \ sk_sort(st) +#define SKM_sk_is_sorted(type, st) \ + sk_is_sorted(st) #define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ d2i_ASN1_SET(st,pp,length, (char *(*)())d2i_func, (void (*)(void *))free_func, ex_tag,ex_class) @@ -223,6 +227,7 @@ STACK_OF(type) \ #define sk_ACCESS_DESCRIPTION_shift(st) SKM_sk_shift(ACCESS_DESCRIPTION, (st)) #define sk_ACCESS_DESCRIPTION_pop(st) SKM_sk_pop(ACCESS_DESCRIPTION, (st)) #define sk_ACCESS_DESCRIPTION_sort(st) SKM_sk_sort(ACCESS_DESCRIPTION, (st)) +#define sk_ACCESS_DESCRIPTION_is_sorted(st) SKM_sk_is_sorted(ACCESS_DESCRIPTION, (st)) #define sk_ASN1_GENERALSTRING_new(st) SKM_sk_new(ASN1_GENERALSTRING, (st)) #define sk_ASN1_GENERALSTRING_new_null() SKM_sk_new_null(ASN1_GENERALSTRING) @@ -243,6 +248,7 @@ STACK_OF(type) \ #define sk_ASN1_GENERALSTRING_shift(st) SKM_sk_shift(ASN1_GENERALSTRING, (st)) #define sk_ASN1_GENERALSTRING_pop(st) SKM_sk_pop(ASN1_GENERALSTRING, (st)) #define sk_ASN1_GENERALSTRING_sort(st) SKM_sk_sort(ASN1_GENERALSTRING, (st)) +#define sk_ASN1_GENERALSTRING_is_sorted(st) SKM_sk_is_sorted(ASN1_GENERALSTRING, (st)) #define sk_ASN1_INTEGER_new(st) SKM_sk_new(ASN1_INTEGER, (st)) #define sk_ASN1_INTEGER_new_null() SKM_sk_new_null(ASN1_INTEGER) @@ -263,6 +269,7 @@ STACK_OF(type) \ #define sk_ASN1_INTEGER_shift(st) SKM_sk_shift(ASN1_INTEGER, (st)) #define sk_ASN1_INTEGER_pop(st) SKM_sk_pop(ASN1_INTEGER, (st)) #define sk_ASN1_INTEGER_sort(st) SKM_sk_sort(ASN1_INTEGER, (st)) +#define sk_ASN1_INTEGER_is_sorted(st) SKM_sk_is_sorted(ASN1_INTEGER, (st)) #define sk_ASN1_OBJECT_new(st) SKM_sk_new(ASN1_OBJECT, (st)) #define sk_ASN1_OBJECT_new_null() SKM_sk_new_null(ASN1_OBJECT) @@ -283,6 +290,7 @@ STACK_OF(type) \ #define sk_ASN1_OBJECT_shift(st) SKM_sk_shift(ASN1_OBJECT, (st)) #define sk_ASN1_OBJECT_pop(st) SKM_sk_pop(ASN1_OBJECT, (st)) #define sk_ASN1_OBJECT_sort(st) SKM_sk_sort(ASN1_OBJECT, (st)) +#define sk_ASN1_OBJECT_is_sorted(st) SKM_sk_is_sorted(ASN1_OBJECT, (st)) #define sk_ASN1_STRING_TABLE_new(st) SKM_sk_new(ASN1_STRING_TABLE, (st)) #define sk_ASN1_STRING_TABLE_new_null() SKM_sk_new_null(ASN1_STRING_TABLE) @@ -303,6 +311,7 @@ STACK_OF(type) \ #define sk_ASN1_STRING_TABLE_shift(st) SKM_sk_shift(ASN1_STRING_TABLE, (st)) #define sk_ASN1_STRING_TABLE_pop(st) SKM_sk_pop(ASN1_STRING_TABLE, (st)) #define sk_ASN1_STRING_TABLE_sort(st) SKM_sk_sort(ASN1_STRING_TABLE, (st)) +#define sk_ASN1_STRING_TABLE_is_sorted(st) SKM_sk_is_sorted(ASN1_STRING_TABLE, (st)) #define sk_ASN1_TYPE_new(st) SKM_sk_new(ASN1_TYPE, (st)) #define sk_ASN1_TYPE_new_null() SKM_sk_new_null(ASN1_TYPE) @@ -323,6 +332,7 @@ STACK_OF(type) \ #define sk_ASN1_TYPE_shift(st) SKM_sk_shift(ASN1_TYPE, (st)) #define sk_ASN1_TYPE_pop(st) SKM_sk_pop(ASN1_TYPE, (st)) #define sk_ASN1_TYPE_sort(st) SKM_sk_sort(ASN1_TYPE, (st)) +#define sk_ASN1_TYPE_is_sorted(st) SKM_sk_is_sorted(ASN1_TYPE, (st)) #define sk_ASN1_VALUE_new(st) SKM_sk_new(ASN1_VALUE, (st)) #define sk_ASN1_VALUE_new_null() SKM_sk_new_null(ASN1_VALUE) @@ -343,6 +353,7 @@ STACK_OF(type) \ #define sk_ASN1_VALUE_shift(st) SKM_sk_shift(ASN1_VALUE, (st)) #define sk_ASN1_VALUE_pop(st) SKM_sk_pop(ASN1_VALUE, (st)) #define sk_ASN1_VALUE_sort(st) SKM_sk_sort(ASN1_VALUE, (st)) +#define sk_ASN1_VALUE_is_sorted(st) SKM_sk_is_sorted(ASN1_VALUE, (st)) #define sk_BIO_new(st) SKM_sk_new(BIO, (st)) #define sk_BIO_new_null() SKM_sk_new_null(BIO) @@ -363,6 +374,7 @@ STACK_OF(type) \ #define sk_BIO_shift(st) SKM_sk_shift(BIO, (st)) #define sk_BIO_pop(st) SKM_sk_pop(BIO, (st)) #define sk_BIO_sort(st) SKM_sk_sort(BIO, (st)) +#define sk_BIO_is_sorted(st) SKM_sk_is_sorted(BIO, (st)) #define sk_CONF_IMODULE_new(st) SKM_sk_new(CONF_IMODULE, (st)) #define sk_CONF_IMODULE_new_null() SKM_sk_new_null(CONF_IMODULE) @@ -383,6 +395,7 @@ STACK_OF(type) \ #define sk_CONF_IMODULE_shift(st) SKM_sk_shift(CONF_IMODULE, (st)) #define sk_CONF_IMODULE_pop(st) SKM_sk_pop(CONF_IMODULE, (st)) #define sk_CONF_IMODULE_sort(st) SKM_sk_sort(CONF_IMODULE, (st)) +#define sk_CONF_IMODULE_is_sorted(st) SKM_sk_is_sorted(CONF_IMODULE, (st)) #define sk_CONF_MODULE_new(st) SKM_sk_new(CONF_MODULE, (st)) #define sk_CONF_MODULE_new_null() SKM_sk_new_null(CONF_MODULE) @@ -403,6 +416,7 @@ STACK_OF(type) \ #define sk_CONF_MODULE_shift(st) SKM_sk_shift(CONF_MODULE, (st)) #define sk_CONF_MODULE_pop(st) SKM_sk_pop(CONF_MODULE, (st)) #define sk_CONF_MODULE_sort(st) SKM_sk_sort(CONF_MODULE, (st)) +#define sk_CONF_MODULE_is_sorted(st) SKM_sk_is_sorted(CONF_MODULE, (st)) #define sk_CONF_VALUE_new(st) SKM_sk_new(CONF_VALUE, (st)) #define sk_CONF_VALUE_new_null() SKM_sk_new_null(CONF_VALUE) @@ -423,6 +437,7 @@ STACK_OF(type) \ #define sk_CONF_VALUE_shift(st) SKM_sk_shift(CONF_VALUE, (st)) #define sk_CONF_VALUE_pop(st) SKM_sk_pop(CONF_VALUE, (st)) #define sk_CONF_VALUE_sort(st) SKM_sk_sort(CONF_VALUE, (st)) +#define sk_CONF_VALUE_is_sorted(st) SKM_sk_is_sorted(CONF_VALUE, (st)) #define sk_CRYPTO_EX_DATA_FUNCS_new(st) SKM_sk_new(CRYPTO_EX_DATA_FUNCS, (st)) #define sk_CRYPTO_EX_DATA_FUNCS_new_null() SKM_sk_new_null(CRYPTO_EX_DATA_FUNCS) @@ -443,6 +458,7 @@ STACK_OF(type) \ #define sk_CRYPTO_EX_DATA_FUNCS_shift(st) SKM_sk_shift(CRYPTO_EX_DATA_FUNCS, (st)) #define sk_CRYPTO_EX_DATA_FUNCS_pop(st) SKM_sk_pop(CRYPTO_EX_DATA_FUNCS, (st)) #define sk_CRYPTO_EX_DATA_FUNCS_sort(st) SKM_sk_sort(CRYPTO_EX_DATA_FUNCS, (st)) +#define sk_CRYPTO_EX_DATA_FUNCS_is_sorted(st) SKM_sk_is_sorted(CRYPTO_EX_DATA_FUNCS, (st)) #define sk_CRYPTO_dynlock_new(st) SKM_sk_new(CRYPTO_dynlock, (st)) #define sk_CRYPTO_dynlock_new_null() SKM_sk_new_null(CRYPTO_dynlock) @@ -463,6 +479,7 @@ STACK_OF(type) \ #define sk_CRYPTO_dynlock_shift(st) SKM_sk_shift(CRYPTO_dynlock, (st)) #define sk_CRYPTO_dynlock_pop(st) SKM_sk_pop(CRYPTO_dynlock, (st)) #define sk_CRYPTO_dynlock_sort(st) SKM_sk_sort(CRYPTO_dynlock, (st)) +#define sk_CRYPTO_dynlock_is_sorted(st) SKM_sk_is_sorted(CRYPTO_dynlock, (st)) #define sk_DIST_POINT_new(st) SKM_sk_new(DIST_POINT, (st)) #define sk_DIST_POINT_new_null() SKM_sk_new_null(DIST_POINT) @@ -483,6 +500,7 @@ STACK_OF(type) \ #define sk_DIST_POINT_shift(st) SKM_sk_shift(DIST_POINT, (st)) #define sk_DIST_POINT_pop(st) SKM_sk_pop(DIST_POINT, (st)) #define sk_DIST_POINT_sort(st) SKM_sk_sort(DIST_POINT, (st)) +#define sk_DIST_POINT_is_sorted(st) SKM_sk_is_sorted(DIST_POINT, (st)) #define sk_ENGINE_new(st) SKM_sk_new(ENGINE, (st)) #define sk_ENGINE_new_null() SKM_sk_new_null(ENGINE) @@ -503,6 +521,7 @@ STACK_OF(type) \ #define sk_ENGINE_shift(st) SKM_sk_shift(ENGINE, (st)) #define sk_ENGINE_pop(st) SKM_sk_pop(ENGINE, (st)) #define sk_ENGINE_sort(st) SKM_sk_sort(ENGINE, (st)) +#define sk_ENGINE_is_sorted(st) SKM_sk_is_sorted(ENGINE, (st)) #define sk_ENGINE_CLEANUP_ITEM_new(st) SKM_sk_new(ENGINE_CLEANUP_ITEM, (st)) #define sk_ENGINE_CLEANUP_ITEM_new_null() SKM_sk_new_null(ENGINE_CLEANUP_ITEM) @@ -523,6 +542,7 @@ STACK_OF(type) \ #define sk_ENGINE_CLEANUP_ITEM_shift(st) SKM_sk_shift(ENGINE_CLEANUP_ITEM, (st)) #define sk_ENGINE_CLEANUP_ITEM_pop(st) SKM_sk_pop(ENGINE_CLEANUP_ITEM, (st)) #define sk_ENGINE_CLEANUP_ITEM_sort(st) SKM_sk_sort(ENGINE_CLEANUP_ITEM, (st)) +#define sk_ENGINE_CLEANUP_ITEM_is_sorted(st) SKM_sk_is_sorted(ENGINE_CLEANUP_ITEM, (st)) #define sk_GENERAL_NAME_new(st) SKM_sk_new(GENERAL_NAME, (st)) #define sk_GENERAL_NAME_new_null() SKM_sk_new_null(GENERAL_NAME) @@ -543,6 +563,7 @@ STACK_OF(type) \ #define sk_GENERAL_NAME_shift(st) SKM_sk_shift(GENERAL_NAME, (st)) #define sk_GENERAL_NAME_pop(st) SKM_sk_pop(GENERAL_NAME, (st)) #define sk_GENERAL_NAME_sort(st) SKM_sk_sort(GENERAL_NAME, (st)) +#define sk_GENERAL_NAME_is_sorted(st) SKM_sk_is_sorted(GENERAL_NAME, (st)) #define sk_KRB5_APREQBODY_new(st) SKM_sk_new(KRB5_APREQBODY, (st)) #define sk_KRB5_APREQBODY_new_null() SKM_sk_new_null(KRB5_APREQBODY) @@ -563,6 +584,7 @@ STACK_OF(type) \ #define sk_KRB5_APREQBODY_shift(st) SKM_sk_shift(KRB5_APREQBODY, (st)) #define sk_KRB5_APREQBODY_pop(st) SKM_sk_pop(KRB5_APREQBODY, (st)) #define sk_KRB5_APREQBODY_sort(st) SKM_sk_sort(KRB5_APREQBODY, (st)) +#define sk_KRB5_APREQBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_APREQBODY, (st)) #define sk_KRB5_AUTHDATA_new(st) SKM_sk_new(KRB5_AUTHDATA, (st)) #define sk_KRB5_AUTHDATA_new_null() SKM_sk_new_null(KRB5_AUTHDATA) @@ -583,6 +605,7 @@ STACK_OF(type) \ #define sk_KRB5_AUTHDATA_shift(st) SKM_sk_shift(KRB5_AUTHDATA, (st)) #define sk_KRB5_AUTHDATA_pop(st) SKM_sk_pop(KRB5_AUTHDATA, (st)) #define sk_KRB5_AUTHDATA_sort(st) SKM_sk_sort(KRB5_AUTHDATA, (st)) +#define sk_KRB5_AUTHDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHDATA, (st)) #define sk_KRB5_AUTHENTBODY_new(st) SKM_sk_new(KRB5_AUTHENTBODY, (st)) #define sk_KRB5_AUTHENTBODY_new_null() SKM_sk_new_null(KRB5_AUTHENTBODY) @@ -603,6 +626,7 @@ STACK_OF(type) \ #define sk_KRB5_AUTHENTBODY_shift(st) SKM_sk_shift(KRB5_AUTHENTBODY, (st)) #define sk_KRB5_AUTHENTBODY_pop(st) SKM_sk_pop(KRB5_AUTHENTBODY, (st)) #define sk_KRB5_AUTHENTBODY_sort(st) SKM_sk_sort(KRB5_AUTHENTBODY, (st)) +#define sk_KRB5_AUTHENTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHENTBODY, (st)) #define sk_KRB5_CHECKSUM_new(st) SKM_sk_new(KRB5_CHECKSUM, (st)) #define sk_KRB5_CHECKSUM_new_null() SKM_sk_new_null(KRB5_CHECKSUM) @@ -623,6 +647,7 @@ STACK_OF(type) \ #define sk_KRB5_CHECKSUM_shift(st) SKM_sk_shift(KRB5_CHECKSUM, (st)) #define sk_KRB5_CHECKSUM_pop(st) SKM_sk_pop(KRB5_CHECKSUM, (st)) #define sk_KRB5_CHECKSUM_sort(st) SKM_sk_sort(KRB5_CHECKSUM, (st)) +#define sk_KRB5_CHECKSUM_is_sorted(st) SKM_sk_is_sorted(KRB5_CHECKSUM, (st)) #define sk_KRB5_ENCDATA_new(st) SKM_sk_new(KRB5_ENCDATA, (st)) #define sk_KRB5_ENCDATA_new_null() SKM_sk_new_null(KRB5_ENCDATA) @@ -643,6 +668,7 @@ STACK_OF(type) \ #define sk_KRB5_ENCDATA_shift(st) SKM_sk_shift(KRB5_ENCDATA, (st)) #define sk_KRB5_ENCDATA_pop(st) SKM_sk_pop(KRB5_ENCDATA, (st)) #define sk_KRB5_ENCDATA_sort(st) SKM_sk_sort(KRB5_ENCDATA, (st)) +#define sk_KRB5_ENCDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCDATA, (st)) #define sk_KRB5_ENCKEY_new(st) SKM_sk_new(KRB5_ENCKEY, (st)) #define sk_KRB5_ENCKEY_new_null() SKM_sk_new_null(KRB5_ENCKEY) @@ -663,6 +689,7 @@ STACK_OF(type) \ #define sk_KRB5_ENCKEY_shift(st) SKM_sk_shift(KRB5_ENCKEY, (st)) #define sk_KRB5_ENCKEY_pop(st) SKM_sk_pop(KRB5_ENCKEY, (st)) #define sk_KRB5_ENCKEY_sort(st) SKM_sk_sort(KRB5_ENCKEY, (st)) +#define sk_KRB5_ENCKEY_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCKEY, (st)) #define sk_KRB5_PRINCNAME_new(st) SKM_sk_new(KRB5_PRINCNAME, (st)) #define sk_KRB5_PRINCNAME_new_null() SKM_sk_new_null(KRB5_PRINCNAME) @@ -683,6 +710,7 @@ STACK_OF(type) \ #define sk_KRB5_PRINCNAME_shift(st) SKM_sk_shift(KRB5_PRINCNAME, (st)) #define sk_KRB5_PRINCNAME_pop(st) SKM_sk_pop(KRB5_PRINCNAME, (st)) #define sk_KRB5_PRINCNAME_sort(st) SKM_sk_sort(KRB5_PRINCNAME, (st)) +#define sk_KRB5_PRINCNAME_is_sorted(st) SKM_sk_is_sorted(KRB5_PRINCNAME, (st)) #define sk_KRB5_TKTBODY_new(st) SKM_sk_new(KRB5_TKTBODY, (st)) #define sk_KRB5_TKTBODY_new_null() SKM_sk_new_null(KRB5_TKTBODY) @@ -703,6 +731,7 @@ STACK_OF(type) \ #define sk_KRB5_TKTBODY_shift(st) SKM_sk_shift(KRB5_TKTBODY, (st)) #define sk_KRB5_TKTBODY_pop(st) SKM_sk_pop(KRB5_TKTBODY, (st)) #define sk_KRB5_TKTBODY_sort(st) SKM_sk_sort(KRB5_TKTBODY, (st)) +#define sk_KRB5_TKTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_TKTBODY, (st)) #define sk_MIME_HEADER_new(st) SKM_sk_new(MIME_HEADER, (st)) #define sk_MIME_HEADER_new_null() SKM_sk_new_null(MIME_HEADER) @@ -723,6 +752,7 @@ STACK_OF(type) \ #define sk_MIME_HEADER_shift(st) SKM_sk_shift(MIME_HEADER, (st)) #define sk_MIME_HEADER_pop(st) SKM_sk_pop(MIME_HEADER, (st)) #define sk_MIME_HEADER_sort(st) SKM_sk_sort(MIME_HEADER, (st)) +#define sk_MIME_HEADER_is_sorted(st) SKM_sk_is_sorted(MIME_HEADER, (st)) #define sk_MIME_PARAM_new(st) SKM_sk_new(MIME_PARAM, (st)) #define sk_MIME_PARAM_new_null() SKM_sk_new_null(MIME_PARAM) @@ -743,6 +773,7 @@ STACK_OF(type) \ #define sk_MIME_PARAM_shift(st) SKM_sk_shift(MIME_PARAM, (st)) #define sk_MIME_PARAM_pop(st) SKM_sk_pop(MIME_PARAM, (st)) #define sk_MIME_PARAM_sort(st) SKM_sk_sort(MIME_PARAM, (st)) +#define sk_MIME_PARAM_is_sorted(st) SKM_sk_is_sorted(MIME_PARAM, (st)) #define sk_NAME_FUNCS_new(st) SKM_sk_new(NAME_FUNCS, (st)) #define sk_NAME_FUNCS_new_null() SKM_sk_new_null(NAME_FUNCS) @@ -763,6 +794,7 @@ STACK_OF(type) \ #define sk_NAME_FUNCS_shift(st) SKM_sk_shift(NAME_FUNCS, (st)) #define sk_NAME_FUNCS_pop(st) SKM_sk_pop(NAME_FUNCS, (st)) #define sk_NAME_FUNCS_sort(st) SKM_sk_sort(NAME_FUNCS, (st)) +#define sk_NAME_FUNCS_is_sorted(st) SKM_sk_is_sorted(NAME_FUNCS, (st)) #define sk_OCSP_CERTID_new(st) SKM_sk_new(OCSP_CERTID, (st)) #define sk_OCSP_CERTID_new_null() SKM_sk_new_null(OCSP_CERTID) @@ -783,6 +815,7 @@ STACK_OF(type) \ #define sk_OCSP_CERTID_shift(st) SKM_sk_shift(OCSP_CERTID, (st)) #define sk_OCSP_CERTID_pop(st) SKM_sk_pop(OCSP_CERTID, (st)) #define sk_OCSP_CERTID_sort(st) SKM_sk_sort(OCSP_CERTID, (st)) +#define sk_OCSP_CERTID_is_sorted(st) SKM_sk_is_sorted(OCSP_CERTID, (st)) #define sk_OCSP_ONEREQ_new(st) SKM_sk_new(OCSP_ONEREQ, (st)) #define sk_OCSP_ONEREQ_new_null() SKM_sk_new_null(OCSP_ONEREQ) @@ -803,6 +836,7 @@ STACK_OF(type) \ #define sk_OCSP_ONEREQ_shift(st) SKM_sk_shift(OCSP_ONEREQ, (st)) #define sk_OCSP_ONEREQ_pop(st) SKM_sk_pop(OCSP_ONEREQ, (st)) #define sk_OCSP_ONEREQ_sort(st) SKM_sk_sort(OCSP_ONEREQ, (st)) +#define sk_OCSP_ONEREQ_is_sorted(st) SKM_sk_is_sorted(OCSP_ONEREQ, (st)) #define sk_OCSP_SINGLERESP_new(st) SKM_sk_new(OCSP_SINGLERESP, (st)) #define sk_OCSP_SINGLERESP_new_null() SKM_sk_new_null(OCSP_SINGLERESP) @@ -823,6 +857,7 @@ STACK_OF(type) \ #define sk_OCSP_SINGLERESP_shift(st) SKM_sk_shift(OCSP_SINGLERESP, (st)) #define sk_OCSP_SINGLERESP_pop(st) SKM_sk_pop(OCSP_SINGLERESP, (st)) #define sk_OCSP_SINGLERESP_sort(st) SKM_sk_sort(OCSP_SINGLERESP, (st)) +#define sk_OCSP_SINGLERESP_is_sorted(st) SKM_sk_is_sorted(OCSP_SINGLERESP, (st)) #define sk_PKCS12_SAFEBAG_new(st) SKM_sk_new(PKCS12_SAFEBAG, (st)) #define sk_PKCS12_SAFEBAG_new_null() SKM_sk_new_null(PKCS12_SAFEBAG) @@ -843,6 +878,7 @@ STACK_OF(type) \ #define sk_PKCS12_SAFEBAG_shift(st) SKM_sk_shift(PKCS12_SAFEBAG, (st)) #define sk_PKCS12_SAFEBAG_pop(st) SKM_sk_pop(PKCS12_SAFEBAG, (st)) #define sk_PKCS12_SAFEBAG_sort(st) SKM_sk_sort(PKCS12_SAFEBAG, (st)) +#define sk_PKCS12_SAFEBAG_is_sorted(st) SKM_sk_is_sorted(PKCS12_SAFEBAG, (st)) #define sk_PKCS7_new(st) SKM_sk_new(PKCS7, (st)) #define sk_PKCS7_new_null() SKM_sk_new_null(PKCS7) @@ -863,6 +899,7 @@ STACK_OF(type) \ #define sk_PKCS7_shift(st) SKM_sk_shift(PKCS7, (st)) #define sk_PKCS7_pop(st) SKM_sk_pop(PKCS7, (st)) #define sk_PKCS7_sort(st) SKM_sk_sort(PKCS7, (st)) +#define sk_PKCS7_is_sorted(st) SKM_sk_is_sorted(PKCS7, (st)) #define sk_PKCS7_RECIP_INFO_new(st) SKM_sk_new(PKCS7_RECIP_INFO, (st)) #define sk_PKCS7_RECIP_INFO_new_null() SKM_sk_new_null(PKCS7_RECIP_INFO) @@ -883,6 +920,7 @@ STACK_OF(type) \ #define sk_PKCS7_RECIP_INFO_shift(st) SKM_sk_shift(PKCS7_RECIP_INFO, (st)) #define sk_PKCS7_RECIP_INFO_pop(st) SKM_sk_pop(PKCS7_RECIP_INFO, (st)) #define sk_PKCS7_RECIP_INFO_sort(st) SKM_sk_sort(PKCS7_RECIP_INFO, (st)) +#define sk_PKCS7_RECIP_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_RECIP_INFO, (st)) #define sk_PKCS7_SIGNER_INFO_new(st) SKM_sk_new(PKCS7_SIGNER_INFO, (st)) #define sk_PKCS7_SIGNER_INFO_new_null() SKM_sk_new_null(PKCS7_SIGNER_INFO) @@ -903,6 +941,7 @@ STACK_OF(type) \ #define sk_PKCS7_SIGNER_INFO_shift(st) SKM_sk_shift(PKCS7_SIGNER_INFO, (st)) #define sk_PKCS7_SIGNER_INFO_pop(st) SKM_sk_pop(PKCS7_SIGNER_INFO, (st)) #define sk_PKCS7_SIGNER_INFO_sort(st) SKM_sk_sort(PKCS7_SIGNER_INFO, (st)) +#define sk_PKCS7_SIGNER_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_SIGNER_INFO, (st)) #define sk_POLICYINFO_new(st) SKM_sk_new(POLICYINFO, (st)) #define sk_POLICYINFO_new_null() SKM_sk_new_null(POLICYINFO) @@ -923,6 +962,7 @@ STACK_OF(type) \ #define sk_POLICYINFO_shift(st) SKM_sk_shift(POLICYINFO, (st)) #define sk_POLICYINFO_pop(st) SKM_sk_pop(POLICYINFO, (st)) #define sk_POLICYINFO_sort(st) SKM_sk_sort(POLICYINFO, (st)) +#define sk_POLICYINFO_is_sorted(st) SKM_sk_is_sorted(POLICYINFO, (st)) #define sk_POLICYQUALINFO_new(st) SKM_sk_new(POLICYQUALINFO, (st)) #define sk_POLICYQUALINFO_new_null() SKM_sk_new_null(POLICYQUALINFO) @@ -943,6 +983,7 @@ STACK_OF(type) \ #define sk_POLICYQUALINFO_shift(st) SKM_sk_shift(POLICYQUALINFO, (st)) #define sk_POLICYQUALINFO_pop(st) SKM_sk_pop(POLICYQUALINFO, (st)) #define sk_POLICYQUALINFO_sort(st) SKM_sk_sort(POLICYQUALINFO, (st)) +#define sk_POLICYQUALINFO_is_sorted(st) SKM_sk_is_sorted(POLICYQUALINFO, (st)) #define sk_SSL_CIPHER_new(st) SKM_sk_new(SSL_CIPHER, (st)) #define sk_SSL_CIPHER_new_null() SKM_sk_new_null(SSL_CIPHER) @@ -963,6 +1004,7 @@ STACK_OF(type) \ #define sk_SSL_CIPHER_shift(st) SKM_sk_shift(SSL_CIPHER, (st)) #define sk_SSL_CIPHER_pop(st) SKM_sk_pop(SSL_CIPHER, (st)) #define sk_SSL_CIPHER_sort(st) SKM_sk_sort(SSL_CIPHER, (st)) +#define sk_SSL_CIPHER_is_sorted(st) SKM_sk_is_sorted(SSL_CIPHER, (st)) #define sk_SSL_COMP_new(st) SKM_sk_new(SSL_COMP, (st)) #define sk_SSL_COMP_new_null() SKM_sk_new_null(SSL_COMP) @@ -983,6 +1025,7 @@ STACK_OF(type) \ #define sk_SSL_COMP_shift(st) SKM_sk_shift(SSL_COMP, (st)) #define sk_SSL_COMP_pop(st) SKM_sk_pop(SSL_COMP, (st)) #define sk_SSL_COMP_sort(st) SKM_sk_sort(SSL_COMP, (st)) +#define sk_SSL_COMP_is_sorted(st) SKM_sk_is_sorted(SSL_COMP, (st)) #define sk_SXNETID_new(st) SKM_sk_new(SXNETID, (st)) #define sk_SXNETID_new_null() SKM_sk_new_null(SXNETID) @@ -1003,6 +1046,7 @@ STACK_OF(type) \ #define sk_SXNETID_shift(st) SKM_sk_shift(SXNETID, (st)) #define sk_SXNETID_pop(st) SKM_sk_pop(SXNETID, (st)) #define sk_SXNETID_sort(st) SKM_sk_sort(SXNETID, (st)) +#define sk_SXNETID_is_sorted(st) SKM_sk_is_sorted(SXNETID, (st)) #define sk_UI_STRING_new(st) SKM_sk_new(UI_STRING, (st)) #define sk_UI_STRING_new_null() SKM_sk_new_null(UI_STRING) @@ -1023,6 +1067,7 @@ STACK_OF(type) \ #define sk_UI_STRING_shift(st) SKM_sk_shift(UI_STRING, (st)) #define sk_UI_STRING_pop(st) SKM_sk_pop(UI_STRING, (st)) #define sk_UI_STRING_sort(st) SKM_sk_sort(UI_STRING, (st)) +#define sk_UI_STRING_is_sorted(st) SKM_sk_is_sorted(UI_STRING, (st)) #define sk_X509_new(st) SKM_sk_new(X509, (st)) #define sk_X509_new_null() SKM_sk_new_null(X509) @@ -1043,6 +1088,7 @@ STACK_OF(type) \ #define sk_X509_shift(st) SKM_sk_shift(X509, (st)) #define sk_X509_pop(st) SKM_sk_pop(X509, (st)) #define sk_X509_sort(st) SKM_sk_sort(X509, (st)) +#define sk_X509_is_sorted(st) SKM_sk_is_sorted(X509, (st)) #define sk_X509V3_EXT_METHOD_new(st) SKM_sk_new(X509V3_EXT_METHOD, (st)) #define sk_X509V3_EXT_METHOD_new_null() SKM_sk_new_null(X509V3_EXT_METHOD) @@ -1063,6 +1109,7 @@ STACK_OF(type) \ #define sk_X509V3_EXT_METHOD_shift(st) SKM_sk_shift(X509V3_EXT_METHOD, (st)) #define sk_X509V3_EXT_METHOD_pop(st) SKM_sk_pop(X509V3_EXT_METHOD, (st)) #define sk_X509V3_EXT_METHOD_sort(st) SKM_sk_sort(X509V3_EXT_METHOD, (st)) +#define sk_X509V3_EXT_METHOD_is_sorted(st) SKM_sk_is_sorted(X509V3_EXT_METHOD, (st)) #define sk_X509_ALGOR_new(st) SKM_sk_new(X509_ALGOR, (st)) #define sk_X509_ALGOR_new_null() SKM_sk_new_null(X509_ALGOR) @@ -1083,6 +1130,7 @@ STACK_OF(type) \ #define sk_X509_ALGOR_shift(st) SKM_sk_shift(X509_ALGOR, (st)) #define sk_X509_ALGOR_pop(st) SKM_sk_pop(X509_ALGOR, (st)) #define sk_X509_ALGOR_sort(st) SKM_sk_sort(X509_ALGOR, (st)) +#define sk_X509_ALGOR_is_sorted(st) SKM_sk_is_sorted(X509_ALGOR, (st)) #define sk_X509_ATTRIBUTE_new(st) SKM_sk_new(X509_ATTRIBUTE, (st)) #define sk_X509_ATTRIBUTE_new_null() SKM_sk_new_null(X509_ATTRIBUTE) @@ -1103,6 +1151,7 @@ STACK_OF(type) \ #define sk_X509_ATTRIBUTE_shift(st) SKM_sk_shift(X509_ATTRIBUTE, (st)) #define sk_X509_ATTRIBUTE_pop(st) SKM_sk_pop(X509_ATTRIBUTE, (st)) #define sk_X509_ATTRIBUTE_sort(st) SKM_sk_sort(X509_ATTRIBUTE, (st)) +#define sk_X509_ATTRIBUTE_is_sorted(st) SKM_sk_is_sorted(X509_ATTRIBUTE, (st)) #define sk_X509_CRL_new(st) SKM_sk_new(X509_CRL, (st)) #define sk_X509_CRL_new_null() SKM_sk_new_null(X509_CRL) @@ -1123,6 +1172,7 @@ STACK_OF(type) \ #define sk_X509_CRL_shift(st) SKM_sk_shift(X509_CRL, (st)) #define sk_X509_CRL_pop(st) SKM_sk_pop(X509_CRL, (st)) #define sk_X509_CRL_sort(st) SKM_sk_sort(X509_CRL, (st)) +#define sk_X509_CRL_is_sorted(st) SKM_sk_is_sorted(X509_CRL, (st)) #define sk_X509_EXTENSION_new(st) SKM_sk_new(X509_EXTENSION, (st)) #define sk_X509_EXTENSION_new_null() SKM_sk_new_null(X509_EXTENSION) @@ -1143,6 +1193,7 @@ STACK_OF(type) \ #define sk_X509_EXTENSION_shift(st) SKM_sk_shift(X509_EXTENSION, (st)) #define sk_X509_EXTENSION_pop(st) SKM_sk_pop(X509_EXTENSION, (st)) #define sk_X509_EXTENSION_sort(st) SKM_sk_sort(X509_EXTENSION, (st)) +#define sk_X509_EXTENSION_is_sorted(st) SKM_sk_is_sorted(X509_EXTENSION, (st)) #define sk_X509_INFO_new(st) SKM_sk_new(X509_INFO, (st)) #define sk_X509_INFO_new_null() SKM_sk_new_null(X509_INFO) @@ -1163,6 +1214,7 @@ STACK_OF(type) \ #define sk_X509_INFO_shift(st) SKM_sk_shift(X509_INFO, (st)) #define sk_X509_INFO_pop(st) SKM_sk_pop(X509_INFO, (st)) #define sk_X509_INFO_sort(st) SKM_sk_sort(X509_INFO, (st)) +#define sk_X509_INFO_is_sorted(st) SKM_sk_is_sorted(X509_INFO, (st)) #define sk_X509_LOOKUP_new(st) SKM_sk_new(X509_LOOKUP, (st)) #define sk_X509_LOOKUP_new_null() SKM_sk_new_null(X509_LOOKUP) @@ -1183,6 +1235,7 @@ STACK_OF(type) \ #define sk_X509_LOOKUP_shift(st) SKM_sk_shift(X509_LOOKUP, (st)) #define sk_X509_LOOKUP_pop(st) SKM_sk_pop(X509_LOOKUP, (st)) #define sk_X509_LOOKUP_sort(st) SKM_sk_sort(X509_LOOKUP, (st)) +#define sk_X509_LOOKUP_is_sorted(st) SKM_sk_is_sorted(X509_LOOKUP, (st)) #define sk_X509_NAME_new(st) SKM_sk_new(X509_NAME, (st)) #define sk_X509_NAME_new_null() SKM_sk_new_null(X509_NAME) @@ -1203,6 +1256,7 @@ STACK_OF(type) \ #define sk_X509_NAME_shift(st) SKM_sk_shift(X509_NAME, (st)) #define sk_X509_NAME_pop(st) SKM_sk_pop(X509_NAME, (st)) #define sk_X509_NAME_sort(st) SKM_sk_sort(X509_NAME, (st)) +#define sk_X509_NAME_is_sorted(st) SKM_sk_is_sorted(X509_NAME, (st)) #define sk_X509_NAME_ENTRY_new(st) SKM_sk_new(X509_NAME_ENTRY, (st)) #define sk_X509_NAME_ENTRY_new_null() SKM_sk_new_null(X509_NAME_ENTRY) @@ -1223,6 +1277,7 @@ STACK_OF(type) \ #define sk_X509_NAME_ENTRY_shift(st) SKM_sk_shift(X509_NAME_ENTRY, (st)) #define sk_X509_NAME_ENTRY_pop(st) SKM_sk_pop(X509_NAME_ENTRY, (st)) #define sk_X509_NAME_ENTRY_sort(st) SKM_sk_sort(X509_NAME_ENTRY, (st)) +#define sk_X509_NAME_ENTRY_is_sorted(st) SKM_sk_is_sorted(X509_NAME_ENTRY, (st)) #define sk_X509_OBJECT_new(st) SKM_sk_new(X509_OBJECT, (st)) #define sk_X509_OBJECT_new_null() SKM_sk_new_null(X509_OBJECT) @@ -1243,6 +1298,7 @@ STACK_OF(type) \ #define sk_X509_OBJECT_shift(st) SKM_sk_shift(X509_OBJECT, (st)) #define sk_X509_OBJECT_pop(st) SKM_sk_pop(X509_OBJECT, (st)) #define sk_X509_OBJECT_sort(st) SKM_sk_sort(X509_OBJECT, (st)) +#define sk_X509_OBJECT_is_sorted(st) SKM_sk_is_sorted(X509_OBJECT, (st)) #define sk_X509_PURPOSE_new(st) SKM_sk_new(X509_PURPOSE, (st)) #define sk_X509_PURPOSE_new_null() SKM_sk_new_null(X509_PURPOSE) @@ -1263,6 +1319,7 @@ STACK_OF(type) \ #define sk_X509_PURPOSE_shift(st) SKM_sk_shift(X509_PURPOSE, (st)) #define sk_X509_PURPOSE_pop(st) SKM_sk_pop(X509_PURPOSE, (st)) #define sk_X509_PURPOSE_sort(st) SKM_sk_sort(X509_PURPOSE, (st)) +#define sk_X509_PURPOSE_is_sorted(st) SKM_sk_is_sorted(X509_PURPOSE, (st)) #define sk_X509_REVOKED_new(st) SKM_sk_new(X509_REVOKED, (st)) #define sk_X509_REVOKED_new_null() SKM_sk_new_null(X509_REVOKED) @@ -1283,6 +1340,7 @@ STACK_OF(type) \ #define sk_X509_REVOKED_shift(st) SKM_sk_shift(X509_REVOKED, (st)) #define sk_X509_REVOKED_pop(st) SKM_sk_pop(X509_REVOKED, (st)) #define sk_X509_REVOKED_sort(st) SKM_sk_sort(X509_REVOKED, (st)) +#define sk_X509_REVOKED_is_sorted(st) SKM_sk_is_sorted(X509_REVOKED, (st)) #define sk_X509_TRUST_new(st) SKM_sk_new(X509_TRUST, (st)) #define sk_X509_TRUST_new_null() SKM_sk_new_null(X509_TRUST) @@ -1303,6 +1361,7 @@ STACK_OF(type) \ #define sk_X509_TRUST_shift(st) SKM_sk_shift(X509_TRUST, (st)) #define sk_X509_TRUST_pop(st) SKM_sk_pop(X509_TRUST, (st)) #define sk_X509_TRUST_sort(st) SKM_sk_sort(X509_TRUST, (st)) +#define sk_X509_TRUST_is_sorted(st) SKM_sk_is_sorted(X509_TRUST, (st)) #define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) diff --git a/src/lib/libssl/src/crypto/stack/stack.c b/src/lib/libssl/src/crypto/stack/stack.c index 2496f28a8c..c7173eb6ab 100644 --- a/src/lib/libssl/src/crypto/stack/stack.c +++ b/src/lib/libssl/src/crypto/stack/stack.c @@ -191,8 +191,7 @@ char *sk_delete(STACK *st, int loc) char *ret; int i,j; - if ((st == NULL) || (st->num == 0) || (loc < 0) - || (loc >= st->num)) return(NULL); + if(!st || (loc < 0) || (loc >= st->num)) return NULL; ret=st->data[loc]; if (loc != st->num-1) @@ -306,13 +305,13 @@ int sk_num(const STACK *st) char *sk_value(const STACK *st, int i) { - if(st == NULL) return NULL; + if(!st || (i < 0) || (i >= st->num)) return NULL; return st->data[i]; } char *sk_set(STACK *st, int i, char *value) { - if(st == NULL) return NULL; + if(!st || (i < 0) || (i >= st->num)) return NULL; return (st->data[i] = value); } @@ -332,3 +331,10 @@ void sk_sort(STACK *st) st->sorted=1; } } + +int sk_is_sorted(const STACK *st) + { + if (!st) + return 1; + return st->sorted; + } diff --git a/src/lib/libssl/src/crypto/stack/stack.h b/src/lib/libssl/src/crypto/stack/stack.h index 8b436ca4b9..7570b85fe8 100644 --- a/src/lib/libssl/src/crypto/stack/stack.h +++ b/src/lib/libssl/src/crypto/stack/stack.h @@ -99,6 +99,7 @@ int (*sk_set_cmp_func(STACK *sk, int (*c)(const char * const *, (const char * const *, const char * const *); STACK *sk_dup(STACK *st); void sk_sort(STACK *st); +int sk_is_sorted(const STACK *st); #ifdef __cplusplus } diff --git a/src/lib/libssl/src/crypto/txt_db/Makefile b/src/lib/libssl/src/crypto/txt_db/Makefile new file mode 100644 index 0000000000..f91a08f006 --- /dev/null +++ b/src/lib/libssl/src/crypto/txt_db/Makefile @@ -0,0 +1,86 @@ +# +# SSLeay/crypto/txt_db/Makefile +# + +DIR= txt_db +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=txt_db.c +LIBOBJ=txt_db.o + +SRC= $(LIBSRC) + +EXHEADER= txt_db.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +txt_db.o: ../../e_os.h ../../include/openssl/bio.h +txt_db.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +txt_db.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +txt_db.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +txt_db.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +txt_db.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +txt_db.o: ../../include/openssl/txt_db.h ../cryptlib.h txt_db.c diff --git a/src/lib/libssl/src/crypto/ui/Makefile b/src/lib/libssl/src/crypto/ui/Makefile new file mode 100644 index 0000000000..fcb2a66a39 --- /dev/null +++ b/src/lib/libssl/src/crypto/ui/Makefile @@ -0,0 +1,115 @@ +# +# OpenSSL/crypto/ui/Makefile +# + +DIR= ui +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +#TEST= uitest.c +TEST= +APPS= + +COMPATSRC= ui_compat.c +COMPATOBJ= ui_compat.o + +LIB=$(TOP)/libcrypto.a +LIBSRC= ui_err.c ui_lib.c ui_openssl.c ui_util.c $(COMPATSRC) +LIBOBJ= ui_err.o ui_lib.o ui_openssl.o ui_util.o $(COMPATOBJ) + +SRC= $(LIBSRC) + +EXHEADER= ui.h ui_compat.h +HEADER= $(EXHEADER) ui_locl.h + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +ui_compat.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ui_compat.o: ../../include/openssl/opensslconf.h +ui_compat.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ui_compat.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ui_compat.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +ui_compat.o: ui_compat.c +ui_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +ui_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ui_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ui_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ui_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ui_err.o: ../../include/openssl/ui.h ui_err.c +ui_lib.o: ../../e_os.h ../../include/openssl/bio.h +ui_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +ui_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ui_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ui_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +ui_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +ui_lib.o: ../../include/openssl/ui.h ../cryptlib.h ui_lib.c ui_locl.h +ui_openssl.o: ../../e_os.h ../../include/openssl/bio.h +ui_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +ui_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +ui_openssl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ui_openssl.o: ../../include/openssl/opensslv.h +ui_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ui_openssl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ui_openssl.o: ../cryptlib.h ui_locl.h ui_openssl.c +ui_util.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h +ui_util.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +ui_util.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ui_util.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ui_util.o: ui_util.c diff --git a/src/lib/libssl/src/crypto/x509/Makefile b/src/lib/libssl/src/crypto/x509/Makefile new file mode 100644 index 0000000000..5fb774f1c7 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509/Makefile @@ -0,0 +1,592 @@ +# +# SSLeay/crypto/x509/Makefile +# + +DIR= x509 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c \ + x509_obj.c x509_req.c x509spki.c x509_vfy.c \ + x509_set.c x509cset.c x509rset.c x509_err.c \ + x509name.c x509_v3.c x509_ext.c x509_att.c \ + x509type.c x509_lu.c x_all.c x509_txt.c \ + x509_trs.c by_file.c by_dir.c +LIBOBJ= x509_def.o x509_d2.o x509_r2x.o x509_cmp.o \ + x509_obj.o x509_req.o x509spki.o x509_vfy.o \ + x509_set.o x509cset.o x509rset.o x509_err.o \ + x509name.o x509_v3.o x509_ext.o x509_att.o \ + x509type.o x509_lu.o x_all.o x509_txt.o \ + x509_trs.o by_file.o by_dir.o + +SRC= $(LIBSRC) + +EXHEADER= x509.h x509_vfy.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +by_dir.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +by_dir.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +by_dir.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +by_dir.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +by_dir.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +by_dir.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +by_dir.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +by_dir.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +by_dir.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +by_dir.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +by_dir.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +by_dir.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +by_dir.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +by_dir.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +by_dir.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +by_dir.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +by_dir.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +by_dir.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +by_dir.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +by_dir.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +by_dir.o: ../cryptlib.h by_dir.c +by_file.o: ../../e_os.h ../../include/openssl/aes.h +by_file.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +by_file.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +by_file.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +by_file.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +by_file.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +by_file.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +by_file.o: ../../include/openssl/err.h ../../include/openssl/evp.h +by_file.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +by_file.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +by_file.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +by_file.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +by_file.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +by_file.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +by_file.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +by_file.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +by_file.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +by_file.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +by_file.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +by_file.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +by_file.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +by_file.o: ../../include/openssl/x509_vfy.h ../cryptlib.h by_file.c +x509_att.o: ../../e_os.h ../../include/openssl/aes.h +x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_att.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_att.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_att.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_att.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_att.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_att.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_att.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_att.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_att.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_att.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_att.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_att.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_att.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_att.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_att.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_att.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_att.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_att.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_att.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_att.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_att.c +x509_cmp.o: ../../e_os.h ../../include/openssl/aes.h +x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_cmp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_cmp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_cmp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_cmp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_cmp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_cmp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_cmp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_cmp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_cmp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_cmp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_cmp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_cmp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_cmp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_cmp.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_cmp.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_cmp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_cmp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_cmp.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_cmp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_cmp.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_cmp.c +x509_d2.o: ../../e_os.h ../../include/openssl/aes.h +x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_d2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_d2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_d2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_d2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_d2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_d2.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_d2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_d2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_d2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_d2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_d2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x509_d2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x509_d2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x509_d2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x509_d2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x509_d2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x509_d2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x509_d2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x509_d2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_d2.c +x509_def.o: ../../e_os.h ../../include/openssl/aes.h +x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_def.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_def.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_def.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_def.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_def.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_def.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_def.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_def.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_def.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_def.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_def.o: ../../include/openssl/opensslconf.h +x509_def.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_def.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_def.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_def.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_def.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_def.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_def.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_def.o: ../cryptlib.h x509_def.c +x509_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +x509_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x509_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x509_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x509_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_err.o: x509_err.c +x509_ext.o: ../../e_os.h ../../include/openssl/aes.h +x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_ext.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_ext.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_ext.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_ext.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_ext.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_ext.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_ext.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_ext.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_ext.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_ext.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_ext.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_ext.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_ext.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_ext.c +x509_lu.o: ../../e_os.h ../../include/openssl/aes.h +x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_lu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_lu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_lu.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_lu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_lu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_lu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_lu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_lu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_lu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_lu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_lu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_lu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_lu.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_lu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_lu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_lu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_lu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_lu.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_lu.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_lu.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_lu.c +x509_obj.o: ../../e_os.h ../../include/openssl/aes.h +x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_obj.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_obj.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_obj.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_obj.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_obj.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_obj.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_obj.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_obj.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_obj.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_obj.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_obj.o: ../../include/openssl/opensslconf.h +x509_obj.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_obj.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_obj.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_obj.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_obj.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_obj.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_obj.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_obj.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_obj.o: ../cryptlib.h x509_obj.c +x509_r2x.o: ../../e_os.h ../../include/openssl/aes.h +x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_r2x.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_r2x.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_r2x.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_r2x.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_r2x.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_r2x.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_r2x.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_r2x.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_r2x.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_r2x.o: ../../include/openssl/opensslconf.h +x509_r2x.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_r2x.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_r2x.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_r2x.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_r2x.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_r2x.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_r2x.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_r2x.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_r2x.o: ../cryptlib.h x509_r2x.c +x509_req.o: ../../e_os.h ../../include/openssl/aes.h +x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_req.o: ../../include/openssl/opensslconf.h +x509_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_req.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +x509_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_req.o: ../cryptlib.h x509_req.c +x509_set.o: ../../e_os.h ../../include/openssl/aes.h +x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_set.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_set.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_set.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_set.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_set.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_set.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_set.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_set.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_set.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_set.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_set.o: ../../include/openssl/opensslconf.h +x509_set.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_set.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_set.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_set.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_set.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_set.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_set.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_set.o: ../cryptlib.h x509_set.c +x509_trs.o: ../../e_os.h ../../include/openssl/aes.h +x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_trs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_trs.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_trs.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_trs.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_trs.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_trs.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_trs.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_trs.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_trs.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_trs.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_trs.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_trs.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_trs.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_trs.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_trs.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_trs.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_trs.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_trs.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_trs.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_trs.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_trs.c +x509_txt.o: ../../e_os.h ../../include/openssl/aes.h +x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_txt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_txt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_txt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_txt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_txt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_txt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509_txt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509_txt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509_txt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509_txt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509_txt.o: ../../include/openssl/opensslconf.h +x509_txt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_txt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_txt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_txt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_txt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_txt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_txt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_txt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_txt.o: ../cryptlib.h x509_txt.c +x509_v3.o: ../../e_os.h ../../include/openssl/aes.h +x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_v3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_v3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_v3.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_v3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_v3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_v3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_v3.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_v3.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_v3.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_v3.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_v3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_v3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_v3.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_v3.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_v3.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_v3.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_v3.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_v3.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_v3.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_v3.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_v3.c +x509_vfy.o: ../../e_os.h ../../include/openssl/aes.h +x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_vfy.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_vfy.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_vfy.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_vfy.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x509_vfy.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x509_vfy.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x509_vfy.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x509_vfy.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x509_vfy.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x509_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509_vfy.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509_vfy.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509_vfy.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509_vfy.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509_vfy.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509_vfy.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509_vfy.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_vfy.c +x509cset.o: ../../e_os.h ../../include/openssl/aes.h +x509cset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509cset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509cset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509cset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509cset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509cset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509cset.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509cset.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509cset.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509cset.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509cset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509cset.o: ../../include/openssl/opensslconf.h +x509cset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509cset.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509cset.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509cset.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509cset.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509cset.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509cset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509cset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509cset.o: ../cryptlib.h x509cset.c +x509name.o: ../../e_os.h ../../include/openssl/aes.h +x509name.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509name.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509name.o: ../../include/openssl/opensslconf.h +x509name.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509name.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509name.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509name.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509name.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509name.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509name.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509name.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509name.o: ../cryptlib.h x509name.c +x509rset.o: ../../e_os.h ../../include/openssl/aes.h +x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509rset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509rset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509rset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509rset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509rset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509rset.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509rset.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509rset.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509rset.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509rset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509rset.o: ../../include/openssl/opensslconf.h +x509rset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509rset.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509rset.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509rset.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509rset.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509rset.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509rset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509rset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509rset.o: ../cryptlib.h x509rset.c +x509spki.o: ../../e_os.h ../../include/openssl/aes.h +x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509spki.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509spki.o: ../../include/openssl/opensslconf.h +x509spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509spki.o: ../cryptlib.h x509spki.c +x509type.o: ../../e_os.h ../../include/openssl/aes.h +x509type.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509type.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509type.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509type.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509type.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509type.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509type.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x509type.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x509type.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x509type.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x509type.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x509type.o: ../../include/openssl/opensslconf.h +x509type.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x509type.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x509type.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x509type.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x509type.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x509type.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x509type.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x509type.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x509type.o: ../cryptlib.h x509type.c +x_all.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +x_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_all.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +x_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_all.o: ../cryptlib.h x_all.c diff --git a/src/lib/libssl/src/crypto/x509/by_file.c b/src/lib/libssl/src/crypto/x509/by_file.c index b4b04183d0..a5e0d4aefa 100644 --- a/src/lib/libssl/src/crypto/x509/by_file.c +++ b/src/lib/libssl/src/crypto/x509/by_file.c @@ -150,7 +150,7 @@ int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type) x=PEM_read_bio_X509_AUX(in,NULL,NULL,NULL); if (x == NULL) { - if ((ERR_GET_REASON(ERR_peek_error()) == + if ((ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE) && (count > 0)) { ERR_clear_error(); @@ -217,7 +217,7 @@ int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type) x=PEM_read_bio_X509_CRL(in,NULL,NULL,NULL); if (x == NULL) { - if ((ERR_GET_REASON(ERR_peek_error()) == + if ((ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE) && (count > 0)) { ERR_clear_error(); diff --git a/src/lib/libssl/src/crypto/x509/x509.h b/src/lib/libssl/src/crypto/x509/x509.h index 8d0c7e2e17..e8c1a59cf2 100644 --- a/src/lib/libssl/src/crypto/x509/x509.h +++ b/src/lib/libssl/src/crypto/x509/x509.h @@ -410,6 +410,7 @@ typedef struct X509_crl_info_st ASN1_TIME *nextUpdate; STACK_OF(X509_REVOKED) *revoked; STACK_OF(X509_EXTENSION) /* [0] */ *extensions; + ASN1_ENCODING enc; } X509_CRL_INFO; struct X509_crl_st @@ -1037,18 +1038,18 @@ int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, unsigned char *bytes, int len, int loc, int set); X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, - char *field, int type, unsigned char *bytes, int len); + const char *field, int type, const unsigned char *bytes, int len); X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type,unsigned char *bytes, int len); -int X509_NAME_add_entry_by_txt(X509_NAME *name, char *field, int type, - unsigned char *bytes, int len, int loc, int set); +int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, + const unsigned char *bytes, int len, int loc, int set); X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, - ASN1_OBJECT *obj, int type,unsigned char *bytes, + ASN1_OBJECT *obj, int type,const unsigned char *bytes, int len); int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj); int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, - unsigned char *bytes, int len); + const unsigned char *bytes, int len); ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne); ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne); diff --git a/src/lib/libssl/src/crypto/x509/x509_cmp.c b/src/lib/libssl/src/crypto/x509/x509_cmp.c index f460102f49..030d0966fc 100644 --- a/src/lib/libssl/src/crypto/x509/x509_cmp.c +++ b/src/lib/libssl/src/crypto/x509/x509_cmp.c @@ -254,33 +254,49 @@ static int nocase_spacenorm_cmp(const ASN1_STRING *a, const ASN1_STRING *b) return 0; } +static int asn1_string_memcmp(ASN1_STRING *a, ASN1_STRING *b) + { + int j; + j = a->length - b->length; + if (j) + return j; + return memcmp(a->data, b->data, a->length); + } + +#define STR_TYPE_CMP (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_UTF8STRING) + int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b) { int i,j; X509_NAME_ENTRY *na,*nb; - if (sk_X509_NAME_ENTRY_num(a->entries) - != sk_X509_NAME_ENTRY_num(b->entries)) - return sk_X509_NAME_ENTRY_num(a->entries) - -sk_X509_NAME_ENTRY_num(b->entries); + unsigned long nabit, nbbit; + + j = sk_X509_NAME_ENTRY_num(a->entries) + - sk_X509_NAME_ENTRY_num(b->entries); + if (j) + return j; for (i=sk_X509_NAME_ENTRY_num(a->entries)-1; i>=0; i--) { na=sk_X509_NAME_ENTRY_value(a->entries,i); nb=sk_X509_NAME_ENTRY_value(b->entries,i); j=na->value->type-nb->value->type; - if (j) return(j); - if (na->value->type == V_ASN1_PRINTABLESTRING) + if (j) + { + nabit = ASN1_tag2bit(na->value->type); + nbbit = ASN1_tag2bit(nb->value->type); + if (!(nabit & STR_TYPE_CMP) || + !(nbbit & STR_TYPE_CMP)) + return j; + j = asn1_string_memcmp(na->value, nb->value); + } + else if (na->value->type == V_ASN1_PRINTABLESTRING) j=nocase_spacenorm_cmp(na->value, nb->value); else if (na->value->type == V_ASN1_IA5STRING && OBJ_obj2nid(na->object) == NID_pkcs9_emailAddress) j=nocase_cmp(na->value, nb->value); else - { - j=na->value->length-nb->value->length; - if (j) return(j); - j=memcmp(na->value->data,nb->value->data, - na->value->length); - } + j = asn1_string_memcmp(na->value, nb->value); if (j) return(j); j=na->set-nb->set; if (j) return(j); @@ -306,10 +322,16 @@ unsigned long X509_NAME_hash(X509_NAME *x) { unsigned long ret=0; unsigned char md[16]; + EVP_MD_CTX md_ctx; /* Make sure X509_NAME structure contains valid cached encoding */ i2d_X509_NAME(x,NULL); - EVP_Digest(x->bytes->data, x->bytes->length, md, NULL, EVP_md5(), NULL); + EVP_MD_CTX_init(&md_ctx); + EVP_MD_CTX_set_flags(&md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); + EVP_DigestInit_ex(&md_ctx, EVP_md5(), NULL); + EVP_DigestUpdate(&md_ctx, x->bytes->data, x->bytes->length); + EVP_DigestFinal_ex(&md_ctx,md,NULL); + EVP_MD_CTX_cleanup(&md_ctx); ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) diff --git a/src/lib/libssl/src/crypto/x509/x509_r2x.c b/src/lib/libssl/src/crypto/x509/x509_r2x.c index db051033d9..fb8a78dabe 100644 --- a/src/lib/libssl/src/crypto/x509/x509_r2x.c +++ b/src/lib/libssl/src/crypto/x509/x509_r2x.c @@ -92,8 +92,10 @@ X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey) X509_set_subject_name(ret,X509_NAME_dup(xn)); X509_set_issuer_name(ret,X509_NAME_dup(xn)); - X509_gmtime_adj(xi->validity->notBefore,0); - X509_gmtime_adj(xi->validity->notAfter,(long)60*60*24*days); + if (X509_gmtime_adj(xi->validity->notBefore,0) == NULL) + goto err; + if (X509_gmtime_adj(xi->validity->notAfter,(long)60*60*24*days) == NULL) + goto err; X509_set_pubkey(ret,X509_REQ_get_pubkey(r)); diff --git a/src/lib/libssl/src/crypto/x509/x509_req.c b/src/lib/libssl/src/crypto/x509/x509_req.c index 0affa3bf30..59fc6ca548 100644 --- a/src/lib/libssl/src/crypto/x509/x509_req.c +++ b/src/lib/libssl/src/crypto/x509/x509_req.c @@ -118,7 +118,7 @@ EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req) * used and there may be more: so the list is configurable. */ -static int ext_nid_list[] = { NID_ms_ext_req, NID_ext_req, NID_undef}; +static int ext_nid_list[] = { NID_ext_req, NID_ms_ext_req, NID_undef}; static int *ext_nids = ext_nid_list; @@ -143,32 +143,33 @@ void X509_REQ_set_extension_nids(int *nids) } STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req) -{ + { X509_ATTRIBUTE *attr; - STACK_OF(X509_ATTRIBUTE) *sk; ASN1_TYPE *ext = NULL; - int i; + int idx, *pnid; unsigned char *p; - if ((req == NULL) || (req->req_info == NULL)) + + if ((req == NULL) || (req->req_info == NULL) || !ext_nids) return(NULL); - sk=req->req_info->attributes; - if (!sk) return NULL; - for(i = 0; i < sk_X509_ATTRIBUTE_num(sk); i++) { - attr = sk_X509_ATTRIBUTE_value(sk, i); - if(X509_REQ_extension_nid(OBJ_obj2nid(attr->object))) { - if(attr->single) ext = attr->value.single; - else if(sk_ASN1_TYPE_num(attr->value.set)) - ext = sk_ASN1_TYPE_value(attr->value.set, 0); - break; + for (pnid = ext_nids; *pnid != NID_undef; pnid++) + { + idx = X509_REQ_get_attr_by_NID(req, *pnid, -1); + if (idx == -1) + continue; + attr = X509_REQ_get_attr(req, idx); + if(attr->single) ext = attr->value.single; + else if(sk_ASN1_TYPE_num(attr->value.set)) + ext = sk_ASN1_TYPE_value(attr->value.set, 0); + break; } - } - if(!ext || (ext->type != V_ASN1_SEQUENCE)) return NULL; + if(!ext || (ext->type != V_ASN1_SEQUENCE)) + return NULL; p = ext->value.sequence->data; return d2i_ASN1_SET_OF_X509_EXTENSION(NULL, &p, ext->value.sequence->length, d2i_X509_EXTENSION, X509_EXTENSION_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); -} + } /* Add a STACK_OF extensions to a certificate request: allow alternative OIDs * in case we want to create a non standard one. diff --git a/src/lib/libssl/src/crypto/x509/x509_txt.c b/src/lib/libssl/src/crypto/x509/x509_txt.c index e31ebc6741..f19e66a238 100644 --- a/src/lib/libssl/src/crypto/x509/x509_txt.c +++ b/src/lib/libssl/src/crypto/x509/x509_txt.c @@ -122,8 +122,14 @@ const char *X509_verify_cert_error_string(long n) return("certificate revoked"); case X509_V_ERR_INVALID_CA: return ("invalid CA certificate"); + case X509_V_ERR_INVALID_NON_CA: + return ("invalid non-CA certificate (has CA markings)"); case X509_V_ERR_PATH_LENGTH_EXCEEDED: return ("path length constraint exceeded"); + case X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: + return("proxy path length constraint exceeded"); + case X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: + return("proxy cerificates not allowed, please set the appropriate flag"); case X509_V_ERR_INVALID_PURPOSE: return ("unsupported certificate purpose"); case X509_V_ERR_CERT_UNTRUSTED: @@ -140,19 +146,16 @@ const char *X509_verify_cert_error_string(long n) return("authority and issuer serial number mismatch"); case X509_V_ERR_KEYUSAGE_NO_CERTSIGN: return("key usage does not include certificate signing"); - case X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: return("unable to get CRL issuer certificate"); - case X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: return("unhandled critical extension"); - case X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: return("key usage does not include CRL signing"); - + case X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: + return("key usage does not include digital signature"); case X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: return("unhandled critical CRL extension"); - default: BIO_snprintf(buf,sizeof buf,"error number %ld",n); return(buf); diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.c b/src/lib/libssl/src/crypto/x509/x509_vfy.c index 2e4d0b823a..e43c861ee7 100644 --- a/src/lib/libssl/src/crypto/x509/x509_vfy.c +++ b/src/lib/libssl/src/crypto/x509/x509_vfy.c @@ -73,7 +73,7 @@ static int null_callback(int ok,X509_STORE_CTX *e); static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x); -static int check_chain_purpose(X509_STORE_CTX *ctx); +static int check_chain_extensions(X509_STORE_CTX *ctx); static int check_trust(X509_STORE_CTX *ctx); static int check_revocation(X509_STORE_CTX *ctx); static int check_cert(X509_STORE_CTX *ctx); @@ -281,7 +281,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx) } /* We have the chain complete: now we need to check its purpose */ - if (ctx->purpose > 0) ok = check_chain_purpose(ctx); + ok = check_chain_extensions(ctx); if (!ok) goto end; @@ -365,21 +365,39 @@ static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) else return 0; } - + /* Check a certificate chains extensions for consistency * with the supplied purpose */ -static int check_chain_purpose(X509_STORE_CTX *ctx) +static int check_chain_extensions(X509_STORE_CTX *ctx) { #ifdef OPENSSL_NO_CHAIN_VERIFY return 1; #else - int i, ok=0; + int i, ok=0, must_be_ca; X509 *x; int (*cb)(); + int proxy_path_length = 0; + int allow_proxy_certs = !!(ctx->flags & X509_V_FLAG_ALLOW_PROXY_CERTS); cb=ctx->verify_cb; + + /* must_be_ca can have 1 of 3 values: + -1: we accept both CA and non-CA certificates, to allow direct + use of self-signed certificates (which are marked as CA). + 0: we only accept non-CA certificates. This is currently not + used, but the possibility is present for future extensions. + 1: we only accept CA certificates. This is currently used for + all certificates in the chain except the leaf certificate. + */ + must_be_ca = -1; + + /* A hack to keep people who don't want to modify their software + happy */ + if (getenv("OPENSSL_ALLOW_PROXY_CERTS")) + allow_proxy_certs = 1; + /* Check all untrusted certificates */ for (i = 0; i < ctx->last_untrusted; i++) { @@ -394,23 +412,73 @@ static int check_chain_purpose(X509_STORE_CTX *ctx) ok=cb(0,ctx); if (!ok) goto end; } - ret = X509_check_purpose(x, ctx->purpose, i); - if ((ret == 0) - || ((ctx->flags & X509_V_FLAG_X509_STRICT) - && (ret != 1))) + if (!allow_proxy_certs && (x->ex_flags & EXFLAG_PROXY)) { - if (i) + ctx->error = X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED; + ctx->error_depth = i; + ctx->current_cert = x; + ok=cb(0,ctx); + if (!ok) goto end; + } + ret = X509_check_ca(x); + switch(must_be_ca) + { + case -1: + if ((ctx->flags & X509_V_FLAG_X509_STRICT) + && (ret != 1) && (ret != 0)) + { + ret = 0; ctx->error = X509_V_ERR_INVALID_CA; + } else - ctx->error = X509_V_ERR_INVALID_PURPOSE; + ret = 1; + break; + case 0: + if (ret != 0) + { + ret = 0; + ctx->error = X509_V_ERR_INVALID_NON_CA; + } + else + ret = 1; + break; + default: + if ((ret == 0) + || ((ctx->flags & X509_V_FLAG_X509_STRICT) + && (ret != 1))) + { + ret = 0; + ctx->error = X509_V_ERR_INVALID_CA; + } + else + ret = 1; + break; + } + if (ret == 0) + { ctx->error_depth = i; ctx->current_cert = x; ok=cb(0,ctx); if (!ok) goto end; } + if (ctx->purpose > 0) + { + ret = X509_check_purpose(x, ctx->purpose, + must_be_ca > 0); + if ((ret == 0) + || ((ctx->flags & X509_V_FLAG_X509_STRICT) + && (ret != 1))) + { + ctx->error = X509_V_ERR_INVALID_PURPOSE; + ctx->error_depth = i; + ctx->current_cert = x; + ok=cb(0,ctx); + if (!ok) goto end; + } + } /* Check pathlen */ if ((i > 1) && (x->ex_pathlen != -1) - && (i > (x->ex_pathlen + 1))) + && (i > (x->ex_pathlen + proxy_path_length + 1))) { ctx->error = X509_V_ERR_PATH_LENGTH_EXCEEDED; ctx->error_depth = i; @@ -418,6 +486,32 @@ static int check_chain_purpose(X509_STORE_CTX *ctx) ok=cb(0,ctx); if (!ok) goto end; } + /* If this certificate is a proxy certificate, the next + certificate must be another proxy certificate or a EE + certificate. If not, the next certificate must be a + CA certificate. */ + if (x->ex_flags & EXFLAG_PROXY) + { + PROXY_CERT_INFO_EXTENSION *pci = + X509_get_ext_d2i(x, NID_proxyCertInfo, + NULL, NULL); + if (pci->pcPathLengthConstraint && + ASN1_INTEGER_get(pci->pcPathLengthConstraint) + < i) + { + PROXY_CERT_INFO_EXTENSION_free(pci); + ctx->error = X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED; + ctx->error_depth = i; + ctx->current_cert = x; + ok=cb(0,ctx); + if (!ok) goto end; + } + PROXY_CERT_INFO_EXTENSION_free(pci); + proxy_path_length++; + must_be_ca = 0; + } + else + must_be_ca = 1; } ok = 1; end: @@ -627,6 +721,15 @@ static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x) X509_EXTENSION *ext; /* Look for serial number of certificate in CRL */ rtmp.serialNumber = X509_get_serialNumber(x); + /* Sort revoked into serial number order if not already sorted. + * Do this under a lock to avoid race condition. + */ + if (!sk_X509_REVOKED_is_sorted(crl->crl->revoked)) + { + CRYPTO_w_lock(CRYPTO_LOCK_X509_CRL); + sk_X509_REVOKED_sort(crl->crl->revoked); + CRYPTO_w_unlock(CRYPTO_LOCK_X509_CRL); + } idx = sk_X509_REVOKED_find(crl->crl->revoked, &rtmp); /* If found assume revoked: want something cleverer than * this to handle entry extensions in V2 CRLs. @@ -772,6 +875,7 @@ static int internal_verify(X509_STORE_CTX *ctx) } /* The last error (if any) is still in the error value */ + ctx->current_issuer=xi; ctx->current_cert=xs; ok=(*cb)(1,ctx); if (!ok) goto end; @@ -851,7 +955,8 @@ int X509_cmp_time(ASN1_TIME *ctm, time_t *cmp_time) atm.length=sizeof(buff2); atm.data=(unsigned char *)buff2; - X509_time_adj(&atm,-offset*60, cmp_time); + if (X509_time_adj(&atm,-offset*60, cmp_time) == NULL) + return 0; if (ctm->type == V_ASN1_UTCTIME) { diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.h b/src/lib/libssl/src/crypto/x509/x509_vfy.h index 198495884c..7fd1f0bc4d 100644 --- a/src/lib/libssl/src/crypto/x509/x509_vfy.h +++ b/src/lib/libssl/src/crypto/x509/x509_vfy.h @@ -276,7 +276,7 @@ struct x509_store_ctx_st /* X509_STORE_CTX */ #define X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 6 #define X509_V_ERR_CERT_SIGNATURE_FAILURE 7 #define X509_V_ERR_CRL_SIGNATURE_FAILURE 8 -#define X509_V_ERR_CERT_NOT_YET_VALID 9 +#define X509_V_ERR_CERT_NOT_YET_VALID 9 #define X509_V_ERR_CERT_HAS_EXPIRED 10 #define X509_V_ERR_CRL_NOT_YET_VALID 11 #define X509_V_ERR_CRL_HAS_EXPIRED 12 @@ -306,6 +306,10 @@ struct x509_store_ctx_st /* X509_STORE_CTX */ #define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 #define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35 #define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36 +#define X509_V_ERR_INVALID_NON_CA 37 +#define X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED 38 +#define X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE 39 +#define X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED 40 /* The application is not happy */ #define X509_V_ERR_APPLICATION_VERIFICATION 50 @@ -324,6 +328,8 @@ struct x509_store_ctx_st /* X509_STORE_CTX */ #define X509_V_FLAG_IGNORE_CRITICAL 0x10 /* Disable workarounds for broken certificates */ #define X509_V_FLAG_X509_STRICT 0x20 +/* Enable proxy certificate validation */ +#define X509_V_FLAG_ALLOW_PROXY_CERTS 0x40 int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type, X509_NAME *name); diff --git a/src/lib/libssl/src/crypto/x509/x509cset.c b/src/lib/libssl/src/crypto/x509/x509cset.c index 6cac440ea9..9d1646d5c8 100644 --- a/src/lib/libssl/src/crypto/x509/x509cset.c +++ b/src/lib/libssl/src/crypto/x509/x509cset.c @@ -129,6 +129,7 @@ int X509_CRL_sort(X509_CRL *c) r=sk_X509_REVOKED_value(c->crl->revoked,i); r->sequence=i; } + c->crl->enc.modified = 1; return 1; } diff --git a/src/lib/libssl/src/crypto/x509/x509name.c b/src/lib/libssl/src/crypto/x509/x509name.c index 4c20e03ece..068abfe5f0 100644 --- a/src/lib/libssl/src/crypto/x509/x509name.c +++ b/src/lib/libssl/src/crypto/x509/x509name.c @@ -195,8 +195,8 @@ int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, return ret; } -int X509_NAME_add_entry_by_txt(X509_NAME *name, char *field, int type, - unsigned char *bytes, int len, int loc, int set) +int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, + const unsigned char *bytes, int len, int loc, int set) { X509_NAME_ENTRY *ne; int ret; @@ -273,7 +273,7 @@ err: } X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, - char *field, int type, unsigned char *bytes, int len) + const char *field, int type, const unsigned char *bytes, int len) { ASN1_OBJECT *obj; X509_NAME_ENTRY *nentry; @@ -309,7 +309,7 @@ X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, } X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, - ASN1_OBJECT *obj, int type, unsigned char *bytes, int len) + ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len) { X509_NAME_ENTRY *ret; @@ -347,7 +347,7 @@ int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj) } int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, - unsigned char *bytes, int len) + const unsigned char *bytes, int len) { int i; diff --git a/src/lib/libssl/src/crypto/x509/x_all.c b/src/lib/libssl/src/crypto/x509/x_all.c index fb5015cd4d..ac6dea493a 100644 --- a/src/lib/libssl/src/crypto/x509/x_all.c +++ b/src/lib/libssl/src/crypto/x509/x_all.c @@ -103,6 +103,7 @@ int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md) int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md) { + x->crl->enc.modified = 1; return(ASN1_item_sign(ASN1_ITEM_rptr(X509_CRL_INFO),x->crl->sig_alg, x->sig_alg, x->signature, x->crl,pkey,md)); } diff --git a/src/lib/libssl/src/crypto/x509v3/Makefile b/src/lib/libssl/src/crypto/x509v3/Makefile new file mode 100644 index 0000000000..ed2f91cbb3 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509v3/Makefile @@ -0,0 +1,645 @@ +# +# SSLeay/crypto/x509v3/Makefile +# + +DIR= x509v3 +TOP= ../.. +CC= cc +INCLUDES= -I.. -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC= v3_bcons.c v3_bitst.c v3_conf.c v3_extku.c v3_ia5.c v3_lib.c \ +v3_prn.c v3_utl.c v3err.c v3_genn.c v3_alt.c v3_skey.c v3_akey.c v3_pku.c \ +v3_int.c v3_enum.c v3_sxnet.c v3_cpols.c v3_crld.c v3_purp.c v3_info.c \ +v3_ocsp.c v3_akeya.c v3_pcia.c v3_pci.c +LIBOBJ= v3_bcons.o v3_bitst.o v3_conf.o v3_extku.o v3_ia5.o v3_lib.o \ +v3_prn.o v3_utl.o v3err.o v3_genn.o v3_alt.o v3_skey.o v3_akey.o v3_pku.o \ +v3_int.o v3_enum.o v3_sxnet.o v3_cpols.o v3_crld.o v3_purp.o v3_info.o \ +v3_ocsp.o v3_akeya.o v3_pcia.o v3_pci.o + +SRC= $(LIBSRC) + +EXHEADER= x509v3.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) + +all: lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +v3_akey.o: ../../e_os.h ../../include/openssl/aes.h +v3_akey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_akey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_akey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_akey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_akey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_akey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_akey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_akey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_akey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_akey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_akey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_akey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_akey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_akey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_akey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_akey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_akey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_akey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_akey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_akey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_akey.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_akey.o: ../cryptlib.h v3_akey.c +v3_akeya.o: ../../e_os.h ../../include/openssl/aes.h +v3_akeya.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_akeya.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_akeya.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_akeya.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_akeya.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_akeya.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_akeya.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_akeya.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_akeya.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_akeya.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_akeya.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_akeya.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_akeya.o: ../../include/openssl/opensslconf.h +v3_akeya.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_akeya.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_akeya.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_akeya.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_akeya.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_akeya.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_akeya.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_akeya.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_akeya.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_akeya.c +v3_alt.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_alt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_alt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_alt.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_alt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_alt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_alt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_alt.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_alt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_alt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_alt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_alt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_alt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_alt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_alt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_alt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_alt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_alt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_alt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_alt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_alt.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_alt.o: ../cryptlib.h v3_alt.c +v3_bcons.o: ../../e_os.h ../../include/openssl/aes.h +v3_bcons.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_bcons.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_bcons.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_bcons.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_bcons.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_bcons.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_bcons.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_bcons.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_bcons.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_bcons.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_bcons.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_bcons.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_bcons.o: ../../include/openssl/opensslconf.h +v3_bcons.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_bcons.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_bcons.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_bcons.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_bcons.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_bcons.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_bcons.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_bcons.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_bcons.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bcons.c +v3_bitst.o: ../../e_os.h ../../include/openssl/aes.h +v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_bitst.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_bitst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_bitst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bitst.c +v3_conf.o: ../../e_os.h ../../include/openssl/aes.h +v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_conf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_conf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_conf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_conf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_conf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_conf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_conf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_conf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_conf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_conf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_conf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_conf.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_conf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_conf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_conf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_conf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_conf.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_conf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_conf.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_conf.c +v3_cpols.o: ../../e_os.h ../../include/openssl/aes.h +v3_cpols.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_cpols.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_cpols.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_cpols.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_cpols.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_cpols.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_cpols.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_cpols.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_cpols.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_cpols.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_cpols.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_cpols.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_cpols.o: ../../include/openssl/opensslconf.h +v3_cpols.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_cpols.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_cpols.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_cpols.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_cpols.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_cpols.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_cpols.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_cpols.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_cpols.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_cpols.c +v3_crld.o: ../../e_os.h ../../include/openssl/aes.h +v3_crld.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_crld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_crld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_crld.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_crld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_crld.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_crld.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_crld.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_crld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_crld.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_crld.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_crld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_crld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_crld.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_crld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_crld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_crld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_crld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_crld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_crld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_crld.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_crld.o: ../cryptlib.h v3_crld.c +v3_enum.o: ../../e_os.h ../../include/openssl/aes.h +v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_enum.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_enum.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_enum.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_enum.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_enum.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_enum.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_enum.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_enum.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_enum.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_enum.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_enum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_enum.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_enum.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_enum.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_enum.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_enum.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_enum.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_enum.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_enum.c +v3_extku.o: ../../e_os.h ../../include/openssl/aes.h +v3_extku.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_extku.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_extku.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_extku.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_extku.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_extku.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_extku.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_extku.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_extku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_extku.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_extku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_extku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_extku.o: ../../include/openssl/opensslconf.h +v3_extku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_extku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_extku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_extku.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_extku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_extku.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_extku.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_extku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_extku.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_extku.c +v3_genn.o: ../../e_os.h ../../include/openssl/aes.h +v3_genn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_genn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_genn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_genn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_genn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_genn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_genn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_genn.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_genn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_genn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_genn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_genn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_genn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_genn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_genn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_genn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_genn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_genn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_genn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_genn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_genn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_genn.o: ../cryptlib.h v3_genn.c +v3_ia5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_ia5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_ia5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_ia5.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_ia5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_ia5.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_ia5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_ia5.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_ia5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_ia5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_ia5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_ia5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_ia5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_ia5.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_ia5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_ia5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_ia5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_ia5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_ia5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_ia5.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_ia5.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_ia5.o: ../cryptlib.h v3_ia5.c +v3_info.o: ../../e_os.h ../../include/openssl/aes.h +v3_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_info.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_info.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_info.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_info.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_info.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_info.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_info.o: ../cryptlib.h v3_info.c +v3_int.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_int.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_int.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_int.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_int.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_int.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_int.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_int.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_int.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_int.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_int.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_int.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_int.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_int.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_int.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_int.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_int.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_int.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_int.o: ../cryptlib.h v3_int.c +v3_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_lib.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_lib.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_lib.o: ../cryptlib.h ext_dat.h v3_lib.c +v3_ocsp.o: ../../e_os.h ../../include/openssl/aes.h +v3_ocsp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_ocsp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_ocsp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_ocsp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_ocsp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_ocsp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_ocsp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_ocsp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_ocsp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_ocsp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_ocsp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_ocsp.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +v3_ocsp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_ocsp.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_ocsp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_ocsp.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_ocsp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_ocsp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_ocsp.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_ocsp.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_ocsp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_ocsp.o: ../cryptlib.h v3_ocsp.c +v3_pci.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_pci.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_pci.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_pci.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_pci.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_pci.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_pci.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_pci.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_pci.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_pci.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_pci.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_pci.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_pci.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_pci.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_pci.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_pci.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_pci.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_pci.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_pci.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_pci.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_pci.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_pci.o: ../cryptlib.h v3_pci.c +v3_pcia.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_pcia.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +v3_pcia.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_pcia.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_pcia.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_pcia.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_pcia.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_pcia.o: ../../include/openssl/e_os2.h ../../include/openssl/evp.h +v3_pcia.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_pcia.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_pcia.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_pcia.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_pcia.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_pcia.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_pcia.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_pcia.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_pcia.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_pcia.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_pcia.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_pcia.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_pcia.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_pcia.o: v3_pcia.c +v3_pku.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_pku.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +v3_pku.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_pku.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_pku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_pku.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_pku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_pku.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_pku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_pku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_pku.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_pku.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_pku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_pku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_pku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_pku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_pku.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_pku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_pku.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_pku.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_pku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_pku.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_pku.c +v3_prn.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_prn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_prn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_prn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_prn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_prn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_prn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_prn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_prn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_prn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_prn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_prn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_prn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_prn.o: ../cryptlib.h v3_prn.c +v3_purp.o: ../../e_os.h ../../include/openssl/aes.h +v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_purp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_purp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_purp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_purp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_purp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_purp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_purp.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_purp.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_purp.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_purp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_purp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_purp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_purp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_purp.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_purp.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_purp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_purp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_purp.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_purp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_purp.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_purp.c +v3_skey.o: ../../e_os.h ../../include/openssl/aes.h +v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_skey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_skey.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_skey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_skey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +v3_skey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_skey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_skey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_skey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_skey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_skey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_skey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_skey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_skey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_skey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_skey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_skey.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_skey.c +v3_sxnet.o: ../../e_os.h ../../include/openssl/aes.h +v3_sxnet.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +v3_sxnet.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_sxnet.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_sxnet.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_sxnet.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_sxnet.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_sxnet.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_sxnet.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_sxnet.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_sxnet.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_sxnet.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_sxnet.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_sxnet.o: ../../include/openssl/opensslconf.h +v3_sxnet.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_sxnet.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_sxnet.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_sxnet.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_sxnet.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_sxnet.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_sxnet.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_sxnet.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_sxnet.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_sxnet.c +v3_utl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3_utl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_utl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_utl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_utl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_utl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_utl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_utl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_utl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_utl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_utl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_utl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_utl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_utl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_utl.o: ../cryptlib.h v3_utl.c +v3err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +v3err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3err.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3err.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3err.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3err.o: v3err.c diff --git a/src/lib/libssl/src/crypto/x509v3/ext_dat.h b/src/lib/libssl/src/crypto/x509v3/ext_dat.h index 5442480595..d8328ac468 100644 --- a/src/lib/libssl/src/crypto/x509v3/ext_dat.h +++ b/src/lib/libssl/src/crypto/x509v3/ext_dat.h @@ -3,7 +3,7 @@ * project 1999. */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -60,10 +60,11 @@ extern X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku; extern X509V3_EXT_METHOD v3_pkey_usage_period, v3_sxnet, v3_info, v3_sinfo; extern X509V3_EXT_METHOD v3_ns_ia5_list[], v3_alt[], v3_skey_id, v3_akey_id; -extern X509V3_EXT_METHOD v3_crl_num, v3_crl_reason, v3_crl_invdate, v3_cpols, v3_crld; +extern X509V3_EXT_METHOD v3_crl_num, v3_crl_reason, v3_crl_invdate; +extern X509V3_EXT_METHOD v3_delta_crl, v3_cpols, v3_crld; extern X509V3_EXT_METHOD v3_ocsp_nonce, v3_ocsp_accresp, v3_ocsp_acutoff; extern X509V3_EXT_METHOD v3_ocsp_crlid, v3_ocsp_nocheck, v3_ocsp_serviceloc; -extern X509V3_EXT_METHOD v3_crl_hold; +extern X509V3_EXT_METHOD v3_crl_hold, v3_pci; /* This table will be searched using OBJ_bsearch so it *must* kept in * order of the ext_nid values. @@ -89,6 +90,7 @@ static X509V3_EXT_METHOD *standard_exts[] = { &v3_akey_id, &v3_crld, &v3_ext_ku, +&v3_delta_crl, &v3_crl_reason, #ifndef OPENSSL_NO_OCSP &v3_crl_invdate, @@ -105,8 +107,9 @@ static X509V3_EXT_METHOD *standard_exts[] = { #endif &v3_sinfo, #ifndef OPENSSL_NO_OCSP -&v3_crl_hold +&v3_crl_hold, #endif +&v3_pci, }; /* Number of standard extensions */ diff --git a/src/lib/libssl/src/crypto/x509v3/v3_bitst.c b/src/lib/libssl/src/crypto/x509v3/v3_bitst.c index 16cf125562..274965306d 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_bitst.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_bitst.c @@ -124,7 +124,12 @@ static ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, for(bnam = method->usr_data; bnam->lname; bnam++) { if(!strcmp(bnam->sname, val->name) || !strcmp(bnam->lname, val->name) ) { - ASN1_BIT_STRING_set_bit(bs, bnam->bitnum, 1); + if(!ASN1_BIT_STRING_set_bit(bs, bnam->bitnum, 1)) { + X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, + ERR_R_MALLOC_FAILURE); + M_ASN1_BIT_STRING_free(bs); + return NULL; + } break; } } diff --git a/src/lib/libssl/src/crypto/x509v3/v3_ia5.c b/src/lib/libssl/src/crypto/x509v3/v3_ia5.c index f9414456de..9683afa47c 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_ia5.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_ia5.c @@ -82,7 +82,10 @@ static char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, { char *tmp; if(!ia5 || !ia5->length) return NULL; - if (!(tmp = OPENSSL_malloc(ia5->length + 1))) return NULL; + if(!(tmp = OPENSSL_malloc(ia5->length + 1))) { + X509V3err(X509V3_F_I2S_ASN1_IA5STRING,ERR_R_MALLOC_FAILURE); + return NULL; + } memcpy(tmp, ia5->data, ia5->length); tmp[ia5->length] = 0; return tmp; diff --git a/src/lib/libssl/src/crypto/x509v3/v3_int.c b/src/lib/libssl/src/crypto/x509v3/v3_int.c index f34cbfb731..7a43b4717b 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_int.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_int.c @@ -3,7 +3,7 @@ * project 1999. */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -61,9 +61,16 @@ #include X509V3_EXT_METHOD v3_crl_num = { -NID_crl_number, 0, ASN1_ITEM_ref(ASN1_INTEGER), -0,0,0,0, -(X509V3_EXT_I2S)i2s_ASN1_INTEGER, -0, -0,0,0,0, NULL}; + NID_crl_number, 0, ASN1_ITEM_ref(ASN1_INTEGER), + 0,0,0,0, + (X509V3_EXT_I2S)i2s_ASN1_INTEGER, + 0, + 0,0,0,0, NULL}; + +X509V3_EXT_METHOD v3_delta_crl = { + NID_delta_crl, 0, ASN1_ITEM_ref(ASN1_INTEGER), + 0,0,0,0, + (X509V3_EXT_I2S)i2s_ASN1_INTEGER, + 0, + 0,0,0,0, NULL}; diff --git a/src/lib/libssl/src/crypto/x509v3/v3_pci.c b/src/lib/libssl/src/crypto/x509v3/v3_pci.c new file mode 100644 index 0000000000..b32d968619 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509v3/v3_pci.c @@ -0,0 +1,313 @@ +/* v3_pci.c -*- mode:C; c-file-style: "eay" -*- */ +/* Contributed to the OpenSSL Project 2004 + * by Richard Levitte (richard@levitte.org) + */ +/* Copyright (c) 2004 Kungliga Tekniska Högskolan + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include "cryptlib.h" +#include +#include + +static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *ext, + BIO *out, int indent); +static PROXY_CERT_INFO_EXTENSION *r2i_pci(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, char *str); + +X509V3_EXT_METHOD v3_pci = + { NID_proxyCertInfo, 0, ASN1_ITEM_ref(PROXY_CERT_INFO_EXTENSION), + 0,0,0,0, + 0,0, + NULL, NULL, + (X509V3_EXT_I2R)i2r_pci, + (X509V3_EXT_R2I)r2i_pci, + NULL, + }; + +static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *pci, + BIO *out, int indent) + { + BIO_printf(out, "%*sPath Length Constraint: ", indent, ""); + if (pci->pcPathLengthConstraint) + i2a_ASN1_INTEGER(out, pci->pcPathLengthConstraint); + else + BIO_printf(out, "infinite"); + BIO_puts(out, "\n"); + BIO_printf(out, "%*sPolicy Language: ", indent, ""); + i2a_ASN1_OBJECT(out, pci->proxyPolicy->policyLanguage); + BIO_puts(out, "\n"); + if (pci->proxyPolicy->policy && pci->proxyPolicy->policy->data) + BIO_printf(out, "%*sPolicy Text: %s\n", indent, "", + pci->proxyPolicy->policy->data); + return 1; + } + +static int process_pci_value(CONF_VALUE *val, + ASN1_OBJECT **language, ASN1_INTEGER **pathlen, + ASN1_OCTET_STRING **policy) + { + int free_policy = 0; + + if (strcmp(val->name, "language") == 0) + { + if (*language) + { + X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED); + X509V3_conf_err(val); + return 0; + } + if (!(*language = OBJ_txt2obj(val->value, 0))) + { + X509V3err(X509V3_F_R2I_PCI,X509V3_R_INVALID_OBJECT_IDENTIFIER); + X509V3_conf_err(val); + return 0; + } + } + else if (strcmp(val->name, "pathlen") == 0) + { + if (*pathlen) + { + X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED); + X509V3_conf_err(val); + return 0; + } + if (!X509V3_get_value_int(val, pathlen)) + { + X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_PATH_LENGTH); + X509V3_conf_err(val); + return 0; + } + } + else if (strcmp(val->name, "policy") == 0) + { + unsigned char *tmp_data = NULL; + long val_len; + if (!*policy) + { + *policy = ASN1_OCTET_STRING_new(); + if (!*policy) + { + X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE); + X509V3_conf_err(val); + return 0; + } + free_policy = 1; + } + if (strncmp(val->value, "hex:", 4) == 0) + { + unsigned char *tmp_data2 = + string_to_hex(val->value + 4, &val_len); + + if (!tmp_data2) goto err; + + tmp_data = OPENSSL_realloc((*policy)->data, + (*policy)->length + val_len + 1); + if (tmp_data) + { + (*policy)->data = tmp_data; + memcpy(&(*policy)->data[(*policy)->length], + tmp_data2, val_len); + (*policy)->length += val_len; + (*policy)->data[(*policy)->length] = '\0'; + } + } + else if (strncmp(val->value, "file:", 5) == 0) + { + unsigned char buf[2048]; + int n; + BIO *b = BIO_new_file(val->value + 5, "r"); + if (!b) + { + X509V3err(X509V3_F_R2I_PCI,ERR_R_BIO_LIB); + X509V3_conf_err(val); + goto err; + } + while((n = BIO_read(b, buf, sizeof(buf))) > 0 + || (n == 0 && BIO_should_retry(b))) + { + if (!n) continue; + + tmp_data = OPENSSL_realloc((*policy)->data, + (*policy)->length + n + 1); + + if (!tmp_data) + break; + + (*policy)->data = tmp_data; + memcpy(&(*policy)->data[(*policy)->length], + buf, n); + (*policy)->length += n; + (*policy)->data[(*policy)->length] = '\0'; + } + + if (n < 0) + { + X509V3err(X509V3_F_R2I_PCI,ERR_R_BIO_LIB); + X509V3_conf_err(val); + goto err; + } + } + else if (strncmp(val->value, "text:", 5) == 0) + { + val_len = strlen(val->value + 5); + tmp_data = OPENSSL_realloc((*policy)->data, + (*policy)->length + val_len + 1); + if (tmp_data) + { + (*policy)->data = tmp_data; + memcpy(&(*policy)->data[(*policy)->length], + val->value + 5, val_len); + (*policy)->length += val_len; + (*policy)->data[(*policy)->length] = '\0'; + } + } + else + { + X509V3err(X509V3_F_R2I_PCI,X509V3_R_INCORRECT_POLICY_SYNTAX_TAG); + X509V3_conf_err(val); + goto err; + } + if (!tmp_data) + { + X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE); + X509V3_conf_err(val); + goto err; + } + } + return 1; +err: + if (free_policy) + { + ASN1_OCTET_STRING_free(*policy); + *policy = NULL; + } + return 0; + } + +static PROXY_CERT_INFO_EXTENSION *r2i_pci(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, char *value) + { + PROXY_CERT_INFO_EXTENSION *pci = NULL; + STACK_OF(CONF_VALUE) *vals; + ASN1_OBJECT *language = NULL; + ASN1_INTEGER *pathlen = NULL; + ASN1_OCTET_STRING *policy = NULL; + int i, j; + + vals = X509V3_parse_list(value); + for (i = 0; i < sk_CONF_VALUE_num(vals); i++) + { + CONF_VALUE *cnf = sk_CONF_VALUE_value(vals, i); + if (!cnf->name || (*cnf->name != '@' && !cnf->value)) + { + X509V3err(X509V3_F_R2I_PCI,X509V3_R_INVALID_PROXY_POLICY_SETTING); + X509V3_conf_err(cnf); + goto err; + } + if (*cnf->name == '@') + { + STACK_OF(CONF_VALUE) *sect; + int success_p = 1; + + sect = X509V3_get_section(ctx, cnf->name + 1); + if (!sect) + { + X509V3err(X509V3_F_R2I_PCI,X509V3_R_INVALID_SECTION); + X509V3_conf_err(cnf); + goto err; + } + for (j = 0; success_p && j < sk_CONF_VALUE_num(sect); j++) + { + success_p = + process_pci_value(sk_CONF_VALUE_value(sect, j), + &language, &pathlen, &policy); + } + X509V3_section_free(ctx, sect); + if (!success_p) + goto err; + } + else + { + if (!process_pci_value(cnf, + &language, &pathlen, &policy)) + { + X509V3_conf_err(cnf); + goto err; + } + } + } + + /* Language is mandatory */ + if (!language) + { + X509V3err(X509V3_F_R2I_PCI,X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED); + goto err; + } + i = OBJ_obj2nid(language); + if ((i == NID_Independent || i == NID_id_ppl_inheritAll) && policy) + { + X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY); + goto err; + } + + pci = PROXY_CERT_INFO_EXTENSION_new(); + if (!pci) + { + X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE); + goto err; + } + pci->proxyPolicy = PROXY_POLICY_new(); + if (!pci->proxyPolicy) + { + X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE); + goto err; + } + + pci->proxyPolicy->policyLanguage = language; language = NULL; + pci->proxyPolicy->policy = policy; policy = NULL; + pci->pcPathLengthConstraint = pathlen; pathlen = NULL; + goto end; +err: + if (language) { ASN1_OBJECT_free(language); language = NULL; } + if (pathlen) { ASN1_INTEGER_free(pathlen); pathlen = NULL; } + if (policy) { ASN1_OCTET_STRING_free(policy); policy = NULL; } + if (pci && pci->proxyPolicy) + { + PROXY_POLICY_free(pci->proxyPolicy); + pci->proxyPolicy = NULL; + } + if (pci) { PROXY_CERT_INFO_EXTENSION_free(pci); pci = NULL; } +end: + sk_CONF_VALUE_pop_free(vals, X509V3_conf_free); + return pci; + } diff --git a/src/lib/libssl/src/crypto/x509v3/v3_pcia.c b/src/lib/libssl/src/crypto/x509v3/v3_pcia.c new file mode 100644 index 0000000000..bb362e0e5a --- /dev/null +++ b/src/lib/libssl/src/crypto/x509v3/v3_pcia.c @@ -0,0 +1,55 @@ +/* v3_pcia.c -*- mode:C; c-file-style: "eay" -*- */ +/* Contributed to the OpenSSL Project 2004 + * by Richard Levitte (richard@levitte.org) + */ +/* Copyright (c) 2004 Kungliga Tekniska Högskolan + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include + +ASN1_SEQUENCE(PROXY_POLICY) = + { + ASN1_SIMPLE(PROXY_POLICY,policyLanguage,ASN1_OBJECT), + ASN1_OPT(PROXY_POLICY,policy,ASN1_OCTET_STRING) +} ASN1_SEQUENCE_END(PROXY_POLICY) + +IMPLEMENT_ASN1_FUNCTIONS(PROXY_POLICY) + +ASN1_SEQUENCE(PROXY_CERT_INFO_EXTENSION) = + { + ASN1_OPT(PROXY_CERT_INFO_EXTENSION,pcPathLengthConstraint,ASN1_INTEGER), + ASN1_SIMPLE(PROXY_CERT_INFO_EXTENSION,proxyPolicy,PROXY_POLICY) +} ASN1_SEQUENCE_END(PROXY_CERT_INFO_EXTENSION) + +IMPLEMENT_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) diff --git a/src/lib/libssl/src/crypto/x509v3/v3_purp.c b/src/lib/libssl/src/crypto/x509v3/v3_purp.c index b3d1ae5d1c..bbdf6da493 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_purp.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_purp.c @@ -63,7 +63,6 @@ static void x509v3_cache_extensions(X509 *x); -static int ca_check(const X509 *x); static int check_ssl_ca(const X509 *x); static int check_purpose_ssl_client(const X509_PURPOSE *xp, const X509 *x, int ca); static int check_purpose_ssl_server(const X509_PURPOSE *xp, const X509 *x, int ca); @@ -286,7 +285,8 @@ int X509_supported_extension(X509_EXTENSION *ex) NID_key_usage, /* 83 */ NID_subject_alt_name, /* 85 */ NID_basic_constraints, /* 87 */ - NID_ext_key_usage /* 126 */ + NID_ext_key_usage, /* 126 */ + NID_proxyCertInfo /* 661 */ }; int ex_nid; @@ -307,6 +307,7 @@ int X509_supported_extension(X509_EXTENSION *ex) static void x509v3_cache_extensions(X509 *x) { BASIC_CONSTRAINTS *bs; + PROXY_CERT_INFO_EXTENSION *pci; ASN1_BIT_STRING *usage; ASN1_BIT_STRING *ns; EXTENDED_KEY_USAGE *extusage; @@ -335,6 +336,16 @@ static void x509v3_cache_extensions(X509 *x) BASIC_CONSTRAINTS_free(bs); x->ex_flags |= EXFLAG_BCONS; } + /* Handle proxy certificates */ + if((pci=X509_get_ext_d2i(x, NID_proxyCertInfo, NULL, NULL))) { + if (x->ex_flags & EXFLAG_CA + || X509_get_ext_by_NID(x, NID_subject_alt_name, 0) >= 0 + || X509_get_ext_by_NID(x, NID_issuer_alt_name, 0) >= 0) { + x->ex_flags |= EXFLAG_INVALID; + } + PROXY_CERT_INFO_EXTENSION_free(pci); + x->ex_flags |= EXFLAG_PROXY; + } /* Handle key usage */ if((usage=X509_get_ext_d2i(x, NID_key_usage, NULL, NULL))) { if(usage->length > 0) { @@ -426,7 +437,7 @@ static void x509v3_cache_extensions(X509 *x) #define ns_reject(x, usage) \ (((x)->ex_flags & EXFLAG_NSCERT) && !((x)->ex_nscert & (usage))) -static int ca_check(const X509 *x) +static int check_ca(const X509 *x) { /* keyUsage if present should allow cert signing */ if(ku_reject(x, KU_KEY_CERT_SIGN)) return 0; @@ -435,25 +446,37 @@ static int ca_check(const X509 *x) /* If basicConstraints says not a CA then say so */ else return 0; } else { + /* we support V1 roots for... uh, I don't really know why. */ if((x->ex_flags & V1_ROOT) == V1_ROOT) return 3; /* If key usage present it must have certSign so tolerate it */ else if (x->ex_flags & EXFLAG_KUSAGE) return 4; - else return 2; + /* Older certificates could have Netscape-specific CA types */ + else if (x->ex_flags & EXFLAG_NSCERT + && x->ex_nscert & NS_ANY_CA) return 5; + /* can this still be regarded a CA certificate? I doubt it */ + return 0; } } +int X509_check_ca(X509 *x) +{ + if(!(x->ex_flags & EXFLAG_SET)) { + CRYPTO_w_lock(CRYPTO_LOCK_X509); + x509v3_cache_extensions(x); + CRYPTO_w_unlock(CRYPTO_LOCK_X509); + } + + return check_ca(x); +} + /* Check SSL CA: common checks for SSL client and server */ static int check_ssl_ca(const X509 *x) { int ca_ret; - ca_ret = ca_check(x); + ca_ret = check_ca(x); if(!ca_ret) return 0; /* check nsCertType if present */ - if(x->ex_flags & EXFLAG_NSCERT) { - if(x->ex_nscert & NS_SSL_CA) return ca_ret; - return 0; - } - if(ca_ret != 2) return ca_ret; + if(ca_ret != 5 || x->ex_nscert & NS_SSL_CA) return ca_ret; else return 0; } @@ -498,14 +521,10 @@ static int purpose_smime(const X509 *x, int ca) if(xku_reject(x,XKU_SMIME)) return 0; if(ca) { int ca_ret; - ca_ret = ca_check(x); + ca_ret = check_ca(x); if(!ca_ret) return 0; /* check nsCertType if present */ - if(x->ex_flags & EXFLAG_NSCERT) { - if(x->ex_nscert & NS_SMIME_CA) return ca_ret; - return 0; - } - if(ca_ret != 2) return ca_ret; + if(ca_ret != 5 || x->ex_nscert & NS_SMIME_CA) return ca_ret; else return 0; } if(x->ex_flags & EXFLAG_NSCERT) { @@ -539,7 +558,7 @@ static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x, int ca) { if(ca) { int ca_ret; - if((ca_ret = ca_check(x)) != 2) return ca_ret; + if((ca_ret = check_ca(x)) != 2) return ca_ret; else return 0; } if(ku_reject(x, KU_CRL_SIGN)) return 0; @@ -552,17 +571,9 @@ static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x, int ca) static int ocsp_helper(const X509_PURPOSE *xp, const X509 *x, int ca) { - /* Must be a valid CA */ - if(ca) { - int ca_ret; - ca_ret = ca_check(x); - if(ca_ret != 2) return ca_ret; - if(x->ex_flags & EXFLAG_NSCERT) { - if(x->ex_nscert & NS_ANY_CA) return ca_ret; - return 0; - } - return 0; - } + /* Must be a valid CA. Should we really support the "I don't know" + value (2)? */ + if(ca) return check_ca(x); /* leaf certificate is checked in OCSP_verify() */ return 1; } @@ -624,7 +635,13 @@ int X509_check_issued(X509 *issuer, X509 *subject) return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH; } } - if(ku_reject(issuer, KU_KEY_CERT_SIGN)) return X509_V_ERR_KEYUSAGE_NO_CERTSIGN; + if(subject->ex_flags & EXFLAG_PROXY) + { + if(ku_reject(issuer, KU_DIGITAL_SIGNATURE)) + return X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE; + } + else if(ku_reject(issuer, KU_KEY_CERT_SIGN)) + return X509_V_ERR_KEYUSAGE_NO_CERTSIGN; return X509_V_OK; } diff --git a/src/lib/libssl/src/crypto/x509v3/v3err.c b/src/lib/libssl/src/crypto/x509v3/v3err.c index 6458e95bb9..2df0c3ef01 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3err.c +++ b/src/lib/libssl/src/crypto/x509v3/v3err.c @@ -1,6 +1,6 @@ /* crypto/x509v3/v3err.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -72,12 +72,14 @@ static ERR_STRING_DATA X509V3_str_functs[]= {ERR_PACK(0,X509V3_F_DO_EXT_I2D,0), "DO_EXT_I2D"}, {ERR_PACK(0,X509V3_F_HEX_TO_STRING,0), "hex_to_string"}, {ERR_PACK(0,X509V3_F_I2S_ASN1_ENUMERATED,0), "i2s_ASN1_ENUMERATED"}, +{ERR_PACK(0,X509V3_F_I2S_ASN1_IA5STRING,0), "I2S_ASN1_IA5STRING"}, {ERR_PACK(0,X509V3_F_I2S_ASN1_INTEGER,0), "i2s_ASN1_INTEGER"}, {ERR_PACK(0,X509V3_F_I2V_AUTHORITY_INFO_ACCESS,0), "I2V_AUTHORITY_INFO_ACCESS"}, {ERR_PACK(0,X509V3_F_NOTICE_SECTION,0), "NOTICE_SECTION"}, {ERR_PACK(0,X509V3_F_NREF_NOS,0), "NREF_NOS"}, {ERR_PACK(0,X509V3_F_POLICY_SECTION,0), "POLICY_SECTION"}, {ERR_PACK(0,X509V3_F_R2I_CERTPOL,0), "R2I_CERTPOL"}, +{ERR_PACK(0,X509V3_F_R2I_PCI,0), "R2I_PCI"}, {ERR_PACK(0,X509V3_F_S2I_ASN1_IA5STRING,0), "S2I_ASN1_IA5STRING"}, {ERR_PACK(0,X509V3_F_S2I_ASN1_INTEGER,0), "s2i_ASN1_INTEGER"}, {ERR_PACK(0,X509V3_F_S2I_ASN1_OCTET_STRING,0), "s2i_ASN1_OCTET_STRING"}, @@ -128,6 +130,7 @@ static ERR_STRING_DATA X509V3_str_reasons[]= {X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED,"extension setting not supported"}, {X509V3_R_EXTENSION_VALUE_ERROR ,"extension value error"}, {X509V3_R_ILLEGAL_HEX_DIGIT ,"illegal hex digit"}, +{X509V3_R_INCORRECT_POLICY_SYNTAX_TAG ,"incorrect policy syntax tag"}, {X509V3_R_INVALID_BOOLEAN_STRING ,"invalid boolean string"}, {X509V3_R_INVALID_EXTENSION_STRING ,"invalid extension string"}, {X509V3_R_INVALID_NAME ,"invalid name"}, @@ -139,6 +142,8 @@ static ERR_STRING_DATA X509V3_str_reasons[]= {X509V3_R_INVALID_OBJECT_IDENTIFIER ,"invalid object identifier"}, {X509V3_R_INVALID_OPTION ,"invalid option"}, {X509V3_R_INVALID_POLICY_IDENTIFIER ,"invalid policy identifier"}, +{X509V3_R_INVALID_PROXY_POLICY_IDENTIFIER,"invalid proxy policy identifier"}, +{X509V3_R_INVALID_PROXY_POLICY_SETTING ,"invalid proxy policy setting"}, {X509V3_R_INVALID_PURPOSE ,"invalid purpose"}, {X509V3_R_INVALID_SECTION ,"invalid section"}, {X509V3_R_INVALID_SYNTAX ,"invalid syntax"}, @@ -149,9 +154,16 @@ static ERR_STRING_DATA X509V3_str_reasons[]= {X509V3_R_NO_ISSUER_CERTIFICATE ,"no issuer certificate"}, {X509V3_R_NO_ISSUER_DETAILS ,"no issuer details"}, {X509V3_R_NO_POLICY_IDENTIFIER ,"no policy identifier"}, +{X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED,"no proxy cert policy language defined"}, {X509V3_R_NO_PUBLIC_KEY ,"no public key"}, {X509V3_R_NO_SUBJECT_DETAILS ,"no subject details"}, {X509V3_R_ODD_NUMBER_OF_DIGITS ,"odd number of digits"}, +{X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED,"policy language alreadty defined"}, +{X509V3_R_POLICY_PATH_LENGTH ,"policy path length"}, +{X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED,"policy path length alreadty defined"}, +{X509V3_R_POLICY_SYNTAX_NOT ,"policy syntax not"}, +{X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED,"policy syntax not currently supported"}, +{X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY,"policy when proxy language requires no policy"}, {X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS ,"unable to get issuer details"}, {X509V3_R_UNABLE_TO_GET_ISSUER_KEYID ,"unable to get issuer keyid"}, {X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT ,"unknown bit string argument"}, diff --git a/src/lib/libssl/src/crypto/x509v3/x509v3.h b/src/lib/libssl/src/crypto/x509v3/x509v3.h index fb07a19016..e6d91251c2 100644 --- a/src/lib/libssl/src/crypto/x509v3/x509v3.h +++ b/src/lib/libssl/src/crypto/x509v3/x509v3.h @@ -287,6 +287,23 @@ typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES; DECLARE_STACK_OF(POLICYINFO) DECLARE_ASN1_SET_OF(POLICYINFO) +/* Proxy certificate structures, see RFC 3820 */ +typedef struct PROXY_POLICY_st + { + ASN1_OBJECT *policyLanguage; + ASN1_OCTET_STRING *policy; + } PROXY_POLICY; + +typedef struct PROXY_CERT_INFO_EXTENSION_st + { + ASN1_INTEGER *pcPathLengthConstraint; + PROXY_POLICY *proxyPolicy; + } PROXY_CERT_INFO_EXTENSION; + +DECLARE_ASN1_FUNCTIONS(PROXY_POLICY) +DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) + + #define X509V3_conf_err(val) ERR_add_error_data(6, "section:", val->section, \ ",name:", val->name, ",value:", val->value); @@ -325,6 +342,7 @@ DECLARE_ASN1_SET_OF(POLICYINFO) #define EXFLAG_INVALID 0x80 #define EXFLAG_SET 0x100 #define EXFLAG_CRITICAL 0x200 +#define EXFLAG_PROXY 0x400 #define KU_DIGITAL_SIGNATURE 0x0080 #define KU_NON_REPUDIATION 0x0040 @@ -527,6 +545,7 @@ int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); int X509V3_extensions_print(BIO *out, char *title, STACK_OF(X509_EXTENSION) *exts, unsigned long flag, int indent); +int X509_check_ca(X509 *x); int X509_check_purpose(X509 *x, int id, int ca); int X509_supported_extension(X509_EXTENSION *ex); int X509_PURPOSE_set(int *p, int purpose); @@ -564,12 +583,14 @@ void ERR_load_X509V3_strings(void); #define X509V3_F_DO_EXT_I2D 135 #define X509V3_F_HEX_TO_STRING 111 #define X509V3_F_I2S_ASN1_ENUMERATED 121 +#define X509V3_F_I2S_ASN1_IA5STRING 142 #define X509V3_F_I2S_ASN1_INTEGER 120 #define X509V3_F_I2V_AUTHORITY_INFO_ACCESS 138 #define X509V3_F_NOTICE_SECTION 132 #define X509V3_F_NREF_NOS 133 #define X509V3_F_POLICY_SECTION 131 #define X509V3_F_R2I_CERTPOL 130 +#define X509V3_F_R2I_PCI 142 #define X509V3_F_S2I_ASN1_IA5STRING 100 #define X509V3_F_S2I_ASN1_INTEGER 108 #define X509V3_F_S2I_ASN1_OCTET_STRING 112 @@ -617,6 +638,7 @@ void ERR_load_X509V3_strings(void); #define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103 #define X509V3_R_EXTENSION_VALUE_ERROR 116 #define X509V3_R_ILLEGAL_HEX_DIGIT 113 +#define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 153 #define X509V3_R_INVALID_BOOLEAN_STRING 104 #define X509V3_R_INVALID_EXTENSION_STRING 105 #define X509V3_R_INVALID_NAME 106 @@ -628,6 +650,8 @@ void ERR_load_X509V3_strings(void); #define X509V3_R_INVALID_OBJECT_IDENTIFIER 110 #define X509V3_R_INVALID_OPTION 138 #define X509V3_R_INVALID_POLICY_IDENTIFIER 134 +#define X509V3_R_INVALID_PROXY_POLICY_IDENTIFIER 147 +#define X509V3_R_INVALID_PROXY_POLICY_SETTING 151 #define X509V3_R_INVALID_PURPOSE 146 #define X509V3_R_INVALID_SECTION 135 #define X509V3_R_INVALID_SYNTAX 143 @@ -638,9 +662,16 @@ void ERR_load_X509V3_strings(void); #define X509V3_R_NO_ISSUER_CERTIFICATE 121 #define X509V3_R_NO_ISSUER_DETAILS 127 #define X509V3_R_NO_POLICY_IDENTIFIER 139 +#define X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED 148 #define X509V3_R_NO_PUBLIC_KEY 114 #define X509V3_R_NO_SUBJECT_DETAILS 125 #define X509V3_R_ODD_NUMBER_OF_DIGITS 112 +#define X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED 149 +#define X509V3_R_POLICY_PATH_LENGTH 152 +#define X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED 150 +#define X509V3_R_POLICY_SYNTAX_NOT 154 +#define X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED 155 +#define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 156 #define X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS 122 #define X509V3_R_UNABLE_TO_GET_ISSUER_KEYID 123 #define X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT 111 diff --git a/src/lib/libssl/src/demos/engines/rsaref/rsaref.c b/src/lib/libssl/src/demos/engines/rsaref/rsaref.c index 872811b8f7..f97974fc49 100644 --- a/src/lib/libssl/src/demos/engines/rsaref/rsaref.c +++ b/src/lib/libssl/src/demos/engines/rsaref/rsaref.c @@ -426,7 +426,7 @@ static int rsaref_private_encrypt(int len, const unsigned char *from, unsigned c } if (!RSAref_Private_eay2ref(rsa,&RSAkey)) goto err; - if ((i=RSAPrivateEncrypt(to,(unsigned int)&outlen,(unsigned char *)from,len,&RSAkey)) != 0) + if ((i=RSAPrivateEncrypt(to,(unsigned int *)&outlen,(unsigned char *)from,len,&RSAkey)) != 0) { RSAREFerr(RSAREF_F_RSAREF_PRIVATE_ENCRYPT,i); outlen= -1; @@ -444,7 +444,7 @@ static int rsaref_public_decrypt(int len, const unsigned char *from, unsigned ch if (!RSAref_Public_eay2ref(rsa,&RSAkey)) goto err; - if ((i=RSAPublicDecrypt(to,(unsigned int)&outlen,(unsigned char *)from,len,&RSAkey)) != 0) + if ((i=RSAPublicDecrypt(to,(unsigned int *)&outlen,(unsigned char *)from,len,&RSAkey)) != 0) { RSAREFerr(RSAREF_F_RSAREF_PUBLIC_DECRYPT,i); outlen= -1; @@ -481,7 +481,7 @@ static int rsaref_public_encrypt(int len, const unsigned char *from, unsigned ch if (!RSAref_Public_eay2ref(rsa,&RSAkey)) goto err; - if ((i=RSAPublicEncrypt(to,(unsigned int)&outlen,(unsigned char *)from,len,&RSAkey,&rnd)) != 0) + if ((i=RSAPublicEncrypt(to,(unsigned int *)&outlen,(unsigned char *)from,len,&RSAkey,&rnd)) != 0) { RSAREFerr(RSAREF_F_RSAREF_PUBLIC_ENCRYPT,i); outlen= -1; diff --git a/src/lib/libssl/src/doc/HOWTO/proxy_certificates.txt b/src/lib/libssl/src/doc/HOWTO/proxy_certificates.txt new file mode 100644 index 0000000000..3d36b02f6b --- /dev/null +++ b/src/lib/libssl/src/doc/HOWTO/proxy_certificates.txt @@ -0,0 +1,322 @@ + + HOWTO proxy certificates + +0. WARNING + +NONE OF THE CODE PRESENTED HERE HAVE BEEN CHECKED! They are just an +example to show you how things can be done. There may be typos or +type conflicts, and you will have to resolve them. + +1. Introduction + +Proxy certificates are defined in RFC 3820. They are really usual +certificates with the mandatory extension proxyCertInfo. + +Proxy certificates are issued by an End Entity (typically a user), +either directly with the EE certificate as issuing certificate, or by +extension through an already issued proxy certificate.. They are used +to extend rights to some other entity (a computer process, typically, +or sometimes to the user itself), so it can perform operations in the +name of the owner of the EE certificate. + +See http://www.ietf.org/rfc/rfc3820.txt for more information. + + +2. A warning about proxy certificates + +Noone seems to have tested proxy certificates with security in mind. +Basically, to this date, it seems that proxy certificates have only +been used in a world that's highly aware of them. What would happen +if an unsuspecting application is to validate a chain of certificates +that contains proxy certificates? It would usually consider the leaf +to be the certificate to check for authorisation data, and since proxy +certificates are controlled by the EE certificate owner alone, it's +would be normal to consider what the EE certificate owner could do +with them. + +subjectAltName and issuerAltName are forbidden in proxy certificates, +and this is enforced in OpenSSL. The subject must be the same as the +issuer, with one commonName added on. + +Possible threats are, as far as has been imagined so far: + + - impersonation through commonName (think server certificates). + - use of additional extensions, possibly non-standard ones used in + certain environments, that would grant extra or different + authorisation rights. + +For this reason, OpenSSL requires that the use of proxy certificates +be explicitely allowed. Currently, this can be done using the +following methods: + + - if the application calls X509_verify_cert() itself, it can do the + following prior to that call (ctx is the pointer passed in the call + to X509_verify_cert()): + + X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_ALLOW_PROXY_CERTS); + + - in all other cases, proxy certificate validation can be enabled + before starting the application by setting the envirnoment variable + OPENSSL_ALLOW_PROXY with some non-empty value. + +There are thoughts to allow proxy certificates with a line in the +default openssl.cnf, but that's still in the future. + + +3. How to create proxy cerificates + +It's quite easy to create proxy certificates, by taking advantage of +the lack of checks of the 'openssl x509' application (*ahem*). But +first, you need to create a configuration section that contains a +definition of the proxyCertInfo extension, a little like this: + + [ v3_proxy ] + # A proxy certificate MUST NEVER be a CA certificate. + basicConstraints=CA:FALSE + + # Usual authority key ID + authorityKeyIdentifier=keyid,issuer:always + + # Now, for the extension that marks this certificate as a proxy one + proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:1,policy:text:AB + +It's also possible to give the proxy extension in a separate section: + + proxyCertInfo=critical,@proxy_ext + + [ proxy_ext ] + language=id-ppl-anyLanguage + pathlen=0 + policy=text:BC + +The policy value has a specific syntax, {syntag}:{string}, where the +syntag determines what will be done with the string. The recognised +syntags are as follows: + + text indicates that the string is simply the bytes, not + encoded in any kind of way: + + policy=text:räksmörgås + + Previous versions of this design had a specific tag + for UTF-8 text. However, since the bytes are copied + as-is anyway, there's no need for it. Instead, use + the text: tag, like this: + + policy=text:räksmörgÃ¥s + + hex indicates the string is encoded in hex, with colons + between each byte (every second hex digit): + + policy=hex:72:E4:6B:73:6D:F6:72:67:E5:73 + + Previous versions of this design had a tag to insert a + complete DER blob. However, the only legal use for + this would be to surround the bytes that would go with + the hex: tag with what's needed to construct a correct + OCTET STRING. Since hex: does that, the DER tag felt + superfluous, and was therefore removed. + + file indicates that the text of the policy should really be + taken from a file. The string is then really a file + name. This is useful for policies that are large + (more than a few of lines) XML documents, for example. + +The 'policy' setting can be split up in multiple lines like this: + + 0.policy=This is + 1.polisy= a multi- + 2.policy=line policy. + +NOTE: the proxy policy value is the part that determines the rights +granted to the process using the proxy certificate. The value is +completely dependent on the application reading and interpretting it! + +Now that you have created an extension section for your proxy +certificate, you can now easily create a proxy certificate like this: + + openssl req -new -config openssl.cnf \ + -out proxy.req -keyout proxy.key + openssl x509 -req -CAcreateserial -in proxy.req -days 7 \ + -out proxy.crt -CA user.crt -CAkey user.key \ + -extfile openssl.cnf -extensions v3_proxy + +It's just as easy to create a proxy certificate using another proxy +certificate as issuer (note that I'm using a different configuration +section for it): + + openssl req -new -config openssl.cnf \ + -out proxy2.req -keyout proxy2.key + openssl x509 -req -CAcreateserial -in proxy2.req -days 7 \ + -out proxy2.crt -CA proxy.crt -CAkey proxy.key \ + -extfile openssl.cnf -extensions v3_proxy2 + + +4. How to have your application interpret the policy? + +The basic way to interpret proxy policies is to prepare some default +rights, then do a check of the proxy certificate against the a chain +of proxy certificates, user certificate and CA certificates, and see +what rights came out by the end. Sounds easy, huh? It almost is. + +The slightly complicated part is how to pass data between your +application and the certificate validation procedure. + +You need the following ingredients: + + - a callback routing that will be called for every certificate that's + validated. It will be called several times for each certificates, + so you must be attentive to when it's a good time to do the proxy + policy interpretation and check, as well as to fill in the defaults + when the EE certificate is checked. + + - a structure of data that's shared between your application code and + the callback. + + - a wrapper function that sets it all up. + + - an ex_data index function that creates an index into the generic + ex_data store that's attached to an X509 validation context. + +This is some cookbook code for you to fill in: + + /* In this example, I will use a view of granted rights as a bit + array, one bit for each possible right. */ + typedef struct your_rights { + unsigned char rights[total_rights / 8]; + } YOUR_RIGHTS; + + /* The following procedure will create an index for the ex_data + store in the X509 validation context the first time it's called. + Subsequent calls will return the same index. */ + static int get_proxy_auth_ex_data_idx(void) + { + static volatile int idx = -1; + if (idx < 0) + { + CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); + if (idx < 0) + { + idx = X509_STORE_CTX_get_ex_new_index(0, + "for verify callback", + NULL,NULL,NULL); + } + CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); + } + return idx; + } + + /* Callback to be given to the X509 validation procedure. */ + static int verify_callback(int ok, X509_STORE_CTX *ctx) + { + if (ok == 1) /* It's REALLY important you keep the proxy policy + check within this secion. It's important to know + that when ok is 1, the certificates are checked + from top to bottom. You get the CA root first, + followed by the possible chain of intermediate + CAs, followed by the EE certificate, followed by + the possible proxy certificates. */ + { + X509 *xs = ctx->current_cert; + + if (xs->ex_flags & EXFLAG_PROXY) + { + YOUR_RIGHTS *rights = + (YOUR_RIGHTS *)X509_STORE_CTX_get_ex_data(ctx, + get_proxy_auth_ex_data_idx()); + PROXY_CERT_INFO_EXTENSION *pci = + X509_get_ext_d2i(xs, NID_proxyCertInfo, NULL, NULL); + + switch (OBJ_obj2nid(pci->proxyPolicy->policyLanguage)) + { + case NID_Independent: + /* Do whatever you need to grant explicit rights to + this particular proxy certificate, usually by + pulling them from some database. If there are none + to be found, clear all rights (making this and any + subsequent proxy certificate void of any rights). + */ + memset(rights->rights, 0, sizeof(rights->rights)); + break; + case NID_id_ppl_inheritAll: + /* This is basically a NOP, we simply let the current + rights stand as they are. */ + break; + default: + /* This is usually the most complex section of code. + You really do whatever you want as long as you + follow RFC 3820. In the example we use here, the + simplest thing to do is to build another, temporary + bit array and fill it with the rights granted by + the current proxy certificate, then use it as a + mask on the accumulated rights bit array, and + voilà, you now have a new accumulated rights bit + array. */ + { + int i; + YOUR_RIGHTS tmp_rights; + memset(tmp_rights.rights, 0, sizeof(tmp_rights.rights)); + + /* process_rights() is supposed to be a procedure + that takes a string and it's length, interprets + it and sets the bits in the YOUR_RIGHTS pointed + at by the third argument. */ + process_rights((char *) pci->proxyPolicy->policy->data, + pci->proxyPolicy->policy->length, + &tmp_rights); + + for(i = 0; i < total_rights / 8; i++) + rights->rights[i] &= tmp_rights.rights[i]; + } + break; + } + PROXY_CERT_INFO_EXTENSION_free(pci); + } + else if (!(xs->ex_flags & EXFLAG_CA)) + { + /* We have a EE certificate, let's use it to set default! + */ + YOUR_RIGHTS *rights = + (YOUR_RIGHTS *)X509_STORE_CTX_get_ex_data(ctx, + get_proxy_auth_ex_data_idx()); + + /* The following procedure finds out what rights the owner + of the current certificate has, and sets them in the + YOUR_RIGHTS structure pointed at by the second + argument. */ + set_default_rights(xs, rights); + } + } + return ok; + } + + static int my_X509_verify_cert(X509_STORE_CTX *ctx, + YOUR_RIGHTS *needed_rights) + { + int i; + int (*save_verify_cb)(int ok,X509_STORE_CTX *ctx) = ctx->verify_cb; + YOUR_RIGHTS rights; + + X509_STORE_CTX_set_verify_cb(ctx, verify_callback); + X509_STORE_CTX_set_ex_data(ctx, get_proxy_auth_ex_data_idx(), &rights); + X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_ALLOW_PROXY_CERTS); + ok = X509_verify_cert(ctx); + + if (ok == 1) + { + ok = check_needed_rights(rights, needed_rights); + } + + X509_STORE_CTX_set_verify_cb(ctx, save_verify_cb); + + return ok; + } + +If you use SSL or TLS, you can easily set up a callback to have the +certificates checked properly, using the code above: + + SSL_CTX_set_cert_verify_callback(s_ctx, my_X509_verify_cert, &needed_rights); + + +-- +Richard Levitte diff --git a/src/lib/libssl/src/doc/apps/asn1parse.pod b/src/lib/libssl/src/doc/apps/asn1parse.pod index e76e9813ab..69ee4dfee6 100644 --- a/src/lib/libssl/src/doc/apps/asn1parse.pod +++ b/src/lib/libssl/src/doc/apps/asn1parse.pod @@ -123,7 +123,7 @@ C<1.2.3.4 shortName A long name> =head1 BUGS -There should be options to change the format of input lines. The output of some +There should be options to change the format of output lines. The output of some ASN.1 types is not well handled (if at all). =cut diff --git a/src/lib/libssl/src/doc/apps/dgst.pod b/src/lib/libssl/src/doc/apps/dgst.pod index 1648742bcf..b0d198724c 100644 --- a/src/lib/libssl/src/doc/apps/dgst.pod +++ b/src/lib/libssl/src/doc/apps/dgst.pod @@ -14,6 +14,7 @@ B B [B<-binary>] [B<-out filename>] [B<-sign filename>] +[B<-passin arg>] [B<-verify filename>] [B<-prverify filename>] [B<-signature filename>] @@ -59,6 +60,11 @@ filename to output to, or standard output by default. digitally sign the digest using the private key in "filename". +=item B<-passin arg> + +the private key password source. For more information about the format of B +see the B section in L. + =item B<-verify filename> verify the signature using the the public key in "filename". diff --git a/src/lib/libssl/src/doc/apps/enc.pod b/src/lib/libssl/src/doc/apps/enc.pod index ddf081617f..18fe7c81c7 100644 --- a/src/lib/libssl/src/doc/apps/enc.pod +++ b/src/lib/libssl/src/doc/apps/enc.pod @@ -86,7 +86,7 @@ versions of OpenSSL. Superseded by the B<-pass> argument. =item B<-kfile filename> read the password to derive the key from the first line of B. -This is for computability with previous versions of OpenSSL. Superseded by +This is for compatibility with previous versions of OpenSSL. Superseded by the B<-pass> argument. =item B<-S salt> diff --git a/src/lib/libssl/src/doc/apps/errstr.pod b/src/lib/libssl/src/doc/apps/errstr.pod new file mode 100644 index 0000000000..b3c6ccfc9c --- /dev/null +++ b/src/lib/libssl/src/doc/apps/errstr.pod @@ -0,0 +1,39 @@ +=pod + +=head1 NAME + +errstr - lookup error codes + +=head1 SYNOPSIS + +B + +=head1 DESCRIPTION + +Sometimes an application will not load error message and only +numerical forms will be available. The B utility can be used to +display the meaning of the hex code. The hex code is the hex digits after the +second colon. + +=head1 EXAMPLE + +The error code: + + 27594:error:2006D080:lib(32):func(109):reason(128):bss_file.c:107: + +can be displayed with: + + openssl errstr 2006D080 + +to produce the error message: + + error:2006D080:BIO routines:BIO_new_file:no such file + +=head1 SEE ALSO + +L, +L, +L + + +=cut diff --git a/src/lib/libssl/src/doc/crypto/ASN1_STRING_print_ex.pod b/src/lib/libssl/src/doc/crypto/ASN1_STRING_print_ex.pod index fbf9a1f141..d662225b87 100644 --- a/src/lib/libssl/src/doc/crypto/ASN1_STRING_print_ex.pod +++ b/src/lib/libssl/src/doc/crypto/ASN1_STRING_print_ex.pod @@ -30,8 +30,8 @@ with '.'. ASN1_STRING_print() is a legacy function which should be avoided in new applications. -Although there are a large number of options frequently B is -suitable, or on UTF8 terminals B. +Although there are a large number of options frequently B is +suitable, or on UTF8 terminals B. The complete set of supported options for B is listed below. @@ -72,7 +72,7 @@ octet. If B is set then any type is dumped. Normally non character string types (such as OCTET STRING) are assumed to be -one byte per character, if B is set then they will +one byte per character, if B is set then they will be dumped instead. When a type is dumped normally just the content octets are printed, if diff --git a/src/lib/libssl/src/doc/crypto/BN_num_bytes.pod b/src/lib/libssl/src/doc/crypto/BN_num_bytes.pod index 61589fb9ac..a6a2e3f819 100644 --- a/src/lib/libssl/src/doc/crypto/BN_num_bytes.pod +++ b/src/lib/libssl/src/doc/crypto/BN_num_bytes.pod @@ -16,8 +16,14 @@ BN_num_bits, BN_num_bytes, BN_num_bits_word - get BIGNUM size =head1 DESCRIPTION -These functions return the size of a B in bytes or bits, -and the size of an unsigned integer in bits. +BN_num_bytes() returns the size of a B in bytes. + +BN_num_bits_word() returns the number of significant bits in a word. +If we take 0x00000432 as an example, it returns 11, not 16, not 32. +Basically, except for a zero, it returns I. + +BN_num_bits() returns the number of significant bits in a B, +following the same principle as BN_num_bits_word(). BN_num_bytes() is a macro. @@ -25,9 +31,23 @@ BN_num_bytes() is a macro. The size. +=head1 NOTES + +Some have tried using BN_num_bits() on individual numbers in RSA keys, +DH keys and DSA keys, and found that they don't always come up with +the number of bits they expected (something like 512, 1024, 2048, +...). This is because generating a number with some specific number +of bits doesn't always set the highest bits, thereby making the number +of I bits a little lower. If you want to know the "key +size" of such a key, either use functions like RSA_size(), DH_size() +and DSA_size(), or use BN_num_bytes() and multiply with 8 (although +there's no real guarantee that will match the "key size", just a lot +more probability). + =head1 SEE ALSO -L +L, L, L, +L =head1 HISTORY diff --git a/src/lib/libssl/src/doc/crypto/ERR_error_string.pod b/src/lib/libssl/src/doc/crypto/ERR_error_string.pod index e01beb817a..cdfa7fe1fe 100644 --- a/src/lib/libssl/src/doc/crypto/ERR_error_string.pod +++ b/src/lib/libssl/src/doc/crypto/ERR_error_string.pod @@ -11,7 +11,7 @@ error message #include char *ERR_error_string(unsigned long e, char *buf); - char *ERR_error_string_n(unsigned long e, char *buf, size_t len); + void ERR_error_string_n(unsigned long e, char *buf, size_t len); const char *ERR_lib_error_string(unsigned long e); const char *ERR_func_error_string(unsigned long e); diff --git a/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod b/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod index daf57e5895..40e525dd56 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_EncryptInit.pod @@ -479,6 +479,7 @@ General encryption, decryption function example using FILE I/O and RC2 with an if(!EVP_CipherUpdate(&ctx, outbuf, &outlen, inbuf, inlen)) { /* Error */ + EVP_CIPHER_CTX_cleanup(&ctx); return 0; } fwrite(outbuf, 1, outlen, out); @@ -486,6 +487,7 @@ General encryption, decryption function example using FILE I/O and RC2 with an if(!EVP_CipherFinal_ex(&ctx, outbuf, &outlen)) { /* Error */ + EVP_CIPHER_CTX_cleanup(&ctx); return 0; } fwrite(outbuf, 1, outlen, out); diff --git a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod index b5e477e294..48a0e29954 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod @@ -8,8 +8,9 @@ EVP_SealInit, EVP_SealUpdate, EVP_SealFinal - EVP envelope encryption #include - int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, - int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk); + int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, + unsigned char **ek, int *ekl, unsigned char *iv, + EVP_PKEY **pubk, int npubk); int EVP_SealUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, unsigned char *in, int inl); int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, diff --git a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod index b203c3a1c5..b6e62ce7f6 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_SignInit.pod @@ -29,11 +29,10 @@ EVP_SignUpdate() hashes B bytes of data at B into the signature context B. This function can be called several times on the same B to include additional data. -EVP_SignFinal() signs the data in B using the private key B -and places the signature in B. If the B parameter is not NULL -then the number of bytes of data written (i.e. the length of the signature) -will be written to the integer at B, at most EVP_PKEY_size(pkey) bytes -will be written. +EVP_SignFinal() signs the data in B using the private key B and +places the signature in B. The number of bytes of data written (i.e. the +length of the signature) will be written to the integer at B, at most +EVP_PKEY_size(pkey) bytes will be written. EVP_SignInit() initializes a signing context B to use the default implementation of digest B. diff --git a/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod b/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod index d53e19d2b7..ab0fe3b2cd 100644 --- a/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod +++ b/src/lib/libssl/src/doc/crypto/RSA_public_encrypt.pod @@ -47,9 +47,10 @@ Encrypting user data directly with RSA is insecure. =back B must be less than RSA_size(B) - 11 for the PKCS #1 v1.5 -based padding modes, and less than RSA_size(B) - 41 for -RSA_PKCS1_OAEP_PADDING. The random number generator must be seeded -prior to calling RSA_public_encrypt(). +based padding modes, less than RSA_size(B) - 41 for +RSA_PKCS1_OAEP_PADDING and exactly RSA_size(B) for RSA_NO_PADDING. +The random number generator must be seeded prior to calling +RSA_public_encrypt(). RSA_private_decrypt() decrypts the B bytes at B using the private key B and stores the plaintext in B. B must point diff --git a/src/lib/libssl/src/doc/crypto/X509_NAME_ENTRY_get_object.pod b/src/lib/libssl/src/doc/crypto/X509_NAME_ENTRY_get_object.pod index d287c18564..11b35f6fd3 100644 --- a/src/lib/libssl/src/doc/crypto/X509_NAME_ENTRY_get_object.pod +++ b/src/lib/libssl/src/doc/crypto/X509_NAME_ENTRY_get_object.pod @@ -13,11 +13,11 @@ ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne); ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne); int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj); -int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, unsigned char *bytes, int len); +int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, const unsigned char *bytes, int len); -X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, char *field, int type, unsigned char *bytes, int len); +X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, const char *field, int type, const unsigned char *bytes, int len); X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type,unsigned char *bytes, int len); -X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, ASN1_OBJECT *obj, int type,unsigned char *bytes, int len); +X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/crypto/X509_NAME_add_entry_by_txt.pod b/src/lib/libssl/src/doc/crypto/X509_NAME_add_entry_by_txt.pod index 4472a1c5cf..e2ab4b0d2b 100644 --- a/src/lib/libssl/src/doc/crypto/X509_NAME_add_entry_by_txt.pod +++ b/src/lib/libssl/src/doc/crypto/X509_NAME_add_entry_by_txt.pod @@ -7,10 +7,14 @@ X509_NAME_add_entry, X509_NAME_delete_entry - X509_NAME modification functions =head1 SYNOPSIS -int X509_NAME_add_entry_by_txt(X509_NAME *name, char *field, int type, unsigned char *bytes, int len, int loc, int set); +int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, const unsigned char *bytes, int len, int loc, int set); + int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, unsigned char *bytes, int len, int loc, int set); + int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, unsigned char *bytes, int len, int loc, int set); + int X509_NAME_add_entry(X509_NAME *name,X509_NAME_ENTRY *ne, int loc, int set); + X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/crypto/X509_NAME_print_ex.pod b/src/lib/libssl/src/doc/crypto/X509_NAME_print_ex.pod index 907c04f684..919b908919 100644 --- a/src/lib/libssl/src/doc/crypto/X509_NAME_print_ex.pod +++ b/src/lib/libssl/src/doc/crypto/X509_NAME_print_ex.pod @@ -41,8 +41,8 @@ applications. Although there are a large number of possible flags for most purposes B, B or B will suffice. As noted on the L manual page -for UTF8 terminals the B should be unset: so for example -B would be used. +for UTF8 terminals the B should be unset: so for example +B would be used. The complete set of the flags supported by X509_NAME_print_ex() is listed below. diff --git a/src/lib/libssl/src/doc/crypto/blowfish.pod b/src/lib/libssl/src/doc/crypto/blowfish.pod index ed71334f56..5b2d274c15 100644 --- a/src/lib/libssl/src/doc/crypto/blowfish.pod +++ b/src/lib/libssl/src/doc/crypto/blowfish.pod @@ -32,7 +32,7 @@ by Counterpane (see http://www.counterpane.com/blowfish.html ). Blowfish is a block cipher that operates on 64 bit (8 byte) blocks of data. It uses a variable size key, but typically, 128 bit (16 byte) keys are -a considered good for strong encryption. Blowfish can be used in the same +considered good for strong encryption. Blowfish can be used in the same modes as DES (see L). Blowfish is currently one of the faster block ciphers. It is quite a bit faster than DES, and much faster than IDEA or RC2. diff --git a/src/lib/libssl/src/doc/crypto/pem.pod b/src/lib/libssl/src/doc/crypto/pem.pod index 8613114452..4f9a27df0c 100644 --- a/src/lib/libssl/src/doc/crypto/pem.pod +++ b/src/lib/libssl/src/doc/crypto/pem.pod @@ -471,6 +471,6 @@ is guaranteed to work. =head1 RETURN CODES The read routines return either a pointer to the structure read or NULL -is an error occurred. +if an error occurred. The write routines return 1 for success or 0 for failure. diff --git a/src/lib/libssl/src/doc/fingerprints.txt b/src/lib/libssl/src/doc/fingerprints.txt new file mode 100644 index 0000000000..c350d381eb --- /dev/null +++ b/src/lib/libssl/src/doc/fingerprints.txt @@ -0,0 +1,28 @@ + Fingerprints + +OpenSSL releases are signed with PGP/GnuPG keys. You can find the +signatures in separate files in the same location you find the +distributions themselves. The normal file name is the same as the +distribution file, with '.asc' added. For example, the signature for +the distribution of OpenSSL 0.9.7f, openssl-0.9.7f.tar.gz, is found in +the file openssl-0.9.7f.tar.gz.asc. + +The following is the list of fingerprints for the keys that are +currently in use (have been used since summer 2004) to sign OpenSSL +distributions: + +pub 1024D/F709453B 2003-10-20 + Key fingerprint = C4CA B749 C34F 7F4C C04F DAC9 A7AF 9E78 F709 453B +uid Richard Levitte +uid Richard Levitte +uid Richard Levitte + +pub 2048R/F295C759 1998-12-13 + Key fingerprint = D0 5D 8C 61 6E 27 E6 60 41 EC B1 B8 D5 7E E5 97 +uid Dr S N Henson + +pub 1024R/49A563D9 1997-02-24 + Key fingerprint = 7B 79 19 FA 71 6B 87 25 0E 77 21 E5 52 D9 83 BF +uid Mark Cox +uid Mark Cox +uid Mark Cox diff --git a/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod b/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod index 4b91c63ba0..f81f692df5 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CIPHER_get_name.pod @@ -8,9 +8,9 @@ SSL_CIPHER_get_name, SSL_CIPHER_get_bits, SSL_CIPHER_get_version, SSL_CIPHER_des #include - const char *SSL_CIPHER_get_name(SSL_CIPHER *cipher); - int SSL_CIPHER_get_bits(SSL_CIPHER *cipher, int *alg_bits); - char *SSL_CIPHER_get_version(SSL_CIPHER *cipher); + const char *SSL_CIPHER_get_name(const SSL_CIPHER *cipher); + int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits); + char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher); char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int size); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_get_ex_new_index.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_get_ex_new_index.pod index 5686faf299..0c40a91f2f 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_get_ex_new_index.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_get_ex_new_index.pod @@ -15,7 +15,7 @@ SSL_CTX_get_ex_new_index, SSL_CTX_set_ex_data, SSL_CTX_get_ex_data - internal ap int SSL_CTX_set_ex_data(SSL_CTX *ctx, int idx, void *arg); - void *SSL_CTX_get_ex_data(SSL_CTX *ctx, int idx); + void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx); typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, long argl, void *argp); diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_get_verify_mode.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_get_verify_mode.pod index 7f10c6e945..2a3747e75c 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_get_verify_mode.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_get_verify_mode.pod @@ -8,12 +8,12 @@ SSL_CTX_get_verify_mode, SSL_get_verify_mode, SSL_CTX_get_verify_depth, SSL_get_ #include - int SSL_CTX_get_verify_mode(SSL_CTX *ctx); - int SSL_get_verify_mode(SSL *ssl); - int SSL_CTX_get_verify_depth(SSL_CTX *ctx); - int SSL_get_verify_depth(SSL *ssl); - int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))(int, X509_STORE_CTX *); - int (*SSL_get_verify_callback(SSL *ssl))(int, X509_STORE_CTX *); + int SSL_CTX_get_verify_mode(const SSL_CTX *ctx); + int SSL_get_verify_mode(const SSL *ssl); + int SSL_CTX_get_verify_depth(const SSL_CTX *ctx); + int SSL_get_verify_depth(const SSL *ssl); + int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int, X509_STORE_CTX *); + int (*SSL_get_verify_callback(const SSL *ssl))(int, X509_STORE_CTX *); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_cert_store.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_cert_store.pod index 3a240c4d37..6acf0d9f9b 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_cert_store.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_cert_store.pod @@ -9,7 +9,7 @@ SSL_CTX_set_cert_store, SSL_CTX_get_cert_store - manipulate X509 certificate ver #include void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store); - X509_STORE *SSL_CTX_get_cert_store(SSL_CTX *ctx); + X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *ctx); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_info_callback.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_info_callback.pod index 63d0b8d33f..0b4affd5eb 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_info_callback.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_info_callback.pod @@ -9,10 +9,10 @@ SSL_CTX_set_info_callback, SSL_CTX_get_info_callback, SSL_set_info_callback, SSL #include void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*callback)()); - void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(); + void (*SSL_CTX_get_info_callback(const SSL_CTX *ctx))(); void SSL_set_info_callback(SSL *ssl, void (*callback)()); - void (*SSL_get_info_callback(SSL *ssl))(); + void (*SSL_get_info_callback(const SSL *ssl))(); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod index 766f0c9200..5ab1b32f93 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod @@ -163,7 +163,7 @@ When choosing a cipher, use the server's preferences instead of the client preferences. When not set, the SSL server will always follow the clients preferences. When set, the SSLv3/TLSv1 server will choose following its own preferences. Because of the different protocol, for SSLv2 the server -will send his list of preferences to the client and the client chooses. +will send its list of preferences to the client and the client chooses. =item SSL_OP_PKCS1_CHECK_1 diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_quiet_shutdown.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_quiet_shutdown.pod index 1d0526d59a..393f8ff0b4 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_quiet_shutdown.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_quiet_shutdown.pod @@ -9,10 +9,10 @@ SSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown, #include void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode); - int SSL_CTX_get_quiet_shutdown(SSL_CTX *ctx); + int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx); void SSL_set_quiet_shutdown(SSL *ssl, int mode); - int SSL_get_quiet_shutdown(SSL *ssl); + int SSL_get_quiet_shutdown(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_session_id_context.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_session_id_context.pod index 5949395159..58fc685506 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_session_id_context.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_session_id_context.pod @@ -46,7 +46,8 @@ B. =head1 WARNINGS -If the session id context is not set on an SSL/TLS server, stored sessions +If the session id context is not set on an SSL/TLS server and client +certificates are used, stored sessions will not be reused but a fatal error will be flagged and the handshake will fail. diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_use_certificate.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_use_certificate.pod index ea2faba3ec..48c888c337 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_use_certificate.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_use_certificate.pod @@ -31,8 +31,8 @@ SSL_CTX_use_certificate, SSL_CTX_use_certificate_ASN1, SSL_CTX_use_certificate_f int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len); int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type); - int SSL_CTX_check_private_key(SSL_CTX *ctx); - int SSL_check_private_key(SSL *ssl); + int SSL_CTX_check_private_key(const SSL_CTX *ctx); + int SSL_check_private_key(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_SESSION_get_ex_new_index.pod b/src/lib/libssl/src/doc/ssl/SSL_SESSION_get_ex_new_index.pod index da0bcf1590..657cda931f 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_SESSION_get_ex_new_index.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_SESSION_get_ex_new_index.pod @@ -15,7 +15,7 @@ SSL_SESSION_get_ex_new_index, SSL_SESSION_set_ex_data, SSL_SESSION_get_ex_data - int SSL_SESSION_set_ex_data(SSL_SESSION *session, int idx, void *arg); - void *SSL_SESSION_get_ex_data(SSL_SESSION *session, int idx); + void *SSL_SESSION_get_ex_data(const SSL_SESSION *session, int idx); typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, long argl, void *argp); diff --git a/src/lib/libssl/src/doc/ssl/SSL_SESSION_get_time.pod b/src/lib/libssl/src/doc/ssl/SSL_SESSION_get_time.pod index ea3c2bcfe6..00883ed2a0 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_SESSION_get_time.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_SESSION_get_time.pod @@ -8,14 +8,14 @@ SSL_SESSION_get_time, SSL_SESSION_set_time, SSL_SESSION_get_timeout, SSL_SESSION #include - long SSL_SESSION_get_time(SSL_SESSION *s); + long SSL_SESSION_get_time(const SSL_SESSION *s); long SSL_SESSION_set_time(SSL_SESSION *s, long tm); - long SSL_SESSION_get_timeout(SSL_SESSION *s); + long SSL_SESSION_get_timeout(const SSL_SESSION *s); long SSL_SESSION_set_timeout(SSL_SESSION *s, long tm); - long SSL_get_time(SSL_SESSION *s); + long SSL_get_time(const SSL_SESSION *s); long SSL_set_time(SSL_SESSION *s, long tm); - long SSL_get_timeout(SSL_SESSION *s); + long SSL_get_timeout(const SSL_SESSION *s); long SSL_set_timeout(SSL_SESSION *s, long tm); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_SSL_CTX.pod b/src/lib/libssl/src/doc/ssl/SSL_get_SSL_CTX.pod index 52d0227b19..659c482c79 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_SSL_CTX.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_SSL_CTX.pod @@ -8,7 +8,7 @@ SSL_get_SSL_CTX - get the SSL_CTX from which an SSL is created #include - SSL_CTX *SSL_get_SSL_CTX(SSL *ssl); + SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_ciphers.pod b/src/lib/libssl/src/doc/ssl/SSL_get_ciphers.pod index 2a57455c23..aecadd9138 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_ciphers.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_ciphers.pod @@ -8,8 +8,8 @@ SSL_get_ciphers, SSL_get_cipher_list - get list of available SSL_CIPHERs #include - STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *ssl); - const char *SSL_get_cipher_list(SSL *ssl, int priority); + STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *ssl); + const char *SSL_get_cipher_list(const SSL *ssl, int priority); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_client_CA_list.pod b/src/lib/libssl/src/doc/ssl/SSL_get_client_CA_list.pod index 5693fdebb2..68181b2407 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_client_CA_list.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_client_CA_list.pod @@ -8,8 +8,8 @@ SSL_get_client_CA_list, SSL_CTX_get_client_CA_list - get list of client CAs #include - STACK_OF(X509_NAME) *SSL_get_client_CA_list(SSL *s); - STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *ctx); + STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s); + STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *ctx); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_current_cipher.pod b/src/lib/libssl/src/doc/ssl/SSL_get_current_cipher.pod index 2dd7261d89..e5ab12491e 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_current_cipher.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_current_cipher.pod @@ -9,7 +9,7 @@ SSL_get_cipher_bits, SSL_get_cipher_version - get SSL_CIPHER of a connection #include - SSL_CIPHER *SSL_get_current_cipher(SSL *ssl); + SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl); #define SSL_get_cipher(s) \ SSL_CIPHER_get_name(SSL_get_current_cipher(s)) #define SSL_get_cipher_name(s) \ diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_default_timeout.pod b/src/lib/libssl/src/doc/ssl/SSL_get_default_timeout.pod index 8d43b31345..a648a9b82d 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_default_timeout.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_default_timeout.pod @@ -8,7 +8,7 @@ SSL_get_default_timeout - get default session timeout value #include - long SSL_get_default_timeout(SSL *ssl); + long SSL_get_default_timeout(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_error.pod b/src/lib/libssl/src/doc/ssl/SSL_get_error.pod index fe28dd942a..48c6b15db7 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_error.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_error.pod @@ -8,7 +8,7 @@ SSL_get_error - obtain result code for TLS/SSL I/O operation #include - int SSL_get_error(SSL *ssl, int ret); + int SSL_get_error(const SSL *ssl, int ret); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_ex_new_index.pod b/src/lib/libssl/src/doc/ssl/SSL_get_ex_new_index.pod index 6644ef8fbc..228d23d8c0 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_ex_new_index.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_ex_new_index.pod @@ -15,7 +15,7 @@ SSL_get_ex_new_index, SSL_set_ex_data, SSL_get_ex_data - internal application sp int SSL_set_ex_data(SSL *ssl, int idx, void *arg); - void *SSL_get_ex_data(SSL *ssl, int idx); + void *SSL_get_ex_data(const SSL *ssl, int idx); typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, long argl, void *argp); diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_fd.pod b/src/lib/libssl/src/doc/ssl/SSL_get_fd.pod index a3f7625931..89260b522c 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_fd.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_fd.pod @@ -8,9 +8,9 @@ SSL_get_fd - get file descriptor linked to an SSL object #include - int SSL_get_fd(SSL *ssl); - int SSL_get_rfd(SSL *ssl); - int SSL_get_wfd(SSL *ssl); + int SSL_get_fd(const SSL *ssl); + int SSL_get_rfd(const SSL *ssl); + int SSL_get_wfd(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_peer_cert_chain.pod b/src/lib/libssl/src/doc/ssl/SSL_get_peer_cert_chain.pod index 390ce0b41b..49fb88f86f 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_peer_cert_chain.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_peer_cert_chain.pod @@ -8,7 +8,7 @@ SSL_get_peer_cert_chain - get the X509 certificate chain of the peer #include - STACKOF(X509) *SSL_get_peer_cert_chain(SSL *ssl); + STACKOF(X509) *SSL_get_peer_cert_chain(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_peer_certificate.pod b/src/lib/libssl/src/doc/ssl/SSL_get_peer_certificate.pod index 60635a9660..ef7c8be180 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_peer_certificate.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_peer_certificate.pod @@ -8,7 +8,7 @@ SSL_get_peer_certificate - get the X509 certificate of the peer #include - X509 *SSL_get_peer_certificate(SSL *ssl); + X509 *SSL_get_peer_certificate(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_session.pod b/src/lib/libssl/src/doc/ssl/SSL_get_session.pod index dd9aba40b6..0c41caa922 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_session.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_session.pod @@ -8,8 +8,8 @@ SSL_get_session - retrieve TLS/SSL session data #include - SSL_SESSION *SSL_get_session(SSL *ssl); - SSL_SESSION *SSL_get0_session(SSL *ssl); + SSL_SESSION *SSL_get_session(const SSL *ssl); + SSL_SESSION *SSL_get0_session(const SSL *ssl); SSL_SESSION *SSL_get1_session(SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_verify_result.pod b/src/lib/libssl/src/doc/ssl/SSL_get_verify_result.pod index e6bac9c35a..55b56a53f9 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_verify_result.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_verify_result.pod @@ -8,7 +8,7 @@ SSL_get_verify_result - get result of peer certificate verification #include - long SSL_get_verify_result(SSL *ssl); + long SSL_get_verify_result(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_get_version.pod b/src/lib/libssl/src/doc/ssl/SSL_get_version.pod index 24d5291256..cc271db2c5 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_get_version.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_get_version.pod @@ -8,7 +8,7 @@ SSL_get_version - get the protocol version of a connection. #include - const char *SSL_get_version(SSL *ssl); + const char *SSL_get_version(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_pending.pod b/src/lib/libssl/src/doc/ssl/SSL_pending.pod index b4c48598b2..43f2874e8b 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_pending.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_pending.pod @@ -8,7 +8,7 @@ SSL_pending - obtain number of readable bytes buffered in an SSL object #include - int SSL_pending(SSL *ssl); + int SSL_pending(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_set_shutdown.pod b/src/lib/libssl/src/doc/ssl/SSL_set_shutdown.pod index 6289e635d9..011a022a12 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_set_shutdown.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_set_shutdown.pod @@ -10,7 +10,7 @@ SSL_set_shutdown, SSL_get_shutdown - manipulate shutdown state of an SSL connect void SSL_set_shutdown(SSL *ssl, int mode); - int SSL_get_shutdown(SSL *ssl); + int SSL_get_shutdown(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod b/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod index 6b5012be7a..89911acbca 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod @@ -38,7 +38,7 @@ behaviour. =over 4 =item When the application is the first party to send the "close notify" -alert, SSL_shutdown() will only send the alert and the set the +alert, SSL_shutdown() will only send the alert and then set the SSL_SENT_SHUTDOWN flag (so that the session is considered good and will be kept in cache). SSL_shutdown() will then return with 0. If a unidirectional shutdown is enough (the underlying connection shall be closed anyway), this diff --git a/src/lib/libssl/src/doc/ssl/SSL_state_string.pod b/src/lib/libssl/src/doc/ssl/SSL_state_string.pod index b4be1aaa48..fe25d47c71 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_state_string.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_state_string.pod @@ -8,8 +8,8 @@ SSL_state_string, SSL_state_string_long - get textual description of state of an #include - const char *SSL_state_string(SSL *ssl); - const char *SSL_state_string_long(SSL *ssl); + const char *SSL_state_string(const SSL *ssl); + const char *SSL_state_string_long(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/SSL_want.pod b/src/lib/libssl/src/doc/ssl/SSL_want.pod index 50cc89db80..c0059c0d4a 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_want.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_want.pod @@ -8,11 +8,11 @@ SSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write, SSL_want_x509_lookup #include - int SSL_want(SSL *ssl); - int SSL_want_nothing(SSL *ssl); - int SSL_want_read(SSL *ssl); - int SSL_want_write(SSL *ssl); - int SSL_want_x509_lookup(SSL *ssl); + int SSL_want(const SSL *ssl); + int SSL_want_nothing(const SSL *ssl); + int SSL_want_read(const SSL *ssl); + int SSL_want_write(const SSL *ssl); + int SSL_want_x509_lookup(const SSL *ssl); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/d2i_SSL_SESSION.pod b/src/lib/libssl/src/doc/ssl/d2i_SSL_SESSION.pod index 0321a5a36f..81d276477f 100644 --- a/src/lib/libssl/src/doc/ssl/d2i_SSL_SESSION.pod +++ b/src/lib/libssl/src/doc/ssl/d2i_SSL_SESSION.pod @@ -8,7 +8,7 @@ d2i_SSL_SESSION, i2d_SSL_SESSION - convert SSL_SESSION object from/to ASN1 repre #include - SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, long length); + SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length); int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp); =head1 DESCRIPTION diff --git a/src/lib/libssl/src/doc/ssl/ssl.pod b/src/lib/libssl/src/doc/ssl/ssl.pod index 3dc5358ef6..266697d221 100644 --- a/src/lib/libssl/src/doc/ssl/ssl.pod +++ b/src/lib/libssl/src/doc/ssl/ssl.pod @@ -213,7 +213,7 @@ protocol context defined in the B structure. =item int B(SSL_CTX *ctx, SSL_SESSION *c); -=item int B(SSL_CTX *ctx); +=item int B(const SSL_CTX *ctx); =item long B(SSL_CTX *ctx, int cmd, long larg, char *parg); @@ -225,23 +225,23 @@ protocol context defined in the B structure. =item X509_STORE *B(SSL_CTX *ctx); -=item STACK *B(SSL_CTX *ctx); +=item STACK *B(const SSL_CTX *ctx); =item int (*B(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey); -=item char *B(SSL_CTX *s, int idx); +=item char *B(const SSL_CTX *s, int idx); =item int B(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) =item void (*B(SSL_CTX *ctx))(SSL *ssl, int cb, int ret); -=item int B(SSL_CTX *ctx); +=item int B(const SSL_CTX *ctx); =item int B(SSL_CTX *ctx); -=item long B(SSL_CTX *ctx); +=item long B(const SSL_CTX *ctx); -=item int (*B(SSL_CTX *ctx))(int ok, X509_STORE_CTX *ctx); +=item int (*B(const SSL_CTX *ctx))(int ok, X509_STORE_CTX *ctx); =item int B(SSL_CTX *ctx); @@ -383,27 +383,27 @@ sessions defined in the B structures. =over 4 -=item int B(SSL_SESSION *a, SSL_SESSION *b); +=item int B(const SSL_SESSION *a, const SSL_SESSION *b); =item void B(SSL_SESSION *ss); =item char *B(SSL_SESSION *s); -=item char *B(SSL_SESSION *s, int idx); +=item char *B(const SSL_SESSION *s, int idx); =item int B(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) -=item long B(SSL_SESSION *s); +=item long B(const SSL_SESSION *s); -=item long B(SSL_SESSION *s); +=item long B(const SSL_SESSION *s); -=item unsigned long B(SSL_SESSION *a); +=item unsigned long B(const SSL_SESSION *a); =item SSL_SESSION *B(void); -=item int B(BIO *bp, SSL_SESSION *x); +=item int B(BIO *bp, const SSL_SESSION *x); -=item int B(FILE *fp, SSL_SESSION *x); +=item int B(FILE *fp, const SSL_SESSION *x); =item void B(SSL_SESSION *s, char *a); @@ -438,7 +438,7 @@ connection defined in the B structure. =item char *B(int value); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); =item void B(SSL *ssl); @@ -446,7 +446,7 @@ connection defined in the B structure. =item int B(SSL *ssl); -=item void B(SSL *t, SSL *f); +=item void B(SSL *t, const SSL *f); =item long B(SSL *ssl, int cmd, long larg, char *parg); @@ -458,77 +458,77 @@ connection defined in the B structure. =item void B(SSL *ssl); -=item SSL_CTX *B(SSL *ssl); +=item SSL_CTX *B(const SSL *ssl); =item char *B(SSL *ssl); -=item X509 *B(SSL *ssl); +=item X509 *B(const SSL *ssl); -=item const char *B(SSL *ssl); +=item const char *B(const SSL *ssl); -=item int B(SSL *ssl, int *alg_bits); +=item int B(const SSL *ssl, int *alg_bits); -=item char *B(SSL *ssl, int n); +=item char *B(const SSL *ssl, int n); -=item char *B(SSL *ssl); +=item char *B(const SSL *ssl); -=item char *B(SSL *ssl); +=item char *B(const SSL *ssl); -=item STACK *B(SSL *ssl); +=item STACK *B(const SSL *ssl); -=item STACK *B(SSL *ssl); +=item STACK *B(const SSL *ssl); =item SSL_CIPHER *B(SSL *ssl); -=item long B(SSL *ssl); +=item long B(const SSL *ssl); -=item int B(SSL *ssl, int i); +=item int B(const SSL *ssl, int i); -=item char *B(SSL *ssl, int idx); +=item char *B(const SSL *ssl, int idx); =item int B(void); =item int B(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item void (*B(SSL *ssl);)(void) +=item void (*B(const SSL *ssl);)() -=item STACK *B(SSL *ssl); +=item STACK *B(const SSL *ssl); -=item X509 *B(SSL *ssl); +=item X509 *B(const SSL *ssl); =item EVP_PKEY *B(SSL *ssl); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item BIO *B(SSL *ssl); +=item BIO *B(const SSL *ssl); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item SSL_SESSION *B(SSL *ssl); +=item SSL_SESSION *B(const SSL *ssl); -=item char *B(SSL *ssl, char *buf, int len); +=item char *B(const SSL *ssl, char *buf, int len); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); =item SSL_METHOD *B(SSL *ssl); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item long B(SSL *ssl); +=item long B(const SSL *ssl); -=item long B(SSL *ssl); +=item long B(const SSL *ssl); -=item int (*B(SSL *ssl);)(void) +=item int (*B(const SSL *ssl))(int,X509_STORE_CTX *) -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item long B(SSL *ssl); +=item long B(const SSL *ssl); -=item char *B(SSL *ssl); +=item char *B(const SSL *ssl); -=item BIO *B(SSL *ssl); +=item BIO *B(const SSL *ssl); =item int B(SSL *ssl); @@ -550,7 +550,7 @@ connection defined in the B structure. =item int B(SSL *ssl, void *buf, int num); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); =item int B(SSL *ssl, void *buf, int num); @@ -610,11 +610,11 @@ connection defined in the B structure. =item int B(SSL *ssl); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item char *B(SSL *ssl); +=item char *B(const SSL *ssl); -=item char *B(SSL *ssl); +=item char *B(const SSL *ssl); =item long B(SSL *ssl); @@ -636,17 +636,17 @@ connection defined in the B structure. =item int B(SSL *ssl, char *file, int type); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item int B(SSL *ssl); +=item int B(const SSL *ssl); -=item int B(s); +=item int B(const SSL *ssl); =item int B(SSL *ssl, const void *buf, int num); diff --git a/src/lib/libssl/src/doc/standards.txt b/src/lib/libssl/src/doc/standards.txt index edbe2f3a57..f6675b574b 100644 --- a/src/lib/libssl/src/doc/standards.txt +++ b/src/lib/libssl/src/doc/standards.txt @@ -88,6 +88,10 @@ PKCS#12: Personal Information Exchange Syntax Standard, version 1.0. (Format: TXT=143173 bytes) (Obsoletes RFC2437) (Status: INFORMATIONAL) +3820 Internet X.509 Public Key Infrastructure (PKI) Proxy Certificate + Profile. S. Tuecke, V. Welch, D. Engert, L. Pearlman, M. Thompson. + June 2004. (Format: TXT=86374 bytes) (Status: PROPOSED STANDARD) + Related: -------- diff --git a/src/lib/libssl/src/e_os.h b/src/lib/libssl/src/e_os.h index 096eabe09a..5a328b7fa8 100644 --- a/src/lib/libssl/src/e_os.h +++ b/src/lib/libssl/src/e_os.h @@ -510,11 +510,31 @@ extern char *sys_errlist[]; extern int sys_nerr; #define IRIX_CC_BUG /* CDS++ up to V2.0Bsomething suffered from the same bug.*/ #endif +#if defined(OPENSSL_SYS_WINDOWS) +# define strcasecmp _stricmp +# define strncasecmp _strnicmp +#elif defined(OPENSSL_SYS_VMS) +/* VMS below version 7.0 doesn't have strcasecmp() */ +# include "o_str.h" +# define strcasecmp OPENSSL_strcasecmp +# define strncasecmp OPENSSL_strncasecmp +# define OPENSSL_IMPLEMENTS_strncasecmp +#elif defined(OPENSSL_SYS_OS2) && defined(__EMX__) +# define strcasecmp stricmp +# define strncasecmp strnicmp +#else +# ifdef NO_STRINGS_H + int strcasecmp(); + int strncasecmp(); +# else +# include +# endif /* NO_STRINGS_H */ +#endif + #if defined(OPENSSL_SYS_OS2) && defined(__EMX__) # include # include # define NO_SYSLOG -# define strcasecmp stricmp #endif /* vxworks */ diff --git a/src/lib/libssl/src/e_os2.h b/src/lib/libssl/src/e_os2.h index 81be3025f6..4ca79a4d65 100644 --- a/src/lib/libssl/src/e_os2.h +++ b/src/lib/libssl/src/e_os2.h @@ -189,6 +189,11 @@ extern "C" { # endif #endif +/* --------------------------------- VOS ----------------------------------- */ +#ifdef OPENSSL_SYSNAME_VOS +# define OPENSSL_SYS_VOS +#endif + /* ------------------------------- VxWorks --------------------------------- */ #ifdef OPENSSL_SYSNAME_VXWORKS # define OPENSSL_SYS_VXWORKS @@ -243,7 +248,7 @@ extern "C" { #define OPENSSL_EXTERN OPENSSL_IMPORT /* Macros to allow global variables to be reached through function calls when - required (if a shared library version requvres it, for example. + required (if a shared library version requires it, for example. The way it's done allows definitions like this: // in foobar.c @@ -253,9 +258,10 @@ extern "C" { #define foobar OPENSSL_GLOBAL_REF(foobar) */ #ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION -# define OPENSSL_IMPLEMENT_GLOBAL(type,name) static type _hide_##name; \ - type *_shadow_##name(void) { return &_hide_##name; } \ - static type _hide_##name +# define OPENSSL_IMPLEMENT_GLOBAL(type,name) \ + extern type _hide_##name; \ + type *_shadow_##name(void) { return &_hide_##name; } \ + static type _hide_##name # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) #else diff --git a/src/lib/libssl/src/fips/Makefile b/src/lib/libssl/src/fips/Makefile new file mode 100644 index 0000000000..63e4cf82be --- /dev/null +++ b/src/lib/libssl/src/fips/Makefile @@ -0,0 +1,199 @@ +# +# SSLeay/fips/Makefile +# + +DIR= fips +TOP= .. +CC= cc +INCLUDE= -I. -I$(TOP) -I../include +INCLUDES= -I.. -I../.. -I../../include +CFLAG= -g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP= /usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +RM= rm -f +AR= ar r + +PEX_LIBS= +EX_LIBS= + +CFLAGS= $(INCLUDE) $(CFLAG) + + +LIBS= + +FDIRS=sha1 rand des aes dsa rsa dh + +GENERAL=Makefile README fips-lib.com install.com + +LIB= $(TOP)/libcrypto.a +SHARED_LIB= libcrypto$(SHLIB_EXT) +LIBSRC=fips.c fips_err_wrapper.c +LIBOBJ=fips.o fips_err_wrapper.o + +SRC= $(LIBSRC) + +EXHEADER=fips.h +HEADER=$(EXHEADER) fips_err.h +EXE=openssl_fips_fingerprint + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + @(cd ..; $(MAKE) DIRS=$(DIR) all) + +all: + @if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + $(MAKE) -e subdirs check lib shared; \ + fi + +check: + TOP=`pwd`/$(TOP) ./fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) + +subdirs: + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making all in fips/$$i..." && \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ + done; + +sub_target: + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making $(TARGET) in fips/$$i..." && \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' $(TARGET) ) || exit 1; \ + done; + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making 'files' in fips/$$i..." && \ + $(MAKE) PERL='${PERL}' files ); \ + done; + +links: + @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) + @for i in $(FDIRS); do \ + (cd $$i && echo "making links in fips/$$i..." && \ + $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_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}' PERL='${PERL}' links ); \ + done; + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +shared: + if [ -n "$(SHARED_LIBS)" ]; then \ + (cd ..; $(MAKE) $(SHARED_LIB)); \ + fi + +libs: + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making libs in fips/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \ + done; + +tests: + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making tests in fips/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \ + done; + +top_fips_test_suite: + (cd $(TOP); $(MAKE) DIRS=fips FDIRS=. TARGET=fips_test_suite sub_target) + +fips_test_suite: fips_test_suite.o $(TOP)/libcrypto.a + $(CC) $(CFLAGS) -o fips_test_suite fips_test_suite.o $(PEX_LIBS) $(TOP)/libcrypto.a $(EX_LIBS) + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a fips_test_suite || { rm fips_test_suite; false; } + +fips_test: top top_fips_test_suite + cd testvectors && perl -p -i -e 's/COUNT=/COUNT = /' des[23]/req/*.req + @for i in dsa sha1 aes des ; \ + do \ + (cd $$i && echo "making fips_test in fips/$$i..." && $(MAKE) fips_test) \ + done; + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ;\ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making install in fips/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \ + done; + @for i in $(EXE) ; \ + do \ + echo "installing $$i"; \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ + chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \ + done + +lint: + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making lint in fips/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \ + done; + +depend: + if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(SRC) + if [ ! -s buildinf.h ]; then rm buildinf.h; fi + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making depend in fips/$$i..." && \ + $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \ + done; + +clean: + rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making clean in fips/$$i..." && \ + $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \ + done; + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + @for i in $(FDIRS) ;\ + do \ + (cd $$i && echo "making dclean in fips/$$i..." && \ + $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \ + done; + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +fips.o: ../include/openssl/aes.h ../include/openssl/asn1.h +fips.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +fips.o: ../include/openssl/bn.h ../include/openssl/cast.h +fips.o: ../include/openssl/crypto.h ../include/openssl/des.h +fips.o: ../include/openssl/des_old.h ../include/openssl/dh.h +fips.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +fips.o: ../include/openssl/err.h ../include/openssl/evp.h +fips.o: ../include/openssl/fips.h ../include/openssl/fips_rand.h +fips.o: ../include/openssl/hmac.h ../include/openssl/idea.h +fips.o: ../include/openssl/lhash.h ../include/openssl/md2.h +fips.o: ../include/openssl/md4.h ../include/openssl/md5.h +fips.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +fips.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +fips.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +fips.o: ../include/openssl/rand.h ../include/openssl/rc2.h +fips.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +fips.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +fips.o: ../include/openssl/safestack.h ../include/openssl/sha.h +fips.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +fips.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h fips.c +fips.o: fips_locl.h +fips_err_wrapper.o: ../include/openssl/opensslconf.h fips_err_wrapper.c diff --git a/src/lib/libssl/src/fips/aes/Makefile b/src/lib/libssl/src/fips/aes/Makefile new file mode 100644 index 0000000000..fce5eeb5f7 --- /dev/null +++ b/src/lib/libssl/src/fips/aes/Makefile @@ -0,0 +1,131 @@ +# +# SSLeay/fips/aes/Makefile +# + +DIR= aes +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=fips_aesavs.c +TESTDATA=fips_aes_data +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=fips_aes_core.c fips_aes_selftest.c +LIBOBJ=fips_aes_core.o fips_aes_selftest.o + +SRC= $(LIBSRC) + +EXHEADER= +HEADER= $(EXHEADER) fips_aes_locl.h + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) sub_all) + +all: check lib + +check: + TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @sleep 2; touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TESTDATA) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done + +tags: + ctags $(SRC) + +tests: + +top_fips_aesavs: + (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) TARGET=fips_aesavs sub_target) + +fips_aesavs: fips_aesavs.o $(TOP)/libcrypto.a + $(CC) $(CFLAGS) -o fips_aesavs fips_aesavs.o $(PEX_LIBS) $(TOP)/libcrypto.a $(EX_LIBS) + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a fips_aesavs + +fips_test: top top_fips_aesavs + find ../testvectors/aes/req -name '*.req' > testlist + -rm -rf ../testvectors/aes/rsp + mkdir ../testvectors/aes/rsp + ./fips_aesavs -d testlist + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) \ + $(SRC) $(TEST) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff +# DO NOT DELETE THIS LINE -- make depend depends on it. + +fips_aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h +fips_aes_core.o: ../../include/openssl/fips.h +fips_aes_core.o: ../../include/openssl/opensslconf.h fips_aes_core.c +fips_aes_core.o: fips_aes_locl.h +fips_aes_selftest.o: ../../include/openssl/aes.h ../../include/openssl/bio.h +fips_aes_selftest.o: ../../include/openssl/crypto.h +fips_aes_selftest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +fips_aes_selftest.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +fips_aes_selftest.o: ../../include/openssl/opensslconf.h +fips_aes_selftest.o: ../../include/openssl/opensslv.h +fips_aes_selftest.o: ../../include/openssl/safestack.h +fips_aes_selftest.o: ../../include/openssl/stack.h +fips_aes_selftest.o: ../../include/openssl/symhacks.h fips_aes_selftest.c +fips_aesavs.o: ../../e_os.h ../../include/openssl/aes.h +fips_aesavs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +fips_aesavs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +fips_aesavs.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +fips_aesavs.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +fips_aesavs.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +fips_aesavs.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +fips_aesavs.o: ../../include/openssl/evp.h ../../include/openssl/fips.h +fips_aesavs.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +fips_aesavs.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +fips_aesavs.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +fips_aesavs.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +fips_aesavs.o: ../../include/openssl/opensslconf.h +fips_aesavs.o: ../../include/openssl/opensslv.h +fips_aesavs.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +fips_aesavs.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +fips_aesavs.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +fips_aesavs.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +fips_aesavs.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fips_aesavs.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +fips_aesavs.o: fips_aesavs.c diff --git a/src/lib/libssl/src/fips/aes/fips_aes_selftest.c b/src/lib/libssl/src/fips/aes/fips_aes_selftest.c new file mode 100644 index 0000000000..0e53d21bd0 --- /dev/null +++ b/src/lib/libssl/src/fips/aes/fips_aes_selftest.c @@ -0,0 +1,112 @@ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#ifdef OPENSSL_FIPS +static struct + { + unsigned char key[16]; + unsigned char plaintext[16]; + unsigned char ciphertext[16]; + } tests[]= + { + { + { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, + 0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F }, + { 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77, + 0x88,0x99,0xAA,0xBB,0xCC,0xDD,0xEE,0xFF }, + { 0x69,0xC4,0xE0,0xD8,0x6A,0x7B,0x04,0x30, + 0xD8,0xCD,0xB7,0x80,0x70,0xB4,0xC5,0x5A }, + }, + }; + +void FIPS_corrupt_aes() + { + tests[0].key[0]++; + } + +int FIPS_selftest_aes() + { + int n; + + /* Encrypt and check against known ciphertext */ + for(n=0 ; n < 1 ; ++n) + { + AES_KEY key; + unsigned char buf[16]; + + AES_set_encrypt_key(tests[n].key,128,&key); + AES_encrypt(tests[n].plaintext,buf,&key); + if(memcmp(buf,tests[n].ciphertext,sizeof buf)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_AES,FIPS_R_SELFTEST_FAILED); + return 0; + } + } + /* Decrypt and check against known plaintext */ + for(n=0 ; n < 1 ; ++n) + { + AES_KEY key; + unsigned char buf[16]; + + AES_set_decrypt_key(tests[n].key,128,&key); + AES_decrypt(tests[n].ciphertext,buf,&key); + if(memcmp(buf,tests[n].plaintext,sizeof buf)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_AES,FIPS_R_SELFTEST_FAILED); + return 0; + } + } + return 1; + } +#endif diff --git a/src/lib/libssl/src/fips/aes/fips_aesavs.c b/src/lib/libssl/src/fips/aes/fips_aesavs.c new file mode 100644 index 0000000000..5fc2879067 --- /dev/null +++ b/src/lib/libssl/src/fips/aes/fips_aesavs.c @@ -0,0 +1,1005 @@ +/* ==================================================================== + * Copyright (c) 2004 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +/*--------------------------------------------- + NIST AES Algorithm Validation Suite + Test Program + + Donated to OpenSSL by: + V-ONE Corporation + 20250 Century Blvd, Suite 300 + Germantown, MD 20874 + U.S.A. + ----------------------------------------------*/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "e_os.h" + +#define AES_BLOCK_SIZE 16 + +#define VERBOSE 1 + +/*-----------------------------------------------*/ + +int AESTest(EVP_CIPHER_CTX *ctx, + char *amode, int akeysz, unsigned char *aKey, + unsigned char *iVec, + int dir, /* 0 = decrypt, 1 = encrypt */ + unsigned char *plaintext, unsigned char *ciphertext, int len) + { + const EVP_CIPHER *cipher = NULL; + int ret = 1; + int kt = 0; + + if (ctx) + memset(ctx, 0, sizeof(EVP_CIPHER_CTX)); + + if (strcasecmp(amode, "CBC") == 0) + kt = 1000; + else if (strcasecmp(amode, "ECB") == 0) + kt = 2000; + else if (strcasecmp(amode, "CFB128") == 0) + kt = 3000; + else if (strncasecmp(amode, "OFB", 3) == 0) + kt = 4000; + else if(!strcasecmp(amode,"CFB1")) + kt=5000; + else if(!strcasecmp(amode,"CFB8")) + kt=6000; + else + { + printf("Unknown mode: %s\n", amode); + EXIT(1); + } + if (ret) + { + if ((akeysz != 128) && (akeysz != 192) && (akeysz != 256)) + { + printf("Invalid key size: %d\n", akeysz); + ret = 0; + } + else + { + kt += akeysz; + switch (kt) + { + case 1128: /* CBC 128 */ + cipher = EVP_aes_128_cbc(); + break; + case 1192: /* CBC 192 */ + cipher = EVP_aes_192_cbc(); + break; + case 1256: /* CBC 256 */ + cipher = EVP_aes_256_cbc(); + break; + case 2128: /* ECB 128 */ + cipher = EVP_aes_128_ecb(); + break; + case 2192: /* ECB 192 */ + cipher = EVP_aes_192_ecb(); + break; + case 2256: /* ECB 256 */ + cipher = EVP_aes_256_ecb(); + break; + case 3128: /* CFB 128 */ + cipher = EVP_aes_128_cfb(); + break; + case 3192: /* CFB 192 */ + cipher = EVP_aes_192_cfb(); + break; + case 3256: /* CFB 256 */ + cipher = EVP_aes_256_cfb(); + break; + case 4128: /* OFB 128 */ + cipher = EVP_aes_128_ofb(); + break; + case 4192: /* OFB 192 */ + cipher = EVP_aes_192_ofb(); + break; + case 4256: /* OFB 256 */ + cipher = EVP_aes_256_ofb(); + break; + case 5128: + cipher=EVP_aes_128_cfb1(); + break; + case 5192: + cipher=EVP_aes_192_cfb1(); + break; + case 5256: + cipher=EVP_aes_256_cfb1(); + break; + case 6128: + cipher=EVP_aes_128_cfb8(); + break; + case 6192: + cipher=EVP_aes_192_cfb8(); + break; + case 6256: + cipher=EVP_aes_256_cfb8(); + break; + default: + printf("Didn't handle mode %d\n",kt); + EXIT(1); + } + if (dir) + { /* encrypt */ + if(!EVP_CipherInit(ctx, cipher, aKey, iVec, AES_ENCRYPT)) + { + ERR_print_errors_fp(stderr); + EXIT(1); + } + + EVP_Cipher(ctx, ciphertext, (unsigned char*)plaintext, len); + } + else + { /* decrypt */ + if(!EVP_CipherInit(ctx, cipher, aKey, iVec, AES_DECRYPT)) + { + ERR_print_errors_fp(stderr); + EXIT(1); + } + EVP_Cipher(ctx, (unsigned char*)plaintext, ciphertext, len); + } + } + } + return ret; + } + +/*-----------------------------------------------*/ + +int hex2bin(char *in, int len, unsigned char *out) +{ + int n1, n2; + unsigned char ch; + + for (n1 = 0, n2 = 0; n1 < len; ) + { /* first byte */ + if ((in[n1] >= '0') && (in[n1] <= '9')) + ch = in[n1++] - '0'; + else if ((in[n1] >= 'A') && (in[n1] <= 'F')) + ch = in[n1++] - 'A' + 10; + else if ((in[n1] >= 'a') && (in[n1] <= 'f')) + ch = in[n1++] - 'a' + 10; + else + return -1; + if(len == 1) + { + out[n2++]=ch; + break; + } + out[n2] = ch << 4; + /* second byte */ + if ((in[n1] >= '0') && (in[n1] <= '9')) + ch = in[n1++] - '0'; + else if ((in[n1] >= 'A') && (in[n1] <= 'F')) + ch = in[n1++] - 'A' + 10; + else if ((in[n1] >= 'a') && (in[n1] <= 'f')) + ch = in[n1++] - 'a' + 10; + else + return -1; + out[n2++] |= ch; + } + return n2; +} + +/*-----------------------------------------------*/ + +int bin2hex(unsigned char *in, int len, char *out) +{ + int n1, n2; + unsigned char ch; + + for (n1 = 0, n2 = 0; n1 < len; ++n1) + { + /* first nibble */ + ch = in[n1] >> 4; + if (ch <= 0x09) + out[n2++] = ch + '0'; + else + out[n2++] = ch - 10 + 'a'; + /* second nibble */ + ch = in[n1] & 0x0f; + if (ch <= 0x09) + out[n2++] = ch + '0'; + else + out[n2++] = ch - 10 + 'a'; + } + return n2; +} + +/* NB: this return the number of _bits_ read */ +int bint2bin(const char *in, int len, unsigned char *out) + { + int n; + + memset(out,0,len); + for(n=0 ; n < len ; ++n) + if(in[n] == '1') + out[n/8]|=(0x80 >> (n%8)); + return len; + } + +int bin2bint(const unsigned char *in,int len,char *out) + { + int n; + + for(n=0 ; n < len ; ++n) + out[n]=(in[n/8]&(0x80 >> (n%8))) ? '1' : '0'; + return n; + } + +/*-----------------------------------------------*/ + +void PrintValue(char *tag, unsigned char *val, int len) +{ +#if VERBOSE + char obuf[2048]; + int olen; + olen = bin2hex(val, len, obuf); + printf("%s = %.*s\n", tag, olen, obuf); +#endif +} + +void OutputValue(char *tag, unsigned char *val, int len, FILE *rfp,int bitmode) + { + char obuf[2048]; + int olen; + + if(bitmode) + olen=bin2bint(val,len,obuf); + else + olen=bin2hex(val,len,obuf); + + fprintf(rfp, "%s = %.*s\n", tag, olen, obuf); +#if VERBOSE + printf("%s = %.*s\n", tag, olen, obuf); +#endif + } + +/*-----------------------------------------------*/ +char *t_tag[2] = {"PLAINTEXT", "CIPHERTEXT"}; +char *t_mode[6] = {"CBC","ECB","OFB","CFB1","CFB8","CFB128"}; +enum Mode {CBC, ECB, OFB, CFB1, CFB8, CFB128}; +enum XCrypt {XDECRYPT, XENCRYPT}; + +/*=============================*/ +/* Monte Carlo Tests */ +/*-----------------------------*/ + +/*#define gb(a,b) (((a)[(b)/8] >> ((b)%8))&1)*/ +/*#define sb(a,b,v) ((a)[(b)/8]=((a)[(b)/8]&~(1 << ((b)%8)))|(!!(v) << ((b)%8)))*/ + +#define gb(a,b) (((a)[(b)/8] >> (7-(b)%8))&1) +#define sb(a,b,v) ((a)[(b)/8]=((a)[(b)/8]&~(1 << (7-(b)%8)))|(!!(v) << (7-(b)%8))) + +int do_mct(char *amode, + int akeysz, unsigned char *aKey,unsigned char *iVec, + int dir, unsigned char *text, int len, + FILE *rfp) + { + int ret = 0; + unsigned char key[101][32]; + unsigned char iv[101][AES_BLOCK_SIZE]; + unsigned char ptext[1001][32]; + unsigned char ctext[1001][32]; + unsigned char ciphertext[64+4]; + int i, j, n, n1, n2; + int imode = 0, nkeysz = akeysz/8; + EVP_CIPHER_CTX ctx; + + if (len > 32) + { + printf("\n>>>> Length exceeds 32 for %s %d <<<<\n\n", + amode, akeysz); + return -1; + } + for (imode = 0; imode < 6; ++imode) + if (strcmp(amode, t_mode[imode]) == 0) + break; + if (imode == 6) + { + printf("Unrecognized mode: %s\n", amode); + return -1; + } + + memcpy(key[0], aKey, nkeysz); + if (iVec) + memcpy(iv[0], iVec, AES_BLOCK_SIZE); + if (dir == XENCRYPT) + memcpy(ptext[0], text, len); + else + memcpy(ctext[0], text, len); + for (i = 0; i < 100; ++i) + { + /* printf("Iteration %d\n", i); */ + if (i > 0) + { + fprintf(rfp,"COUNT = %d\n",i); + OutputValue("KEY",key[i],nkeysz,rfp,0); + if (imode != ECB) /* ECB */ + OutputValue("IV",iv[i],AES_BLOCK_SIZE,rfp,0); + /* Output Ciphertext | Plaintext */ + OutputValue(t_tag[dir^1],dir ? ptext[0] : ctext[0],len,rfp, + imode == CFB1); + } + for (j = 0; j < 1000; ++j) + { + switch (imode) + { + case ECB: + if (j == 0) + { /* set up encryption */ + ret = AESTest(&ctx, amode, akeysz, key[i], NULL, + dir, /* 0 = decrypt, 1 = encrypt */ + ptext[j], ctext[j], len); + if (dir == XENCRYPT) + memcpy(ptext[j+1], ctext[j], len); + else + memcpy(ctext[j+1], ptext[j], len); + } + else + { + if (dir == XENCRYPT) + { + EVP_Cipher(&ctx, ctext[j], ptext[j], len); + memcpy(ptext[j+1], ctext[j], len); + } + else + { + EVP_Cipher(&ctx, ptext[j], ctext[j], len); + memcpy(ctext[j+1], ptext[j], len); + } + } + break; + + case CBC: + case OFB: + case CFB128: + if (j == 0) + { + ret = AESTest(&ctx, amode, akeysz, key[i], iv[i], + dir, /* 0 = decrypt, 1 = encrypt */ + ptext[j], ctext[j], len); + if (dir == XENCRYPT) + memcpy(ptext[j+1], iv[i], len); + else + memcpy(ctext[j+1], iv[i], len); + } + else + { + if (dir == XENCRYPT) + { + EVP_Cipher(&ctx, ctext[j], ptext[j], len); + memcpy(ptext[j+1], ctext[j-1], len); + } + else + { + EVP_Cipher(&ctx, ptext[j], ctext[j], len); + memcpy(ctext[j+1], ptext[j-1], len); + } + } + break; + + case CFB8: + if (j == 0) + { + ret = AESTest(&ctx, amode, akeysz, key[i], iv[i], + dir, /* 0 = decrypt, 1 = encrypt */ + ptext[j], ctext[j], len); + } + else + { + if (dir == XENCRYPT) + EVP_Cipher(&ctx, ctext[j], ptext[j], len); + else + EVP_Cipher(&ctx, ptext[j], ctext[j], len); + } + if (dir == XENCRYPT) + { + if (j < 16) + memcpy(ptext[j+1], &iv[i][j], len); + else + memcpy(ptext[j+1], ctext[j-16], len); + } + else + { + if (j < 16) + memcpy(ctext[j+1], &iv[i][j], len); + else + memcpy(ctext[j+1], ptext[j-16], len); + } + break; + + case CFB1: + if(j == 0) + { + /* compensate for wrong endianness of input file */ + if(i == 0) + ptext[0][0]<<=7; + ret=AESTest(&ctx,amode,akeysz,key[i],iv[i],dir, + ptext[j], ctext[j], len); + } + else + { + if (dir == XENCRYPT) + EVP_Cipher(&ctx, ctext[j], ptext[j], len); + else + EVP_Cipher(&ctx, ptext[j], ctext[j], len); + + } + if(dir == XENCRYPT) + { + if(j < 128) + sb(ptext[j+1],0,gb(iv[i],j)); + else + sb(ptext[j+1],0,gb(ctext[j-128],0)); + } + else + { + if(j < 128) + sb(ctext[j+1],0,gb(iv[i],j)); + else + sb(ctext[j+1],0,gb(ptext[j-128],0)); + } + break; + } + } + --j; /* reset to last of range */ + /* Output Ciphertext | Plaintext */ + OutputValue(t_tag[dir],dir ? ctext[j] : ptext[j],len,rfp, + imode == CFB1); + fprintf(rfp, "\n"); /* add separator */ + + /* Compute next KEY */ + if (dir == XENCRYPT) + { + if (imode == CFB8) + { /* ct = CT[j-15] || CT[j-14] || ... || CT[j] */ + for (n1 = 0, n2 = nkeysz-1; n1 < nkeysz; ++n1, --n2) + ciphertext[n1] = ctext[j-n2][0]; + } + else if(imode == CFB1) + { + for(n1=0,n2=akeysz-1 ; n1 < akeysz ; ++n1,--n2) + sb(ciphertext,n1,gb(ctext[j-n2],0)); + } + else + switch (akeysz) + { + case 128: + memcpy(ciphertext, ctext[j], 16); + break; + case 192: + memcpy(ciphertext, ctext[j-1]+8, 8); + memcpy(ciphertext+8, ctext[j], 16); + break; + case 256: + memcpy(ciphertext, ctext[j-1], 16); + memcpy(ciphertext+16, ctext[j], 16); + break; + } + } + else + { + if (imode == CFB8) + { /* ct = CT[j-15] || CT[j-14] || ... || CT[j] */ + for (n1 = 0, n2 = nkeysz-1; n1 < nkeysz; ++n1, --n2) + ciphertext[n1] = ptext[j-n2][0]; + } + else if(imode == CFB1) + { + for(n1=0,n2=akeysz-1 ; n1 < akeysz ; ++n1,--n2) + sb(ciphertext,n1,gb(ptext[j-n2],0)); + } + else + switch (akeysz) + { + case 128: + memcpy(ciphertext, ptext[j], 16); + break; + case 192: + memcpy(ciphertext, ptext[j-1]+8, 8); + memcpy(ciphertext+8, ptext[j], 16); + break; + case 256: + memcpy(ciphertext, ptext[j-1], 16); + memcpy(ciphertext+16, ptext[j], 16); + break; + } + } + /* Compute next key: Key[i+1] = Key[i] xor ct */ + for (n = 0; n < nkeysz; ++n) + key[i+1][n] = key[i][n] ^ ciphertext[n]; + + /* Compute next IV and text */ + if (dir == XENCRYPT) + { + switch (imode) + { + case ECB: + memcpy(ptext[0], ctext[j], AES_BLOCK_SIZE); + break; + case CBC: + case OFB: + case CFB128: + memcpy(iv[i+1], ctext[j], AES_BLOCK_SIZE); + memcpy(ptext[0], ctext[j-1], AES_BLOCK_SIZE); + break; + case CFB8: + /* IV[i+1] = ct */ + for (n1 = 0, n2 = 15; n1 < 16; ++n1, --n2) + iv[i+1][n1] = ctext[j-n2][0]; + ptext[0][0] = ctext[j-16][0]; + break; + case CFB1: + for(n1=0,n2=127 ; n1 < 128 ; ++n1,--n2) + sb(iv[i+1],n1,gb(ctext[j-n2],0)); + ptext[0][0]=ctext[j-128][0]&0x80; + break; + } + } + else + { + switch (imode) + { + case ECB: + memcpy(ctext[0], ptext[j], AES_BLOCK_SIZE); + break; + case CBC: + case OFB: + case CFB128: + memcpy(iv[i+1], ptext[j], AES_BLOCK_SIZE); + memcpy(ctext[0], ptext[j-1], AES_BLOCK_SIZE); + break; + case CFB8: + for (n1 = 0, n2 = 15; n1 < 16; ++n1, --n2) + iv[i+1][n1] = ptext[j-n2][0]; + ctext[0][0] = ptext[j-16][0]; + break; + case CFB1: + for(n1=0,n2=127 ; n1 < 128 ; ++n1,--n2) + sb(iv[i+1],n1,gb(ptext[j-n2],0)); + ctext[0][0]=ptext[j-128][0]&0x80; + break; + } + } + } + + return ret; + } + +/*================================================*/ +/*---------------------------- + # Config info for v-one + # AESVS MMT test data for ECB + # State : Encrypt and Decrypt + # Key Length : 256 + # Fri Aug 30 04:07:22 PM + ----------------------------*/ + +int proc_file(char *rqfile) + { + char afn[256], rfn[256]; + FILE *afp = NULL, *rfp = NULL; + char ibuf[2048]; + int ilen, len, ret = 0; + char algo[8] = ""; + char amode[8] = ""; + char atest[8] = ""; + int akeysz = 0; + unsigned char iVec[20], aKey[40]; + int dir = -1, err = 0, step = 0; + unsigned char plaintext[2048]; + unsigned char ciphertext[2048]; + char *rp; + EVP_CIPHER_CTX ctx; + + if (!rqfile || !(*rqfile)) + { + printf("No req file\n"); + return -1; + } + strcpy(afn, rqfile); + + if ((afp = fopen(afn, "r")) == NULL) + { + printf("Cannot open file: %s, %s\n", + afn, strerror(errno)); + return -1; + } + strcpy(rfn,afn); + rp=strstr(rfn,"req/"); + assert(rp); + memcpy(rp,"rsp",3); + rp = strstr(rfn, ".req"); + memcpy(rp, ".rsp", 4); + if ((rfp = fopen(rfn, "w")) == NULL) + { + printf("Cannot open file: %s, %s\n", + rfn, strerror(errno)); + fclose(afp); + afp = NULL; + return -1; + } + while (!err && (fgets(ibuf, sizeof(ibuf), afp)) != NULL) + { + ilen = strlen(ibuf); + /* printf("step=%d ibuf=%s",step,ibuf); */ + switch (step) + { + case 0: /* read preamble */ + if (ibuf[0] == '\n') + { /* end of preamble */ + if ((*algo == '\0') || + (*amode == '\0') || + (akeysz == 0)) + { + printf("Missing Algorithm, Mode or KeySize (%s/%s/%d)\n", + algo,amode,akeysz); + err = 1; + } + else + { + fputs(ibuf, rfp); + ++ step; + } + } + else if (ibuf[0] != '#') + { + printf("Invalid preamble item: %s\n", ibuf); + err = 1; + } + else + { /* process preamble */ + char *xp, *pp = ibuf+2; + int n; + if (akeysz) + { /* insert current time & date */ + time_t rtim = time(0); + fprintf(rfp, "# %s", ctime(&rtim)); + } + else + { + fputs(ibuf, rfp); + if (strncmp(pp, "AESVS ", 6) == 0) + { + strcpy(algo, "AES"); + /* get test type */ + pp += 6; + xp = strchr(pp, ' '); + n = xp-pp; + strncpy(atest, pp, n); + atest[n] = '\0'; + /* get mode */ + xp = strrchr(pp, ' '); /* get mode" */ + n = strlen(xp+1)-1; + strncpy(amode, xp+1, n); + amode[n] = '\0'; + /* amode[3] = '\0'; */ + printf("Test = %s, Mode = %s\n", atest, amode); + } + else if (strncasecmp(pp, "Key Length : ", 13) == 0) + { + akeysz = atoi(pp+13); + printf("Key size = %d\n", akeysz); + } + } + } + break; + + case 1: /* [ENCRYPT] | [DECRYPT] */ + if (ibuf[0] == '[') + { + fputs(ibuf, rfp); + ++step; + if (strncasecmp(ibuf, "[ENCRYPT]", 9) == 0) + dir = 1; + else if (strncasecmp(ibuf, "[DECRYPT]", 9) == 0) + dir = 0; + else + { + printf("Invalid keyword: %s\n", ibuf); + err = 1; + } + break; + } + else if (dir == -1) + { + err = 1; + printf("Missing ENCRYPT/DECRYPT keyword\n"); + break; + } + else + step = 2; + + case 2: /* KEY = xxxx */ + fputs(ibuf, rfp); + if(*ibuf == '\n') + break; + if(!strncasecmp(ibuf,"COUNT = ",8)) + break; + + if (strncasecmp(ibuf, "KEY = ", 6) != 0) + { + printf("Missing KEY\n"); + err = 1; + } + else + { + len = hex2bin((char*)ibuf+6, strlen(ibuf+6)-1, aKey); + if (len < 0) + { + printf("Invalid KEY\n"); + err =1; + break; + } + PrintValue("KEY", aKey, len); + if (strcmp(amode, "ECB") == 0) + { + memset(iVec, 0, sizeof(iVec)); + step = (dir)? 4: 5; /* no ivec for ECB */ + } + else + ++step; + } + break; + + case 3: /* IV = xxxx */ + fputs(ibuf, rfp); + if (strncasecmp(ibuf, "IV = ", 5) != 0) + { + printf("Missing IV\n"); + err = 1; + } + else + { + len = hex2bin((char*)ibuf+5, strlen(ibuf+5)-1, iVec); + if (len < 0) + { + printf("Invalid IV\n"); + err =1; + break; + } + PrintValue("IV", iVec, len); + step = (dir)? 4: 5; + } + break; + + case 4: /* PLAINTEXT = xxxx */ + fputs(ibuf, rfp); + if (strncasecmp(ibuf, "PLAINTEXT = ", 12) != 0) + { + printf("Missing PLAINTEXT\n"); + err = 1; + } + else + { + int nn = strlen(ibuf+12); + if(!strcmp(amode,"CFB1")) + len=bint2bin(ibuf+12,nn-1,plaintext); + else + len=hex2bin(ibuf+12, nn-1,plaintext); + if (len < 0) + { + printf("Invalid PLAINTEXT: %s", ibuf+12); + err =1; + break; + } + if (len >= sizeof(plaintext)) + { + printf("Buffer overflow\n"); + } + PrintValue("PLAINTEXT", (unsigned char*)plaintext, len); + if (strcmp(atest, "MCT") == 0) /* Monte Carlo Test */ + { + if(do_mct(amode, akeysz, aKey, iVec, + dir, (unsigned char*)plaintext, len, + rfp) < 0) + EXIT(1); + } + else + { + ret = AESTest(&ctx, amode, akeysz, aKey, iVec, + dir, /* 0 = decrypt, 1 = encrypt */ + plaintext, ciphertext, len); + OutputValue("CIPHERTEXT",ciphertext,len,rfp, + !strcmp(amode,"CFB1")); + } + step = 6; + } + break; + + case 5: /* CIPHERTEXT = xxxx */ + fputs(ibuf, rfp); + if (strncasecmp(ibuf, "CIPHERTEXT = ", 13) != 0) + { + printf("Missing KEY\n"); + err = 1; + } + else + { + if(!strcmp(amode,"CFB1")) + len=bint2bin(ibuf+13,strlen(ibuf+13)-1,ciphertext); + else + len = hex2bin(ibuf+13,strlen(ibuf+13)-1,ciphertext); + if (len < 0) + { + printf("Invalid CIPHERTEXT\n"); + err =1; + break; + } + + PrintValue("CIPHERTEXT", ciphertext, len); + if (strcmp(atest, "MCT") == 0) /* Monte Carlo Test */ + { + do_mct(amode, akeysz, aKey, iVec, + dir, ciphertext, len, rfp); + } + else + { + ret = AESTest(&ctx, amode, akeysz, aKey, iVec, + dir, /* 0 = decrypt, 1 = encrypt */ + plaintext, ciphertext, len); + OutputValue("PLAINTEXT",(unsigned char *)plaintext,len,rfp, + !strcmp(amode,"CFB1")); + } + step = 6; + } + break; + + case 6: + if (ibuf[0] != '\n') + { + err = 1; + printf("Missing terminator\n"); + } + else if (strcmp(atest, "MCT") != 0) + { /* MCT already added terminating nl */ + fputs(ibuf, rfp); + } + step = 1; + break; + } + } + if (rfp) + fclose(rfp); + if (afp) + fclose(afp); + return err; + } + +/*-------------------------------------------------- + Processes either a single file or + a set of files whose names are passed in a file. + A single file is specified as: + aes_test -f xxx.req + A set of files is specified as: + aes_test -d xxxxx.xxx + The default is: -d req.txt +--------------------------------------------------*/ +int main(int argc, char **argv) + { + char *rqlist = "req.txt"; + FILE *fp = NULL; + char fn[250] = "", rfn[256] = ""; + int f_opt = 0, d_opt = 1; + +#ifdef OPENSSL_FIPS + if(!FIPS_mode_set(1,argv[0])) + { + ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); + EXIT(1); + } +#endif + ERR_load_crypto_strings(); + if (argc > 1) + { + if (strcasecmp(argv[1], "-d") == 0) + { + d_opt = 1; + } + else if (strcasecmp(argv[1], "-f") == 0) + { + f_opt = 1; + d_opt = 0; + } + else + { + printf("Invalid parameter: %s\n", argv[1]); + return 0; + } + if (argc < 3) + { + printf("Missing parameter\n"); + return 0; + } + if (d_opt) + rqlist = argv[2]; + else + strcpy(fn, argv[2]); + } + if (d_opt) + { /* list of files (directory) */ + if (!(fp = fopen(rqlist, "r"))) + { + printf("Cannot open req list file\n"); + return -1; + } + while (fgets(fn, sizeof(fn), fp)) + { + strtok(fn, "\r\n"); + strcpy(rfn, fn); + printf("Processing: %s\n", rfn); + if (proc_file(rfn)) + { + printf(">>> Processing failed for: %s <<<\n", rfn); + EXIT(1); + } + } + fclose(fp); + } + else /* single file */ + { + printf("Processing: %s\n", fn); + if (proc_file(fn)) + { + printf(">>> Processing failed for: %s <<<\n", fn); + } + } + EXIT(0); + return 0; + } diff --git a/src/lib/libssl/src/fips/des/Makefile b/src/lib/libssl/src/fips/des/Makefile new file mode 100644 index 0000000000..87a5329d53 --- /dev/null +++ b/src/lib/libssl/src/fips/des/Makefile @@ -0,0 +1,155 @@ +# +# SSLeay/fips/des/Makefile +# + +DIR= des +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +FIPS_DES_ENC=fips_des_enc.o + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= fips_desmovs.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=fips_des_enc.c asm/fips-dx86-elf.s fips_des_selftest.c fips_set_key.c +LIBOBJ=$(FIPS_DES_ENC) fips_des_selftest.o fips_set_key.o + +SRC= $(LIBSRC) + +EXHEADER= +HEADER= $(EXHEADER) fips_des_locl.h + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) sub_all) + +all: check lib + +check: + TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @sleep 2; touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done + +tags: + ctags $(SRC) + +tests: + +top_fips_desmovs: + (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) TARGET=fips_desmovs sub_target) + +fips_desmovs: fips_desmovs.o $(TOP)/libcrypto.a + $(CC) $(CFLAGS) -o fips_desmovs fips_desmovs.o $(PEX_LIBS) $(TOP)/libcrypto.a $(EX_LIBS) + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a fips_desmovs + +fips_test: top_fips_desmovs + find ../testvectors/des/req -name '*.req' > testlist + -rm -rf ../testvectors/des/rsp + mkdir ../testvectors/des/rsp + ./fips_desmovs -d testlist + find ../testvectors/des2/req -name '*.req' > testlist + -rm -rf ../testvectors/des2/rsp + mkdir ../testvectors/des2/rsp + ./fips_desmovs -d testlist + find ../testvectors/des3/req -name '*.req' > testlist + -rm -rf ../testvectors/des3/rsp + mkdir ../testvectors/des3/rsp + ./fips_desmovs -d testlist + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) \ + $(SRC) $(TEST) +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff +# DO NOT DELETE THIS LINE -- make depend depends on it. + +fips_des_enc.o: ../../e_os.h ../../include/openssl/crypto.h +fips_des_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +fips_des_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/fips.h +fips_des_enc.o: ../../include/openssl/opensslconf.h +fips_des_enc.o: ../../include/openssl/opensslv.h +fips_des_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +fips_des_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +fips_des_enc.o: ../../include/openssl/ui_compat.h fips_des_enc.c +fips_des_enc.o: fips_des_locl.h +fips_des_selftest.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h +fips_des_selftest.o: ../../include/openssl/des.h +fips_des_selftest.o: ../../include/openssl/des_old.h +fips_des_selftest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +fips_des_selftest.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +fips_des_selftest.o: ../../include/openssl/opensslconf.h +fips_des_selftest.o: ../../include/openssl/opensslv.h +fips_des_selftest.o: ../../include/openssl/safestack.h +fips_des_selftest.o: ../../include/openssl/stack.h +fips_des_selftest.o: ../../include/openssl/symhacks.h +fips_des_selftest.o: ../../include/openssl/ui.h +fips_des_selftest.o: ../../include/openssl/ui_compat.h fips_des_selftest.c +fips_desmovs.o: ../../e_os.h ../../include/openssl/aes.h +fips_desmovs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +fips_desmovs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +fips_desmovs.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +fips_desmovs.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +fips_desmovs.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +fips_desmovs.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +fips_desmovs.o: ../../include/openssl/evp.h ../../include/openssl/fips.h +fips_desmovs.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +fips_desmovs.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +fips_desmovs.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +fips_desmovs.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +fips_desmovs.o: ../../include/openssl/opensslconf.h +fips_desmovs.o: ../../include/openssl/opensslv.h +fips_desmovs.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h +fips_desmovs.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +fips_desmovs.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +fips_desmovs.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +fips_desmovs.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fips_desmovs.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +fips_desmovs.o: fips_desmovs.c +fips_set_key.o: ../../e_os.h ../../include/openssl/crypto.h +fips_set_key.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +fips_set_key.o: ../../include/openssl/e_os2.h ../../include/openssl/fips.h +fips_set_key.o: ../../include/openssl/opensslconf.h +fips_set_key.o: ../../include/openssl/opensslv.h +fips_set_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +fips_set_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +fips_set_key.o: ../../include/openssl/ui_compat.h fips_des_locl.h +fips_set_key.o: fips_set_key.c diff --git a/src/lib/libssl/src/fips/des/fips_des_selftest.c b/src/lib/libssl/src/fips/des/fips_des_selftest.c new file mode 100644 index 0000000000..3e0778eb5e --- /dev/null +++ b/src/lib/libssl/src/fips/des/fips_des_selftest.c @@ -0,0 +1,200 @@ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include + +#ifdef OPENSSL_FIPS +static struct + { + DES_cblock key; + unsigned char plaintext[8]; + unsigned char ciphertext[8]; + } tests[]= + { + { + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x8C,0xA6,0x4D,0xE9,0xC1,0xB1,0x23,0xA7 } + }, + { + { 0xFE,0xDC,0xBA,0x98,0x76,0x54,0x32,0x10 }, + { 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF }, + { 0xED,0x39,0xD9,0x50,0xFA,0x74,0xBC,0xC4 }, + }, + }; + +static struct + { + DES_cblock key1; + DES_cblock key2; + unsigned char plaintext[8]; + unsigned char ciphertext[8]; + } tests2[]= + { + { + { 0x7c,0x4f,0x6e,0xf7,0xa2,0x04,0x16,0xec }, + { 0x0b,0x6b,0x7c,0x9e,0x5e,0x19,0xa7,0xc4 }, + { 0x06,0xa7,0xd8,0x79,0xaa,0xce,0x69,0xef }, + { 0x4c,0x11,0x17,0x55,0xbf,0xc4,0x4e,0xfd } + }, + { + { 0x5d,0x9e,0x01,0xd3,0x25,0xc7,0x3e,0x34 }, + { 0x01,0x16,0x7c,0x85,0x23,0xdf,0xe0,0x68 }, + { 0x9c,0x50,0x09,0x0f,0x5e,0x7d,0x69,0x7e }, + { 0xd2,0x0b,0x18,0xdf,0xd9,0x0d,0x9e,0xff }, + } + }; + +static struct + { + DES_cblock key1; + DES_cblock key2; + DES_cblock key3; + unsigned char plaintext[8]; + unsigned char ciphertext[8]; + } tests3[]= + { + { + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0xFE,0xDC,0xBA,0x98,0x76,0x54,0x32,0x10 }, + { 0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0 }, + { 0x8f,0x8f,0xbf,0x9b,0x5d,0x48,0xb4,0x1c}, + { 0x59,0x8c,0xe5,0xd3,0x6c,0xa2,0xea,0x1b}, + }, + { + { 0xDC,0xBA,0x98,0x76,0x54,0x32,0x10,0xFE }, + { 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF }, + { 0xED,0x39,0xD9,0x50,0xFA,0x74,0xBC,0xC4 }, + { 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF }, + { 0x11,0x25,0xb0,0x35,0xbe,0xa0,0x82,0x86 }, + }, + }; + +void FIPS_corrupt_des() + { + tests[0].plaintext[0]++; + } + +int FIPS_selftest_des() + { + int n; + + /* Encrypt/decrypt with DES and compare to known answers */ + for(n=0 ; n < 2 ; ++n) + { + DES_key_schedule key; + DES_cblock buf; + + DES_set_key(&tests[n].key,&key); + DES_ecb_encrypt(&tests[n].plaintext,&buf,&key,1); + if(memcmp(buf,tests[n].ciphertext,sizeof buf)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DES,FIPS_R_SELFTEST_FAILED); + return 0; + } + DES_ecb_encrypt(&tests[n].ciphertext,&buf,&key,0); + if(memcmp(buf,tests[n].plaintext,sizeof buf)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DES,FIPS_R_SELFTEST_FAILED); + return 0; + } + } + + /* Encrypt/decrypt with 2-key 3DES and compare to known answers */ + for(n=0 ; n < 2 ; ++n) + { + DES_key_schedule key1, key2; + unsigned char buf[8]; + + DES_set_key(&tests2[n].key1,&key1); + DES_set_key(&tests2[n].key2,&key2); + DES_ecb2_encrypt(tests2[n].plaintext,buf,&key1,&key2,1); + if(memcmp(buf,tests2[n].ciphertext,sizeof buf)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DES,FIPS_R_SELFTEST_FAILED); + return 0; + } + DES_ecb2_encrypt(tests2[n].ciphertext,buf,&key1,&key2,0); + if(memcmp(buf,tests2[n].plaintext,sizeof buf)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DES,FIPS_R_SELFTEST_FAILED); + return 0; + } + } + + /* Encrypt/decrypt with 3DES and compare to known answers */ + for(n=0 ; n < 2 ; ++n) + { + DES_key_schedule key1, key2, key3; + unsigned char buf[8]; + + DES_set_key(&tests3[n].key1,&key1); + DES_set_key(&tests3[n].key2,&key2); + DES_set_key(&tests3[n].key3,&key3); + DES_ecb3_encrypt(tests3[n].plaintext,buf,&key1,&key2,&key3,1); + if(memcmp(buf,tests3[n].ciphertext,sizeof buf)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DES,FIPS_R_SELFTEST_FAILED); + return 0; + } + DES_ecb3_encrypt(tests3[n].ciphertext,buf,&key1,&key2,&key3,0); + if(memcmp(buf,tests3[n].plaintext,sizeof buf)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DES,FIPS_R_SELFTEST_FAILED); + return 0; + } + } + + return 1; + } +#endif diff --git a/src/lib/libssl/src/fips/des/fips_desmovs.c b/src/lib/libssl/src/fips/des/fips_desmovs.c new file mode 100644 index 0000000000..d1b60c1a40 --- /dev/null +++ b/src/lib/libssl/src/fips/des/fips_desmovs.c @@ -0,0 +1,833 @@ +/* ==================================================================== + * Copyright (c) 2004 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +/*--------------------------------------------- + NIST DES Modes of Operation Validation System + Test Program + + Based on the AES Validation Suite, which was: + Donated to OpenSSL by: + V-ONE Corporation + 20250 Century Blvd, Suite 300 + Germantown, MD 20874 + U.S.A. + ----------------------------------------------*/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "e_os.h" + +/*#define AES_BLOCK_SIZE 16*/ + +#define VERBOSE 0 + +/*-----------------------------------------------*/ + +int DESTest(EVP_CIPHER_CTX *ctx, + char *amode, int akeysz, unsigned char *aKey, + unsigned char *iVec, + int dir, /* 0 = decrypt, 1 = encrypt */ + unsigned char *out, unsigned char *in, int len) + { + const EVP_CIPHER *cipher = NULL; + int kt = 0; + + if (ctx) + memset(ctx, 0, sizeof(EVP_CIPHER_CTX)); + + if (strcasecmp(amode, "CBC") == 0) + kt = 1000; + else if (strcasecmp(amode, "ECB") == 0) + kt = 2000; + else if (strcasecmp(amode, "CFB64") == 0) + kt = 3000; + else if (strncasecmp(amode, "OFB", 3) == 0) + kt = 4000; + else if(!strcasecmp(amode,"CFB1")) + kt=5000; + else if(!strcasecmp(amode,"CFB8")) + kt=6000; + else + { + printf("Unknown mode: %s\n", amode); + EXIT(1); + } + if (akeysz != 64 && akeysz != 192) + { + printf("Invalid key size: %d\n", akeysz); + EXIT(1); + } + else + { + kt += akeysz; + switch (kt) + { + case 1064: + cipher=EVP_des_cbc(); + break; + case 1192: + cipher=EVP_des_ede3_cbc(); + break; + case 2064: + cipher=EVP_des_ecb(); + break; + case 2192: + cipher=EVP_des_ede3_ecb(); + break; + case 3064: + cipher=EVP_des_cfb64(); + break; + case 3192: + cipher=EVP_des_ede3_cfb64(); + break; + case 4064: + cipher=EVP_des_ofb(); + break; + case 4192: + cipher=EVP_des_ede3_ofb(); + break; + case 5064: + cipher=EVP_des_cfb1(); + break; + case 5192: + cipher=EVP_des_ede3_cfb1(); + break; + case 6064: + cipher=EVP_des_cfb8(); + break; + case 6192: + cipher=EVP_des_ede3_cfb8(); + break; + default: + printf("Didn't handle mode %d\n",kt); + EXIT(1); + } + if(!EVP_CipherInit(ctx, cipher, aKey, iVec, dir)) + { + ERR_print_errors_fp(stderr); + EXIT(1); + } + EVP_Cipher(ctx, out, in, len); + } + return 1; + } + +/*-----------------------------------------------*/ + +int hex2bin(char *in, int len, unsigned char *out) + { + int n1, n2; + unsigned char ch; + + for (n1 = 0, n2 = 0; n1 < len; ) + { /* first byte */ + if ((in[n1] >= '0') && (in[n1] <= '9')) + ch = in[n1++] - '0'; + else if ((in[n1] >= 'A') && (in[n1] <= 'F')) + ch = in[n1++] - 'A' + 10; + else if ((in[n1] >= 'a') && (in[n1] <= 'f')) + ch = in[n1++] - 'a' + 10; + else + return -1; + if(len == 1) + { + out[n2++]=ch; + break; + } + out[n2] = ch << 4; + /* second byte */ + if ((in[n1] >= '0') && (in[n1] <= '9')) + ch = in[n1++] - '0'; + else if ((in[n1] >= 'A') && (in[n1] <= 'F')) + ch = in[n1++] - 'A' + 10; + else if ((in[n1] >= 'a') && (in[n1] <= 'f')) + ch = in[n1++] - 'a' + 10; + else + return -1; + out[n2++] |= ch; + } + return n2; + } + +/*-----------------------------------------------*/ + +int bin2hex(unsigned char *in, int len, char *out) + { + int n1, n2; + unsigned char ch; + + for (n1 = 0, n2 = 0; n1 < len; ++n1) + { + /* first nibble */ + ch = in[n1] >> 4; + if (ch <= 0x09) + out[n2++] = ch + '0'; + else + out[n2++] = ch - 10 + 'a'; + /* second nibble */ + ch = in[n1] & 0x0f; + if (ch <= 0x09) + out[n2++] = ch + '0'; + else + out[n2++] = ch - 10 + 'a'; + } + return n2; + } + +/* NB: this return the number of _bits_ read */ +int bint2bin(const char *in, int len, unsigned char *out) + { + int n; + + memset(out,0,len); + for(n=0 ; n < len ; ++n) + if(in[n] == '1') + out[n/8]|=(0x80 >> (n%8)); + return len; + } + +int bin2bint(const unsigned char *in,int len,char *out) + { + int n; + + for(n=0 ; n < len ; ++n) + out[n]=(in[n/8]&(0x80 >> (n%8))) ? '1' : '0'; + return n; + } + +/*-----------------------------------------------*/ + +void PrintValue(char *tag, unsigned char *val, int len) + { +#if VERBOSE + char obuf[2048]; + int olen; + olen = bin2hex(val, len, obuf); + printf("%s = %.*s\n", tag, olen, obuf); +#endif + } + +void DebugValue(char *tag, unsigned char *val, int len) + { + char obuf[2048]; + int olen; + olen = bin2hex(val, len, obuf); + printf("%s = %.*s\n", tag, olen, obuf); + } + +void OutputValue(char *tag, unsigned char *val, int len, FILE *rfp,int bitmode) + { + char obuf[2048]; + int olen; + + if(bitmode) + olen=bin2bint(val,len,obuf); + else + olen=bin2hex(val,len,obuf); + + fprintf(rfp, "%s = %.*s\n", tag, olen, obuf); +#if VERBOSE + printf("%s = %.*s\n", tag, olen, obuf); +#endif + } + +void shiftin(unsigned char *dst,unsigned char *src,int nbits) + { + int n; + + /* move the bytes... */ + memmove(dst,dst+nbits/8,3*8-nbits/8); + /* append new data */ + memcpy(dst+3*8-nbits/8,src,(nbits+7)/8); + /* left shift the bits */ + if(nbits%8) + for(n=0 ; n < 3*8 ; ++n) + dst[n]=(dst[n] << (nbits%8))|(dst[n+1] >> (8-nbits%8)); + } + +/*-----------------------------------------------*/ +char *t_tag[2] = {"PLAINTEXT", "CIPHERTEXT"}; +char *t_mode[6] = {"CBC","ECB","OFB","CFB1","CFB8","CFB64"}; +enum Mode {CBC, ECB, OFB, CFB1, CFB8, CFB64}; +int Sizes[6]={64,64,64,1,8,64}; + +void do_mct(char *amode, + int akeysz, int numkeys, unsigned char *akey,unsigned char *ivec, + int dir, unsigned char *text, int len, + FILE *rfp) + { + int i,imode; + unsigned char nk[4*8]; /* longest key+8 */ + unsigned char text0[8]; + + for (imode=0 ; imode < 6 ; ++imode) + if(!strcmp(amode,t_mode[imode])) + break; + if (imode == 6) + { + printf("Unrecognized mode: %s\n", amode); + EXIT(1); + } + + for(i=0 ; i < 400 ; ++i) + { + int j; + int n; + EVP_CIPHER_CTX ctx; + int kp=akeysz/64; + unsigned char old_iv[8]; + + fprintf(rfp,"\nCOUNT = %d\n",i); + if(kp == 1) + OutputValue("KEY",akey,8,rfp,0); + else + for(n=0 ; n < kp ; ++n) + { + fprintf(rfp,"KEY%d",n+1); + OutputValue("",akey+n*8,8,rfp,0); + } + + if(imode != ECB) + OutputValue("IV",ivec,8,rfp,0); + OutputValue(t_tag[dir^1],text,len,rfp,imode == CFB1); + + /* compensate for endianness */ + if(imode == CFB1) + text[0]<<=7; + + memcpy(text0,text,8); + + for(j=0 ; j < 10000 ; ++j) + { + unsigned char old_text[8]; + + memcpy(old_text,text,8); + if(j == 0) + { + memcpy(old_iv,ivec,8); + DESTest(&ctx,amode,akeysz,akey,ivec,dir,text,text,len); + } + else + { + memcpy(old_iv,ctx.iv,8); + EVP_Cipher(&ctx,text,text,len); + } + if(j == 9999) + { + OutputValue(t_tag[dir],text,len,rfp,imode == CFB1); + /* memcpy(ivec,text,8); */ + } + /* DebugValue("iv",ctx.iv,8); */ + /* accumulate material for the next key */ + shiftin(nk,text,Sizes[imode]); + /* DebugValue("nk",nk,24);*/ + if((dir && (imode == CFB1 || imode == CFB8 || imode == CFB64 + || imode == CBC)) || imode == OFB) + memcpy(text,old_iv,8); + + if(!dir && (imode == CFB1 || imode == CFB8 || imode == CFB64)) + { + /* the test specifies using the output of the raw DES operation + which we don't have, so reconstruct it... */ + for(n=0 ; n < 8 ; ++n) + text[n]^=old_text[n]; + } + } + for(n=0 ; n < 8 ; ++n) + akey[n]^=nk[16+n]; + for(n=0 ; n < 8 ; ++n) + akey[8+n]^=nk[8+n]; + for(n=0 ; n < 8 ; ++n) + akey[16+n]^=nk[n]; + if(numkeys < 3) + memcpy(&akey[2*8],akey,8); + if(numkeys < 2) + memcpy(&akey[8],akey,8); + DES_set_odd_parity((DES_cblock *)akey); + DES_set_odd_parity((DES_cblock *)(akey+8)); + DES_set_odd_parity((DES_cblock *)(akey+16)); + memcpy(ivec,ctx.iv,8); + + /* pointless exercise - the final text doesn't depend on the + initial text in OFB mode, so who cares what it is? (Who + designed these tests?) */ + if(imode == OFB) + for(n=0 ; n < 8 ; ++n) + text[n]=text0[n]^old_iv[n]; + } + } + +int proc_file(char *rqfile) + { + char afn[256], rfn[256]; + FILE *afp = NULL, *rfp = NULL; + char ibuf[2048]; + int ilen, len, ret = 0; + char amode[8] = ""; + char atest[100] = ""; + int akeysz=0; + unsigned char iVec[20], aKey[40]; + int dir = -1, err = 0, step = 0; + unsigned char plaintext[2048]; + unsigned char ciphertext[2048]; + char *rp; + EVP_CIPHER_CTX ctx; + int numkeys=1; + + if (!rqfile || !(*rqfile)) + { + printf("No req file\n"); + return -1; + } + strcpy(afn, rqfile); + + if ((afp = fopen(afn, "r")) == NULL) + { + printf("Cannot open file: %s, %s\n", + afn, strerror(errno)); + return -1; + } + strcpy(rfn,afn); + rp=strstr(rfn,"req/"); + assert(rp); + memcpy(rp,"rsp",3); + rp = strstr(rfn, ".req"); + memcpy(rp, ".rsp", 4); + if ((rfp = fopen(rfn, "w")) == NULL) + { + printf("Cannot open file: %s, %s\n", + rfn, strerror(errno)); + fclose(afp); + afp = NULL; + return -1; + } + while (!err && (fgets(ibuf, sizeof(ibuf), afp)) != NULL) + { + ilen = strlen(ibuf); + /* printf("step=%d ibuf=%s",step,ibuf);*/ + if(step == 3 && !strcmp(amode,"ECB")) + { + memset(iVec, 0, sizeof(iVec)); + step = (dir)? 4: 5; /* no ivec for ECB */ + } + switch (step) + { + case 0: /* read preamble */ + if (ibuf[0] == '\n') + { /* end of preamble */ + if (*amode == '\0') + { + printf("Missing Mode\n"); + err = 1; + } + else + { + fputs(ibuf, rfp); + ++ step; + } + } + else if (ibuf[0] != '#') + { + printf("Invalid preamble item: %s\n", ibuf); + err = 1; + } + else + { /* process preamble */ + char *xp, *pp = ibuf+2; + int n; + if(*amode) + { /* insert current time & date */ + time_t rtim = time(0); + fprintf(rfp, "# %s", ctime(&rtim)); + } + else + { + fputs(ibuf, rfp); + if(!strncmp(pp,"INVERSE ",8) || !strncmp(pp,"DES ",4) + || !strncmp(pp,"TDES ",5) + || !strncmp(pp,"PERMUTATION ",12) + || !strncmp(pp,"SUBSTITUTION ",13) + || !strncmp(pp,"VARIABLE ",9)) + { + /* get test type */ + if(!strncmp(pp,"DES ",4)) + pp+=4; + else if(!strncmp(pp,"TDES ",5)) + pp+=5; + xp = strchr(pp, ' '); + n = xp-pp; + strncpy(atest, pp, n); + atest[n] = '\0'; + /* get mode */ + xp = strrchr(pp, ' '); /* get mode" */ + n = strlen(xp+1)-1; + strncpy(amode, xp+1, n); + amode[n] = '\0'; + /* amode[3] = '\0'; */ + printf("Test=%s, Mode=%s\n",atest,amode); + } + } + } + break; + + case 1: /* [ENCRYPT] | [DECRYPT] */ + if(ibuf[0] == '\n') + break; + if (ibuf[0] == '[') + { + fputs(ibuf, rfp); + ++step; + if (strncasecmp(ibuf, "[ENCRYPT]", 9) == 0) + dir = 1; + else if (strncasecmp(ibuf, "[DECRYPT]", 9) == 0) + dir = 0; + else + { + printf("Invalid keyword: %s\n", ibuf); + err = 1; + } + break; + } + else if (dir == -1) + { + err = 1; + printf("Missing ENCRYPT/DECRYPT keyword\n"); + break; + } + else + step = 2; + + case 2: /* KEY = xxxx */ + if(*ibuf == '\n') + { + fputs(ibuf, rfp); + break; + } + if(!strncasecmp(ibuf,"COUNT = ",8)) + { + fputs(ibuf, rfp); + break; + } + if(!strncasecmp(ibuf,"COUNT=",6)) + { + fputs(ibuf, rfp); + break; + } + if(!strncasecmp(ibuf,"NumKeys = ",10)) + { + numkeys=atoi(ibuf+10); + break; + } + + fputs(ibuf, rfp); + if(!strncasecmp(ibuf,"KEY = ",6)) + { + akeysz=64; + len = hex2bin((char*)ibuf+6, strlen(ibuf+6)-1, aKey); + if (len < 0) + { + printf("Invalid KEY\n"); + err=1; + break; + } + PrintValue("KEY", aKey, len); + ++step; + } + else if(!strncasecmp(ibuf,"KEYs = ",7)) + { + akeysz=64*3; + len=hex2bin(ibuf+7,strlen(ibuf+7)-1,aKey); + if(len != 8) + { + printf("Invalid KEY\n"); + err=1; + break; + } + memcpy(aKey+8,aKey,8); + memcpy(aKey+16,aKey,8); + ibuf[4]='\0'; + PrintValue("KEYs",aKey,len); + ++step; + } + else if(!strncasecmp(ibuf,"KEY",3)) + { + int n=ibuf[3]-'1'; + + akeysz=64*3; + len=hex2bin(ibuf+7,strlen(ibuf+7)-1,aKey+n*8); + if(len != 8) + { + printf("Invalid KEY\n"); + err=1; + break; + } + ibuf[4]='\0'; + PrintValue(ibuf,aKey,len); + if(n == 2) + ++step; + } + else + { + printf("Missing KEY\n"); + err = 1; + } + break; + + case 3: /* IV = xxxx */ + fputs(ibuf, rfp); + if (strncasecmp(ibuf, "IV = ", 5) != 0) + { + printf("Missing IV\n"); + err = 1; + } + else + { + len = hex2bin((char*)ibuf+5, strlen(ibuf+5)-1, iVec); + if (len < 0) + { + printf("Invalid IV\n"); + err =1; + break; + } + PrintValue("IV", iVec, len); + step = (dir)? 4: 5; + } + break; + + case 4: /* PLAINTEXT = xxxx */ + fputs(ibuf, rfp); + if (strncasecmp(ibuf, "PLAINTEXT = ", 12) != 0) + { + printf("Missing PLAINTEXT\n"); + err = 1; + } + else + { + int nn = strlen(ibuf+12); + if(!strcmp(amode,"CFB1")) + len=bint2bin(ibuf+12,nn-1,plaintext); + else + len=hex2bin(ibuf+12, nn-1,plaintext); + if (len < 0) + { + printf("Invalid PLAINTEXT: %s", ibuf+12); + err =1; + break; + } + if (len >= sizeof(plaintext)) + { + printf("Buffer overflow\n"); + } + PrintValue("PLAINTEXT", (unsigned char*)plaintext, len); + if (strcmp(atest, "Monte") == 0) /* Monte Carlo Test */ + { + do_mct(amode,akeysz,numkeys,aKey,iVec,dir,plaintext,len,rfp); + } + else + { + assert(dir == 1); + ret = DESTest(&ctx, amode, akeysz, aKey, iVec, + dir, /* 0 = decrypt, 1 = encrypt */ + ciphertext, plaintext, len); + OutputValue("CIPHERTEXT",ciphertext,len,rfp, + !strcmp(amode,"CFB1")); + } + step = 6; + } + break; + + case 5: /* CIPHERTEXT = xxxx */ + fputs(ibuf, rfp); + if (strncasecmp(ibuf, "CIPHERTEXT = ", 13) != 0) + { + printf("Missing KEY\n"); + err = 1; + } + else + { + if(!strcmp(amode,"CFB1")) + len=bint2bin(ibuf+13,strlen(ibuf+13)-1,ciphertext); + else + len = hex2bin(ibuf+13,strlen(ibuf+13)-1,ciphertext); + if (len < 0) + { + printf("Invalid CIPHERTEXT\n"); + err =1; + break; + } + + PrintValue("CIPHERTEXT", ciphertext, len); + if (strcmp(atest, "Monte") == 0) /* Monte Carlo Test */ + { + do_mct(amode, akeysz, numkeys, aKey, iVec, + dir, ciphertext, len, rfp); + } + else + { + assert(dir == 0); + ret = DESTest(&ctx, amode, akeysz, aKey, iVec, + dir, /* 0 = decrypt, 1 = encrypt */ + plaintext, ciphertext, len); + OutputValue("PLAINTEXT",(unsigned char *)plaintext,len,rfp, + !strcmp(amode,"CFB1")); + } + step = 6; + } + break; + + case 6: + if (ibuf[0] != '\n') + { + err = 1; + printf("Missing terminator\n"); + } + else if (strcmp(atest, "MCT") != 0) + { /* MCT already added terminating nl */ + fputs(ibuf, rfp); + } + step = 1; + break; + } + } + if (rfp) + fclose(rfp); + if (afp) + fclose(afp); + return err; + } + +/*-------------------------------------------------- + Processes either a single file or + a set of files whose names are passed in a file. + A single file is specified as: + aes_test -f xxx.req + A set of files is specified as: + aes_test -d xxxxx.xxx + The default is: -d req.txt +--------------------------------------------------*/ +int main(int argc, char **argv) + { + char *rqlist = "req.txt"; + FILE *fp = NULL; + char fn[250] = "", rfn[256] = ""; + int f_opt = 0, d_opt = 1; + +#ifdef OPENSSL_FIPS + if(!FIPS_mode_set(1,argv[0])) + { + ERR_load_crypto_strings(); + ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); + EXIT(1); + } +#endif + ERR_load_crypto_strings(); + if (argc > 1) + { + if (strcasecmp(argv[1], "-d") == 0) + { + d_opt = 1; + } + else if (strcasecmp(argv[1], "-f") == 0) + { + f_opt = 1; + d_opt = 0; + } + else + { + printf("Invalid parameter: %s\n", argv[1]); + return 0; + } + if (argc < 3) + { + printf("Missing parameter\n"); + return 0; + } + if (d_opt) + rqlist = argv[2]; + else + strcpy(fn, argv[2]); + } + if (d_opt) + { /* list of files (directory) */ + if (!(fp = fopen(rqlist, "r"))) + { + printf("Cannot open req list file\n"); + return -1; + } + while (fgets(fn, sizeof(fn), fp)) + { + strtok(fn, "\r\n"); + strcpy(rfn, fn); + printf("Processing: %s\n", rfn); + if (proc_file(rfn)) + { + printf(">>> Processing failed for: %s <<<\n", rfn); + EXIT(1); + } + } + fclose(fp); + } + else /* single file */ + { + printf("Processing: %s\n", fn); + if (proc_file(fn)) + { + printf(">>> Processing failed for: %s <<<\n", fn); + } + } + EXIT(0); + return 0; + } diff --git a/src/lib/libssl/src/fips/dh/Makefile b/src/lib/libssl/src/fips/dh/Makefile new file mode 100644 index 0000000000..10b40aa9f6 --- /dev/null +++ b/src/lib/libssl/src/fips/dh/Makefile @@ -0,0 +1,109 @@ +# +# SSLeay/fips/dh/Makefile +# + +DIR= dh +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=fips_dh_check.c fips_dh_gen.c fips_dh_key.c +LIBOBJ=fips_dh_check.o fips_dh_gen.o fips_dh_key.o + +SRC= $(LIBSRC) + +EXHEADER= +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) sub_all) + +all: check lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @sleep 2; touch lib + +check: + TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +fips_dh_check.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +fips_dh_check.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +fips_dh_check.o: ../../include/openssl/e_os2.h +fips_dh_check.o: ../../include/openssl/opensslconf.h +fips_dh_check.o: ../../include/openssl/opensslv.h +fips_dh_check.o: ../../include/openssl/ossl_typ.h +fips_dh_check.o: ../../include/openssl/safestack.h +fips_dh_check.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fips_dh_check.o: fips_dh_check.c +fips_dh_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +fips_dh_gen.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +fips_dh_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +fips_dh_gen.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +fips_dh_gen.o: ../../include/openssl/opensslconf.h +fips_dh_gen.o: ../../include/openssl/opensslv.h +fips_dh_gen.o: ../../include/openssl/ossl_typ.h +fips_dh_gen.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +fips_dh_gen.o: ../../include/openssl/symhacks.h fips_dh_gen.c +fips_dh_key.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +fips_dh_key.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +fips_dh_key.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +fips_dh_key.o: ../../include/openssl/lhash.h +fips_dh_key.o: ../../include/openssl/opensslconf.h +fips_dh_key.o: ../../include/openssl/opensslv.h +fips_dh_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +fips_dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +fips_dh_key.o: ../../include/openssl/symhacks.h fips_dh_key.c diff --git a/src/lib/libssl/src/fips/dh/fips_dh_check.c b/src/lib/libssl/src/fips/dh/fips_dh_check.c new file mode 100644 index 0000000000..874920b466 --- /dev/null +++ b/src/lib/libssl/src/fips/dh/fips_dh_check.c @@ -0,0 +1,125 @@ +/* crypto/dh/dh_check.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include +#ifndef OPENSSL_NO_DH +#include + +#ifdef OPENSSL_FIPS + +/* Check that p is a safe prime and + * if g is 2, 3 or 5, check that is is a suitable generator + * where + * for 2, p mod 24 == 11 + * for 3, p mod 12 == 5 + * for 5, p mod 10 == 3 or 7 + * should hold. + */ + +int DH_check(const DH *dh, int *ret) + { + int ok=0; + BN_CTX *ctx=NULL; + BN_ULONG l; + BIGNUM *q=NULL; + + *ret=0; + ctx=BN_CTX_new(); + if (ctx == NULL) goto err; + q=BN_new(); + if (q == NULL) goto err; + + if (BN_is_word(dh->g,DH_GENERATOR_2)) + { + l=BN_mod_word(dh->p,24); + if (l != 11) *ret|=DH_NOT_SUITABLE_GENERATOR; + } +#if 0 + else if (BN_is_word(dh->g,DH_GENERATOR_3)) + { + l=BN_mod_word(dh->p,12); + if (l != 5) *ret|=DH_NOT_SUITABLE_GENERATOR; + } +#endif + else if (BN_is_word(dh->g,DH_GENERATOR_5)) + { + l=BN_mod_word(dh->p,10); + if ((l != 3) && (l != 7)) + *ret|=DH_NOT_SUITABLE_GENERATOR; + } + else + *ret|=DH_UNABLE_TO_CHECK_GENERATOR; + + if (!BN_is_prime(dh->p,BN_prime_checks,NULL,ctx,NULL)) + *ret|=DH_CHECK_P_NOT_PRIME; + else + { + if (!BN_rshift1(q,dh->p)) goto err; + if (!BN_is_prime(q,BN_prime_checks,NULL,ctx,NULL)) + *ret|=DH_CHECK_P_NOT_SAFE_PRIME; + } + ok=1; +err: + if (ctx != NULL) BN_CTX_free(ctx); + if (q != NULL) BN_free(q); + return(ok); + } + +#endif +#endif diff --git a/src/lib/libssl/src/fips/dh/fips_dh_gen.c b/src/lib/libssl/src/fips/dh/fips_dh_gen.c new file mode 100644 index 0000000000..b569e3912d --- /dev/null +++ b/src/lib/libssl/src/fips/dh/fips_dh_gen.c @@ -0,0 +1,186 @@ +/* crypto/dh/dh_gen.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include +#include +#include +#ifndef OPENSSL_NO_DH +#include +#endif +#include + +#ifndef OPENSSL_NO_DH +#ifdef OPENSSL_FIPS + +/* We generate DH parameters as follows + * find a prime q which is prime_len/2 bits long. + * p=(2*q)+1 or (p-1)/2 = q + * For this case, g is a generator if + * g^((p-1)/q) mod p != 1 for values of q which are the factors of p-1. + * Since the factors of p-1 are q and 2, we just need to check + * g^2 mod p != 1 and g^q mod p != 1. + * + * Having said all that, + * there is another special case method for the generators 2, 3 and 5. + * for 2, p mod 24 == 11 + * for 3, p mod 12 == 5 <<<<< does not work for safe primes. + * for 5, p mod 10 == 3 or 7 + * + * Thanks to Phil Karn for the pointers about the + * special generators and for answering some of my questions. + * + * I've implemented the second simple method :-). + * Since DH should be using a safe prime (both p and q are prime), + * this generator function can take a very very long time to run. + */ +/* Actually there is no reason to insist that 'generator' be a generator. + * It's just as OK (and in some sense better) to use a generator of the + * order-q subgroup. + */ + +DH *DH_generate_parameters(int prime_len, int generator, + void (*callback)(int,int,void *), void *cb_arg) + { + BIGNUM *p=NULL,*t1,*t2; + DH *ret=NULL; + int g,ok= -1; + BN_CTX *ctx=NULL; + + if(FIPS_selftest_failed()) + { + FIPSerr(FIPS_F_DH_GENERATE_PARAMETERS,FIPS_R_FIPS_SELFTEST_FAILED); + return NULL; + } + + ret=DH_new(); + if (ret == NULL) goto err; + ctx=BN_CTX_new(); + if (ctx == NULL) goto err; + BN_CTX_start(ctx); + t1 = BN_CTX_get(ctx); + t2 = BN_CTX_get(ctx); + if (t1 == NULL || t2 == NULL) goto err; + + if (generator <= 1) + { + DHerr(DH_F_DH_GENERATE_PARAMETERS, DH_R_BAD_GENERATOR); + goto err; + } + if (generator == DH_GENERATOR_2) + { + if (!BN_set_word(t1,24)) goto err; + if (!BN_set_word(t2,11)) goto err; + g=2; + } +#if 0 /* does not work for safe primes */ + else if (generator == DH_GENERATOR_3) + { + if (!BN_set_word(t1,12)) goto err; + if (!BN_set_word(t2,5)) goto err; + g=3; + } +#endif + else if (generator == DH_GENERATOR_5) + { + if (!BN_set_word(t1,10)) goto err; + if (!BN_set_word(t2,3)) goto err; + /* BN_set_word(t3,7); just have to miss + * out on these ones :-( */ + g=5; + } + else + { + /* in the general case, don't worry if 'generator' is a + * generator or not: since we are using safe primes, + * it will generate either an order-q or an order-2q group, + * which both is OK */ + if (!BN_set_word(t1,2)) goto err; + if (!BN_set_word(t2,1)) goto err; + g=generator; + } + + p=BN_generate_prime(NULL,prime_len,1,t1,t2,callback,cb_arg); + if (p == NULL) goto err; + if (callback != NULL) callback(3,0,cb_arg); + ret->p=p; + ret->g=BN_new(); + if (!BN_set_word(ret->g,g)) goto err; + ok=1; +err: + if (ok == -1) + { + DHerr(DH_F_DH_GENERATE_PARAMETERS,ERR_R_BN_LIB); + ok=0; + } + + if (ctx != NULL) + { + BN_CTX_end(ctx); + BN_CTX_free(ctx); + } + if (!ok && (ret != NULL)) + { + DH_free(ret); + ret=NULL; + } + return(ret); + } + +#endif +#endif diff --git a/src/lib/libssl/src/fips/dh/fips_dh_key.c b/src/lib/libssl/src/fips/dh/fips_dh_key.c new file mode 100644 index 0000000000..41e3a661c0 --- /dev/null +++ b/src/lib/libssl/src/fips/dh/fips_dh_key.c @@ -0,0 +1,230 @@ +/* crypto/dh/dh_key.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include +#include +#ifndef OPENSSL_NO_RAND +#include +#endif +#ifndef OPENSSL_NO_DH +#include + +#ifdef OPENSSL_FIPS + +static int generate_key(DH *dh); +static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); +static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, + const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx); +static int dh_init(DH *dh); +static int dh_finish(DH *dh); + +int DH_generate_key(DH *dh) + { + return dh->meth->generate_key(dh); + } + +int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) + { + return dh->meth->compute_key(key, pub_key, dh); + } + +static DH_METHOD dh_ossl = { +"OpenSSL DH Method", +generate_key, +compute_key, +dh_bn_mod_exp, +dh_init, +dh_finish, +0, +NULL +}; + +const DH_METHOD *DH_OpenSSL(void) +{ + return &dh_ossl; +} + +static int generate_key(DH *dh) + { + int ok=0; + int generate_new_key=0; + unsigned l; + BN_CTX *ctx; + BN_MONT_CTX *mont; + BIGNUM *pub_key=NULL,*priv_key=NULL; + + ctx = BN_CTX_new(); + if (ctx == NULL) goto err; + + if (dh->priv_key == NULL) + { + priv_key=BN_new(); + if (priv_key == NULL) goto err; + generate_new_key=1; + } + else + priv_key=dh->priv_key; + + if (dh->pub_key == NULL) + { + pub_key=BN_new(); + if (pub_key == NULL) goto err; + } + else + pub_key=dh->pub_key; + + if ((dh->method_mont_p == NULL) && (dh->flags & DH_FLAG_CACHE_MONT_P)) + { + if ((dh->method_mont_p=(char *)BN_MONT_CTX_new()) != NULL) + if (!BN_MONT_CTX_set((BN_MONT_CTX *)dh->method_mont_p, + dh->p,ctx)) goto err; + } + mont=(BN_MONT_CTX *)dh->method_mont_p; + + if (generate_new_key) + { + l = dh->length ? dh->length : BN_num_bits(dh->p)-1; /* secret exponent length */ + if (!BN_rand(priv_key, l, 0, 0)) goto err; + } + if (!dh->meth->bn_mod_exp(dh, pub_key, dh->g, priv_key,dh->p,ctx,mont)) + goto err; + + dh->pub_key=pub_key; + dh->priv_key=priv_key; + ok=1; +err: + if (ok != 1) + DHerr(DH_F_DH_GENERATE_KEY,ERR_R_BN_LIB); + + if ((pub_key != NULL) && (dh->pub_key == NULL)) BN_free(pub_key); + if ((priv_key != NULL) && (dh->priv_key == NULL)) BN_free(priv_key); + BN_CTX_free(ctx); + return(ok); + } + +static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) + { + BN_CTX *ctx; + BN_MONT_CTX *mont; + BIGNUM *tmp; + int ret= -1; + + ctx = BN_CTX_new(); + if (ctx == NULL) goto err; + BN_CTX_start(ctx); + tmp = BN_CTX_get(ctx); + + if (dh->priv_key == NULL) + { + DHerr(DH_F_DH_COMPUTE_KEY,DH_R_NO_PRIVATE_VALUE); + goto err; + } + if ((dh->method_mont_p == NULL) && (dh->flags & DH_FLAG_CACHE_MONT_P)) + { + if ((dh->method_mont_p=(char *)BN_MONT_CTX_new()) != NULL) + if (!BN_MONT_CTX_set((BN_MONT_CTX *)dh->method_mont_p, + dh->p,ctx)) goto err; + } + + mont=(BN_MONT_CTX *)dh->method_mont_p; + if (!dh->meth->bn_mod_exp(dh, tmp, pub_key, dh->priv_key,dh->p,ctx,mont)) + { + DHerr(DH_F_DH_COMPUTE_KEY,ERR_R_BN_LIB); + goto err; + } + + ret=BN_bn2bin(tmp,key); +err: + BN_CTX_end(ctx); + BN_CTX_free(ctx); + return(ret); + } + +static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, + const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx) + { + if (a->top == 1) + { + BN_ULONG A = a->d[0]; + return BN_mod_exp_mont_word(r,A,p,m,ctx,m_ctx); + } + else + return BN_mod_exp_mont(r,a,p,m,ctx,m_ctx); + } + + +static int dh_init(DH *dh) + { + dh->flags |= DH_FLAG_CACHE_MONT_P; + return(1); + } + +static int dh_finish(DH *dh) + { + if(dh->method_mont_p) + BN_MONT_CTX_free((BN_MONT_CTX *)dh->method_mont_p); + return(1); + } + +#endif +#endif diff --git a/src/lib/libssl/src/fips/dsa/Makefile b/src/lib/libssl/src/fips/dsa/Makefile new file mode 100644 index 0000000000..0cc5704ed1 --- /dev/null +++ b/src/lib/libssl/src/fips/dsa/Makefile @@ -0,0 +1,158 @@ +# +# SSLeay/fips/dsa/Makefile +# + +DIR= dsa +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST=fips_dsatest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=fips_dsa_ossl.c fips_dsa_gen.c fips_dsa_selftest.c +LIBOBJ=fips_dsa_ossl.o fips_dsa_gen.o fips_dsa_selftest.o + +SRC= $(LIBSRC) + +EXHEADER= +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) sub_all) + +all: check lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @sleep 2; touch lib + +check: + TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done + +tags: + ctags $(SRC) + +tests: + +top_fips_dssvs: + (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) TARGET=fips_dssvs sub_target) + +fips_dssvs: fips_dssvs.o $(TOP)/libcrypto.a + $(CC) $(CFLAGS) -o fips_dssvs fips_dssvs.o $(PEX_LIBS) $(TOP)/libcrypto.a $(EX_LIBS) + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a fips_dssvs + +Q=../testvectors/dsa/req +A=../testvectors/dsa/rsp + +fips_test: top_fips_dssvs + -rm -rf $A + mkdir $A + ./fips_dssvs pqg < $Q/PQGGen.req > $A/PQGGen.rsp + ./fips_dssvs keypair < $Q/KeyPair.req > $A/KeyPair.rsp + ./fips_dssvs siggen < $Q/SigGen.req > $A/SigGen.rsp + ./fips_dssvs sigver < $Q/SigVer.req > $A/SigVer.rsp + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff +# DO NOT DELETE THIS LINE -- make depend depends on it. + +fips_dsa_gen.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +fips_dsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +fips_dsa_gen.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +fips_dsa_gen.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +fips_dsa_gen.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +fips_dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +fips_dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h +fips_dsa_gen.o: ../../include/openssl/fips.h ../../include/openssl/idea.h +fips_dsa_gen.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +fips_dsa_gen.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +fips_dsa_gen.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +fips_dsa_gen.o: ../../include/openssl/objects.h +fips_dsa_gen.o: ../../include/openssl/opensslconf.h +fips_dsa_gen.o: ../../include/openssl/opensslv.h +fips_dsa_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +fips_dsa_gen.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +fips_dsa_gen.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +fips_dsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +fips_dsa_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +fips_dsa_gen.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +fips_dsa_gen.o: ../../include/openssl/ui_compat.h fips_dsa_gen.c +fips_dsa_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +fips_dsa_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +fips_dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +fips_dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h +fips_dsa_ossl.o: ../../include/openssl/err.h ../../include/openssl/fips.h +fips_dsa_ossl.o: ../../include/openssl/lhash.h +fips_dsa_ossl.o: ../../include/openssl/opensslconf.h +fips_dsa_ossl.o: ../../include/openssl/opensslv.h +fips_dsa_ossl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +fips_dsa_ossl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +fips_dsa_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fips_dsa_ossl.o: ../../include/openssl/ui.h fips_dsa_ossl.c +fips_dsa_selftest.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +fips_dsa_selftest.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +fips_dsa_selftest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +fips_dsa_selftest.o: ../../include/openssl/err.h ../../include/openssl/fips.h +fips_dsa_selftest.o: ../../include/openssl/lhash.h +fips_dsa_selftest.o: ../../include/openssl/opensslconf.h +fips_dsa_selftest.o: ../../include/openssl/opensslv.h +fips_dsa_selftest.o: ../../include/openssl/ossl_typ.h +fips_dsa_selftest.o: ../../include/openssl/safestack.h +fips_dsa_selftest.o: ../../include/openssl/stack.h +fips_dsa_selftest.o: ../../include/openssl/symhacks.h fips_dsa_selftest.c +fips_dsatest.o: ../../e_os.h ../../include/openssl/asn1.h +fips_dsatest.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +fips_dsatest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +fips_dsatest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +fips_dsatest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +fips_dsatest.o: ../../include/openssl/engine.h ../../include/openssl/err.h +fips_dsatest.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h +fips_dsatest.o: ../../include/openssl/lhash.h +fips_dsatest.o: ../../include/openssl/opensslconf.h +fips_dsatest.o: ../../include/openssl/opensslv.h +fips_dsatest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +fips_dsatest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +fips_dsatest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fips_dsatest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +fips_dsatest.o: fips_dsatest.c diff --git a/src/lib/libssl/src/fips/dsa/fips_dsa_gen.c b/src/lib/libssl/src/fips/dsa/fips_dsa_gen.c new file mode 100644 index 0000000000..21fa3d1783 --- /dev/null +++ b/src/lib/libssl/src/fips/dsa/fips_dsa_gen.c @@ -0,0 +1,374 @@ +/* crypto/dsa/dsa_gen.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#undef GENUINE_DSA + +#ifdef GENUINE_DSA +/* Parameter generation follows the original release of FIPS PUB 186, + * Appendix 2.2 (i.e. use SHA as defined in FIPS PUB 180) */ +#define HASH EVP_sha() +#else +/* Parameter generation follows the updated Appendix 2.2 for FIPS PUB 186, + * also Appendix 2.2 of FIPS PUB 186-1 (i.e. use SHA as defined in + * FIPS PUB 180-1) */ +#define HASH EVP_sha1() +#endif + +#include +#include +#include +/*#include "cryptlib.h"*/ +#include +#include +#ifndef OPENSSL_NO_DSA +#include +#endif +#ifndef OPENSSL_NO_RAND +#include +#endif +#ifndef OPENSSL_NO_SHA +#include +#endif +#include +#include + +#ifndef OPENSSL_NO_DSA +#ifdef OPENSSL_FIPS + +static int fips_check_dsa(DSA *dsa) + { + static const unsigned char str1[]="12345678901234567890"; + unsigned char sig[256]; + unsigned int siglen; + + DSA_sign(0, str1, 20, sig, &siglen, dsa); + if(DSA_verify(0, str1, 20, sig, siglen, dsa) != 1) + { + FIPSerr(FIPS_F_FIPS_CHECK_DSA,FIPS_R_PAIRWISE_TEST_FAILED); + return 0; + } + return 1; + } + +DSA *DSA_generate_parameters(FIPS_DSA_SIZE_T bits, + unsigned char *seed_in, FIPS_DSA_SIZE_T seed_len, + int *counter_ret, unsigned long *h_ret, + void (*callback)(int, int, void *), + void *cb_arg) + { + int ok=0; + unsigned char seed[SHA_DIGEST_LENGTH]; + unsigned char md[SHA_DIGEST_LENGTH]; + unsigned char buf[SHA_DIGEST_LENGTH],buf2[SHA_DIGEST_LENGTH]; + BIGNUM *r0,*W,*X,*c,*test; + BIGNUM *g=NULL,*q=NULL,*p=NULL; + BN_MONT_CTX *mont=NULL; + int k,n=0,i,b,m=0; + int counter=0; + int r=0; + BN_CTX *ctx=NULL,*ctx2=NULL,*ctx3=NULL; + unsigned int h=2; + DSA *ret=NULL; + unsigned char *seed_out=seed_in; + + if(FIPS_selftest_failed()) + { + FIPSerr(FIPS_F_DSA_GENERATE_PARAMETERS, + FIPS_R_FIPS_SELFTEST_FAILED); + goto err; + } + + if (bits < 512) bits=512; + bits=(bits+63)/64*64; + + if (seed_len < 20) + seed_in = NULL; /* seed buffer too small -- ignore */ + if (seed_len > 20) + seed_len = 20; /* App. 2.2 of FIPS PUB 186 allows larger SEED, + * but our internal buffers are restricted to 160 bits*/ + if ((seed_in != NULL) && (seed_len == 20)) + memcpy(seed,seed_in,seed_len); + + if ((ctx=BN_CTX_new()) == NULL) goto err; + if ((ctx2=BN_CTX_new()) == NULL) goto err; + if ((ctx3=BN_CTX_new()) == NULL) goto err; + if ((ret=DSA_new()) == NULL) goto err; + + if ((mont=BN_MONT_CTX_new()) == NULL) goto err; + + BN_CTX_start(ctx2); + r0 = BN_CTX_get(ctx2); + g = BN_CTX_get(ctx2); + W = BN_CTX_get(ctx2); + q = BN_CTX_get(ctx2); + X = BN_CTX_get(ctx2); + c = BN_CTX_get(ctx2); + p = BN_CTX_get(ctx2); + test = BN_CTX_get(ctx2); + + BN_lshift(test,BN_value_one(),bits-1); + + for (;;) + { + for (;;) /* find q */ + { + int seed_is_random; + + /* step 1 */ + if (callback != NULL) callback(0,m++,cb_arg); + + if (!seed_len) + { + if(RAND_pseudo_bytes(seed,SHA_DIGEST_LENGTH) < 0) + goto err; + seed_is_random = 1; + } + else + { + seed_is_random = 0; + seed_len=0; /* use random seed if 'seed_in' turns out to be bad*/ + } + memcpy(buf,seed,SHA_DIGEST_LENGTH); + memcpy(buf2,seed,SHA_DIGEST_LENGTH); + /* precompute "SEED + 1" for step 7: */ + for (i=SHA_DIGEST_LENGTH-1; i >= 0; i--) + { + buf[i]++; + if (buf[i] != 0) break; + } + + /* step 2 */ + EVP_Digest(seed,SHA_DIGEST_LENGTH,md,NULL,HASH, NULL); + EVP_Digest(buf,SHA_DIGEST_LENGTH,buf2,NULL,HASH, NULL); + for (i=0; i 0) + break; + if (r != 0) + goto err; + + /* do a callback call */ + /* step 5 */ + } + + if (callback != NULL) callback(2,0,cb_arg); + if (callback != NULL) callback(3,0,cb_arg); + + /* step 6 */ + counter=0; + /* "offset = 2" */ + + n=(bits-1)/160; + b=(bits-1)-n*160; + + for (;;) + { + if (callback != NULL && counter != 0) + callback(0,counter,cb_arg); + + /* step 7 */ + BN_zero(W); + /* now 'buf' contains "SEED + offset - 1" */ + for (k=0; k<=n; k++) + { + /* obtain "SEED + offset + k" by incrementing: */ + for (i=SHA_DIGEST_LENGTH-1; i >= 0; i--) + { + buf[i]++; + if (buf[i] != 0) break; + } + + EVP_Digest(buf,SHA_DIGEST_LENGTH,md,NULL,HASH, NULL); + + /* step 8 */ + if (!BN_bin2bn(md,SHA_DIGEST_LENGTH,r0)) + goto err; + BN_lshift(r0,r0,160*k); + BN_add(W,W,r0); + } + + /* more of step 8 */ + BN_mask_bits(W,bits-1); + BN_copy(X,W); /* this should be ok */ + BN_add(X,X,test); /* this should be ok */ + + /* step 9 */ + BN_lshift1(r0,q); + BN_mod(c,X,r0,ctx); + BN_sub(r0,c,BN_value_one()); + BN_sub(p,X,r0); + + /* step 10 */ + if (BN_cmp(p,test) >= 0) + { + /* step 11 */ + r = BN_is_prime_fasttest(p, DSS_prime_checks, callback, ctx3, cb_arg, 1); + if (r > 0) + goto end; /* found it */ + if (r != 0) + goto err; + } + + /* step 13 */ + counter++; + /* "offset = offset + n + 1" */ + + /* step 14 */ + if (counter >= 4096) break; + } + } +end: + if (callback != NULL) callback(2,1,cb_arg); + + /* We now need to generate g */ + /* Set r0=(p-1)/q */ + BN_sub(test,p,BN_value_one()); + BN_div(r0,NULL,test,q,ctx); + + BN_set_word(test,h); + BN_MONT_CTX_set(mont,p,ctx); + + for (;;) + { + /* g=test^r0%p */ + BN_mod_exp_mont(g,test,r0,p,ctx,mont); + if (!BN_is_one(g)) break; + BN_add(test,test,BN_value_one()); + h++; + } + + if (callback != NULL) callback(3,1,cb_arg); + + ok=1; +err: + if (!ok) + { + if (ret != NULL) DSA_free(ret); + } + else + { + ret->p=BN_dup(p); + ret->q=BN_dup(q); + ret->g=BN_dup(g); + if(seed_out != NULL) memcpy(seed_out,seed,20); + if (counter_ret != NULL) *counter_ret=counter; + if (h_ret != NULL) *h_ret=h; + } + if (ctx != NULL) BN_CTX_free(ctx); + if (ctx2 != NULL) + { + BN_CTX_end(ctx2); + BN_CTX_free(ctx2); + } + if (ctx3 != NULL) BN_CTX_free(ctx3); + if (mont != NULL) BN_MONT_CTX_free(mont); + return(ok?ret:NULL); + } + +int DSA_generate_key(DSA *dsa) + { + int ok=0; + BN_CTX *ctx=NULL; + BIGNUM *pub_key=NULL,*priv_key=NULL; + + if ((ctx=BN_CTX_new()) == NULL) goto err; + + if (dsa->priv_key == NULL) + { + if ((priv_key=BN_new()) == NULL) goto err; + } + else + priv_key=dsa->priv_key; + + do + if (!BN_rand_range(priv_key,dsa->q)) goto err; + while (BN_is_zero(priv_key)); + + if (dsa->pub_key == NULL) + { + if ((pub_key=BN_new()) == NULL) goto err; + } + else + pub_key=dsa->pub_key; + + if (!BN_mod_exp(pub_key,dsa->g,priv_key,dsa->p,ctx)) goto err; + + dsa->priv_key=priv_key; + dsa->pub_key=pub_key; + + if(!fips_check_dsa(dsa)) + goto err; + + ok=1; + +err: + if ((pub_key != NULL) && (dsa->pub_key == NULL)) BN_free(pub_key); + if ((priv_key != NULL) && (dsa->priv_key == NULL)) BN_free(priv_key); + if (ctx != NULL) BN_CTX_free(ctx); + return(ok); + } +#endif +#endif diff --git a/src/lib/libssl/src/fips/dsa/fips_dsa_ossl.c b/src/lib/libssl/src/fips/dsa/fips_dsa_ossl.c new file mode 100644 index 0000000000..0ae5eb4b9e --- /dev/null +++ b/src/lib/libssl/src/fips/dsa/fips_dsa_ossl.c @@ -0,0 +1,387 @@ +/* crypto/dsa/dsa_ossl.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +/* Original version from Steven Schoch */ + +#include +#include +#include +#include +#include +#ifndef OPENSSL_NO_ENGINE +#include +#endif +#include + +#ifdef OPENSSL_FIPS + +static DSA_SIG *dsa_do_sign(const unsigned char *dgst, FIPS_DSA_SIZE_T dlen, DSA *dsa); +static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp); +static int dsa_do_verify(const unsigned char *dgst, FIPS_DSA_SIZE_T dgst_len, DSA_SIG *sig, + DSA *dsa); +static int dsa_init(DSA *dsa); +static int dsa_finish(DSA *dsa); +static int dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, + BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *in_mont); +static int dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx); + +static DSA_METHOD openssl_dsa_meth = { +"OpenSSL FIPS DSA method", +dsa_do_sign, +dsa_sign_setup, +dsa_do_verify, +dsa_mod_exp, +dsa_bn_mod_exp, +dsa_init, +dsa_finish, +0, +NULL +}; + +int FIPS_dsa_check(struct dsa_st *dsa) + { + if(dsa->meth != &openssl_dsa_meth || dsa->meth->dsa_do_sign != dsa_do_sign + || dsa->meth->dsa_sign_setup != dsa_sign_setup + || dsa->meth->dsa_mod_exp != dsa_mod_exp + || dsa->meth->bn_mod_exp != dsa_bn_mod_exp + || dsa->meth->init != dsa_init + || dsa->meth->finish != dsa_finish) + { + FIPSerr(FIPS_F_FIPS_DSA_CHECK,FIPS_R_NON_FIPS_METHOD); + return 0; + } + return 1; + } + +const DSA_METHOD *DSA_OpenSSL(void) +{ + return &openssl_dsa_meth; +} + +static DSA_SIG *dsa_do_sign(const unsigned char *dgst, FIPS_DSA_SIZE_T dlen, DSA *dsa) + { + BIGNUM *kinv=NULL,*r=NULL,*s=NULL; + BIGNUM m; + BIGNUM xr; + BN_CTX *ctx=NULL; + int i,reason=ERR_R_BN_LIB; + DSA_SIG *ret=NULL; + + if(FIPS_selftest_failed()) + { + FIPSerr(FIPS_F_DSA_DO_SIGN,FIPS_R_FIPS_SELFTEST_FAILED); + return NULL; + } + + BN_init(&m); + BN_init(&xr); + + if (!dsa->p || !dsa->q || !dsa->g) + { + reason=DSA_R_MISSING_PARAMETERS; + goto err; + } + + s=BN_new(); + if (s == NULL) goto err; + + i=BN_num_bytes(dsa->q); /* should be 20 */ + if ((dlen > i) || (dlen > 50)) + { + reason=DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE; + goto err; + } + + ctx=BN_CTX_new(); + if (ctx == NULL) goto err; + + if ((dsa->kinv == NULL) || (dsa->r == NULL)) + { + if (!DSA_sign_setup(dsa,ctx,&kinv,&r)) goto err; + } + else + { + kinv=dsa->kinv; + dsa->kinv=NULL; + r=dsa->r; + dsa->r=NULL; + } + + if (BN_bin2bn(dgst,dlen,&m) == NULL) goto err; + + /* Compute s = inv(k) (m + xr) mod q */ + if (!BN_mod_mul(&xr,dsa->priv_key,r,dsa->q,ctx)) goto err;/* s = xr */ + if (!BN_add(s, &xr, &m)) goto err; /* s = m + xr */ + if (BN_cmp(s,dsa->q) > 0) + BN_sub(s,s,dsa->q); + if (!BN_mod_mul(s,s,kinv,dsa->q,ctx)) goto err; + + ret=DSA_SIG_new(); + if (ret == NULL) goto err; + ret->r = r; + ret->s = s; + +err: + if (!ret) + { + DSAerr(DSA_F_DSA_DO_SIGN,reason); + BN_free(r); + BN_free(s); + } + if (ctx != NULL) BN_CTX_free(ctx); + BN_clear_free(&m); + BN_clear_free(&xr); + if (kinv != NULL) /* dsa->kinv is NULL now if we used it */ + BN_clear_free(kinv); + return(ret); + } + +static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) + { + BN_CTX *ctx; + BIGNUM k,*kinv=NULL,*r=NULL; + int ret=0; + + if (!dsa->p || !dsa->q || !dsa->g) + { + DSAerr(DSA_F_DSA_SIGN_SETUP,DSA_R_MISSING_PARAMETERS); + return 0; + } + + BN_init(&k); + + if (ctx_in == NULL) + { + if ((ctx=BN_CTX_new()) == NULL) goto err; + } + else + ctx=ctx_in; + + if ((r=BN_new()) == NULL) goto err; + kinv=NULL; + + /* Get random k */ + do + if (!BN_rand_range(&k, dsa->q)) goto err; + while (BN_is_zero(&k)); + + if ((dsa->method_mont_p == NULL) && (dsa->flags & DSA_FLAG_CACHE_MONT_P)) + { + if ((dsa->method_mont_p=(char *)BN_MONT_CTX_new()) != NULL) + if (!BN_MONT_CTX_set((BN_MONT_CTX *)dsa->method_mont_p, + dsa->p,ctx)) goto err; + } + + /* Compute r = (g^k mod p) mod q */ + if (!dsa->meth->bn_mod_exp(dsa, r,dsa->g,&k,dsa->p,ctx, + (BN_MONT_CTX *)dsa->method_mont_p)) goto err; + if (!BN_mod(r,r,dsa->q,ctx)) goto err; + + /* Compute part of 's = inv(k) (m + xr) mod q' */ + if ((kinv=BN_mod_inverse(NULL,&k,dsa->q,ctx)) == NULL) goto err; + + if (*kinvp != NULL) BN_clear_free(*kinvp); + *kinvp=kinv; + kinv=NULL; + if (*rp != NULL) BN_clear_free(*rp); + *rp=r; + ret=1; +err: + if (!ret) + { + DSAerr(DSA_F_DSA_SIGN_SETUP,ERR_R_BN_LIB); + if (kinv != NULL) BN_clear_free(kinv); + if (r != NULL) BN_clear_free(r); + } + if (ctx_in == NULL) BN_CTX_free(ctx); + if (kinv != NULL) BN_clear_free(kinv); + BN_clear_free(&k); + return(ret); + } + +static int dsa_do_verify(const unsigned char *dgst, FIPS_DSA_SIZE_T dgst_len, DSA_SIG *sig, + DSA *dsa) + { + BN_CTX *ctx; + BIGNUM u1,u2,t1; + BN_MONT_CTX *mont=NULL; + int ret = -1; + + if (!dsa->p || !dsa->q || !dsa->g) + { + DSAerr(DSA_F_DSA_DO_VERIFY,DSA_R_MISSING_PARAMETERS); + return -1; + } + + if(FIPS_selftest_failed()) + { + FIPSerr(FIPS_F_DSA_DO_VERIFY,FIPS_R_FIPS_SELFTEST_FAILED); + return -1; + } + + BN_init(&u1); + BN_init(&u2); + BN_init(&t1); + + if ((ctx=BN_CTX_new()) == NULL) goto err; + + if (BN_is_zero(sig->r) || sig->r->neg || BN_ucmp(sig->r, dsa->q) >= 0) + { + ret = 0; + goto err; + } + if (BN_is_zero(sig->s) || sig->s->neg || BN_ucmp(sig->s, dsa->q) >= 0) + { + ret = 0; + goto err; + } + + /* Calculate W = inv(S) mod Q + * save W in u2 */ + if ((BN_mod_inverse(&u2,sig->s,dsa->q,ctx)) == NULL) goto err; + + /* save M in u1 */ + if (BN_bin2bn(dgst,dgst_len,&u1) == NULL) goto err; + + /* u1 = M * w mod q */ + if (!BN_mod_mul(&u1,&u1,&u2,dsa->q,ctx)) goto err; + + /* u2 = r * w mod q */ + if (!BN_mod_mul(&u2,sig->r,&u2,dsa->q,ctx)) goto err; + + if ((dsa->method_mont_p == NULL) && (dsa->flags & DSA_FLAG_CACHE_MONT_P)) + { + if ((dsa->method_mont_p=(char *)BN_MONT_CTX_new()) != NULL) + if (!BN_MONT_CTX_set((BN_MONT_CTX *)dsa->method_mont_p, + dsa->p,ctx)) goto err; + } + mont=(BN_MONT_CTX *)dsa->method_mont_p; + +#if 0 + { + BIGNUM t2; + + BN_init(&t2); + /* v = ( g^u1 * y^u2 mod p ) mod q */ + /* let t1 = g ^ u1 mod p */ + if (!BN_mod_exp_mont(&t1,dsa->g,&u1,dsa->p,ctx,mont)) goto err; + /* let t2 = y ^ u2 mod p */ + if (!BN_mod_exp_mont(&t2,dsa->pub_key,&u2,dsa->p,ctx,mont)) goto err; + /* let u1 = t1 * t2 mod p */ + if (!BN_mod_mul(&u1,&t1,&t2,dsa->p,ctx)) goto err_bn; + BN_free(&t2); + } + /* let u1 = u1 mod q */ + if (!BN_mod(&u1,&u1,dsa->q,ctx)) goto err; +#else + { + if (!dsa->meth->dsa_mod_exp(dsa, &t1,dsa->g,&u1,dsa->pub_key,&u2, + dsa->p,ctx,mont)) goto err; + /* BN_copy(&u1,&t1); */ + /* let u1 = u1 mod q */ + if (!BN_mod(&u1,&t1,dsa->q,ctx)) goto err; + } +#endif + /* V is now in u1. If the signature is correct, it will be + * equal to R. */ + ret=(BN_ucmp(&u1, sig->r) == 0); + + err: + if (ret != 1) DSAerr(DSA_F_DSA_DO_VERIFY,ERR_R_BN_LIB); + if (ctx != NULL) BN_CTX_free(ctx); + BN_free(&u1); + BN_free(&u2); + BN_free(&t1); + return(ret); + } + +static int dsa_init(DSA *dsa) +{ + dsa->flags|=DSA_FLAG_CACHE_MONT_P; + return(1); +} + +static int dsa_finish(DSA *dsa) +{ + if(dsa->method_mont_p) + BN_MONT_CTX_free((BN_MONT_CTX *)dsa->method_mont_p); + return(1); +} + +static int dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, + BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *in_mont) +{ + return BN_mod_exp2_mont(rr, a1, p1, a2, p2, m, ctx, in_mont); +} + +static int dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *m_ctx) +{ + return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx); +} + +#else /* ndef OPENSSL_FIPS */ + +static void *dummy=&dummy; + +#endif /* ndef OPENSSL_FIPS */ diff --git a/src/lib/libssl/src/fips/dsa/fips_dsa_selftest.c b/src/lib/libssl/src/fips/dsa/fips_dsa_selftest.c new file mode 100644 index 0000000000..2c88f0af44 --- /dev/null +++ b/src/lib/libssl/src/fips/dsa/fips_dsa_selftest.c @@ -0,0 +1,168 @@ +/* crypto/dsa/dsatest.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include +#include +#include +#include + +#ifdef OPENSSL_FIPS + +/* seed, out_p, out_q, out_g are taken from the updated Appendix 5 to + * FIPS PUB 186 and also appear in Appendix 5 to FIPS PIB 186-1 */ +static unsigned char seed[20]={ + 0xd5,0x01,0x4e,0x4b,0x60,0xef,0x2b,0xa8,0xb6,0x21,0x1b,0x40, + 0x62,0xba,0x32,0x24,0xe0,0x42,0x7d,0xd3, + }; + +static unsigned char out_p[]={ + 0x8d,0xf2,0xa4,0x94,0x49,0x22,0x76,0xaa, + 0x3d,0x25,0x75,0x9b,0xb0,0x68,0x69,0xcb, + 0xea,0xc0,0xd8,0x3a,0xfb,0x8d,0x0c,0xf7, + 0xcb,0xb8,0x32,0x4f,0x0d,0x78,0x82,0xe5, + 0xd0,0x76,0x2f,0xc5,0xb7,0x21,0x0e,0xaf, + 0xc2,0xe9,0xad,0xac,0x32,0xab,0x7a,0xac, + 0x49,0x69,0x3d,0xfb,0xf8,0x37,0x24,0xc2, + 0xec,0x07,0x36,0xee,0x31,0xc8,0x02,0x91, + }; + +static unsigned char out_q[]={ + 0xc7,0x73,0x21,0x8c,0x73,0x7e,0xc8,0xee, + 0x99,0x3b,0x4f,0x2d,0xed,0x30,0xf4,0x8e, + 0xda,0xce,0x91,0x5f, + }; + +static unsigned char out_g[]={ + 0x62,0x6d,0x02,0x78,0x39,0xea,0x0a,0x13, + 0x41,0x31,0x63,0xa5,0x5b,0x4c,0xb5,0x00, + 0x29,0x9d,0x55,0x22,0x95,0x6c,0xef,0xcb, + 0x3b,0xff,0x10,0xf3,0x99,0xce,0x2c,0x2e, + 0x71,0xcb,0x9d,0xe5,0xfa,0x24,0xba,0xbf, + 0x58,0xe5,0xb7,0x95,0x21,0x92,0x5c,0x9c, + 0xc4,0x2e,0x9f,0x6f,0x46,0x4b,0x08,0x8c, + 0xc5,0x72,0xaf,0x53,0xe6,0xd7,0x88,0x02, + }; + +static const unsigned char str1[]="12345678901234567890"; + +void FIPS_corrupt_dsa() + { + ++seed[0]; + } + +int FIPS_selftest_dsa() + { + DSA *dsa=NULL; + int counter,i,j; + unsigned char buf[256]; + unsigned long h; + unsigned char sig[256]; + unsigned int siglen; + + dsa=DSA_generate_parameters(512,seed,20,&counter,&h,NULL,NULL); + + if(dsa == NULL) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + if (counter != 105) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + if (h != 2) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + i=BN_bn2bin(dsa->q,buf); + j=sizeof(out_q); + if (i != j || memcmp(buf,out_q,i) != 0) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + + i=BN_bn2bin(dsa->p,buf); + j=sizeof(out_p); + if (i != j || memcmp(buf,out_p,i) != 0) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + + i=BN_bn2bin(dsa->g,buf); + j=sizeof(out_g); + if (i != j || memcmp(buf,out_g,i) != 0) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + DSA_generate_key(dsa); + DSA_sign(0, str1, 20, sig, &siglen, dsa); + if(DSA_verify(0, str1, 20, sig, siglen, dsa) != 1) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_DSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + DSA_free(dsa); + return 1; + } +#endif diff --git a/src/lib/libssl/src/fips/dsa/fips_dsatest.c b/src/lib/libssl/src/fips/dsa/fips_dsatest.c new file mode 100644 index 0000000000..7215940ede --- /dev/null +++ b/src/lib/libssl/src/fips/dsa/fips_dsatest.c @@ -0,0 +1,257 @@ +/* crypto/dsa/dsatest.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include +#include +#include +#include + +#include "e_os.h" + +#include +#include +#include +#include +#ifndef OPENSSL_NO_ENGINE +#include +#endif +#include +#include + +#if defined(OPENSSL_NO_DSA) || !defined(OPENSSL_FIPS) +int main(int argc, char *argv[]) +{ + printf("No FIPS DSA support\n"); + return(0); +} +#else +#include + +#ifdef OPENSSL_SYS_WIN16 +#define MS_CALLBACK _far _loadds +#else +#define MS_CALLBACK +#endif + +static void MS_CALLBACK dsa_cb(int p, int n, void *arg); + +/* seed, out_p, out_q, out_g are taken from the updated Appendix 5 to + * FIPS PUB 186 and also appear in Appendix 5 to FIPS PIB 186-1 */ +static unsigned char seed[20]={ + 0xd5,0x01,0x4e,0x4b,0x60,0xef,0x2b,0xa8,0xb6,0x21,0x1b,0x40, + 0x62,0xba,0x32,0x24,0xe0,0x42,0x7d,0xd3, + }; + +static unsigned char out_p[]={ + 0x8d,0xf2,0xa4,0x94,0x49,0x22,0x76,0xaa, + 0x3d,0x25,0x75,0x9b,0xb0,0x68,0x69,0xcb, + 0xea,0xc0,0xd8,0x3a,0xfb,0x8d,0x0c,0xf7, + 0xcb,0xb8,0x32,0x4f,0x0d,0x78,0x82,0xe5, + 0xd0,0x76,0x2f,0xc5,0xb7,0x21,0x0e,0xaf, + 0xc2,0xe9,0xad,0xac,0x32,0xab,0x7a,0xac, + 0x49,0x69,0x3d,0xfb,0xf8,0x37,0x24,0xc2, + 0xec,0x07,0x36,0xee,0x31,0xc8,0x02,0x91, + }; + +static unsigned char out_q[]={ + 0xc7,0x73,0x21,0x8c,0x73,0x7e,0xc8,0xee, + 0x99,0x3b,0x4f,0x2d,0xed,0x30,0xf4,0x8e, + 0xda,0xce,0x91,0x5f, + }; + +static unsigned char out_g[]={ + 0x62,0x6d,0x02,0x78,0x39,0xea,0x0a,0x13, + 0x41,0x31,0x63,0xa5,0x5b,0x4c,0xb5,0x00, + 0x29,0x9d,0x55,0x22,0x95,0x6c,0xef,0xcb, + 0x3b,0xff,0x10,0xf3,0x99,0xce,0x2c,0x2e, + 0x71,0xcb,0x9d,0xe5,0xfa,0x24,0xba,0xbf, + 0x58,0xe5,0xb7,0x95,0x21,0x92,0x5c,0x9c, + 0xc4,0x2e,0x9f,0x6f,0x46,0x4b,0x08,0x8c, + 0xc5,0x72,0xaf,0x53,0xe6,0xd7,0x88,0x02, + }; + +static const unsigned char str1[]="12345678901234567890"; + +static const char rnd_seed[] = "string to make the random number generator think it has entropy"; +static const unsigned char rnd_key1[]="12345678"; +static const unsigned char rnd_key2[]="abcdefgh"; + +static BIO *bio_err=NULL; + +int main(int argc, char **argv) + { + DSA *dsa=NULL; + int counter,ret=0,i,j; + unsigned char buf[256]; + unsigned long h; + unsigned char sig[256]; + unsigned int siglen; + + if (bio_err == NULL) + bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); + +#ifdef OPENSSL_FIPS + if(!FIPS_mode_set(1,argv[0])) + { + ERR_print_errors(bio_err); + EXIT(1); + } +#endif + CRYPTO_malloc_debug_init(); + CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL); + CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); + + ERR_load_crypto_strings(); + FIPS_set_prng_key(rnd_key1,rnd_key2); + RAND_seed(rnd_seed, sizeof rnd_seed); + + BIO_printf(bio_err,"test generation of DSA parameters\n"); + + dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb,bio_err); + + BIO_printf(bio_err,"seed\n"); + for (i=0; i<20; i+=4) + { + BIO_printf(bio_err,"%02X%02X%02X%02X ", + seed[i],seed[i+1],seed[i+2],seed[i+3]); + } + BIO_printf(bio_err,"\ncounter=%d h=%d\n",counter,h); + + if (dsa == NULL) goto end; + DSA_print(bio_err,dsa,0); + if (counter != 105) + { + BIO_printf(bio_err,"counter should be 105\n"); + goto end; + } + if (h != 2) + { + BIO_printf(bio_err,"h should be 2\n"); + goto end; + } + + i=BN_bn2bin(dsa->q,buf); + j=sizeof(out_q); + if ((i != j) || (memcmp(buf,out_q,i) != 0)) + { + BIO_printf(bio_err,"q value is wrong\n"); + goto end; + } + + i=BN_bn2bin(dsa->p,buf); + j=sizeof(out_p); + if ((i != j) || (memcmp(buf,out_p,i) != 0)) + { + BIO_printf(bio_err,"p value is wrong\n"); + goto end; + } + + i=BN_bn2bin(dsa->g,buf); + j=sizeof(out_g); + if ((i != j) || (memcmp(buf,out_g,i) != 0)) + { + BIO_printf(bio_err,"g value is wrong\n"); + goto end; + } + DSA_generate_key(dsa); + DSA_sign(0, str1, 20, sig, &siglen, dsa); + if (DSA_verify(0, str1, 20, sig, siglen, dsa) == 1) + ret=1; +end: + if (!ret) + ERR_print_errors(bio_err); + if (dsa != NULL) DSA_free(dsa); + CRYPTO_cleanup_all_ex_data(); + ERR_remove_state(0); + ERR_free_strings(); + CRYPTO_mem_leaks(bio_err); + if (bio_err != NULL) + { + BIO_free(bio_err); + bio_err = NULL; + } + EXIT(!ret); + return(!ret); + } + +static int cb_exit(int ec) + { + EXIT(ec); + return(0); /* To keep some compilers quiet */ + } + +static void MS_CALLBACK dsa_cb(int p, int n, void *arg) + { + char c='*'; + static int ok=0,num=0; + + if (p == 0) { c='.'; num++; }; + if (p == 1) c='+'; + if (p == 2) { c='*'; ok++; } + if (p == 3) c='\n'; + BIO_write(arg,&c,1); + (void)BIO_flush(arg); + + if (!ok && (p == 0) && (num > 1)) + { + BIO_printf((BIO *)arg,"error in dsatest\n"); + cb_exit(1); + } + } +#endif diff --git a/src/lib/libssl/src/fips/dsa/fips_dssvs.c b/src/lib/libssl/src/fips/dsa/fips_dssvs.c new file mode 100644 index 0000000000..50a4d96986 --- /dev/null +++ b/src/lib/libssl/src/fips/dsa/fips_dssvs.c @@ -0,0 +1,306 @@ +#include +#include +#include +#include +#include +#include + +int hex2bin(const char *in, unsigned char *out) + { + int n1, n2; + unsigned char ch; + + for (n1=0,n2=0 ; in[n1] && in[n1] != '\n' ; ) + { /* first byte */ + if ((in[n1] >= '0') && (in[n1] <= '9')) + ch = in[n1++] - '0'; + else if ((in[n1] >= 'A') && (in[n1] <= 'F')) + ch = in[n1++] - 'A' + 10; + else if ((in[n1] >= 'a') && (in[n1] <= 'f')) + ch = in[n1++] - 'a' + 10; + else + return -1; + if(!in[n1]) + { + out[n2++]=ch; + break; + } + out[n2] = ch << 4; + /* second byte */ + if ((in[n1] >= '0') && (in[n1] <= '9')) + ch = in[n1++] - '0'; + else if ((in[n1] >= 'A') && (in[n1] <= 'F')) + ch = in[n1++] - 'A' + 10; + else if ((in[n1] >= 'a') && (in[n1] <= 'f')) + ch = in[n1++] - 'a' + 10; + else + return -1; + out[n2++] |= ch; + } + return n2; + } + +BIGNUM *hex2bn(const char *in) + { + BIGNUM *p=BN_new(); + + BN_hex2bn(&p,in); + + return p; + } + +int bin2hex(const unsigned char *in,int len,char *out) + { + int n1, n2; + unsigned char ch; + + for (n1=0,n2=0 ; n1 < len ; ++n1) + { + ch=in[n1] >> 4; + if (ch <= 0x09) + out[n2++]=ch+'0'; + else + out[n2++]=ch-10+'a'; + ch=in[n1] & 0x0f; + if(ch <= 0x09) + out[n2++]=ch+'0'; + else + out[n2++]=ch-10+'a'; + } + out[n2]='\0'; + return n2; + } + +void pv(const char *tag,const unsigned char *val,int len) + { + char obuf[2048]; + + bin2hex(val,len,obuf); + printf("%s = %s\n",tag,obuf); + } + +void pbn(const char *tag,const BIGNUM *val) + { + printf("%s = %s\n",tag,BN_bn2hex(val)); + } + +void primes() + { + char buf[10240]; + + while(fgets(buf,sizeof buf,stdin) != NULL) + { + fputs(buf,stdout); + if(!strncmp(buf,"Prime= ",7)) + { + BIGNUM *pp; + + pp=BN_new(); + BN_hex2bn(&pp,buf+7); + printf("result= %c\n", + BN_is_prime(pp,20,NULL,NULL,NULL) ? 'P' : 'F'); + } + } + } + +void pqg() + { + char buf[1024]; + int nmod=0; + + while(fgets(buf,sizeof buf,stdin) != NULL) + { + if(!strncmp(buf,"[mod = ",7)) + nmod=atoi(buf+7); + else if(!strncmp(buf,"N = ",4)) + { + int n=atoi(buf+4); + + printf("[mod = %d]\n\n",nmod); + + while(n--) + { + unsigned char seed[20]; + DSA *dsa; + int counter; + unsigned long h; + + dsa=DSA_generate_parameters(nmod,seed,0,&counter,&h,NULL,NULL); + printf("P = %s\n",BN_bn2hex(dsa->p)); + printf("Q = %s\n",BN_bn2hex(dsa->q)); + printf("G = %s\n",BN_bn2hex(dsa->g)); + pv("Seed",seed,20); + printf("c = %d\n",counter); + printf("H = %lx\n",h); + putc('\n',stdout); + } + } + else + fputs(buf,stdout); + } + } + +void keypair() + { + char buf[1024]; + int nmod=0; + + while(fgets(buf,sizeof buf,stdin) != NULL) + { + if(!strncmp(buf,"[mod = ",7)) + nmod=atoi(buf+7); + else if(!strncmp(buf,"N = ",4)) + { + DSA *dsa; + int n=atoi(buf+4); + + printf("[mod = %d]\n\n",nmod); + + dsa=DSA_generate_parameters(nmod,NULL,0,NULL,NULL,NULL,NULL); + pbn("P",dsa->p); + pbn("Q",dsa->q); + pbn("G",dsa->g); + putc('\n',stdout); + + while(n--) + { + DSA_generate_key(dsa); + + pbn("X",dsa->priv_key); + pbn("Y",dsa->pub_key); + putc('\n',stdout); + } + } + } + } + +void siggen() + { + char buf[1024]; + int nmod=0; + DSA *dsa=NULL; + + while(fgets(buf,sizeof buf,stdin) != NULL) + { + if(!strncmp(buf,"[mod = ",7)) + { + nmod=atoi(buf+7); + printf("[mod = %d]\n\n",nmod); + + dsa=DSA_generate_parameters(nmod,NULL,0,NULL,NULL,NULL,NULL); + pbn("P",dsa->p); + pbn("Q",dsa->q); + pbn("G",dsa->g); + putc('\n',stdout); + } + else if(!strncmp(buf,"Msg = ",6)) + { + unsigned char msg[1024]; + unsigned char hash[20]; + int n; + DSA_SIG *sig; + + n=hex2bin(buf+6,msg); + pv("Msg",msg,n); + + DSA_generate_key(dsa); + pbn("Y",dsa->pub_key); + + SHA1(msg,n,hash); + sig=DSA_do_sign(hash,sizeof hash,dsa); + pbn("R",sig->r); + pbn("S",sig->s); + putc('\n',stdout); + } + } + } + +void sigver() + { + DSA *dsa=NULL; + char buf[1024]; + int nmod=0; + unsigned char hash[20]; + DSA_SIG *sig=DSA_SIG_new(); + + while(fgets(buf,sizeof buf,stdin) != NULL) + { + if(!strncmp(buf,"[mod = ",7)) + { + nmod=atoi(buf+7); + if(dsa) + DSA_free(dsa); + dsa=DSA_new(); + } + else if(!strncmp(buf,"P = ",4)) + dsa->p=hex2bn(buf+4); + else if(!strncmp(buf,"Q = ",4)) + dsa->q=hex2bn(buf+4); + else if(!strncmp(buf,"G = ",4)) + { + dsa->g=hex2bn(buf+4); + + printf("[mod = %d]\n\n",nmod); + pbn("P",dsa->p); + pbn("Q",dsa->q); + pbn("G",dsa->g); + putc('\n',stdout); + } + else if(!strncmp(buf,"Msg = ",6)) + { + unsigned char msg[1024]; + int n; + + n=hex2bin(buf+6,msg); + pv("Msg",msg,n); + SHA1(msg,n,hash); + } + else if(!strncmp(buf,"Y = ",4)) + dsa->pub_key=hex2bn(buf+4); + else if(!strncmp(buf,"R = ",4)) + sig->r=hex2bn(buf+4); + else if(!strncmp(buf,"S = ",4)) + { + sig->s=hex2bn(buf+4); + + pbn("Y",dsa->pub_key); + pbn("R",sig->r); + pbn("S",sig->s); + printf("Result = %c\n",DSA_do_verify(hash,sizeof hash,sig,dsa) + ? 'P' : 'F'); + putc('\n',stdout); + } + } + } + +int main(int argc,char **argv) + { + if(argc != 2) + { + fprintf(stderr,"%s [prime|pqg]\n",argv[0]); + exit(1); + } + if(!FIPS_mode_set(1,argv[0])) + { + ERR_load_crypto_strings(); + ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); + exit(1); + } + if(!strcmp(argv[1],"prime")) + primes(); + else if(!strcmp(argv[1],"pqg")) + pqg(); + else if(!strcmp(argv[1],"keypair")) + keypair(); + else if(!strcmp(argv[1],"siggen")) + siggen(); + else if(!strcmp(argv[1],"sigver")) + sigver(); + else + { + fprintf(stderr,"Don't know how to %s.\n",argv[1]); + exit(1); + } + + return 0; + } diff --git a/src/lib/libssl/src/fips/fips-lib.com b/src/lib/libssl/src/fips/fips-lib.com new file mode 100644 index 0000000000..f3571bf845 --- /dev/null +++ b/src/lib/libssl/src/fips/fips-lib.com @@ -0,0 +1,1180 @@ +$! +$! FIPS-LIB.COM +$! Written By: Robert Byer +$! Vice-President +$! A-Com Computing, Inc. +$! byer@mail.all-net.net +$! +$! Changes by Richard Levitte +$! +$! This command files compiles and creates the FIPS parts of the +$! "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library for OpenSSL. The "xxx" +$! denotes the machine architecture of AXP or VAX. +$! +$! It was re-written so it would try to determine what "C" compiler to use +$! or you can specify which "C" compiler to use. +$! +$! Specify the following as P1 to build just that part or ALL to just +$! build everything. +$! +$! LIBRARY To just compile the [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library. +$! APPS To just compile the [.xxx.EXE.CRYPTO]*.EXE +$! ALL To do both LIBRARY and APPS +$! +$! Specify DEBUG or NODEBUG as P2 to compile with or without debugger +$! information. +$! +$! Specify which compiler at P3 to try to compile under. +$! +$! VAXC For VAX C. +$! DECC For DEC C. +$! GNUC For GNU C. +$! +$! If you don't speficy a compiler, it will try to determine which +$! "C" compiler to use. +$! +$! P4, if defined, sets a TCP/IP library to use, through one of the following +$! keywords: +$! +$! UCX for UCX +$! TCPIP for TCPIP (post UCX) +$! SOCKETSHR for SOCKETSHR+NETLIB +$! +$! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) +$! +$! P6, if defined, sets a choice of crypto methods to compile. +$! WARNING: this should only be done to recompile some part of an already +$! fully compiled library. +$! +$! +$! Define A TCP/IP Library That We Will Need To Link To. +$! (That Is, If We Need To Link To One.) +$! +$ TCPIP_LIB = "" +$! +$! Check Which Architecture We Are Using. +$! +$ IF (F$GETSYI("CPU").GE.128) +$ THEN +$! +$! The Architecture Is AXP +$! +$ ARCH := AXP +$! +$! Else... +$! +$ ELSE +$! +$! The Architecture Is VAX. +$! +$ ARCH := VAX +$! +$! End The Architecture Check. +$! +$ ENDIF +$! +$! Define The Different Encryption Types. +$! +$ ENCRYPT_TYPES = "Basic,SHA1,RAND,DES,AES,DSA,RSA,DH" +$! +$! Check To Make Sure We Have Valid Command Line Parameters. +$! +$ GOSUB CHECK_OPTIONS +$! +$! Initialise logical names and such +$! +$ GOSUB INITIALISE +$! +$! Tell The User What Kind of Machine We Run On. +$! +$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine." +$! +$! Define The OBJ Directory. +$! +$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.CRYPTO] +$! +$! Check To See If The Architecture Specific OBJ Directory Exists. +$! +$ IF (F$PARSE(OBJ_DIR).EQS."") +$ THEN +$! +$! It Dosen't Exist, So Create It. +$! +$ CREATE/DIR 'OBJ_DIR' +$! +$! End The Architecture Specific OBJ Directory Check. +$! +$ ENDIF +$! +$! Define The EXE Directory. +$! +$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.CRYPTO] +$! +$! Check To See If The Architecture Specific Directory Exists. +$! +$ IF (F$PARSE(EXE_DIR).EQS."") +$ THEN +$! +$! It Dosen't Exist, So Create It. +$! +$ CREATE/DIRECTORY 'EXE_DIR' +$! +$! End The Architecture Specific Directory Check. +$! +$ ENDIF +$! +$! Define The Library Name. +$! +$ LIB_NAME := 'EXE_DIR'LIBCRYPTO.OLB +$! +$! Define The CRYPTO-LIB We Are To Use. +$! +$ CRYPTO_LIB := 'EXE_DIR'LIBCRYPTO.OLB +$! +$! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library... +$! +$ IF (F$SEARCH(LIB_NAME).EQS."") +$ THEN +$! +$! Guess Not, Create The Library. +$! +$ LIBRARY/CREATE/OBJECT 'LIB_NAME' +$! +$! End The Library Check. +$! +$ ENDIF +$! +$! Build our options file for the application +$! +$ GOSUB CHECK_OPT_FILE +$! +$! Define The Different Encryption "library" Strings. +$! +$ LIB_ = "fips,fips_err_wrapper" +$ LIB_SHA1 = "fips_sha1dgst,fips_sha1_selftest" +$ LIB_RAND = "fips_rand" +$ LIB_DES = "fips_des_enc,fips_des_selftest,fips_set_key" +$ LIB_AES = "fips_aes_core,fips_aes_selftest" +$ LIB_DSA = "fips_dsa_ossl,fips_dsa_gen,fips_dsa_selftest" +$ LIB_RSA = "fips_rsa_eay,fips_rsa_gen,fips_rsa_selftest" +$ LIB_DH = "fips_dh_check,fips_dh_gen,fips_dh_key" +$! +$! Setup exceptional compilations +$! +$ COMPILEWITH_CC3 = ",bss_rtcp," +$ COMPILEWITH_CC4 = ",a_utctm,bss_log,o_time," +$ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + - + "sha_dgst,sha1dgst,rmd_dgst,bf_enc," +$! +$! Figure Out What Other Modules We Are To Build. +$! +$ BUILD_SET: +$! +$! Define A Module Counter. +$! +$ MODULE_COUNTER = 0 +$! +$! Top Of The Loop. +$! +$ MODULE_NEXT: +$! +$! Extract The Module Name From The Encryption List. +$! +$ MODULE_NAME = F$ELEMENT(MODULE_COUNTER,",",ENCRYPT_TYPES) +$ IF MODULE_NAME.EQS."Basic" THEN MODULE_NAME = "" +$ MODULE_NAME1 = MODULE_NAME +$! +$! Check To See If We Are At The End Of The Module List. +$! +$ IF (MODULE_NAME.EQS.",") +$ THEN +$! +$! We Are At The End Of The Module List, Go To MODULE_DONE. +$! +$ GOTO MODULE_DONE +$! +$! End The Module List Check. +$! +$ ENDIF +$! +$! Increment The Moudle Counter. +$! +$ MODULE_COUNTER = MODULE_COUNTER + 1 +$! +$! Create The Library and Apps Module Names. +$! +$ LIB_MODULE = "LIB_" + MODULE_NAME +$ APPS_MODULE = "APPS_" + MODULE_NAME +$ IF (MODULE_NAME.EQS."ASN1_2") +$ THEN +$ MODULE_NAME = "ASN1" +$ ENDIF +$ IF (MODULE_NAME.EQS."EVP_2") +$ THEN +$ MODULE_NAME = "EVP" +$ ENDIF +$! +$! Set state (can be LIB and APPS) +$! +$ STATE = "LIB" +$ IF BUILDALL .EQS. "APPS" THEN STATE = "APPS" +$! +$! Check if the library module name actually is defined +$! +$ IF F$TYPE('LIB_MODULE') .EQS. "" +$ THEN +$ WRITE SYS$ERROR "" +$ WRITE SYS$ERROR "The module ",MODULE_NAME," does not exist. Continuing..." +$ WRITE SYS$ERROR "" +$ GOTO MODULE_NEXT +$ ENDIF +$! +$! Top Of The Module Loop. +$! +$ MODULE_AGAIN: +$! +$! Tell The User What Module We Are Building. +$! +$ IF (MODULE_NAME1.NES."") +$ THEN +$ IF STATE .EQS. "LIB" +$ THEN +$ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Library Files. (",BUILDALL,",",STATE,")" +$ ELSE IF F$TYPE('APPS_MODULE') .NES. "" +$ THEN +$ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Applications. (",BUILDALL,",",STATE,")" +$ ENDIF +$ ENDIF +$ ENDIF +$! +$! Define A File Counter And Set It To "0". +$! +$ FILE_COUNTER = 0 +$ APPLICATION = "" +$ APPLICATION_COUNTER = 0 +$! +$! Top Of The File Loop. +$! +$ NEXT_FILE: +$! +$! Look in the LIB_MODULE is we're in state LIB +$! +$ IF STATE .EQS. "LIB" +$ THEN +$! +$! O.K, Extract The File Name From The File List. +$! +$ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",'LIB_MODULE') +$! +$! else +$! +$ ELSE +$ FILE_NAME = "," +$! +$ IF F$TYPE('APPS_MODULE') .NES. "" +$ THEN +$! +$! Extract The File Name From The File List. +$! This part is a bit more complicated. +$! +$ IF APPLICATION .EQS. "" +$ THEN +$ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE') +$ APPLICATION_COUNTER = APPLICATION_COUNTER + 1 +$ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION) +$ APPLICATION = F$ELEMENT(0,"/",APPLICATION) +$ FILE_COUNTER = 0 +$ ENDIF +$ +$! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*" +$! SHOW SYMBOL APPLICATION* +$! +$ IF APPLICATION .NES. ";" +$ THEN +$ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",APPLICATION_OBJECTS) +$ IF FILE_NAME .EQS. "," +$ THEN +$ APPLICATION = "" +$ GOTO NEXT_FILE +$ ENDIF +$ ENDIF +$ ENDIF +$ ENDIF +$! +$! Check To See If We Are At The End Of The File List. +$! +$ IF (FILE_NAME.EQS.",") +$ THEN +$! +$! We Are At The End Of The File List, Change State Or Goto FILE_DONE. +$! +$ IF STATE .EQS. "LIB" .AND. BUILDALL .NES. "LIBRARY" +$ THEN +$ STATE = "APPS" +$ GOTO MODULE_AGAIN +$ ELSE +$ GOTO FILE_DONE +$ ENDIF +$! +$! End The File List Check. +$! +$ ENDIF +$! +$! Increment The Counter. +$! +$ FILE_COUNTER = FILE_COUNTER + 1 +$! +$! Create The Source File Name. +$! +$ TMP_FILE_NAME = F$ELEMENT(1,"]",FILE_NAME) +$ IF TMP_FILE_NAME .EQS. "]" THEN TMP_FILE_NAME = FILE_NAME +$ IF F$ELEMENT(0,".",TMP_FILE_NAME) .EQS. TMP_FILE_NAME THEN - + FILE_NAME = FILE_NAME + ".c" +$ IF (MODULE_NAME.NES."") +$ THEN +$ SOURCE_FILE = "SYS$DISK:[." + MODULE_NAME+ "]" + FILE_NAME +$ ELSE +$ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME +$ ENDIF +$ SOURCE_FILE = SOURCE_FILE - "][" +$! +$! Create The Object File Name. +$! +$ OBJECT_FILE = OBJ_DIR + F$PARSE(FILE_NAME,,,"NAME","SYNTAX_ONLY") + ".OBJ" +$ ON WARNING THEN GOTO NEXT_FILE +$! +$! Check To See If The File We Want To Compile Is Actually There. +$! +$ IF (F$SEARCH(SOURCE_FILE).EQS."") +$ THEN +$! +$! Tell The User That The File Doesn't Exist. +$! +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Doesn't Exist." +$ WRITE SYS$OUTPUT "" +$! +$! Exit The Build. +$! +$ GOTO EXIT +$! +$! End The File Exist Check. +$! +$ ENDIF +$! +$! Tell The User We Are Compiling The File. +$! +$ IF (MODULE_NAME.EQS."") +$ THEN +$ WRITE SYS$OUTPUT "Compiling The ",FILE_NAME," File. (",BUILDALL,",",STATE,")" +$ ENDIF +$ IF (MODULE_NAME.NES."") +$ THEN +$ WRITE SYS$OUTPUT " ",FILE_NAME,"" +$ ENDIF +$! +$! Compile The File. +$! +$ ON ERROR THEN GOTO NEXT_FILE +$ FILE_NAME0 = F$ELEMENT(0,".",FILE_NAME) +$ IF FILE_NAME - ".mar" .NES. FILE_NAME +$ THEN +$ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE' +$ ELSE +$ IF COMPILEWITH_CC3 - FILE_NAME0 .NES. COMPILEWITH_CC3 +$ THEN +$ CC3/OBJECT='OBJECT_FILE' 'SOURCE_FILE' +$ ELSE +$ IF COMPILEWITH_CC4 - FILE_NAME0 .NES. COMPILEWITH_CC4 +$ THEN +$ CC4/OBJECT='OBJECT_FILE' 'SOURCE_FILE' +$ ELSE +$ IF COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5 +$ THEN +$ CC5/OBJECT='OBJECT_FILE' 'SOURCE_FILE' +$ ELSE +$ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE' +$ ENDIF +$ ENDIF +$ ENDIF +$ ENDIF +$ IF STATE .EQS. "LIB" +$ THEN +$! +$! Add It To The Library. +$! +$ LIBRARY/REPLACE 'LIB_NAME' 'OBJECT_FILE' +$! +$! Time To Clean Up The Object File. +$! +$ DELETE 'OBJECT_FILE';* +$ ENDIF +$! +$! Go Back And Do It Again. +$! +$ GOTO NEXT_FILE +$! +$! All Done With This Library Part. +$! +$ FILE_DONE: +$! +$! Time To Build Some Applications +$! +$ IF F$TYPE('APPS_MODULE') .NES. "" .AND. BUILDALL .NES. "LIBRARY" +$ THEN +$ APPLICATION_COUNTER = 0 +$ NEXT_APPLICATION: +$ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE') +$ IF APPLICATION .EQS. ";" THEN GOTO APPLICATION_DONE +$ +$ APPLICATION_COUNTER = APPLICATION_COUNTER + 1 +$ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION) +$ APPLICATION = F$ELEMENT(0,"/",APPLICATION) +$ +$! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*" +$! SHOW SYMBOL APPLICATION* +$! +$! Tell the user what happens +$! +$ WRITE SYS$OUTPUT " ",APPLICATION,".exe" +$! +$! Link The Program. +$! +$ ON ERROR THEN GOTO NEXT_APPLICATION +$! +$! Check To See If We Are To Link With A Specific TCP/IP Library. +$! +$ IF (TCPIP_LIB.NES."") +$ THEN +$! +$! Link With A TCP/IP Library. +$! +$ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - + 'OBJ_DIR''APPLICATION_OBJECTS', - + 'CRYPTO_LIB'/LIBRARY, - + 'TCPIP_LIB','OPT_FILE'/OPTION +$! +$! Else... +$! +$ ELSE +$! +$! Don't Link With A TCP/IP Library. +$! +$ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - + 'OBJ_DIR''APPLICATION_OBJECTS',- + 'CRYPTO_LIB'/LIBRARY, - + 'OPT_FILE'/OPTION +$! +$! End The TCP/IP Library Check. +$! +$ ENDIF +$ GOTO NEXT_APPLICATION +$ APPLICATION_DONE: +$ ENDIF +$! +$! Go Back And Get The Next Module. +$! +$ GOTO MODULE_NEXT +$! +$! All Done With This Module. +$! +$ MODULE_DONE: +$! +$! Tell The User That We Are All Done. +$! +$ WRITE SYS$OUTPUT "All Done..." +$ EXIT: +$ GOSUB CLEANUP +$ EXIT +$! +$! Check For The Link Option FIle. +$! +$ CHECK_OPT_FILE: +$! +$! Check To See If We Need To Make A VAX C Option File. +$! +$ IF (COMPILER.EQS."VAXC") +$ THEN +$! +$! Check To See If We Already Have A VAX C Linker Option File. +$! +$ IF (F$SEARCH(OPT_FILE).EQS."") +$ THEN +$! +$! We Need A VAX C Linker Option File. +$! +$ CREATE 'OPT_FILE' +$DECK +! +! Default System Options File To Link Agianst +! The Sharable VAX C Runtime Library. +! +SYS$SHARE:VAXCRTL.EXE/SHARE +$EOD +$! +$! End The Option File Check. +$! +$ ENDIF +$! +$! End The VAXC Check. +$! +$ ENDIF +$! +$! Check To See If We Need A GNU C Option File. +$! +$ IF (COMPILER.EQS."GNUC") +$ THEN +$! +$! Check To See If We Already Have A GNU C Linker Option File. +$! +$ IF (F$SEARCH(OPT_FILE).EQS."") +$ THEN +$! +$! We Need A GNU C Linker Option File. +$! +$ CREATE 'OPT_FILE' +$DECK +! +! Default System Options File To Link Agianst +! The Sharable C Runtime Library. +! +GNU_CC:[000000]GCCLIB/LIBRARY +SYS$SHARE:VAXCRTL/SHARE +$EOD +$! +$! End The Option File Check. +$! +$ ENDIF +$! +$! End The GNU C Check. +$! +$ ENDIF +$! +$! Check To See If We Need A DEC C Option File. +$! +$ IF (COMPILER.EQS."DECC") +$ THEN +$! +$! Check To See If We Already Have A DEC C Linker Option File. +$! +$ IF (F$SEARCH(OPT_FILE).EQS."") +$ THEN +$! +$! Figure Out If We Need An AXP Or A VAX Linker Option File. +$! +$ IF ARCH .EQS. "VAX" +$ THEN +$! +$! We Need A DEC C Linker Option File For VAX. +$! +$ CREATE 'OPT_FILE' +$DECK +! +! Default System Options File To Link Agianst +! The Sharable DEC C Runtime Library. +! +SYS$SHARE:DECC$SHR.EXE/SHARE +$EOD +$! +$! Else... +$! +$ ELSE +$! +$! Create The AXP Linker Option File. +$! +$ CREATE 'OPT_FILE' +$DECK +! +! Default System Options File For AXP To Link Agianst +! The Sharable C Runtime Library. +! +SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE +SYS$SHARE:CMA$OPEN_RTL/SHARE +$EOD +$! +$! End The VAX/AXP DEC C Option File Check. +$! +$ ENDIF +$! +$! End The Option File Search. +$! +$ ENDIF +$! +$! End The DEC C Check. +$! +$ ENDIF +$! +$! Tell The User What Linker Option File We Are Using. +$! +$ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"." +$! +$! Time To RETURN. +$! +$ RETURN +$! +$! Check The User's Options. +$! +$ CHECK_OPTIONS: +$! +$! Check To See If P1 Is Blank. +$! +$ IF (P1.EQS."ALL") +$ THEN +$! +$! P1 Is Blank, So Build Everything. +$! +$ BUILDALL = "TRUE" +$! +$! Else... +$! +$ ELSE +$! +$! Else, Check To See If P1 Has A Valid Arguement. +$! +$ IF (P1.EQS."LIBRARY").OR.(P1.EQS."APPS") +$ THEN +$! +$! A Valid Arguement. +$! +$ BUILDALL = P1 +$! +$! Else... +$! +$ ELSE +$! +$! Tell The User We Don't Know What They Want. +$! +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT " ALL : Just Build Everything." +$ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library." +$ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.EXE Programs." +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT " AXP : Alpha Architecture." +$ WRITE SYS$OUTPUT " VAX : VAX Architecture." +$ WRITE SYS$OUTPUT "" +$! +$! Time To EXIT. +$! +$ EXIT +$! +$! End The Valid Arguement Check. +$! +$ ENDIF +$! +$! End The P1 Check. +$! +$ ENDIF +$! +$! Check To See If P2 Is Blank. +$! +$ IF (P2.EQS."NODEBUG") +$ THEN +$! +$! P2 Is NODEBUG, So Compile Without The Debugger Information. +$! +$ DEBUGGER = "NODEBUG" +$ TRACEBACK = "NOTRACEBACK" +$ GCC_OPTIMIZE = "OPTIMIZE" +$ CC_OPTIMIZE = "OPTIMIZE" +$ MACRO_OPTIMIZE = "OPTIMIZE" +$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." +$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." +$ ELSE +$! +$! Check To See If We Are To Compile With Debugger Information. +$! +$ IF (P2.EQS."DEBUG") +$ THEN +$! +$! Compile With Debugger Information. +$! +$ DEBUGGER = "DEBUG" +$ TRACEBACK = "TRACEBACK" +$ GCC_OPTIMIZE = "NOOPTIMIZE" +$ CC_OPTIMIZE = "NOOPTIMIZE" +$ MACRO_OPTIMIZE = "NOOPTIMIZE" +$ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." +$ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." +$ ELSE +$! +$! They Entered An Invalid Option.. +$! +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information." +$ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information." +$ WRITE SYS$OUTPUT "" +$! +$! Time To EXIT. +$! +$ EXIT +$! +$! End The Valid Arguement Check. +$! +$ ENDIF +$! +$! End The P2 Check. +$! +$ ENDIF +$! +$! Special Threads For OpenVMS v7.1 Or Later +$! +$! Written By: Richard Levitte +$! richard@levitte.org +$! +$! +$! Check To See If We Have A Option For P5. +$! +$ IF (P5.EQS."") +$ THEN +$! +$! Get The Version Of VMS We Are Using. +$! +$ ISSEVEN := +$ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION"))) +$ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP)) +$! +$! Check To See If The VMS Version Is v7.1 Or Later. +$! +$ IF (TMP.GE.71) +$ THEN +$! +$! We Have OpenVMS v7.1 Or Later, So Use The Special Threads. +$! +$ ISSEVEN := ,PTHREAD_USE_D4 +$! +$! End The VMS Version Check. +$! +$ ENDIF +$! +$! End The P5 Check. +$! +$ ENDIF +$! +$! Check To See If P3 Is Blank. +$! +$ IF (P3.EQS."") +$ THEN +$! +$! O.K., The User Didn't Specify A Compiler, Let's Try To +$! Find Out Which One To Use. +$! +$! Check To See If We Have GNU C. +$! +$ IF (F$TRNLNM("GNU_CC").NES."") +$ THEN +$! +$! Looks Like GNUC, Set To Use GNUC. +$! +$ P3 = "GNUC" +$! +$! Else... +$! +$ ELSE +$! +$! Check To See If We Have VAXC Or DECC. +$! +$ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."") +$ THEN +$! +$! Looks Like DECC, Set To Use DECC. +$! +$ P3 = "DECC" +$! +$! Else... +$! +$ ELSE +$! +$! Looks Like VAXC, Set To Use VAXC. +$! +$ P3 = "VAXC" +$! +$! End The VAXC Compiler Check. +$! +$ ENDIF +$! +$! End The DECC & VAXC Compiler Check. +$! +$ ENDIF +$! +$! End The Compiler Check. +$! +$ ENDIF +$! +$! Check To See If We Have A Option For P4. +$! +$ IF (P4.EQS."") +$ THEN +$! +$! Find out what socket library we have available +$! +$ IF F$PARSE("SOCKETSHR:") .NES. "" +$ THEN +$! +$! We have SOCKETSHR, and it is my opinion that it's the best to use. +$! +$ P4 = "SOCKETSHR" +$! +$! Tell the user +$! +$ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP" +$! +$! Else, let's look for something else +$! +$ ELSE +$! +$! Like UCX (the reason to do this before Multinet is that the UCX +$! emulation is easier to use...) +$! +$ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" - + .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" - + .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. "" +$ THEN +$! +$! Last resort: a UCX or UCX-compatible library +$! +$ P4 = "UCX" +$! +$! Tell the user +$! +$ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP" +$! +$! That was all... +$! +$ ENDIF +$ ENDIF +$ ENDIF +$! +$! Set Up Initial CC Definitions, Possibly With User Ones +$! +$ CCDEFS = "TCPIP_TYPE_''P4',DSO_VMS" +$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS +$ CCEXTRAFLAGS = "" +$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS +$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX" +$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - + CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS +$! +$! Check To See If The User Entered A Valid Paramter. +$! +$ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") +$ THEN +$! +$! Check To See If The User Wanted DECC. +$! +$ IF (P3.EQS."DECC") +$ THEN +$! +$! Looks Like DECC, Set To Use DECC. +$! +$ COMPILER = "DECC" +$! +$! Tell The User We Are Using DECC. +$! +$ WRITE SYS$OUTPUT "Using DECC 'C' Compiler." +$! +$! Use DECC... +$! +$ CC = "CC" +$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - + THEN CC = "CC/DECC" +$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - + "/NOLIST/PREFIX=ALL" + - + "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + - + CCEXTRAFLAGS +$! +$! Define The Linker Options File Name. +$! +$ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT" +$! +$! End DECC Check. +$! +$ ENDIF +$! +$! Check To See If We Are To Use VAXC. +$! +$ IF (P3.EQS."VAXC") +$ THEN +$! +$! Looks Like VAXC, Set To Use VAXC. +$! +$ COMPILER = "VAXC" +$! +$! Tell The User We Are Using VAX C. +$! +$ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler." +$! +$! Compile Using VAXC. +$! +$ CC = "CC" +$ IF ARCH.EQS."AXP" +$ THEN +$ WRITE SYS$OUTPUT "There is no VAX C on Alpha!" +$ EXIT +$ ENDIF +$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" +$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - + "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + - + CCEXTRAFLAGS +$ CCDEFS = """VAXC""," + CCDEFS +$! +$! Define As SYS$COMMON:[SYSLIB] +$! +$ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] +$! +$! Define The Linker Options File Name. +$! +$ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT" +$! +$! End VAXC Check +$! +$ ENDIF +$! +$! Check To See If We Are To Use GNU C. +$! +$ IF (P3.EQS."GNUC") +$ THEN +$! +$! Looks Like GNUC, Set To Use GNUC. +$! +$ COMPILER = "GNUC" +$! +$! Tell The User We Are Using GNUC. +$! +$ WRITE SYS$OUTPUT "Using GNU 'C' Compiler." +$! +$! Use GNU C... +$! +$ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - + "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + - + CCEXTRAFLAGS +$! +$! Define The Linker Options File Name. +$! +$ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT" +$! +$! End The GNU C Check. +$! +$ ENDIF +$! +$! Set up default defines +$! +$ CCDEFS = """FLAT_INC=1""," + CCDEFS +$! +$! Finish up the definition of CC. +$! +$ IF COMPILER .EQS. "DECC" +$ THEN +$ IF CCDISABLEWARNINGS .EQS. "" +$ THEN +$ CC4DISABLEWARNINGS = "DOLLARID" +$ ELSE +$ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" +$ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" +$ ENDIF +$ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" +$ ELSE +$ CCDISABLEWARNINGS = "" +$ CC4DISABLEWARNINGS = "" +$ ENDIF +$ CC3 = CC + "/DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS +$ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS +$ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG" +$ THEN +$ CC5 = CC + "/OPTIMIZE=NODISJOINT" +$ ELSE +$ CC5 = CC + "/NOOPTIMIZE" +$ ENDIF +$ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS +$! +$! Show user the result +$! +$ WRITE/SYMBOL SYS$OUTPUT "Main C Compiling Command: ",CC +$! +$! Else The User Entered An Invalid Arguement. +$! +$ ELSE +$! +$! Tell The User We Don't Know What They Want. +$! +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:" +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C." +$ WRITE SYS$OUTPUT " DECC : To Compile With DEC C." +$ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C." +$ WRITE SYS$OUTPUT "" +$! +$! Time To EXIT. +$! +$ EXIT +$! +$! End The Valid Arguement Check. +$! +$ ENDIF +$! +$! Build a MACRO command for the architecture at hand +$! +$ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'" +$ IF ARCH .EQS. "AXP" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'" +$! +$! Show user the result +$! +$ WRITE/SYMBOL SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO +$! +$! Time to check the contents, and to make sure we get the correct library. +$! +$ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" - + .OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE" +$ THEN +$! +$! Check to see if SOCKETSHR was chosen +$! +$ IF P4.EQS."SOCKETSHR" +$ THEN +$! +$! Set the library to use SOCKETSHR +$! +$ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" +$! +$! Done with SOCKETSHR +$! +$ ENDIF +$! +$! Check to see if MULTINET was chosen +$! +$ IF P4.EQS."MULTINET" +$ THEN +$! +$! Set the library to use UCX emulation. +$! +$ P4 = "UCX" +$! +$! Done with MULTINET +$! +$ ENDIF +$! +$! Check to see if UCX was chosen +$! +$ IF P4.EQS."UCX" +$ THEN +$! +$! Set the library to use UCX. +$! +$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" +$ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" +$ THEN +$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" +$ ELSE +$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - + TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT" +$ ENDIF +$! +$! Done with UCX +$! +$ ENDIF +$! +$! Check to see if TCPIP was chosen +$! +$ IF P4.EQS."TCPIP" +$ THEN +$! +$! Set the library to use TCPIP (post UCX). +$! +$ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" +$! +$! Done with TCPIP +$! +$ ENDIF +$! +$! Check to see if NONE was chosen +$! +$ IF P4.EQS."NONE" +$ THEN +$! +$! Do not use a TCPIP library. +$! +$ TCPIP_LIB = "" +$! +$! Done with TCPIP +$! +$ ENDIF +$! +$! Print info +$! +$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB +$! +$! Else The User Entered An Invalid Arguement. +$! +$ ELSE +$! +$! Tell The User We Don't Know What They Want. +$! +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:" +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library." +$ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library." +$ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library." +$ WRITE SYS$OUTPUT "" +$! +$! Time To EXIT. +$! +$ EXIT +$! +$! Done with TCP/IP libraries +$! +$ ENDIF +$! +$! Check if the user wanted to compile just a subset of all the encryption +$! methods. +$! +$ IF P6 .NES. "" +$ THEN +$ ENCRYPT_TYPES = P6 +$ ENDIF +$! +$! Time To RETURN... +$! +$ RETURN +$! +$ INITIALISE: +$! +$! Save old value of the logical name OPENSSL +$! +$ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE") +$! +$! Save directory information +$! +$ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;" +$ __HERE = F$EDIT(__HERE,"UPCASE") +$ __TOP = __HERE - "FIPS]" +$ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" +$! +$! Set up the logical name OPENSSL to point at the include directory +$! +$ DEFINE OPENSSL/NOLOG '__INCLUDE' +$! +$! Done +$! +$ RETURN +$! +$ CLEANUP: +$! +$! Restore the logical name OPENSSL if it had a value +$! +$ IF __SAVE_OPENSSL .EQS. "" +$ THEN +$ DEASSIGN OPENSSL +$ ELSE +$ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL' +$ ENDIF +$! +$! Done +$! +$ RETURN diff --git a/src/lib/libssl/src/fips/fips.c b/src/lib/libssl/src/fips/fips.c new file mode 100644 index 0000000000..7ecba57f70 --- /dev/null +++ b/src/lib/libssl/src/fips/fips.c @@ -0,0 +1,260 @@ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "fips_locl.h" + +#ifdef OPENSSL_FIPS + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +static int fips_md5_allowed = 0; +static int fips_selftest_fail = 0; + +void FIPS_allow_md5(int onoff) + { + if (fips_is_started()) + { + int owning_thread = fips_is_owning_thread(); + + if (!owning_thread) CRYPTO_w_lock(CRYPTO_LOCK_FIPS); + fips_md5_allowed = onoff; + if (!owning_thread) CRYPTO_w_unlock(CRYPTO_LOCK_FIPS); + } + } + +int FIPS_md5_allowed(void) + { + int ret = 1; + if (fips_is_started()) + { + int owning_thread = fips_is_owning_thread(); + + if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS); + ret = fips_md5_allowed; + if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS); + } + return ret; + } + +int FIPS_selftest_failed(void) + { + int ret = 0; + if (fips_is_started()) + { + int owning_thread = fips_is_owning_thread(); + + if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS); + ret = fips_selftest_fail; + if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS); + } + return ret; + } + +int FIPS_selftest() + { + ERR_load_crypto_strings(); + + return FIPS_selftest_sha1() + && FIPS_selftest_aes() + && FIPS_selftest_des() + && FIPS_selftest_rsa() + && FIPS_selftest_dsa(); + } + +static int FIPS_check_exe(const char *path) + { + unsigned char buf[1024]; + char p2[PATH_MAX]; + unsigned int n; + unsigned char mdbuf[EVP_MAX_MD_SIZE]; + FILE *f; + static char key[]="etaonrishdlcupfm"; + HMAC_CTX hmac; + const char *sha1_fmt="%s.sha1"; + + f=fopen(path,"rb"); +#ifdef __CYGWIN32__ + /* cygwin scrupulously strips .exe extentions:-( as of now it's + actually no point to attempt above fopen, but we keep the call + just in case the behavior changes in the future... */ + if (!f) + { + sha1_fmt="%s.exe.sha1"; + BIO_snprintf(p2,sizeof p2,"%s.exe",path); + f=fopen(p2,"rb"); + } +#endif + if(!f) + { + FIPSerr(FIPS_F_FIPS_CHECK_EXE,FIPS_R_CANNOT_READ_EXE); + return 0; + } + HMAC_Init(&hmac,key,strlen(key),EVP_sha1()); + while(!feof(f)) + { + n=fread(buf,1,sizeof buf,f); + if(ferror(f)) + { + clearerr(f); + fclose(f); + FIPSerr(FIPS_F_FIPS_CHECK_EXE,FIPS_R_CANNOT_READ_EXE); + return 0; + } + if (n) HMAC_Update(&hmac,buf,n); + } + fclose(f); + HMAC_Final(&hmac,mdbuf,&n); + HMAC_CTX_cleanup(&hmac); + BIO_snprintf(p2,sizeof p2,sha1_fmt,path); + f=fopen(p2,"rb"); + if(!f || fread(buf,1,20,f) != 20) + { + if (f) fclose(f); + FIPSerr(FIPS_F_FIPS_CHECK_EXE,FIPS_R_CANNOT_READ_EXE_DIGEST); + return 0; + } + fclose(f); + if(memcmp(buf,mdbuf,20)) + { + FIPSerr(FIPS_F_FIPS_CHECK_EXE,FIPS_R_EXE_DIGEST_DOES_NOT_MATCH); + return 0; + } + return 1; + } + +int FIPS_mode_set(int onoff,const char *path) + { + void fips_set_mode(int _onoff); + int fips_set_owning_thread(); + int fips_clear_owning_thread(); + int ret = 0; + + CRYPTO_w_lock(CRYPTO_LOCK_FIPS); + fips_set_started(); + fips_set_owning_thread(); + + if(onoff) + { + unsigned char buf[24]; + + fips_selftest_fail = 0; + + /* Don't go into FIPS mode twice, just so we can do automagic + seeding */ + if(FIPS_mode()) + { + FIPSerr(FIPS_F_FIPS_MODE_SET,FIPS_R_FIPS_MODE_ALREADY_SET); + fips_selftest_fail = 1; + ret = 0; + goto end; + } + + if(!FIPS_check_exe(path)) + { + fips_selftest_fail = 1; + ret = 0; + goto end; + } + + /* automagically seed PRNG if not already seeded */ + if(!FIPS_rand_seeded()) + { + if(RAND_bytes(buf,sizeof buf) <= 0) + { + fips_selftest_fail = 1; + ret = 0; + goto end; + } + FIPS_set_prng_key(buf,buf+8); + FIPS_rand_seed(buf+16,8); + } + + /* now switch into FIPS mode */ + fips_set_rand_check(FIPS_rand_method()); + RAND_set_rand_method(FIPS_rand_method()); + if(FIPS_selftest()) + fips_set_mode(1); + else + { + fips_selftest_fail = 1; + ret = 0; + goto end; + } + ret = 1; + goto end; + } + fips_set_mode(0); + fips_selftest_fail = 0; + ret = 1; +end: + fips_clear_owning_thread(); + CRYPTO_w_unlock(CRYPTO_LOCK_FIPS); + return ret; + } + +#if 0 +/* here just to cause error codes to exist */ +static void dummy() + { + FIPSerr(FIPS_F_HASH_FINAL,FIPS_F_NON_FIPS_METHOD); + FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_FIPS_SELFTEST_FAILED); + } +#endif + +#endif diff --git a/src/lib/libssl/src/fips/fips.h b/src/lib/libssl/src/fips/fips.h new file mode 100644 index 0000000000..a4df06b148 --- /dev/null +++ b/src/lib/libssl/src/fips/fips.h @@ -0,0 +1,125 @@ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#ifdef OPENSSL_FIPS + +#ifdef __cplusplus +extern "C" { +#endif + +/* Note that these are defined in crypto/cryptlib.c so they're + * available even without -lfips. + */ +struct dsa_st; + +int FIPS_mode_set(int onoff,const char *path); +void FIPS_allow_md5(int onoff); +int FIPS_md5_allowed(void); +int FIPS_selftest_failed(void); +int FIPS_dsa_check(struct dsa_st *dsa); +void FIPS_corrupt_sha1(void); +int FIPS_selftest_sha1(void); +void FIPS_corrupt_aes(void); +int FIPS_selftest_aes(void); +void FIPS_corrupt_des(void); +int FIPS_selftest_des(void); +void FIPS_corrupt_rsa(void); +int FIPS_selftest_rsa(void); +void FIPS_corrupt_dsa(void); +int FIPS_selftest_dsa(void); + +/* The following lines are auto generated by the script mkerr.pl. Any changes + * made after this point may be overwritten when the script is next run. + */ +void ERR_load_FIPS_strings(void); + +/* BEGIN ERROR CODES */ +/* The following lines are auto generated by the script mkerr.pl. Any changes + * made after this point may be overwritten when the script is next run. + */ +void ERR_load_FIPS_strings(void); + +/* Error codes for the FIPS functions. */ + +/* Function codes. */ +#define FIPS_F_DSA_DO_SIGN 111 +#define FIPS_F_DSA_DO_VERIFY 112 +#define FIPS_F_DSA_GENERATE_PARAMETERS 110 +#define FIPS_F_FIPS_CHECK_DSA 116 +#define FIPS_F_FIPS_CHECK_EXE 106 +#define FIPS_F_FIPS_CHECK_RSA 115 +#define FIPS_F_FIPS_DSA_CHECK 102 +#define FIPS_F_FIPS_MODE_SET 105 +#define FIPS_F_FIPS_SELFTEST_AES 104 +#define FIPS_F_FIPS_SELFTEST_DES 107 +#define FIPS_F_FIPS_SELFTEST_DSA 109 +#define FIPS_F_FIPS_SELFTEST_RSA 108 +#define FIPS_F_FIPS_SELFTEST_SHA1 103 +#define FIPS_F_HASH_FINAL 100 +#define FIPS_F_DH_GENERATE_PARAMETERS 117 +#define FIPS_F_RSA_EAY_PUBLIC_ENCRYPT 114 +#define FIPS_F_RSA_GENERATE_KEY 113 +#define FIPS_F_SSLEAY_RAND_BYTES 101 + +/* Reason codes. */ +#define FIPS_R_CANNOT_READ_EXE 103 +#define FIPS_R_CANNOT_READ_EXE_DIGEST 104 +#define FIPS_R_EXE_DIGEST_DOES_NOT_MATCH 105 +#define FIPS_R_FIPS_MODE_ALREADY_SET 102 +#define FIPS_R_FIPS_SELFTEST_FAILED 106 +#define FIPS_R_NON_FIPS_METHOD 100 +#define FIPS_R_PAIRWISE_TEST_FAILED 107 +#define FIPS_R_SELFTEST_FAILED 101 + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/lib/libssl/src/fips/fips_locl.h b/src/lib/libssl/src/fips/fips_locl.h new file mode 100644 index 0000000000..215e382549 --- /dev/null +++ b/src/lib/libssl/src/fips/fips_locl.h @@ -0,0 +1,67 @@ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifdef OPENSSL_FIPS + +#ifdef __cplusplus +extern "C" { +#endif + +/* These are really defined in crypto/cryptlib.c */ +void fips_set_started(void); +int fips_is_started(void); +int fips_is_owning_thread(void); +int fips_set_owning_thread(void); +int fips_clear_owning_thread(void); +void fips_set_rand_check(void *rand_check); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/lib/libssl/src/fips/fips_test_suite.c b/src/lib/libssl/src/fips/fips_test_suite.c new file mode 100644 index 0000000000..60ee8d856b --- /dev/null +++ b/src/lib/libssl/src/fips/fips_test_suite.c @@ -0,0 +1,341 @@ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * + * This command is intended as a test driver for the FIPS-140 testing + * lab performing FIPS-140 validation. It demonstrates the use of the + * OpenSSL library ito perform a variety of common cryptographic + * functions. A power-up self test is demonstrated by deliberately + * pointing to an invalid executable hash + * + * Contributed by Steve Marquess. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef OPENSSL_FIPS +int main(int argc, char *argv[]) + { + printf("No FIPS support\n"); + return(0); + } +#else + +/* AES: encrypt and decrypt known plaintext, verify result matches original plaintext +*/ +static int FIPS_aes_test() + { + unsigned char userkey[16] = { 0xde, 0xad, 0xbe, 0xef, 0xfe, 0xed, 0xf0, 0x0d }; + unsigned char plaintext[16] = "etaonrishdlcu"; + unsigned char ciphertext[16]; + unsigned char buf[16]; + AES_KEY key; + AES_KEY dkey; + + ERR_clear_error(); + if (AES_set_encrypt_key( userkey, 128, &key )) + return 0; + AES_encrypt( plaintext, ciphertext, &key); + if (AES_set_decrypt_key( userkey, 128, &dkey )) + return 0; + AES_decrypt( ciphertext, buf, &dkey); + if (memcmp(buf, plaintext, sizeof(buf))) + return 0; + return 1; + } + +/* DES: encrypt and decrypt known plaintext, verify result matches original plaintext +*/ +static int FIPS_des_test() + { + DES_cblock userkey = { 0xde, 0xad, 0xbe, 0xef, 0xfe, 0xed, 0xf0, 0x0d }; + DES_cblock plaintext = { 'e', 't', 'a', 'o', 'n', 'r', 'i', 's' }; + + DES_key_schedule key; + DES_cblock ciphertext; + DES_cblock buf; + + ERR_clear_error(); + if (DES_set_key(&userkey, &key) < 0) + return 0; + DES_ecb_encrypt( &plaintext, &ciphertext, &key, 1); + DES_ecb_encrypt( &ciphertext, &buf, &key, 0); + if (memcmp(buf, plaintext, sizeof(buf))) + return 0; + return 1; + } + +/* DSA: generate key and sign a known digest, then verify the signature + * against the digest +*/ +static int FIPS_dsa_test() + { + DSA *dsa = NULL; + unsigned char dgst[] = "etaonrishdlc"; + unsigned char sig[256]; + unsigned int siglen; + + ERR_clear_error(); + dsa = DSA_generate_parameters(512,NULL,0,NULL,NULL,NULL,NULL); + if (!dsa) + return 0; + if (!DSA_generate_key(dsa)) + return 0; + if ( DSA_sign(0,dgst,sizeof(dgst) - 1,sig,&siglen,dsa) != 1 ) + return 0; + if ( DSA_verify(0,dgst,sizeof(dgst) - 1,sig,siglen,dsa) != 1 ) + return 0; + DSA_free(dsa); + return 1; + } + +/* RSA: generate keys and encrypt and decrypt known plaintext, verify result + * matches the original plaintext +*/ +static int FIPS_rsa_test() + { + RSA *key; + unsigned char input_ptext[] = "etaonrishdlc"; + unsigned char ctext[256]; + unsigned char ptext[256]; + int n; + + ERR_clear_error(); + key = RSA_generate_key(1024,65537,NULL,NULL); + if (!key) + return 0; + n = RSA_size(key); + n = RSA_public_encrypt(sizeof(input_ptext) - 1,input_ptext,ctext,key,RSA_PKCS1_PADDING); + if (n < 0) + return 0; + n = RSA_private_decrypt(n,ctext,ptext,key,RSA_PKCS1_PADDING); + if (n < 0) + return 0; + RSA_free(key); + if (memcmp(input_ptext,ptext,sizeof(input_ptext) - 1)) + return 0; + return 1; + } + +/* SHA1: generate hash of known digest value and compare to known + precomputed correct hash +*/ +static int FIPS_sha1_test() + { + unsigned char digest[SHA_DIGEST_LENGTH] = + { 0x11, 0xf1, 0x9a, 0x3a, 0xec, 0x1a, 0x1e, 0x8e, 0x65, 0xd4, 0x9a, 0x38, 0x0c, 0x8b, 0x1e, 0x2c, 0xe8, 0xb3, 0xc5, 0x18 }; + unsigned char str[] = "etaonrishd"; + + unsigned char md[SHA_DIGEST_LENGTH]; + + ERR_clear_error(); + if (!SHA1(str,sizeof(str) - 1,md)) return 0; + if (memcmp(md,digest,sizeof(md))) + return 0; + return 1; + } + +/* MD5: generate hash of known digest value and compare to known + precomputed correct hash +*/ +static int md5_test() + { + unsigned char digest[MD5_DIGEST_LENGTH] = + { 0x48, 0x50, 0xf0, 0xa3, 0x3a, 0xed, 0xd3, 0xaf, 0x6e, 0x47, 0x7f, 0x83, 0x02, 0xb1, 0x09, 0x68 }; + unsigned char str[] = "etaonrishd"; + + unsigned char md[MD5_DIGEST_LENGTH]; + + ERR_clear_error(); + if (!MD5(str,sizeof(str) - 1,md)) + return 0; + if (memcmp(md,digest,sizeof(md))) + return 0; + return 1; + } + +/* DH: generate shared parameters +*/ +static int dh_test() + { + DH *dh; + + ERR_clear_error(); + dh = DH_generate_parameters(256, 2, NULL, NULL); + if (dh) + return 1; + return 0; + } + +/* Zeroize +*/ +static int Zeroize() + { + RSA *key; + unsigned char userkey[16] = + { 0x48, 0x50, 0xf0, 0xa3, 0x3a, 0xed, 0xd3, 0xaf, 0x6e, 0x47, 0x7f, 0x83, 0x02, 0xb1, 0x09, 0x68 }; + int i, n; + + key = RSA_generate_key(1024,65537,NULL,NULL); + if (!key) + return 0; + n = BN_num_bytes(key->d); + printf(" Generated %d byte RSA private key\n", n); + printf("\tBN key before overwriting:\n%s\n", BN_bn2hex(key->d)); + BN_rand(key->d,n*8,-1,0); + printf("\tBN key after overwriting:\n%s\n", BN_bn2hex(key->d)); + + printf("\tchar buffer key before overwriting: \n\t\t"); + for(i = 0; i < sizeof(userkey); i++) printf("%02x", userkey[i]); + printf("\n"); + RAND_bytes(userkey, sizeof userkey); + printf("\tchar buffer key after overwriting: \n\t\t"); + for(i = 0; i < sizeof(userkey); i++) printf("%02x", userkey[i]); + printf("\n"); + + return 1; + } + +static int Error; +const char * Fail(const char *msg) + { + Error++; + return msg; + } + +int main(int argc,char **argv) + { + + printf("\tFIPS-mode test application\n\n"); + + /* Load entropy from external file, if any */ + RAND_load_file(".rnd", 1024); + + if (argv[1]) { + /* Corrupted KAT tests */ + if (!strcmp(argv[1], "aes")) { + FIPS_corrupt_aes(); + printf("3. AES encryption/decryption with corrupted KAT...\n"); + } else if (!strcmp(argv[1], "des")) { + FIPS_corrupt_des(); + printf("5. DES-ECB encryption/decryption with corrupted KAT...\n"); + } else if (!strcmp(argv[1], "dsa")) { + FIPS_corrupt_dsa(); + printf("6. DSA key generation and signature validation with corrupted KAT...\n"); + } else if (!strcmp(argv[1], "rsa")) { + FIPS_corrupt_rsa(); + printf("4. RSA key generation and encryption/decryption with corrupted KAT...\n"); + } else if (!strcmp(argv[1], "sha1")) { + FIPS_corrupt_sha1(); + printf("7. SHA-1 hash with corrupted KAT...\n"); + } else { + printf("Bad argument \"%s\"\n", argv[1]); + exit(1); + } + if (!FIPS_mode_set(1,argv[0])) + { + ERR_load_crypto_strings(); + ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); + printf("Power-up self test failed\n"); + exit(1); + } + printf("Power-up self test successful\n"); + exit(0); + } + + /* Non-Approved cryptographic operation + */ + printf("0. Non-Approved cryptographic operation test...\n"); + printf("\ta. Excluded algorithm (MD5)..."); + printf( md5_test() ? "successful\n" : Fail("FAILED!\n") ); + printf("\tb. Included algorithm (D-H)..."); + printf( dh_test() ? "successful\n" : Fail("FAILED!\n") ); + + /* Power-up self test failure + */ + printf("1. Automatic power-up self test..."); + printf( FIPS_mode_set(1,"/dev/null") ? Fail("passed INCORRECTLY!\n") : "failed as expected\n" ); + + /* Algorithm call when uninitialized failure + */ + printf("\ta. AES API failure on failed power-up self test..."); + printf( FIPS_aes_test() ? Fail("passed INCORRECTLY!\n") :"failed as expected\n" ); + printf("\tb. RSA API failure on failed power-up self test..."); + printf( FIPS_rsa_test() ? Fail("passed INCORRECTLY!\n") : "failed as expected\n" ); + printf("\tc. DES API failure on failed power-up self test..."); + printf( FIPS_des_test() ? Fail("passed INCORRECTLY!\n") : "failed as expected\n" ); + printf("\td. DSA API failure on failed power-up self test..."); + printf( FIPS_dsa_test() ? Fail("passed INCORRECTLY!\n") : "failed as expected\n" ); + printf("\te. SHA1 API failure on failed power-up self test..."); + printf( FIPS_sha1_test() ? Fail("passed INCORRECTLY!\n") : "failed as expected\n" ); + + /* Power-up self test retry + */ + ERR_clear_error(); + printf("2. Automatic power-up self test retry..."); + if (!FIPS_mode_set(1,argv[0])) + { + ERR_load_crypto_strings(); + ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); + printf(Fail("FAILED!\n")); + exit(1); + } + printf("successful\n"); + + /* AES encryption/decryption + */ + printf("3. AES encryption/decryption..."); + printf( FIPS_aes_test() ? "successful\n" : Fail("FAILED!\n") ); + + /* RSA key generation and encryption/decryption + */ + printf("4. RSA key generation and encryption/decryption..."); + printf( FIPS_rsa_test() ? "successful\n" : Fail("FAILED!\n") ); + + /* DES-CBC encryption/decryption + */ + printf("5. DES-ECB encryption/decryption..."); + printf( FIPS_des_test() ? "successful\n" : Fail("FAILED!\n") ); + + /* DSA key generation and signature validation + */ + printf("6. DSA key generation and signature validation..."); + printf( FIPS_dsa_test() ? "successful\n" : Fail("FAILED!\n") ); + + /* SHA-1 hash + */ + printf("7. SHA-1 hash..."); + printf( FIPS_sha1_test() ? "successful\n" : Fail("FAILED!\n") ); + + /* Non-Approved cryptographic operation + */ + printf("8. Non-Approved cryptographic operation test...\n"); + printf("\ta. Excluded algorithm (MD5)..."); + printf( md5_test() ? Fail("passed INCORRECTLY!\n") + : "failed as expected\n" ); + printf("\tb. Included algorithm (D-H)..."); + printf( dh_test() ? "successful as expected\n" + : Fail("failed INCORRECTLY!\n") ); + + /* Zeroization + */ + printf("9. Zero-ization...\n"); + Zeroize(); + + printf("\nAll tests completed with %d errors\n", Error); + return 0; + } +#endif diff --git a/src/lib/libssl/src/fips/install.com b/src/lib/libssl/src/fips/install.com new file mode 100644 index 0000000000..aa19f0599d --- /dev/null +++ b/src/lib/libssl/src/fips/install.com @@ -0,0 +1,55 @@ +$! INSTALL.COM -- Installs the files in a given directory tree +$! +$! Author: Richard Levitte +$! Time of creation: 27-MAY-2004 11:47 +$! +$! P1 root of the directory tree +$! +$ IF P1 .EQS. "" +$ THEN +$ WRITE SYS$OUTPUT "First argument missing." +$ WRITE SYS$OUTPUT "Should be the directory where you want things installed." +$ EXIT +$ ENDIF +$ +$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0" +$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY") +$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") - + - "[000000." - "][" - "[" - "]" +$ ROOT = ROOT_DEV + "[" + ROOT_DIR +$ +$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC +$ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE] +$ +$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN - + CREATE/DIR/LOG WRK_SSLROOT:[000000] +$ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN - + CREATE/DIR/LOG WRK_SSLINCLUDE: +$ +$ FDIRS := ,RAND,SHA1,DES,AES,DSA,RSA +$ EXHEADER_ := fips.h +$ EXHEADER_SHA1 := +$ EXHEADER_RAND := fips_rand.h +$ EXHEADER_DES := +$ EXHEADER_AES := +$ EXHEADER_DSA := +$ EXHEADER_RSA := +$ +$ I = 0 +$ LOOP_FDIRS: +$ D = F$EDIT(F$ELEMENT(I, ",", FDIRS),"TRIM") +$ I = I + 1 +$ IF D .EQS. "," THEN GOTO LOOP_FDIRS_END +$ tmp = EXHEADER_'D' +$ IF tmp .EQS. "" THEN GOTO LOOP_FDIRS +$ IF D .EQS. "" +$ THEN +$ COPY 'tmp' WRK_SSLINCLUDE: /LOG +$ ELSE +$ COPY [.'D']'tmp' WRK_SSLINCLUDE: /LOG +$ ENDIF +$ SET FILE/PROT=WORLD:RE WRK_SSLINCLUDE:'tmp' +$ GOTO LOOP_FDIRS +$ LOOP_FDIRS_END: +$ +$ EXIT diff --git a/src/lib/libssl/src/fips/openssl_fips_fingerprint b/src/lib/libssl/src/fips/openssl_fips_fingerprint new file mode 100755 index 0000000000..d3dfb7eb61 --- /dev/null +++ b/src/lib/libssl/src/fips/openssl_fips_fingerprint @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Check the library fingerprint and generate an executable fingerprint, or +# return an error + +lib=$1 +exe=$2 + +# deal with the case where we're run from within the build and OpenSSL is +# not yet installed. Also, make sure LD_LIBRARY_PATH is properly set in +# case shared libraries are built. +if [ "X$TOP" != "X" ] +then + if test "$OSTYPE" = msdosdjgpp; then + PATH="$TOP/apps;$TOP;$PATH" + else + PATH="$TOP/apps:$TOP:$PATH" + fi + LD_LIBRARY_PATH=$TOP; export LD_LIBRARY_PATH +else + LD_LIBRARY_PATH=.; export LD_LIBRARY_PATH +fi + +echo "Checking library fingerprint for $lib" +openssl sha1 -hmac etaonrishdlcupfm $lib | sed "s/(.*\//(/" | diff -w $lib.sha1 - || { echo "$libs fingerprint mismatch"; exit 1; } + +[ -x $exe.exe ] && exe=$exe.exe + +echo "Making fingerprint for $exe" +openssl sha1 -hmac etaonrishdlcupfm -binary $exe > $exe.sha1 || rm $exe.sha1 diff --git a/src/lib/libssl/src/fips/rand/Makefile b/src/lib/libssl/src/fips/rand/Makefile new file mode 100644 index 0000000000..c8922abc77 --- /dev/null +++ b/src/lib/libssl/src/fips/rand/Makefile @@ -0,0 +1,104 @@ +# +# SSLeay/fips/rand/Makefile +# + +DIR= rand +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= fips_randtest.c +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=fips_rand.c +LIBOBJ=fips_rand.o + +SRC= $(LIBSRC) + +EXHEADER= fips_rand.h +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd $(TOP); $(MAKE) DIRS=fips SDIRS=$(DIR) sub_all) + +all: check lib + +check: + TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @sleep 2; touch lib + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +fips_rand.o: ../../e_os.h ../../include/openssl/bio.h +fips_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +fips_rand.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +fips_rand.o: ../../include/openssl/err.h ../../include/openssl/fips_rand.h +fips_rand.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +fips_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +fips_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h +fips_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fips_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +fips_rand.o: fips_rand.c +fips_randtest.o: ../../e_os.h ../../include/openssl/bio.h +fips_randtest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +fips_randtest.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h +fips_randtest.o: ../../include/openssl/err.h ../../include/openssl/fips_rand.h +fips_randtest.o: ../../include/openssl/lhash.h +fips_randtest.o: ../../include/openssl/opensslconf.h +fips_randtest.o: ../../include/openssl/opensslv.h +fips_randtest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +fips_randtest.o: ../../include/openssl/safestack.h +fips_randtest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fips_randtest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +fips_randtest.o: fips_randtest.c diff --git a/src/lib/libssl/src/fips/rand/fips_rand.c b/src/lib/libssl/src/fips/rand/fips_rand.c new file mode 100644 index 0000000000..cc2f12deb9 --- /dev/null +++ b/src/lib/libssl/src/fips/rand/fips_rand.c @@ -0,0 +1,355 @@ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + * This is a FIPS approved PRNG, ANSI X9.31 A.2.4. + */ + +#include "e_os.h" + +/* If we don't define _XOPEN_SOURCE_EXTENDED, struct timeval won't + be defined and gettimeofday() won't be declared with strict compilers + like DEC C in ANSI C mode. */ +#ifndef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED 1 +#endif + +#include +#include +#include +#include +#ifndef OPENSSL_SYS_WIN32 +#include +#endif +#include +#ifndef OPENSSL_SYS_WIN32 +# ifdef OPENSSL_UNISTD +# include OPENSSL_UNISTD +# else +# include +# endif +#endif +#include + +#ifdef OPENSSL_FIPS + +#define SEED_SIZE 8 + +static unsigned char seed[SEED_SIZE]; +static FIPS_RAND_SIZE_T n_seed; +static FIPS_RAND_SIZE_T o_seed; +static DES_cblock key1; +static DES_cblock key2; +static DES_key_schedule ks1,ks2; +static int key_set; +static int test_mode; +static unsigned char test_faketime[8]; + +#ifndef GETPID_IS_MEANINGLESS +static int seed_pid; +static int key_pid; +#endif + +static void fips_rand_cleanup(void); +static void fips_rand_add(const void *buf, FIPS_RAND_SIZE_T num, double add_entropy); +static int fips_rand_bytes(unsigned char *buf, FIPS_RAND_SIZE_T num); +static int fips_rand_status(void); + +static RAND_METHOD rand_fips_meth= + { + FIPS_rand_seed, + fips_rand_bytes, + fips_rand_cleanup, + fips_rand_add, + fips_rand_bytes, + fips_rand_status + }; + +static int second; + +RAND_METHOD *FIPS_rand_method(void) +{ + return &rand_fips_meth; +} + +void FIPS_set_prng_key(const unsigned char k1[8],const unsigned char k2[8]) + { + memcpy(&key1,k1,sizeof key1); + memcpy(&key2,k2,sizeof key2); + key_set=1; +#ifndef GETPID_IS_MEANINGLESS + key_pid=getpid(); +#endif + second=0; + } + +void FIPS_test_mode(int test,const unsigned char faketime[8]) + { + test_mode=test; + if(!test_mode) + return; + memcpy(test_faketime,faketime,sizeof test_faketime); + } + +/* NB: this returns true if _partially_ seeded */ +int FIPS_rand_seeded() + { return key_set || n_seed; } + +static void fips_gettime(unsigned char buf[8]) + { +#ifdef OPENSSL_SYS_WIN32 + FILETIME ft; +#else + struct timeval tv; +#endif + + if(test_mode) + { + fprintf(stderr,"WARNING!!! PRNG IN TEST MODE!!!\n"); + memcpy(buf,test_faketime,sizeof test_faketime); + return; + } +#ifdef OPENSSL_SYS_WIN32 + GetSystemTimeAsFileTime(&ft); + buf[0] = (unsigned char) (ft.dwHighDateTime & 0xff); + buf[1] = (unsigned char) ((ft.dwHighDateTime >> 8) & 0xff); + buf[2] = (unsigned char) ((ft.dwHighDateTime >> 16) & 0xff); + buf[3] = (unsigned char) ((ft.dwHighDateTime >> 24) & 0xff); + buf[4] = (unsigned char) (ft.dwLowDateTime & 0xff); + buf[5] = (unsigned char) ((ft.dwLowDateTime >> 8) & 0xff); + buf[6] = (unsigned char) ((ft.dwLowDateTime >> 16) & 0xff); + buf[7] = (unsigned char) ((ft.dwLowDateTime >> 24) & 0xff); +#else + gettimeofday(&tv,NULL); + buf[0] = (unsigned char) (tv.tv_sec & 0xff); + buf[1] = (unsigned char) ((tv.tv_sec >> 8) & 0xff); + buf[2] = (unsigned char) ((tv.tv_sec >> 16) & 0xff); + buf[3] = (unsigned char) ((tv.tv_sec >> 24) & 0xff); + buf[4] = (unsigned char) (tv.tv_usec & 0xff); + buf[5] = (unsigned char) ((tv.tv_usec >> 8) & 0xff); + buf[6] = (unsigned char) ((tv.tv_usec >> 16) & 0xff); + buf[7] = (unsigned char) ((tv.tv_usec >> 24) & 0xff); +#endif + +#if 0 /* This eminently sensible strategy is not acceptable to NIST. Sigh. */ +#ifndef GETPID_IS_MEANINGLESS + /* we mix in the PID to ensure that after a fork the children don't give + * the same results as each other + */ + pid=getpid(); + /* make sure we shift the pid to the MSB */ + if((pid&0xffff0000) == 0) + pid<<=16; + *(long *)&buf[0]^=pid; +#endif +#endif + } + +static void fips_rand_encrypt(unsigned char *out,const unsigned char *in) + { + DES_ecb2_encrypt(in,out,&ks1,&ks2,1); + } + +static void fips_rand_cleanup(void) + { + OPENSSL_cleanse(seed,sizeof seed); + n_seed=0; + } + +void FIPS_rand_seed(const void *buf_, FIPS_RAND_SIZE_T num) + { + const char *buf=buf_; + FIPS_RAND_SIZE_T n; + static int init; + + /* If the key hasn't been set, we can't seed! */ + if(!key_set) + return; + + CRYPTO_w_lock(CRYPTO_LOCK_RAND); + if(!init) + { + init=1; + DES_set_key(&key1,&ks1); + DES_set_key(&key2,&ks2); + } + + /* + * This algorithm only uses 64 bits of seed, so ensure that we use + * the most recent 64 bits. + */ + for(n=0 ; n < num ; ) + { + FIPS_RAND_SIZE_T t=num-n; + + if(o_seed+t > sizeof seed) + t=sizeof seed-o_seed; + memcpy(seed+o_seed,buf+n,t); + n+=t; + o_seed+=t; + if(o_seed == sizeof seed) + o_seed=0; + if(n_seed < sizeof seed) + n_seed+=t; + } + +#ifndef GETPID_IS_MEANINGLESS + seed_pid=getpid(); +#endif + + CRYPTO_w_unlock(CRYPTO_LOCK_RAND); + } + +static void fips_rand_add(const void *buf, FIPS_RAND_SIZE_T num, double add_entropy) + { + FIPS_rand_seed(buf,num); + } + +static int fips_rand_bytes(unsigned char *buf,FIPS_RAND_SIZE_T num) + { + FIPS_RAND_SIZE_T n; + unsigned char timeseed[8]; + unsigned char intermediate[SEED_SIZE]; + unsigned char output[SEED_SIZE]; + static unsigned char previous[SEED_SIZE]; +#ifndef GETPID_IS_MEANINGLESS + int pid; +#endif + + if(n_seed < sizeof seed) + { + RANDerr(RAND_F_FIPS_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED); + return 0; + } + +#ifdef FIPS_RAND_MAX_SIZE_T + if (num > FIPS_RAND_MAX_SIZE_T) + { +#ifdef RAND_R_PRNG_ASKING_FOR_TOO_MUCH + RANDerr(RAND_F_FIPS_RAND_BYTES,RAND_R_PRNG_ASKING_FOR_TOO_MUCH); + return 0; +#else + return -1; /* signal "not supported" condition */ +#endif + } +#endif + +#ifndef GETPID_IS_MEANINGLESS + pid=getpid(); + if(pid != seed_pid) + { + RANDerr(RAND_F_FIPS_RAND_BYTES,RAND_R_PRNG_NOT_RESEEDED); + return 0; + } + if(pid != key_pid) + { + RANDerr(RAND_F_FIPS_RAND_BYTES,RAND_R_PRNG_NOT_REKEYED); + return 0; + } +#endif + + CRYPTO_w_lock(CRYPTO_LOCK_RAND); + + for(n=0 ; n < num ; ) + { + unsigned char t[SEED_SIZE]; + FIPS_RAND_SIZE_T l; + + /* ANS X9.31 A.2.4: I = ede*K(DT) + timeseed == DT + intermediate == I + */ + fips_gettime(timeseed); + fips_rand_encrypt(intermediate,timeseed); + + /* ANS X9.31 A.2.4: R = ede*K(I^V) + intermediate == I + seed == V + output == R + */ + for(l=0 ; l < sizeof t ; ++l) + t[l]=intermediate[l]^seed[l]; + fips_rand_encrypt(output,t); + + /* ANS X9.31 A.2.4: V = ede*K(R^I) + output == R + intermediate == I + seed == V + */ + for(l=0 ; l < sizeof t ; ++l) + t[l]=output[l]^intermediate[l]; + fips_rand_encrypt(seed,t); + + if(second && !memcmp(output,previous,sizeof previous)) + { + RANDerr(RAND_F_FIPS_RAND_BYTES,RAND_R_PRNG_STUCK); + CRYPTO_w_unlock(CRYPTO_LOCK_RAND); + return 0; + } + memcpy(previous,output,sizeof previous); + second=1; + + /* Successive values of R may be concatenated to produce a + pseudo random number of the desired length */ + l=SEED_SIZE < num-n ? SEED_SIZE : num-n; + memcpy(buf+n,output,l); + n+=l; + } + + CRYPTO_w_unlock(CRYPTO_LOCK_RAND); + + return 1; + } + +static int fips_rand_status(void) + { + return n_seed == sizeof seed; + } + +#endif /* OPENSSL_FIPS */ diff --git a/src/lib/libssl/src/fips/rand/fips_rand.h b/src/lib/libssl/src/fips/rand/fips_rand.h new file mode 100644 index 0000000000..1286b63ab2 --- /dev/null +++ b/src/lib/libssl/src/fips/rand/fips_rand.h @@ -0,0 +1,73 @@ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef HEADER_FIPS_RAND_H +#define HEADER_FIPS_RAND_H + +#include "des.h" + +#ifdef OPENSSL_FIPS + +#ifdef __cplusplus +extern "C" { +#endif + +void FIPS_set_prng_key(const unsigned char k1[8],const unsigned char k2[8]); +void FIPS_test_mode(int test,const unsigned char faketime[8]); +void FIPS_rand_seed(const void *buf, FIPS_RAND_SIZE_T num); +/* NB: this returns true if _partially_ seeded */ +int FIPS_rand_seeded(void); + +RAND_METHOD *FIPS_rand_method(void); + +#ifdef __cplusplus +} +#endif +#endif +#endif diff --git a/src/lib/libssl/src/fips/rand/fips_randtest.c b/src/lib/libssl/src/fips/rand/fips_randtest.c new file mode 100644 index 0000000000..6165944e56 --- /dev/null +++ b/src/lib/libssl/src/fips/rand/fips_randtest.c @@ -0,0 +1,369 @@ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include + +#include "e_os.h" + +#ifndef OPENSSL_FIPS +int main(int argc, char *argv[]) +{ + printf("No FIPS RAND support\n"); + return(0); +} + +#else + +/* some FIPS 140-1 random number test */ +/* some simple tests */ + +static DES_cblock prng_key1={0x21,0x58,0x47,0xb7,0xc2,0x97,0x5a,0x8e}; +static DES_cblock prng_key2={0x61,0x23,0x05,0x96,0x18,0x91,0x86,0xac}; +static unsigned char prng_seed[8]={0x6b,0xa3,0x4f,0x07,0xe4,0x2a,0xb0,0xc}; + +typedef struct + { + DES_cblock keys[2]; + const unsigned char time[8]; + const unsigned char seed[8]; + const unsigned char block1[8]; + const unsigned char block100[8]; + } PRNGtest; + +/* FIXME: these test vectors are made up! */ +static PRNGtest t1= + { + { { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 }, + { 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }, + }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x33,0xc3,0xdf,0xfe,0x60,0x60,0x49,0x9e }, + { 0xcd,0x2b,0x41,0xaf,0x80,0x51,0x37,0xd8 } + }; +static PRNGtest t2= + { + { { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }, + { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff } }, + { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }, + { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }, + { 0x65,0xf1,0xa4,0x07,0x42,0x38,0xd5,0x25 }, + { 0xbb,0x75,0x84,0x20,0x7a,0x44,0xf0,0xa0 } + }; + +static void dump(const unsigned char *b,int n) + { + while(n-- > 0) + { + printf(" %02x",*b++); + } + } + +static void compare(const unsigned char *result,const unsigned char *expected, + int n) + { + int i; + + for(i=0 ; i < n ; ++i) + if(result[i] != expected[i]) + { + puts("Random test failed, got:"); + dump(result,8); + puts("\n expected:"); + dump(expected,8); + putchar('\n'); + EXIT(1); + } + } + +static void run_test(const PRNGtest *t) + { + unsigned char buf[8]; + int n; + + FIPS_set_prng_key(t->keys[0],t->keys[1]); + FIPS_test_mode(1,t->time); + RAND_seed(t->seed,sizeof t->seed); + + if(RAND_bytes(buf,8) <= 0) + { + ERR_print_errors_fp(stderr); + EXIT(2); + } + compare(buf,t->block1,8); + for(n=0 ; n < 99 ; ++n) + if(RAND_bytes(buf,8) <= 0) + { + ERR_print_errors_fp(stderr); + EXIT(2); + } + compare(buf,t->block100,8); + FIPS_test_mode(0,NULL); + } + +int main() + { + unsigned char buf[2500]; + int i,j,k,s,sign,nsign,err=0; + unsigned long n1; + unsigned long n2[16]; + unsigned long runs[2][34]; + /*double d; */ + long d; + + ERR_load_crypto_strings(); + RAND_set_rand_method(FIPS_rand_method()); + + run_test(&t1); + run_test(&t2); + + FIPS_set_prng_key(prng_key1,prng_key2); + RAND_seed(prng_seed,sizeof prng_seed); + + i = RAND_pseudo_bytes(buf,2500); + if (i <= 0) + { + printf ("init failed, the rand method is not properly installed\n"); + err++; + goto err; + } + + n1=0; + for (i=0; i<16; i++) n2[i]=0; + for (i=0; i<34; i++) runs[0][i]=runs[1][i]=0; + + /* test 1 and 2 */ + sign=0; + nsign=0; + for (i=0; i<2500; i++) + { + j=buf[i]; + + n2[j&0x0f]++; + n2[(j>>4)&0x0f]++; + + for (k=0; k<8; k++) + { + s=(j&0x01); + if (s == sign) + nsign++; + else + { + if (nsign > 34) nsign=34; + if (nsign != 0) + { + runs[sign][nsign-1]++; + if (nsign > 6) + runs[sign][5]++; + } + sign=s; + nsign=1; + } + + if (s) n1++; + j>>=1; + } + } + if (nsign > 34) nsign=34; + if (nsign != 0) runs[sign][nsign-1]++; + + /* test 1 */ + if (!((9654 < n1) && (n1 < 10346))) + { + printf("test 1 failed, X=%lu\n",n1); + err++; + } + printf("test 1 done\n"); + + /* test 2 */ +#ifdef undef + d=0; + for (i=0; i<16; i++) + d+=n2[i]*n2[i]; + d=d*16.0/5000.0-5000.0; + if (!((1.03 < d) && (d < 57.4))) + { + printf("test 2 failed, X=%.2f\n",d); + err++; + } +#endif + d=0; + for (i=0; i<16; i++) + d+=n2[i]*n2[i]; + d=(d*8)/25-500000; + if (!((103 < d) && (d < 5740))) + { + printf("test 2 failed, X=%ld.%02ld\n",d/100L,d%100L); + err++; + } + printf("test 2 done\n"); + + /* test 3 */ + for (i=0; i<2; i++) + { + if (!((2267 < runs[i][0]) && (runs[i][0] < 2733))) + { + printf("test 3 failed, bit=%d run=%d num=%lu\n", + i,1,runs[i][0]); + err++; + } + if (!((1079 < runs[i][1]) && (runs[i][1] < 1421))) + { + printf("test 3 failed, bit=%d run=%d num=%lu\n", + i,2,runs[i][1]); + err++; + } + if (!(( 502 < runs[i][2]) && (runs[i][2] < 748))) + { + printf("test 3 failed, bit=%d run=%d num=%lu\n", + i,3,runs[i][2]); + err++; + } + if (!(( 223 < runs[i][3]) && (runs[i][3] < 402))) + { + printf("test 3 failed, bit=%d run=%d num=%lu\n", + i,4,runs[i][3]); + err++; + } + if (!(( 90 < runs[i][4]) && (runs[i][4] < 223))) + { + printf("test 3 failed, bit=%d run=%d num=%lu\n", + i,5,runs[i][4]); + err++; + } + if (!(( 90 < runs[i][5]) && (runs[i][5] < 223))) + { + printf("test 3 failed, bit=%d run=%d num=%lu\n", + i,6,runs[i][5]); + err++; + } + } + printf("test 3 done\n"); + + /* test 4 */ + if (runs[0][33] != 0) + { + printf("test 4 failed, bit=%d run=%d num=%lu\n", + 0,34,runs[0][33]); + err++; + } + if (runs[1][33] != 0) + { + printf("test 4 failed, bit=%d run=%d num=%lu\n", + 1,34,runs[1][33]); + err++; + } + printf("test 4 done\n"); + err: + err=((err)?1:0); + EXIT(err); + return(err); + } + +#endif diff --git a/src/lib/libssl/src/fips/rsa/Makefile b/src/lib/libssl/src/fips/rsa/Makefile new file mode 100644 index 0000000000..bb20f86442 --- /dev/null +++ b/src/lib/libssl/src/fips/rsa/Makefile @@ -0,0 +1,111 @@ +# +# SSLeay/fips/rsa/Makefile +# + +DIR= rsa +TOP= ../.. +CC= cc +INCLUDES= +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile +TEST= +APPS= + +LIB=$(TOP)/libcrypto.a +LIBSRC=fips_rsa_eay.c fips_rsa_gen.c fips_rsa_selftest.c +LIBOBJ=fips_rsa_eay.o fips_rsa_gen.o fips_rsa_selftest.o + +SRC= $(LIBSRC) + +EXHEADER= +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) sub_all) + +all: check lib + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @sleep 2; touch lib + +check: + TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff +# DO NOT DELETE THIS LINE -- make depend depends on it. + +fips_rsa_eay.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +fips_rsa_eay.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +fips_rsa_eay.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +fips_rsa_eay.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +fips_rsa_eay.o: ../../include/openssl/opensslconf.h +fips_rsa_eay.o: ../../include/openssl/opensslv.h +fips_rsa_eay.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +fips_rsa_eay.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +fips_rsa_eay.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +fips_rsa_eay.o: fips_rsa_eay.c +fips_rsa_gen.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +fips_rsa_gen.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +fips_rsa_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +fips_rsa_gen.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +fips_rsa_gen.o: ../../include/openssl/opensslconf.h +fips_rsa_gen.o: ../../include/openssl/opensslv.h +fips_rsa_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h +fips_rsa_gen.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +fips_rsa_gen.o: ../../include/openssl/symhacks.h fips_rsa_gen.c +fips_rsa_selftest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +fips_rsa_selftest.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +fips_rsa_selftest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +fips_rsa_selftest.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h +fips_rsa_selftest.o: ../../include/openssl/opensslconf.h +fips_rsa_selftest.o: ../../include/openssl/opensslv.h +fips_rsa_selftest.o: ../../include/openssl/ossl_typ.h +fips_rsa_selftest.o: ../../include/openssl/rsa.h +fips_rsa_selftest.o: ../../include/openssl/safestack.h +fips_rsa_selftest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +fips_rsa_selftest.o: ../../include/openssl/symhacks.h fips_rsa_selftest.c diff --git a/src/lib/libssl/src/fips/rsa/fips_rsa_eay.c b/src/lib/libssl/src/fips/rsa/fips_rsa_eay.c new file mode 100644 index 0000000000..c571e2b1bf --- /dev/null +++ b/src/lib/libssl/src/fips/rsa/fips_rsa_eay.c @@ -0,0 +1,735 @@ +/* crypto/rsa/rsa_eay.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include +#include +#include +#include +#include + +#if !defined(RSA_NULL) && defined(OPENSSL_FIPS) + +static int RSA_eay_public_encrypt(FIPS_RSA_SIZE_T flen, const unsigned char *from, + unsigned char *to, RSA *rsa,int padding); +static int RSA_eay_private_encrypt(FIPS_RSA_SIZE_T flen, const unsigned char *from, + unsigned char *to, RSA *rsa,int padding); +static int RSA_eay_public_decrypt(FIPS_RSA_SIZE_T flen, const unsigned char *from, + unsigned char *to, RSA *rsa,int padding); +static int RSA_eay_private_decrypt(FIPS_RSA_SIZE_T flen, const unsigned char *from, + unsigned char *to, RSA *rsa,int padding); +static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *i, RSA *rsa); +static int RSA_eay_init(RSA *rsa); +static int RSA_eay_finish(RSA *rsa); +static RSA_METHOD rsa_pkcs1_eay_meth={ + "Eric Young's PKCS#1 RSA", + RSA_eay_public_encrypt, + RSA_eay_public_decrypt, /* signature verification */ + RSA_eay_private_encrypt, /* signing */ + RSA_eay_private_decrypt, + RSA_eay_mod_exp, + BN_mod_exp_mont, /* XXX probably we should not use Montgomery if e == 3 */ + RSA_eay_init, + RSA_eay_finish, + 0, /* flags */ + NULL, + 0, /* rsa_sign */ + 0 /* rsa_verify */ + }; + +const RSA_METHOD *RSA_PKCS1_SSLeay(void) + { + return(&rsa_pkcs1_eay_meth); + } + +static int RSA_eay_public_encrypt(FIPS_RSA_SIZE_T flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding) + { + BIGNUM f,ret; + int i,j,k,num=0,r= -1; + unsigned char *buf=NULL; + BN_CTX *ctx=NULL; + + BN_init(&f); + BN_init(&ret); + + if(FIPS_selftest_failed()) + { + FIPSerr(FIPS_F_RSA_EAY_PUBLIC_ENCRYPT,FIPS_R_FIPS_SELFTEST_FAILED); + goto err; + } + + if ((ctx=BN_CTX_new()) == NULL) goto err; + num=BN_num_bytes(rsa->n); + if ((buf=(unsigned char *)OPENSSL_malloc(num)) == NULL) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT,ERR_R_MALLOC_FAILURE); + goto err; + } + + switch (padding) + { + case RSA_PKCS1_PADDING: + i=RSA_padding_add_PKCS1_type_2(buf,num,from,flen); + break; +#ifndef OPENSSL_NO_SHA + case RSA_PKCS1_OAEP_PADDING: + i=RSA_padding_add_PKCS1_OAEP(buf,num,from,flen,NULL,0); + break; +#endif + case RSA_SSLV23_PADDING: + i=RSA_padding_add_SSLv23(buf,num,from,flen); + break; + case RSA_NO_PADDING: + i=RSA_padding_add_none(buf,num,from,flen); + break; + default: + RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT,RSA_R_UNKNOWN_PADDING_TYPE); + goto err; + } + if (i <= 0) goto err; + + if (BN_bin2bn(buf,num,&f) == NULL) goto err; + + if (BN_ucmp(&f, rsa->n) >= 0) + { + /* usually the padding functions would catch this */ + RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT,RSA_R_DATA_TOO_LARGE_FOR_MODULUS); + goto err; + } + + if ((rsa->_method_mod_n == NULL) && (rsa->flags & RSA_FLAG_CACHE_PUBLIC)) + { + BN_MONT_CTX* bn_mont_ctx; + if ((bn_mont_ctx=BN_MONT_CTX_new()) == NULL) + goto err; + if (!BN_MONT_CTX_set(bn_mont_ctx,rsa->n,ctx)) + { + BN_MONT_CTX_free(bn_mont_ctx); + goto err; + } + if (rsa->_method_mod_n == NULL) /* other thread may have finished first */ + { + CRYPTO_w_lock(CRYPTO_LOCK_RSA); + if (rsa->_method_mod_n == NULL) + { + rsa->_method_mod_n = bn_mont_ctx; + bn_mont_ctx = NULL; + } + CRYPTO_w_unlock(CRYPTO_LOCK_RSA); + } + if (bn_mont_ctx) + BN_MONT_CTX_free(bn_mont_ctx); + } + + if (!rsa->meth->bn_mod_exp(&ret,&f,rsa->e,rsa->n,ctx, + rsa->_method_mod_n)) goto err; + + /* put in leading 0 bytes if the number is less than the + * length of the modulus */ + j=BN_num_bytes(&ret); + i=BN_bn2bin(&ret,&(to[num-j])); + for (k=0; k<(num-i); k++) + to[k]=0; + + r=num; +err: + if (ctx != NULL) BN_CTX_free(ctx); + BN_clear_free(&f); + BN_clear_free(&ret); + if (buf != NULL) + { + OPENSSL_cleanse(buf,num); + OPENSSL_free(buf); + } + return(r); + } + +static int rsa_eay_blinding(RSA *rsa, BN_CTX *ctx) + { + int ret = 1; + CRYPTO_w_lock(CRYPTO_LOCK_RSA); + /* Check again inside the lock - the macro's check is racey */ + if(rsa->blinding == NULL) + ret = RSA_blinding_on(rsa, ctx); + CRYPTO_w_unlock(CRYPTO_LOCK_RSA); + return ret; + } + +#define BLINDING_HELPER(rsa, ctx, err_instr) \ + do { \ + if((!((rsa)->flags & RSA_FLAG_NO_BLINDING)) && \ + ((rsa)->blinding == NULL) && \ + !rsa_eay_blinding(rsa, ctx)) \ + err_instr \ + } while(0) + +static BN_BLINDING *setup_blinding(RSA *rsa, BN_CTX *ctx) + { + BIGNUM *A, *Ai; + BN_BLINDING *ret = NULL; + + /* added in OpenSSL 0.9.6j and 0.9.7b */ + + /* NB: similar code appears in RSA_blinding_on (rsa_lib.c); + * this should be placed in a new function of its own, but for reasons + * of binary compatibility can't */ + + BN_CTX_start(ctx); + A = BN_CTX_get(ctx); + if ((RAND_status() == 0) && rsa->d != NULL && rsa->d->d != NULL) + { + /* if PRNG is not properly seeded, resort to secret exponent as unpredictable seed */ + RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0); + if (!BN_pseudo_rand_range(A,rsa->n)) goto err; + } + else + { + if (!BN_rand_range(A,rsa->n)) goto err; + } + if ((Ai=BN_mod_inverse(NULL,A,rsa->n,ctx)) == NULL) goto err; + + if (!rsa->meth->bn_mod_exp(A,A,rsa->e,rsa->n,ctx,rsa->_method_mod_n)) + goto err; + ret = BN_BLINDING_new(A,Ai,rsa->n); + BN_free(Ai); +err: + BN_CTX_end(ctx); + return ret; + } + +/* signing */ +static int RSA_eay_private_encrypt(FIPS_RSA_SIZE_T flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding) + { + BIGNUM f,ret; + int i,j,k,num=0,r= -1; + unsigned char *buf=NULL; + BN_CTX *ctx=NULL; + int local_blinding = 0; + BN_BLINDING *blinding = NULL; + + BN_init(&f); + BN_init(&ret); + + if ((ctx=BN_CTX_new()) == NULL) goto err; + num=BN_num_bytes(rsa->n); + if ((buf=(unsigned char *)OPENSSL_malloc(num)) == NULL) + { + RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT,ERR_R_MALLOC_FAILURE); + goto err; + } + + switch (padding) + { + case RSA_PKCS1_PADDING: + i=RSA_padding_add_PKCS1_type_1(buf,num,from,flen); + break; + case RSA_NO_PADDING: + i=RSA_padding_add_none(buf,num,from,flen); + break; + case RSA_SSLV23_PADDING: + default: + RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT,RSA_R_UNKNOWN_PADDING_TYPE); + goto err; + } + if (i <= 0) goto err; + + if (BN_bin2bn(buf,num,&f) == NULL) goto err; + + if (BN_ucmp(&f, rsa->n) >= 0) + { + /* usually the padding functions would catch this */ + RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT,RSA_R_DATA_TOO_LARGE_FOR_MODULUS); + goto err; + } + + BLINDING_HELPER(rsa, ctx, goto err;); + blinding = rsa->blinding; + + /* Now unless blinding is disabled, 'blinding' is non-NULL. + * But the BN_BLINDING object may be owned by some other thread + * (we don't want to keep it constant and we don't want to use + * lots of locking to avoid race conditions, so only a single + * thread can use it; other threads have to use local blinding + * factors) */ + if (!(rsa->flags & RSA_FLAG_NO_BLINDING)) + { + if (blinding == NULL) + { + RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT, ERR_R_INTERNAL_ERROR); + goto err; + } + } + + if (blinding != NULL) + { + if (blinding->thread_id != CRYPTO_thread_id()) + { + /* we need a local one-time blinding factor */ + + blinding = setup_blinding(rsa, ctx); + if (blinding == NULL) + goto err; + local_blinding = 1; + } + } + + if (blinding) + if (!BN_BLINDING_convert(&f, blinding, ctx)) goto err; + + if ( (rsa->flags & RSA_FLAG_EXT_PKEY) || + ((rsa->p != NULL) && + (rsa->q != NULL) && + (rsa->dmp1 != NULL) && + (rsa->dmq1 != NULL) && + (rsa->iqmp != NULL)) ) + { if (!rsa->meth->rsa_mod_exp(&ret,&f,rsa)) goto err; } + else + { + if (!rsa->meth->bn_mod_exp(&ret,&f,rsa->d,rsa->n,ctx,NULL)) goto err; + } + + if (blinding) + if (!BN_BLINDING_invert(&ret, blinding, ctx)) goto err; + + /* put in leading 0 bytes if the number is less than the + * length of the modulus */ + j=BN_num_bytes(&ret); + i=BN_bn2bin(&ret,&(to[num-j])); + for (k=0; k<(num-i); k++) + to[k]=0; + + r=num; +err: + if (ctx != NULL) BN_CTX_free(ctx); + BN_clear_free(&ret); + BN_clear_free(&f); + if (local_blinding) + BN_BLINDING_free(blinding); + if (buf != NULL) + { + OPENSSL_cleanse(buf,num); + OPENSSL_free(buf); + } + return(r); + } + +static int RSA_eay_private_decrypt(FIPS_RSA_SIZE_T flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding) + { + BIGNUM f,ret; + int j,num=0,r= -1; + unsigned char *p; + unsigned char *buf=NULL; + BN_CTX *ctx=NULL; + int local_blinding = 0; + BN_BLINDING *blinding = NULL; + + BN_init(&f); + BN_init(&ret); + ctx=BN_CTX_new(); + if (ctx == NULL) goto err; + + num=BN_num_bytes(rsa->n); + + if ((buf=(unsigned char *)OPENSSL_malloc(num)) == NULL) + { + RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT,ERR_R_MALLOC_FAILURE); + goto err; + } + + /* This check was for equality but PGP does evil things + * and chops off the top '0' bytes */ + if (flen > num) + { + RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT,RSA_R_DATA_GREATER_THAN_MOD_LEN); + goto err; + } + + /* make data into a big number */ + if (BN_bin2bn(from,(int)flen,&f) == NULL) goto err; + + if (BN_ucmp(&f, rsa->n) >= 0) + { + RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT,RSA_R_DATA_TOO_LARGE_FOR_MODULUS); + goto err; + } + + BLINDING_HELPER(rsa, ctx, goto err;); + blinding = rsa->blinding; + + /* Now unless blinding is disabled, 'blinding' is non-NULL. + * But the BN_BLINDING object may be owned by some other thread + * (we don't want to keep it constant and we don't want to use + * lots of locking to avoid race conditions, so only a single + * thread can use it; other threads have to use local blinding + * factors) */ + if (!(rsa->flags & RSA_FLAG_NO_BLINDING)) + { + if (blinding == NULL) + { + RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT, ERR_R_INTERNAL_ERROR); + goto err; + } + } + + if (blinding != NULL) + { + if (blinding->thread_id != CRYPTO_thread_id()) + { + /* we need a local one-time blinding factor */ + + blinding = setup_blinding(rsa, ctx); + if (blinding == NULL) + goto err; + local_blinding = 1; + } + } + + if (blinding) + if (!BN_BLINDING_convert(&f, blinding, ctx)) goto err; + + /* do the decrypt */ + if ( (rsa->flags & RSA_FLAG_EXT_PKEY) || + ((rsa->p != NULL) && + (rsa->q != NULL) && + (rsa->dmp1 != NULL) && + (rsa->dmq1 != NULL) && + (rsa->iqmp != NULL)) ) + { if (!rsa->meth->rsa_mod_exp(&ret,&f,rsa)) goto err; } + else + { + if (!rsa->meth->bn_mod_exp(&ret,&f,rsa->d,rsa->n,ctx,NULL)) + goto err; + } + + if (blinding) + if (!BN_BLINDING_invert(&ret, blinding, ctx)) goto err; + + p=buf; + j=BN_bn2bin(&ret,p); /* j is only used with no-padding mode */ + + switch (padding) + { + case RSA_PKCS1_PADDING: + r=RSA_padding_check_PKCS1_type_2(to,num,buf,j,num); + break; +#ifndef OPENSSL_NO_SHA + case RSA_PKCS1_OAEP_PADDING: + r=RSA_padding_check_PKCS1_OAEP(to,num,buf,j,num,NULL,0); + break; +#endif + case RSA_SSLV23_PADDING: + r=RSA_padding_check_SSLv23(to,num,buf,j,num); + break; + case RSA_NO_PADDING: + r=RSA_padding_check_none(to,num,buf,j,num); + break; + default: + RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT,RSA_R_UNKNOWN_PADDING_TYPE); + goto err; + } + if (r < 0) + RSAerr(RSA_F_RSA_EAY_PRIVATE_DECRYPT,RSA_R_PADDING_CHECK_FAILED); + +err: + if (ctx != NULL) BN_CTX_free(ctx); + BN_clear_free(&f); + BN_clear_free(&ret); + if (local_blinding) + BN_BLINDING_free(blinding); + if (buf != NULL) + { + OPENSSL_cleanse(buf,num); + OPENSSL_free(buf); + } + return(r); + } + +/* signature verification */ +static int RSA_eay_public_decrypt(FIPS_RSA_SIZE_T flen, const unsigned char *from, + unsigned char *to, RSA *rsa, int padding) + { + BIGNUM f,ret; + int i,num=0,r= -1; + unsigned char *p; + unsigned char *buf=NULL; + BN_CTX *ctx=NULL; + + BN_init(&f); + BN_init(&ret); + ctx=BN_CTX_new(); + if (ctx == NULL) goto err; + + num=BN_num_bytes(rsa->n); + buf=(unsigned char *)OPENSSL_malloc(num); + if (buf == NULL) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT,ERR_R_MALLOC_FAILURE); + goto err; + } + + /* This check was for equality but PGP does evil things + * and chops off the top '0' bytes */ + if (flen > num) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT,RSA_R_DATA_GREATER_THAN_MOD_LEN); + goto err; + } + + if (BN_bin2bn(from,flen,&f) == NULL) goto err; + + if (BN_ucmp(&f, rsa->n) >= 0) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT,RSA_R_DATA_TOO_LARGE_FOR_MODULUS); + goto err; + } + + /* do the decrypt */ + if ((rsa->_method_mod_n == NULL) && (rsa->flags & RSA_FLAG_CACHE_PUBLIC)) + { + BN_MONT_CTX* bn_mont_ctx; + if ((bn_mont_ctx=BN_MONT_CTX_new()) == NULL) + goto err; + if (!BN_MONT_CTX_set(bn_mont_ctx,rsa->n,ctx)) + { + BN_MONT_CTX_free(bn_mont_ctx); + goto err; + } + if (rsa->_method_mod_n == NULL) /* other thread may have finished first */ + { + CRYPTO_w_lock(CRYPTO_LOCK_RSA); + if (rsa->_method_mod_n == NULL) + { + rsa->_method_mod_n = bn_mont_ctx; + bn_mont_ctx = NULL; + } + CRYPTO_w_unlock(CRYPTO_LOCK_RSA); + } + if (bn_mont_ctx) + BN_MONT_CTX_free(bn_mont_ctx); + } + + if (!rsa->meth->bn_mod_exp(&ret,&f,rsa->e,rsa->n,ctx, + rsa->_method_mod_n)) goto err; + + p=buf; + i=BN_bn2bin(&ret,p); + + switch (padding) + { + case RSA_PKCS1_PADDING: + r=RSA_padding_check_PKCS1_type_1(to,num,buf,i,num); + break; + case RSA_NO_PADDING: + r=RSA_padding_check_none(to,num,buf,i,num); + break; + default: + RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT,RSA_R_UNKNOWN_PADDING_TYPE); + goto err; + } + if (r < 0) + RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT,RSA_R_PADDING_CHECK_FAILED); + +err: + if (ctx != NULL) BN_CTX_free(ctx); + BN_clear_free(&f); + BN_clear_free(&ret); + if (buf != NULL) + { + OPENSSL_cleanse(buf,num); + OPENSSL_free(buf); + } + return(r); + } + +static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa) + { + BIGNUM r1,m1,vrfy; + int ret=0; + BN_CTX *ctx; + + BN_init(&m1); + BN_init(&r1); + BN_init(&vrfy); + if ((ctx=BN_CTX_new()) == NULL) goto err; + + if (rsa->flags & RSA_FLAG_CACHE_PRIVATE) + { + if (rsa->_method_mod_p == NULL) + { + BN_MONT_CTX* bn_mont_ctx; + if ((bn_mont_ctx=BN_MONT_CTX_new()) == NULL) + goto err; + if (!BN_MONT_CTX_set(bn_mont_ctx,rsa->p,ctx)) + { + BN_MONT_CTX_free(bn_mont_ctx); + goto err; + } + if (rsa->_method_mod_p == NULL) /* other thread may have finished first */ + { + CRYPTO_w_lock(CRYPTO_LOCK_RSA); + if (rsa->_method_mod_p == NULL) + { + rsa->_method_mod_p = bn_mont_ctx; + bn_mont_ctx = NULL; + } + CRYPTO_w_unlock(CRYPTO_LOCK_RSA); + } + if (bn_mont_ctx) + BN_MONT_CTX_free(bn_mont_ctx); + } + + if (rsa->_method_mod_q == NULL) + { + BN_MONT_CTX* bn_mont_ctx; + if ((bn_mont_ctx=BN_MONT_CTX_new()) == NULL) + goto err; + if (!BN_MONT_CTX_set(bn_mont_ctx,rsa->q,ctx)) + { + BN_MONT_CTX_free(bn_mont_ctx); + goto err; + } + if (rsa->_method_mod_q == NULL) /* other thread may have finished first */ + { + CRYPTO_w_lock(CRYPTO_LOCK_RSA); + if (rsa->_method_mod_q == NULL) + { + rsa->_method_mod_q = bn_mont_ctx; + bn_mont_ctx = NULL; + } + CRYPTO_w_unlock(CRYPTO_LOCK_RSA); + } + if (bn_mont_ctx) + BN_MONT_CTX_free(bn_mont_ctx); + } + } + + if (!BN_mod(&r1,I,rsa->q,ctx)) goto err; + if (!rsa->meth->bn_mod_exp(&m1,&r1,rsa->dmq1,rsa->q,ctx, + rsa->_method_mod_q)) goto err; + + if (!BN_mod(&r1,I,rsa->p,ctx)) goto err; + if (!rsa->meth->bn_mod_exp(r0,&r1,rsa->dmp1,rsa->p,ctx, + rsa->_method_mod_p)) goto err; + + if (!BN_sub(r0,r0,&m1)) goto err; + /* This will help stop the size of r0 increasing, which does + * affect the multiply if it optimised for a power of 2 size */ + if (r0->neg) + if (!BN_add(r0,r0,rsa->p)) goto err; + + if (!BN_mul(&r1,r0,rsa->iqmp,ctx)) goto err; + if (!BN_mod(r0,&r1,rsa->p,ctx)) goto err; + /* If p < q it is occasionally possible for the correction of + * adding 'p' if r0 is negative above to leave the result still + * negative. This can break the private key operations: the following + * second correction should *always* correct this rare occurrence. + * This will *never* happen with OpenSSL generated keys because + * they ensure p > q [steve] + */ + if (r0->neg) + if (!BN_add(r0,r0,rsa->p)) goto err; + if (!BN_mul(&r1,r0,rsa->q,ctx)) goto err; + if (!BN_add(r0,&r1,&m1)) goto err; + + if (rsa->e && rsa->n) + { + if (!rsa->meth->bn_mod_exp(&vrfy,r0,rsa->e,rsa->n,ctx,NULL)) goto err; + /* If 'I' was greater than (or equal to) rsa->n, the operation + * will be equivalent to using 'I mod n'. However, the result of + * the verify will *always* be less than 'n' so we don't check + * for absolute equality, just congruency. */ + if (!BN_sub(&vrfy, &vrfy, I)) goto err; + if (!BN_mod(&vrfy, &vrfy, rsa->n, ctx)) goto err; + if (vrfy.neg) + if (!BN_add(&vrfy, &vrfy, rsa->n)) goto err; + if (!BN_is_zero(&vrfy)) + /* 'I' and 'vrfy' aren't congruent mod n. Don't leak + * miscalculated CRT output, just do a raw (slower) + * mod_exp and return that instead. */ + if (!rsa->meth->bn_mod_exp(r0,I,rsa->d,rsa->n,ctx,NULL)) goto err; + } + ret=1; +err: + BN_clear_free(&m1); + BN_clear_free(&r1); + BN_clear_free(&vrfy); + BN_CTX_free(ctx); + return(ret); + } + +static int RSA_eay_init(RSA *rsa) + { + rsa->flags|=RSA_FLAG_CACHE_PUBLIC|RSA_FLAG_CACHE_PRIVATE; + return(1); + } + +static int RSA_eay_finish(RSA *rsa) + { + if (rsa->_method_mod_n != NULL) + BN_MONT_CTX_free(rsa->_method_mod_n); + if (rsa->_method_mod_p != NULL) + BN_MONT_CTX_free(rsa->_method_mod_p); + if (rsa->_method_mod_q != NULL) + BN_MONT_CTX_free(rsa->_method_mod_q); + return(1); + } + +#endif diff --git a/src/lib/libssl/src/fips/rsa/fips_rsa_gen.c b/src/lib/libssl/src/fips/rsa/fips_rsa_gen.c new file mode 100644 index 0000000000..2c92112477 --- /dev/null +++ b/src/lib/libssl/src/fips/rsa/fips_rsa_gen.c @@ -0,0 +1,249 @@ +/* crypto/rsa/rsa_gen.c */ +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +#include +#include +#include +#include +#include +#include +#include + +#ifdef OPENSSL_FIPS + +static int fips_check_rsa(RSA *rsa) + { + int n; + unsigned char ctext[256]; + unsigned char ptext[256]; + /* The longest we can have with OAEP padding and a 512 bit key */ + static unsigned char original_ptext[] = + "\x01\x23\x45\x67\x89\xab\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0" + "\x23\x45\x67\x89\xab\xcd"; + + /* this will fail for keys shorter than 512 bits */ + n=RSA_public_encrypt(sizeof(original_ptext)-1,original_ptext,ctext,rsa, + RSA_PKCS1_OAEP_PADDING); + if(n < 0) + { + ERR_print_errors_fp(stderr); + exit(1); + } + if(!memcmp(ctext,original_ptext,n)) + { + FIPSerr(FIPS_F_FIPS_CHECK_RSA,FIPS_R_PAIRWISE_TEST_FAILED); + return 0; + } + n=RSA_private_decrypt(n,ctext,ptext,rsa,RSA_PKCS1_OAEP_PADDING); + if(n < 0) + { + ERR_print_errors_fp(stderr); + exit(1); + } + if(n != sizeof(original_ptext)-1 || memcmp(ptext,original_ptext,n)) + { + FIPSerr(FIPS_F_FIPS_CHECK_RSA,FIPS_R_PAIRWISE_TEST_FAILED); + return 0; + } + + return 1; + } + +RSA *RSA_generate_key(FIPS_RSA_SIZE_T bits, unsigned long e_value, + void (*callback)(int,int,void *), void *cb_arg) + { + RSA *rsa=NULL; + BIGNUM *r0=NULL,*r1=NULL,*r2=NULL,*r3=NULL,*tmp; + int bitsp,bitsq,ok= -1,n=0,i; + BN_CTX *ctx=NULL,*ctx2=NULL; + + if(FIPS_selftest_failed()) + { + FIPSerr(FIPS_F_RSA_GENERATE_KEY,FIPS_R_FIPS_SELFTEST_FAILED); + return NULL; + } + + ctx=BN_CTX_new(); + if (ctx == NULL) goto err; + ctx2=BN_CTX_new(); + if (ctx2 == NULL) goto err; + BN_CTX_start(ctx); + r0 = BN_CTX_get(ctx); + r1 = BN_CTX_get(ctx); + r2 = BN_CTX_get(ctx); + r3 = BN_CTX_get(ctx); + if (r3 == NULL) goto err; + + bitsp=(bits+1)/2; + bitsq=bits-bitsp; + rsa=RSA_new(); + if (rsa == NULL) goto err; + + /* set e */ + rsa->e=BN_new(); + if (rsa->e == NULL) goto err; + +#if 1 + /* The problem is when building with 8, 16, or 32 BN_ULONG, + * unsigned long can be larger */ + for (i=0; ie,i); + } +#else + if (!BN_set_word(rsa->e,e_value)) goto err; +#endif + + /* generate p and q */ + for (;;) + { + rsa->p=BN_generate_prime(NULL,bitsp,0,NULL,NULL,callback,cb_arg); + if (rsa->p == NULL) goto err; + if (!BN_sub(r2,rsa->p,BN_value_one())) goto err; + if (!BN_gcd(r1,r2,rsa->e,ctx)) goto err; + if (BN_is_one(r1)) break; + if (callback != NULL) callback(2,n++,cb_arg); + BN_free(rsa->p); + } + if (callback != NULL) callback(3,0,cb_arg); + for (;;) + { + rsa->q=BN_generate_prime(NULL,bitsq,0,NULL,NULL,callback,cb_arg); + if (rsa->q == NULL) goto err; + if (!BN_sub(r2,rsa->q,BN_value_one())) goto err; + if (!BN_gcd(r1,r2,rsa->e,ctx)) goto err; + if (BN_is_one(r1) && (BN_cmp(rsa->p,rsa->q) != 0)) + break; + if (callback != NULL) callback(2,n++,cb_arg); + BN_free(rsa->q); + } + if (callback != NULL) callback(3,1,cb_arg); + if (BN_cmp(rsa->p,rsa->q) < 0) + { + tmp=rsa->p; + rsa->p=rsa->q; + rsa->q=tmp; + } + + /* calculate n */ + rsa->n=BN_new(); + if (rsa->n == NULL) goto err; + if (!BN_mul(rsa->n,rsa->p,rsa->q,ctx)) goto err; + + /* calculate d */ + if (!BN_sub(r1,rsa->p,BN_value_one())) goto err; /* p-1 */ + if (!BN_sub(r2,rsa->q,BN_value_one())) goto err; /* q-1 */ + if (!BN_mul(r0,r1,r2,ctx)) goto err; /* (p-1)(q-1) */ + +/* should not be needed, since gcd(p-1,e) == 1 and gcd(q-1,e) == 1 */ +/* for (;;) + { + if (!BN_gcd(r3,r0,rsa->e,ctx)) goto err; + if (BN_is_one(r3)) break; + + if (1) + { + if (!BN_add_word(rsa->e,2L)) goto err; + continue; + } + RSAerr(RSA_F_RSA_GENERATE_KEY,RSA_R_BAD_E_VALUE); + goto err; + } +*/ + rsa->d=BN_mod_inverse(NULL,rsa->e,r0,ctx2); /* d */ + if (rsa->d == NULL) goto err; + + /* calculate d mod (p-1) */ + rsa->dmp1=BN_new(); + if (rsa->dmp1 == NULL) goto err; + if (!BN_mod(rsa->dmp1,rsa->d,r1,ctx)) goto err; + + /* calculate d mod (q-1) */ + rsa->dmq1=BN_new(); + if (rsa->dmq1 == NULL) goto err; + if (!BN_mod(rsa->dmq1,rsa->d,r2,ctx)) goto err; + + /* calculate inverse of q mod p */ + rsa->iqmp=BN_mod_inverse(NULL,rsa->q,rsa->p,ctx2); + if (rsa->iqmp == NULL) goto err; + + if(!fips_check_rsa(rsa)) + goto err; + + ok=1; +err: + if (ok == -1) + { + RSAerr(RSA_F_RSA_GENERATE_KEY,ERR_LIB_BN); + ok=0; + } + BN_CTX_end(ctx); + BN_CTX_free(ctx); + BN_CTX_free(ctx2); + + if (!ok) + { + if (rsa != NULL) RSA_free(rsa); + return(NULL); + } + else + return(rsa); + } + +#endif diff --git a/src/lib/libssl/src/fips/rsa/fips_rsa_selftest.c b/src/lib/libssl/src/fips/rsa/fips_rsa_selftest.c new file mode 100644 index 0000000000..4e3b9445fc --- /dev/null +++ b/src/lib/libssl/src/fips/rsa/fips_rsa_selftest.c @@ -0,0 +1,251 @@ +/* ==================================================================== + * Copyright (c) 2003 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include +#include + +#ifdef OPENSSL_FIPS +#define SetKey \ + key->n = BN_bin2bn(n, sizeof(n)-1, key->n); \ + key->e = BN_bin2bn(e, sizeof(e)-1, key->e); \ + key->d = BN_bin2bn(d, sizeof(d)-1, key->d); \ + key->p = BN_bin2bn(p, sizeof(p)-1, key->p); \ + key->q = BN_bin2bn(q, sizeof(q)-1, key->q); \ + key->dmp1 = BN_bin2bn(dmp1, sizeof(dmp1)-1, key->dmp1); \ + key->dmq1 = BN_bin2bn(dmq1, sizeof(dmq1)-1, key->dmq1); \ + key->iqmp = BN_bin2bn(iqmp, sizeof(iqmp)-1, key->iqmp); \ + memcpy(c, ctext_ex, sizeof(ctext_ex) - 1); \ + return (sizeof(ctext_ex) - 1); + +static unsigned char n[] = +"\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71" +"\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5" +"\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD" +"\x48\x76\xED\x52\x0D\x60\xE1\xEC\x46\x19\x71\x9D\x8A\x5B\x8B\x80" +"\x7F\xAF\xB8\xE0\xA3\xDF\xC7\x37\x72\x3E\xE6\xB4\xB7\xD9\x3A\x25" +"\x84\xEE\x6A\x64\x9D\x06\x09\x53\x74\x88\x34\xB2\x45\x45\x98\x39" +"\x4E\xE0\xAA\xB1\x2D\x7B\x61\xA5\x1F\x52\x7A\x9A\x41\xF6\xC1\x68" +"\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD" +"\xCB"; + + +static int setrsakey(RSA *key, unsigned char *c) + { + static unsigned char e[] = "\x11"; + + static unsigned char d[] = +"\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD" +"\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41" +"\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69" +"\xD6\x87\x0D\xA2\xC0\x82\xA9\x39\xE3\x7F\xDC\xB8\x2E\xC9\x3E\xDA" +"\xC9\x7F\xF3\xAD\x59\x50\xAC\xCF\xBC\x11\x1C\x76\xF1\xA9\x52\x94" +"\x44\xE5\x6A\xAF\x68\xC5\x6C\x09\x2C\xD3\x8D\xC3\xBE\xF5\xD2\x0A" +"\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94" +"\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3" +"\xC1"; + + static unsigned char p[] = +"\x00\xEE\xCF\xAE\x81\xB1\xB9\xB3\xC9\x08\x81\x0B\x10\xA1\xB5\x60" +"\x01\x99\xEB\x9F\x44\xAE\xF4\xFD\xA4\x93\xB8\x1A\x9E\x3D\x84\xF6" +"\x32\x12\x4E\xF0\x23\x6E\x5D\x1E\x3B\x7E\x28\xFA\xE7\xAA\x04\x0A" +"\x2D\x5B\x25\x21\x76\x45\x9D\x1F\x39\x75\x41\xBA\x2A\x58\xFB\x65" +"\x99"; + + static unsigned char q[] = +"\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9" +"\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D" +"\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5" +"\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x15" +"\x03"; + + static unsigned char dmp1[] = +"\x54\x49\x4C\xA6\x3E\xBA\x03\x37\xE4\xE2\x40\x23\xFC\xD6\x9A\x5A" +"\xEB\x07\xDD\xDC\x01\x83\xA4\xD0\xAC\x9B\x54\xB0\x51\xF2\xB1\x3E" +"\xD9\x49\x09\x75\xEA\xB7\x74\x14\xFF\x59\xC1\xF7\x69\x2E\x9A\x2E" +"\x20\x2B\x38\xFC\x91\x0A\x47\x41\x74\xAD\xC9\x3C\x1F\x67\xC9\x81"; + + static unsigned char dmq1[] = +"\x47\x1E\x02\x90\xFF\x0A\xF0\x75\x03\x51\xB7\xF8\x78\x86\x4C\xA9" +"\x61\xAD\xBD\x3A\x8A\x7E\x99\x1C\x5C\x05\x56\xA9\x4C\x31\x46\xA7" +"\xF9\x80\x3F\x8F\x6F\x8A\xE3\x42\xE9\x31\xFD\x8A\xE4\x7A\x22\x0D" +"\x1B\x99\xA4\x95\x84\x98\x07\xFE\x39\xF9\x24\x5A\x98\x36\xDA\x3D"; + + static unsigned char iqmp[] = +"\x00\xB0\x6C\x4F\xDA\xBB\x63\x01\x19\x8D\x26\x5B\xDB\xAE\x94\x23" +"\xB3\x80\xF2\x71\xF7\x34\x53\x88\x50\x93\x07\x7F\xCD\x39\xE2\x11" +"\x9F\xC9\x86\x32\x15\x4F\x58\x83\xB1\x67\xA9\x67\xBF\x40\x2B\x4E" +"\x9E\x2E\x0F\x96\x56\xE6\x98\xEA\x36\x66\xED\xFB\x25\x79\x80\x39" +"\xF7"; + + static unsigned char ctext_ex[] = +"\x42\x4b\xc9\x51\x61\xd4\xca\xa0\x18\x6c\x4d\xca\x61\x8f\x2d\x07" +"\x8c\x63\xc5\x6b\xa2\x4c\x32\xb1\xda\xb7\xdd\x32\xb6\x51\x68\xc3" +"\x6e\x98\x46\xd6\xbb\x1a\xd5\x99\x05\x92\x7c\xd7\xbc\x08\x9e\xe4" +"\xc3\x70\x4d\xe6\x99\x7e\x61\x31\x07\x7a\x19\xdb\x3e\x11\xfa\x3d" +"\x7c\x61\xd7\x78\x14\x3f\x05\x16\xa0\xc4\xbf\xcd\xee\xca\x67\x4c" +"\x80\x4e\xca\x43\x2f\x35\x43\x58\xa7\x50\x7e\x3e\x52\x82\xab\xac" +"\xa6\x50\xe8\x39\x9f\xe0\x7f\x58\x1d\x1b\x90\x93\x04\xec\xb3\xf9" +"\x24\xd3\x75\x3e\x39\xd1\x14\xc6\x33\xce\xd6\xee\x20\x47\xec\xe4"; + + SetKey; + } + +void FIPS_corrupt_rsa() + { + n[0]++; + } + +int FIPS_selftest_rsa() + { + int clen; + RSA *key; + unsigned char expected_ctext[256]; + unsigned char ctext[256]; + unsigned char ptext[256]; + static unsigned char original_ptext[] = + "\x01\x23\x45\x67\x89\xab\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0" + "\x23\x45\x67\x89\xab\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12" + "\x45\x67\x89\xab\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34" + "\x67\x89\xab\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34\x56" + "\x89\xab\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34\x56\x78" + "\xab\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34\x56\x78\x9a" + "\xcd\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34\x56\x78\x9a\xbc" + "\xef\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34\x56\x78\x9a\xbc\xde" + "\xf0\x12\x34\x56\x78\x9a\xbc\xde\xf0\x12\x34\x56\x78\x9a\xbc\xde"; + unsigned char md[SHA_DIGEST_LENGTH]; + unsigned char mdkat[SHA_DIGEST_LENGTH] = + "\x2d\x57\x1d\x6f\x5c\x37\xf9\xf0\x3b\xb4\x3c\xe8\x2c\x4c\xb3\x04" + "\x75\xa2\x0e\xfb"; + unsigned char ctextkat[] = + "\x3e\xc5\x0a\xbe\x29\xa2\xca\x9a\x35\x14\x17\x26\xa4\x0f\xa3\x03" + "\x65\xb5\x37\xf5\x6a\xaa\xb\xf\x2c\x0d\x8\xc0\x73\x8\x3c\x88\x85" + "\x36\x68\x16\xfe\x2f\x59\x77\x7e\x2a\x76\x9a\xc7\x27\x19\x9b\x54" + "\x14\x87\xf3\xe0\xce\x1e\x68\x10\x40\x14\xac\xbc\xe6\x6f\x26\x1f" + "\x55\xd1\x15\x81\x48\x10\xf4\x89\xe5\x67\x52\x42\x87\x04\x74\x4e" + "\x96\x14\x7c\x53\xc9\x1e\x84\x11\x7d\x7d\x23\xbd\xff\x6c\xcb\x00" + "\x96\x2e\x7d\xfb\x47\xea\x78\xcd\xd8\x04\x3a\x98\x06\x13\x68\x39" + "\xa1\xe2\xbc\x9f\x64\xc7\x62\xf0\x74\x4d\x42\xe0\x0b\xcf\x24\x48"; + int i; + + /* Perform pairwise consistency test by: ... */ + + key=RSA_new(); + clen=setrsakey(key,expected_ctext); + /* ...1) apply public key to plaintext, resulting ciphertext must be + * different + */ + i=RSA_public_encrypt(128,original_ptext,ctext,key, + RSA_NO_PADDING); + if(i != clen || memcmp(ctext,expected_ctext,i)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + if(!memcmp(ctext,original_ptext,i)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + /* ...2) apply private key to ciphertext and compare result to + * original plaintext; results must be equal + */ + i=RSA_private_decrypt(i,ctext,ptext,key,RSA_NO_PADDING); + if(i != 128 || memcmp(ptext,original_ptext,i)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + + /* Perform sign and verify Known Answer Test by... */ + + /* ...1) using the same RSA key to encrypt the SHA-1 hash of a + * plaintext value larger than the RSA key size + */ + if (RSA_size(key) >= sizeof(original_ptext) - 1) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + /* ...2) then generate the SHA-1 digest of plaintext, and compare the + * digest to the Known Answer (note here we duplicate the SHA-1 KAT) + */ + SHA1(original_ptext,sizeof(original_ptext) - 1,md); + if(memcmp(md,mdkat,SHA_DIGEST_LENGTH)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_SHA1,FIPS_R_SELFTEST_FAILED); + return 0; + } + /* ...3) then encrypt the digest, and compare the ciphertext + * to the Known Answer + */ + i=RSA_private_encrypt(sizeof(md),md,ctext,key,RSA_PKCS1_PADDING); + if(i != clen || memcmp(ctextkat,ctext,i)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + /* ...4) and finally decrypt the signed digest and compare with + * the original Known Answer + */ + i=RSA_public_decrypt(i,ctext,md,key,RSA_PKCS1_PADDING); + if(i != sizeof(md) || memcmp(mdkat,md,i)) + { + FIPSerr(FIPS_F_FIPS_SELFTEST_RSA,FIPS_R_SELFTEST_FAILED); + return 0; + } + + RSA_free(key); + return 1; + } + +#endif /* def OPENSSL_FIPS */ diff --git a/src/lib/libssl/src/install.com b/src/lib/libssl/src/install.com index 4e4fe80dfe..8de3a7f977 100644 --- a/src/lib/libssl/src/install.com +++ b/src/lib/libssl/src/install.com @@ -52,23 +52,23 @@ $ IF F$PARSE("WRK_SSLPRIVATE:") .EQS. "" THEN - $ IF F$PARSE("WRK_SSLROOT:[VMS]") .EQS. "" THEN - CREATE/DIR/LOG WRK_SSLROOT:[VMS] $ -$ SDIRS := CRYPTO,SSL,APPS,VMS!,RSAREF,TEST,TOOLS +$ DIRS := CRYPTO,FIPS,SSL,APPS,VMS!,RSAREF,TEST,TOOLS $ EXHEADER := e_os2.h $ $ COPY 'EXHEADER' WRK_SSLINCLUDE: /LOG $ SET FILE/PROT=WORLD:RE WRK_SSLINCLUDE:'EXHEADER' $ $ I = 0 -$ LOOP_SDIRS: -$ D = F$ELEMENT(I, ",", SDIRS) +$ LOOP_DIRS: +$ D = F$ELEMENT(I, ",", DIRS) $ I = I + 1 -$ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END +$ IF D .EQS. "," THEN GOTO LOOP_DIRS_END $ WRITE SYS$OUTPUT "Installing ",D," files." $ SET DEFAULT [.'D'] $ @INSTALL 'ROOT'] $ SET DEFAULT [-] -$ GOTO LOOP_SDIRS -$ LOOP_SDIRS_END: +$ GOTO LOOP_DIRS +$ LOOP_DIRS_END: $ $ DEASSIGN WRK_SSLROOT $ DEASSIGN WRK_SSLVLIB diff --git a/src/lib/libssl/src/makevms.com b/src/lib/libssl/src/makevms.com index 443f3c15c5..d892fe9f0d 100644 --- a/src/lib/libssl/src/makevms.com +++ b/src/lib/libssl/src/makevms.com @@ -178,7 +178,7 @@ $ WRITE H_FILE "# define OPENSSL_SYS_VMS" $ WRITE H_FILE "#endif" $ CONFIG_LOGICALS := NO_ASM,NO_RSA,NO_DSA,NO_DH,NO_MD2,NO_MD5,NO_RIPEMD,- NO_SHA,NO_SHA0,NO_SHA1,NO_DES/NO_MDC2;NO_MDC2,NO_RC2,NO_RC4,NO_RC5,- - NO_IDEA,NO_BF,NO_CAST,NO_HMAC,NO_SSL2 + NO_IDEA,NO_BF,NO_CAST,NO_HMAC,NO_SSL2,FIPS $ CONFIG_LOG_I = 0 $ CONFIG_LOG_LOOP: $ CONFIG_LOG_E1 = F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS) @@ -357,7 +357,7 @@ $! Copy a lot of files around. $! $ SOFTLINKS: $! -$! Tell The User We Are Partly Rebuilding The [.TEST] Directory. +$! Tell The User We Are Partly Rebuilding The [.APPS] Directory. $! $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C', '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files." $! @@ -480,6 +480,33 @@ $! $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,kssl.h $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL] $! +$! Copy All The ".H" Files From The [.FIPS] Directories. +$! +$ FDIRS := ,SHA1,RAND,DES,AES,DSA,RSA +$ EXHEADER_ := fips.h +$ EXHEADER_SHA1 := +$ EXHEADER_RAND := fips_rand.h +$ EXHEADER_DES := +$ EXHEADER_AES := +$ EXHEADER_DSA := +$ EXHEADER_RSA := +$ +$ I = 0 +$ LOOP_FDIRS: +$ D = F$EDIT(F$ELEMENT(I, ",", FDIRS),"TRIM") +$ I = I + 1 +$ IF D .EQS. "," THEN GOTO LOOP_FDIRS_END +$ tmp = EXHEADER_'D' +$ IF tmp .EQS. "" THEN GOTO LOOP_FDIRS +$ IF D .EQS. "" +$ THEN +$ COPY [.FIPS]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG +$ ELSE +$ COPY [.FIPS.'D']'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG +$ ENDIF +$ GOTO LOOP_FDIRS +$ LOOP_FDIRS_END: +$! $! Purge all doubles $! $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H @@ -505,9 +532,21 @@ $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library. $! $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'" $! +$! Go Back To The Main Directory. +$! +$ SET DEFAULT [-] +$! +$! Go To The [.FIPS] Directory. +$! +$ SET DEFAULT SYS$DISK:[.FIPS] +$! +$! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library. +$! +$ @FIPS-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'" +$! $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications. $! -$ @CRYPTO-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' +$ @FIPS-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' $! $! Go Back To The Main Directory. $! diff --git a/src/lib/libssl/src/ms/do_masm.bat b/src/lib/libssl/src/ms/do_masm.bat index f4c958c561..61c52562f7 100644 --- a/src/lib/libssl/src/ms/do_masm.bat +++ b/src/lib/libssl/src/ms/do_masm.bat @@ -1,3 +1,5 @@ +rem use "fips" as the first argument to make a proper FIPS build. + @echo off echo Generating x86 for MASM assember @@ -56,13 +58,13 @@ cd ..\..\.. echo on perl util\mkfiles.pl >MINFO -rem perl util\mk1mf.pl VC-MSDOS no-sock >ms\msdos.mak -rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak -perl util\mk1mf.pl dll VC-W31-32 >ms\w31dll.mak -perl util\mk1mf.pl VC-WIN32 >ms\nt.mak -perl util\mk1mf.pl dll VC-WIN32 >ms\ntdll.mak - -perl util\mkdef.pl 16 libeay > ms\libeay16.def -perl util\mkdef.pl 32 libeay > ms\libeay32.def -perl util\mkdef.pl 16 ssleay > ms\ssleay16.def -perl util\mkdef.pl 32 ssleay > ms\ssleay32.def +rem perl util\mk1mf.pl no-sock %1 VC-MSDOS >ms\msdos.mak +rem perl util\mk1mf.pl %1 VC-W31-32 >ms\w31.mak +perl util\mk1mf.pl dll %1 VC-W31-32 >ms\w31dll.mak +perl util\mk1mf.pl %1 VC-WIN32 >ms\nt.mak +perl util\mk1mf.pl dll %1 VC-WIN32 >ms\ntdll.mak + +perl util\mkdef.pl 16 libeay %1 > ms\libeay16.def +perl util\mkdef.pl 32 libeay %1 > ms\libeay32.def +perl util\mkdef.pl 16 ssleay %1 > ms\ssleay16.def +perl util\mkdef.pl 32 ssleay %1 > ms\ssleay32.def diff --git a/src/lib/libssl/src/ms/do_ms.bat b/src/lib/libssl/src/ms/do_ms.bat index a8cf515bac..72179708bf 100644 --- a/src/lib/libssl/src/ms/do_ms.bat +++ b/src/lib/libssl/src/ms/do_ms.bat @@ -1,14 +1,14 @@ perl util\mkfiles.pl >MINFO -rem perl util\mk1mf.pl VC-MSDOS no-sock >ms\msdos.mak -rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak -perl util\mk1mf.pl dll VC-W31-32 >ms\w31dll.mak -perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak -perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak -perl util\mk1mf.pl no-asm VC-CE >ms\ce.mak -perl util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak +rem perl util\mk1mf.pl no-sock %1 VC-MSDOS >ms\msdos.mak +rem perl util\mk1mf.pl %1 VC-W31-32 >ms\w31.mak +perl util\mk1mf.pl dll %1 VC-W31-32 >ms\w31dll.mak +perl util\mk1mf.pl no-asm %1 VC-WIN32 >ms\nt.mak +perl util\mk1mf.pl dll no-asm %1 VC-WIN32 >ms\ntdll.mak +perl util\mk1mf.pl no-asm %1 VC-CE >ms\ce.mak +perl util\mk1mf.pl dll no-asm %1 VC-CE >ms\cedll.mak -perl util\mkdef.pl 16 libeay > ms\libeay16.def -perl util\mkdef.pl 32 libeay > ms\libeay32.def -perl util\mkdef.pl 16 ssleay > ms\ssleay16.def -perl util\mkdef.pl 32 ssleay > ms\ssleay32.def +perl util\mkdef.pl 16 libeay %1 > ms\libeay16.def +perl util\mkdef.pl 32 libeay %1 > ms\libeay32.def +perl util\mkdef.pl 16 ssleay %1 > ms\ssleay16.def +perl util\mkdef.pl 32 ssleay %1 > ms\ssleay32.def diff --git a/src/lib/libssl/src/ms/do_nasm.bat b/src/lib/libssl/src/ms/do_nasm.bat index 557f8a66d7..270dab0058 100644 --- a/src/lib/libssl/src/ms/do_nasm.bat +++ b/src/lib/libssl/src/ms/do_nasm.bat @@ -1,3 +1,4 @@ +rem use "fips" as the first argument to make a proper FIPS build. @echo off echo Generating x86 for NASM assember @@ -57,14 +58,14 @@ cd ..\..\.. echo on perl util\mkfiles.pl >MINFO -rem perl util\mk1mf.pl VC-MSDOS no-sock >ms\msdos.mak -rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak -perl util\mk1mf.pl dll VC-W31-32 >ms\w31dll.mak -perl util\mk1mf.pl nasm VC-WIN32 >ms\nt.mak -perl util\mk1mf.pl dll nasm VC-WIN32 >ms\ntdll.mak -perl util\mk1mf.pl nasm BC-NT >ms\bcb.mak - -perl util\mkdef.pl 16 libeay > ms\libeay16.def -perl util\mkdef.pl 32 libeay > ms\libeay32.def -perl util\mkdef.pl 16 ssleay > ms\ssleay16.def -perl util\mkdef.pl 32 ssleay > ms\ssleay32.def +rem perl util\mk1mf.pl no-sock %1 VC-MSDOS >ms\msdos.mak +rem perl util\mk1mf.pl %1 VC-W31-32 >ms\w31.mak +perl util\mk1mf.pl dll %1 VC-W31-32 >ms\w31dll.mak +perl util\mk1mf.pl nasm %1 VC-WIN32 >ms\nt.mak +perl util\mk1mf.pl dll nasm %1 VC-WIN32 >ms\ntdll.mak +perl util\mk1mf.pl nasm %1 BC-NT >ms\bcb.mak + +perl util\mkdef.pl 16 libeay %1 > ms\libeay16.def +perl util\mkdef.pl 32 libeay %1 > ms\libeay32.def +perl util\mkdef.pl 16 ssleay %1 > ms\ssleay16.def +perl util\mkdef.pl 32 ssleay %1 > ms\ssleay32.def diff --git a/src/lib/libssl/src/ms/do_nt.bat b/src/lib/libssl/src/ms/do_nt.bat index 9c06c27caa..66b408b283 100644 --- a/src/lib/libssl/src/ms/do_nt.bat +++ b/src/lib/libssl/src/ms/do_nt.bat @@ -1,7 +1,7 @@ perl util\mkfiles.pl >MINFO -perl util\mk1mf.pl no-asm VC-NT >ms\nt.mak -perl util\mk1mf.pl dll no-asm VC-NT >ms\ntdll.mak +perl util\mk1mf.pl no-asm %1 VC-NT >ms\nt.mak +perl util\mk1mf.pl dll no-asm %1 VC-NT >ms\ntdll.mak -perl util\mkdef.pl libeay NT > ms\libeay32.def -perl util\mkdef.pl ssleay NT > ms\ssleay32.def +perl util\mkdef.pl libeay NT %1 > ms\libeay32.def +perl util\mkdef.pl ssleay NT %1 > ms\ssleay32.def diff --git a/src/lib/libssl/src/ms/test.bat b/src/lib/libssl/src/ms/test.bat index c3a1b0c28d..7fb0442147 100644 --- a/src/lib/libssl/src/ms/test.bat +++ b/src/lib/libssl/src/ms/test.bat @@ -87,20 +87,22 @@ echo testss call %test%\testss openssl if errorlevel 1 goto done +set SSL_TEST=ssltest -key keyU.ss -cert certU.ss -c_key keyU.ss -c_cert certU.ss -CAfile certCA.ss + echo test sslv2 ssltest -ssl2 if errorlevel 1 goto done echo test sslv2 with server authentication -ssltest -ssl2 -server_auth -CAfile cert.tmp +%SSL_TEST% -ssl2 -server_auth if errorlevel 1 goto done echo test sslv2 with client authentication -ssltest -ssl2 -client_auth -CAfile cert.tmp +%SSL_TEST% -ssl2 -client_auth if errorlevel 1 goto done echo test sslv2 with both client and server authentication -ssltest -ssl2 -server_auth -client_auth -CAfile cert.tmp +%SSL_TEST% -ssl2 -server_auth -client_auth if errorlevel 1 goto done echo test sslv3 @@ -108,15 +110,15 @@ ssltest -ssl3 if errorlevel 1 goto done echo test sslv3 with server authentication -ssltest -ssl3 -server_auth -CAfile cert.tmp +%SSL_TEST% -ssl3 -server_auth if errorlevel 1 goto done echo test sslv3 with client authentication -ssltest -ssl3 -client_auth -CAfile cert.tmp +%SSL_TEST% -ssl3 -client_auth if errorlevel 1 goto done echo test sslv3 with both client and server authentication -ssltest -ssl3 -server_auth -client_auth -CAfile cert.tmp +%SSL_TEST% -ssl3 -server_auth -client_auth if errorlevel 1 goto done echo test sslv2/sslv3 @@ -124,15 +126,15 @@ ssltest if errorlevel 1 goto done echo test sslv2/sslv3 with server authentication -ssltest -server_auth -CAfile cert.tmp +%SSL_TEST% -server_auth if errorlevel 1 goto done echo test sslv2/sslv3 with client authentication -ssltest -client_auth -CAfile cert.tmp +%SSL_TEST% -client_auth if errorlevel 1 goto done echo test sslv2/sslv3 with both client and server authentication -ssltest -server_auth -client_auth -CAfile cert.tmp +%SSL_TEST% -server_auth -client_auth if errorlevel 1 goto done echo test sslv2 via BIO pair @@ -144,15 +146,15 @@ ssltest -bio_pair -dhe1024dsa -v if errorlevel 1 goto done echo test sslv2 with server authentication via BIO pair -ssltest -bio_pair -ssl2 -server_auth -CAfile cert.tmp +%SSL_TEST% -bio_pair -ssl2 -server_auth if errorlevel 1 goto done echo test sslv2 with client authentication via BIO pair -ssltest -bio_pair -ssl2 -client_auth -CAfile cert.tmp +%SSL_TEST% -bio_pair -ssl2 -client_auth if errorlevel 1 goto done echo test sslv2 with both client and server authentication via BIO pair -ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile cert.tmp +%SSL_TEST% -bio_pair -ssl2 -server_auth -client_auth if errorlevel 1 goto done echo test sslv3 via BIO pair @@ -160,31 +162,31 @@ ssltest -bio_pair -ssl3 if errorlevel 1 goto done echo test sslv3 with server authentication via BIO pair -ssltest -bio_pair -ssl3 -server_auth -CAfile cert.tmp +%SSL_TEST% -bio_pair -ssl3 -server_auth if errorlevel 1 goto done echo test sslv3 with client authentication via BIO pair -ssltest -bio_pair -ssl3 -client_auth -CAfile cert.tmp +%SSL_TEST% -bio_pair -ssl3 -client_auth if errorlevel 1 goto done echo test sslv3 with both client and server authentication via BIO pair -ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile cert.tmp +%SSL_TEST% -bio_pair -ssl3 -server_auth -client_auth if errorlevel 1 goto done echo test sslv2/sslv3 via BIO pair -ssltest +ssltest -bio_pair if errorlevel 1 goto done echo test sslv2/sslv3 with server authentication -ssltest -bio_pair -server_auth -CAfile cert.tmp +%SSL_TEST% -bio_pair -server_auth if errorlevel 1 goto done echo test sslv2/sslv3 with client authentication via BIO pair -ssltest -bio_pair -client_auth -CAfile cert.tmp +%SSL_TEST% -bio_pair -client_auth if errorlevel 1 goto done echo test sslv2/sslv3 with both client and server authentication via BIO pair -ssltest -bio_pair -server_auth -client_auth -CAfile cert.tmp +%SSL_TEST% -bio_pair -server_auth -client_auth if errorlevel 1 goto done del cert.tmp diff --git a/src/lib/libssl/src/ms/testss.bat b/src/lib/libssl/src/ms/testss.bat index f7e58e2756..b4aaf3c601 100644 --- a/src/lib/libssl/src/ms/testss.bat +++ b/src/lib/libssl/src/ms/testss.bat @@ -4,7 +4,7 @@ rem set ssleay=..\out\ssleay set ssleay=%1 set reqcmd=%ssleay% req -set x509cmd=%ssleay% x509 +set x509cmd=%ssleay% x509 -sha1 set verifycmd=%ssleay% verify set CAkey=keyCA.ss diff --git a/src/lib/libssl/src/openssl.spec b/src/lib/libssl/src/openssl.spec index 6a272f6969..98ef153e3b 100644 --- a/src/lib/libssl/src/openssl.spec +++ b/src/lib/libssl/src/openssl.spec @@ -1,7 +1,7 @@ %define libmaj 0 %define libmin 9 %define librel 7 -%define librev d +%define librev g Release: 1 %define openssldir /var/ssl diff --git a/src/lib/libssl/src/shlib/hpux10-cc.sh b/src/lib/libssl/src/shlib/hpux10-cc.sh index 81eb9d4cab..fcadda827d 100644 --- a/src/lib/libssl/src/shlib/hpux10-cc.sh +++ b/src/lib/libssl/src/shlib/hpux10-cc.sh @@ -74,9 +74,9 @@ make clean # Hack the Makefiles to pick up the dynamic libraries during linking # -sed 's/^PEX_LIBS=.*$/PEX_LIBS=-L\/usr\/local\/ssl\/lib/' Makefile.ssl >xxx; mv xxx Makefile.ssl -sed 's/-L\.\.//' apps/Makefile.ssl >xxx; mv xxx apps/Makefile.ssl -sed 's/-L\.\.//' test/Makefile.ssl >xxx; mv xxx test/Makefile.ssl +sed 's/^PEX_LIBS=.*$/PEX_LIBS=-L\/usr\/local\/ssl\/lib/' Makefile >xxx; mv xxx Makefile.ssl +sed 's/-L\.\.//' apps/Makefile >xxx; mv xxx apps/Makefile +sed 's/-L\.\.//' test/Makefile >xxx; mv xxx test/Makefile # Build the static libs and the executables in one make. make # Install everything diff --git a/src/lib/libssl/src/ssl/Makefile b/src/lib/libssl/src/ssl/Makefile new file mode 100644 index 0000000000..baf191b909 --- /dev/null +++ b/src/lib/libssl/src/ssl/Makefile @@ -0,0 +1,1020 @@ +# +# SSLeay/ssl/Makefile +# + +DIR= ssl +TOP= .. +CC= cc +INCLUDES= -I../crypto -I$(TOP) -I../include $(KRB5_INCLUDES) +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile +AR= ar r +# KRB5 stuff +KRB5_INCLUDES= + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile README ssl-lib.com install.com +TEST=ssltest.c +APPS= + +LIB=$(TOP)/libssl.a +SHARED_LIB= libssl$(SHLIB_EXT) +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 kssl.c +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 kssl.o + +SRC= $(LIBSRC) + +EXHEADER= ssl.h ssl2.h ssl3.h ssl23.h tls1.h kssl.h +HEADER= $(EXHEADER) ssl_locl.h kssl_lcl.h + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ..; $(MAKE) DIRS=$(DIR) all) + +all: shared + +lib: $(LIBOBJ) + $(AR) $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + +shared: lib + if [ -n "$(SHARED_LIBS)" ]; then \ + (cd ..; $(MAKE) $(SHARED_LIB)); \ + fi + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS) + +install: + @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ + done; + +tags: + ctags $(SRC) + +tests: + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +bio_ssl.o: ../include/openssl/aes.h ../include/openssl/asn1.h +bio_ssl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +bio_ssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +bio_ssl.o: ../include/openssl/cast.h ../include/openssl/comp.h +bio_ssl.o: ../include/openssl/crypto.h ../include/openssl/des.h +bio_ssl.o: ../include/openssl/des_old.h ../include/openssl/dh.h +bio_ssl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +bio_ssl.o: ../include/openssl/err.h ../include/openssl/evp.h +bio_ssl.o: ../include/openssl/idea.h ../include/openssl/kssl.h +bio_ssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h +bio_ssl.o: ../include/openssl/md4.h ../include/openssl/md5.h +bio_ssl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +bio_ssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +bio_ssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +bio_ssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h +bio_ssl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +bio_ssl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +bio_ssl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +bio_ssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +bio_ssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +bio_ssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +bio_ssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +bio_ssl.o: ../include/openssl/tls1.h ../include/openssl/ui.h +bio_ssl.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +bio_ssl.o: ../include/openssl/x509_vfy.h bio_ssl.c +kssl.o: ../include/openssl/aes.h ../include/openssl/asn1.h +kssl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +kssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +kssl.o: ../include/openssl/cast.h ../include/openssl/comp.h +kssl.o: ../include/openssl/crypto.h ../include/openssl/des.h +kssl.o: ../include/openssl/des_old.h ../include/openssl/dh.h +kssl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +kssl.o: ../include/openssl/evp.h ../include/openssl/idea.h +kssl.o: ../include/openssl/krb5_asn.h ../include/openssl/kssl.h +kssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h +kssl.o: ../include/openssl/md4.h ../include/openssl/md5.h +kssl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +kssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +kssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +kssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h +kssl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +kssl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +kssl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +kssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +kssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +kssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +kssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +kssl.o: ../include/openssl/tls1.h ../include/openssl/ui.h +kssl.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +kssl.o: ../include/openssl/x509_vfy.h kssl.c +s23_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s23_clnt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_clnt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_clnt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_clnt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h +s23_clnt.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s23_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s23_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h +s23_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s23_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s23_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s23_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s23_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s23_clnt.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s23_clnt.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s23_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s23_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s23_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s23_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s23_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s23_clnt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +s23_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_clnt.c +s23_clnt.o: ssl_locl.h +s23_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s23_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_lib.o: ../include/openssl/err.h ../include/openssl/evp.h +s23_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s23_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s23_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h +s23_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s23_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s23_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s23_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s23_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s23_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s23_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s23_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s23_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s23_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s23_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s23_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s23_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s23_lib.o: ../include/openssl/x509_vfy.h s23_lib.c ssl_locl.h +s23_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s23_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_meth.o: ../include/openssl/err.h ../include/openssl/evp.h +s23_meth.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s23_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s23_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h +s23_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s23_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s23_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s23_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s23_meth.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s23_meth.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s23_meth.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s23_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s23_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s23_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s23_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s23_meth.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s23_meth.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s23_meth.o: ../include/openssl/x509_vfy.h s23_meth.c ssl_locl.h +s23_pkt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s23_pkt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_pkt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_pkt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_pkt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h +s23_pkt.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s23_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s23_pkt.o: ../include/openssl/md4.h ../include/openssl/md5.h +s23_pkt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s23_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s23_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s23_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s23_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s23_pkt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s23_pkt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s23_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s23_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s23_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s23_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s23_pkt.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s23_pkt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s23_pkt.o: ../include/openssl/x509_vfy.h s23_pkt.c ssl_locl.h +s23_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s23_srvr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_srvr.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_srvr.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_srvr.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h +s23_srvr.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s23_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s23_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h +s23_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s23_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s23_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s23_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s23_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s23_srvr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s23_srvr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s23_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s23_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s23_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s23_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s23_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s23_srvr.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +s23_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_srvr.c +s23_srvr.o: ssl_locl.h +s2_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s2_clnt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s2_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s2_clnt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s2_clnt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s2_clnt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s2_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s2_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h +s2_clnt.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s2_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s2_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h +s2_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s2_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s2_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s2_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s2_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s2_clnt.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s2_clnt.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s2_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s2_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s2_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s2_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s2_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s2_clnt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +s2_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_clnt.c +s2_clnt.o: ssl_locl.h +s2_enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s2_enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s2_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s2_enc.o: ../include/openssl/cast.h ../include/openssl/comp.h +s2_enc.o: ../include/openssl/crypto.h ../include/openssl/des.h +s2_enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s2_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s2_enc.o: ../include/openssl/err.h ../include/openssl/evp.h +s2_enc.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s2_enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s2_enc.o: ../include/openssl/md4.h ../include/openssl/md5.h +s2_enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s2_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s2_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s2_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s2_enc.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s2_enc.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s2_enc.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s2_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s2_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s2_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s2_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s2_enc.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s2_enc.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s2_enc.o: ../include/openssl/x509_vfy.h s2_enc.c ssl_locl.h +s2_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s2_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s2_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s2_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h +s2_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h +s2_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s2_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s2_lib.o: ../include/openssl/err.h ../include/openssl/evp.h +s2_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s2_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s2_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h +s2_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s2_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s2_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s2_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s2_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s2_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s2_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s2_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s2_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s2_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s2_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s2_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s2_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s2_lib.o: ../include/openssl/x509_vfy.h s2_lib.c ssl_locl.h +s2_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s2_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s2_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s2_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h +s2_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h +s2_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s2_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s2_meth.o: ../include/openssl/err.h ../include/openssl/evp.h +s2_meth.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s2_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s2_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h +s2_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s2_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s2_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s2_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s2_meth.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s2_meth.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s2_meth.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s2_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s2_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s2_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s2_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s2_meth.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s2_meth.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s2_meth.o: ../include/openssl/x509_vfy.h s2_meth.c ssl_locl.h +s2_pkt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s2_pkt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s2_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s2_pkt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s2_pkt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s2_pkt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s2_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s2_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h +s2_pkt.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s2_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s2_pkt.o: ../include/openssl/md4.h ../include/openssl/md5.h +s2_pkt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s2_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s2_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s2_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s2_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s2_pkt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s2_pkt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s2_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s2_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s2_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s2_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s2_pkt.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s2_pkt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s2_pkt.o: ../include/openssl/x509_vfy.h s2_pkt.c ssl_locl.h +s2_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s2_srvr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s2_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s2_srvr.o: ../include/openssl/cast.h ../include/openssl/comp.h +s2_srvr.o: ../include/openssl/crypto.h ../include/openssl/des.h +s2_srvr.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s2_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s2_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h +s2_srvr.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s2_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s2_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h +s2_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s2_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s2_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s2_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s2_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s2_srvr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s2_srvr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s2_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s2_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s2_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s2_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s2_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s2_srvr.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +s2_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_srvr.c +s2_srvr.o: ssl_locl.h +s3_both.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s3_both.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_both.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_both.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_both.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_both.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_both.o: ../include/openssl/err.h ../include/openssl/evp.h +s3_both.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s3_both.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s3_both.o: ../include/openssl/md4.h ../include/openssl/md5.h +s3_both.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s3_both.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s3_both.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s3_both.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s3_both.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s3_both.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s3_both.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s3_both.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s3_both.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s3_both.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s3_both.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s3_both.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s3_both.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +s3_both.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_both.c +s3_both.o: ssl_locl.h +s3_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s3_clnt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_clnt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_clnt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_clnt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h +s3_clnt.o: ../include/openssl/fips.h ../include/openssl/idea.h +s3_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +s3_clnt.o: ../include/openssl/md2.h ../include/openssl/md4.h +s3_clnt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +s3_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +s3_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +s3_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +s3_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +s3_clnt.o: ../include/openssl/rand.h ../include/openssl/rc2.h +s3_clnt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s3_clnt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s3_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s3_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s3_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s3_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s3_clnt.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s3_clnt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s3_clnt.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_clnt.c ssl_locl.h +s3_enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s3_enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_enc.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_enc.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_enc.o: ../include/openssl/err.h ../include/openssl/evp.h +s3_enc.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s3_enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s3_enc.o: ../include/openssl/md4.h ../include/openssl/md5.h +s3_enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s3_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s3_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s3_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s3_enc.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s3_enc.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s3_enc.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s3_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s3_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s3_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s3_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s3_enc.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s3_enc.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s3_enc.o: ../include/openssl/x509_vfy.h s3_enc.c ssl_locl.h +s3_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s3_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_lib.o: ../include/openssl/err.h ../include/openssl/evp.h +s3_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s3_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s3_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h +s3_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s3_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s3_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s3_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s3_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s3_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s3_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s3_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s3_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s3_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s3_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s3_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s3_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s3_lib.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_lib.c ssl_locl.h +s3_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s3_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_meth.o: ../include/openssl/err.h ../include/openssl/evp.h +s3_meth.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s3_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s3_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h +s3_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s3_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s3_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s3_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s3_meth.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s3_meth.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s3_meth.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s3_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s3_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s3_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s3_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s3_meth.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s3_meth.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s3_meth.o: ../include/openssl/x509_vfy.h s3_meth.c ssl_locl.h +s3_pkt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s3_pkt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_pkt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_pkt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_pkt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h +s3_pkt.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s3_pkt.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s3_pkt.o: ../include/openssl/md4.h ../include/openssl/md5.h +s3_pkt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s3_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s3_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s3_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s3_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s3_pkt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s3_pkt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s3_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s3_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s3_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s3_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s3_pkt.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s3_pkt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s3_pkt.o: ../include/openssl/x509_vfy.h s3_pkt.c ssl_locl.h +s3_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +s3_srvr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_srvr.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_srvr.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_srvr.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h +s3_srvr.o: ../include/openssl/fips.h ../include/openssl/idea.h +s3_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +s3_srvr.o: ../include/openssl/md2.h ../include/openssl/md4.h +s3_srvr.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +s3_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +s3_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +s3_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +s3_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +s3_srvr.o: ../include/openssl/rand.h ../include/openssl/rc2.h +s3_srvr.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s3_srvr.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s3_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s3_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s3_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s3_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s3_srvr.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s3_srvr.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s3_srvr.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_srvr.c ssl_locl.h +ssl_algs.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_algs.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_algs.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_algs.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_algs.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_algs.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_algs.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_algs.o: ../include/openssl/err.h ../include/openssl/evp.h +ssl_algs.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_algs.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_algs.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_algs.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_algs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_algs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_algs.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_algs.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +ssl_algs.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssl_algs.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssl_algs.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssl_algs.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssl_algs.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssl_algs.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssl_algs.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssl_algs.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssl_algs.o: ../include/openssl/x509_vfy.h ssl_algs.c ssl_locl.h +ssl_asn1.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_asn1.o: ../include/openssl/asn1_mac.h ../include/openssl/bio.h +ssl_asn1.o: ../include/openssl/blowfish.h ../include/openssl/bn.h +ssl_asn1.o: ../include/openssl/buffer.h ../include/openssl/cast.h +ssl_asn1.o: ../include/openssl/comp.h ../include/openssl/crypto.h +ssl_asn1.o: ../include/openssl/des.h ../include/openssl/des_old.h +ssl_asn1.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ssl_asn1.o: ../include/openssl/e_os2.h ../include/openssl/err.h +ssl_asn1.o: ../include/openssl/evp.h ../include/openssl/idea.h +ssl_asn1.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ssl_asn1.o: ../include/openssl/md2.h ../include/openssl/md4.h +ssl_asn1.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +ssl_asn1.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ssl_asn1.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ssl_asn1.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ssl_asn1.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ssl_asn1.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +ssl_asn1.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +ssl_asn1.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +ssl_asn1.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ssl_asn1.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ssl_asn1.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ssl_asn1.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ssl_asn1.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +ssl_asn1.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_asn1.c +ssl_asn1.o: ssl_locl.h +ssl_cert.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_cert.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_cert.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_cert.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_cert.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ssl_cert.o: ../include/openssl/des.h ../include/openssl/des_old.h +ssl_cert.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ssl_cert.o: ../include/openssl/e_os2.h ../include/openssl/err.h +ssl_cert.o: ../include/openssl/evp.h ../include/openssl/fips.h +ssl_cert.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_cert.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_cert.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_cert.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_cert.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_cert.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_cert.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_cert.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +ssl_cert.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssl_cert.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssl_cert.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssl_cert.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssl_cert.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssl_cert.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssl_cert.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssl_cert.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssl_cert.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h +ssl_cert.o: ssl_cert.c ssl_locl.h +ssl_ciph.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_ciph.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_ciph.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_ciph.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_ciph.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_ciph.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_ciph.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_ciph.o: ../include/openssl/err.h ../include/openssl/evp.h +ssl_ciph.o: ../include/openssl/fips.h ../include/openssl/idea.h +ssl_ciph.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ssl_ciph.o: ../include/openssl/md2.h ../include/openssl/md4.h +ssl_ciph.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +ssl_ciph.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ssl_ciph.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ssl_ciph.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ssl_ciph.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ssl_ciph.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +ssl_ciph.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +ssl_ciph.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +ssl_ciph.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ssl_ciph.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ssl_ciph.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ssl_ciph.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ssl_ciph.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +ssl_ciph.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_ciph.c +ssl_ciph.o: ssl_locl.h +ssl_err.o: ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_err.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_err.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_err.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_err.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_err.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_err.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_err.o: ../include/openssl/err.h ../include/openssl/evp.h +ssl_err.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_err.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_err.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_err.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_err.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_err.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_err.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +ssl_err.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssl_err.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssl_err.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssl_err.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssl_err.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssl_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssl_err.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssl_err.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssl_err.o: ../include/openssl/x509_vfy.h ssl_err.c +ssl_err2.o: ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_err2.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_err2.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_err2.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_err2.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_err2.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_err2.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_err2.o: ../include/openssl/err.h ../include/openssl/evp.h +ssl_err2.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_err2.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_err2.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_err2.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_err2.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_err2.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_err2.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_err2.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +ssl_err2.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssl_err2.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssl_err2.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssl_err2.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssl_err2.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssl_err2.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssl_err2.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssl_err2.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssl_err2.o: ../include/openssl/x509_vfy.h ssl_err2.c +ssl_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_lib.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ssl_lib.o: ../include/openssl/des.h ../include/openssl/des_old.h +ssl_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ssl_lib.o: ../include/openssl/e_os2.h ../include/openssl/err.h +ssl_lib.o: ../include/openssl/evp.h ../include/openssl/fips.h +ssl_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +ssl_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssl_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssl_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssl_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssl_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssl_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssl_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssl_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssl_lib.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h kssl_lcl.h +ssl_lib.o: ssl_lib.c ssl_locl.h +ssl_rsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_rsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_rsa.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_rsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_rsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_rsa.o: ../include/openssl/err.h ../include/openssl/evp.h +ssl_rsa.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_rsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_rsa.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_rsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_rsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_rsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_rsa.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +ssl_rsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssl_rsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssl_rsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssl_rsa.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssl_rsa.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssl_rsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssl_rsa.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssl_rsa.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssl_rsa.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_rsa.c +ssl_sess.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_sess.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_sess.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_sess.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_sess.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_sess.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_sess.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_sess.o: ../include/openssl/err.h ../include/openssl/evp.h +ssl_sess.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_sess.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_sess.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_sess.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_sess.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_sess.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_sess.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_sess.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +ssl_sess.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +ssl_sess.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +ssl_sess.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +ssl_sess.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ssl_sess.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ssl_sess.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ssl_sess.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ssl_sess.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +ssl_sess.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h +ssl_sess.o: ssl_sess.c +ssl_stat.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_stat.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_stat.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_stat.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_stat.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_stat.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_stat.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_stat.o: ../include/openssl/err.h ../include/openssl/evp.h +ssl_stat.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_stat.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_stat.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_stat.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_stat.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_stat.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_stat.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_stat.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +ssl_stat.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssl_stat.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssl_stat.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssl_stat.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssl_stat.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssl_stat.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssl_stat.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssl_stat.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssl_stat.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_stat.c +ssl_txt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssl_txt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_txt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_txt.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_txt.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_txt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_txt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_txt.o: ../include/openssl/err.h ../include/openssl/evp.h +ssl_txt.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_txt.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_txt.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_txt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_txt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_txt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_txt.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_txt.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +ssl_txt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssl_txt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssl_txt.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssl_txt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssl_txt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssl_txt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssl_txt.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssl_txt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssl_txt.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_txt.c +t1_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +t1_clnt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_clnt.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_clnt.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_clnt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h +t1_clnt.o: ../include/openssl/idea.h ../include/openssl/kssl.h +t1_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h +t1_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h +t1_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +t1_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +t1_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +t1_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h +t1_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +t1_clnt.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +t1_clnt.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +t1_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +t1_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h +t1_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +t1_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +t1_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +t1_clnt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +t1_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h +t1_clnt.o: t1_clnt.c +t1_enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +t1_enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_enc.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_enc.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_enc.o: ../include/openssl/err.h ../include/openssl/evp.h +t1_enc.o: ../include/openssl/fips.h ../include/openssl/hmac.h +t1_enc.o: ../include/openssl/idea.h ../include/openssl/kssl.h +t1_enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h +t1_enc.o: ../include/openssl/md4.h ../include/openssl/md5.h +t1_enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +t1_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +t1_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +t1_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h +t1_enc.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +t1_enc.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +t1_enc.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +t1_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h +t1_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +t1_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +t1_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +t1_enc.o: ../include/openssl/tls1.h ../include/openssl/ui.h +t1_enc.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +t1_enc.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_enc.c +t1_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +t1_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_lib.o: ../include/openssl/err.h ../include/openssl/evp.h +t1_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h +t1_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h +t1_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h +t1_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +t1_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +t1_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +t1_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h +t1_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +t1_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +t1_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +t1_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h +t1_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +t1_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +t1_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +t1_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h +t1_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +t1_lib.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_lib.c +t1_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +t1_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h +t1_meth.o: ../include/openssl/idea.h ../include/openssl/kssl.h +t1_meth.o: ../include/openssl/lhash.h ../include/openssl/md2.h +t1_meth.o: ../include/openssl/md4.h ../include/openssl/md5.h +t1_meth.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +t1_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +t1_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +t1_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h +t1_meth.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +t1_meth.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +t1_meth.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +t1_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h +t1_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +t1_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +t1_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +t1_meth.o: ../include/openssl/tls1.h ../include/openssl/ui.h +t1_meth.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +t1_meth.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_meth.c +t1_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +t1_srvr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_srvr.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_srvr.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_srvr.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h +t1_srvr.o: ../include/openssl/idea.h ../include/openssl/kssl.h +t1_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h +t1_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h +t1_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +t1_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +t1_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +t1_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +t1_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +t1_srvr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +t1_srvr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +t1_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +t1_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +t1_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +t1_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +t1_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +t1_srvr.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +t1_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h +t1_srvr.o: t1_srvr.c diff --git a/src/lib/libssl/src/ssl/kssl.c b/src/lib/libssl/src/ssl/kssl.c index 51378897f6..3afa95f3fa 100644 --- a/src/lib/libssl/src/ssl/kssl.c +++ b/src/lib/libssl/src/ssl/kssl.c @@ -73,6 +73,8 @@ #undef _XOPEN_SOURCE /* To avoid clashes with anything else... */ #include +#define KRB5_PRIVATE 1 + #include #include #include @@ -80,6 +82,10 @@ #ifndef OPENSSL_NO_KRB5 +#ifndef ENOMEM +#define ENOMEM KRB5KRB_ERR_GENERIC +#endif + /* * When OpenSSL is built on Windows, we do not want to require that * the Kerberos DLLs be available in order for the OpenSSL DLLs to @@ -932,7 +938,7 @@ print_krb5_data(char *label, krb5_data *kdata) int i; printf("%s[%d] ", label, kdata->length); - for (i=0; i < kdata->length; i++) + for (i=0; i < (int)kdata->length; i++) { if (0 && isprint((int) kdata->data[i])) printf( "%c ", kdata->data[i]); @@ -984,14 +990,14 @@ print_krb5_keyblock(char *label, krb5_keyblock *keyblk) #ifdef KRB5_HEIMDAL printf("%s\n\t[et%d:%d]: ", label, keyblk->keytype, keyblk->keyvalue->length); - for (i=0; i < keyblk->keyvalue->length; i++) + for (i=0; i < (int)keyblk->keyvalue->length; i++) { printf("%02x",(unsigned char *)(keyblk->keyvalue->contents)[i]); } printf("\n"); #else printf("%s\n\t[et%d:%d]: ", label, keyblk->enctype, keyblk->length); - for (i=0; i < keyblk->length; i++) + for (i=0; i < (int)keyblk->length; i++) { printf("%02x",keyblk->contents[i]); } @@ -1010,12 +1016,12 @@ print_krb5_princ(char *label, krb5_principal_data *princ) printf("%s principal Realm: ", label); if (princ == NULL) return; - for (ui=0; ui < princ->realm.length; ui++) putchar(princ->realm.data[ui]); + for (ui=0; ui < (int)princ->realm.length; ui++) putchar(princ->realm.data[ui]); printf(" (nametype %d) has %d strings:\n", princ->type,princ->length); - for (i=0; i < princ->length; i++) + for (i=0; i < (int)princ->length; i++) { printf("\t%d [%d]: ", i, princ->data[i].length); - for (uj=0; uj < princ->data[i].length; uj++) { + for (uj=0; uj < (int)princ->data[i].length; uj++) { putchar(princ->data[i].data[uj]); } printf("\n"); diff --git a/src/lib/libssl/src/ssl/kssl.h b/src/lib/libssl/src/ssl/kssl.h index 19a689b089..a3d20e1ccb 100644 --- a/src/lib/libssl/src/ssl/kssl.h +++ b/src/lib/libssl/src/ssl/kssl.h @@ -82,6 +82,12 @@ extern "C" { #ifdef KRB5_HEIMDAL typedef unsigned char krb5_octet; #define FAR +#else + +#ifndef FAR +#define FAR +#endif + #endif /* Uncomment this to debug kssl problems or diff --git a/src/lib/libssl/src/ssl/s23_clnt.c b/src/lib/libssl/src/ssl/s23_clnt.c index 64ee4269ec..779e94a35c 100644 --- a/src/lib/libssl/src/ssl/s23_clnt.c +++ b/src/lib/libssl/src/ssl/s23_clnt.c @@ -235,7 +235,8 @@ static int ssl23_client_hello(SSL *s) #endif p=s->s3->client_random; - RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE); + if(RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE) <= 0) + return -1; /* Do the message type and length last */ d= &(buf[2]); @@ -248,6 +249,14 @@ static int ssl23_client_hello(SSL *s) *(d++)=TLS1_VERSION_MINOR; s->client_version=TLS1_VERSION; } +#ifdef OPENSSL_FIPS + else if(FIPS_mode()) + { + SSLerr(SSL_F_SSL23_CLIENT_HELLO, + SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE); + return -1; + } +#endif else if (!(s->options & SSL_OP_NO_SSLv3)) { *(d++)=SSL3_VERSION_MAJOR; @@ -296,7 +305,9 @@ static int ssl23_client_hello(SSL *s) i=ch_len; s2n(i,d); memset(&(s->s3->client_random[0]),0,SSL3_RANDOM_SIZE); - RAND_pseudo_bytes(&(s->s3->client_random[SSL3_RANDOM_SIZE-i]),i); + if(RAND_pseudo_bytes(&(s->s3->client_random[SSL3_RANDOM_SIZE-i]),i) <= 0) + return -1; + memcpy(p,&(s->s3->client_random[SSL3_RANDOM_SIZE-i]),i); p+=i; @@ -426,6 +437,14 @@ static int ssl23_get_server_hello(SSL *s) if ((p[2] == SSL3_VERSION_MINOR) && !(s->options & SSL_OP_NO_SSLv3)) { +#ifdef OPENSSL_FIPS + if(FIPS_mode()) + { + SSLerr(SSL_F_SSL23_GET_SERVER_HELLO, + SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE); + goto err; + } +#endif s->version=SSL3_VERSION; s->method=SSLv3_client_method(); } diff --git a/src/lib/libssl/src/ssl/s23_lib.c b/src/lib/libssl/src/ssl/s23_lib.c index b70002a647..8d7dbcf569 100644 --- a/src/lib/libssl/src/ssl/s23_lib.c +++ b/src/lib/libssl/src/ssl/s23_lib.c @@ -87,7 +87,7 @@ static SSL_METHOD SSLv23_data= { ssl3_ctx_ctrl, ssl23_get_cipher_by_char, ssl23_put_cipher_by_char, - ssl_undefined_function, + ssl_undefined_const_function, ssl23_num_ciphers, ssl23_get_cipher, ssl_bad_method, diff --git a/src/lib/libssl/src/ssl/s23_srvr.c b/src/lib/libssl/src/ssl/s23_srvr.c index c5404ca0bc..92f3391f60 100644 --- a/src/lib/libssl/src/ssl/s23_srvr.c +++ b/src/lib/libssl/src/ssl/s23_srvr.c @@ -407,6 +407,15 @@ int ssl23_get_client_hello(SSL *s) } } +#ifdef OPENSSL_FIPS + if (FIPS_mode() && (s->version < TLS1_VERSION)) + { + SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO, + SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE); + goto err; + } +#endif + if (s->state == SSL23_ST_SR_CLNT_HELLO_B) { /* we have SSLv3/TLSv1 in an SSLv2 header diff --git a/src/lib/libssl/src/ssl/s2_clnt.c b/src/lib/libssl/src/ssl/s2_clnt.c index 43b32eb415..c67829f495 100644 --- a/src/lib/libssl/src/ssl/s2_clnt.c +++ b/src/lib/libssl/src/ssl/s2_clnt.c @@ -612,7 +612,8 @@ static int client_hello(SSL *s) s->s2->challenge_length=SSL2_CHALLENGE_LENGTH; s2n(SSL2_CHALLENGE_LENGTH,p); /* challenge length */ /*challenge id data*/ - RAND_pseudo_bytes(s->s2->challenge,SSL2_CHALLENGE_LENGTH); + if(RAND_pseudo_bytes(s->s2->challenge,SSL2_CHALLENGE_LENGTH) <= 0) + return -1; memcpy(d,s->s2->challenge,SSL2_CHALLENGE_LENGTH); d+=SSL2_CHALLENGE_LENGTH; @@ -660,7 +661,9 @@ static int client_master_key(SSL *s) SSLerr(SSL_F_CLIENT_MASTER_KEY, ERR_R_INTERNAL_ERROR); return -1; } - if (i > 0) RAND_pseudo_bytes(sess->key_arg,i); + if (i > 0) + if(RAND_pseudo_bytes(sess->key_arg,i) <= 0) + return -1; /* make a master key */ i=EVP_CIPHER_key_length(c); diff --git a/src/lib/libssl/src/ssl/s2_lib.c b/src/lib/libssl/src/ssl/s2_lib.c index edcef4dda2..26ce8c8d98 100644 --- a/src/lib/libssl/src/ssl/s2_lib.c +++ b/src/lib/libssl/src/ssl/s2_lib.c @@ -263,7 +263,7 @@ SSL_CIPHER *ssl2_get_cipher(unsigned int u) return(NULL); } -int ssl2_pending(SSL *s) +int ssl2_pending(const SSL *s) { return SSL_in_init(s) ? 0 : s->s2->ract_data_length; } diff --git a/src/lib/libssl/src/ssl/s2_srvr.c b/src/lib/libssl/src/ssl/s2_srvr.c index 5da2a54af3..853871f28c 100644 --- a/src/lib/libssl/src/ssl/s2_srvr.c +++ b/src/lib/libssl/src/ssl/s2_srvr.c @@ -498,7 +498,8 @@ static int get_client_master_key(SSL *s) i=ek; else i=EVP_CIPHER_key_length(c); - RAND_pseudo_bytes(p,i); + if(RAND_pseudo_bytes(p,i) <= 0) + return 0; } #else if (i < 0) @@ -804,7 +805,8 @@ static int server_hello(SSL *s) /* make and send conn_id */ s2n(SSL2_CONNECTION_ID_LENGTH,p); /* add conn_id length */ s->s2->conn_id_length=SSL2_CONNECTION_ID_LENGTH; - RAND_pseudo_bytes(s->s2->conn_id,(int)s->s2->conn_id_length); + if(RAND_pseudo_bytes(s->s2->conn_id,(int)s->s2->conn_id_length) <= 0) + return -1; memcpy(d,s->s2->conn_id,SSL2_CONNECTION_ID_LENGTH); d+=SSL2_CONNECTION_ID_LENGTH; @@ -949,7 +951,8 @@ static int request_certificate(SSL *s) p=(unsigned char *)s->init_buf->data; *(p++)=SSL2_MT_REQUEST_CERTIFICATE; *(p++)=SSL2_AT_MD5_WITH_RSA_ENCRYPTION; - RAND_pseudo_bytes(ccd,SSL2_MIN_CERT_CHALLENGE_LENGTH); + if(RAND_pseudo_bytes(ccd,SSL2_MIN_CERT_CHALLENGE_LENGTH) <= 0) + return -1; memcpy(p,ccd,SSL2_MIN_CERT_CHALLENGE_LENGTH); s->state=SSL2_ST_SEND_REQUEST_CERTIFICATE_B; diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c index 26ce0cb963..0969476b25 100644 --- a/src/lib/libssl/src/ssl/s3_clnt.c +++ b/src/lib/libssl/src/ssl/s3_clnt.c @@ -117,6 +117,7 @@ #include #include #include +#include static SSL_METHOD *ssl3_get_client_method(int ver); static int ssl3_client_hello(SSL *s); @@ -534,7 +535,8 @@ static int ssl3_client_hello(SSL *s) p=s->s3->client_random; Time=time(NULL); /* Time */ l2n(Time,p); - RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time)); + if(RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0) + goto err; /* Do the message type and length last */ d=p= &(buf[4]); @@ -1160,11 +1162,14 @@ static int ssl3_get_key_exchange(SSL *s) q=md_buf; for (num=2; num > 0; num--) { + EVP_MD_CTX_set_flags(&md_ctx, + EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); EVP_DigestInit_ex(&md_ctx,(num == 2) ?s->ctx->md5:s->ctx->sha1, NULL); EVP_DigestUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_DigestUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_DigestUpdate(&md_ctx,param,param_len); + EVP_DigestFinal_ex(&md_ctx,q,(unsigned int *)&i); q+=i; j+=i; diff --git a/src/lib/libssl/src/ssl/s3_enc.c b/src/lib/libssl/src/ssl/s3_enc.c index 92efb9597d..a012d3f2b5 100644 --- a/src/lib/libssl/src/ssl/s3_enc.c +++ b/src/lib/libssl/src/ssl/s3_enc.c @@ -146,6 +146,7 @@ static int ssl3_generate_key_block(SSL *s, unsigned char *km, int num) #endif k=0; EVP_MD_CTX_init(&m5); + EVP_MD_CTX_set_flags(&m5, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); EVP_MD_CTX_init(&s1); for (i=0; is3->finish_dgst1), + EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); EVP_DigestInit_ex(&(s->s3->finish_dgst1),s->ctx->md5, NULL); EVP_DigestInit_ex(&(s->s3->finish_dgst2),s->ctx->sha1, NULL); } @@ -641,6 +644,7 @@ int ssl3_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, unsigned int n; EVP_MD_CTX_init(&ctx); + EVP_MD_CTX_set_flags(&ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); for (i=0; i<3; i++) { EVP_DigestInit_ex(&ctx,s->ctx->sha1, NULL); diff --git a/src/lib/libssl/src/ssl/s3_lib.c b/src/lib/libssl/src/ssl/s3_lib.c index d04096016c..9bf1dbec06 100644 --- a/src/lib/libssl/src/ssl/s3_lib.c +++ b/src/lib/libssl/src/ssl/s3_lib.c @@ -142,7 +142,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_RSA_NULL_SHA, SSL3_CK_RSA_NULL_SHA, SSL_kRSA|SSL_aRSA|SSL_eNULL |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_STRONG_NONE, + SSL_NOT_EXP|SSL_STRONG_NONE|SSL_FIPS, 0, 0, 0, @@ -183,7 +183,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_ADH_DES_40_CBC_SHA, SSL3_CK_ADH_DES_40_CBC_SHA, SSL_kEDH |SSL_aNULL|SSL_DES|SSL_SHA1|SSL_SSLV3, - SSL_EXPORT|SSL_EXP40, + SSL_EXPORT|SSL_EXP40|SSL_FIPS, 0, 40, 128, @@ -196,7 +196,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_ADH_DES_64_CBC_SHA, SSL3_CK_ADH_DES_64_CBC_SHA, SSL_kEDH |SSL_aNULL|SSL_DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_LOW, + SSL_NOT_EXP|SSL_LOW|SSL_FIPS, 0, 56, 56, @@ -209,7 +209,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_ADH_DES_192_CBC_SHA, SSL3_CK_ADH_DES_192_CBC_SHA, SSL_kEDH |SSL_aNULL|SSL_3DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 168, 168, @@ -291,7 +291,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_RSA_DES_40_CBC_SHA, SSL3_CK_RSA_DES_40_CBC_SHA, SSL_kRSA|SSL_aRSA|SSL_DES|SSL_SHA1|SSL_SSLV3, - SSL_EXPORT|SSL_EXP40, + SSL_EXPORT|SSL_EXP40|SSL_FIPS, 0, 40, 56, @@ -304,7 +304,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_RSA_DES_64_CBC_SHA, SSL3_CK_RSA_DES_64_CBC_SHA, SSL_kRSA|SSL_aRSA|SSL_DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_LOW, + SSL_NOT_EXP|SSL_LOW|SSL_FIPS, 0, 56, 56, @@ -317,7 +317,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_RSA_DES_192_CBC3_SHA, SSL3_CK_RSA_DES_192_CBC3_SHA, SSL_kRSA|SSL_aRSA|SSL_3DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 168, 168, @@ -332,7 +332,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_DH_DSS_DES_40_CBC_SHA, SSL3_CK_DH_DSS_DES_40_CBC_SHA, SSL_kDHd |SSL_aDH|SSL_DES|SSL_SHA1|SSL_SSLV3, - SSL_EXPORT|SSL_EXP40, + SSL_EXPORT|SSL_EXP40|SSL_FIPS, 0, 40, 56, @@ -345,7 +345,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_DH_DSS_DES_64_CBC_SHA, SSL3_CK_DH_DSS_DES_64_CBC_SHA, SSL_kDHd |SSL_aDH|SSL_DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_LOW, + SSL_NOT_EXP|SSL_LOW|SSL_FIPS, 0, 56, 56, @@ -358,7 +358,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_DH_DSS_DES_192_CBC3_SHA, SSL3_CK_DH_DSS_DES_192_CBC3_SHA, SSL_kDHd |SSL_aDH|SSL_3DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 168, 168, @@ -371,7 +371,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_DH_RSA_DES_40_CBC_SHA, SSL3_CK_DH_RSA_DES_40_CBC_SHA, SSL_kDHr |SSL_aDH|SSL_DES|SSL_SHA1|SSL_SSLV3, - SSL_EXPORT|SSL_EXP40, + SSL_EXPORT|SSL_EXP40|SSL_FIPS, 0, 40, 56, @@ -384,7 +384,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_DH_RSA_DES_64_CBC_SHA, SSL3_CK_DH_RSA_DES_64_CBC_SHA, SSL_kDHr |SSL_aDH|SSL_DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_LOW, + SSL_NOT_EXP|SSL_LOW|SSL_FIPS, 0, 56, 56, @@ -397,7 +397,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_DH_RSA_DES_192_CBC3_SHA, SSL3_CK_DH_RSA_DES_192_CBC3_SHA, SSL_kDHr |SSL_aDH|SSL_3DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 168, 168, @@ -412,7 +412,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_EDH_DSS_DES_40_CBC_SHA, SSL3_CK_EDH_DSS_DES_40_CBC_SHA, SSL_kEDH|SSL_aDSS|SSL_DES|SSL_SHA1|SSL_SSLV3, - SSL_EXPORT|SSL_EXP40, + SSL_EXPORT|SSL_EXP40|SSL_FIPS, 0, 40, 56, @@ -425,7 +425,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_EDH_DSS_DES_64_CBC_SHA, SSL3_CK_EDH_DSS_DES_64_CBC_SHA, SSL_kEDH|SSL_aDSS|SSL_DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_LOW, + SSL_NOT_EXP|SSL_LOW|SSL_FIPS, 0, 56, 56, @@ -438,7 +438,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA, SSL3_CK_EDH_DSS_DES_192_CBC3_SHA, SSL_kEDH|SSL_aDSS|SSL_3DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 168, 168, @@ -451,7 +451,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_EDH_RSA_DES_40_CBC_SHA, SSL3_CK_EDH_RSA_DES_40_CBC_SHA, SSL_kEDH|SSL_aRSA|SSL_DES|SSL_SHA1|SSL_SSLV3, - SSL_EXPORT|SSL_EXP40, + SSL_EXPORT|SSL_EXP40|SSL_FIPS, 0, 40, 56, @@ -464,7 +464,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_EDH_RSA_DES_64_CBC_SHA, SSL3_CK_EDH_RSA_DES_64_CBC_SHA, SSL_kEDH|SSL_aRSA|SSL_DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_LOW, + SSL_NOT_EXP|SSL_LOW|SSL_FIPS, 0, 56, 56, @@ -477,7 +477,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA, SSL3_CK_EDH_RSA_DES_192_CBC3_SHA, SSL_kEDH|SSL_aRSA|SSL_3DES |SSL_SHA1|SSL_SSLV3, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 168, 168, @@ -541,7 +541,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_KRB5_DES_64_CBC_SHA, SSL3_CK_KRB5_DES_64_CBC_SHA, SSL_kKRB5|SSL_aKRB5| SSL_DES|SSL_SHA1 |SSL_SSLV3, - SSL_NOT_EXP|SSL_LOW, + SSL_NOT_EXP|SSL_LOW|SSL_FIPS, 0, 56, 56, @@ -555,7 +555,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_KRB5_DES_192_CBC3_SHA, SSL3_CK_KRB5_DES_192_CBC3_SHA, SSL_kKRB5|SSL_aKRB5| SSL_3DES|SSL_SHA1 |SSL_SSLV3, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 112, 168, @@ -653,7 +653,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL3_TXT_KRB5_DES_40_CBC_SHA, SSL3_CK_KRB5_DES_40_CBC_SHA, SSL_kKRB5|SSL_aKRB5| SSL_DES|SSL_SHA1 |SSL_SSLV3, - SSL_EXPORT|SSL_EXP40, + SSL_EXPORT|SSL_EXP40|SSL_FIPS, 0, 40, 56, @@ -767,7 +767,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA, TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA, SSL_kRSA|SSL_aRSA|SSL_DES|SSL_SHA|SSL_TLSV1, - SSL_EXPORT|SSL_EXP56, + SSL_EXPORT|SSL_EXP56|SSL_FIPS, 0, 56, 56, @@ -780,7 +780,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA, TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA, SSL_kEDH|SSL_aDSS|SSL_DES|SSL_SHA|SSL_TLSV1, - SSL_EXPORT|SSL_EXP56, + SSL_EXPORT|SSL_EXP56|SSL_FIPS, 0, 56, 56, @@ -835,7 +835,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_RSA_WITH_AES_128_SHA, TLS1_CK_RSA_WITH_AES_128_SHA, SSL_kRSA|SSL_aRSA|SSL_AES|SSL_SHA |SSL_TLSV1, - SSL_NOT_EXP|SSL_MEDIUM, + SSL_NOT_EXP|SSL_MEDIUM|SSL_FIPS, 0, 128, 128, @@ -848,7 +848,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_DH_DSS_WITH_AES_128_SHA, TLS1_CK_DH_DSS_WITH_AES_128_SHA, SSL_kDHd|SSL_aDH|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_MEDIUM, + SSL_NOT_EXP|SSL_MEDIUM|SSL_FIPS, 0, 128, 128, @@ -861,7 +861,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_DH_RSA_WITH_AES_128_SHA, TLS1_CK_DH_RSA_WITH_AES_128_SHA, SSL_kDHr|SSL_aDH|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_MEDIUM, + SSL_NOT_EXP|SSL_MEDIUM|SSL_FIPS, 0, 128, 128, @@ -874,7 +874,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_DHE_DSS_WITH_AES_128_SHA, TLS1_CK_DHE_DSS_WITH_AES_128_SHA, SSL_kEDH|SSL_aDSS|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_MEDIUM, + SSL_NOT_EXP|SSL_MEDIUM|SSL_FIPS, 0, 128, 128, @@ -887,7 +887,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_DHE_RSA_WITH_AES_128_SHA, TLS1_CK_DHE_RSA_WITH_AES_128_SHA, SSL_kEDH|SSL_aRSA|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_MEDIUM, + SSL_NOT_EXP|SSL_MEDIUM|SSL_FIPS, 0, 128, 128, @@ -900,7 +900,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_ADH_WITH_AES_128_SHA, TLS1_CK_ADH_WITH_AES_128_SHA, SSL_kEDH|SSL_aNULL|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_MEDIUM, + SSL_NOT_EXP|SSL_MEDIUM|SSL_FIPS, 0, 128, 128, @@ -914,7 +914,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_RSA_WITH_AES_256_SHA, TLS1_CK_RSA_WITH_AES_256_SHA, SSL_kRSA|SSL_aRSA|SSL_AES|SSL_SHA |SSL_TLSV1, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 256, 256, @@ -927,7 +927,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_DH_DSS_WITH_AES_256_SHA, TLS1_CK_DH_DSS_WITH_AES_256_SHA, SSL_kDHd|SSL_aDH|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 256, 256, @@ -940,7 +940,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_DH_RSA_WITH_AES_256_SHA, TLS1_CK_DH_RSA_WITH_AES_256_SHA, SSL_kDHr|SSL_aDH|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 256, 256, @@ -953,7 +953,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_DHE_DSS_WITH_AES_256_SHA, TLS1_CK_DHE_DSS_WITH_AES_256_SHA, SSL_kEDH|SSL_aDSS|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 256, 256, @@ -966,7 +966,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_DHE_RSA_WITH_AES_256_SHA, TLS1_CK_DHE_RSA_WITH_AES_256_SHA, SSL_kEDH|SSL_aRSA|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 256, 256, @@ -979,7 +979,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ TLS1_TXT_ADH_WITH_AES_256_SHA, TLS1_CK_ADH_WITH_AES_256_SHA, SSL_kEDH|SSL_aNULL|SSL_AES|SSL_SHA|SSL_TLSV1, - SSL_NOT_EXP|SSL_HIGH, + SSL_NOT_EXP|SSL_HIGH|SSL_FIPS, 0, 256, 256, @@ -1057,7 +1057,7 @@ SSL_CIPHER *ssl3_get_cipher(unsigned int u) return(NULL); } -int ssl3_pending(SSL *s) +int ssl3_pending(const SSL *s) { if (s->rstate == SSL_ST_READ_BODY) return 0; diff --git a/src/lib/libssl/src/ssl/s3_pkt.c b/src/lib/libssl/src/ssl/s3_pkt.c index 9f3e5139ad..cb0b12b400 100644 --- a/src/lib/libssl/src/ssl/s3_pkt.c +++ b/src/lib/libssl/src/ssl/s3_pkt.c @@ -862,7 +862,7 @@ start: { al=SSL_AD_UNEXPECTED_MESSAGE; SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_DATA_BETWEEN_CCS_AND_FINISHED); - goto err; + goto f_err; } /* If the other end has shut down, throw anything we read away @@ -969,7 +969,7 @@ start: { al=SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_BAD_HELLO_REQUEST); - goto err; + goto f_err; } if (s->msg_callback) @@ -1080,17 +1080,17 @@ start: if ( (rr->length != 1) || (rr->off != 0) || (rr->data[0] != SSL3_MT_CCS)) { - i=SSL_AD_ILLEGAL_PARAMETER; + al=SSL_AD_ILLEGAL_PARAMETER; SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_BAD_CHANGE_CIPHER_SPEC); - goto err; + goto f_err; } /* Check we have a cipher to change to */ if (s->s3->tmp.new_cipher == NULL) { - i=SSL_AD_UNEXPECTED_MESSAGE; + al=SSL_AD_UNEXPECTED_MESSAGE; SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_CCS_RECEIVED_EARLY); - goto err; + goto f_err; } rr->length=0; diff --git a/src/lib/libssl/src/ssl/s3_srvr.c b/src/lib/libssl/src/ssl/s3_srvr.c index deb3cffabe..c4a1a71523 100644 --- a/src/lib/libssl/src/ssl/s3_srvr.c +++ b/src/lib/libssl/src/ssl/s3_srvr.c @@ -125,6 +125,7 @@ #include #endif #include +#include static SSL_METHOD *ssl3_get_server_method(int ver); static int ssl3_get_client_hello(SSL *s); @@ -955,7 +956,8 @@ static int ssl3_send_server_hello(SSL *s) p=s->s3->server_random; Time=time(NULL); /* Time */ l2n(Time,p); - RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time)); + if(RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0) + return -1; /* Do the message type and length last */ d=p= &(buf[4]); @@ -1211,6 +1213,8 @@ static int ssl3_send_server_key_exchange(SSL *s) j=0; for (num=2; num > 0; num--) { + EVP_MD_CTX_set_flags(&md_ctx, + EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); EVP_DigestInit_ex(&md_ctx,(num == 2) ?s->ctx->md5:s->ctx->sha1, NULL); EVP_DigestUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); @@ -1491,7 +1495,8 @@ static int ssl3_get_client_key_exchange(SSL *s) i = SSL_MAX_MASTER_KEY_LENGTH; p[0] = s->client_version >> 8; p[1] = s->client_version & 0xff; - RAND_pseudo_bytes(p+2, i-2); /* should be RAND_bytes, but we cannot work around a failure */ + if(RAND_pseudo_bytes(p+2, i-2) <= 0) /* should be RAND_bytes, but we cannot work around a failure */ + goto err; } s->session->master_key_length= @@ -1589,7 +1594,7 @@ static int ssl3_get_client_key_exchange(SSL *s) n2s(p,i); enc_ticket.length = i; - if (n < enc_ticket.length + 6) + if (n < (long)enc_ticket.length + 6) { SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, SSL_R_DATA_LENGTH_TOO_LONG); @@ -1602,7 +1607,7 @@ static int ssl3_get_client_key_exchange(SSL *s) n2s(p,i); authenticator.length = i; - if (n < enc_ticket.length + authenticator.length + 6) + if (n < (long)(enc_ticket.length + authenticator.length + 6)) { SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, SSL_R_DATA_LENGTH_TOO_LONG); @@ -1627,8 +1632,8 @@ static int ssl3_get_client_key_exchange(SSL *s) goto err; } - if (n != enc_ticket.length + authenticator.length + - enc_pms.length + 6) + if (n != (long)(enc_ticket.length + authenticator.length + + enc_pms.length + 6)) { SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, SSL_R_DATA_LENGTH_TOO_LONG); diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h index 913bd40eea..3161f532cf 100644 --- a/src/lib/libssl/src/ssl/ssl.h +++ b/src/lib/libssl/src/ssl/ssl.h @@ -239,6 +239,7 @@ extern "C" { #define SSL_TXT_LOW "LOW" #define SSL_TXT_MEDIUM "MEDIUM" #define SSL_TXT_HIGH "HIGH" +#define SSL_TXT_FIPS "FIPS" #define SSL_TXT_kFZA "kFZA" #define SSL_TXT_aFZA "aFZA" #define SSL_TXT_eFZA "eFZA" @@ -372,7 +373,7 @@ typedef struct ssl_method_st long (*ssl_ctx_ctrl)(SSL_CTX *ctx,int cmd,long larg,void *parg); SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr); int (*put_cipher_by_char)(const SSL_CIPHER *cipher,unsigned char *ptr); - int (*ssl_pending)(SSL *s); + int (*ssl_pending)(const SSL *s); int (*num_ciphers)(void); SSL_CIPHER *(*get_cipher)(unsigned ncipher); struct ssl_method_st *(*get_ssl_method)(int version); @@ -998,8 +999,8 @@ extern "C" { * -- that we sent (SSL_get_finished) * -- that we expected from peer (SSL_get_peer_finished). * Returns length (0 == no Finished so far), copies up to 'count' bytes. */ -size_t SSL_get_finished(SSL *s, void *buf, size_t count); -size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count); +size_t SSL_get_finished(const SSL *s, void *buf, size_t count); +size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count); /* use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options * are 'ored' with SSL_VERIFY_PEER if they are desired */ @@ -1171,26 +1172,26 @@ int SSL_CTX_set_cipher_list(SSL_CTX *,const char *str); SSL_CTX *SSL_CTX_new(SSL_METHOD *meth); void SSL_CTX_free(SSL_CTX *); long SSL_CTX_set_timeout(SSL_CTX *ctx,long t); -long SSL_CTX_get_timeout(SSL_CTX *ctx); -X509_STORE *SSL_CTX_get_cert_store(SSL_CTX *); +long SSL_CTX_get_timeout(const SSL_CTX *ctx); +X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *); void SSL_CTX_set_cert_store(SSL_CTX *,X509_STORE *); -int SSL_want(SSL *s); +int SSL_want(const SSL *s); int SSL_clear(SSL *s); void SSL_CTX_flush_sessions(SSL_CTX *ctx,long tm); -SSL_CIPHER *SSL_get_current_cipher(SSL *s); -int SSL_CIPHER_get_bits(SSL_CIPHER *c,int *alg_bits); -char * SSL_CIPHER_get_version(SSL_CIPHER *c); -const char * SSL_CIPHER_get_name(SSL_CIPHER *c); - -int SSL_get_fd(SSL *s); -int SSL_get_rfd(SSL *s); -int SSL_get_wfd(SSL *s); -const char * SSL_get_cipher_list(SSL *s,int n); -char * SSL_get_shared_ciphers(SSL *s, char *buf, int len); -int SSL_get_read_ahead(SSL * s); -int SSL_pending(SSL *s); +SSL_CIPHER *SSL_get_current_cipher(const SSL *s); +int SSL_CIPHER_get_bits(const SSL_CIPHER *c,int *alg_bits); +char * SSL_CIPHER_get_version(const SSL_CIPHER *c); +const char * SSL_CIPHER_get_name(const SSL_CIPHER *c); + +int SSL_get_fd(const SSL *s); +int SSL_get_rfd(const SSL *s); +int SSL_get_wfd(const SSL *s); +const char * SSL_get_cipher_list(const SSL *s,int n); +char * SSL_get_shared_ciphers(const SSL *s, char *buf, int len); +int SSL_get_read_ahead(const SSL * s); +int SSL_pending(const SSL *s); #ifndef OPENSSL_NO_SOCK int SSL_set_fd(SSL *s, int fd); int SSL_set_rfd(SSL *s, int fd); @@ -1198,14 +1199,14 @@ int SSL_set_wfd(SSL *s, int fd); #endif #ifndef OPENSSL_NO_BIO void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); -BIO * SSL_get_rbio(SSL *s); -BIO * SSL_get_wbio(SSL *s); +BIO * SSL_get_rbio(const SSL *s); +BIO * SSL_get_wbio(const SSL *s); #endif int SSL_set_cipher_list(SSL *s, const char *str); void SSL_set_read_ahead(SSL *s, int yes); -int SSL_get_verify_mode(SSL *s); -int SSL_get_verify_depth(SSL *s); -int (*SSL_get_verify_callback(SSL *s))(int,X509_STORE_CTX *); +int SSL_get_verify_mode(const SSL *s); +int SSL_get_verify_depth(const SSL *s); +int (*SSL_get_verify_callback(const SSL *s))(int,X509_STORE_CTX *); void SSL_set_verify(SSL *s, int mode, int (*callback)(int ok,X509_STORE_CTX *ctx)); void SSL_set_verify_depth(SSL *s, int depth); @@ -1243,20 +1244,20 @@ const char *SSL_state_string(const SSL *s); const char *SSL_rstate_string(const SSL *s); const char *SSL_state_string_long(const SSL *s); const char *SSL_rstate_string_long(const SSL *s); -long SSL_SESSION_get_time(SSL_SESSION *s); +long SSL_SESSION_get_time(const SSL_SESSION *s); long SSL_SESSION_set_time(SSL_SESSION *s, long t); -long SSL_SESSION_get_timeout(SSL_SESSION *s); +long SSL_SESSION_get_timeout(const SSL_SESSION *s); long SSL_SESSION_set_timeout(SSL_SESSION *s, long t); -void SSL_copy_session_id(SSL *to,SSL *from); +void SSL_copy_session_id(SSL *to,const SSL *from); SSL_SESSION *SSL_SESSION_new(void); -unsigned long SSL_SESSION_hash(SSL_SESSION *a); -int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b); +unsigned long SSL_SESSION_hash(const SSL_SESSION *a); +int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b); #ifndef OPENSSL_NO_FP_API -int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses); +int SSL_SESSION_print_fp(FILE *fp,const SSL_SESSION *ses); #endif #ifndef OPENSSL_NO_BIO -int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses); +int SSL_SESSION_print(BIO *fp,const SSL_SESSION *ses); #endif void SSL_SESSION_free(SSL_SESSION *ses); int i2d_SSL_SESSION(SSL_SESSION *in,unsigned char **pp); @@ -1267,17 +1268,18 @@ int SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB); int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB); int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, unsigned int id_len); -SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,unsigned char **pp,long length); +SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,const unsigned char * const *pp, + long length); #ifdef HEADER_X509_H -X509 * SSL_get_peer_certificate(SSL *s); +X509 * SSL_get_peer_certificate(const SSL *s); #endif -STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s); +STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s); -int SSL_CTX_get_verify_mode(SSL_CTX *ctx); -int SSL_CTX_get_verify_depth(SSL_CTX *ctx); -int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))(int,X509_STORE_CTX *); +int SSL_CTX_get_verify_mode(const SSL_CTX *ctx); +int SSL_CTX_get_verify_depth(const SSL_CTX *ctx); +int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int,X509_STORE_CTX *); void SSL_CTX_set_verify(SSL_CTX *ctx,int mode, int (*callback)(int, X509_STORE_CTX *)); void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth); @@ -1295,8 +1297,8 @@ int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, unsigned char *d); void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb); void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u); -int SSL_CTX_check_private_key(SSL_CTX *ctx); -int SSL_check_private_key(SSL *ctx); +int SSL_CTX_check_private_key(const SSL_CTX *ctx); +int SSL_check_private_key(const SSL *ctx); int SSL_CTX_set_session_id_context(SSL_CTX *ctx,const unsigned char *sid_ctx, unsigned int sid_ctx_len); @@ -1321,8 +1323,8 @@ long SSL_callback_ctrl(SSL *, int, void (*)()); long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg); long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)()); -int SSL_get_error(SSL *s,int ret_code); -const char *SSL_get_version(SSL *s); +int SSL_get_error(const SSL *s,int ret_code); +const char *SSL_get_version(const SSL *s); /* This sets the 'default' SSL version that SSL_new() will create */ int SSL_CTX_set_ssl_version(SSL_CTX *ctx,SSL_METHOD *meth); @@ -1343,7 +1345,7 @@ SSL_METHOD *TLSv1_method(void); /* TLSv1.0 */ SSL_METHOD *TLSv1_server_method(void); /* TLSv1.0 */ SSL_METHOD *TLSv1_client_method(void); /* TLSv1.0 */ -STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *s); +STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s); int SSL_do_handshake(SSL *s); int SSL_renegotiate(SSL *s); @@ -1359,15 +1361,15 @@ const char *SSL_alert_desc_string(int value); void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list); void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list); -STACK_OF(X509_NAME) *SSL_get_client_CA_list(SSL *s); -STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *s); +STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s); +STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *s); int SSL_add_client_CA(SSL *ssl,X509 *x); int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x); void SSL_set_connect_state(SSL *s); void SSL_set_accept_state(SSL *s); -long SSL_get_default_timeout(SSL *s); +long SSL_get_default_timeout(const SSL *s); int SSL_library_init(void ); @@ -1376,43 +1378,43 @@ STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk); SSL *SSL_dup(SSL *ssl); -X509 *SSL_get_certificate(SSL *ssl); +X509 *SSL_get_certificate(const SSL *ssl); /* EVP_PKEY */ struct evp_pkey_st *SSL_get_privatekey(SSL *ssl); void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode); -int SSL_CTX_get_quiet_shutdown(SSL_CTX *ctx); +int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx); void SSL_set_quiet_shutdown(SSL *ssl,int mode); -int SSL_get_quiet_shutdown(SSL *ssl); +int SSL_get_quiet_shutdown(const SSL *ssl); void SSL_set_shutdown(SSL *ssl,int mode); -int SSL_get_shutdown(SSL *ssl); -int SSL_version(SSL *ssl); +int SSL_get_shutdown(const SSL *ssl); +int SSL_version(const SSL *ssl); int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx); int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath); #define SSL_get0_session SSL_get_session /* just peek at pointer */ -SSL_SESSION *SSL_get_session(SSL *ssl); +SSL_SESSION *SSL_get_session(const SSL *ssl); SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */ -SSL_CTX *SSL_get_SSL_CTX(SSL *ssl); +SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl); void SSL_set_info_callback(SSL *ssl, void (*cb)(const SSL *ssl,int type,int val)); -void (*SSL_get_info_callback(SSL *ssl))(const SSL *ssl,int type,int val); -int SSL_state(SSL *ssl); +void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl,int type,int val); +int SSL_state(const SSL *ssl); void SSL_set_verify_result(SSL *ssl,long v); -long SSL_get_verify_result(SSL *ssl); +long SSL_get_verify_result(const SSL *ssl); int SSL_set_ex_data(SSL *ssl,int idx,void *data); -void *SSL_get_ex_data(SSL *ssl,int idx); +void *SSL_get_ex_data(const SSL *ssl,int idx); int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); int SSL_SESSION_set_ex_data(SSL_SESSION *ss,int idx,void *data); -void *SSL_SESSION_get_ex_data(SSL_SESSION *ss,int idx); +void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss,int idx); int SSL_SESSION_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); int SSL_CTX_set_ex_data(SSL_CTX *ssl,int idx,void *data); -void *SSL_CTX_get_ex_data(SSL_CTX *ssl,int idx); +void *SSL_CTX_get_ex_data(const SSL_CTX *ssl,int idx); int SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); @@ -1603,6 +1605,7 @@ void ERR_load_SSL_strings(void); #define SSL_F_SSL_SET_TRUST 228 #define SSL_F_SSL_SET_WFD 196 #define SSL_F_SSL_SHUTDOWN 224 +#define SSL_F_SSL_UNDEFINED_CONST_FUNCTION 243 #define SSL_F_SSL_UNDEFINED_FUNCTION 197 #define SSL_F_SSL_USE_CERTIFICATE 198 #define SSL_F_SSL_USE_CERTIFICATE_ASN1 199 @@ -1741,6 +1744,7 @@ void ERR_load_SSL_strings(void); #define SSL_R_NULL_SSL_CTX 195 #define SSL_R_NULL_SSL_METHOD_PASSED 196 #define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197 +#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE 1115 #define SSL_R_PACKET_LENGTH_TOO_LONG 198 #define SSL_R_PATH_TOO_LONG 270 #define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199 diff --git a/src/lib/libssl/src/ssl/ssl_asn1.c b/src/lib/libssl/src/ssl/ssl_asn1.c index d8ff8fc4a3..4d5900ad2f 100644 --- a/src/lib/libssl/src/ssl/ssl_asn1.c +++ b/src/lib/libssl/src/ssl/ssl_asn1.c @@ -226,7 +226,7 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp) M_ASN1_I2D_finish(); } -SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, +SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char * const *pp, long length) { int version,ssl_version=0,i; @@ -266,7 +266,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, ((unsigned long)os.data[1]<< 8L)| (unsigned long)os.data[2]; } - else if ((ssl_version>>8) == 3) + else if ((ssl_version>>8) == SSL3_VERSION_MAJOR) { if (os.length != 2) { @@ -287,9 +287,9 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, ret->cipher_id=id; M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING); - if ((ssl_version>>8) == SSL3_VERSION) + if ((ssl_version>>8) == SSL3_VERSION_MAJOR) i=SSL3_MAX_SSL_SESSION_ID_LENGTH; - else /* if (ssl_version == SSL2_VERSION) */ + else /* if (ssl_version == SSL2_VERSION_MAJOR) */ i=SSL2_MAX_SSL_SESSION_ID_LENGTH; if (os.length > i) diff --git a/src/lib/libssl/src/ssl/ssl_cert.c b/src/lib/libssl/src/ssl/ssl_cert.c index 2cfb615878..b8b9bc2390 100644 --- a/src/lib/libssl/src/ssl/ssl_cert.c +++ b/src/lib/libssl/src/ssl/ssl_cert.c @@ -117,6 +117,7 @@ #if defined(WIN32) #include +#include #endif #ifdef NeXT @@ -129,6 +130,7 @@ #include #include #include "ssl_locl.h" +#include int SSL_get_ex_data_X509_STORE_CTX_idx(void) { @@ -542,12 +544,12 @@ void SSL_CTX_set_client_CA_list(SSL_CTX *ctx,STACK_OF(X509_NAME) *name_list) set_client_CA_list(&(ctx->client_CA),name_list); } -STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *ctx) +STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *ctx) { return(ctx->client_CA); } -STACK_OF(X509_NAME) *SSL_get_client_CA_list(SSL *s) +STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s) { if (s->type == SSL_ST_CONNECT) { /* we are in the client */ @@ -783,36 +785,54 @@ err: #else /* OPENSSL_SYS_WIN32 */ +#if defined(_WIN32_WCE) +# ifndef UNICODE +# error "WinCE comes in UNICODE flavor only..." +# endif +# if _WIN32_WCE<101 && !defined(OPENSSL_NO_MULTIBYTE) +# define OPENSSL_NO_MULTIBYTE +# endif +# ifndef FindFirstFile +# define FindFirstFile FindFirstFileW +# endif +# ifndef FindNextFile +# define FindNextFile FindNextFileW +# endif +#endif + int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, const char *dir) { WIN32_FIND_DATA FindFileData; HANDLE hFind; - int ret = 0; -#ifdef OPENSSL_SYS_WINCE - WCHAR* wdir = NULL; -#endif + int ret = 0; + TCHAR *wdir = NULL; + size_t i,len_0 = strlen(dir)+1; /* len_0 accounts for trailing 0 */ + char buf[1024],*slash; + + if (len_0 > (sizeof(buf)-14)) /* 14 is just some value... */ + { + SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); + return ret; + } CRYPTO_w_lock(CRYPTO_LOCK_READDIR); - -#ifdef OPENSSL_SYS_WINCE - /* convert strings to UNICODE */ - { - BOOL result = FALSE; - int i; - wdir = malloc((strlen(dir)+1)*2); + + if (sizeof(TCHAR) != sizeof(char)) + { + wdir = (TCHAR *)malloc(len_0*sizeof(TCHAR)); if (wdir == NULL) goto err_noclose; - for (i=0; i<(int)strlen(dir)+1; i++) - wdir[i] = (short)dir[i]; - } +#ifndef OPENSSL_NO_MULTIBYTE + if (!MultiByteToWideChar(CP_ACP,0,dir,len_0, + (WCHAR *)wdir,len_0)) #endif + for (i=0;i sizeof buf) -#else - if(strlen(dir)+strlen(FindFileData.cFileName)+2 > sizeof buf) -#endif + + strncpy(buf,dir,sizeof(buf)); /* strcpy is safe too... */ + buf[len_0-1]='/'; /* no trailing zero! */ + slash=buf+len_0; + + do { + const TCHAR *fnam=FindFileData.cFileName; + size_t flen_0=_tcslen(fnam)+1; + + if (flen_0 > (sizeof(buf)-len_0)) { SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); goto err; } - - r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,FindFileData.cFileName); - if (r <= 0 || r >= sizeof buf) - goto err; + /* else strcpy would be safe too... */ + + if (sizeof(TCHAR) != sizeof(char)) + { +#ifndef OPENSSL_NO_MULTIBYTE + if (!WideCharToMultiByte(CP_ACP,0, + (WCHAR *)fnam,flen_0, + slash,sizeof(buf)-len_0, + NULL,0)) +#endif + for (i=0;i #include #include +#include #include "ssl_locl.h" #define SSL_ENC_DES_IDX 0 @@ -153,13 +154,13 @@ static const SSL_CIPHER cipher_aliases[]={ {0,SSL_TXT_LOW, 0, 0, SSL_LOW, 0,0,0,0,SSL_STRONG_MASK}, {0,SSL_TXT_MEDIUM,0, 0,SSL_MEDIUM, 0,0,0,0,SSL_STRONG_MASK}, {0,SSL_TXT_HIGH, 0, 0, SSL_HIGH, 0,0,0,0,SSL_STRONG_MASK}, + {0,SSL_TXT_FIPS, 0, 0, SSL_FIPS, 0,0,0,0,SSL_FIPS|SSL_STRONG_NONE}, }; static int init_ciphers=1; static void load_ciphers(void) { - init_ciphers=0; ssl_cipher_methods[SSL_ENC_DES_IDX]= EVP_get_cipherbyname(SN_des_cbc); ssl_cipher_methods[SSL_ENC_3DES_IDX]= @@ -183,9 +184,10 @@ static void load_ciphers(void) EVP_get_digestbyname(SN_md5); ssl_digest_methods[SSL_MD_SHA1_IDX]= EVP_get_digestbyname(SN_sha1); + init_ciphers=0; } -int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc, +int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc, const EVP_MD **md, SSL_COMP **comp) { int i; @@ -359,7 +361,12 @@ static void ssl_cipher_collect_ciphers(const SSL_METHOD *ssl_method, { c = ssl_method->get_cipher(i); /* drop those that use any of that is not available */ +#ifdef OPENSSL_FIPS + if ((c != NULL) && c->valid && !(c->algorithms & mask) + && (!FIPS_mode() || (c->algo_strength & SSL_FIPS))) +#else if ((c != NULL) && c->valid && !(c->algorithms & mask)) +#endif { co_list[co_list_num].cipher = c; co_list[co_list_num].next = NULL; @@ -854,7 +861,11 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, */ for (curr = head; curr != NULL; curr = curr->next) { +#ifdef OPENSSL_FIPS + if (curr->active && (!FIPS_mode() || curr->cipher->algo_strength & SSL_FIPS)) +#else if (curr->active) +#endif { sk_SSL_CIPHER_push(cipherstack, curr->cipher); #ifdef CIPHER_DEBUG @@ -1054,7 +1065,7 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len) return(buf); } -char *SSL_CIPHER_get_version(SSL_CIPHER *c) +char *SSL_CIPHER_get_version(const SSL_CIPHER *c) { int i; @@ -1069,7 +1080,7 @@ char *SSL_CIPHER_get_version(SSL_CIPHER *c) } /* return the actual cipher being used */ -const char *SSL_CIPHER_get_name(SSL_CIPHER *c) +const char *SSL_CIPHER_get_name(const SSL_CIPHER *c) { if (c != NULL) return(c->name); @@ -1077,7 +1088,7 @@ const char *SSL_CIPHER_get_name(SSL_CIPHER *c) } /* number of bits for symmetric cipher */ -int SSL_CIPHER_get_bits(SSL_CIPHER *c, int *alg_bits) +int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits) { int ret=0; diff --git a/src/lib/libssl/src/ssl/ssl_err.c b/src/lib/libssl/src/ssl/ssl_err.c index d2cb181503..29b8ff4788 100644 --- a/src/lib/libssl/src/ssl/ssl_err.c +++ b/src/lib/libssl/src/ssl/ssl_err.c @@ -1,6 +1,6 @@ /* ssl/ssl_err.c */ /* ==================================================================== - * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -193,6 +193,7 @@ static ERR_STRING_DATA SSL_str_functs[]= {ERR_PACK(0,SSL_F_SSL_SET_TRUST,0), "SSL_set_trust"}, {ERR_PACK(0,SSL_F_SSL_SET_WFD,0), "SSL_set_wfd"}, {ERR_PACK(0,SSL_F_SSL_SHUTDOWN,0), "SSL_shutdown"}, +{ERR_PACK(0,SSL_F_SSL_UNDEFINED_CONST_FUNCTION,0), "SSL_UNDEFINED_CONST_FUNCTION"}, {ERR_PACK(0,SSL_F_SSL_UNDEFINED_FUNCTION,0), "SSL_UNDEFINED_FUNCTION"}, {ERR_PACK(0,SSL_F_SSL_USE_CERTIFICATE,0), "SSL_use_certificate"}, {ERR_PACK(0,SSL_F_SSL_USE_CERTIFICATE_ASN1,0), "SSL_use_certificate_ASN1"}, @@ -334,6 +335,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_NULL_SSL_CTX ,"null ssl ctx"}, {SSL_R_NULL_SSL_METHOD_PASSED ,"null ssl method passed"}, {SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED ,"old session cipher not returned"}, +{SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE ,"only tls allowed in fips mode"}, {SSL_R_PACKET_LENGTH_TOO_LONG ,"packet length too long"}, {SSL_R_PATH_TOO_LONG ,"path too long"}, {SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE ,"peer did not return a certificate"}, diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index ee9a82d586..631229558f 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c @@ -121,6 +121,7 @@ #include #include #include +#include const char *SSL_version_str=OPENSSL_VERSION_TEXT; @@ -500,18 +501,18 @@ void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio) s->wbio=wbio; } -BIO *SSL_get_rbio(SSL *s) +BIO *SSL_get_rbio(const SSL *s) { return(s->rbio); } -BIO *SSL_get_wbio(SSL *s) +BIO *SSL_get_wbio(const SSL *s) { return(s->wbio); } -int SSL_get_fd(SSL *s) +int SSL_get_fd(const SSL *s) { return(SSL_get_rfd(s)); } -int SSL_get_rfd(SSL *s) +int SSL_get_rfd(const SSL *s) { int ret= -1; BIO *b,*r; @@ -523,7 +524,7 @@ int SSL_get_rfd(SSL *s) return(ret); } -int SSL_get_wfd(SSL *s) +int SSL_get_wfd(const SSL *s) { int ret= -1; BIO *b,*r; @@ -605,7 +606,7 @@ err: /* return length of latest Finished message we sent, copy to 'buf' */ -size_t SSL_get_finished(SSL *s, void *buf, size_t count) +size_t SSL_get_finished(const SSL *s, void *buf, size_t count) { size_t ret = 0; @@ -620,7 +621,7 @@ size_t SSL_get_finished(SSL *s, void *buf, size_t count) } /* return length of latest Finished message we expected, copy to 'buf' */ -size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count) +size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count) { size_t ret = 0; @@ -635,32 +636,32 @@ size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count) } -int SSL_get_verify_mode(SSL *s) +int SSL_get_verify_mode(const SSL *s) { return(s->verify_mode); } -int SSL_get_verify_depth(SSL *s) +int SSL_get_verify_depth(const SSL *s) { return(s->verify_depth); } -int (*SSL_get_verify_callback(SSL *s))(int,X509_STORE_CTX *) +int (*SSL_get_verify_callback(const SSL *s))(int,X509_STORE_CTX *) { return(s->verify_callback); } -int SSL_CTX_get_verify_mode(SSL_CTX *ctx) +int SSL_CTX_get_verify_mode(const SSL_CTX *ctx) { return(ctx->verify_mode); } -int SSL_CTX_get_verify_depth(SSL_CTX *ctx) +int SSL_CTX_get_verify_depth(const SSL_CTX *ctx) { return(ctx->verify_depth); } -int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))(int,X509_STORE_CTX *) +int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int,X509_STORE_CTX *) { return(ctx->default_verify_callback); } @@ -683,12 +684,12 @@ void SSL_set_read_ahead(SSL *s,int yes) s->read_ahead=yes; } -int SSL_get_read_ahead(SSL *s) +int SSL_get_read_ahead(const SSL *s) { return(s->read_ahead); } -int SSL_pending(SSL *s) +int SSL_pending(const SSL *s) { /* SSL_pending cannot work properly if read-ahead is enabled * (SSL_[CTX_]ctrl(..., SSL_CTRL_SET_READ_AHEAD, 1, NULL)), @@ -700,7 +701,7 @@ int SSL_pending(SSL *s) return(s->method->ssl_pending(s)); } -X509 *SSL_get_peer_certificate(SSL *s) +X509 *SSL_get_peer_certificate(const SSL *s) { X509 *r; @@ -716,7 +717,7 @@ X509 *SSL_get_peer_certificate(SSL *s) return(r); } -STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s) +STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s) { STACK_OF(X509) *r; @@ -733,7 +734,7 @@ STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s) /* Now in theory, since the calling process own 't' it should be safe to * modify. We need to be able to read f without being hassled */ -void SSL_copy_session_id(SSL *t,SSL *f) +void SSL_copy_session_id(SSL *t,const SSL *f) { CERT *tmp; @@ -762,7 +763,7 @@ void SSL_copy_session_id(SSL *t,SSL *f) } /* Fix this so it checks all the valid key/cert options */ -int SSL_CTX_check_private_key(SSL_CTX *ctx) +int SSL_CTX_check_private_key(const SSL_CTX *ctx) { if ( (ctx == NULL) || (ctx->cert == NULL) || @@ -780,7 +781,7 @@ int SSL_CTX_check_private_key(SSL_CTX *ctx) } /* Fix this function so that it takes an optional type parameter */ -int SSL_check_private_key(SSL *ssl) +int SSL_check_private_key(const SSL *ssl) { if (ssl == NULL) { @@ -824,7 +825,7 @@ int SSL_connect(SSL *s) return(s->method->ssl_connect(s)); } -long SSL_get_default_timeout(SSL *s) +long SSL_get_default_timeout(const SSL *s) { return(s->method->get_timeout()); } @@ -1071,7 +1072,7 @@ int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, /** return a STACK of the ciphers available for the SSL and in order of * preference */ -STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *s) +STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s) { if (s != NULL) { @@ -1108,7 +1109,7 @@ STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s) } /** The old interface to get the same thing as SSL_get_ciphers() */ -const char *SSL_get_cipher_list(SSL *s,int n) +const char *SSL_get_cipher_list(const SSL *s,int n) { SSL_CIPHER *c; STACK_OF(SSL_CIPHER) *sk; @@ -1145,7 +1146,7 @@ int SSL_set_cipher_list(SSL *s,const char *str) } /* works well for SSLv2, not so good for SSLv3 */ -char *SSL_get_shared_ciphers(SSL *s,char *buf,int len) +char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len) { char *p; const char *cp; @@ -1249,7 +1250,7 @@ err: return(NULL); } -unsigned long SSL_SESSION_hash(SSL_SESSION *a) +unsigned long SSL_SESSION_hash(const SSL_SESSION *a) { unsigned long l; @@ -1266,7 +1267,7 @@ unsigned long SSL_SESSION_hash(SSL_SESSION *a) * SSL_CTX_has_matching_session_id() is checked accordingly. It relies on being * able to construct an SSL_SESSION that will collide with any existing session * with a matching session ID. */ -int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b) +int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b) { if (a->ssl_version != b->ssl_version) return(1); @@ -1292,6 +1293,14 @@ SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) return(NULL); } +#ifdef OPENSSL_FIPS + if (FIPS_mode() && (meth->version < TLS1_VERSION)) + { + SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE); + return NULL; + } +#endif + if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) { SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_X509_VERIFICATION_SETUP_PROBLEMS); @@ -1722,7 +1731,7 @@ int SSL_set_ssl_method(SSL *s,SSL_METHOD *meth) return(ret); } -int SSL_get_error(SSL *s,int i) +int SSL_get_error(const SSL *s,int i) { int reason; unsigned long l; @@ -1856,13 +1865,19 @@ int ssl_undefined_function(SSL *s) return(0); } +int ssl_undefined_const_function(const SSL *s) + { + SSLerr(SSL_F_SSL_UNDEFINED_CONST_FUNCTION,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return(0); + } + SSL_METHOD *ssl_bad_method(int ver) { SSLerr(SSL_F_SSL_BAD_METHOD,ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return(NULL); } -const char *SSL_get_version(SSL *s) +const char *SSL_get_version(const SSL *s) { if (s->version == TLS1_VERSION) return("TLSv1"); @@ -2031,7 +2046,7 @@ void ssl_clear_cipher_ctx(SSL *s) } /* Fix this function so that it takes an optional type parameter */ -X509 *SSL_get_certificate(SSL *s) +X509 *SSL_get_certificate(const SSL *s) { if (s->cert != NULL) return(s->cert->key->x509); @@ -2048,7 +2063,7 @@ EVP_PKEY *SSL_get_privatekey(SSL *s) return(NULL); } -SSL_CIPHER *SSL_get_current_cipher(SSL *s) +SSL_CIPHER *SSL_get_current_cipher(const SSL *s) { if ((s->session != NULL) && (s->session->cipher != NULL)) return(s->session->cipher); @@ -2112,7 +2127,7 @@ void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode) ctx->quiet_shutdown=mode; } -int SSL_CTX_get_quiet_shutdown(SSL_CTX *ctx) +int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx) { return(ctx->quiet_shutdown); } @@ -2122,7 +2137,7 @@ void SSL_set_quiet_shutdown(SSL *s,int mode) s->quiet_shutdown=mode; } -int SSL_get_quiet_shutdown(SSL *s) +int SSL_get_quiet_shutdown(const SSL *s) { return(s->quiet_shutdown); } @@ -2132,17 +2147,17 @@ void SSL_set_shutdown(SSL *s,int mode) s->shutdown=mode; } -int SSL_get_shutdown(SSL *s) +int SSL_get_shutdown(const SSL *s) { return(s->shutdown); } -int SSL_version(SSL *s) +int SSL_version(const SSL *s) { return(s->version); } -SSL_CTX *SSL_get_SSL_CTX(SSL *ssl) +SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl) { return(ssl->ctx); } @@ -2156,7 +2171,9 @@ int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx) int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath) { - return(X509_STORE_load_locations(ctx->cert_store,CAfile,CApath)); + int r; + r=X509_STORE_load_locations(ctx->cert_store,CAfile,CApath); + return r; } #endif @@ -2166,12 +2183,12 @@ void SSL_set_info_callback(SSL *ssl, ssl->info_callback=cb; } -void (*SSL_get_info_callback(SSL *ssl))(const SSL *ssl,int type,int val) +void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl,int type,int val) { return ssl->info_callback; } -int SSL_state(SSL *ssl) +int SSL_state(const SSL *ssl) { return(ssl->state); } @@ -2181,7 +2198,7 @@ void SSL_set_verify_result(SSL *ssl,long arg) ssl->verify_result=arg; } -long SSL_get_verify_result(SSL *ssl) +long SSL_get_verify_result(const SSL *ssl) { return(ssl->verify_result); } @@ -2198,7 +2215,7 @@ int SSL_set_ex_data(SSL *s,int idx,void *arg) return(CRYPTO_set_ex_data(&s->ex_data,idx,arg)); } -void *SSL_get_ex_data(SSL *s,int idx) +void *SSL_get_ex_data(const SSL *s,int idx) { return(CRYPTO_get_ex_data(&s->ex_data,idx)); } @@ -2215,7 +2232,7 @@ int SSL_CTX_set_ex_data(SSL_CTX *s,int idx,void *arg) return(CRYPTO_set_ex_data(&s->ex_data,idx,arg)); } -void *SSL_CTX_get_ex_data(SSL_CTX *s,int idx) +void *SSL_CTX_get_ex_data(const SSL_CTX *s,int idx) { return(CRYPTO_get_ex_data(&s->ex_data,idx)); } @@ -2225,7 +2242,7 @@ int ssl_ok(SSL *s) return(1); } -X509_STORE *SSL_CTX_get_cert_store(SSL_CTX *ctx) +X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *ctx) { return(ctx->cert_store); } @@ -2237,7 +2254,7 @@ void SSL_CTX_set_cert_store(SSL_CTX *ctx,X509_STORE *store) ctx->cert_store=store; } -int SSL_want(SSL *s) +int SSL_want(const SSL *s) { return(s->rwstate); } diff --git a/src/lib/libssl/src/ssl/ssl_locl.h b/src/lib/libssl/src/ssl/ssl_locl.h index dd6c7a7323..25a144a0d0 100644 --- a/src/lib/libssl/src/ssl/ssl_locl.h +++ b/src/lib/libssl/src/ssl/ssl_locl.h @@ -302,8 +302,9 @@ #define SSL_LOW 0x00000020L #define SSL_MEDIUM 0x00000040L #define SSL_HIGH 0x00000080L +#define SSL_FIPS 0x00000100L -/* we have used 000000ff - 24 bits left to go */ +/* we have used 000001ff - 23 bits left to go */ /* * Macros to check the export status and cipher strength for export ciphers. @@ -498,10 +499,11 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *meth, STACK_OF(SSL_CIPHER) **sorted, const char *rule_str); void ssl_update_cache(SSL *s, int mode); -int ssl_cipher_get_evp(SSL_SESSION *s,const EVP_CIPHER **enc,const EVP_MD **md, - SSL_COMP **comp); +int ssl_cipher_get_evp(const SSL_SESSION *s,const EVP_CIPHER **enc, + const EVP_MD **md,SSL_COMP **comp); int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk); int ssl_undefined_function(SSL *s); +int ssl_undefined_const_function(const SSL *s); X509 *ssl_get_server_send_cert(SSL *); EVP_PKEY *ssl_get_sign_pkey(SSL *,SSL_CIPHER *); int ssl_cert_type(X509 *x,EVP_PKEY *pkey); @@ -535,7 +537,7 @@ long ssl2_ctrl(SSL *s,int cmd, long larg, void *parg); long ssl2_ctx_ctrl(SSL_CTX *s,int cmd, long larg, void *parg); long ssl2_callback_ctrl(SSL *s,int cmd, void (*fp)()); long ssl2_ctx_callback_ctrl(SSL_CTX *s,int cmd, void (*fp)()); -int ssl2_pending(SSL *s); +int ssl2_pending(const SSL *s); SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p); int ssl3_put_cipher_by_char(const SSL_CIPHER *c,unsigned char *p); @@ -583,7 +585,7 @@ long ssl3_ctrl(SSL *s,int cmd, long larg, void *parg); long ssl3_ctx_ctrl(SSL_CTX *s,int cmd, long larg, void *parg); long ssl3_callback_ctrl(SSL *s,int cmd, void (*fp)()); long ssl3_ctx_callback_ctrl(SSL_CTX *s,int cmd, void (*fp)()); -int ssl3_pending(SSL *s); +int ssl3_pending(const SSL *s); int ssl23_accept(SSL *s); int ssl23_connect(SSL *s); diff --git a/src/lib/libssl/src/ssl/ssl_rsa.c b/src/lib/libssl/src/ssl/ssl_rsa.c index 330390519b..fb0bd4d045 100644 --- a/src/lib/libssl/src/ssl/ssl_rsa.c +++ b/src/lib/libssl/src/ssl/ssl_rsa.c @@ -804,7 +804,7 @@ int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file) /* When the while loop ends, it's usually just EOF. */ err = ERR_peek_last_error(); if (ERR_GET_LIB(err) == ERR_LIB_PEM && ERR_GET_REASON(err) == PEM_R_NO_START_LINE) - (void)ERR_get_error(); + ERR_clear_error(); else ret = 0; /* some real error */ } diff --git a/src/lib/libssl/src/ssl/ssl_sess.c b/src/lib/libssl/src/ssl/ssl_sess.c index 7016c87d3b..5f12aa361c 100644 --- a/src/lib/libssl/src/ssl/ssl_sess.c +++ b/src/lib/libssl/src/ssl/ssl_sess.c @@ -65,7 +65,7 @@ static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s); static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s); static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck); -SSL_SESSION *SSL_get_session(SSL *ssl) +SSL_SESSION *SSL_get_session(const SSL *ssl) /* aka SSL_get0_session; gets 0 objects, just returns a copy of the pointer */ { return(ssl->session); @@ -98,7 +98,7 @@ int SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg) return(CRYPTO_set_ex_data(&s->ex_data,idx,arg)); } -void *SSL_SESSION_get_ex_data(SSL_SESSION *s, int idx) +void *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) { return(CRYPTO_get_ex_data(&s->ex_data,idx)); } @@ -141,7 +141,8 @@ static int def_generate_session_id(const SSL *ssl, unsigned char *id, { unsigned int retry = 0; do - RAND_pseudo_bytes(id, *id_len); + if(RAND_pseudo_bytes(id, *id_len) <= 0) + return 0; while(SSL_has_matching_session_id(ssl, id, *id_len) && (++retry < MAX_SESS_ID_ATTEMPTS)); if(retry < MAX_SESS_ID_ATTEMPTS) @@ -609,13 +610,13 @@ long SSL_SESSION_set_timeout(SSL_SESSION *s, long t) return(1); } -long SSL_SESSION_get_timeout(SSL_SESSION *s) +long SSL_SESSION_get_timeout(const SSL_SESSION *s) { if (s == NULL) return(0); return(s->timeout); } -long SSL_SESSION_get_time(SSL_SESSION *s) +long SSL_SESSION_get_time(const SSL_SESSION *s) { if (s == NULL) return(0); return(s->time); @@ -637,7 +638,7 @@ long SSL_CTX_set_timeout(SSL_CTX *s, long t) return(l); } -long SSL_CTX_get_timeout(SSL_CTX *s) +long SSL_CTX_get_timeout(const SSL_CTX *s) { if (s == NULL) return(0); return(s->session_timeout); diff --git a/src/lib/libssl/src/ssl/ssl_txt.c b/src/lib/libssl/src/ssl/ssl_txt.c index 40b76b1b26..8655a31333 100644 --- a/src/lib/libssl/src/ssl/ssl_txt.c +++ b/src/lib/libssl/src/ssl/ssl_txt.c @@ -61,7 +61,7 @@ #include "ssl_locl.h" #ifndef OPENSSL_NO_FP_API -int SSL_SESSION_print_fp(FILE *fp, SSL_SESSION *x) +int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *x) { BIO *b; int ret; @@ -78,7 +78,7 @@ int SSL_SESSION_print_fp(FILE *fp, SSL_SESSION *x) } #endif -int SSL_SESSION_print(BIO *bp, SSL_SESSION *x) +int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) { unsigned int i; char *s; diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c index 28095148e7..02878981f1 100644 --- a/src/lib/libssl/src/ssl/ssltest.c +++ b/src/lib/libssl/src/ssl/ssltest.c @@ -119,6 +119,7 @@ #include #include #include +#include #define USE_SOCKETS #include "e_os.h" @@ -127,12 +128,14 @@ #include #include #include +#include #include #ifndef OPENSSL_NO_ENGINE #include #endif #include #include +#include #define _XOPEN_SOURCE_EXTENDED 1 /* Or gethostname won't be declared properly on Compaq platforms (at least with DEC C). @@ -168,8 +171,15 @@ static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export,int keylength); static void free_tmp_rsa(void); #endif static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg); -#define APP_CALLBACK "Test Callback Argument" -static char *app_verify_arg = APP_CALLBACK; +#define APP_CALLBACK_STRING "Test Callback Argument" +struct app_verify_arg + { + char *string; + int app_verify; + int allow_proxy_certs; + char *proxy_auth; + char *proxy_cond; + }; #ifndef OPENSSL_NO_DH static DH *get_dh512(void); @@ -198,8 +208,14 @@ static void sv_usage(void) { fprintf(stderr,"usage: ssltest [args ...]\n"); fprintf(stderr,"\n"); +#ifdef OPENSSL_FIPS + fprintf(stderr,"-F - run test in FIPS mode\n"); +#endif fprintf(stderr," -server_auth - check server certificate\n"); fprintf(stderr," -client_auth - do client authentication\n"); + fprintf(stderr," -proxy - allow proxy certificates\n"); + fprintf(stderr," -proxy_auth - set proxy policy rights\n"); + fprintf(stderr," -proxy_cond - experssion to test proxy policy rights\n"); fprintf(stderr," -v - more output\n"); fprintf(stderr," -d - debug output\n"); fprintf(stderr," -reuse - use session-id reuse\n"); @@ -349,7 +365,8 @@ int main(int argc, char *argv[]) int tls1=0,ssl2=0,ssl3=0,ret=1; int client_auth=0; int server_auth=0,i; - int app_verify=0; + struct app_verify_arg app_verify_arg = + { APP_CALLBACK_STRING, 0, 0, NULL, NULL }; char *server_cert=TEST_SERVER_CERT; char *server_key=NULL; char *client_cert=TEST_CLIENT_CERT; @@ -369,6 +386,10 @@ int main(int argc, char *argv[]) clock_t s_time = 0, c_time = 0; int comp = 0; COMP_METHOD *cm = NULL; +#ifdef OPENSSL_FIPS + int fips_mode=0; + const char *path=argv[0]; +#endif verbose = 0; debug = 0; @@ -400,10 +421,29 @@ int main(int argc, char *argv[]) while (argc >= 1) { - if (strcmp(*argv,"-server_auth") == 0) + if(!strcmp(*argv,"-F")) + { +#ifdef OPENSSL_FIPS + fips_mode=1; +#else + fprintf(stderr,"not compiled with FIPS support, so exitting without running.\n"); + EXIT(0); +#endif + } + else if (strcmp(*argv,"-server_auth") == 0) server_auth=1; else if (strcmp(*argv,"-client_auth") == 0) client_auth=1; + else if (strcmp(*argv,"-proxy_auth") == 0) + { + if (--argc < 1) goto bad; + app_verify_arg.proxy_auth= *(++argv); + } + else if (strcmp(*argv,"-proxy_cond") == 0) + { + if (--argc < 1) goto bad; + app_verify_arg.proxy_cond= *(++argv); + } else if (strcmp(*argv,"-v") == 0) verbose=1; else if (strcmp(*argv,"-d") == 0) @@ -516,7 +556,11 @@ int main(int argc, char *argv[]) } else if (strcmp(*argv,"-app_verify") == 0) { - app_verify = 1; + app_verify_arg.app_verify = 1; + } + else if (strcmp(*argv,"-proxy") == 0) + { + app_verify_arg.allow_proxy_certs = 1; } else { @@ -534,6 +578,7 @@ bad: goto end; } + if (!ssl2 && !ssl3 && !tls1 && number > 1 && !reuse && !force) { fprintf(stderr, "This case cannot work. Use -f to perform " @@ -543,6 +588,20 @@ bad: EXIT(1); } +#ifdef OPENSSL_FIPS + if(fips_mode) + { + if(!FIPS_mode_set(1,path)) + { + ERR_load_crypto_strings(); + ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); + EXIT(1); + } + else + fprintf(stderr,"*** IN FIPS MODE ***\n"); + } +#endif + if (print_time) { if (!bio_pair) @@ -676,20 +735,14 @@ bad: SSL_CTX_set_verify(s_ctx, SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT, verify_callback); - if (app_verify) - { - SSL_CTX_set_cert_verify_callback(s_ctx, app_verify_callback, app_verify_arg); - } + SSL_CTX_set_cert_verify_callback(s_ctx, app_verify_callback, &app_verify_arg); } if (server_auth) { BIO_printf(bio_err,"server authentication\n"); SSL_CTX_set_verify(c_ctx,SSL_VERIFY_PEER, verify_callback); - if (app_verify) - { - SSL_CTX_set_cert_verify_callback(s_ctx, app_verify_callback, app_verify_arg); - } + SSL_CTX_set_cert_verify_callback(c_ctx, app_verify_callback, &app_verify_arg); } { @@ -1471,6 +1524,22 @@ err: return(ret); } +static int get_proxy_auth_ex_data_idx(void) + { + static volatile int idx = -1; + if (idx < 0) + { + CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX); + if (idx < 0) + { + idx = X509_STORE_CTX_get_ex_new_index(0, + "SSLtest for verify callback", NULL,NULL,NULL); + } + CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX); + } + return idx; + } + static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) { char *s,buf[256]; @@ -1480,42 +1549,467 @@ static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) if (s != NULL) { if (ok) - fprintf(stderr,"depth=%d %s\n",ctx->error_depth,buf); + fprintf(stderr,"depth=%d %s\n", + ctx->error_depth,buf); else + { fprintf(stderr,"depth=%d error=%d %s\n", ctx->error_depth,ctx->error,buf); + } } if (ok == 0) { + fprintf(stderr,"Error string: %s\n", + X509_verify_cert_error_string(ctx->error)); switch (ctx->error) { case X509_V_ERR_CERT_NOT_YET_VALID: case X509_V_ERR_CERT_HAS_EXPIRED: case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: + fprintf(stderr," ... ignored.\n"); ok=1; } } + if (ok == 1) + { + X509 *xs = ctx->current_cert; +#if 0 + X509 *xi = ctx->current_issuer; +#endif + + if (xs->ex_flags & EXFLAG_PROXY) + { + unsigned int *letters = + X509_STORE_CTX_get_ex_data(ctx, + get_proxy_auth_ex_data_idx()); + + if (letters) + { + int found_any = 0; + int i; + PROXY_CERT_INFO_EXTENSION *pci = + X509_get_ext_d2i(xs, NID_proxyCertInfo, + NULL, NULL); + + switch (OBJ_obj2nid(pci->proxyPolicy->policyLanguage)) + { + case NID_Independent: + /* Completely meaningless in this + program, as there's no way to + grant explicit rights to a + specific PrC. Basically, using + id-ppl-Independent is the perfect + way to grant no rights at all. */ + fprintf(stderr, " Independent proxy certificate"); + for (i = 0; i < 26; i++) + letters[i] = 0; + break; + case NID_id_ppl_inheritAll: + /* This is basically a NOP, we + simply let the current rights + stand as they are. */ + fprintf(stderr, " Proxy certificate inherits all"); + break; + default: + s = (char *) + pci->proxyPolicy->policy->data; + i = pci->proxyPolicy->policy->length; + + /* The algorithm works as follows: + it is assumed that previous + iterations or the initial granted + rights has already set some elements + of `letters'. What we need to do is + to clear those that weren't granted + by the current PrC as well. The + easiest way to do this is to add 1 + to all the elements whose letters + are given with the current policy. + That way, all elements that are set + by the current policy and were + already set by earlier policies and + through the original grant of rights + will get the value 2 or higher. + The last thing to do is to sweep + through `letters' and keep the + elements having the value 2 as set, + and clear all the others. */ + + fprintf(stderr, " Certificate proxy rights = %*.*s", i, i, s); + while(i-- > 0) + { + char c = *s++; + if (isascii(c) && isalpha(c)) + { + if (islower(c)) + c = toupper(c); + letters[c - 'A']++; + } + } + for (i = 0; i < 26; i++) + if (letters[i] < 2) + letters[i] = 0; + else + letters[i] = 1; + } + + found_any = 0; + fprintf(stderr, + ", resulting proxy rights = "); + for(i = 0; i < 26; i++) + if (letters[i]) + { + fprintf(stderr, "%c", i + 'A'); + found_any = 1; + } + if (!found_any) + fprintf(stderr, "none"); + fprintf(stderr, "\n"); + + PROXY_CERT_INFO_EXTENSION_free(pci); + } + } + } + return(ok); } +static void process_proxy_debug(int indent, const char *format, ...) + { + static const char indentation[] = + ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"; /* That's 80 > */ + char my_format[256]; + va_list args; + + BIO_snprintf(my_format, sizeof(my_format), "%*.*s %s", + indent, indent, indentation, format); + + va_start(args, format); + vfprintf(stderr, my_format, args); + va_end(args); + } +/* Priority levels: + 0 [!]var, () + 1 & ^ + 2 | +*/ +static int process_proxy_cond_adders(unsigned int letters[26], + const char *cond, const char **cond_end, int *pos, int indent); +static int process_proxy_cond_val(unsigned int letters[26], + const char *cond, const char **cond_end, int *pos, int indent) + { + char c; + int ok = 1; + int negate = 0; + + while(isspace(*cond)) + { + cond++; (*pos)++; + } + c = *cond; + + if (debug) + process_proxy_debug(indent, + "Start process_proxy_cond_val at position %d: %s\n", + *pos, cond); + + while(c == '!') + { + negate = !negate; + cond++; (*pos)++; + while(isspace(*cond)) + { + cond++; (*pos)++; + } + c = *cond; + } + + if (c == '(') + { + cond++; (*pos)++; + ok = process_proxy_cond_adders(letters, cond, cond_end, pos, + indent + 1); + cond = *cond_end; + if (ok < 0) + goto end; + while(isspace(*cond)) + { + cond++; (*pos)++; + } + c = *cond; + if (c != ')') + { + fprintf(stderr, + "Weird condition character in position %d: " + "%c\n", *pos, c); + ok = -1; + goto end; + } + cond++; (*pos)++; + } + else if (isascii(c) && isalpha(c)) + { + if (islower(c)) + c = toupper(c); + ok = letters[c - 'A']; + cond++; (*pos)++; + } + else + { + fprintf(stderr, + "Weird condition character in position %d: " + "%c\n", *pos, c); + ok = -1; + goto end; + } + end: + *cond_end = cond; + if (ok >= 0 && negate) + ok = !ok; + + if (debug) + process_proxy_debug(indent, + "End process_proxy_cond_val at position %d: %s, returning %d\n", + *pos, cond, ok); + + return ok; + } +static int process_proxy_cond_multipliers(unsigned int letters[26], + const char *cond, const char **cond_end, int *pos, int indent) + { + int ok; + char c; + + if (debug) + process_proxy_debug(indent, + "Start process_proxy_cond_multipliers at position %d: %s\n", + *pos, cond); + + ok = process_proxy_cond_val(letters, cond, cond_end, pos, indent + 1); + cond = *cond_end; + if (ok < 0) + goto end; + + while(ok >= 0) + { + while(isspace(*cond)) + { + cond++; (*pos)++; + } + c = *cond; + + switch(c) + { + case '&': + case '^': + { + int save_ok = ok; + + cond++; (*pos)++; + ok = process_proxy_cond_val(letters, + cond, cond_end, pos, indent + 1); + cond = *cond_end; + if (ok < 0) + break; + + switch(c) + { + case '&': + ok &= save_ok; + break; + case '^': + ok ^= save_ok; + break; + default: + fprintf(stderr, "SOMETHING IS SERIOUSLY WRONG!" + " STOPPING\n"); + EXIT(1); + } + } + break; + default: + goto end; + } + } + end: + if (debug) + process_proxy_debug(indent, + "End process_proxy_cond_multipliers at position %d: %s, returning %d\n", + *pos, cond, ok); + + *cond_end = cond; + return ok; + } +static int process_proxy_cond_adders(unsigned int letters[26], + const char *cond, const char **cond_end, int *pos, int indent) + { + int ok; + char c; + + if (debug) + process_proxy_debug(indent, + "Start process_proxy_cond_adders at position %d: %s\n", + *pos, cond); + + ok = process_proxy_cond_multipliers(letters, cond, cond_end, pos, + indent + 1); + cond = *cond_end; + if (ok < 0) + goto end; + + while(ok >= 0) + { + while(isspace(*cond)) + { + cond++; (*pos)++; + } + c = *cond; + + switch(c) + { + case '|': + { + int save_ok = ok; + + cond++; (*pos)++; + ok = process_proxy_cond_multipliers(letters, + cond, cond_end, pos, indent + 1); + cond = *cond_end; + if (ok < 0) + break; + + switch(c) + { + case '|': + ok |= save_ok; + break; + default: + fprintf(stderr, "SOMETHING IS SERIOUSLY WRONG!" + " STOPPING\n"); + EXIT(1); + } + } + break; + default: + goto end; + } + } + end: + if (debug) + process_proxy_debug(indent, + "End process_proxy_cond_adders at position %d: %s, returning %d\n", + *pos, cond, ok); + + *cond_end = cond; + return ok; + } + +static int process_proxy_cond(unsigned int letters[26], + const char *cond, const char **cond_end) + { + int pos = 1; + return process_proxy_cond_adders(letters, cond, cond_end, &pos, 1); + } + static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg) { - char *s = NULL,buf[256]; int ok=1; + struct app_verify_arg *cb_arg = arg; + unsigned int letters[26]; /* only used with proxy_auth */ - fprintf(stderr, "In app_verify_callback, allowing cert. "); - fprintf(stderr, "Arg is: %s\n", (char *)arg); - fprintf(stderr, "Finished printing do we have a context? 0x%x a cert? 0x%x\n", - (unsigned int)ctx, (unsigned int)ctx->cert); - if (ctx->cert) - s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256); - if (s != NULL) + if (cb_arg->app_verify) { + char *s = NULL,buf[256]; + + fprintf(stderr, "In app_verify_callback, allowing cert. "); + fprintf(stderr, "Arg is: %s\n", cb_arg->string); + fprintf(stderr, "Finished printing do we have a context? 0x%x a cert? 0x%x\n", + (unsigned int)ctx, (unsigned int)ctx->cert); + if (ctx->cert) + s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256); + if (s != NULL) + { fprintf(stderr,"cert depth=%d %s\n",ctx->error_depth,buf); + } + return(1); + } + if (cb_arg->proxy_auth) + { + int found_any = 0, i; + char *sp; + + for(i = 0; i < 26; i++) + letters[i] = 0; + for(sp = cb_arg->proxy_auth; *sp; sp++) + { + char c = *sp; + if (isascii(c) && isalpha(c)) + { + if (islower(c)) + c = toupper(c); + letters[c - 'A'] = 1; + } + } + + fprintf(stderr, + " Initial proxy rights = "); + for(i = 0; i < 26; i++) + if (letters[i]) + { + fprintf(stderr, "%c", i + 'A'); + found_any = 1; + } + if (!found_any) + fprintf(stderr, "none"); + fprintf(stderr, "\n"); + + X509_STORE_CTX_set_ex_data(ctx, + get_proxy_auth_ex_data_idx(),letters); + } + if (cb_arg->allow_proxy_certs) + { + X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_ALLOW_PROXY_CERTS); } +#ifndef OPENSSL_NO_X509_VERIFY +# ifdef OPENSSL_FIPS + if(s->version == TLS1_VERSION) + FIPS_allow_md5(1); +# endif + ok = X509_verify_cert(ctx); +# ifdef OPENSSL_FIPS + if(s->version == TLS1_VERSION) + FIPS_allow_md5(0); +# endif +#endif + + if (cb_arg->proxy_auth) + { + if (ok) + { + const char *cond_end = NULL; + + ok = process_proxy_cond(letters, + cb_arg->proxy_cond, &cond_end); + + if (ok < 0) + EXIT(3); + if (*cond_end) + { + fprintf(stderr, "Stopped processing condition before it's end.\n"); + ok = 0; + } + if (!ok) + fprintf(stderr, "Proxy rights check with condition '%s' proved invalid\n", + cb_arg->proxy_cond); + else + fprintf(stderr, "Proxy rights check with condition '%s' proved valid\n", + cb_arg->proxy_cond); + } + } return(ok); } diff --git a/src/lib/libssl/src/ssl/t1_enc.c b/src/lib/libssl/src/ssl/t1_enc.c index 271e247eea..2c6246abf5 100644 --- a/src/lib/libssl/src/ssl/t1_enc.c +++ b/src/lib/libssl/src/ssl/t1_enc.c @@ -115,6 +115,7 @@ #include #include #include +#include static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec, int sec_len, unsigned char *seed, int seed_len, @@ -131,6 +132,8 @@ static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec, HMAC_CTX_init(&ctx); HMAC_CTX_init(&ctx_tmp); + HMAC_CTX_set_flags(&ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); + HMAC_CTX_set_flags(&ctx_tmp, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); HMAC_Init_ex(&ctx,sec,sec_len,md, NULL); HMAC_Init_ex(&ctx_tmp,sec,sec_len,md, NULL); HMAC_Update(&ctx,seed,seed_len); @@ -177,7 +180,6 @@ static void tls1_PRF(const EVP_MD *md5, const EVP_MD *sha1, S2= &(sec[len]); len+=(slen&1); /* add for odd, make longer */ - tls1_P_hash(md5 ,S1,len,label,label_len,out1,olen); tls1_P_hash(sha1,S2,len,label,label_len,out2,olen); diff --git a/src/lib/libssl/src/test/CAss.cnf b/src/lib/libssl/src/test/CAss.cnf index b941b7ae15..21da59a73a 100644 --- a/src/lib/libssl/src/test/CAss.cnf +++ b/src/lib/libssl/src/test/CAss.cnf @@ -23,3 +23,11 @@ organizationName_value = Dodgy Brothers commonName = Common Name (eg, YOUR name) commonName_value = Dodgy CA + +[ v3_ca ] +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid:always,issuer:always +basicConstraints = CA:true,pathlen:1 +keyUsage = cRLSign, keyCertSign +issuerAltName=issuer:copy + diff --git a/src/lib/libssl/src/test/Makefile b/src/lib/libssl/src/test/Makefile new file mode 100644 index 0000000000..6aeedf7fa3 --- /dev/null +++ b/src/lib/libssl/src/test/Makefile @@ -0,0 +1,788 @@ +# +# test/Makefile +# + +DIR= test +TOP= .. +CC= cc +INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES) +CFLAG= -g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP= /usr/local/ssl +MAKEFILE= Makefile +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +PERL= perl +# KRB5 stuff +KRB5_INCLUDES= +LIBKRB5= + +PEX_LIBS= +EX_LIBS= #-lnsl -lsocket + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile maketests.com \ + tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \ + tpkcs7.com tpkcs7d.com tverify.com testgen.com testss.com testssl.com \ + testca.com VMSca-response.1 VMSca-response.2 + +DLIBCRYPTO= ../libcrypto.a +DLIBSSL= ../libssl.a +LIBCRYPTO= -L.. -lcrypto +LIBSSL= -L.. -lssl + +BNTEST= bntest +ECTEST= ectest +EXPTEST= exptest +IDEATEST= ideatest +SHATEST= shatest +SHA1TEST= sha1test +FIPS_SHA1TEST= fips_sha1test +MDC2TEST= mdc2test +RMDTEST= rmdtest +MD2TEST= md2test +MD4TEST= md4test +MD5TEST= md5test +HMACTEST= hmactest +RC2TEST= rc2test +RC4TEST= rc4test +RC5TEST= rc5test +BFTEST= bftest +CASTTEST= casttest +DESTEST= destest +FIPS_DESTEST= fips_desmovs +RANDTEST= randtest +FIPS_RANDTEST= fips_randtest +DHTEST= dhtest +DSATEST= dsatest +FIPS_DSATEST= fips_dsatest +METHTEST= methtest +SSLTEST= ssltest +RSATEST= rsa_test +ENGINETEST= enginetest +EVPTEST= evp_test +FIPS_AESTEST= fips_aesavs + +TESTS= alltests + +EXE= $(BNTEST)$(EXE_EXT) $(ECTEST)$(EXE_EXT) $(IDEATEST)$(EXE_EXT) $(MD2TEST)$(EXE_EXT) $(MD4TEST)$(EXE_EXT) $(MD5TEST)$(EXE_EXT) $(HMACTEST)$(EXE_EXT) \ + $(RC2TEST)$(EXE_EXT) $(RC4TEST)$(EXE_EXT) $(RC5TEST)$(EXE_EXT) \ + $(DESTEST)$(EXE_EXT) $(FIPS_DESTEST)$(EXE_EXT) $(SHATEST)$(EXE_EXT) $(SHA1TEST)$(EXE_EXT) $(FIPS_SHA1TEST)$(EXE_EXT) $(MDC2TEST)$(EXE_EXT) $(RMDTEST)$(EXE_EXT) \ + $(RANDTEST)$(EXE_EXT) $(FIPS_RANDTEST)$(EXE_EXT) $(DHTEST)$(EXE_EXT) $(ENGINETEST)$(EXE_EXT) \ + $(BFTEST)$(EXE_EXT) $(CASTTEST)$(EXE_EXT) $(SSLTEST)$(EXE_EXT) $(EXPTEST)$(EXE_EXT) $(DSATEST)$(EXE_EXT) $(FIPS_DSATEST)$(EXE_EXT) $(RSATEST)$(EXE_EXT) \ + $(EVPTEST)$(EXE_EXT) $(FIPS_AESTEST)$(EXE_EXT) + +# $(METHTEST)$(EXE_EXT) + +OBJ= $(BNTEST).o $(ECTEST).o $(IDEATEST).o $(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \ + $(HMACTEST).o \ + $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ + $(DESTEST).o $(FIPS_DESTEST).o $(SHATEST).o $(SHA1TEST).o $(FIPS_SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ + $(RANDTEST).o $(FIPS_RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \ + $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(FIPS_DSATEST).o $(EXPTEST).o $(RSATEST).o \ + $(EVPTEST).o $(FIPS_AESTEST).o +SRC= $(BNTEST).c $(ECTEST).c $(IDEATEST).c $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ + $(HMACTEST).c \ + $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ + $(DESTEST).c $(FIPS_DESTEST).c $(SHATEST).c $(SHA1TEST).c $(FIPS_SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ + $(RANDTEST).c $(FIPS_RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \ + $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(FIPS_DSATEST).c $(EXPTEST).c $(RSATEST).c \ + $(EVPTEST).c $(FIPS_AESTEST).c + +EXHEADER= +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ..; $(MAKE) DIRS=$(DIR) TESTS=$(TESTS) all) + +all: exe + +exe: $(EXE) dummytest$(EXE_EXT) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + +generate: $(SRC) +$(SRC): + @sh $(TOP)/util/point.sh dummytest.c $@ + +errors: + +install: + +tags: + ctags $(SRC) + +tests: exe apps $(TESTS) + +apps: + @(cd ..; $(MAKE) DIRS=apps all) + +alltests: \ + test_des test_idea test_sha test_md4 test_md5 test_hmac \ + test_md2 test_mdc2 \ + test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \ + test_rand test_bn test_ec test_enc test_x509 test_rsa test_crl test_sid \ + test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ + test_ss test_ca test_engine test_evp test_ssl +# temporarily removed +# fips_test_aes + +fips_test_aes: + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + mkdir -p fips_aes_data/rsp; \ + ../util/shlib_wrap.sh ./$(FIPS_AESTEST) -d fips_aes_data/list; \ + fi + +test_evp: + ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt + +test_des: + ../util/shlib_wrap.sh ./$(DESTEST) + +test_idea: + ../util/shlib_wrap.sh ./$(IDEATEST) + +test_sha: + ../util/shlib_wrap.sh ./$(SHATEST) + ../util/shlib_wrap.sh ./$(SHA1TEST) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + ../util/shlib_wrap.sh ./$(FIPS_SHA1TEST) sha1vectors.txt | sed s/Strings/Hashes/ | cmp sha1hashes.txt - ; \ + fi + +test_mdc2: + ../util/shlib_wrap.sh ./$(MDC2TEST) + +test_md5: + ../util/shlib_wrap.sh ./$(MD5TEST) + +test_md4: + ../util/shlib_wrap.sh ./$(MD4TEST) + +test_hmac: + ../util/shlib_wrap.sh ./$(HMACTEST) + +test_md2: + ../util/shlib_wrap.sh ./$(MD2TEST) + +test_rmd: + ../util/shlib_wrap.sh ./$(RMDTEST) + +test_bf: + ../util/shlib_wrap.sh ./$(BFTEST) + +test_cast: + ../util/shlib_wrap.sh ./$(CASTTEST) + +test_rc2: + ../util/shlib_wrap.sh ./$(RC2TEST) + +test_rc4: + ../util/shlib_wrap.sh ./$(RC4TEST) + +test_rc5: + ../util/shlib_wrap.sh ./$(RC5TEST) + +test_rand: + ../util/shlib_wrap.sh ./$(RANDTEST) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + ../util/shlib_wrap.sh ./$(FIPS_RANDTEST); \ + fi + +test_enc: + @sh ./testenc + +test_x509: + echo test normal x509v1 certificate + sh ./tx509 2>/dev/null + echo test first x509v3 certificate + sh ./tx509 v3-cert1.pem 2>/dev/null + echo test second x509v3 certificate + sh ./tx509 v3-cert2.pem 2>/dev/null + +test_rsa: + @sh ./trsa 2>/dev/null + ../util/shlib_wrap.sh ./$(RSATEST) + +test_crl: + @sh ./tcrl 2>/dev/null + +test_sid: + @sh ./tsid 2>/dev/null + +test_req: + @sh ./treq 2>/dev/null + @sh ./treq testreq2.pem 2>/dev/null + +test_pkcs7: + @sh ./tpkcs7 2>/dev/null + @sh ./tpkcs7d 2>/dev/null + +test_bn: + @echo starting big number library test, could take a while... + @../util/shlib_wrap.sh ./$(BNTEST) >tmp.bntest + @echo quit >>tmp.bntest + @echo "running bc" + @) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} else {print STDERR "."; $$i++;}} print STDERR "\n$$i tests passed\n"' + @echo 'test a^b%c implementations' + ../util/shlib_wrap.sh ./$(EXPTEST) + +test_ec: + @echo 'test elliptic curves' + ../util/shlib_wrap.sh ./$(ECTEST) + +test_verify: + @echo "The following command should have some OK's and some failures" + @echo "There are definitly a few expired certificates" + -../util/shlib_wrap.sh ../apps/openssl verify -CApath ../certs ../certs/*.pem + +test_dh: + @echo "Generate a set of DH parameters" + ../util/shlib_wrap.sh ./$(DHTEST) + +test_dsa: + @echo "Generate a set of DSA parameters" + ../util/shlib_wrap.sh ./$(DSATEST) + ../util/shlib_wrap.sh ./$(DSATEST) -app2_1 + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + ../util/shlib_wrap.sh ./$(FIPS_DSATEST); \ + ../util/shlib_wrap.sh ./$(FIPS_DSATEST) -app2_1; \ + fi + +test_gen: + @echo "Generate and verify a certificate request" + @sh ./testgen + +test_ss keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \ + intP1.ss intP2.ss: testss + @echo "Generate and certify a test certificate" + @sh ./testss + @cat certCA.ss certU.ss > intP1.ss + @cat certCA.ss certU.ss certP1.ss > intP2.ss + +test_engine: + @echo "Manipulate the ENGINE structures" + ../util/shlib_wrap.sh ./$(ENGINETEST) + +test_ssl: keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \ + intP1.ss intP2.ss + @echo "test SSL protocol" + @if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + sh ./testfipsssl keyU.ss certU.ss certCA.ss; \ + fi + @sh ./testssl keyU.ss certU.ss certCA.ss + @sh ./testsslproxy keyP1.ss certP1.ss intP1.ss + @sh ./testsslproxy keyP2.ss certP2.ss intP2.ss + +test_ca: + @if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then \ + echo "skipping CA.sh test -- requires RSA"; \ + else \ + echo "Generate and certify a test certificate via the 'ca' program"; \ + sh ./testca; \ + fi + +test_aes: #$(AESTEST) +# @echo "test Rijndael" +# ../util/shlib_wrap.sh ./$(AESTEST) + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss *.srl log + +$(DLIBSSL): + (cd ..; $(MAKE) DIRS=ssl all) + +$(DLIBCRYPTO): + (cd ..; $(MAKE) DIRS=crypto all) + +BUILD_CMD=if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + set -x; $${CC:-$(CC)} -o $$target$(EXE_EXT) $(CFLAGS) $$target.o $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \ + elif [ -z "$(SHARED_LIBS)" ]; then \ + set -x; $${CC:-$(CC)} -o $$target$(EXE_EXT) $(CFLAGS) $$target.o $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \ + else \ + set -x; LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $$target$(EXE_EXT) $(CFLAGS) $$target.o $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \ + fi; + +$(FIPS_AESTEST)$(EXE_EXT): $(FIPS_AESTEST).o $(DLIBCRYPTO) + @target=$(FIPS_AESTEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_AESTEST); \ + fi + +$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO) + @target=$(RSATEST); $(BUILD_CMD) + +$(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO) + @target=$(BNTEST); $(BUILD_CMD) + +$(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO) + @target=$(ECTEST); $(BUILD_CMD) + +$(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO) + @target=$(EXPTEST); $(BUILD_CMD) + +$(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO) + @target=$(IDEATEST); $(BUILD_CMD) + +$(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO) + @target=$(MD2TEST); $(BUILD_CMD) + +$(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO) + @target=$(SHATEST); $(BUILD_CMD) + +$(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO) + @target=$(SHA1TEST); $(BUILD_CMD) + +$(FIPS_SHA1TEST)$(EXE_EXT): $(FIPS_SHA1TEST).o $(DLIBCRYPTO) + @target=$(FIPS_SHA1TEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_SHA1TEST); \ + fi + +$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO) + @target=$(RMDTEST); $(BUILD_CMD) + +$(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO) + @target=$(MDC2TEST); $(BUILD_CMD) + +$(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO) + @target=$(MD4TEST); $(BUILD_CMD) + +$(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO) + @target=$(MD5TEST); $(BUILD_CMD) + +$(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO) + @target=$(HMACTEST); $(BUILD_CMD) + +$(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO) + @target=$(RC2TEST); $(BUILD_CMD) + +$(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO) + @target=$(BFTEST); $(BUILD_CMD) + +$(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO) + @target=$(CASTTEST); $(BUILD_CMD) + +$(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO) + @target=$(RC4TEST); $(BUILD_CMD) + +$(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO) + @target=$(RC5TEST); $(BUILD_CMD) + +$(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO) + @target=$(DESTEST); $(BUILD_CMD) + +$(FIPS_DESTEST)$(EXE_EXT): $(FIPS_DESTEST).o $(DLIBCRYPTO) + @target=$(FIPS_DESTEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_DESTEST); \ + fi + +$(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO) + @target=$(RANDTEST); $(BUILD_CMD) + +$(FIPS_RANDTEST)$(EXE_EXT): $(FIPS_RANDTEST).o $(DLIBCRYPTO) + @target=$(FIPS_RANDTEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_RANDTEST); \ + fi + +$(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO) + @target=$(DHTEST); $(BUILD_CMD) + +$(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO) + @target=$(DSATEST); $(BUILD_CMD) + +$(FIPS_DSATEST)$(EXE_EXT): $(FIPS_DSATEST).o $(DLIBCRYPTO) + @target=$(FIPS_DSATEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_DSATEST); \ + fi + +$(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO) + @target=$(METHTEST); $(BUILD_CMD) + +$(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) + @target=$(SSLTEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(SSLTEST); \ + fi + +$(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO) + @target=$(ENGINETEST); $(BUILD_CMD) + +$(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO) + @target=$(EVPTEST); $(BUILD_CMD) + +#$(AESTEST).o: $(AESTEST).c +# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c + +#$(AESTEST)$(EXE_EXT): $(AESTEST).o $(DLIBCRYPTO) +# @target=$(AESTEST); $(BUILD_CMD) + +dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO) + @target=dummytest; $(BUILD_CMD) + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +bftest.o: ../e_os.h ../include/openssl/blowfish.h ../include/openssl/e_os2.h +bftest.o: ../include/openssl/opensslconf.h bftest.c +bntest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +bntest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +bntest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h +bntest.o: ../include/openssl/des.h ../include/openssl/des_old.h +bntest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +bntest.o: ../include/openssl/e_os2.h ../include/openssl/err.h +bntest.o: ../include/openssl/evp.h ../include/openssl/idea.h +bntest.o: ../include/openssl/lhash.h ../include/openssl/md2.h +bntest.o: ../include/openssl/md4.h ../include/openssl/md5.h +bntest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +bntest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +bntest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h +bntest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +bntest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +bntest.o: ../include/openssl/x509_vfy.h bntest.c +casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h +casttest.o: ../include/openssl/opensslconf.h casttest.c +destest.o: ../include/openssl/crypto.h ../include/openssl/des.h +destest.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h +destest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +destest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +destest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +destest.o: ../include/openssl/ui_compat.h destest.c +dhtest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h +dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h +dhtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h +dhtest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +dhtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h +dhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h dhtest.c +dsatest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h +dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h +dsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dsatest.o: ../include/openssl/err.h ../include/openssl/lhash.h +dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +dsatest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +dsatest.o: ../include/openssl/symhacks.h dsatest.c +ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h +ectest.o: ../include/openssl/bn.h ../include/openssl/crypto.h +ectest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ectest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ectest.o: ../include/openssl/engine.h ../include/openssl/err.h +ectest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ectest.o: ../include/openssl/rand.h ../include/openssl/rsa.h +ectest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +ectest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h ectest.c +enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h +enginetest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +enginetest.o: ../include/openssl/crypto.h ../include/openssl/dh.h +enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h +enginetest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +enginetest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +enginetest.o: ../include/openssl/rand.h ../include/openssl/rsa.h +enginetest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +enginetest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +enginetest.o: enginetest.c +evp_test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +evp_test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +evp_test.o: ../include/openssl/bn.h ../include/openssl/cast.h +evp_test.o: ../include/openssl/conf.h ../include/openssl/crypto.h +evp_test.o: ../include/openssl/des.h ../include/openssl/des_old.h +evp_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h +evp_test.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h +evp_test.o: ../include/openssl/idea.h ../include/openssl/lhash.h +evp_test.o: ../include/openssl/md2.h ../include/openssl/md4.h +evp_test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +evp_test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +evp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +evp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +evp_test.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +evp_test.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +evp_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +evp_test.o: ../include/openssl/sha.h ../include/openssl/stack.h +evp_test.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +evp_test.o: ../include/openssl/ui_compat.h evp_test.c +exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h +exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h +exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +exptest.o: ../include/openssl/symhacks.h exptest.c +fips_aesavs.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +fips_aesavs.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +fips_aesavs.o: ../include/openssl/bn.h ../include/openssl/cast.h +fips_aesavs.o: ../include/openssl/crypto.h ../include/openssl/des.h +fips_aesavs.o: ../include/openssl/des_old.h ../include/openssl/dh.h +fips_aesavs.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +fips_aesavs.o: ../include/openssl/err.h ../include/openssl/evp.h +fips_aesavs.o: ../include/openssl/fips.h ../include/openssl/idea.h +fips_aesavs.o: ../include/openssl/lhash.h ../include/openssl/md2.h +fips_aesavs.o: ../include/openssl/md4.h ../include/openssl/md5.h +fips_aesavs.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +fips_aesavs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +fips_aesavs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +fips_aesavs.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +fips_aesavs.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +fips_aesavs.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +fips_aesavs.o: ../include/openssl/sha.h ../include/openssl/stack.h +fips_aesavs.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +fips_aesavs.o: ../include/openssl/ui_compat.h fips_aesavs.c +fips_desmovs.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +fips_desmovs.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +fips_desmovs.o: ../include/openssl/bn.h ../include/openssl/cast.h +fips_desmovs.o: ../include/openssl/crypto.h ../include/openssl/des.h +fips_desmovs.o: ../include/openssl/des_old.h ../include/openssl/dh.h +fips_desmovs.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +fips_desmovs.o: ../include/openssl/err.h ../include/openssl/evp.h +fips_desmovs.o: ../include/openssl/fips.h ../include/openssl/idea.h +fips_desmovs.o: ../include/openssl/lhash.h ../include/openssl/md2.h +fips_desmovs.o: ../include/openssl/md4.h ../include/openssl/md5.h +fips_desmovs.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +fips_desmovs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +fips_desmovs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +fips_desmovs.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +fips_desmovs.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +fips_desmovs.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +fips_desmovs.o: ../include/openssl/sha.h ../include/openssl/stack.h +fips_desmovs.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +fips_desmovs.o: ../include/openssl/ui_compat.h fips_desmovs.c +fips_dsatest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h +fips_dsatest.o: ../include/openssl/bn.h ../include/openssl/crypto.h +fips_dsatest.o: ../include/openssl/des.h ../include/openssl/des_old.h +fips_dsatest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +fips_dsatest.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +fips_dsatest.o: ../include/openssl/err.h ../include/openssl/fips.h +fips_dsatest.o: ../include/openssl/fips_rand.h ../include/openssl/lhash.h +fips_dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +fips_dsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +fips_dsatest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +fips_dsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +fips_dsatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +fips_dsatest.o: fips_dsatest.c +fips_randtest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h +fips_randtest.o: ../include/openssl/des.h ../include/openssl/des_old.h +fips_randtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h +fips_randtest.o: ../include/openssl/fips_rand.h ../include/openssl/lhash.h +fips_randtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +fips_randtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +fips_randtest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +fips_randtest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +fips_randtest.o: ../include/openssl/ui_compat.h fips_randtest.c +fips_sha1test.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h +fips_sha1test.o: ../include/openssl/e_os2.h ../include/openssl/err.h +fips_sha1test.o: ../include/openssl/fips.h ../include/openssl/lhash.h +fips_sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +fips_sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +fips_sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +fips_sha1test.o: fips_sha1test.c +hmactest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +hmactest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +hmactest.o: ../include/openssl/bn.h ../include/openssl/cast.h +hmactest.o: ../include/openssl/crypto.h ../include/openssl/des.h +hmactest.o: ../include/openssl/des_old.h ../include/openssl/dh.h +hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h +hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h +hmactest.o: ../include/openssl/md4.h ../include/openssl/md5.h +hmactest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +hmactest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +hmactest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +hmactest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +hmactest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +hmactest.o: ../include/openssl/sha.h ../include/openssl/stack.h +hmactest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +hmactest.o: ../include/openssl/ui_compat.h hmactest.c +ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h +ideatest.o: ../include/openssl/opensslconf.h ideatest.c +md2test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +md2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +md2test.o: ../include/openssl/bn.h ../include/openssl/cast.h +md2test.o: ../include/openssl/crypto.h ../include/openssl/des.h +md2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +md2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +md2test.o: ../include/openssl/evp.h ../include/openssl/idea.h +md2test.o: ../include/openssl/md2.h ../include/openssl/md4.h +md2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +md2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +md2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +md2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +md2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +md2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +md2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +md2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +md2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md2test.c +md4test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +md4test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +md4test.o: ../include/openssl/bn.h ../include/openssl/cast.h +md4test.o: ../include/openssl/crypto.h ../include/openssl/des.h +md4test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +md4test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +md4test.o: ../include/openssl/evp.h ../include/openssl/idea.h +md4test.o: ../include/openssl/md2.h ../include/openssl/md4.h +md4test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +md4test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +md4test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +md4test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +md4test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +md4test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +md4test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +md4test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +md4test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md4test.c +md5test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +md5test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +md5test.o: ../include/openssl/bn.h ../include/openssl/cast.h +md5test.o: ../include/openssl/crypto.h ../include/openssl/des.h +md5test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +md5test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +md5test.o: ../include/openssl/evp.h ../include/openssl/idea.h +md5test.o: ../include/openssl/md2.h ../include/openssl/md4.h +md5test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +md5test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +md5test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +md5test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +md5test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +md5test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +md5test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +md5test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +md5test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md5test.c +mdc2test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +mdc2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +mdc2test.o: ../include/openssl/bn.h ../include/openssl/cast.h +mdc2test.o: ../include/openssl/crypto.h ../include/openssl/des.h +mdc2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +mdc2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +mdc2test.o: ../include/openssl/evp.h ../include/openssl/idea.h +mdc2test.o: ../include/openssl/md2.h ../include/openssl/md4.h +mdc2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +mdc2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +mdc2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +mdc2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +mdc2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +mdc2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +mdc2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +mdc2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +mdc2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h mdc2test.c +randtest.o: ../e_os.h ../include/openssl/e_os2.h +randtest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h +randtest.o: ../include/openssl/rand.h randtest.c +rc2test.o: ../e_os.h ../include/openssl/e_os2.h +rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h rc2test.c +rc4test.o: ../e_os.h ../include/openssl/e_os2.h +rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h rc4test.c +rc5test.o: ../e_os.h ../include/openssl/e_os2.h +rc5test.o: ../include/openssl/opensslconf.h ../include/openssl/rc5.h rc5test.c +rmdtest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +rmdtest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +rmdtest.o: ../include/openssl/bn.h ../include/openssl/cast.h +rmdtest.o: ../include/openssl/crypto.h ../include/openssl/des.h +rmdtest.o: ../include/openssl/des_old.h ../include/openssl/dh.h +rmdtest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +rmdtest.o: ../include/openssl/evp.h ../include/openssl/idea.h +rmdtest.o: ../include/openssl/md2.h ../include/openssl/md4.h +rmdtest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +rmdtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +rmdtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +rmdtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +rmdtest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +rmdtest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +rmdtest.o: ../include/openssl/safestack.h ../include/openssl/sha.h +rmdtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +rmdtest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h rmdtest.c +rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h +rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h +rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h +rsa_test.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +rsa_test.o: ../include/openssl/rand.h ../include/openssl/rsa.h +rsa_test.o: ../include/openssl/safestack.h ../include/openssl/stack.h +rsa_test.o: ../include/openssl/symhacks.h rsa_test.c +sha1test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +sha1test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +sha1test.o: ../include/openssl/bn.h ../include/openssl/cast.h +sha1test.o: ../include/openssl/crypto.h ../include/openssl/des.h +sha1test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +sha1test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +sha1test.o: ../include/openssl/evp.h ../include/openssl/idea.h +sha1test.o: ../include/openssl/md2.h ../include/openssl/md4.h +sha1test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +sha1test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +sha1test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +sha1test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +sha1test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +sha1test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h sha1test.c +shatest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +shatest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +shatest.o: ../include/openssl/bn.h ../include/openssl/cast.h +shatest.o: ../include/openssl/crypto.h ../include/openssl/des.h +shatest.o: ../include/openssl/des_old.h ../include/openssl/dh.h +shatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +shatest.o: ../include/openssl/evp.h ../include/openssl/idea.h +shatest.o: ../include/openssl/md2.h ../include/openssl/md4.h +shatest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +shatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +shatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +shatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +shatest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +shatest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +shatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h +shatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +shatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h shatest.c +ssltest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssltest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssltest.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssltest.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ssltest.o: ../include/openssl/des.h ../include/openssl/des_old.h +ssltest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ssltest.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +ssltest.o: ../include/openssl/err.h ../include/openssl/evp.h +ssltest.o: ../include/openssl/fips.h ../include/openssl/idea.h +ssltest.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ssltest.o: ../include/openssl/md2.h ../include/openssl/md4.h +ssltest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +ssltest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ssltest.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ssltest.o: ../include/openssl/rand.h ../include/openssl/rc2.h +ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssltest.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssltest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssltest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h ssltest.c diff --git a/src/lib/libssl/src/test/P1ss.cnf b/src/lib/libssl/src/test/P1ss.cnf new file mode 100644 index 0000000000..876a0d35f8 --- /dev/null +++ b/src/lib/libssl/src/test/P1ss.cnf @@ -0,0 +1,37 @@ +# +# SSLeay example configuration file. +# This is mostly being used for generation of certificate requests. +# + +RANDFILE = ./.rnd + +#################################################################### +[ req ] +default_bits = 512 +default_keyfile = keySS.pem +distinguished_name = req_distinguished_name +encrypt_rsa_key = no +default_md = md2 + +[ req_distinguished_name ] +countryName = Country Name (2 letter code) +countryName_default = AU +countryName_value = AU + +organizationName = Organization Name (eg, company) +organizationName_value = Dodgy Brothers + +0.commonName = Common Name (eg, YOUR name) +0.commonName_value = Brother 1 + +1.commonName = Common Name (eg, YOUR name) +1.commonName_value = Brother 2 + +2.commonName = Common Name (eg, YOUR name) +2.commonName_value = Proxy 1 + +[ v3_proxy ] +basicConstraints=CA:FALSE +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid,issuer:always +proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:1,policy:text:AB diff --git a/src/lib/libssl/src/test/P2ss.cnf b/src/lib/libssl/src/test/P2ss.cnf new file mode 100644 index 0000000000..373a87e7c2 --- /dev/null +++ b/src/lib/libssl/src/test/P2ss.cnf @@ -0,0 +1,45 @@ +# +# SSLeay example configuration file. +# This is mostly being used for generation of certificate requests. +# + +RANDFILE = ./.rnd + +#################################################################### +[ req ] +default_bits = 512 +default_keyfile = keySS.pem +distinguished_name = req_distinguished_name +encrypt_rsa_key = no +default_md = md2 + +[ req_distinguished_name ] +countryName = Country Name (2 letter code) +countryName_default = AU +countryName_value = AU + +organizationName = Organization Name (eg, company) +organizationName_value = Dodgy Brothers + +0.commonName = Common Name (eg, YOUR name) +0.commonName_value = Brother 1 + +1.commonName = Common Name (eg, YOUR name) +1.commonName_value = Brother 2 + +2.commonName = Common Name (eg, YOUR name) +2.commonName_value = Proxy 1 + +3.commonName = Common Name (eg, YOUR name) +3.commonName_value = Proxy 2 + +[ v3_proxy ] +basicConstraints=CA:FALSE +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid,issuer:always +proxyCertInfo=critical,@proxy_ext + +[ proxy_ext ] +language=id-ppl-anyLanguage +pathlen=0 +policy=text:BC diff --git a/src/lib/libssl/src/test/Uss.cnf b/src/lib/libssl/src/test/Uss.cnf index c89692d519..0c0ebb5f67 100644 --- a/src/lib/libssl/src/test/Uss.cnf +++ b/src/lib/libssl/src/test/Uss.cnf @@ -26,3 +26,11 @@ organizationName_value = Dodgy Brothers 1.commonName = Common Name (eg, YOUR name) 1.commonName_value = Brother 2 + +[ v3_ee ] +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid,issuer:always +basicConstraints = CA:false +keyUsage = nonRepudiation, digitalSignature, keyEncipherment +issuerAltName=issuer:copy + diff --git a/src/lib/libssl/src/test/bctest b/src/lib/libssl/src/test/bctest index bdb3218f7a..e81fc0733a 100644 --- a/src/lib/libssl/src/test/bctest +++ b/src/lib/libssl/src/test/bctest @@ -1,6 +1,6 @@ #!/bin/sh -# This script is used by test/Makefile.ssl to check whether a sane 'bc' +# This script is used by test/Makefile to check whether a sane 'bc' # is installed. # ('make test_bn' should not try to run 'bc' if it does not exist or if # it is a broken 'bc' version that is known to cause trouble.) diff --git a/src/lib/libssl/src/test/evptests.txt b/src/lib/libssl/src/test/evptests.txt index 80bd9c7765..dfe91a5bc0 100644 --- a/src/lib/libssl/src/test/evptests.txt +++ b/src/lib/libssl/src/test/evptests.txt @@ -92,7 +92,102 @@ AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000 AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:F58C4C04D6E5F1BA779EABFB5F7BFBD6:AE2D8A571E03AC9C9EB76FAC45AF8E51:9CFC4E967EDB808D679F777BC6702C7D AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:9CFC4E967EDB808D679F777BC6702C7D:30C81C46A35CE411E5FBC1191A0A52EF:39F23369A9D9BACFA530E26304231461 AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39F23369A9D9BACFA530E26304231461:F69F2445DF4F9B17AD2B417BE66C3710:B2EB05E2C39BE9FCDA6C19078C6A9D1B -# We don't support CFB{1,8}-AESxxx.{En,De}crypt + +# CFB1-AES128.Encrypt + +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:1 +# all of the above packed into one... +# in: 0110 1011 1100 0001 = 6bc1 +# out: 0110 1000 1011 0011 = 68b3 +AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:1 + +# CFB1-AES128.Decrypt +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:0 +# all of the above packed into one... +# in: 0110 1000 1011 0011 = 68b3 +# out: 0110 1011 1100 0001 = 6bc1 +AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:0 + +# TODO: CFB1-AES192 and 256 + +# CFB8-AES128.Encrypt + +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:1 +# all of the above packed into one +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:1 + +# CFB8-AES128.Decrypt + +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:0 +# all of the above packed into one +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:0 + +# TODO: 192 and 256 bit keys + # For all CFB128 encrypts and decrypts, the transformed sequence is # AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec # CFB128-AES128.Encrypt @@ -174,6 +269,16 @@ DESX-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363 # DES EDE3 CBC tests (from destest) DES-EDE3-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363534333231204E6F77206973207468652074696D6520666F722000000000:3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D41C673812CFDE9675 +# DES CFB1 from FIPS 81 +# plaintext: 0100 1110 0110 1111 0111 0111 = 4e6f77 +# ciphertext: 1100 1101 0001 1110 1100 1001 = cd1ec9 + +DES-CFB1*8:0123456789abcdef:1234567890abcdef:4e6f77:cd1ec9 + +# DES CFB8 from FIPS 81 + +DES-CFB8:0123456789abcdef:1234567890abcdef:4e6f7720697320746865:f31fda07011462ee187f + # RC4 tests (from rc4test) RC4:0123456789abcdef0123456789abcdef::0123456789abcdef:75b7878099e0c596 RC4:0123456789abcdef0123456789abcdef::0000000000000000:7494c2e7104b0879 diff --git a/src/lib/libssl/src/test/maketests.com b/src/lib/libssl/src/test/maketests.com index 7c44e4545a..dfbfef7b1b 100644 --- a/src/lib/libssl/src/test/maketests.com +++ b/src/lib/libssl/src/test/maketests.com @@ -615,7 +615,7 @@ $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - THEN CC = "CC/DECC" $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - "/NOLIST/PREFIX=ALL" + - - "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS + "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS $! $! Define The Linker Options File Name. $! @@ -648,7 +648,7 @@ $ EXIT $ ENDIF $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - - "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS + "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS $ CCDEFS = CCDEFS + ",""VAXC""" $! $! Define As SYS$COMMON:[SYSLIB] @@ -679,7 +679,7 @@ $! $! Use GNU C... $! $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - - "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS + "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS $! $! Define The Linker Options File Name. $! diff --git a/src/lib/libssl/src/test/tcrl b/src/lib/libssl/src/test/tcrl index f71ef7a863..3ffed12a03 100644 --- a/src/lib/libssl/src/test/tcrl +++ b/src/lib/libssl/src/test/tcrl @@ -7,7 +7,7 @@ else fi export PATH -cmd='../apps/openssl crl' +cmd='../util/shlib_wrap.sh ../apps/openssl crl' if [ "$1"x != "x" ]; then t=$1 diff --git a/src/lib/libssl/src/test/testca b/src/lib/libssl/src/test/testca index 8215ebb5d1..5b2faa78f1 100644 --- a/src/lib/libssl/src/test/testca +++ b/src/lib/libssl/src/test/testca @@ -11,6 +11,9 @@ export SH PATH SSLEAY_CONFIG="-config CAss.cnf" export SSLEAY_CONFIG +OPENSSL="`pwd`/../util/shlib_wrap.sh openssl" +export OPENSSL + /bin/rm -fr demoCA $SH ../apps/CA.sh -newca <$test; echo cat -$cmd enc < $test > $test.cipher -$cmd enc < $test.cipher >$test.clear +$cmd enc -non-fips-allow < $test > $test.cipher +$cmd enc -non-fips-allow < $test.cipher >$test.clear cmp $test $test.clear if [ $? != 0 ] then @@ -17,8 +17,8 @@ else /bin/rm $test.cipher $test.clear fi echo base64 -$cmd enc -a -e < $test > $test.cipher -$cmd enc -a -d < $test.cipher >$test.clear +$cmd enc -non-fips-allow -a -e < $test > $test.cipher +$cmd enc -non-fips-allow -a -d < $test.cipher >$test.clear cmp $test $test.clear if [ $? != 0 ] then @@ -30,8 +30,8 @@ fi for i in `$cmd list-cipher-commands` do echo $i - $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher - $cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear + $cmd $i -non-fips-allow -bufsize 113 -e -k test < $test > $test.$i.cipher + $cmd $i -non-fips-allow -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear cmp $test $test.$i.clear if [ $? != 0 ] then @@ -41,8 +41,8 @@ do fi echo $i base64 - $cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher - $cmd $i -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear + $cmd $i -non-fips-allow -bufsize 113 -a -e -k test < $test > $test.$i.cipher + $cmd $i -non-fips-allow -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear cmp $test $test.$i.clear if [ $? != 0 ] then diff --git a/src/lib/libssl/src/test/testenc.com b/src/lib/libssl/src/test/testenc.com index c24fa388c0..5e6f521f9d 100644 --- a/src/lib/libssl/src/test/testenc.com +++ b/src/lib/libssl/src/test/testenc.com @@ -4,7 +4,7 @@ $ __arch := VAX $ if f$getsyi("cpu") .ge. 128 then __arch := AXP $ exe_dir := sys$disk:[-.'__arch'.exe.apps] $ -$ testsrc := makefile.ssl +$ testsrc := makefile. $ test := p.txt $ cmd := mcr 'exe_dir'openssl $ diff --git a/src/lib/libssl/src/test/testfipsssl b/src/lib/libssl/src/test/testfipsssl new file mode 100644 index 0000000000..c4836edc25 --- /dev/null +++ b/src/lib/libssl/src/test/testfipsssl @@ -0,0 +1,113 @@ +#!/bin/sh + +if [ "$1" = "" ]; then + key=../apps/server.pem +else + key="$1" +fi +if [ "$2" = "" ]; then + cert=../apps/server.pem +else + cert="$2" +fi + +ciphers="DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:DES-CBC3-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES128-SHA:EXP1024-DHE-DSS-DES-CBC-SHA:EXP1024-DES-CBC-SHA:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA" + +ssltest="../util/shlib_wrap.sh ./ssltest -F -key $key -cert $cert -c_key $key -c_cert $cert -cipher $ciphers" + +if ../util/shlib_wrap.sh ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then + dsa_cert=YES +else + dsa_cert=NO +fi + +if [ "$3" = "" ]; then + CA="-CApath ../certs" +else + CA="-CAfile $3" +fi + +if [ "$4" = "" ]; then + extra="" +else + extra="$4" +fi + +############################################################################# + +echo test ssl3 is forbidden in FIPS mode +$ssltest -ssl3 $extra && exit 1 + +echo test ssl2 is forbidden in FIPS mode +$ssltest -ssl2 $extra && exit 1 + +echo test tls1 +$ssltest -tls1 $extra || exit 1 + +echo test tls1 with server authentication +$ssltest -tls1 -server_auth $CA $extra || exit 1 + +echo test tls1 with client authentication +$ssltest -tls1 -client_auth $CA $extra || exit 1 + +echo test tls1 with both client and server authentication +$ssltest -tls1 -server_auth -client_auth $CA $extra || exit 1 + +echo test tls1 via BIO pair +$ssltest -bio_pair -tls1 $extra || exit 1 + +echo test tls1 with server authentication via BIO pair +$ssltest -bio_pair -tls1 -server_auth $CA $extra || exit 1 + +echo test tls1 with client authentication via BIO pair +$ssltest -bio_pair -tls1 -client_auth $CA $extra || exit 1 + +echo test tls1 with both client and server authentication via BIO pair +$ssltest -bio_pair -tls1 -server_auth -client_auth $CA $extra || exit 1 + +# note that all the below actually choose TLS... + +if [ $dsa_cert = NO ]; then + echo test sslv2/sslv3 w/o DHE via BIO pair + $ssltest -bio_pair -no_dhe $extra || exit 1 +fi + +echo test sslv2/sslv3 with 1024bit DHE via BIO pair +$ssltest -bio_pair -dhe1024dsa -v $extra || exit 1 + +echo test sslv2/sslv3 with server authentication +$ssltest -bio_pair -server_auth $CA $extra || exit 1 + +echo test sslv2/sslv3 with client authentication via BIO pair +$ssltest -bio_pair -client_auth $CA $extra || exit 1 + +echo test sslv2/sslv3 with both client and server authentication via BIO pair +$ssltest -bio_pair -server_auth -client_auth $CA $extra || exit 1 + +echo test sslv2/sslv3 with both client and server authentication via BIO pair and app verify +$ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1 + +############################################################################# + +if ../util/shlib_wrap.sh ../apps/openssl no-dh; then + echo skipping anonymous DH tests +else + echo test tls1 with 1024bit anonymous DH, multiple handshakes + $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1 +fi + +if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then + echo skipping RSA tests +else + echo test tls1 with 1024bit RSA, no DHE, multiple handshakes + ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1 + + if ../util/shlib_wrap.sh ../apps/openssl no-dh; then + echo skipping RSA+DHE tests + else + echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes + ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1 + fi +fi + +exit 0 diff --git a/src/lib/libssl/src/test/testgen b/src/lib/libssl/src/test/testgen index 3798543e04..524c0d134c 100644 --- a/src/lib/libssl/src/test/testgen +++ b/src/lib/libssl/src/test/testgen @@ -17,7 +17,7 @@ echo "generating certificate request" echo "string to make the random number generator think it has entropy" >> ./.rnd -if ../apps/openssl no-rsa; then +if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then req_new='-newkey dsa:../apps/dsa512.pem' else req_new='-new' @@ -29,13 +29,13 @@ echo "This could take some time." rm -f testkey.pem testreq.pem -../apps/openssl req -config test.cnf $req_new -out testreq.pem +../util/shlib_wrap.sh ../apps/openssl req -config test.cnf $req_new -out testreq.pem if [ $? != 0 ]; then echo problems creating request exit 1 fi -../apps/openssl req -config test.cnf -verify -in testreq.pem -noout +../util/shlib_wrap.sh ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout if [ $? != 0 ]; then echo signature on req is wrong exit 1 diff --git a/src/lib/libssl/src/test/testss b/src/lib/libssl/src/test/testss index 8d3557f356..1a426857d3 100644 --- a/src/lib/libssl/src/test/testss +++ b/src/lib/libssl/src/test/testss @@ -1,9 +1,9 @@ #!/bin/sh -digest='-md5' -reqcmd="../apps/openssl req" -x509cmd="../apps/openssl x509 $digest" -verifycmd="../apps/openssl verify" +digest='-sha1' +reqcmd="../util/shlib_wrap.sh ../apps/openssl req" +x509cmd="../util/shlib_wrap.sh ../apps/openssl x509 $digest" +verifycmd="../util/shlib_wrap.sh ../apps/openssl verify" dummycnf="../apps/openssl.cnf" CAkey="keyCA.ss" @@ -17,12 +17,24 @@ Ukey="keyU.ss" Ureq="reqU.ss" Ucert="certU.ss" +P1conf="P1ss.cnf" +P1key="keyP1.ss" +P1req="reqP1.ss" +P1cert="certP1.ss" +P1intermediate="tmp_intP1.ss" + +P2conf="P2ss.cnf" +P2key="keyP2.ss" +P2req="reqP2.ss" +P2cert="certP2.ss" +P2intermediate="tmp_intP2.ss" + echo echo "make a certificate request using 'req'" echo "string to make the random number generator think it has entropy" >> ./.rnd -if ../apps/openssl no-rsa; then +if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then req_new='-newkey dsa:../apps/dsa512.pem' else req_new='-new' @@ -35,7 +47,7 @@ if [ $? != 0 ]; then fi echo echo "convert the certificate request into a self signed certificate using 'x509'" -$x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey >err.ss +$x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey -extfile $CAconf -extensions v3_ca >err.ss if [ $? != 0 ]; then echo "error using 'x509' to self sign a certificate request" exit 1 @@ -68,18 +80,18 @@ if [ $? != 0 ]; then fi echo -echo "make another certificate request using 'req'" +echo "make a user certificate request using 'req'" $reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss if [ $? != 0 ]; then - echo "error using 'req' to generate a certificate request" + echo "error using 'req' to generate a user certificate request" exit 1 fi echo -echo "sign certificate request with the just created CA via 'x509'" -$x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey >err.ss +echo "sign user certificate request with the just created CA via 'x509'" +$x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey -extfile $Uconf -extensions v3_ee >err.ss if [ $? != 0 ]; then - echo "error using 'x509' to sign a certificate request" + echo "error using 'x509' to sign a user certificate request" exit 1 fi @@ -88,6 +100,50 @@ echo echo "Certificate details" $x509cmd -subject -issuer -startdate -enddate -noout -in $Ucert +echo +echo "make a proxy certificate request using 'req'" +$reqcmd -config $P1conf -out $P1req -keyout $P1key $req_new >err.ss +if [ $? != 0 ]; then + echo "error using 'req' to generate a proxy certificate request" + exit 1 +fi + +echo +echo "sign proxy certificate request with the just created user certificate via 'x509'" +$x509cmd -CAcreateserial -in $P1req -days 30 -req -out $P1cert -CA $Ucert -CAkey $Ukey -extfile $P1conf -extensions v3_proxy >err.ss +if [ $? != 0 ]; then + echo "error using 'x509' to sign a proxy certificate request" + exit 1 +fi + +cat $Ucert > $P1intermediate +$verifycmd -CAfile $CAcert -untrusted $P1intermediate $P1cert +echo +echo "Certificate details" +$x509cmd -subject -issuer -startdate -enddate -noout -in $P1cert + +echo +echo "make another proxy certificate request using 'req'" +$reqcmd -config $P2conf -out $P2req -keyout $P2key $req_new >err.ss +if [ $? != 0 ]; then + echo "error using 'req' to generate another proxy certificate request" + exit 1 +fi + +echo +echo "sign second proxy certificate request with the first proxy certificate via 'x509'" +$x509cmd -CAcreateserial -in $P2req -days 30 -req -out $P2cert -CA $P1cert -CAkey $P1key -extfile $P2conf -extensions v3_proxy >err.ss +if [ $? != 0 ]; then + echo "error using 'x509' to sign a second proxy certificate request" + exit 1 +fi + +cat $Ucert $P1cert > $P2intermediate +$verifycmd -CAfile $CAcert -untrusted $P2intermediate $P2cert +echo +echo "Certificate details" +$x509cmd -subject -issuer -startdate -enddate -noout -in $P2cert + echo echo The generated CA certificate is $CAcert echo The generated CA private key is $CAkey @@ -95,5 +151,13 @@ echo The generated CA private key is $CAkey echo The generated user certificate is $Ucert echo The generated user private key is $Ukey +echo The first generated proxy certificate is $P1cert +echo The first generated proxy private key is $P1key + +echo The second generated proxy certificate is $P2cert +echo The second generated proxy private key is $P2key + /bin/rm err.ss +#/bin/rm $P1intermediate +#/bin/rm $P2intermediate exit 0 diff --git a/src/lib/libssl/src/test/testssl b/src/lib/libssl/src/test/testssl index ca8e718022..8ac90ae5ee 100644 --- a/src/lib/libssl/src/test/testssl +++ b/src/lib/libssl/src/test/testssl @@ -10,9 +10,9 @@ if [ "$2" = "" ]; then else cert="$2" fi -ssltest="./ssltest -key $key -cert $cert -c_key $key -c_cert $cert" +ssltest="../util/shlib_wrap.sh ./ssltest -key $key -cert $cert -c_key $key -c_cert $cert" -if ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then +if ../util/shlib_wrap.sh ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then dsa_cert=YES else dsa_cert=NO @@ -121,24 +121,24 @@ $ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1 ############################################################################# -if ../apps/openssl no-dh; then +if ../util/shlib_wrap.sh ../apps/openssl no-dh; then echo skipping anonymous DH tests else echo test tls1 with 1024bit anonymous DH, multiple handshakes $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1 fi -if ../apps/openssl no-rsa; then +if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then echo skipping RSA tests else echo test tls1 with 1024bit RSA, no DHE, multiple handshakes - ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1 + ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1 - if ../apps/openssl no-dh; then + if ../util/shlib_wrap.sh ../apps/openssl no-dh; then echo skipping RSA+DHE tests else echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes - ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1 + ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1 fi fi diff --git a/src/lib/libssl/src/test/testsslproxy b/src/lib/libssl/src/test/testsslproxy new file mode 100644 index 0000000000..58bbda8ab7 --- /dev/null +++ b/src/lib/libssl/src/test/testsslproxy @@ -0,0 +1,10 @@ +#! /bin/sh + +echo 'Testing a lot of proxy conditions.' +echo 'Some of them may turn out being invalid, which is fine.' +for auth in A B C BC; do + for cond in A B C 'A|B&!C'; do + sh ./testssl $1 $2 $3 "-proxy -proxy_auth $auth -proxy_cond $cond" + if [ $? = 3 ]; then exit 1; fi + done +done diff --git a/src/lib/libssl/src/test/tpkcs7 b/src/lib/libssl/src/test/tpkcs7 index cf3bd9fadb..79bb6e0edf 100644 --- a/src/lib/libssl/src/test/tpkcs7 +++ b/src/lib/libssl/src/test/tpkcs7 @@ -7,7 +7,7 @@ else fi export PATH -cmd='../apps/openssl pkcs7' +cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7' if [ "$1"x != "x" ]; then t=$1 diff --git a/src/lib/libssl/src/test/tpkcs7d b/src/lib/libssl/src/test/tpkcs7d index 18f9311b06..20394b34c4 100644 --- a/src/lib/libssl/src/test/tpkcs7d +++ b/src/lib/libssl/src/test/tpkcs7d @@ -7,7 +7,7 @@ else fi export PATH -cmd='../apps/openssl pkcs7' +cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7' if [ "$1"x != "x" ]; then t=$1 diff --git a/src/lib/libssl/src/test/treq b/src/lib/libssl/src/test/treq index 47a8273cde..7e020210a5 100644 --- a/src/lib/libssl/src/test/treq +++ b/src/lib/libssl/src/test/treq @@ -7,7 +7,7 @@ else fi export PATH -cmd='../apps/openssl req -config ../apps/openssl.cnf' +cmd='../util/shlib_wrap.sh ../apps/openssl req -config ../apps/openssl.cnf' if [ "$1"x != "x" ]; then t=$1 diff --git a/src/lib/libssl/src/test/trsa b/src/lib/libssl/src/test/trsa index 413e2ec0a0..67b4a98841 100644 --- a/src/lib/libssl/src/test/trsa +++ b/src/lib/libssl/src/test/trsa @@ -7,12 +7,12 @@ else fi export PATH -if ../apps/openssl no-rsa; then +if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then echo skipping rsa conversion test exit 0 fi -cmd='../apps/openssl rsa' +cmd='../util/shlib_wrap.sh ../apps/openssl rsa' if [ "$1"x != "x" ]; then t=$1 diff --git a/src/lib/libssl/src/test/tsid b/src/lib/libssl/src/test/tsid index 40a1dfa97c..fb4a7213b9 100644 --- a/src/lib/libssl/src/test/tsid +++ b/src/lib/libssl/src/test/tsid @@ -7,7 +7,7 @@ else fi export PATH -cmd='../apps/openssl sess_id' +cmd='../util/shlib_wrap.sh ../apps/openssl sess_id' if [ "$1"x != "x" ]; then t=$1 diff --git a/src/lib/libssl/src/test/tverify.com b/src/lib/libssl/src/test/tverify.com index f97e71478f..2060184d1e 100644 --- a/src/lib/libssl/src/test/tverify.com +++ b/src/lib/libssl/src/test/tverify.com @@ -15,12 +15,15 @@ $ f = f$search("[-.certs]*.pem") $ if f .nes. "" .and. f .nes. old_f $ then $ certs = certs + " [-.certs]" + f$parse(f,,,"NAME") + ".pem" -$ if f$length(certs) .lt. 180 then goto loop_certs2 $ c := YES +$ if f$length(certs) .lt. 180 then goto loop_certs2 $ endif $ certs = certs - " " $ -$ mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs' -$ if c then goto loop_certs +$ if c +$ then +$ mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs' +$ goto loop_certs +$ endif $ $ delete certs.tmp;* diff --git a/src/lib/libssl/src/test/tx509 b/src/lib/libssl/src/test/tx509 index d380963abc..1b9c8661f3 100644 --- a/src/lib/libssl/src/test/tx509 +++ b/src/lib/libssl/src/test/tx509 @@ -7,7 +7,7 @@ else fi export PATH -cmd='../apps/openssl x509' +cmd='../util/shlib_wrap.sh ../apps/openssl x509' if [ "$1"x != "x" ]; then t=$1 diff --git a/src/lib/libssl/src/tools/Makefile b/src/lib/libssl/src/tools/Makefile new file mode 100644 index 0000000000..52a7970455 --- /dev/null +++ b/src/lib/libssl/src/tools/Makefile @@ -0,0 +1,61 @@ +# +# SSLeay/tools/Makefile +# + +DIR= tools +TOP= .. +CC= cc +INCLUDES= -I$(TOP) -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +MAKEFILE= Makefile + +CFLAGS= $(INCLUDES) $(CFLAG) + +TEST= +APPS= c_rehash +MISC_APPS= c_hash c_info c_issuer c_name + +all: + +install: + @for i in $(APPS) ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ + chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ + done; + @for i in $(MISC_APPS) ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \ + chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \ + done; + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + +lint: + +tags: + +errors: + +depend: + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +errors: + +# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/src/lib/libssl/src/tools/c_issuer b/src/lib/libssl/src/tools/c_issuer index 4c691201bb..55821ab740 100644 --- a/src/lib/libssl/src/tools/c_issuer +++ b/src/lib/libssl/src/tools/c_issuer @@ -6,5 +6,5 @@ for i in $* do n=`openssl x509 -issuer -noout -in $i` - echo "$i\t$n" + echo "$i $n" done diff --git a/src/lib/libssl/src/tools/c_rehash b/src/lib/libssl/src/tools/c_rehash index 3e9ba1efe4..e614fb5466 100644 --- a/src/lib/libssl/src/tools/c_rehash +++ b/src/lib/libssl/src/tools/c_rehash @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl # Perl c_rehash script, scan all files in a directory diff --git a/src/lib/libssl/src/util/cygwin.sh b/src/lib/libssl/src/util/cygwin.sh index 930f766b4f..7f791d47f4 100644 --- a/src/lib/libssl/src/util/cygwin.sh +++ b/src/lib/libssl/src/util/cygwin.sh @@ -21,11 +21,11 @@ function cleanup() function get_openssl_version() { - eval `grep '^VERSION=' Makefile.ssl` + eval `grep '^VERSION=' Makefile` if [ -z "${VERSION}" ] then - echo "Error: Couldn't retrieve OpenSSL version from Makefile.ssl." - echo " Check value of variable VERSION in Makefile.ssl." + echo "Error: Couldn't retrieve OpenSSL version from Makefile." + echo " Check value of variable VERSION in Makefile." exit 1 fi } @@ -39,7 +39,7 @@ function base_install() function doc_install() { - DOC_DIR=${INSTALL_PREFIX}/usr/doc/openssl + DOC_DIR=${INSTALL_PREFIX}/usr/share/doc/openssl mkdir -p ${DOC_DIR} cp CHANGES CHANGES.SSLeay INSTALL LICENSE NEWS README ${DOC_DIR} @@ -49,7 +49,7 @@ function doc_install() function create_cygwin_readme() { - README_DIR=${INSTALL_PREFIX}/usr/doc/Cygwin + README_DIR=${INSTALL_PREFIX}/usr/share/doc/Cygwin README_FILE=${README_DIR}/openssl-${VERSION}.README mkdir -p ${README_DIR} @@ -112,8 +112,8 @@ cd ${INSTALL_PREFIX} strip usr/bin/*.exe usr/bin/*.dll # Runtime package -find etc usr/bin usr/doc usr/ssl/certs usr/ssl/man/man[157] usr/ssl/misc \ - usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d | +find etc usr/bin usr/share/doc usr/ssl/certs usr/ssl/man/man[157] \ + usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - # Development package find usr/include usr/lib usr/ssl/man/man3 -empty -o \! -type d | diff --git a/src/lib/libssl/src/util/domd b/src/lib/libssl/src/util/domd index 49310bbdd1..5610521f0b 100644 --- a/src/lib/libssl/src/util/domd +++ b/src/lib/libssl/src/util/domd @@ -11,7 +11,7 @@ if [ "$1" = "-MD" ]; then fi if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi -cp Makefile.ssl Makefile.save +cp Makefile Makefile.save # fake the presence of Kerberos touch $TOP/krb5.h if [ "$MAKEDEPEND" = "gcc" ]; then @@ -20,15 +20,15 @@ if [ "$MAKEDEPEND" = "gcc" ]; then if [ "$1" != "--" ]; then args="$args $1"; fi shift done - sed -e '/^# DO NOT DELETE.*/,$d' < Makefile.ssl > Makefile.tmp + sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp gcc -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new rm -f Makefile.tmp else - ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile.ssl $@ - ${PERL} $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new + ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile $@ + ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new fi -mv Makefile.new Makefile.ssl +mv Makefile.new Makefile # unfake the presence of Kerberos rm $TOP/krb5.h diff --git a/src/lib/libssl/src/util/extract-names.pl b/src/lib/libssl/src/util/extract-names.pl index 744a8e2324..35bd6ed843 100644 --- a/src/lib/libssl/src/util/extract-names.pl +++ b/src/lib/libssl/src/util/extract-names.pl @@ -9,9 +9,11 @@ while() { } elsif ($name) { if (/ - /) { s/ - .*//; - s/,[ \t]+/,/g; - s/^[ \t]+//g; - s/[ \t]+$//g; + s/,\s+/,/g; + s/\s+,/,/g; + s/^\s+//g; + s/\s+$//g; + s/\s/_/g; push @words, split ','; } } diff --git a/src/lib/libssl/src/util/fixNT.sh b/src/lib/libssl/src/util/fixNT.sh index ce4f19299b..ab9e766b86 100644 --- a/src/lib/libssl/src/util/fixNT.sh +++ b/src/lib/libssl/src/util/fixNT.sh @@ -3,12 +3,12 @@ # clean up the mess that NT makes of my source tree # -if [ -f makefile.ssl -a ! -f Makefile.ssl ]; then - /bin/mv makefile.ssl Makefile.ssl +if [ -f makefile -a ! -f Makefile ]; then + /bin/mv makefile Makefile fi chmod +x Configure util/* echo cleaning /bin/rm -f `find . -name '*.$$$' -print` 2>/dev/null >/dev/null echo 'removing those damn ^M' perl -pi -e 's/\015//' `find . -type 'f' -print |grep -v '.obj$' |grep -v '.der$' |grep -v '.gz'` -make -f Makefile.ssl links +make -f Makefile links diff --git a/src/lib/libssl/src/util/libeay.num b/src/lib/libssl/src/util/libeay.num index 203c7713e7..56fb7446e0 100644 --- a/src/lib/libssl/src/util/libeay.num +++ b/src/lib/libssl/src/util/libeay.num @@ -284,20 +284,20 @@ EVP_add_alias 291 NOEXIST::FUNCTION: EVP_add_cipher 292 EXIST::FUNCTION: EVP_add_digest 293 EXIST::FUNCTION: EVP_bf_cbc 294 EXIST::FUNCTION:BF -EVP_bf_cfb 295 EXIST::FUNCTION:BF +EVP_bf_cfb64 295 EXIST::FUNCTION:BF EVP_bf_ecb 296 EXIST::FUNCTION:BF EVP_bf_ofb 297 EXIST::FUNCTION:BF EVP_cleanup 298 EXIST::FUNCTION: EVP_des_cbc 299 EXIST::FUNCTION:DES -EVP_des_cfb 300 EXIST::FUNCTION:DES +EVP_des_cfb64 300 EXIST::FUNCTION:DES EVP_des_ecb 301 EXIST::FUNCTION:DES EVP_des_ede 302 EXIST::FUNCTION:DES EVP_des_ede3 303 EXIST::FUNCTION:DES EVP_des_ede3_cbc 304 EXIST::FUNCTION:DES -EVP_des_ede3_cfb 305 EXIST::FUNCTION:DES +EVP_des_ede3_cfb64 305 EXIST::FUNCTION:DES EVP_des_ede3_ofb 306 EXIST::FUNCTION:DES EVP_des_ede_cbc 307 EXIST::FUNCTION:DES -EVP_des_ede_cfb 308 EXIST::FUNCTION:DES +EVP_des_ede_cfb64 308 EXIST::FUNCTION:DES EVP_des_ede_ofb 309 EXIST::FUNCTION:DES EVP_des_ofb 310 EXIST::FUNCTION:DES EVP_desx_cbc 311 EXIST::FUNCTION:DES @@ -308,14 +308,14 @@ EVP_get_cipherbyname 315 EXIST::FUNCTION: EVP_get_digestbyname 316 EXIST::FUNCTION: EVP_get_pw_prompt 317 EXIST::FUNCTION: EVP_idea_cbc 318 EXIST::FUNCTION:IDEA -EVP_idea_cfb 319 EXIST::FUNCTION:IDEA +EVP_idea_cfb64 319 EXIST::FUNCTION:IDEA EVP_idea_ecb 320 EXIST::FUNCTION:IDEA EVP_idea_ofb 321 EXIST::FUNCTION:IDEA EVP_md2 322 EXIST::FUNCTION:MD2 EVP_md5 323 EXIST::FUNCTION:MD5 EVP_md_null 324 EXIST::FUNCTION: EVP_rc2_cbc 325 EXIST::FUNCTION:RC2 -EVP_rc2_cfb 326 EXIST::FUNCTION:RC2 +EVP_rc2_cfb64 326 EXIST::FUNCTION:RC2 EVP_rc2_ecb 327 EXIST::FUNCTION:RC2 EVP_rc2_ofb 328 EXIST::FUNCTION:RC2 EVP_rc4 329 EXIST::FUNCTION:RC4 @@ -962,7 +962,7 @@ i2t_ASN1_OBJECT 979 EXIST::FUNCTION: BN_BLINDING_new 980 EXIST::FUNCTION: BN_BLINDING_free 981 EXIST::FUNCTION: EVP_cast5_cbc 983 EXIST::FUNCTION:CAST -EVP_cast5_cfb 984 EXIST::FUNCTION:CAST +EVP_cast5_cfb64 984 EXIST::FUNCTION:CAST EVP_cast5_ecb 985 EXIST::FUNCTION:CAST EVP_cast5_ofb 986 EXIST::FUNCTION:CAST BF_decrypt 987 EXIST::FUNCTION:BF @@ -1057,7 +1057,7 @@ EVP_CIPHER_param_to_asn1 1084 EXIST::FUNCTION: EVP_CIPHER_get_asn1_iv 1085 EXIST::FUNCTION: EVP_CIPHER_set_asn1_iv 1086 EXIST::FUNCTION: EVP_rc5_32_12_16_cbc 1087 EXIST::FUNCTION:RC5 -EVP_rc5_32_12_16_cfb 1088 EXIST::FUNCTION:RC5 +EVP_rc5_32_12_16_cfb64 1088 EXIST::FUNCTION:RC5 EVP_rc5_32_12_16_ecb 1089 EXIST::FUNCTION:RC5 EVP_rc5_32_12_16_ofb 1090 EXIST::FUNCTION:RC5 asn1_add_error 1091 EXIST::FUNCTION: @@ -2776,10 +2776,10 @@ ENGINE_load_4758cca 3218 EXIST::FUNCTION:ENGINE _ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES EVP_aes_256_ofb 3220 EXIST::FUNCTION:AES EVP_aes_192_ofb 3221 EXIST::FUNCTION:AES -EVP_aes_128_cfb 3222 EXIST::FUNCTION:AES -EVP_aes_256_cfb 3223 EXIST::FUNCTION:AES +EVP_aes_128_cfb128 3222 EXIST::FUNCTION:AES +EVP_aes_256_cfb128 3223 EXIST::FUNCTION:AES EVP_aes_128_ofb 3224 EXIST::FUNCTION:AES -EVP_aes_192_cfb 3225 EXIST::FUNCTION:AES +EVP_aes_192_cfb128 3225 EXIST::FUNCTION:AES CONF_modules_free 3226 EXIST::FUNCTION: NCONF_default 3227 EXIST::FUNCTION: OPENSSL_no_config 3228 EXIST::FUNCTION: @@ -2803,3 +2803,67 @@ OpenSSLDie 3244 EXIST::FUNCTION: OPENSSL_cleanse 3245 EXIST::FUNCTION: ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH +EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES +FIPS_corrupt_rsa 3249 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_des 3250 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES +EVP_aes_192_cfb8 3252 EXIST::FUNCTION:AES +FIPS_mode_set 3253 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_dsa 3254 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES +FIPS_allow_md5 3256 EXIST:OPENSSL_FIPS:FUNCTION: +DES_ede3_cfb_encrypt 3257 EXIST::FUNCTION:DES +EVP_des_ede3_cfb8 3258 EXIST::FUNCTION:DES +FIPS_rand_seeded 3259 EXIST:OPENSSL_FIPS:FUNCTION: +AES_cfbr_encrypt_block 3260 EXIST::FUNCTION:AES +AES_cfb8_encrypt 3261 EXIST::FUNCTION:AES +FIPS_rand_seed 3262 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_corrupt_des 3263 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_aes_192_cfb1 3264 EXIST::FUNCTION:AES +FIPS_selftest_aes 3265 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_set_prng_key 3266 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_des_cfb8 3267 EXIST::FUNCTION:DES +FIPS_corrupt_dsa 3268 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_test_mode 3269 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_rand_method 3270 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_aes_256_cfb1 3271 EXIST::FUNCTION:AES +ERR_load_FIPS_strings 3272 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_corrupt_aes 3273 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_sha1 3274 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_rsa 3275 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_corrupt_sha1 3276 EXIST:OPENSSL_FIPS:FUNCTION: +EVP_des_cfb1 3277 EXIST::FUNCTION:DES +FIPS_dsa_check 3278 EXIST:OPENSSL_FIPS:FUNCTION: +AES_cfb1_encrypt 3279 EXIST::FUNCTION:AES +EVP_des_ede3_cfb1 3280 EXIST::FUNCTION:DES +FIPS_rand_check 3281 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_md5_allowed 3282 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_mode 3283 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_failed 3284 EXIST:OPENSSL_FIPS:FUNCTION: +sk_is_sorted 3285 EXIST::FUNCTION: +X509_check_ca 3286 EXIST::FUNCTION: +private_idea_set_encrypt_key 3287 EXIST:OPENSSL_FIPS:FUNCTION:IDEA +HMAC_CTX_set_flags 3288 EXIST::FUNCTION:HMAC +private_SHA_Init 3289 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA0 +private_CAST_set_key 3290 EXIST:OPENSSL_FIPS:FUNCTION:CAST +private_RIPEMD160_Init 3291 EXIST:OPENSSL_FIPS:FUNCTION:RIPEMD +private_RC5_32_set_key 3292 EXIST:OPENSSL_FIPS:FUNCTION:RC5 +private_MD5_Init 3293 EXIST:OPENSSL_FIPS:FUNCTION:MD5 +private_RC4_set_key 3294 EXIST:OPENSSL_FIPS:FUNCTION:RC4 +private_MDC2_Init 3295 EXIST:OPENSSL_FIPS:FUNCTION:MDC2 +private_RC2_set_key 3296 EXIST:OPENSSL_FIPS:FUNCTION:RC2 +private_MD4_Init 3297 EXIST:OPENSSL_FIPS:FUNCTION:MD4 +private_BF_set_key 3298 EXIST:OPENSSL_FIPS:FUNCTION:BF +private_MD2_Init 3299 EXIST:OPENSSL_FIPS:FUNCTION:MD2 +d2i_PROXY_CERT_INFO_EXTENSION 3300 EXIST::FUNCTION: +PROXY_POLICY_it 3301 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +PROXY_POLICY_it 3301 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +i2d_PROXY_POLICY 3302 EXIST::FUNCTION: +i2d_PROXY_CERT_INFO_EXTENSION 3303 EXIST::FUNCTION: +d2i_PROXY_POLICY 3304 EXIST::FUNCTION: +PROXY_CERT_INFO_EXTENSION_new 3305 EXIST::FUNCTION: +PROXY_CERT_INFO_EXTENSION_free 3306 EXIST::FUNCTION: +PROXY_CERT_INFO_EXTENSION_it 3307 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +PROXY_CERT_INFO_EXTENSION_it 3307 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +PROXY_POLICY_free 3308 EXIST::FUNCTION: +PROXY_POLICY_new 3309 EXIST::FUNCTION: diff --git a/src/lib/libssl/src/util/mk1mf.pl b/src/lib/libssl/src/util/mk1mf.pl index b4bc0457e5..957264c6b5 100644 --- a/src/lib/libssl/src/util/mk1mf.pl +++ b/src/lib/libssl/src/util/mk1mf.pl @@ -10,7 +10,7 @@ $OPTIONS=""; $ssl_version=""; $banner="\t\@echo Building OpenSSL"; -open(IN,") { $ssl_version=$1 if (/^VERSION=(.*)$/); $OPTIONS=$1 if (/^OPTIONS=(.*)$/); @@ -18,7 +18,7 @@ while() { } close(IN); -die "Makefile.ssl is not the toplevel Makefile!\n" if $ssl_version eq ""; +die "Makefile is not the toplevel Makefile!\n" if $ssl_version eq ""; $infile="MINFO"; @@ -222,7 +222,7 @@ $cflags.=" -DOPENSSL_NO_SHA" if $no_sha; $cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1; $cflags.=" -DOPENSSL_NO_RIPEMD" if $no_ripemd; $cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2; -$cflags.=" -DOPENSSL_NO_BF" if $no_bf; +$cflags.=" -DOPENSSL_NO_BF" if $no_bf; $cflags.=" -DOPENSSL_NO_CAST" if $no_cast; $cflags.=" -DOPENSSL_NO_DES" if $no_des; $cflags.=" -DOPENSSL_NO_RSA" if $no_rsa; @@ -236,6 +236,7 @@ $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; $cflags.=" -DOPENSSL_NO_EC" if $no_ec; $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; $cflags.=" -DOPENSSL_NO_HW" if $no_hw; +$cflags.=" -DOPENSSL_FIPS" if $fips; #$cflags.=" -DRSAref" if $rsaref ne ""; ## if ($unix) @@ -631,15 +632,21 @@ foreach (split(/\s+/,$test)) $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); -$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); - +if ($fips) + { + $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)","\$(BIN_D)$o.sha1","\$(BIN_D)$o\$(E_EXE)$exep"); + } +else + { + $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); + } print $defs; if ($platform eq "linux-elf") { print <<"EOF"; # Generate perlasm output files %.cpp: - (cd \$(\@D)/..; PERL=perl make -f Makefile.ssl asm/\$(\@F)) + (cd \$(\@D)/..; PERL=perl make -f Makefile asm/\$(\@F)) EOF } print "###################################################################\n"; @@ -921,6 +928,7 @@ sub read_options $no_aes=1; } elsif (/^rsaref$/) { } + elsif (/^fips$/) { $fips=1; } elsif (/^gcc$/) { $gcc=1; } elsif (/^debug$/) { $debug=1; } elsif (/^profile$/) { $profile=1; } diff --git a/src/lib/libssl/src/util/mkdef.pl b/src/lib/libssl/src/util/mkdef.pl index 01a1bfda19..9918c3d549 100644 --- a/src/lib/libssl/src/util/mkdef.pl +++ b/src/lib/libssl/src/util/mkdef.pl @@ -79,7 +79,7 @@ my $OS2=0; my $safe_stack_def = 0; my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", - "EXPORT_VAR_AS_FUNCTION" ); + "EXPORT_VAR_AS_FUNCTION", "OPENSSL_FIPS" ); my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", @@ -94,7 +94,7 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", "FP_API", "STDIO", "SOCK", "KRB5", "ENGINE", "HW" ); my $options=""; -open(IN,") { $options=$1 if (/^OPTIONS=(.*)$/); } @@ -109,6 +109,7 @@ my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; my $no_ec; my $no_engine; my $no_hw; my $no_fp_api; +my $fips; foreach (@ARGV, split(/ /, $options)) { @@ -129,6 +130,7 @@ foreach (@ARGV, split(/ /, $options)) } $VMS=1 if $_ eq "VMS"; $OS2=1 if $_ eq "OS2"; + $fips=1 if $_ eq "fips"; $do_ssl=1 if $_ eq "ssleay"; if ($_ eq "ssl") { @@ -265,6 +267,7 @@ $crypto.=" crypto/ocsp/ocsp.h"; $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; $crypto.=" crypto/krb5/krb5_asn.h"; $crypto.=" crypto/tmdiff.h"; +$crypto.=" fips/fips.h fips/rand/fips_rand.h"; my $symhacks="crypto/symhacks.h"; @@ -469,7 +472,7 @@ sub do_defs push(@tag,$1); $tag{$1}=-1; } - } elsif (/^\#\s*ifdef\s+(.*)/) { + } elsif (/^\#\s*ifdef\s+(\S*)/) { push(@tag,"-"); push(@tag,$1); $tag{$1}=1; @@ -794,7 +797,7 @@ sub do_defs } close(IN); - my $algs; + my $algs = ''; my $plays; print STDERR "DEBUG: postprocessing ----------\n" if $debug; @@ -864,6 +867,7 @@ sub do_defs $platform{$s} = &reduce_platforms((defined($platform{$s})?$platform{$s}.',':"").$p); + $algorithm{$s} = '' if !defined $algorithm{$s}; $algorithm{$s} .= ','.$a; if (defined($variant{$s})) { @@ -1028,6 +1032,9 @@ sub is_valid if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { return 1; } + if ($keyword eq "OPENSSL_FIPS" && $fips) { + return 1; + } return 0; } else { # algorithms @@ -1119,7 +1126,7 @@ sub print_test_file sub get_version { local *MF; my $v = '?'; - open MF, 'Makefile.ssl' or return $v; + open MF, 'Makefile' or return $v; while () { $v = $1, last if /^VERSION=(.*?)\s*$/; } diff --git a/src/lib/libssl/src/util/mkerr.pl b/src/lib/libssl/src/util/mkerr.pl index 1b2915c767..60e534807e 100644 --- a/src/lib/libssl/src/util/mkerr.pl +++ b/src/lib/libssl/src/util/mkerr.pl @@ -41,7 +41,8 @@ while (@ARGV) { } if($recurse) { - @source = (, , ); + @source = (, , , , + ); } else { @source = @ARGV; } @@ -262,7 +263,7 @@ foreach $lib (keys %csrc) } else { push @out, "/* ====================================================================\n", -" * Copyright (c) 2001-2003 The OpenSSL Project. All rights reserved.\n", +" * Copyright (c) 2001-2005 The OpenSSL Project. All rights reserved.\n", " *\n", " * Redistribution and use in source and binary forms, with or without\n", " * modification, are permitted provided that the following conditions\n", @@ -404,7 +405,7 @@ EOF print OUT <<"EOF"; /* $cfile */ /* ==================================================================== - * Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/lib/libssl/src/util/mkfiles.pl b/src/lib/libssl/src/util/mkfiles.pl index 29e1404c69..928a274303 100644 --- a/src/lib/libssl/src/util/mkfiles.pl +++ b/src/lib/libssl/src/util/mkfiles.pl @@ -51,6 +51,14 @@ my @dirs = ( "crypto/ocsp", "crypto/ui", "crypto/krb5", +"fips", +"fips/aes", +"fips/des", +"fips/dsa", +"fips/dh", +"fips/rand", +"fips/rsa", +"fips/sha1", "ssl", "apps", "test", @@ -58,7 +66,7 @@ my @dirs = ( ); foreach (@dirs) { - &files_dir ($_, "Makefile.ssl"); + &files_dir ($_, "Makefile"); } exit(0); diff --git a/src/lib/libssl/src/util/mklink.pl b/src/lib/libssl/src/util/mklink.pl index 9386da7aa4..c8653cecc3 100644 --- a/src/lib/libssl/src/util/mklink.pl +++ b/src/lib/libssl/src/util/mklink.pl @@ -52,6 +52,7 @@ $symlink_exists=eval {symlink("",""); 1}; foreach $file (@files) { my $err = ""; if ($symlink_exists) { + unlink "$from/$file"; symlink("$to/$file", "$from/$file") or $err = " [$!]"; } else { unlink "$from/$file"; diff --git a/src/lib/libssl/src/util/mkstack.pl b/src/lib/libssl/src/util/mkstack.pl index 085c50f790..0ca9eb6a76 100644 --- a/src/lib/libssl/src/util/mkstack.pl +++ b/src/lib/libssl/src/util/mkstack.pl @@ -84,6 +84,7 @@ while() { #define sk_${type_thing}_shift(st) SKM_sk_shift($type_thing, (st)) #define sk_${type_thing}_pop(st) SKM_sk_pop($type_thing, (st)) #define sk_${type_thing}_sort(st) SKM_sk_sort($type_thing, (st)) +#define sk_${type_thing}_is_sorted(st) SKM_sk_is_sorted($type_thing, (st)) EOF } foreach $type_thing (sort @asn1setlst) { diff --git a/src/lib/libssl/src/util/opensslwrap.sh b/src/lib/libssl/src/util/opensslwrap.sh new file mode 100755 index 0000000000..91d29e2b87 --- /dev/null +++ b/src/lib/libssl/src/util/opensslwrap.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +HERE="`echo $0 | sed -e 's|[^/]*$||'`" +OPENSSL="${HERE}../apps/openssl" + +if [ -x "${OPENSSL}.exe" ]; then + # The original reason for this script existence is to work around + # certain caveats in run-time linker behaviour. On Windows platforms + # adjusting $PATH used to be sufficient, but with introduction of + # SafeDllSearchMode in XP/2003 the only way to get it right in + # *all* possible situations is to copy newly built .DLLs to apps/ + # and test/, which is now done elsewhere... The $PATH is adjusted + # for backward compatibility (and nostagical reasons:-). + if [ "$OSTYPE" != msdosdjgpp ]; then + PATH="${HERE}..:$PATH"; export PATH + fi + exec "${OPENSSL}.exe" "$@" +elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then + exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@" +else + exec "${OPENSSL}" "$@" # hope for the best... +fi diff --git a/src/lib/libssl/src/util/pl/BC-16.pl b/src/lib/libssl/src/util/pl/BC-16.pl index 2033f524ca..8030653daa 100644 --- a/src/lib/libssl/src/util/pl/BC-16.pl +++ b/src/lib/libssl/src/util/pl/BC-16.pl @@ -64,7 +64,7 @@ $lfile=''; $asm='bcc -c -B -Tml'; $afile='/o'; -if ($no_asm) +if ($no_asm || $fips) { $bn_asm_obj=''; $bn_asm_src=''; @@ -119,11 +119,11 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$f,$_,@f); - + $file =~ s/\//$o/g if $o ne '/'; - $n=&bname($targer); + $n=&bname($target); $ret.="$target: $files $dep_libs\n"; $ret.=" \$(LINK) @&&|"; @@ -139,7 +139,12 @@ sub do_link_rule } else { $ret.="\n $r \$(APP_EX_OBJ) $files\n"; } - $ret.=" $target\n\n $libs\n\n|\n\n"; + $ret.=" $target\n\n $libs\n\n|\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libssl/src/util/pl/BC-32.pl b/src/lib/libssl/src/util/pl/BC-32.pl index e83b336190..897ae9d824 100644 --- a/src/lib/libssl/src/util/pl/BC-32.pl +++ b/src/lib/libssl/src/util/pl/BC-32.pl @@ -62,7 +62,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_mulw_obj='crypto\bn\asm\bn_win32.obj'; $bn_mulw_src='crypto\bn\asm\bn_win32.asm'; @@ -122,13 +122,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); - + $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n"; + $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libssl/src/util/pl/Mingw32.pl b/src/lib/libssl/src/util/pl/Mingw32.pl index 4bee638c4a..b9bb24d21d 100644 --- a/src/lib/libssl/src/util/pl/Mingw32.pl +++ b/src/lib/libssl/src/util/pl/Mingw32.pl @@ -21,7 +21,7 @@ if ($debug) else { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -mcpu=i486 -Wall"; } -if ($gaswin and !$no_asm) +if ($gaswin and !$no_asm and !$fips) { $bn_asm_obj='$(OBJ_D)\bn-win32.o'; $bn_asm_src='crypto/bn/asm/bn-win32.s'; @@ -92,13 +92,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } 1; diff --git a/src/lib/libssl/src/util/pl/OS2-EMX.pl b/src/lib/libssl/src/util/pl/OS2-EMX.pl index ddb3524210..75d72ebbcb 100644 --- a/src/lib/libssl/src/util/pl/OS2-EMX.pl +++ b/src/lib/libssl/src/util/pl/OS2-EMX.pl @@ -48,7 +48,7 @@ $des_enc_src=""; $bf_enc_obj=""; $bf_enc_src=""; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj"; $bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm"; @@ -106,13 +106,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libssl/src/util/pl/VC-16.pl b/src/lib/libssl/src/util/pl/VC-16.pl index 7cda5e67a9..564ba3fd08 100644 --- a/src/lib/libssl/src/util/pl/VC-16.pl +++ b/src/lib/libssl/src/util/pl/VC-16.pl @@ -61,7 +61,7 @@ if ($shlib) else { $mlflags=''; } -$app_ex_obj="setargv.obj"; +$app_ex_obj=""; $obj='.obj'; $ofile="/Fo"; @@ -90,7 +90,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm) +if (!$no_asm && !$fips) { if ($asmbits == 32) { @@ -147,7 +147,7 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$f,$_,@f); $file =~ s/\//$o/g if $o ne '/'; @@ -165,7 +165,12 @@ sub do_link_rule } else { $ret.=" \$(APP_EX_OBJ) $files"; } - $ret.="\n $target\n\n $libs\n\n<<\n\n"; + $ret.="\n $target\n\n $libs\n\n<<\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libssl/src/util/pl/VC-32.pl b/src/lib/libssl/src/util/pl/VC-32.pl index 285990c589..cf689b9feb 100644 --- a/src/lib/libssl/src/util/pl/VC-32.pl +++ b/src/lib/libssl/src/util/pl/VC-32.pl @@ -64,7 +64,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_asm_obj='crypto\bn\asm\bn_win32.obj'; $bn_asm_src='crypto\bn\asm\bn_win32.asm'; @@ -126,14 +126,19 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs\n"; $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n"; - $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n\n"; + $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libssl/src/util/pl/VC-CE.pl b/src/lib/libssl/src/util/pl/VC-CE.pl index 1805ef9d97..2fd0c4dd32 100644 --- a/src/lib/libssl/src/util/pl/VC-CE.pl +++ b/src/lib/libssl/src/util/pl/VC-CE.pl @@ -47,7 +47,7 @@ $shlibp=($shlib)?".dll":".lib"; $lfile='/out:'; $shlib_ex_obj=""; -#$app_ex_obj="setargv.obj"; +$app_ex_obj=""; $app_ex_obj=""; $bn_asm_obj=''; @@ -97,14 +97,19 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs\n"; $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n"; - $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n\n"; + $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libssl/src/util/pl/linux.pl b/src/lib/libssl/src/util/pl/linux.pl index 8924ed5480..df05c40526 100644 --- a/src/lib/libssl/src/util/pl/linux.pl +++ b/src/lib/libssl/src/util/pl/linux.pl @@ -72,13 +72,18 @@ sub do_shlib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libssl/src/util/pl/ultrix.pl b/src/lib/libssl/src/util/pl/ultrix.pl index ea370c71f9..447b854708 100644 --- a/src/lib/libssl/src/util/pl/ultrix.pl +++ b/src/lib/libssl/src/util/pl/ultrix.pl @@ -17,7 +17,7 @@ else $cflags.=" -std1 -DL_ENDIAN"; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_asm_obj='$(OBJ_D)/mips1.o'; $bn_asm_src='crypto/bn/asm/mips1.s'; @@ -25,13 +25,18 @@ if (!$no_asm) sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libssl/src/util/pl/unix.pl b/src/lib/libssl/src/util/pl/unix.pl index 146611ad99..bbd1798a2e 100644 --- a/src/lib/libssl/src/util/pl/unix.pl +++ b/src/lib/libssl/src/util/pl/unix.pl @@ -70,13 +70,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libssl/src/util/pod2mantest b/src/lib/libssl/src/util/pod2mantest index 412ca8d6d8..384e683df4 100644 --- a/src/lib/libssl/src/util/pod2mantest +++ b/src/lib/libssl/src/util/pod2mantest @@ -1,6 +1,6 @@ #!/bin/sh -# This script is used by test/Makefile.ssl to check whether a sane 'pod2man' +# This script is used by test/Makefile to check whether a sane 'pod2man' # is installed. # ('make install' should not try to run 'pod2man' if it does not exist or if # it is a broken 'pod2man' version that is known to cause trouble. if we find diff --git a/src/lib/libssl/src/util/selftest.pl b/src/lib/libssl/src/util/selftest.pl index 276b81183d..e9d5aa8938 100644 --- a/src/lib/libssl/src/util/selftest.pl +++ b/src/lib/libssl/src/util/selftest.pl @@ -34,9 +34,9 @@ foreach $_ (split("\n",$c)) { $platform0=$1 if (/Configuring for (.*)$/); } -system "sh config" if (! -f "Makefile.ssl"); +system "sh config" if (! -f "Makefile"); -if (open(IN,") { $version=$1 if (/^VERSION=(.*)$/); $platform=$1 if (/^PLATFORM=(.*)$/); diff --git a/src/lib/libssl/src/util/shlib_wrap.sh b/src/lib/libssl/src/util/shlib_wrap.sh new file mode 100755 index 0000000000..dc5f5b1ce4 --- /dev/null +++ b/src/lib/libssl/src/util/shlib_wrap.sh @@ -0,0 +1,70 @@ +#!/bin/sh + +[ $# -ne 0 ] || set -x # debug mode without arguments:-) + +THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.." +[ -d "${THERE}" ] || exec "$@" # should never happen... + +# Alternative to this is to parse ${THERE}/Makefile... +LIBCRYPTOSO="${THERE}/libcrypto.so" +if [ -f "$LIBCRYPTOSO" ]; then + while [ -h "$LIBCRYPTOSO" ]; do + LIBCRYPTOSO="${THERE}/`ls -l "$LIBCRYPTOSO" | sed -e 's|.*\-> ||'`" + done + SOSUFFIX=`echo ${LIBCRYPTOSO} | sed -e 's|.*\.so||' 2>/dev/null` + LIBSSLSO="${THERE}/libssl.so${SOSUFFIX}" +fi + +SYSNAME=`(uname -s) 2>/dev/null`; +case "$SYSNAME" in +SunOS|IRIX*) + # SunOS and IRIX run-time linkers evaluate alternative + # variables depending on target ABI... + rld_var=LD_LIBRARY_PATH + case "`(/usr/bin/file "$LIBCRYPTOSO") 2>/dev/null`" in + *ELF\ 64*SPARC*) + [ -n "$LD_LIBRARY_PATH_64" ] && rld_var=LD_LIBRARY_PATH_64 + ;; + *ELF\ N32*MIPS*) + [ -n "$LD_LIBRARYN32_PATH" ] && rld_var=LD_LIBRARYN32_PATH + _RLDN32_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLDN32_LIST + ;; + *ELF\ 64*MIPS*) + [ -n "$LD_LIBRARY64_PATH" ] && rld_var=LD_LIBRARY64_PATH + _RLD64_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD64_LIST + ;; + esac + eval $rld_var=\"${THERE}:'$'$rld_var\"; export $rld_var + unset rld_var + ;; +*) LD_LIBRARY_PATH="${THERE}:$LD_LIBRARY_PATH" # Linux, ELF HP-UX + DYLD_LIBRARY_PATH="${THERE}:$DYLD_LIBRARY_PATH" # MacOS X + SHLIB_PATH="${THERE}:$SHLIB_PATH" # legacy HP-UX + LIBPATH="${THERE}:$LIBPATH" # AIX, OS/2 + export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH + # Even though $PATH is adjusted [for Windows sake], it doesn't + # necessarily does the trick. Trouble is that with introduction + # of SafeDllSearchMode in XP/2003 it's more appropriate to copy + # .DLLs in vicinity of executable, which is done elsewhere... + if [ "$OSTYPE" != msdosdjgpp ]; then + PATH="${THERE}:$PATH"; export PATH + fi + ;; +esac + +if [ -f "$LIBCRYPTOSO" ]; then + # Following three lines are major excuse for isolating them into + # this wrapper script. Original reason for setting LD_PRELOAD + # was to make it possible to pass 'make test' when user linked + # with -rpath pointing to previous version installation. Wrapping + # it into a script makes it possible to do so on multi-ABI + # platforms. + case "$SYSNAME" in + *BSD) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *BSD + *) LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO" ;; # SunOS, Linux, ELF HP-UX + esac + _RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT" # Tru64, o32 IRIX + export LD_PRELOAD _RLD_LIST +fi + +exec "$@" diff --git a/src/lib/libssl/test/Makefile b/src/lib/libssl/test/Makefile new file mode 100644 index 0000000000..6aeedf7fa3 --- /dev/null +++ b/src/lib/libssl/test/Makefile @@ -0,0 +1,788 @@ +# +# test/Makefile +# + +DIR= test +TOP= .. +CC= cc +INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES) +CFLAG= -g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP= /usr/local/ssl +MAKEFILE= Makefile +MAKEDEPPROG= makedepend +MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) +PERL= perl +# KRB5 stuff +KRB5_INCLUDES= +LIBKRB5= + +PEX_LIBS= +EX_LIBS= #-lnsl -lsocket + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile maketests.com \ + tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \ + tpkcs7.com tpkcs7d.com tverify.com testgen.com testss.com testssl.com \ + testca.com VMSca-response.1 VMSca-response.2 + +DLIBCRYPTO= ../libcrypto.a +DLIBSSL= ../libssl.a +LIBCRYPTO= -L.. -lcrypto +LIBSSL= -L.. -lssl + +BNTEST= bntest +ECTEST= ectest +EXPTEST= exptest +IDEATEST= ideatest +SHATEST= shatest +SHA1TEST= sha1test +FIPS_SHA1TEST= fips_sha1test +MDC2TEST= mdc2test +RMDTEST= rmdtest +MD2TEST= md2test +MD4TEST= md4test +MD5TEST= md5test +HMACTEST= hmactest +RC2TEST= rc2test +RC4TEST= rc4test +RC5TEST= rc5test +BFTEST= bftest +CASTTEST= casttest +DESTEST= destest +FIPS_DESTEST= fips_desmovs +RANDTEST= randtest +FIPS_RANDTEST= fips_randtest +DHTEST= dhtest +DSATEST= dsatest +FIPS_DSATEST= fips_dsatest +METHTEST= methtest +SSLTEST= ssltest +RSATEST= rsa_test +ENGINETEST= enginetest +EVPTEST= evp_test +FIPS_AESTEST= fips_aesavs + +TESTS= alltests + +EXE= $(BNTEST)$(EXE_EXT) $(ECTEST)$(EXE_EXT) $(IDEATEST)$(EXE_EXT) $(MD2TEST)$(EXE_EXT) $(MD4TEST)$(EXE_EXT) $(MD5TEST)$(EXE_EXT) $(HMACTEST)$(EXE_EXT) \ + $(RC2TEST)$(EXE_EXT) $(RC4TEST)$(EXE_EXT) $(RC5TEST)$(EXE_EXT) \ + $(DESTEST)$(EXE_EXT) $(FIPS_DESTEST)$(EXE_EXT) $(SHATEST)$(EXE_EXT) $(SHA1TEST)$(EXE_EXT) $(FIPS_SHA1TEST)$(EXE_EXT) $(MDC2TEST)$(EXE_EXT) $(RMDTEST)$(EXE_EXT) \ + $(RANDTEST)$(EXE_EXT) $(FIPS_RANDTEST)$(EXE_EXT) $(DHTEST)$(EXE_EXT) $(ENGINETEST)$(EXE_EXT) \ + $(BFTEST)$(EXE_EXT) $(CASTTEST)$(EXE_EXT) $(SSLTEST)$(EXE_EXT) $(EXPTEST)$(EXE_EXT) $(DSATEST)$(EXE_EXT) $(FIPS_DSATEST)$(EXE_EXT) $(RSATEST)$(EXE_EXT) \ + $(EVPTEST)$(EXE_EXT) $(FIPS_AESTEST)$(EXE_EXT) + +# $(METHTEST)$(EXE_EXT) + +OBJ= $(BNTEST).o $(ECTEST).o $(IDEATEST).o $(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \ + $(HMACTEST).o \ + $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ + $(DESTEST).o $(FIPS_DESTEST).o $(SHATEST).o $(SHA1TEST).o $(FIPS_SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ + $(RANDTEST).o $(FIPS_RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \ + $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(FIPS_DSATEST).o $(EXPTEST).o $(RSATEST).o \ + $(EVPTEST).o $(FIPS_AESTEST).o +SRC= $(BNTEST).c $(ECTEST).c $(IDEATEST).c $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ + $(HMACTEST).c \ + $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ + $(DESTEST).c $(FIPS_DESTEST).c $(SHATEST).c $(SHA1TEST).c $(FIPS_SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ + $(RANDTEST).c $(FIPS_RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \ + $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(FIPS_DSATEST).c $(EXPTEST).c $(RSATEST).c \ + $(EVPTEST).c $(FIPS_AESTEST).c + +EXHEADER= +HEADER= $(EXHEADER) + +ALL= $(GENERAL) $(SRC) $(HEADER) + +top: + (cd ..; $(MAKE) DIRS=$(DIR) TESTS=$(TESTS) all) + +all: exe + +exe: $(EXE) dummytest$(EXE_EXT) + +files: + $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO + +links: + +generate: $(SRC) +$(SRC): + @sh $(TOP)/util/point.sh dummytest.c $@ + +errors: + +install: + +tags: + ctags $(SRC) + +tests: exe apps $(TESTS) + +apps: + @(cd ..; $(MAKE) DIRS=apps all) + +alltests: \ + test_des test_idea test_sha test_md4 test_md5 test_hmac \ + test_md2 test_mdc2 \ + test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \ + test_rand test_bn test_ec test_enc test_x509 test_rsa test_crl test_sid \ + test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ + test_ss test_ca test_engine test_evp test_ssl +# temporarily removed +# fips_test_aes + +fips_test_aes: + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + mkdir -p fips_aes_data/rsp; \ + ../util/shlib_wrap.sh ./$(FIPS_AESTEST) -d fips_aes_data/list; \ + fi + +test_evp: + ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt + +test_des: + ../util/shlib_wrap.sh ./$(DESTEST) + +test_idea: + ../util/shlib_wrap.sh ./$(IDEATEST) + +test_sha: + ../util/shlib_wrap.sh ./$(SHATEST) + ../util/shlib_wrap.sh ./$(SHA1TEST) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + ../util/shlib_wrap.sh ./$(FIPS_SHA1TEST) sha1vectors.txt | sed s/Strings/Hashes/ | cmp sha1hashes.txt - ; \ + fi + +test_mdc2: + ../util/shlib_wrap.sh ./$(MDC2TEST) + +test_md5: + ../util/shlib_wrap.sh ./$(MD5TEST) + +test_md4: + ../util/shlib_wrap.sh ./$(MD4TEST) + +test_hmac: + ../util/shlib_wrap.sh ./$(HMACTEST) + +test_md2: + ../util/shlib_wrap.sh ./$(MD2TEST) + +test_rmd: + ../util/shlib_wrap.sh ./$(RMDTEST) + +test_bf: + ../util/shlib_wrap.sh ./$(BFTEST) + +test_cast: + ../util/shlib_wrap.sh ./$(CASTTEST) + +test_rc2: + ../util/shlib_wrap.sh ./$(RC2TEST) + +test_rc4: + ../util/shlib_wrap.sh ./$(RC4TEST) + +test_rc5: + ../util/shlib_wrap.sh ./$(RC5TEST) + +test_rand: + ../util/shlib_wrap.sh ./$(RANDTEST) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + ../util/shlib_wrap.sh ./$(FIPS_RANDTEST); \ + fi + +test_enc: + @sh ./testenc + +test_x509: + echo test normal x509v1 certificate + sh ./tx509 2>/dev/null + echo test first x509v3 certificate + sh ./tx509 v3-cert1.pem 2>/dev/null + echo test second x509v3 certificate + sh ./tx509 v3-cert2.pem 2>/dev/null + +test_rsa: + @sh ./trsa 2>/dev/null + ../util/shlib_wrap.sh ./$(RSATEST) + +test_crl: + @sh ./tcrl 2>/dev/null + +test_sid: + @sh ./tsid 2>/dev/null + +test_req: + @sh ./treq 2>/dev/null + @sh ./treq testreq2.pem 2>/dev/null + +test_pkcs7: + @sh ./tpkcs7 2>/dev/null + @sh ./tpkcs7d 2>/dev/null + +test_bn: + @echo starting big number library test, could take a while... + @../util/shlib_wrap.sh ./$(BNTEST) >tmp.bntest + @echo quit >>tmp.bntest + @echo "running bc" + @) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} else {print STDERR "."; $$i++;}} print STDERR "\n$$i tests passed\n"' + @echo 'test a^b%c implementations' + ../util/shlib_wrap.sh ./$(EXPTEST) + +test_ec: + @echo 'test elliptic curves' + ../util/shlib_wrap.sh ./$(ECTEST) + +test_verify: + @echo "The following command should have some OK's and some failures" + @echo "There are definitly a few expired certificates" + -../util/shlib_wrap.sh ../apps/openssl verify -CApath ../certs ../certs/*.pem + +test_dh: + @echo "Generate a set of DH parameters" + ../util/shlib_wrap.sh ./$(DHTEST) + +test_dsa: + @echo "Generate a set of DSA parameters" + ../util/shlib_wrap.sh ./$(DSATEST) + ../util/shlib_wrap.sh ./$(DSATEST) -app2_1 + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + ../util/shlib_wrap.sh ./$(FIPS_DSATEST); \ + ../util/shlib_wrap.sh ./$(FIPS_DSATEST) -app2_1; \ + fi + +test_gen: + @echo "Generate and verify a certificate request" + @sh ./testgen + +test_ss keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \ + intP1.ss intP2.ss: testss + @echo "Generate and certify a test certificate" + @sh ./testss + @cat certCA.ss certU.ss > intP1.ss + @cat certCA.ss certU.ss certP1.ss > intP2.ss + +test_engine: + @echo "Manipulate the ENGINE structures" + ../util/shlib_wrap.sh ./$(ENGINETEST) + +test_ssl: keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \ + intP1.ss intP2.ss + @echo "test SSL protocol" + @if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + sh ./testfipsssl keyU.ss certU.ss certCA.ss; \ + fi + @sh ./testssl keyU.ss certU.ss certCA.ss + @sh ./testsslproxy keyP1.ss certP1.ss intP1.ss + @sh ./testsslproxy keyP2.ss certP2.ss intP2.ss + +test_ca: + @if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then \ + echo "skipping CA.sh test -- requires RSA"; \ + else \ + echo "Generate and certify a test certificate via the 'ca' program"; \ + sh ./testca; \ + fi + +test_aes: #$(AESTEST) +# @echo "test Rijndael" +# ../util/shlib_wrap.sh ./$(AESTEST) + +lint: + lint -DLINT $(INCLUDES) $(SRC)>fluff + +depend: + $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC) + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss *.srl log + +$(DLIBSSL): + (cd ..; $(MAKE) DIRS=ssl all) + +$(DLIBCRYPTO): + (cd ..; $(MAKE) DIRS=crypto all) + +BUILD_CMD=if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \ + set -x; $${CC:-$(CC)} -o $$target$(EXE_EXT) $(CFLAGS) $$target.o $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \ + elif [ -z "$(SHARED_LIBS)" ]; then \ + set -x; $${CC:-$(CC)} -o $$target$(EXE_EXT) $(CFLAGS) $$target.o $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \ + else \ + set -x; LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \ + $(CC) -o $$target$(EXE_EXT) $(CFLAGS) $$target.o $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \ + fi; + +$(FIPS_AESTEST)$(EXE_EXT): $(FIPS_AESTEST).o $(DLIBCRYPTO) + @target=$(FIPS_AESTEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_AESTEST); \ + fi + +$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO) + @target=$(RSATEST); $(BUILD_CMD) + +$(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO) + @target=$(BNTEST); $(BUILD_CMD) + +$(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO) + @target=$(ECTEST); $(BUILD_CMD) + +$(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO) + @target=$(EXPTEST); $(BUILD_CMD) + +$(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO) + @target=$(IDEATEST); $(BUILD_CMD) + +$(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO) + @target=$(MD2TEST); $(BUILD_CMD) + +$(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO) + @target=$(SHATEST); $(BUILD_CMD) + +$(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO) + @target=$(SHA1TEST); $(BUILD_CMD) + +$(FIPS_SHA1TEST)$(EXE_EXT): $(FIPS_SHA1TEST).o $(DLIBCRYPTO) + @target=$(FIPS_SHA1TEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_SHA1TEST); \ + fi + +$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO) + @target=$(RMDTEST); $(BUILD_CMD) + +$(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO) + @target=$(MDC2TEST); $(BUILD_CMD) + +$(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO) + @target=$(MD4TEST); $(BUILD_CMD) + +$(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO) + @target=$(MD5TEST); $(BUILD_CMD) + +$(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO) + @target=$(HMACTEST); $(BUILD_CMD) + +$(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO) + @target=$(RC2TEST); $(BUILD_CMD) + +$(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO) + @target=$(BFTEST); $(BUILD_CMD) + +$(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO) + @target=$(CASTTEST); $(BUILD_CMD) + +$(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO) + @target=$(RC4TEST); $(BUILD_CMD) + +$(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO) + @target=$(RC5TEST); $(BUILD_CMD) + +$(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO) + @target=$(DESTEST); $(BUILD_CMD) + +$(FIPS_DESTEST)$(EXE_EXT): $(FIPS_DESTEST).o $(DLIBCRYPTO) + @target=$(FIPS_DESTEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_DESTEST); \ + fi + +$(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO) + @target=$(RANDTEST); $(BUILD_CMD) + +$(FIPS_RANDTEST)$(EXE_EXT): $(FIPS_RANDTEST).o $(DLIBCRYPTO) + @target=$(FIPS_RANDTEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_RANDTEST); \ + fi + +$(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO) + @target=$(DHTEST); $(BUILD_CMD) + +$(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO) + @target=$(DSATEST); $(BUILD_CMD) + +$(FIPS_DSATEST)$(EXE_EXT): $(FIPS_DSATEST).o $(DLIBCRYPTO) + @target=$(FIPS_DSATEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(FIPS_DSATEST); \ + fi + +$(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO) + @target=$(METHTEST); $(BUILD_CMD) + +$(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) + @target=$(SSLTEST); $(BUILD_CMD) + if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \ + TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(SSLTEST); \ + fi + +$(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO) + @target=$(ENGINETEST); $(BUILD_CMD) + +$(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO) + @target=$(EVPTEST); $(BUILD_CMD) + +#$(AESTEST).o: $(AESTEST).c +# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c + +#$(AESTEST)$(EXE_EXT): $(AESTEST).o $(DLIBCRYPTO) +# @target=$(AESTEST); $(BUILD_CMD) + +dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO) + @target=dummytest; $(BUILD_CMD) + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +bftest.o: ../e_os.h ../include/openssl/blowfish.h ../include/openssl/e_os2.h +bftest.o: ../include/openssl/opensslconf.h bftest.c +bntest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +bntest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +bntest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h +bntest.o: ../include/openssl/des.h ../include/openssl/des_old.h +bntest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +bntest.o: ../include/openssl/e_os2.h ../include/openssl/err.h +bntest.o: ../include/openssl/evp.h ../include/openssl/idea.h +bntest.o: ../include/openssl/lhash.h ../include/openssl/md2.h +bntest.o: ../include/openssl/md4.h ../include/openssl/md5.h +bntest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +bntest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +bntest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h +bntest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +bntest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +bntest.o: ../include/openssl/x509_vfy.h bntest.c +casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h +casttest.o: ../include/openssl/opensslconf.h casttest.c +destest.o: ../include/openssl/crypto.h ../include/openssl/des.h +destest.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h +destest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +destest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +destest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +destest.o: ../include/openssl/ui_compat.h destest.c +dhtest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h +dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h +dhtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h +dhtest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +dhtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h +dhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h dhtest.c +dsatest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h +dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h +dsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dsatest.o: ../include/openssl/err.h ../include/openssl/lhash.h +dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +dsatest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +dsatest.o: ../include/openssl/symhacks.h dsatest.c +ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h +ectest.o: ../include/openssl/bn.h ../include/openssl/crypto.h +ectest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ectest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ectest.o: ../include/openssl/engine.h ../include/openssl/err.h +ectest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ectest.o: ../include/openssl/rand.h ../include/openssl/rsa.h +ectest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +ectest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h ectest.c +enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h +enginetest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +enginetest.o: ../include/openssl/crypto.h ../include/openssl/dh.h +enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h +enginetest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +enginetest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +enginetest.o: ../include/openssl/rand.h ../include/openssl/rsa.h +enginetest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +enginetest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +enginetest.o: enginetest.c +evp_test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +evp_test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +evp_test.o: ../include/openssl/bn.h ../include/openssl/cast.h +evp_test.o: ../include/openssl/conf.h ../include/openssl/crypto.h +evp_test.o: ../include/openssl/des.h ../include/openssl/des_old.h +evp_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h +evp_test.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h +evp_test.o: ../include/openssl/idea.h ../include/openssl/lhash.h +evp_test.o: ../include/openssl/md2.h ../include/openssl/md4.h +evp_test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +evp_test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +evp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +evp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +evp_test.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +evp_test.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +evp_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +evp_test.o: ../include/openssl/sha.h ../include/openssl/stack.h +evp_test.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +evp_test.o: ../include/openssl/ui_compat.h evp_test.c +exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h +exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h +exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h +exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +exptest.o: ../include/openssl/symhacks.h exptest.c +fips_aesavs.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +fips_aesavs.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +fips_aesavs.o: ../include/openssl/bn.h ../include/openssl/cast.h +fips_aesavs.o: ../include/openssl/crypto.h ../include/openssl/des.h +fips_aesavs.o: ../include/openssl/des_old.h ../include/openssl/dh.h +fips_aesavs.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +fips_aesavs.o: ../include/openssl/err.h ../include/openssl/evp.h +fips_aesavs.o: ../include/openssl/fips.h ../include/openssl/idea.h +fips_aesavs.o: ../include/openssl/lhash.h ../include/openssl/md2.h +fips_aesavs.o: ../include/openssl/md4.h ../include/openssl/md5.h +fips_aesavs.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +fips_aesavs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +fips_aesavs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +fips_aesavs.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +fips_aesavs.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +fips_aesavs.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +fips_aesavs.o: ../include/openssl/sha.h ../include/openssl/stack.h +fips_aesavs.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +fips_aesavs.o: ../include/openssl/ui_compat.h fips_aesavs.c +fips_desmovs.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +fips_desmovs.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +fips_desmovs.o: ../include/openssl/bn.h ../include/openssl/cast.h +fips_desmovs.o: ../include/openssl/crypto.h ../include/openssl/des.h +fips_desmovs.o: ../include/openssl/des_old.h ../include/openssl/dh.h +fips_desmovs.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +fips_desmovs.o: ../include/openssl/err.h ../include/openssl/evp.h +fips_desmovs.o: ../include/openssl/fips.h ../include/openssl/idea.h +fips_desmovs.o: ../include/openssl/lhash.h ../include/openssl/md2.h +fips_desmovs.o: ../include/openssl/md4.h ../include/openssl/md5.h +fips_desmovs.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +fips_desmovs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +fips_desmovs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +fips_desmovs.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +fips_desmovs.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +fips_desmovs.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +fips_desmovs.o: ../include/openssl/sha.h ../include/openssl/stack.h +fips_desmovs.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +fips_desmovs.o: ../include/openssl/ui_compat.h fips_desmovs.c +fips_dsatest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h +fips_dsatest.o: ../include/openssl/bn.h ../include/openssl/crypto.h +fips_dsatest.o: ../include/openssl/des.h ../include/openssl/des_old.h +fips_dsatest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +fips_dsatest.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +fips_dsatest.o: ../include/openssl/err.h ../include/openssl/fips.h +fips_dsatest.o: ../include/openssl/fips_rand.h ../include/openssl/lhash.h +fips_dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +fips_dsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +fips_dsatest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +fips_dsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +fips_dsatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +fips_dsatest.o: fips_dsatest.c +fips_randtest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h +fips_randtest.o: ../include/openssl/des.h ../include/openssl/des_old.h +fips_randtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h +fips_randtest.o: ../include/openssl/fips_rand.h ../include/openssl/lhash.h +fips_randtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +fips_randtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +fips_randtest.o: ../include/openssl/safestack.h ../include/openssl/stack.h +fips_randtest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +fips_randtest.o: ../include/openssl/ui_compat.h fips_randtest.c +fips_sha1test.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h +fips_sha1test.o: ../include/openssl/e_os2.h ../include/openssl/err.h +fips_sha1test.o: ../include/openssl/fips.h ../include/openssl/lhash.h +fips_sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +fips_sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +fips_sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +fips_sha1test.o: fips_sha1test.c +hmactest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +hmactest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +hmactest.o: ../include/openssl/bn.h ../include/openssl/cast.h +hmactest.o: ../include/openssl/crypto.h ../include/openssl/des.h +hmactest.o: ../include/openssl/des_old.h ../include/openssl/dh.h +hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h +hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h +hmactest.o: ../include/openssl/md4.h ../include/openssl/md5.h +hmactest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +hmactest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +hmactest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +hmactest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +hmactest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +hmactest.o: ../include/openssl/sha.h ../include/openssl/stack.h +hmactest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h +hmactest.o: ../include/openssl/ui_compat.h hmactest.c +ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h +ideatest.o: ../include/openssl/opensslconf.h ideatest.c +md2test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +md2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +md2test.o: ../include/openssl/bn.h ../include/openssl/cast.h +md2test.o: ../include/openssl/crypto.h ../include/openssl/des.h +md2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +md2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +md2test.o: ../include/openssl/evp.h ../include/openssl/idea.h +md2test.o: ../include/openssl/md2.h ../include/openssl/md4.h +md2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +md2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +md2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +md2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +md2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +md2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +md2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +md2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +md2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md2test.c +md4test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +md4test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +md4test.o: ../include/openssl/bn.h ../include/openssl/cast.h +md4test.o: ../include/openssl/crypto.h ../include/openssl/des.h +md4test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +md4test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +md4test.o: ../include/openssl/evp.h ../include/openssl/idea.h +md4test.o: ../include/openssl/md2.h ../include/openssl/md4.h +md4test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +md4test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +md4test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +md4test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +md4test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +md4test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +md4test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +md4test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +md4test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md4test.c +md5test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +md5test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +md5test.o: ../include/openssl/bn.h ../include/openssl/cast.h +md5test.o: ../include/openssl/crypto.h ../include/openssl/des.h +md5test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +md5test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +md5test.o: ../include/openssl/evp.h ../include/openssl/idea.h +md5test.o: ../include/openssl/md2.h ../include/openssl/md4.h +md5test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +md5test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +md5test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +md5test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +md5test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +md5test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +md5test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +md5test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +md5test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md5test.c +mdc2test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +mdc2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +mdc2test.o: ../include/openssl/bn.h ../include/openssl/cast.h +mdc2test.o: ../include/openssl/crypto.h ../include/openssl/des.h +mdc2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +mdc2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +mdc2test.o: ../include/openssl/evp.h ../include/openssl/idea.h +mdc2test.o: ../include/openssl/md2.h ../include/openssl/md4.h +mdc2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +mdc2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +mdc2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +mdc2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +mdc2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +mdc2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +mdc2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +mdc2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +mdc2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h mdc2test.c +randtest.o: ../e_os.h ../include/openssl/e_os2.h +randtest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h +randtest.o: ../include/openssl/rand.h randtest.c +rc2test.o: ../e_os.h ../include/openssl/e_os2.h +rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h rc2test.c +rc4test.o: ../e_os.h ../include/openssl/e_os2.h +rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h rc4test.c +rc5test.o: ../e_os.h ../include/openssl/e_os2.h +rc5test.o: ../include/openssl/opensslconf.h ../include/openssl/rc5.h rc5test.c +rmdtest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +rmdtest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +rmdtest.o: ../include/openssl/bn.h ../include/openssl/cast.h +rmdtest.o: ../include/openssl/crypto.h ../include/openssl/des.h +rmdtest.o: ../include/openssl/des_old.h ../include/openssl/dh.h +rmdtest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +rmdtest.o: ../include/openssl/evp.h ../include/openssl/idea.h +rmdtest.o: ../include/openssl/md2.h ../include/openssl/md4.h +rmdtest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +rmdtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +rmdtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +rmdtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +rmdtest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +rmdtest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +rmdtest.o: ../include/openssl/safestack.h ../include/openssl/sha.h +rmdtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +rmdtest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h rmdtest.c +rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h +rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h +rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h +rsa_test.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h +rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +rsa_test.o: ../include/openssl/rand.h ../include/openssl/rsa.h +rsa_test.o: ../include/openssl/safestack.h ../include/openssl/stack.h +rsa_test.o: ../include/openssl/symhacks.h rsa_test.c +sha1test.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +sha1test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +sha1test.o: ../include/openssl/bn.h ../include/openssl/cast.h +sha1test.o: ../include/openssl/crypto.h ../include/openssl/des.h +sha1test.o: ../include/openssl/des_old.h ../include/openssl/dh.h +sha1test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +sha1test.o: ../include/openssl/evp.h ../include/openssl/idea.h +sha1test.o: ../include/openssl/md2.h ../include/openssl/md4.h +sha1test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +sha1test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +sha1test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +sha1test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +sha1test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h +sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +sha1test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h sha1test.c +shatest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +shatest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +shatest.o: ../include/openssl/bn.h ../include/openssl/cast.h +shatest.o: ../include/openssl/crypto.h ../include/openssl/des.h +shatest.o: ../include/openssl/des_old.h ../include/openssl/dh.h +shatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +shatest.o: ../include/openssl/evp.h ../include/openssl/idea.h +shatest.o: ../include/openssl/md2.h ../include/openssl/md4.h +shatest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +shatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +shatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +shatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h +shatest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +shatest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +shatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h +shatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +shatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h shatest.c +ssltest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ssltest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssltest.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssltest.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ssltest.o: ../include/openssl/des.h ../include/openssl/des_old.h +ssltest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ssltest.o: ../include/openssl/e_os2.h ../include/openssl/engine.h +ssltest.o: ../include/openssl/err.h ../include/openssl/evp.h +ssltest.o: ../include/openssl/fips.h ../include/openssl/idea.h +ssltest.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ssltest.o: ../include/openssl/md2.h ../include/openssl/md4.h +ssltest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +ssltest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ssltest.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ssltest.o: ../include/openssl/rand.h ../include/openssl/rc2.h +ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ssltest.o: ../include/openssl/tls1.h ../include/openssl/ui.h +ssltest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ssltest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h ssltest.c diff --git a/src/lib/libssl/test/evptests.txt b/src/lib/libssl/test/evptests.txt index 80bd9c7765..dfe91a5bc0 100644 --- a/src/lib/libssl/test/evptests.txt +++ b/src/lib/libssl/test/evptests.txt @@ -92,7 +92,102 @@ AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000 AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:F58C4C04D6E5F1BA779EABFB5F7BFBD6:AE2D8A571E03AC9C9EB76FAC45AF8E51:9CFC4E967EDB808D679F777BC6702C7D AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:9CFC4E967EDB808D679F777BC6702C7D:30C81C46A35CE411E5FBC1191A0A52EF:39F23369A9D9BACFA530E26304231461 AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39F23369A9D9BACFA530E26304231461:F69F2445DF4F9B17AD2B417BE66C3710:B2EB05E2C39BE9FCDA6C19078C6A9D1B -# We don't support CFB{1,8}-AESxxx.{En,De}crypt + +# CFB1-AES128.Encrypt + +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:1 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:1 +# all of the above packed into one... +# in: 0110 1011 1100 0001 = 6bc1 +# out: 0110 1000 1011 0011 = 68b3 +AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:1 + +# CFB1-AES128.Decrypt +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:0 +AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:0 +# all of the above packed into one... +# in: 0110 1000 1011 0011 = 68b3 +# out: 0110 1011 1100 0001 = 6bc1 +AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:0 + +# TODO: CFB1-AES192 and 256 + +# CFB8-AES128.Encrypt + +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:1 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:1 +# all of the above packed into one +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:1 + +# CFB8-AES128.Decrypt + +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:0 +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:0 +# all of the above packed into one +AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:0 + +# TODO: 192 and 256 bit keys + # For all CFB128 encrypts and decrypts, the transformed sequence is # AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec # CFB128-AES128.Encrypt @@ -174,6 +269,16 @@ DESX-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363 # DES EDE3 CBC tests (from destest) DES-EDE3-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363534333231204E6F77206973207468652074696D6520666F722000000000:3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D41C673812CFDE9675 +# DES CFB1 from FIPS 81 +# plaintext: 0100 1110 0110 1111 0111 0111 = 4e6f77 +# ciphertext: 1100 1101 0001 1110 1100 1001 = cd1ec9 + +DES-CFB1*8:0123456789abcdef:1234567890abcdef:4e6f77:cd1ec9 + +# DES CFB8 from FIPS 81 + +DES-CFB8:0123456789abcdef:1234567890abcdef:4e6f7720697320746865:f31fda07011462ee187f + # RC4 tests (from rc4test) RC4:0123456789abcdef0123456789abcdef::0123456789abcdef:75b7878099e0c596 RC4:0123456789abcdef0123456789abcdef::0000000000000000:7494c2e7104b0879 diff --git a/src/lib/libssl/test/maketests.com b/src/lib/libssl/test/maketests.com index 7c44e4545a..dfbfef7b1b 100644 --- a/src/lib/libssl/test/maketests.com +++ b/src/lib/libssl/test/maketests.com @@ -615,7 +615,7 @@ $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - THEN CC = "CC/DECC" $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - "/NOLIST/PREFIX=ALL" + - - "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS + "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS $! $! Define The Linker Options File Name. $! @@ -648,7 +648,7 @@ $ EXIT $ ENDIF $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - - "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS + "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS $ CCDEFS = CCDEFS + ",""VAXC""" $! $! Define As SYS$COMMON:[SYSLIB] @@ -679,7 +679,7 @@ $! $! Use GNU C... $! $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - - "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS + "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS $! $! Define The Linker Options File Name. $! diff --git a/src/lib/libssl/test/testenc.com b/src/lib/libssl/test/testenc.com index c24fa388c0..5e6f521f9d 100644 --- a/src/lib/libssl/test/testenc.com +++ b/src/lib/libssl/test/testenc.com @@ -4,7 +4,7 @@ $ __arch := VAX $ if f$getsyi("cpu") .ge. 128 then __arch := AXP $ exe_dir := sys$disk:[-.'__arch'.exe.apps] $ -$ testsrc := makefile.ssl +$ testsrc := makefile. $ test := p.txt $ cmd := mcr 'exe_dir'openssl $ diff --git a/src/lib/libssl/test/testfipsssl b/src/lib/libssl/test/testfipsssl new file mode 100644 index 0000000000..c4836edc25 --- /dev/null +++ b/src/lib/libssl/test/testfipsssl @@ -0,0 +1,113 @@ +#!/bin/sh + +if [ "$1" = "" ]; then + key=../apps/server.pem +else + key="$1" +fi +if [ "$2" = "" ]; then + cert=../apps/server.pem +else + cert="$2" +fi + +ciphers="DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:DES-CBC3-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES128-SHA:EXP1024-DHE-DSS-DES-CBC-SHA:EXP1024-DES-CBC-SHA:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA" + +ssltest="../util/shlib_wrap.sh ./ssltest -F -key $key -cert $cert -c_key $key -c_cert $cert -cipher $ciphers" + +if ../util/shlib_wrap.sh ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then + dsa_cert=YES +else + dsa_cert=NO +fi + +if [ "$3" = "" ]; then + CA="-CApath ../certs" +else + CA="-CAfile $3" +fi + +if [ "$4" = "" ]; then + extra="" +else + extra="$4" +fi + +############################################################################# + +echo test ssl3 is forbidden in FIPS mode +$ssltest -ssl3 $extra && exit 1 + +echo test ssl2 is forbidden in FIPS mode +$ssltest -ssl2 $extra && exit 1 + +echo test tls1 +$ssltest -tls1 $extra || exit 1 + +echo test tls1 with server authentication +$ssltest -tls1 -server_auth $CA $extra || exit 1 + +echo test tls1 with client authentication +$ssltest -tls1 -client_auth $CA $extra || exit 1 + +echo test tls1 with both client and server authentication +$ssltest -tls1 -server_auth -client_auth $CA $extra || exit 1 + +echo test tls1 via BIO pair +$ssltest -bio_pair -tls1 $extra || exit 1 + +echo test tls1 with server authentication via BIO pair +$ssltest -bio_pair -tls1 -server_auth $CA $extra || exit 1 + +echo test tls1 with client authentication via BIO pair +$ssltest -bio_pair -tls1 -client_auth $CA $extra || exit 1 + +echo test tls1 with both client and server authentication via BIO pair +$ssltest -bio_pair -tls1 -server_auth -client_auth $CA $extra || exit 1 + +# note that all the below actually choose TLS... + +if [ $dsa_cert = NO ]; then + echo test sslv2/sslv3 w/o DHE via BIO pair + $ssltest -bio_pair -no_dhe $extra || exit 1 +fi + +echo test sslv2/sslv3 with 1024bit DHE via BIO pair +$ssltest -bio_pair -dhe1024dsa -v $extra || exit 1 + +echo test sslv2/sslv3 with server authentication +$ssltest -bio_pair -server_auth $CA $extra || exit 1 + +echo test sslv2/sslv3 with client authentication via BIO pair +$ssltest -bio_pair -client_auth $CA $extra || exit 1 + +echo test sslv2/sslv3 with both client and server authentication via BIO pair +$ssltest -bio_pair -server_auth -client_auth $CA $extra || exit 1 + +echo test sslv2/sslv3 with both client and server authentication via BIO pair and app verify +$ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1 + +############################################################################# + +if ../util/shlib_wrap.sh ../apps/openssl no-dh; then + echo skipping anonymous DH tests +else + echo test tls1 with 1024bit anonymous DH, multiple handshakes + $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1 +fi + +if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then + echo skipping RSA tests +else + echo test tls1 with 1024bit RSA, no DHE, multiple handshakes + ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1 + + if ../util/shlib_wrap.sh ../apps/openssl no-dh; then + echo skipping RSA+DHE tests + else + echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes + ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1 + fi +fi + +exit 0 diff --git a/src/lib/libssl/test/tverify.com b/src/lib/libssl/test/tverify.com index f97e71478f..2060184d1e 100644 --- a/src/lib/libssl/test/tverify.com +++ b/src/lib/libssl/test/tverify.com @@ -15,12 +15,15 @@ $ f = f$search("[-.certs]*.pem") $ if f .nes. "" .and. f .nes. old_f $ then $ certs = certs + " [-.certs]" + f$parse(f,,,"NAME") + ".pem" -$ if f$length(certs) .lt. 180 then goto loop_certs2 $ c := YES +$ if f$length(certs) .lt. 180 then goto loop_certs2 $ endif $ certs = certs - " " $ -$ mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs' -$ if c then goto loop_certs +$ if c +$ then +$ mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs' +$ goto loop_certs +$ endif $ $ delete certs.tmp;* -- cgit v1.2.3-55-g6feb