summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm <>2009-01-09 12:15:52 +0000
committerdjm <>2009-01-09 12:15:52 +0000
commit23f8d96f0f508b8bef2602049feee9c44228d34c (patch)
treea2a7787bc00e8f6a29153b8c6d9eb5e8f73d6269
parent30562050421d947c3eb3c10edde6e87730b17471 (diff)
downloadopenbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.tar.gz
openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.tar.bz2
openbsd-23f8d96f0f508b8bef2602049feee9c44228d34c.zip
resolve conflicts
-rw-r--r--src/lib/libcrypto/aes/aes.h4
-rw-r--r--src/lib/libcrypto/aes/aes_cbc.c2
-rw-r--r--src/lib/libcrypto/aes/aes_core.c8
-rw-r--r--src/lib/libcrypto/aes/asm/aes-586.pl3
-rw-r--r--src/lib/libcrypto/asn1/a_mbstr.c2
-rw-r--r--src/lib/libcrypto/asn1/a_sign.c7
-rw-r--r--src/lib/libcrypto/asn1/a_strex.c2
-rw-r--r--src/lib/libcrypto/asn1/a_strnid.c2
-rw-r--r--src/lib/libcrypto/asn1/a_verify.c7
-rw-r--r--src/lib/libcrypto/asn1/asn1t.h2
-rw-r--r--src/lib/libcrypto/asn1/asn_moid.c2
-rw-r--r--src/lib/libcrypto/asn1/asn_pack.c2
-rw-r--r--src/lib/libcrypto/asn1/nsseq.c2
-rw-r--r--src/lib/libcrypto/asn1/p5_pbe.c2
-rw-r--r--src/lib/libcrypto/asn1/p5_pbev2.c2
-rw-r--r--src/lib/libcrypto/asn1/p8_pkey.c2
-rw-r--r--src/lib/libcrypto/asn1/t_bitst.c2
-rw-r--r--src/lib/libcrypto/asn1/t_crl.c2
-rw-r--r--src/lib/libcrypto/asn1/t_spki.c2
-rw-r--r--src/lib/libcrypto/asn1/t_x509.c4
-rw-r--r--src/lib/libcrypto/asn1/t_x509a.c2
-rw-r--r--src/lib/libcrypto/asn1/tasn_dec.c2
-rw-r--r--src/lib/libcrypto/asn1/tasn_enc.c2
-rw-r--r--src/lib/libcrypto/asn1/tasn_fre.c2
-rw-r--r--src/lib/libcrypto/asn1/tasn_new.c2
-rw-r--r--src/lib/libcrypto/asn1/tasn_prn.c2
-rw-r--r--src/lib/libcrypto/asn1/tasn_typ.c2
-rw-r--r--src/lib/libcrypto/asn1/tasn_utl.c2
-rw-r--r--src/lib/libcrypto/asn1/x_algor.c2
-rw-r--r--src/lib/libcrypto/asn1/x_bignum.c2
-rw-r--r--src/lib/libcrypto/asn1/x_exten.c2
-rw-r--r--src/lib/libcrypto/asn1/x_long.c2
-rw-r--r--src/lib/libcrypto/asn1/x_x509a.c2
-rw-r--r--src/lib/libcrypto/bf/bf_skey.c7
-rw-r--r--src/lib/libcrypto/bf/blowfish.h4
-rw-r--r--src/lib/libcrypto/bio/bss_bio.c2
-rw-r--r--src/lib/libcrypto/bio/bss_file.c2
-rw-r--r--src/lib/libcrypto/bn/Makefile16
-rw-r--r--src/lib/libcrypto/bn/bn.h15
-rw-r--r--src/lib/libcrypto/bn/bn_lib.c19
-rw-r--r--src/lib/libcrypto/bn/bn_nist.c706
-rw-r--r--src/lib/libcrypto/bn/bn_rand.c6
-rw-r--r--src/lib/libcrypto/bn/bn_shift.c2
-rw-r--r--src/lib/libcrypto/buffer/buffer.c58
-rw-r--r--src/lib/libcrypto/cast/c_skey.c7
-rw-r--r--src/lib/libcrypto/cast/cast.h4
-rw-r--r--src/lib/libcrypto/cms/cms_smime.c3
-rw-r--r--src/lib/libcrypto/comp/c_zlib.c4
-rw-r--r--src/lib/libcrypto/conf/conf_mall.c4
-rw-r--r--src/lib/libcrypto/conf/conf_mod.c2
-rw-r--r--src/lib/libcrypto/conf/conf_sap.c2
-rw-r--r--src/lib/libcrypto/cryptlib.c351
-rw-r--r--src/lib/libcrypto/crypto-lib.com26
-rw-r--r--src/lib/libcrypto/crypto.h84
-rw-r--r--src/lib/libcrypto/des/des_enc.c4
-rw-r--r--src/lib/libcrypto/des/ecb_enc.c47
-rw-r--r--src/lib/libcrypto/des/enc_read.c4
-rw-r--r--src/lib/libcrypto/des/enc_writ.c4
-rw-r--r--src/lib/libcrypto/des/set_key.c9
-rw-r--r--src/lib/libcrypto/dh/Makefile18
-rw-r--r--src/lib/libcrypto/dh/dh.h11
-rw-r--r--src/lib/libcrypto/dh/dh_asn1.c2
-rw-r--r--src/lib/libcrypto/dh/dh_check.c4
-rw-r--r--src/lib/libcrypto/dh/dh_err.c6
-rw-r--r--src/lib/libcrypto/dh/dh_gen.c4
-rw-r--r--src/lib/libcrypto/dh/dh_key.c4
-rw-r--r--src/lib/libcrypto/dsa/Makefile76
-rw-r--r--src/lib/libcrypto/dsa/dsa.h39
-rw-r--r--src/lib/libcrypto/dsa/dsa_asn1.c82
-rw-r--r--src/lib/libcrypto/dsa/dsa_err.c10
-rw-r--r--src/lib/libcrypto/dsa/dsa_gen.c3
-rw-r--r--src/lib/libcrypto/dsa/dsa_key.c4
-rw-r--r--src/lib/libcrypto/dsa/dsa_lib.c49
-rw-r--r--src/lib/libcrypto/dsa/dsa_ossl.c3
-rw-r--r--src/lib/libcrypto/dsa/dsa_sign.c31
-rw-r--r--src/lib/libcrypto/dsa/dsa_vrf.c32
-rw-r--r--src/lib/libcrypto/ecdh/Makefile33
-rw-r--r--src/lib/libcrypto/ecdsa/Makefile37
-rw-r--r--src/lib/libcrypto/engine/Makefile231
-rw-r--r--src/lib/libcrypto/engine/eng_cnf.c18
-rw-r--r--src/lib/libcrypto/engine/enginetest.c2
-rw-r--r--src/lib/libcrypto/err/err.c782
-rw-r--r--src/lib/libcrypto/err/err.h8
-rw-r--r--src/lib/libcrypto/err/err_all.c13
-rw-r--r--src/lib/libcrypto/err/err_prn.c70
-rw-r--r--src/lib/libcrypto/err/openssl.ec2
-rw-r--r--src/lib/libcrypto/evp/Makefile687
-rw-r--r--src/lib/libcrypto/evp/bio_md.c9
-rw-r--r--src/lib/libcrypto/evp/digest.c154
-rw-r--r--src/lib/libcrypto/evp/e_aes.c35
-rw-r--r--src/lib/libcrypto/evp/e_des.c9
-rw-r--r--src/lib/libcrypto/evp/e_des3.c29
-rw-r--r--src/lib/libcrypto/evp/e_null.c2
-rw-r--r--src/lib/libcrypto/evp/e_rc4.c1
-rw-r--r--src/lib/libcrypto/evp/evp.h78
-rw-r--r--src/lib/libcrypto/evp/evp_acnf.c2
-rw-r--r--src/lib/libcrypto/evp/evp_enc.c254
-rw-r--r--src/lib/libcrypto/evp/evp_err.c16
-rw-r--r--src/lib/libcrypto/evp/evp_lib.c39
-rw-r--r--src/lib/libcrypto/evp/evp_locl.h30
-rw-r--r--src/lib/libcrypto/evp/evp_pbe.c2
-rw-r--r--src/lib/libcrypto/evp/evp_pkey.c2
-rw-r--r--src/lib/libcrypto/evp/m_dss.c2
-rw-r--r--src/lib/libcrypto/evp/m_dss1.c3
-rw-r--r--src/lib/libcrypto/evp/m_md2.c1
-rw-r--r--src/lib/libcrypto/evp/m_md4.c1
-rw-r--r--src/lib/libcrypto/evp/m_md5.c1
-rw-r--r--src/lib/libcrypto/evp/m_mdc2.c1
-rw-r--r--src/lib/libcrypto/evp/m_sha.c1
-rw-r--r--src/lib/libcrypto/evp/m_sha1.c7
-rw-r--r--src/lib/libcrypto/evp/names.c7
-rw-r--r--src/lib/libcrypto/evp/p5_crpt.c2
-rw-r--r--src/lib/libcrypto/evp/p5_crpt2.c2
-rw-r--r--src/lib/libcrypto/evp/p_sign.c24
-rw-r--r--src/lib/libcrypto/evp/p_verify.c26
-rw-r--r--src/lib/libcrypto/hmac/hmac.c3
-rw-r--r--src/lib/libcrypto/idea/idea.h3
-rw-r--r--src/lib/libcrypto/install.com10
-rw-r--r--src/lib/libcrypto/md2/md2.h3
-rw-r--r--src/lib/libcrypto/md2/md2_dgst.c7
-rw-r--r--src/lib/libcrypto/md4/md4.h3
-rw-r--r--src/lib/libcrypto/md4/md4_dgst.c7
-rw-r--r--src/lib/libcrypto/md5/md5.h3
-rw-r--r--src/lib/libcrypto/md5/md5_dgst.c7
-rw-r--r--src/lib/libcrypto/mdc2/Makefile2
-rw-r--r--src/lib/libcrypto/mdc2/mdc2.h4
-rw-r--r--src/lib/libcrypto/mem.c47
-rw-r--r--src/lib/libcrypto/mem_dbg.c28
-rw-r--r--src/lib/libcrypto/objects/obj_dat.pl4
-rw-r--r--src/lib/libcrypto/objects/obj_mac.num2
-rw-r--r--src/lib/libcrypto/objects/objects.txt3
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_asn.c2
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_ht.c5
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_srv.c2
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_vfy.c2
-rw-r--r--src/lib/libcrypto/opensslconf.h.in15
-rw-r--r--src/lib/libcrypto/opensslv.h6
-rw-r--r--src/lib/libcrypto/ossl_typ.h2
-rw-r--r--src/lib/libcrypto/pem/pem.h1
-rw-r--r--src/lib/libcrypto/pem/pem_all.c174
-rw-r--r--src/lib/libcrypto/pem/pem_lib.c3
-rw-r--r--src/lib/libcrypto/pem/pem_x509.c2
-rw-r--r--src/lib/libcrypto/pem/pem_xaux.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_add.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_asn.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_attr.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_crpt.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_crt.c13
-rw-r--r--src/lib/libcrypto/pkcs12/p12_decr.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_init.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_key.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_kiss.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_mutl.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_npas.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_p8d.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_p8e.c2
-rw-r--r--src/lib/libcrypto/pkcs12/p12_utl.c2
-rw-r--r--src/lib/libcrypto/pkcs12/pkcs12.h2
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_asn1.c2
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_attr.c2
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_mime.c2
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_smime.c3
-rw-r--r--src/lib/libcrypto/rand/Makefile71
-rw-r--r--src/lib/libcrypto/rand/md_rand.c12
-rw-r--r--src/lib/libcrypto/rand/rand.h29
-rw-r--r--src/lib/libcrypto/rand/rand_err.c20
-rw-r--r--src/lib/libcrypto/rand/rand_lcl.h11
-rw-r--r--src/lib/libcrypto/rand/rand_lib.c71
-rw-r--r--src/lib/libcrypto/rand/randfile.c66
-rw-r--r--src/lib/libcrypto/rc2/rc2.h4
-rw-r--r--src/lib/libcrypto/rc2/rc2_skey.c17
-rwxr-xr-xsrc/lib/libcrypto/rc4/asm/rc4-x86_64.pl2
-rw-r--r--src/lib/libcrypto/rc4/rc4.h3
-rw-r--r--src/lib/libcrypto/rc4/rc4_skey.c16
-rw-r--r--src/lib/libcrypto/rc5/rc5.h5
-rw-r--r--src/lib/libcrypto/ripemd/ripemd.h4
-rw-r--r--src/lib/libcrypto/ripemd/rmd_dgst.c7
-rw-r--r--src/lib/libcrypto/ripemd/rmd_locl.h2
-rw-r--r--src/lib/libcrypto/rsa/Makefile78
-rw-r--r--src/lib/libcrypto/rsa/rsa.h39
-rw-r--r--src/lib/libcrypto/rsa/rsa_asn1.c2
-rw-r--r--src/lib/libcrypto/rsa/rsa_eay.c2
-rw-r--r--src/lib/libcrypto/rsa/rsa_err.c10
-rw-r--r--src/lib/libcrypto/rsa/rsa_gen.c3
-rw-r--r--src/lib/libcrypto/rsa/rsa_lib.c272
-rw-r--r--src/lib/libcrypto/rsa/rsa_null.c2
-rw-r--r--src/lib/libcrypto/rsa/rsa_oaep.c2
-rw-r--r--src/lib/libcrypto/rsa/rsa_sign.c24
-rw-r--r--src/lib/libcrypto/sha/sha.h3
-rw-r--r--src/lib/libcrypto/sha/sha1_one.c2
-rw-r--r--src/lib/libcrypto/sha/sha1dgst.c4
-rw-r--r--src/lib/libcrypto/sha/sha_dgst.c6
-rw-r--r--src/lib/libcrypto/sha/sha_locl.h7
-rw-r--r--src/lib/libcrypto/symhacks.h5
-rw-r--r--src/lib/libcrypto/ui/ui_openssl.c2
-rw-r--r--src/lib/libcrypto/util/libeay.num180
-rw-r--r--src/lib/libcrypto/util/mk1mf.pl404
-rw-r--r--src/lib/libcrypto/util/mkdef.pl21
-rw-r--r--src/lib/libcrypto/util/mkerr.pl3
-rw-r--r--src/lib/libcrypto/util/mkfiles.pl10
-rw-r--r--src/lib/libcrypto/util/mklink.pl12
-rw-r--r--src/lib/libcrypto/util/pl/VC-32.pl179
-rw-r--r--src/lib/libcrypto/x509/by_dir.c4
-rw-r--r--src/lib/libcrypto/x509/x509_cmp.c8
-rw-r--r--src/lib/libcrypto/x509/x509_trs.c2
-rw-r--r--src/lib/libcrypto/x509/x509cset.c2
-rw-r--r--src/lib/libcrypto/x509/x509spki.c2
-rw-r--r--src/lib/libcrypto/x509v3/ext_dat.h2
-rw-r--r--src/lib/libcrypto/x509v3/pcy_data.c2
-rw-r--r--src/lib/libcrypto/x509v3/pcy_tree.c2
-rw-r--r--src/lib/libcrypto/x509v3/tabtest.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_addr.c1
-rw-r--r--src/lib/libcrypto/x509v3/v3_akey.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_akeya.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_alt.c5
-rw-r--r--src/lib/libcrypto/x509v3/v3_bcons.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_bitst.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_conf.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_cpols.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_crld.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_enum.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_extku.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_genn.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_ia5.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_info.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_int.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_lib.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_ocsp.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_pku.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_prn.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_purp.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_skey.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_sxnet.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_utl.c23
-rw-r--r--src/lib/libcrypto/x509v3/v3conf.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3prin.c2
-rw-r--r--src/lib/libcrypto/x509v3/x509v3.h2
-rw-r--r--src/lib/libssl/d1_pkt.c1
-rw-r--r--src/lib/libssl/s3_clnt.c10
-rw-r--r--src/lib/libssl/s3_pkt.c9
-rw-r--r--src/lib/libssl/s3_srvr.c34
-rw-r--r--src/lib/libssl/src/CHANGES54
-rw-r--r--src/lib/libssl/src/Configure263
-rw-r--r--src/lib/libssl/src/FAQ2
-rw-r--r--src/lib/libssl/src/Makefile155
-rw-r--r--src/lib/libssl/src/Makefile.org153
-rw-r--r--src/lib/libssl/src/Makefile.shared10
-rw-r--r--src/lib/libssl/src/NEWS5
-rw-r--r--src/lib/libssl/src/README2
-rw-r--r--src/lib/libssl/src/apps/Makefile1031
-rw-r--r--src/lib/libssl/src/apps/apps.c234
-rw-r--r--src/lib/libssl/src/apps/apps.h7
-rw-r--r--src/lib/libssl/src/apps/asn1pars.c2
-rw-r--r--src/lib/libssl/src/apps/crl.c21
-rw-r--r--src/lib/libssl/src/apps/dgst.c52
-rw-r--r--src/lib/libssl/src/apps/dsa.c2
-rw-r--r--src/lib/libssl/src/apps/enc.c13
-rw-r--r--src/lib/libssl/src/apps/engine.c2
-rw-r--r--src/lib/libssl/src/apps/genrsa.c15
-rw-r--r--src/lib/libssl/src/apps/makeapps.com2
-rw-r--r--src/lib/libssl/src/apps/nseq.c2
-rw-r--r--src/lib/libssl/src/apps/ocsp.c2
-rw-r--r--src/lib/libssl/src/apps/openssl.c32
-rw-r--r--src/lib/libssl/src/apps/pkcs12.c11
-rw-r--r--src/lib/libssl/src/apps/pkcs8.c2
-rw-r--r--src/lib/libssl/src/apps/rsautl.c2
-rw-r--r--src/lib/libssl/src/apps/s_client.c52
-rw-r--r--src/lib/libssl/src/apps/s_server.c20
-rw-r--r--src/lib/libssl/src/apps/smime.c2
-rw-r--r--src/lib/libssl/src/apps/speed.c4
-rw-r--r--src/lib/libssl/src/apps/spkac.c4
-rw-r--r--src/lib/libssl/src/apps/verify.c3
-rw-r--r--src/lib/libssl/src/apps/version.c2
-rw-r--r--src/lib/libssl/src/apps/x509.c2
-rw-r--r--src/lib/libssl/src/crypto/aes/aes.h4
-rw-r--r--src/lib/libssl/src/crypto/aes/aes_cbc.c2
-rw-r--r--src/lib/libssl/src/crypto/aes/aes_core.c8
-rw-r--r--src/lib/libssl/src/crypto/aes/asm/aes-586.pl3
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_mbstr.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_sign.c7
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_strex.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_strnid.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_verify.c7
-rw-r--r--src/lib/libssl/src/crypto/asn1/asn1t.h2
-rw-r--r--src/lib/libssl/src/crypto/asn1/asn_moid.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/asn_pack.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/nsseq.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/p5_pbe.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/p5_pbev2.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/p8_pkey.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_bitst.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_crl.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_spki.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_x509.c4
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_x509a.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/tasn_dec.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/tasn_enc.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/tasn_fre.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/tasn_new.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/tasn_prn.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/tasn_typ.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/tasn_utl.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_algor.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_bignum.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_exten.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_long.c2
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_x509a.c2
-rw-r--r--src/lib/libssl/src/crypto/bf/bf_skey.c7
-rw-r--r--src/lib/libssl/src/crypto/bf/blowfish.h4
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_bio.c2
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_file.c2
-rw-r--r--src/lib/libssl/src/crypto/bn/Makefile16
-rw-r--r--src/lib/libssl/src/crypto/bn/bn.h15
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_lib.c19
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_nist.c706
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_rand.c6
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_shift.c2
-rw-r--r--src/lib/libssl/src/crypto/buffer/buffer.c58
-rw-r--r--src/lib/libssl/src/crypto/cast/c_skey.c7
-rw-r--r--src/lib/libssl/src/crypto/cast/cast.h4
-rw-r--r--src/lib/libssl/src/crypto/cms/cms_smime.c3
-rw-r--r--src/lib/libssl/src/crypto/comp/c_zlib.c4
-rw-r--r--src/lib/libssl/src/crypto/conf/conf_mall.c4
-rw-r--r--src/lib/libssl/src/crypto/conf/conf_mod.c2
-rw-r--r--src/lib/libssl/src/crypto/conf/conf_sap.c2
-rw-r--r--src/lib/libssl/src/crypto/cryptlib.c351
-rw-r--r--src/lib/libssl/src/crypto/crypto-lib.com26
-rw-r--r--src/lib/libssl/src/crypto/crypto.h84
-rw-r--r--src/lib/libssl/src/crypto/des/des_enc.c4
-rw-r--r--src/lib/libssl/src/crypto/des/ecb_enc.c47
-rw-r--r--src/lib/libssl/src/crypto/des/enc_read.c4
-rw-r--r--src/lib/libssl/src/crypto/des/enc_writ.c4
-rw-r--r--src/lib/libssl/src/crypto/des/set_key.c9
-rw-r--r--src/lib/libssl/src/crypto/dh/Makefile18
-rw-r--r--src/lib/libssl/src/crypto/dh/dh.h11
-rw-r--r--src/lib/libssl/src/crypto/dh/dh_asn1.c2
-rw-r--r--src/lib/libssl/src/crypto/dh/dh_check.c4
-rw-r--r--src/lib/libssl/src/crypto/dh/dh_err.c6
-rw-r--r--src/lib/libssl/src/crypto/dh/dh_gen.c4
-rw-r--r--src/lib/libssl/src/crypto/dh/dh_key.c4
-rw-r--r--src/lib/libssl/src/crypto/dsa/Makefile76
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa.h39
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_asn1.c82
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_err.c10
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_gen.c3
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_key.c4
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_lib.c49
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_ossl.c3
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_sign.c31
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_vrf.c32
-rw-r--r--src/lib/libssl/src/crypto/ecdh/Makefile33
-rw-r--r--src/lib/libssl/src/crypto/ecdsa/Makefile37
-rw-r--r--src/lib/libssl/src/crypto/engine/Makefile231
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_cnf.c18
-rw-r--r--src/lib/libssl/src/crypto/engine/enginetest.c2
-rw-r--r--src/lib/libssl/src/crypto/err/err.c782
-rw-r--r--src/lib/libssl/src/crypto/err/err.h8
-rw-r--r--src/lib/libssl/src/crypto/err/err_all.c13
-rw-r--r--src/lib/libssl/src/crypto/err/err_prn.c70
-rw-r--r--src/lib/libssl/src/crypto/err/openssl.ec2
-rw-r--r--src/lib/libssl/src/crypto/evp/Makefile687
-rw-r--r--src/lib/libssl/src/crypto/evp/bio_md.c9
-rw-r--r--src/lib/libssl/src/crypto/evp/digest.c154
-rw-r--r--src/lib/libssl/src/crypto/evp/e_aes.c35
-rw-r--r--src/lib/libssl/src/crypto/evp/e_des.c9
-rw-r--r--src/lib/libssl/src/crypto/evp/e_des3.c29
-rw-r--r--src/lib/libssl/src/crypto/evp/e_null.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/e_rc4.c1
-rw-r--r--src/lib/libssl/src/crypto/evp/evp.h78
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_acnf.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_enc.c254
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_err.c16
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_lib.c39
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_locl.h30
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_pbe.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_pkey.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/m_dss.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/m_dss1.c3
-rw-r--r--src/lib/libssl/src/crypto/evp/m_md2.c1
-rw-r--r--src/lib/libssl/src/crypto/evp/m_md4.c1
-rw-r--r--src/lib/libssl/src/crypto/evp/m_md5.c1
-rw-r--r--src/lib/libssl/src/crypto/evp/m_mdc2.c1
-rw-r--r--src/lib/libssl/src/crypto/evp/m_sha.c1
-rw-r--r--src/lib/libssl/src/crypto/evp/m_sha1.c7
-rw-r--r--src/lib/libssl/src/crypto/evp/names.c7
-rw-r--r--src/lib/libssl/src/crypto/evp/p5_crpt.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/p5_crpt2.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/p_sign.c24
-rw-r--r--src/lib/libssl/src/crypto/evp/p_verify.c26
-rw-r--r--src/lib/libssl/src/crypto/hmac/hmac.c3
-rw-r--r--src/lib/libssl/src/crypto/idea/idea.h3
-rw-r--r--src/lib/libssl/src/crypto/install.com10
-rw-r--r--src/lib/libssl/src/crypto/md2/md2.h3
-rw-r--r--src/lib/libssl/src/crypto/md2/md2_dgst.c7
-rw-r--r--src/lib/libssl/src/crypto/md4/md4.h3
-rw-r--r--src/lib/libssl/src/crypto/md4/md4_dgst.c7
-rw-r--r--src/lib/libssl/src/crypto/md5/md5.h3
-rw-r--r--src/lib/libssl/src/crypto/md5/md5_dgst.c7
-rw-r--r--src/lib/libssl/src/crypto/mdc2/Makefile2
-rw-r--r--src/lib/libssl/src/crypto/mdc2/mdc2.h4
-rw-r--r--src/lib/libssl/src/crypto/mem.c47
-rw-r--r--src/lib/libssl/src/crypto/mem_dbg.c28
-rw-r--r--src/lib/libssl/src/crypto/objects/obj_dat.pl4
-rw-r--r--src/lib/libssl/src/crypto/objects/obj_mac.num2
-rw-r--r--src/lib/libssl/src/crypto/objects/objects.txt3
-rw-r--r--src/lib/libssl/src/crypto/ocsp/ocsp_asn.c2
-rw-r--r--src/lib/libssl/src/crypto/ocsp/ocsp_ht.c5
-rw-r--r--src/lib/libssl/src/crypto/ocsp/ocsp_srv.c2
-rw-r--r--src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c2
-rw-r--r--src/lib/libssl/src/crypto/opensslconf.h.in15
-rw-r--r--src/lib/libssl/src/crypto/opensslv.h6
-rw-r--r--src/lib/libssl/src/crypto/ossl_typ.h2
-rw-r--r--src/lib/libssl/src/crypto/pem/pem.h1
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_all.c174
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_lib.c3
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_x509.c2
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_xaux.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_add.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_asn.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_attr.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_crpt.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_crt.c13
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_decr.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_init.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_key.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_kiss.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_mutl.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_npas.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_p8d.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_p8e.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_utl.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/pkcs12.h2
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pk7_asn1.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pk7_attr.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pk7_mime.c2
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pk7_smime.c3
-rw-r--r--src/lib/libssl/src/crypto/rand/Makefile71
-rw-r--r--src/lib/libssl/src/crypto/rand/md_rand.c12
-rw-r--r--src/lib/libssl/src/crypto/rand/rand.h29
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_err.c20
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_lcl.h11
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_lib.c71
-rw-r--r--src/lib/libssl/src/crypto/rand/randfile.c66
-rw-r--r--src/lib/libssl/src/crypto/rc2/rc2.h4
-rw-r--r--src/lib/libssl/src/crypto/rc2/rc2_skey.c17
-rwxr-xr-xsrc/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl2
-rw-r--r--src/lib/libssl/src/crypto/rc4/rc4.h3
-rw-r--r--src/lib/libssl/src/crypto/rc4/rc4_skey.c16
-rw-r--r--src/lib/libssl/src/crypto/rc5/rc5.h5
-rw-r--r--src/lib/libssl/src/crypto/ripemd/ripemd.h4
-rw-r--r--src/lib/libssl/src/crypto/ripemd/rmd_dgst.c7
-rw-r--r--src/lib/libssl/src/crypto/ripemd/rmd_locl.h2
-rw-r--r--src/lib/libssl/src/crypto/rsa/Makefile78
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa.h39
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_asn1.c2
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_eay.c2
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_err.c10
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_gen.c3
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_lib.c272
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_null.c2
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_oaep.c2
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_sign.c24
-rw-r--r--src/lib/libssl/src/crypto/sha/sha.h3
-rw-r--r--src/lib/libssl/src/crypto/sha/sha1_one.c2
-rw-r--r--src/lib/libssl/src/crypto/sha/sha1dgst.c4
-rw-r--r--src/lib/libssl/src/crypto/sha/sha_dgst.c6
-rw-r--r--src/lib/libssl/src/crypto/sha/sha_locl.h7
-rw-r--r--src/lib/libssl/src/crypto/symhacks.h5
-rw-r--r--src/lib/libssl/src/crypto/ui/ui_openssl.c2
-rw-r--r--src/lib/libssl/src/crypto/x509/by_dir.c4
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_cmp.c8
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_trs.c2
-rw-r--r--src/lib/libssl/src/crypto/x509/x509cset.c2
-rw-r--r--src/lib/libssl/src/crypto/x509/x509spki.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/ext_dat.h2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/pcy_data.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/pcy_tree.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/tabtest.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_addr.c1
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_akey.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_akeya.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_alt.c5
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_bcons.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_bitst.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_conf.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_cpols.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_crld.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_enum.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_extku.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_genn.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_ia5.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_info.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_int.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_lib.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_ocsp.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_pku.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_prn.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_purp.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_skey.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_sxnet.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_utl.c23
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3conf.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3prin.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/x509v3.h2
-rw-r--r--src/lib/libssl/src/demos/asn1/ocsp.c2
-rw-r--r--src/lib/libssl/src/doc/crypto/RAND_egd.pod7
-rw-r--r--src/lib/libssl/src/e_os.h28
-rw-r--r--src/lib/libssl/src/engines/Makefile185
-rw-r--r--src/lib/libssl/src/makevms.com9
-rw-r--r--src/lib/libssl/src/ms/do_masm.bat1
-rw-r--r--src/lib/libssl/src/ms/do_nasm.bat1
-rw-r--r--src/lib/libssl/src/ms/test.bat385
-rw-r--r--src/lib/libssl/src/openssl.spec2
-rw-r--r--src/lib/libssl/src/ssl/Makefile1199
-rw-r--r--src/lib/libssl/src/ssl/d1_pkt.c1
-rw-r--r--src/lib/libssl/src/ssl/s2_clnt.c2
-rw-r--r--src/lib/libssl/src/ssl/s2_srvr.c4
-rw-r--r--src/lib/libssl/src/ssl/s3_clnt.c10
-rw-r--r--src/lib/libssl/src/ssl/s3_pkt.c9
-rw-r--r--src/lib/libssl/src/ssl/s3_srvr.c34
-rw-r--r--src/lib/libssl/src/ssl/ssl_ciph.c3
-rw-r--r--src/lib/libssl/src/ssl/ssl_locl.h4
-rw-r--r--src/lib/libssl/src/ssl/ssltest.c2
-rw-r--r--src/lib/libssl/src/ssl/t1_enc.c38
-rw-r--r--src/lib/libssl/src/test/Makefile489
-rw-r--r--src/lib/libssl/src/test/tests.com12
-rw-r--r--src/lib/libssl/src/util/libeay.num180
-rw-r--r--src/lib/libssl/src/util/mk1mf.pl404
-rw-r--r--src/lib/libssl/src/util/mkdef.pl21
-rw-r--r--src/lib/libssl/src/util/mkerr.pl3
-rw-r--r--src/lib/libssl/src/util/mkfiles.pl10
-rw-r--r--src/lib/libssl/src/util/mklink.pl12
-rw-r--r--src/lib/libssl/src/util/pl/VC-32.pl179
-rw-r--r--src/lib/libssl/ssl_ciph.c3
-rw-r--r--src/lib/libssl/ssl_locl.h4
-rw-r--r--src/lib/libssl/t1_enc.c38
-rw-r--r--src/lib/libssl/test/Makefile489
-rw-r--r--src/lib/libssl/test/tests.com12
538 files changed, 10571 insertions, 7811 deletions
diff --git a/src/lib/libcrypto/aes/aes.h b/src/lib/libcrypto/aes/aes.h
index baf0222d49..450f2b4051 100644
--- a/src/lib/libcrypto/aes/aes.h
+++ b/src/lib/libcrypto/aes/aes.h
@@ -66,6 +66,10 @@
66#define AES_MAXNR 14 66#define AES_MAXNR 14
67#define AES_BLOCK_SIZE 16 67#define AES_BLOCK_SIZE 16
68 68
69#ifdef OPENSSL_FIPS
70#define FIPS_AES_SIZE_T int
71#endif
72
69#ifdef __cplusplus 73#ifdef __cplusplus
70extern "C" { 74extern "C" {
71#endif 75#endif
diff --git a/src/lib/libcrypto/aes/aes_cbc.c b/src/lib/libcrypto/aes/aes_cbc.c
index d2ba6bcdb4..373864cd4b 100644
--- a/src/lib/libcrypto/aes/aes_cbc.c
+++ b/src/lib/libcrypto/aes/aes_cbc.c
@@ -59,6 +59,7 @@
59#include <openssl/aes.h> 59#include <openssl/aes.h>
60#include "aes_locl.h" 60#include "aes_locl.h"
61 61
62#if !defined(OPENSSL_FIPS_AES_ASM)
62void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, 63void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
63 const unsigned long length, const AES_KEY *key, 64 const unsigned long length, const AES_KEY *key,
64 unsigned char *ivec, const int enc) { 65 unsigned char *ivec, const int enc) {
@@ -129,3 +130,4 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
129 } 130 }
130 } 131 }
131} 132}
133#endif
diff --git a/src/lib/libcrypto/aes/aes_core.c b/src/lib/libcrypto/aes/aes_core.c
index 3a80e18b0a..cffdd4daec 100644
--- a/src/lib/libcrypto/aes/aes_core.c
+++ b/src/lib/libcrypto/aes/aes_core.c
@@ -37,6 +37,10 @@
37 37
38#include <stdlib.h> 38#include <stdlib.h>
39#include <openssl/aes.h> 39#include <openssl/aes.h>
40#ifdef OPENSSL_FIPS
41#include <openssl/fips.h>
42#endif
43
40#include "aes_locl.h" 44#include "aes_locl.h"
41 45
42/* 46/*
@@ -631,6 +635,10 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
631 int i = 0; 635 int i = 0;
632 u32 temp; 636 u32 temp;
633 637
638#ifdef OPENSSL_FIPS
639 FIPS_selftest_check();
640#endif
641
634 if (!userKey || !key) 642 if (!userKey || !key)
635 return -1; 643 return -1;
636 if (bits != 128 && bits != 192 && bits != 256) 644 if (bits != 128 && bits != 192 && bits != 256)
diff --git a/src/lib/libcrypto/aes/asm/aes-586.pl b/src/lib/libcrypto/aes/asm/aes-586.pl
index 3da307bef9..e771e83953 100644
--- a/src/lib/libcrypto/aes/asm/aes-586.pl
+++ b/src/lib/libcrypto/aes/asm/aes-586.pl
@@ -955,8 +955,9 @@ my $mark=&DWP(60+240,"esp"); #copy of aes_key->rounds
955 955
956 &align (4); 956 &align (4);
957 &set_label("enc_tail"); 957 &set_label("enc_tail");
958 &push ($key eq "edi" ? $key : ""); # push ivp 958 &mov ($s0,$key eq "edi" ? $key : "");
959 &mov ($key,$_out); # load out 959 &mov ($key,$_out); # load out
960 &push ($s0); # push ivp
960 &mov ($s1,16); 961 &mov ($s1,16);
961 &sub ($s1,$s2); 962 &sub ($s1,$s2);
962 &cmp ($key,$acc); # compare with inp 963 &cmp ($key,$acc); # compare with inp
diff --git a/src/lib/libcrypto/asn1/a_mbstr.c b/src/lib/libcrypto/asn1/a_mbstr.c
index 2d4800a22a..1bcd046893 100644
--- a/src/lib/libcrypto/asn1/a_mbstr.c
+++ b/src/lib/libcrypto/asn1/a_mbstr.c
@@ -1,5 +1,5 @@
1/* a_mbstr.c */ 1/* a_mbstr.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/a_sign.c b/src/lib/libcrypto/asn1/a_sign.c
index 1081950518..4dee45fbb8 100644
--- a/src/lib/libcrypto/asn1/a_sign.c
+++ b/src/lib/libcrypto/asn1/a_sign.c
@@ -267,7 +267,12 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
267 goto err; 267 goto err;
268 } 268 }
269 269
270 EVP_SignInit_ex(&ctx,type, NULL); 270 if (!EVP_SignInit_ex(&ctx,type, NULL))
271 {
272 outl=0;
273 ASN1err(ASN1_F_ASN1_ITEM_SIGN,ERR_R_EVP_LIB);
274 goto err;
275 }
271 EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl); 276 EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl);
272 if (!EVP_SignFinal(&ctx,(unsigned char *)buf_out, 277 if (!EVP_SignFinal(&ctx,(unsigned char *)buf_out,
273 (unsigned int *)&outl,pkey)) 278 (unsigned int *)&outl,pkey))
diff --git a/src/lib/libcrypto/asn1/a_strex.c b/src/lib/libcrypto/asn1/a_strex.c
index c2dbb6f9a5..7fc14d3296 100644
--- a/src/lib/libcrypto/asn1/a_strex.c
+++ b/src/lib/libcrypto/asn1/a_strex.c
@@ -1,5 +1,5 @@
1/* a_strex.c */ 1/* a_strex.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/a_strnid.c b/src/lib/libcrypto/asn1/a_strnid.c
index 613bbc4a7d..fe515b52ba 100644
--- a/src/lib/libcrypto/asn1/a_strnid.c
+++ b/src/lib/libcrypto/asn1/a_strnid.c
@@ -1,5 +1,5 @@
1/* a_strnid.c */ 1/* a_strnid.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/a_verify.c b/src/lib/libcrypto/asn1/a_verify.c
index fdce6e4380..da3efaaf8d 100644
--- a/src/lib/libcrypto/asn1/a_verify.c
+++ b/src/lib/libcrypto/asn1/a_verify.c
@@ -100,7 +100,12 @@ int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature,
100 p=buf_in; 100 p=buf_in;
101 101
102 i2d(data,&p); 102 i2d(data,&p);
103 EVP_VerifyInit_ex(&ctx,type, NULL); 103 if (!EVP_VerifyInit_ex(&ctx,type, NULL))
104 {
105 ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
106 ret=0;
107 goto err;
108 }
104 EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl); 109 EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
105 110
106 OPENSSL_cleanse(buf_in,(unsigned int)inl); 111 OPENSSL_cleanse(buf_in,(unsigned int)inl);
diff --git a/src/lib/libcrypto/asn1/asn1t.h b/src/lib/libcrypto/asn1/asn1t.h
index bf315e65ed..ac14f9415b 100644
--- a/src/lib/libcrypto/asn1/asn1t.h
+++ b/src/lib/libcrypto/asn1/asn1t.h
@@ -1,5 +1,5 @@
1/* asn1t.h */ 1/* asn1t.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/asn_moid.c b/src/lib/libcrypto/asn1/asn_moid.c
index 9132350f10..1ea6a59248 100644
--- a/src/lib/libcrypto/asn1/asn_moid.c
+++ b/src/lib/libcrypto/asn1/asn_moid.c
@@ -1,5 +1,5 @@
1/* asn_moid.c */ 1/* asn_moid.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/asn_pack.c b/src/lib/libcrypto/asn1/asn_pack.c
index e8b671b7b5..f1a5a05632 100644
--- a/src/lib/libcrypto/asn1/asn_pack.c
+++ b/src/lib/libcrypto/asn1/asn_pack.c
@@ -1,5 +1,5 @@
1/* asn_pack.c */ 1/* asn_pack.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/nsseq.c b/src/lib/libcrypto/asn1/nsseq.c
index 50e2d4d07a..e551c57d59 100644
--- a/src/lib/libcrypto/asn1/nsseq.c
+++ b/src/lib/libcrypto/asn1/nsseq.c
@@ -1,5 +1,5 @@
1/* nsseq.c */ 1/* nsseq.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/p5_pbe.c b/src/lib/libcrypto/asn1/p5_pbe.c
index da91170094..c4582f8041 100644
--- a/src/lib/libcrypto/asn1/p5_pbe.c
+++ b/src/lib/libcrypto/asn1/p5_pbe.c
@@ -1,5 +1,5 @@
1/* p5_pbe.c */ 1/* p5_pbe.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/p5_pbev2.c b/src/lib/libcrypto/asn1/p5_pbev2.c
index c834a38ddf..2b0516afee 100644
--- a/src/lib/libcrypto/asn1/p5_pbev2.c
+++ b/src/lib/libcrypto/asn1/p5_pbev2.c
@@ -1,5 +1,5 @@
1/* p5_pbev2.c */ 1/* p5_pbev2.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999-2004. 3 * project 1999-2004.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/p8_pkey.c b/src/lib/libcrypto/asn1/p8_pkey.c
index 24b409132f..0a1957556e 100644
--- a/src/lib/libcrypto/asn1/p8_pkey.c
+++ b/src/lib/libcrypto/asn1/p8_pkey.c
@@ -1,5 +1,5 @@
1/* p8_pkey.c */ 1/* p8_pkey.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/t_bitst.c b/src/lib/libcrypto/asn1/t_bitst.c
index 397332d9b8..2e59a25fa1 100644
--- a/src/lib/libcrypto/asn1/t_bitst.c
+++ b/src/lib/libcrypto/asn1/t_bitst.c
@@ -1,5 +1,5 @@
1/* t_bitst.c */ 1/* t_bitst.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/t_crl.c b/src/lib/libcrypto/asn1/t_crl.c
index 929b3e5904..bdb244c015 100644
--- a/src/lib/libcrypto/asn1/t_crl.c
+++ b/src/lib/libcrypto/asn1/t_crl.c
@@ -1,5 +1,5 @@
1/* t_crl.c */ 1/* t_crl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/t_spki.c b/src/lib/libcrypto/asn1/t_spki.c
index c2a5797dd8..a73369b949 100644
--- a/src/lib/libcrypto/asn1/t_spki.c
+++ b/src/lib/libcrypto/asn1/t_spki.c
@@ -1,5 +1,5 @@
1/* t_spki.c */ 1/* t_spki.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c
index cb76c32c8d..8f746f9c05 100644
--- a/src/lib/libcrypto/asn1/t_x509.c
+++ b/src/lib/libcrypto/asn1/t_x509.c
@@ -393,7 +393,7 @@ int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
393 d= (v[6]-'0')*10+(v[7]-'0'); 393 d= (v[6]-'0')*10+(v[7]-'0');
394 h= (v[8]-'0')*10+(v[9]-'0'); 394 h= (v[8]-'0')*10+(v[9]-'0');
395 m= (v[10]-'0')*10+(v[11]-'0'); 395 m= (v[10]-'0')*10+(v[11]-'0');
396 if (i >= 14 && 396 if (tm->length >= 14 &&
397 (v[12] >= '0') && (v[12] <= '9') && 397 (v[12] >= '0') && (v[12] <= '9') &&
398 (v[13] >= '0') && (v[13] <= '9')) 398 (v[13] >= '0') && (v[13] <= '9'))
399 s= (v[12]-'0')*10+(v[13]-'0'); 399 s= (v[12]-'0')*10+(v[13]-'0');
@@ -429,7 +429,7 @@ int ASN1_UTCTIME_print(BIO *bp, ASN1_UTCTIME *tm)
429 d= (v[4]-'0')*10+(v[5]-'0'); 429 d= (v[4]-'0')*10+(v[5]-'0');
430 h= (v[6]-'0')*10+(v[7]-'0'); 430 h= (v[6]-'0')*10+(v[7]-'0');
431 m= (v[8]-'0')*10+(v[9]-'0'); 431 m= (v[8]-'0')*10+(v[9]-'0');
432 if (i >=12 && 432 if (tm->length >=12 &&
433 (v[10] >= '0') && (v[10] <= '9') && 433 (v[10] >= '0') && (v[10] <= '9') &&
434 (v[11] >= '0') && (v[11] <= '9')) 434 (v[11] >= '0') && (v[11] <= '9'))
435 s= (v[10]-'0')*10+(v[11]-'0'); 435 s= (v[10]-'0')*10+(v[11]-'0');
diff --git a/src/lib/libcrypto/asn1/t_x509a.c b/src/lib/libcrypto/asn1/t_x509a.c
index ffbbfb51f4..8b18801a17 100644
--- a/src/lib/libcrypto/asn1/t_x509a.c
+++ b/src/lib/libcrypto/asn1/t_x509a.c
@@ -1,5 +1,5 @@
1/* t_x509a.c */ 1/* t_x509a.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c
index 0ee406231e..ced641698e 100644
--- a/src/lib/libcrypto/asn1/tasn_dec.c
+++ b/src/lib/libcrypto/asn1/tasn_dec.c
@@ -1,5 +1,5 @@
1/* tasn_dec.c */ 1/* tasn_dec.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/tasn_enc.c b/src/lib/libcrypto/asn1/tasn_enc.c
index be19b36acd..2721f904a6 100644
--- a/src/lib/libcrypto/asn1/tasn_enc.c
+++ b/src/lib/libcrypto/asn1/tasn_enc.c
@@ -1,5 +1,5 @@
1/* tasn_enc.c */ 1/* tasn_enc.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/tasn_fre.c b/src/lib/libcrypto/asn1/tasn_fre.c
index bb7c1e2af4..d7c017fa1d 100644
--- a/src/lib/libcrypto/asn1/tasn_fre.c
+++ b/src/lib/libcrypto/asn1/tasn_fre.c
@@ -1,5 +1,5 @@
1/* tasn_fre.c */ 1/* tasn_fre.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/tasn_new.c b/src/lib/libcrypto/asn1/tasn_new.c
index 531dad365c..5c6a2ebd4d 100644
--- a/src/lib/libcrypto/asn1/tasn_new.c
+++ b/src/lib/libcrypto/asn1/tasn_new.c
@@ -1,5 +1,5 @@
1/* tasn_new.c */ 1/* tasn_new.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c
index 719639b511..b9c96a6dbe 100644
--- a/src/lib/libcrypto/asn1/tasn_prn.c
+++ b/src/lib/libcrypto/asn1/tasn_prn.c
@@ -1,5 +1,5 @@
1/* tasn_prn.c */ 1/* tasn_prn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/tasn_typ.c b/src/lib/libcrypto/asn1/tasn_typ.c
index 6f17f1bec7..6252213d15 100644
--- a/src/lib/libcrypto/asn1/tasn_typ.c
+++ b/src/lib/libcrypto/asn1/tasn_typ.c
@@ -1,5 +1,5 @@
1/* tasn_typ.c */ 1/* tasn_typ.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/tasn_utl.c b/src/lib/libcrypto/asn1/tasn_utl.c
index 34d520b180..ca9ec7a32f 100644
--- a/src/lib/libcrypto/asn1/tasn_utl.c
+++ b/src/lib/libcrypto/asn1/tasn_utl.c
@@ -1,5 +1,5 @@
1/* tasn_utl.c */ 1/* tasn_utl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/x_algor.c b/src/lib/libcrypto/asn1/x_algor.c
index 33533aba86..99e53429b7 100644
--- a/src/lib/libcrypto/asn1/x_algor.c
+++ b/src/lib/libcrypto/asn1/x_algor.c
@@ -1,5 +1,5 @@
1/* x_algor.c */ 1/* x_algor.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/x_bignum.c b/src/lib/libcrypto/asn1/x_bignum.c
index 869c05d931..9cf3204a1b 100644
--- a/src/lib/libcrypto/asn1/x_bignum.c
+++ b/src/lib/libcrypto/asn1/x_bignum.c
@@ -1,5 +1,5 @@
1/* x_bignum.c */ 1/* x_bignum.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/x_exten.c b/src/lib/libcrypto/asn1/x_exten.c
index 1732e66712..3a21239926 100644
--- a/src/lib/libcrypto/asn1/x_exten.c
+++ b/src/lib/libcrypto/asn1/x_exten.c
@@ -1,5 +1,5 @@
1/* x_exten.c */ 1/* x_exten.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/x_long.c b/src/lib/libcrypto/asn1/x_long.c
index 0db233cb95..bf35457c1f 100644
--- a/src/lib/libcrypto/asn1/x_long.c
+++ b/src/lib/libcrypto/asn1/x_long.c
@@ -1,5 +1,5 @@
1/* x_long.c */ 1/* x_long.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/asn1/x_x509a.c b/src/lib/libcrypto/asn1/x_x509a.c
index 13db5fd03f..b603f82de7 100644
--- a/src/lib/libcrypto/asn1/x_x509a.c
+++ b/src/lib/libcrypto/asn1/x_x509a.c
@@ -1,5 +1,5 @@
1/* a_x509a.c */ 1/* a_x509a.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/bf/bf_skey.c b/src/lib/libcrypto/bf/bf_skey.c
index 3673cdee6e..6ac2aeb279 100644
--- a/src/lib/libcrypto/bf/bf_skey.c
+++ b/src/lib/libcrypto/bf/bf_skey.c
@@ -59,10 +59,15 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <openssl/blowfish.h> 61#include <openssl/blowfish.h>
62#include <openssl/crypto.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62#include "bf_locl.h" 67#include "bf_locl.h"
63#include "bf_pi.h" 68#include "bf_pi.h"
64 69
65void BF_set_key(BF_KEY *key, int len, const unsigned char *data) 70FIPS_NON_FIPS_VCIPHER_Init(BF)
66 { 71 {
67 int i; 72 int i;
68 BF_LONG *p,ri,in[2]; 73 BF_LONG *p,ri,in[2];
diff --git a/src/lib/libcrypto/bf/blowfish.h b/src/lib/libcrypto/bf/blowfish.h
index cd49e85ab2..d24ffccb65 100644
--- a/src/lib/libcrypto/bf/blowfish.h
+++ b/src/lib/libcrypto/bf/blowfish.h
@@ -104,7 +104,9 @@ typedef struct bf_key_st
104 BF_LONG S[4*256]; 104 BF_LONG S[4*256];
105 } BF_KEY; 105 } BF_KEY;
106 106
107 107#ifdef OPENSSL_FIPS
108void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data);
109#endif
108void BF_set_key(BF_KEY *key, int len, const unsigned char *data); 110void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
109 111
110void BF_encrypt(BF_LONG *data,const BF_KEY *key); 112void BF_encrypt(BF_LONG *data,const BF_KEY *key);
diff --git a/src/lib/libcrypto/bio/bss_bio.c b/src/lib/libcrypto/bio/bss_bio.c
index 0f9f0955b4..76bd48e767 100644
--- a/src/lib/libcrypto/bio/bss_bio.c
+++ b/src/lib/libcrypto/bio/bss_bio.c
@@ -919,6 +919,6 @@ int BIO_nwrite(BIO *bio, char **buf, int num)
919 919
920 ret = BIO_ctrl(bio, BIO_C_NWRITE, num, buf); 920 ret = BIO_ctrl(bio, BIO_C_NWRITE, num, buf);
921 if (ret > 0) 921 if (ret > 0)
922 bio->num_read += ret; 922 bio->num_write += ret;
923 return ret; 923 return ret;
924 } 924 }
diff --git a/src/lib/libcrypto/bio/bss_file.c b/src/lib/libcrypto/bio/bss_file.c
index 0c8c8115fa..e692a08e58 100644
--- a/src/lib/libcrypto/bio/bss_file.c
+++ b/src/lib/libcrypto/bio/bss_file.c
@@ -279,7 +279,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
279#endif 279#endif
280 { 280 {
281#if defined(OPENSSL_SYS_WINDOWS) 281#if defined(OPENSSL_SYS_WINDOWS)
282 int fd = fileno((FILE*)ptr); 282 int fd = _fileno((FILE*)ptr);
283 if (num & BIO_FP_TEXT) 283 if (num & BIO_FP_TEXT)
284 _setmode(fd,_O_TEXT); 284 _setmode(fd,_O_TEXT);
285 else 285 else
diff --git a/src/lib/libcrypto/bn/Makefile b/src/lib/libcrypto/bn/Makefile
index 0491e3db4c..f5e8f65a46 100644
--- a/src/lib/libcrypto/bn/Makefile
+++ b/src/lib/libcrypto/bn/Makefile
@@ -28,13 +28,13 @@ LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
28 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ 28 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
29 bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \ 29 bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
30 bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \ 30 bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
31 bn_depr.c bn_const.c 31 bn_depr.c bn_x931p.c bn_const.c bn_opt.c
32 32
33LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \ 33LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
34 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \ 34 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
35 bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \ 35 bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
36 bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o \ 36 bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o \
37 bn_depr.o bn_const.o 37 bn_depr.o bn_x931p.o bn_const.o bn_opt.o
38 38
39SRC= $(LIBSRC) 39SRC= $(LIBSRC)
40 40
@@ -58,7 +58,7 @@ bnbug: bnbug.c ../../libcrypto.a top
58 cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a 58 cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a
59 59
60lib: $(LIBOBJ) 60lib: $(LIBOBJ)
61 $(AR) $(LIB) $(LIBOBJ) 61 $(ARX) $(LIB) $(LIBOBJ)
62 $(RANLIB) $(LIB) || echo Never mind. 62 $(RANLIB) $(LIB) || echo Never mind.
63 @touch lib 63 @touch lib
64 64
@@ -292,6 +292,13 @@ bn_nist.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
292bn_nist.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 292bn_nist.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
293bn_nist.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 293bn_nist.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
294bn_nist.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_nist.c 294bn_nist.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_nist.c
295bn_opt.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
296bn_opt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
297bn_opt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
298bn_opt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
299bn_opt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
300bn_opt.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
301bn_opt.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_opt.c
295bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h 302bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
296bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 303bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
297bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 304bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
@@ -350,3 +357,6 @@ bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
350bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 357bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
351bn_word.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 358bn_word.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
352bn_word.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_word.c 359bn_word.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_word.c
360bn_x931p.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
361bn_x931p.o: ../../include/openssl/opensslconf.h
362bn_x931p.o: ../../include/openssl/ossl_typ.h bn_x931p.c
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index 6d754d5547..f1719a5877 100644
--- a/src/lib/libcrypto/bn/bn.h
+++ b/src/lib/libcrypto/bn/bn.h
@@ -408,8 +408,8 @@ BIGNUM *BN_CTX_get(BN_CTX *ctx);
408void BN_CTX_end(BN_CTX *ctx); 408void BN_CTX_end(BN_CTX *ctx);
409int BN_rand(BIGNUM *rnd, int bits, int top,int bottom); 409int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
410int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom); 410int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
411int BN_rand_range(BIGNUM *rnd, BIGNUM *range); 411int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
412int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range); 412int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
413int BN_num_bits(const BIGNUM *a); 413int BN_num_bits(const BIGNUM *a);
414int BN_num_bits_word(BN_ULONG); 414int BN_num_bits_word(BN_ULONG);
415BIGNUM *BN_new(void); 415BIGNUM *BN_new(void);
@@ -531,6 +531,17 @@ int BN_is_prime_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, BN_GENCB *cb);
531int BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, 531int BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx,
532 int do_trial_division, BN_GENCB *cb); 532 int do_trial_division, BN_GENCB *cb);
533 533
534int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
535
536int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
537 const BIGNUM *Xp, const BIGNUM *Xp1, const BIGNUM *Xp2,
538 const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb);
539int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
540 BIGNUM *Xp1, BIGNUM *Xp2,
541 const BIGNUM *Xp,
542 const BIGNUM *e, BN_CTX *ctx,
543 BN_GENCB *cb);
544
534BN_MONT_CTX *BN_MONT_CTX_new(void ); 545BN_MONT_CTX *BN_MONT_CTX_new(void );
535void BN_MONT_CTX_init(BN_MONT_CTX *ctx); 546void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
536int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b, 547int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c
index 2649b8c538..32a8fbaf51 100644
--- a/src/lib/libcrypto/bn/bn_lib.c
+++ b/src/lib/libcrypto/bn/bn_lib.c
@@ -139,25 +139,6 @@ const BIGNUM *BN_value_one(void)
139 return(&const_one); 139 return(&const_one);
140 } 140 }
141 141
142char *BN_options(void)
143 {
144 static int init=0;
145 static char data[16];
146
147 if (!init)
148 {
149 init++;
150#ifdef BN_LLONG
151 BIO_snprintf(data,sizeof data,"bn(%d,%d)",
152 (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
153#else
154 BIO_snprintf(data,sizeof data,"bn(%d,%d)",
155 (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
156#endif
157 }
158 return(data);
159 }
160
161int BN_num_bits_word(BN_ULONG l) 142int BN_num_bits_word(BN_ULONG l)
162 { 143 {
163 static const char bits[256]={ 144 static const char bits[256]={
diff --git a/src/lib/libcrypto/bn/bn_nist.c b/src/lib/libcrypto/bn/bn_nist.c
index 1fc94f55c3..2ca5b01391 100644
--- a/src/lib/libcrypto/bn/bn_nist.c
+++ b/src/lib/libcrypto/bn/bn_nist.c
@@ -66,46 +66,157 @@
66#define BN_NIST_384_TOP (384+BN_BITS2-1)/BN_BITS2 66#define BN_NIST_384_TOP (384+BN_BITS2-1)/BN_BITS2
67#define BN_NIST_521_TOP (521+BN_BITS2-1)/BN_BITS2 67#define BN_NIST_521_TOP (521+BN_BITS2-1)/BN_BITS2
68 68
69/* pre-computed tables are "carry-less" values of modulus*(i+1) */
69#if BN_BITS2 == 64 70#if BN_BITS2 == 64
70static const BN_ULONG _nist_p_192[] = 71static const BN_ULONG _nist_p_192[][BN_NIST_192_TOP] = {
71 {0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFEULL, 72 {0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFEULL,0xFFFFFFFFFFFFFFFFULL},
72 0xFFFFFFFFFFFFFFFFULL}; 73 {0xFFFFFFFFFFFFFFFEULL,0xFFFFFFFFFFFFFFFDULL,0xFFFFFFFFFFFFFFFFULL},
73static const BN_ULONG _nist_p_224[] = 74 {0xFFFFFFFFFFFFFFFDULL,0xFFFFFFFFFFFFFFFCULL,0xFFFFFFFFFFFFFFFFULL}
75 };
76static const BN_ULONG _nist_p_192_sqr[] = {
77 0x0000000000000001ULL,0x0000000000000002ULL,0x0000000000000001ULL,
78 0xFFFFFFFFFFFFFFFEULL,0xFFFFFFFFFFFFFFFDULL,0xFFFFFFFFFFFFFFFFULL
79 };
80static const BN_ULONG _nist_p_224[][BN_NIST_224_TOP] = {
74 {0x0000000000000001ULL,0xFFFFFFFF00000000ULL, 81 {0x0000000000000001ULL,0xFFFFFFFF00000000ULL,
75 0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL}; 82 0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL},
76static const BN_ULONG _nist_p_256[] = 83 {0x0000000000000002ULL,0xFFFFFFFE00000000ULL,
84 0xFFFFFFFFFFFFFFFFULL,0x00000001FFFFFFFFULL} /* this one is "carry-full" */
85 };
86static const BN_ULONG _nist_p_224_sqr[] = {
87 0x0000000000000001ULL,0xFFFFFFFE00000000ULL,
88 0xFFFFFFFFFFFFFFFFULL,0x0000000200000000ULL,
89 0x0000000000000000ULL,0xFFFFFFFFFFFFFFFEULL,
90 0xFFFFFFFFFFFFFFFFULL
91 };
92static const BN_ULONG _nist_p_256[][BN_NIST_256_TOP] = {
77 {0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL, 93 {0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL,
78 0x0000000000000000ULL,0xFFFFFFFF00000001ULL}; 94 0x0000000000000000ULL,0xFFFFFFFF00000001ULL},
79static const BN_ULONG _nist_p_384[] = 95 {0xFFFFFFFFFFFFFFFEULL,0x00000001FFFFFFFFULL,
80 {0x00000000FFFFFFFFULL,0xFFFFFFFF00000000ULL, 96 0x0000000000000000ULL,0xFFFFFFFE00000002ULL},
81 0xFFFFFFFFFFFFFFFEULL,0xFFFFFFFFFFFFFFFFULL, 97 {0xFFFFFFFFFFFFFFFDULL,0x00000002FFFFFFFFULL,
82 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL}; 98 0x0000000000000000ULL,0xFFFFFFFD00000003ULL},
99 {0xFFFFFFFFFFFFFFFCULL,0x00000003FFFFFFFFULL,
100 0x0000000000000000ULL,0xFFFFFFFC00000004ULL},
101 {0xFFFFFFFFFFFFFFFBULL,0x00000004FFFFFFFFULL,
102 0x0000000000000000ULL,0xFFFFFFFB00000005ULL},
103 };
104static const BN_ULONG _nist_p_256_sqr[] = {
105 0x0000000000000001ULL,0xFFFFFFFE00000000ULL,
106 0xFFFFFFFFFFFFFFFFULL,0x00000001FFFFFFFEULL,
107 0x00000001FFFFFFFEULL,0x00000001FFFFFFFEULL,
108 0xFFFFFFFE00000001ULL,0xFFFFFFFE00000002ULL
109 };
110static const BN_ULONG _nist_p_384[][BN_NIST_384_TOP] = {
111 {0x00000000FFFFFFFFULL,0xFFFFFFFF00000000ULL,0xFFFFFFFFFFFFFFFEULL,
112 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
113 {0x00000001FFFFFFFEULL,0xFFFFFFFE00000000ULL,0xFFFFFFFFFFFFFFFDULL,
114 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
115 {0x00000002FFFFFFFDULL,0xFFFFFFFD00000000ULL,0xFFFFFFFFFFFFFFFCULL,
116 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
117 {0x00000003FFFFFFFCULL,0xFFFFFFFC00000000ULL,0xFFFFFFFFFFFFFFFBULL,
118 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
119 {0x00000004FFFFFFFBULL,0xFFFFFFFB00000000ULL,0xFFFFFFFFFFFFFFFAULL,
120 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
121 };
122static const BN_ULONG _nist_p_384_sqr[] = {
123 0xFFFFFFFE00000001ULL,0x0000000200000000ULL,0xFFFFFFFE00000000ULL,
124 0x0000000200000000ULL,0x0000000000000001ULL,0x0000000000000000ULL,
125 0x00000001FFFFFFFEULL,0xFFFFFFFE00000000ULL,0xFFFFFFFFFFFFFFFDULL,
126 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL
127 };
83static const BN_ULONG _nist_p_521[] = 128static const BN_ULONG _nist_p_521[] =
84 {0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL, 129 {0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
85 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL, 130 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
86 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL, 131 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
87 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL, 132 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
88 0x00000000000001FFULL}; 133 0x00000000000001FFULL};
134static const BN_ULONG _nist_p_521_sqr[] = {
135 0x0000000000000001ULL,0x0000000000000000ULL,0x0000000000000000ULL,
136 0x0000000000000000ULL,0x0000000000000000ULL,0x0000000000000000ULL,
137 0x0000000000000000ULL,0x0000000000000000ULL,0xFFFFFFFFFFFFFC00ULL,
138 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
139 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
140 0xFFFFFFFFFFFFFFFFULL,0x000000000003FFFFULL
141 };
89#elif BN_BITS2 == 32 142#elif BN_BITS2 == 32
90static const BN_ULONG _nist_p_192[] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFE, 143static const BN_ULONG _nist_p_192[][BN_NIST_192_TOP] = {
91 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}; 144 {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
92static const BN_ULONG _nist_p_224[] = {0x00000001,0x00000000,0x00000000, 145 {0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFD,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
93 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}; 146 {0xFFFFFFFD,0xFFFFFFFF,0xFFFFFFFC,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}
94static const BN_ULONG _nist_p_256[] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 147 };
95 0x00000000,0x00000000,0x00000000,0x00000001,0xFFFFFFFF}; 148static const BN_ULONG _nist_p_192_sqr[] = {
96static const BN_ULONG _nist_p_384[] = {0xFFFFFFFF,0x00000000,0x00000000, 149 0x00000001,0x00000000,0x00000002,0x00000000,0x00000001,0x00000000,
97 0xFFFFFFFF,0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 150 0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFD,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
98 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}; 151 };
152static const BN_ULONG _nist_p_224[][BN_NIST_224_TOP] = {
153 {0x00000001,0x00000000,0x00000000,0xFFFFFFFF,
154 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
155 {0x00000002,0x00000000,0x00000000,0xFFFFFFFE,
156 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}
157 };
158static const BN_ULONG _nist_p_224_sqr[] = {
159 0x00000001,0x00000000,0x00000000,0xFFFFFFFE,
160 0xFFFFFFFF,0xFFFFFFFF,0x00000000,0x00000002,
161 0x00000000,0x00000000,0xFFFFFFFE,0xFFFFFFFF,
162 0xFFFFFFFF,0xFFFFFFFF
163 };
164static const BN_ULONG _nist_p_256[][BN_NIST_256_TOP] = {
165 {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0x00000000,
166 0x00000000,0x00000000,0x00000001,0xFFFFFFFF},
167 {0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFF,0x00000001,
168 0x00000000,0x00000000,0x00000002,0xFFFFFFFE},
169 {0xFFFFFFFD,0xFFFFFFFF,0xFFFFFFFF,0x00000002,
170 0x00000000,0x00000000,0x00000003,0xFFFFFFFD},
171 {0xFFFFFFFC,0xFFFFFFFF,0xFFFFFFFF,0x00000003,
172 0x00000000,0x00000000,0x00000004,0xFFFFFFFC},
173 {0xFFFFFFFB,0xFFFFFFFF,0xFFFFFFFF,0x00000004,
174 0x00000000,0x00000000,0x00000005,0xFFFFFFFB},
175 };
176static const BN_ULONG _nist_p_256_sqr[] = {
177 0x00000001,0x00000000,0x00000000,0xFFFFFFFE,
178 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFE,0x00000001,
179 0xFFFFFFFE,0x00000001,0xFFFFFFFE,0x00000001,
180 0x00000001,0xFFFFFFFE,0x00000002,0xFFFFFFFE
181 };
182static const BN_ULONG _nist_p_384[][BN_NIST_384_TOP] = {
183 {0xFFFFFFFF,0x00000000,0x00000000,0xFFFFFFFF,0xFFFFFFFE,0xFFFFFFFF,
184 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
185 {0xFFFFFFFE,0x00000001,0x00000000,0xFFFFFFFE,0xFFFFFFFD,0xFFFFFFFF,
186 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
187 {0xFFFFFFFD,0x00000002,0x00000000,0xFFFFFFFD,0xFFFFFFFC,0xFFFFFFFF,
188 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
189 {0xFFFFFFFC,0x00000003,0x00000000,0xFFFFFFFC,0xFFFFFFFB,0xFFFFFFFF,
190 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
191 {0xFFFFFFFB,0x00000004,0x00000000,0xFFFFFFFB,0xFFFFFFFA,0xFFFFFFFF,
192 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
193 };
194static const BN_ULONG _nist_p_384_sqr[] = {
195 0x00000001,0xFFFFFFFE,0x00000000,0x00000002,0x00000000,0xFFFFFFFE,
196 0x00000000,0x00000002,0x00000001,0x00000000,0x00000000,0x00000000,
197 0xFFFFFFFE,0x00000001,0x00000000,0xFFFFFFFE,0xFFFFFFFD,0xFFFFFFFF,
198 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
199 };
99static const BN_ULONG _nist_p_521[] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 200static const BN_ULONG _nist_p_521[] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
100 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 201 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
101 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 202 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
102 0xFFFFFFFF,0x000001FF}; 203 0xFFFFFFFF,0x000001FF};
204static const BN_ULONG _nist_p_521_sqr[] = {
205 0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
206 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
207 0x00000000,0x00000000,0x00000000,0x00000000,0xFFFFFC00,0xFFFFFFFF,
208 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
209 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
210 0xFFFFFFFF,0xFFFFFFFF,0x0003FFFF
211 };
212#else
213#error "unsupported BN_BITS2"
103#endif 214#endif
104 215
105 216
106static const BIGNUM _bignum_nist_p_192 = 217static const BIGNUM _bignum_nist_p_192 =
107 { 218 {
108 (BN_ULONG *)_nist_p_192, 219 (BN_ULONG *)_nist_p_192[0],
109 BN_NIST_192_TOP, 220 BN_NIST_192_TOP,
110 BN_NIST_192_TOP, 221 BN_NIST_192_TOP,
111 0, 222 0,
@@ -114,7 +225,7 @@ static const BIGNUM _bignum_nist_p_192 =
114 225
115static const BIGNUM _bignum_nist_p_224 = 226static const BIGNUM _bignum_nist_p_224 =
116 { 227 {
117 (BN_ULONG *)_nist_p_224, 228 (BN_ULONG *)_nist_p_224[0],
118 BN_NIST_224_TOP, 229 BN_NIST_224_TOP,
119 BN_NIST_224_TOP, 230 BN_NIST_224_TOP,
120 0, 231 0,
@@ -123,7 +234,7 @@ static const BIGNUM _bignum_nist_p_224 =
123 234
124static const BIGNUM _bignum_nist_p_256 = 235static const BIGNUM _bignum_nist_p_256 =
125 { 236 {
126 (BN_ULONG *)_nist_p_256, 237 (BN_ULONG *)_nist_p_256[0],
127 BN_NIST_256_TOP, 238 BN_NIST_256_TOP,
128 BN_NIST_256_TOP, 239 BN_NIST_256_TOP,
129 0, 240 0,
@@ -132,7 +243,7 @@ static const BIGNUM _bignum_nist_p_256 =
132 243
133static const BIGNUM _bignum_nist_p_384 = 244static const BIGNUM _bignum_nist_p_384 =
134 { 245 {
135 (BN_ULONG *)_nist_p_384, 246 (BN_ULONG *)_nist_p_384[0],
136 BN_NIST_384_TOP, 247 BN_NIST_384_TOP,
137 BN_NIST_384_TOP, 248 BN_NIST_384_TOP,
138 0, 249 0,
@@ -180,7 +291,9 @@ static void nist_cp_bn_0(BN_ULONG *buf, BN_ULONG *a, int top, int max)
180 int i; 291 int i;
181 BN_ULONG *_tmp1 = (buf), *_tmp2 = (a); 292 BN_ULONG *_tmp1 = (buf), *_tmp2 = (a);
182 293
294#ifdef BN_DEBUG
183 OPENSSL_assert(top <= max); 295 OPENSSL_assert(top <= max);
296#endif
184 for (i = (top); i != 0; i--) 297 for (i = (top); i != 0; i--)
185 *_tmp1++ = *_tmp2++; 298 *_tmp1++ = *_tmp2++;
186 for (i = (max) - (top); i != 0; i--) 299 for (i = (max) - (top); i != 0; i--)
@@ -198,9 +311,14 @@ static void nist_cp_bn(BN_ULONG *buf, BN_ULONG *a, int top)
198#if BN_BITS2 == 64 311#if BN_BITS2 == 64
199#define bn_cp_64(to, n, from, m) (to)[n] = (m>=0)?((from)[m]):0; 312#define bn_cp_64(to, n, from, m) (to)[n] = (m>=0)?((from)[m]):0;
200#define bn_64_set_0(to, n) (to)[n] = (BN_ULONG)0; 313#define bn_64_set_0(to, n) (to)[n] = (BN_ULONG)0;
201/* TBD */ 314/*
202#define bn_cp_32(to, n, from, m) (to)[n] = (m>=0)?((from)[m]):0; 315 * two following macros are implemented under assumption that they
203#define bn_32_set_0(to, n) (to)[n] = (BN_ULONG)0; 316 * are called in a sequence with *ascending* n, i.e. as they are...
317 */
318#define bn_cp_32_naked(to, n, from, m) (((n)&1)?(to[(n)/2]|=((m)&1)?(from[(m)/2]&BN_MASK2h):(from[(m)/2]<<32))\
319 :(to[(n)/2] =((m)&1)?(from[(m)/2]>>32):(from[(m)/2]&BN_MASK2l)))
320#define bn_32_set_0(to, n) (((n)&1)?(to[(n)/2]&=BN_MASK2l):(to[(n)/2]=0));
321#define bn_cp_32(to,n,from,m) ((m)>=0)?bn_cp_32_naked(to,n,from,m):bn_32_set_0(to,n)
204#else 322#else
205#define bn_cp_64(to, n, from, m) \ 323#define bn_cp_64(to, n, from, m) \
206 { \ 324 { \
@@ -221,9 +339,9 @@ static void nist_cp_bn(BN_ULONG *buf, BN_ULONG *a, int top)
221 339
222#define nist_set_192(to, from, a1, a2, a3) \ 340#define nist_set_192(to, from, a1, a2, a3) \
223 { \ 341 { \
224 if (a3 != 0) bn_cp_64(to, 0, from, (a3) - 3) else bn_64_set_0(to, 0)\ 342 bn_cp_64(to, 0, from, (a3) - 3) \
225 bn_cp_64(to, 1, from, (a2) - 3) \ 343 bn_cp_64(to, 1, from, (a2) - 3) \
226 if (a1 != 0) bn_cp_64(to, 2, from, (a1) - 3) else bn_64_set_0(to, 2)\ 344 bn_cp_64(to, 2, from, (a1) - 3) \
227 } 345 }
228 346
229int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 347int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
@@ -237,11 +355,16 @@ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
237 c_d[BN_NIST_192_TOP], 355 c_d[BN_NIST_192_TOP],
238 *res; 356 *res;
239 size_t mask; 357 size_t mask;
358 static const BIGNUM _bignum_nist_p_192_sqr = {
359 (BN_ULONG *)_nist_p_192_sqr,
360 sizeof(_nist_p_192_sqr)/sizeof(_nist_p_192_sqr[0]),
361 sizeof(_nist_p_192_sqr)/sizeof(_nist_p_192_sqr[0]),
362 0,BN_FLG_STATIC_DATA };
240 363
241 field = &_bignum_nist_p_192; /* just to make sure */ 364 field = &_bignum_nist_p_192; /* just to make sure */
242 365
243 if (BN_is_negative(a) || a->top > 2*BN_NIST_192_TOP) 366 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_192_sqr)>=0)
244 return BN_nnmod(r, field, a, ctx); 367 return BN_nnmod(r, a, field, ctx);
245 368
246 i = BN_ucmp(field, a); 369 i = BN_ucmp(field, a);
247 if (i == 0) 370 if (i == 0)
@@ -265,50 +388,49 @@ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
265 nist_cp_bn_0(buf, a_d + BN_NIST_192_TOP, top - BN_NIST_192_TOP, BN_NIST_192_TOP); 388 nist_cp_bn_0(buf, a_d + BN_NIST_192_TOP, top - BN_NIST_192_TOP, BN_NIST_192_TOP);
266 389
267 nist_set_192(t_d, buf, 0, 3, 3); 390 nist_set_192(t_d, buf, 0, 3, 3);
268 carry = bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP); 391 carry = (int)bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP);
269 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_192,BN_NIST_192_TOP);
270 mask = ~mask | (0-(size_t)carry);
271 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
272
273 nist_set_192(t_d, buf, 4, 4, 0); 392 nist_set_192(t_d, buf, 4, 4, 0);
274 carry = bn_add_words(r_d, res, t_d, BN_NIST_192_TOP); 393 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP);
275 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_192,BN_NIST_192_TOP);
276 mask = ~mask | (0-(size_t)carry);
277 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
278
279 nist_set_192(t_d, buf, 5, 5, 5) 394 nist_set_192(t_d, buf, 5, 5, 5)
280 carry = bn_add_words(r_d, res, t_d, BN_NIST_192_TOP); 395 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP);
281 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_192,BN_NIST_192_TOP);
282 mask = ~mask | (0-(size_t)carry);
283 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
284 396
397 if (carry > 0)
398 carry = (int)bn_sub_words(r_d,r_d,_nist_p_192[carry-1],BN_NIST_192_TOP);
399 else
400 carry = 1;
401
402 /*
403 * we need 'if (carry==0 || result>=modulus) result-=modulus;'
404 * as comparison implies subtraction, we can write
405 * 'tmp=result-modulus; if (!carry || !borrow) result=tmp;'
406 * this is what happens below, but without explicit if:-) a.
407 */
408 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_192[0],BN_NIST_192_TOP);
409 mask &= 0-(size_t)carry;
410 res = (BN_ULONG *)(((size_t)c_d&~mask) | ((size_t)r_d&mask));
285 nist_cp_bn(r_d, res, BN_NIST_192_TOP); 411 nist_cp_bn(r_d, res, BN_NIST_192_TOP);
286 r->top = BN_NIST_192_TOP; 412 r->top = BN_NIST_192_TOP;
287 bn_correct_top(r); 413 bn_correct_top(r);
288 414
289 if (BN_ucmp(field, r) <= 0)
290 {
291 if (!BN_usub(r, r, field)) return 0;
292 }
293
294 return 1; 415 return 1;
295 } 416 }
296 417
418typedef BN_ULONG (*bn_addsub_f)(BN_ULONG *,const BN_ULONG *,const BN_ULONG *,int);
419
297#define nist_set_224(to, from, a1, a2, a3, a4, a5, a6, a7) \ 420#define nist_set_224(to, from, a1, a2, a3, a4, a5, a6, a7) \
298 { \ 421 { \
299 if (a7 != 0) bn_cp_32(to, 0, from, (a7) - 7) else bn_32_set_0(to, 0)\ 422 bn_cp_32(to, 0, from, (a7) - 7) \
300 if (a6 != 0) bn_cp_32(to, 1, from, (a6) - 7) else bn_32_set_0(to, 1)\ 423 bn_cp_32(to, 1, from, (a6) - 7) \
301 if (a5 != 0) bn_cp_32(to, 2, from, (a5) - 7) else bn_32_set_0(to, 2)\ 424 bn_cp_32(to, 2, from, (a5) - 7) \
302 if (a4 != 0) bn_cp_32(to, 3, from, (a4) - 7) else bn_32_set_0(to, 3)\ 425 bn_cp_32(to, 3, from, (a4) - 7) \
303 if (a3 != 0) bn_cp_32(to, 4, from, (a3) - 7) else bn_32_set_0(to, 4)\ 426 bn_cp_32(to, 4, from, (a3) - 7) \
304 if (a2 != 0) bn_cp_32(to, 5, from, (a2) - 7) else bn_32_set_0(to, 5)\ 427 bn_cp_32(to, 5, from, (a2) - 7) \
305 if (a1 != 0) bn_cp_32(to, 6, from, (a1) - 7) else bn_32_set_0(to, 6)\ 428 bn_cp_32(to, 6, from, (a1) - 7) \
306 } 429 }
307 430
308int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 431int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
309 BN_CTX *ctx) 432 BN_CTX *ctx)
310 { 433 {
311#if BN_BITS2 == 32
312 int top = a->top, i; 434 int top = a->top, i;
313 int carry; 435 int carry;
314 BN_ULONG *r_d, *a_d = a->d; 436 BN_ULONG *r_d, *a_d = a->d;
@@ -317,11 +439,18 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
317 c_d[BN_NIST_224_TOP], 439 c_d[BN_NIST_224_TOP],
318 *res; 440 *res;
319 size_t mask; 441 size_t mask;
442 union { bn_addsub_f f; size_t p; } u;
443 static const BIGNUM _bignum_nist_p_224_sqr = {
444 (BN_ULONG *)_nist_p_224_sqr,
445 sizeof(_nist_p_224_sqr)/sizeof(_nist_p_224_sqr[0]),
446 sizeof(_nist_p_224_sqr)/sizeof(_nist_p_224_sqr[0]),
447 0,BN_FLG_STATIC_DATA };
448
320 449
321 field = &_bignum_nist_p_224; /* just to make sure */ 450 field = &_bignum_nist_p_224; /* just to make sure */
322 451
323 if (BN_is_negative(a) || a->top > 2*BN_NIST_224_TOP) 452 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_224_sqr)>=0)
324 return BN_nnmod(r, field, a, ctx); 453 return BN_nnmod(r, a, field, ctx);
325 454
326 i = BN_ucmp(field, a); 455 i = BN_ucmp(field, a);
327 if (i == 0) 456 if (i == 0)
@@ -342,72 +471,77 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
342 else 471 else
343 r_d = a_d; 472 r_d = a_d;
344 473
474#if BN_BITS2==64
475 /* copy upper 256 bits of 448 bit number ... */
476 nist_cp_bn_0(t_d, a_d + (BN_NIST_224_TOP-1), top - (BN_NIST_224_TOP-1), BN_NIST_224_TOP);
477 /* ... and right shift by 32 to obtain upper 224 bits */
478 nist_set_224(buf, t_d, 14, 13, 12, 11, 10, 9, 8);
479 /* truncate lower part to 224 bits too */
480 r_d[BN_NIST_224_TOP-1] &= BN_MASK2l;
481#else
345 nist_cp_bn_0(buf, a_d + BN_NIST_224_TOP, top - BN_NIST_224_TOP, BN_NIST_224_TOP); 482 nist_cp_bn_0(buf, a_d + BN_NIST_224_TOP, top - BN_NIST_224_TOP, BN_NIST_224_TOP);
346 483#endif
347 nist_set_224(t_d, buf, 10, 9, 8, 7, 0, 0, 0); 484 nist_set_224(t_d, buf, 10, 9, 8, 7, 0, 0, 0);
348 carry = bn_add_words(r_d, r_d, t_d, BN_NIST_224_TOP); 485 carry = (int)bn_add_words(r_d, r_d, t_d, BN_NIST_224_TOP);
349 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_224,BN_NIST_224_TOP);
350 mask = ~mask | (0-(size_t)carry);
351 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
352
353 nist_set_224(t_d, buf, 0, 13, 12, 11, 0, 0, 0); 486 nist_set_224(t_d, buf, 0, 13, 12, 11, 0, 0, 0);
354 carry = bn_add_words(r_d, res, t_d, BN_NIST_224_TOP); 487 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_224_TOP);
355 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_224,BN_NIST_224_TOP);
356 mask = ~mask | (0-(size_t)carry);
357 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
358
359 nist_set_224(t_d, buf, 13, 12, 11, 10, 9, 8, 7); 488 nist_set_224(t_d, buf, 13, 12, 11, 10, 9, 8, 7);
360#if BRANCH_FREE 489 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_224_TOP);
361 carry = bn_sub_words(r_d, res, t_d, BN_NIST_224_TOP);
362 bn_add_words(c_d,r_d,_nist_p_224,BN_NIST_224_TOP);
363 mask = 0-(size_t)carry;
364 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
365#else
366 if (bn_sub_words(r_d, res, t_d, BN_NIST_224_TOP))
367 bn_add_words(r_d,r_d,_nist_p_224,BN_NIST_224_TOP);
368#endif
369 nist_set_224(t_d, buf, 0, 0, 0, 0, 13, 12, 11); 490 nist_set_224(t_d, buf, 0, 0, 0, 0, 13, 12, 11);
370#if BRANCH_FREE 491 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_224_TOP);
371 carry = bn_sub_words(r_d, res, t_d, BN_NIST_224_TOP);
372 bn_add_words(c_d,r_d,_nist_p_224,BN_NIST_224_TOP);
373 mask = 0-(size_t)carry;
374 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
375 492
376 nist_cp_bn(r_d, res, BN_NIST_224_TOP); 493#if BN_BITS2==64
377#else 494 carry = (int)(r_d[BN_NIST_224_TOP-1]>>32);
378 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_224_TOP))
379 bn_add_words(r_d,r_d,_nist_p_224,BN_NIST_224_TOP);
380#endif 495#endif
381 r->top = BN_NIST_224_TOP; 496 u.f = bn_sub_words;
382 bn_correct_top(r); 497 if (carry > 0)
383
384 if (BN_ucmp(field, r) <= 0)
385 { 498 {
386 if (!BN_usub(r, r, field)) return 0; 499 carry = (int)bn_sub_words(r_d,r_d,_nist_p_224[carry-1],BN_NIST_224_TOP);
500#if BN_BITS2==64
501 carry=(int)(~(r_d[BN_NIST_224_TOP-1]>>32))&1;
502#endif
387 } 503 }
504 else if (carry < 0)
505 {
506 /* it's a bit more comlicated logic in this case.
507 * if bn_add_words yields no carry, then result
508 * has to be adjusted by unconditionally *adding*
509 * the modulus. but if it does, then result has
510 * to be compared to the modulus and conditionally
511 * adjusted by *subtracting* the latter. */
512 carry = (int)bn_add_words(r_d,r_d,_nist_p_224[-carry-1],BN_NIST_224_TOP);
513 mask = 0-(size_t)carry;
514 u.p = ((size_t)bn_sub_words&mask) | ((size_t)bn_add_words&~mask);
515 }
516 else
517 carry = 1;
518
519 /* otherwise it's effectively same as in BN_nist_mod_192... */
520 mask = 0-(size_t)(*u.f)(c_d,r_d,_nist_p_224[0],BN_NIST_224_TOP);
521 mask &= 0-(size_t)carry;
522 res = (BN_ULONG *)(((size_t)c_d&~mask) | ((size_t)r_d&mask));
523 nist_cp_bn(r_d, res, BN_NIST_224_TOP);
524 r->top = BN_NIST_224_TOP;
525 bn_correct_top(r);
388 526
389 return 1; 527 return 1;
390#else /* BN_BITS!=32 */
391 return 0;
392#endif
393 } 528 }
394 529
395#define nist_set_256(to, from, a1, a2, a3, a4, a5, a6, a7, a8) \ 530#define nist_set_256(to, from, a1, a2, a3, a4, a5, a6, a7, a8) \
396 { \ 531 { \
397 if (a8 != 0) bn_cp_32(to, 0, from, (a8) - 8) else bn_32_set_0(to, 0)\ 532 bn_cp_32(to, 0, from, (a8) - 8) \
398 if (a7 != 0) bn_cp_32(to, 1, from, (a7) - 8) else bn_32_set_0(to, 1)\ 533 bn_cp_32(to, 1, from, (a7) - 8) \
399 if (a6 != 0) bn_cp_32(to, 2, from, (a6) - 8) else bn_32_set_0(to, 2)\ 534 bn_cp_32(to, 2, from, (a6) - 8) \
400 if (a5 != 0) bn_cp_32(to, 3, from, (a5) - 8) else bn_32_set_0(to, 3)\ 535 bn_cp_32(to, 3, from, (a5) - 8) \
401 if (a4 != 0) bn_cp_32(to, 4, from, (a4) - 8) else bn_32_set_0(to, 4)\ 536 bn_cp_32(to, 4, from, (a4) - 8) \
402 if (a3 != 0) bn_cp_32(to, 5, from, (a3) - 8) else bn_32_set_0(to, 5)\ 537 bn_cp_32(to, 5, from, (a3) - 8) \
403 if (a2 != 0) bn_cp_32(to, 6, from, (a2) - 8) else bn_32_set_0(to, 6)\ 538 bn_cp_32(to, 6, from, (a2) - 8) \
404 if (a1 != 0) bn_cp_32(to, 7, from, (a1) - 8) else bn_32_set_0(to, 7)\ 539 bn_cp_32(to, 7, from, (a1) - 8) \
405 } 540 }
406 541
407int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 542int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
408 BN_CTX *ctx) 543 BN_CTX *ctx)
409 { 544 {
410#if BN_BITS2 == 32
411 int i, top = a->top; 545 int i, top = a->top;
412 int carry = 0; 546 int carry = 0;
413 register BN_ULONG *a_d = a->d, *r_d; 547 register BN_ULONG *a_d = a->d, *r_d;
@@ -416,11 +550,17 @@ int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
416 c_d[BN_NIST_256_TOP], 550 c_d[BN_NIST_256_TOP],
417 *res; 551 *res;
418 size_t mask; 552 size_t mask;
553 union { bn_addsub_f f; size_t p; } u;
554 static const BIGNUM _bignum_nist_p_256_sqr = {
555 (BN_ULONG *)_nist_p_256_sqr,
556 sizeof(_nist_p_256_sqr)/sizeof(_nist_p_256_sqr[0]),
557 sizeof(_nist_p_256_sqr)/sizeof(_nist_p_256_sqr[0]),
558 0,BN_FLG_STATIC_DATA };
419 559
420 field = &_bignum_nist_p_256; /* just to make sure */ 560 field = &_bignum_nist_p_256; /* just to make sure */
421 561
422 if (BN_is_negative(a) || a->top > 2*BN_NIST_256_TOP) 562 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_256_sqr)>=0)
423 return BN_nnmod(r, field, a, ctx); 563 return BN_nnmod(r, a, field, ctx);
424 564
425 i = BN_ucmp(field, a); 565 i = BN_ucmp(field, a);
426 if (i == 0) 566 if (i == 0)
@@ -446,116 +586,84 @@ int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
446 /*S1*/ 586 /*S1*/
447 nist_set_256(t_d, buf, 15, 14, 13, 12, 11, 0, 0, 0); 587 nist_set_256(t_d, buf, 15, 14, 13, 12, 11, 0, 0, 0);
448 /*S2*/ 588 /*S2*/
449 nist_set_256(c_d,buf, 0, 15, 14, 13, 12, 0, 0, 0); 589 nist_set_256(c_d, buf, 0, 15, 14, 13, 12, 0, 0, 0);
450 carry = bn_add_words(t_d, t_d, c_d, BN_NIST_256_TOP); 590 carry = (int)bn_add_words(t_d, t_d, c_d, BN_NIST_256_TOP);
451 mask = 0-(size_t)bn_sub_words(c_d,t_d,_nist_p_256,BN_NIST_256_TOP); 591 /* left shift */
452 mask = ~mask | (0-(size_t)carry); 592 {
453 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)t_d&~mask)); 593 register BN_ULONG *ap,t,c;
454 594 ap = t_d;
455 carry = bn_add_words(t_d, res, res, BN_NIST_256_TOP); 595 c=0;
456 mask = 0-(size_t)bn_sub_words(c_d,t_d,_nist_p_256,BN_NIST_256_TOP); 596 for (i = BN_NIST_256_TOP; i != 0; --i)
457 mask = ~mask | (0-(size_t)carry); 597 {
458 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)t_d&~mask)); 598 t= *ap;
459 599 *(ap++)=((t<<1)|c)&BN_MASK2;
460 carry = bn_add_words(r_d, r_d, res, BN_NIST_256_TOP); 600 c=(t & BN_TBIT)?1:0;
461 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP); 601 }
462 mask = ~mask | (0-(size_t)carry); 602 carry <<= 1;
463 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask)); 603 carry |= c;
464 604 }
605 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_256_TOP);
465 /*S3*/ 606 /*S3*/
466 nist_set_256(t_d, buf, 15, 14, 0, 0, 0, 10, 9, 8); 607 nist_set_256(t_d, buf, 15, 14, 0, 0, 0, 10, 9, 8);
467 carry = bn_add_words(r_d, res, t_d, BN_NIST_256_TOP); 608 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_256_TOP);
468 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
469 mask = ~mask | (0-(size_t)carry);
470 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
471
472 /*S4*/ 609 /*S4*/
473 nist_set_256(t_d, buf, 8, 13, 15, 14, 13, 11, 10, 9); 610 nist_set_256(t_d, buf, 8, 13, 15, 14, 13, 11, 10, 9);
474 carry = bn_add_words(r_d, res, t_d, BN_NIST_256_TOP); 611 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_256_TOP);
475 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
476 mask = ~mask | (0-(size_t)carry);
477 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
478
479 /*D1*/ 612 /*D1*/
480 nist_set_256(t_d, buf, 10, 8, 0, 0, 0, 13, 12, 11); 613 nist_set_256(t_d, buf, 10, 8, 0, 0, 0, 13, 12, 11);
481#if BRANCH_FREE 614 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP);
482 carry = bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP);
483 bn_add_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
484 mask = 0-(size_t)carry;
485 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
486#else
487 if (bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP))
488 bn_add_words(r_d,r_d,_nist_p_256,BN_NIST_256_TOP);
489#endif
490 /*D2*/ 615 /*D2*/
491 nist_set_256(t_d, buf, 11, 9, 0, 0, 15, 14, 13, 12); 616 nist_set_256(t_d, buf, 11, 9, 0, 0, 15, 14, 13, 12);
492#if BRANCH_FREE 617 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP);
493 carry = bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP);
494 bn_add_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
495 mask = 0-(size_t)carry;
496 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
497#else
498 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))
499 bn_add_words(r_d,r_d,_nist_p_256,BN_NIST_256_TOP);
500#endif
501 /*D3*/ 618 /*D3*/
502 nist_set_256(t_d, buf, 12, 0, 10, 9, 8, 15, 14, 13); 619 nist_set_256(t_d, buf, 12, 0, 10, 9, 8, 15, 14, 13);
503#if BRANCH_FREE 620 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP);
504 carry = bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP);
505 bn_add_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
506 mask = 0-(size_t)carry;
507 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
508#else
509 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))
510 bn_add_words(r_d,r_d,_nist_p_256,BN_NIST_256_TOP);
511#endif
512 /*D4*/ 621 /*D4*/
513 nist_set_256(t_d, buf, 13, 0, 11, 10, 9, 0, 15, 14); 622 nist_set_256(t_d, buf, 13, 0, 11, 10, 9, 0, 15, 14);
514#if BRANCH_FREE 623 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP);
515 carry = bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP);
516 bn_add_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
517 mask = 0-(size_t)carry;
518 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
519
520 nist_cp_bn(r_d, res, BN_NIST_384_TOP);
521#else
522 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))
523 bn_add_words(r_d,r_d,_nist_p_256,BN_NIST_256_TOP);
524#endif
525 r->top = BN_NIST_256_TOP;
526 bn_correct_top(r);
527 624
528 if (BN_ucmp(field, r) <= 0) 625 /* see BN_nist_mod_224 for explanation */
626 u.f = bn_sub_words;
627 if (carry > 0)
628 carry = (int)bn_sub_words(r_d,r_d,_nist_p_256[carry-1],BN_NIST_256_TOP);
629 else if (carry < 0)
529 { 630 {
530 if (!BN_usub(r, r, field)) return 0; 631 carry = (int)bn_add_words(r_d,r_d,_nist_p_256[-carry-1],BN_NIST_256_TOP);
632 mask = 0-(size_t)carry;
633 u.p = ((size_t)bn_sub_words&mask) | ((size_t)bn_add_words&~mask);
531 } 634 }
635 else
636 carry = 1;
637
638 mask = 0-(size_t)(*u.f)(c_d,r_d,_nist_p_256[0],BN_NIST_256_TOP);
639 mask &= 0-(size_t)carry;
640 res = (BN_ULONG *)(((size_t)c_d&~mask) | ((size_t)r_d&mask));
641 nist_cp_bn(r_d, res, BN_NIST_256_TOP);
642 r->top = BN_NIST_256_TOP;
643 bn_correct_top(r);
532 644
533 return 1; 645 return 1;
534#else /* BN_BITS!=32 */
535 return 0;
536#endif
537 } 646 }
538 647
539#define nist_set_384(to,from,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \ 648#define nist_set_384(to,from,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
540 { \ 649 { \
541 if (a12 != 0) bn_cp_32(to, 0, from, (a12) - 12) else bn_32_set_0(to, 0)\ 650 bn_cp_32(to, 0, from, (a12) - 12) \
542 if (a11 != 0) bn_cp_32(to, 1, from, (a11) - 12) else bn_32_set_0(to, 1)\ 651 bn_cp_32(to, 1, from, (a11) - 12) \
543 if (a10 != 0) bn_cp_32(to, 2, from, (a10) - 12) else bn_32_set_0(to, 2)\ 652 bn_cp_32(to, 2, from, (a10) - 12) \
544 if (a9 != 0) bn_cp_32(to, 3, from, (a9) - 12) else bn_32_set_0(to, 3)\ 653 bn_cp_32(to, 3, from, (a9) - 12) \
545 if (a8 != 0) bn_cp_32(to, 4, from, (a8) - 12) else bn_32_set_0(to, 4)\ 654 bn_cp_32(to, 4, from, (a8) - 12) \
546 if (a7 != 0) bn_cp_32(to, 5, from, (a7) - 12) else bn_32_set_0(to, 5)\ 655 bn_cp_32(to, 5, from, (a7) - 12) \
547 if (a6 != 0) bn_cp_32(to, 6, from, (a6) - 12) else bn_32_set_0(to, 6)\ 656 bn_cp_32(to, 6, from, (a6) - 12) \
548 if (a5 != 0) bn_cp_32(to, 7, from, (a5) - 12) else bn_32_set_0(to, 7)\ 657 bn_cp_32(to, 7, from, (a5) - 12) \
549 if (a4 != 0) bn_cp_32(to, 8, from, (a4) - 12) else bn_32_set_0(to, 8)\ 658 bn_cp_32(to, 8, from, (a4) - 12) \
550 if (a3 != 0) bn_cp_32(to, 9, from, (a3) - 12) else bn_32_set_0(to, 9)\ 659 bn_cp_32(to, 9, from, (a3) - 12) \
551 if (a2 != 0) bn_cp_32(to, 10, from, (a2) - 12) else bn_32_set_0(to, 10)\ 660 bn_cp_32(to, 10, from, (a2) - 12) \
552 if (a1 != 0) bn_cp_32(to, 11, from, (a1) - 12) else bn_32_set_0(to, 11)\ 661 bn_cp_32(to, 11, from, (a1) - 12) \
553 } 662 }
554 663
555int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 664int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
556 BN_CTX *ctx) 665 BN_CTX *ctx)
557 { 666 {
558#if BN_BITS2 == 32
559 int i, top = a->top; 667 int i, top = a->top;
560 int carry = 0; 668 int carry = 0;
561 register BN_ULONG *r_d, *a_d = a->d; 669 register BN_ULONG *r_d, *a_d = a->d;
@@ -564,11 +672,18 @@ int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
564 c_d[BN_NIST_384_TOP], 672 c_d[BN_NIST_384_TOP],
565 *res; 673 *res;
566 size_t mask; 674 size_t mask;
675 union { bn_addsub_f f; size_t p; } u;
676 static const BIGNUM _bignum_nist_p_384_sqr = {
677 (BN_ULONG *)_nist_p_384_sqr,
678 sizeof(_nist_p_384_sqr)/sizeof(_nist_p_384_sqr[0]),
679 sizeof(_nist_p_384_sqr)/sizeof(_nist_p_384_sqr[0]),
680 0,BN_FLG_STATIC_DATA };
681
567 682
568 field = &_bignum_nist_p_384; /* just to make sure */ 683 field = &_bignum_nist_p_384; /* just to make sure */
569 684
570 if (BN_is_negative(a) || a->top > 2*BN_NIST_384_TOP) 685 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_384_sqr)>=0)
571 return BN_nnmod(r, field, a, ctx); 686 return BN_nnmod(r, a, field, ctx);
572 687
573 i = BN_ucmp(field, a); 688 i = BN_ucmp(field, a);
574 if (i == 0) 689 if (i == 0)
@@ -606,171 +721,116 @@ int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
606 } 721 }
607 *ap=c; 722 *ap=c;
608 } 723 }
609 carry = bn_add_words(r_d+(128/BN_BITS2), r_d+(128/BN_BITS2), 724 carry = (int)bn_add_words(r_d+(128/BN_BITS2), r_d+(128/BN_BITS2),
610 t_d, BN_NIST_256_TOP); 725 t_d, BN_NIST_256_TOP);
611 /*
612 * we need if (result>=modulus) subtract(result,modulus);
613 * in n-bit space this can be expressed as
614 * if (carry || result>=modulus) subtract(result,modulus);
615 * the catch is that comparison implies subtraction and
616 * therefore one can write tmp=subtract(result,modulus);
617 * and then if(carry || !borrow) result=tmp; this's what
618 * happens below, but without explicit if:-) a.
619 */
620 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
621 mask = ~mask | (0-(size_t)carry);
622 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
623
624 /*S2 */ 726 /*S2 */
625 carry = bn_add_words(r_d, res, buf, BN_NIST_384_TOP); 727 carry += (int)bn_add_words(r_d, r_d, buf, BN_NIST_384_TOP);
626 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
627 mask = ~mask | (0-(size_t)carry);
628 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
629
630 /*S3*/ 728 /*S3*/
631 nist_set_384(t_d,buf,20,19,18,17,16,15,14,13,12,23,22,21); 729 nist_set_384(t_d,buf,20,19,18,17,16,15,14,13,12,23,22,21);
632 carry = bn_add_words(r_d, res, t_d, BN_NIST_384_TOP); 730 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
633 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
634 mask = ~mask | (0-(size_t)carry);
635 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
636
637 /*S4*/ 731 /*S4*/
638 nist_set_384(t_d,buf,19,18,17,16,15,14,13,12,20,0,23,0); 732 nist_set_384(t_d,buf,19,18,17,16,15,14,13,12,20,0,23,0);
639 carry = bn_add_words(r_d, res, t_d, BN_NIST_384_TOP); 733 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
640 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
641 mask = ~mask | (0-(size_t)carry);
642 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
643
644 /*S5*/ 734 /*S5*/
645 nist_set_384(t_d, buf,0,0,0,0,23,22,21,20,0,0,0,0); 735 nist_set_384(t_d, buf,0,0,0,0,23,22,21,20,0,0,0,0);
646 carry = bn_add_words(r_d, res, t_d, BN_NIST_384_TOP); 736 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
647 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
648 mask = ~mask | (0-(size_t)carry);
649 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
650
651 /*S6*/ 737 /*S6*/
652 nist_set_384(t_d,buf,0,0,0,0,0,0,23,22,21,0,0,20); 738 nist_set_384(t_d,buf,0,0,0,0,0,0,23,22,21,0,0,20);
653 carry = bn_add_words(r_d, res, t_d, BN_NIST_384_TOP); 739 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
654 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
655 mask = ~mask | (0-(size_t)carry);
656 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
657
658 /*D1*/ 740 /*D1*/
659 nist_set_384(t_d,buf,22,21,20,19,18,17,16,15,14,13,12,23); 741 nist_set_384(t_d,buf,22,21,20,19,18,17,16,15,14,13,12,23);
660#if BRANCH_FREE 742 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
661 carry = bn_sub_words(r_d, res, t_d, BN_NIST_384_TOP);
662 bn_add_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
663 mask = 0-(size_t)carry;
664 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
665#else
666 if (bn_sub_words(r_d, res, t_d, BN_NIST_384_TOP))
667 bn_add_words(r_d,r_d,_nist_p_384,BN_NIST_384_TOP);
668#endif
669 /*D2*/ 743 /*D2*/
670 nist_set_384(t_d,buf,0,0,0,0,0,0,0,23,22,21,20,0); 744 nist_set_384(t_d,buf,0,0,0,0,0,0,0,23,22,21,20,0);
671#if BRANCH_FREE 745 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
672 carry = bn_sub_words(r_d, res, t_d, BN_NIST_384_TOP);
673 bn_add_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
674 mask = 0-(size_t)carry;
675 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
676#else
677 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP))
678 bn_add_words(r_d,r_d,_nist_p_384,BN_NIST_384_TOP);
679#endif
680 /*D3*/ 746 /*D3*/
681 nist_set_384(t_d,buf,0,0,0,0,0,0,0,23,23,0,0,0); 747 nist_set_384(t_d,buf,0,0,0,0,0,0,0,23,23,0,0,0);
682#if BRANCH_FREE 748 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
683 carry = bn_sub_words(r_d, res, t_d, BN_NIST_384_TOP);
684 bn_add_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
685 mask = 0-(size_t)carry;
686 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
687 749
750 /* see BN_nist_mod_224 for explanation */
751 u.f = bn_sub_words;
752 if (carry > 0)
753 carry = (int)bn_sub_words(r_d,r_d,_nist_p_384[carry-1],BN_NIST_384_TOP);
754 else if (carry < 0)
755 {
756 carry = (int)bn_add_words(r_d,r_d,_nist_p_384[-carry-1],BN_NIST_384_TOP);
757 mask = 0-(size_t)carry;
758 u.p = ((size_t)bn_sub_words&mask) | ((size_t)bn_add_words&~mask);
759 }
760 else
761 carry = 1;
762
763 mask = 0-(size_t)(*u.f)(c_d,r_d,_nist_p_384[0],BN_NIST_384_TOP);
764 mask &= 0-(size_t)carry;
765 res = (BN_ULONG *)(((size_t)c_d&~mask) | ((size_t)r_d&mask));
688 nist_cp_bn(r_d, res, BN_NIST_384_TOP); 766 nist_cp_bn(r_d, res, BN_NIST_384_TOP);
689#else
690 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP))
691 bn_add_words(r_d,r_d,_nist_p_384,BN_NIST_384_TOP);
692#endif
693 r->top = BN_NIST_384_TOP; 767 r->top = BN_NIST_384_TOP;
694 bn_correct_top(r); 768 bn_correct_top(r);
695 769
696 if (BN_ucmp(field, r) <= 0)
697 {
698 if (!BN_usub(r, r, field)) return 0;
699 }
700
701 return 1; 770 return 1;
702#else /* BN_BITS!=32 */
703 return 0;
704#endif
705 } 771 }
706 772
773#define BN_NIST_521_RSHIFT (521%BN_BITS2)
774#define BN_NIST_521_LSHIFT (BN_BITS2-BN_NIST_521_RSHIFT)
775#define BN_NIST_521_TOP_MASK ((BN_ULONG)BN_MASK2>>BN_NIST_521_LSHIFT)
776
707int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 777int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
708 BN_CTX *ctx) 778 BN_CTX *ctx)
709 { 779 {
710#if BN_BITS2 == 64 780 int top = a->top, i;
711#define BN_NIST_521_TOP_MASK (BN_ULONG)0x1FF 781 BN_ULONG *r_d, *a_d = a->d,
712#elif BN_BITS2 == 32 782 t_d[BN_NIST_521_TOP],
713#define BN_NIST_521_TOP_MASK (BN_ULONG)0x1FF 783 val,tmp,*res;
714#endif 784 size_t mask;
715 int top, ret = 0; 785 static const BIGNUM _bignum_nist_p_521_sqr = {
716 BIGNUM *tmp; 786 (BN_ULONG *)_nist_p_521_sqr,
787 sizeof(_nist_p_521_sqr)/sizeof(_nist_p_521_sqr[0]),
788 sizeof(_nist_p_521_sqr)/sizeof(_nist_p_521_sqr[0]),
789 0,BN_FLG_STATIC_DATA };
717 790
718 field = &_bignum_nist_p_521; /* just to make sure */ 791 field = &_bignum_nist_p_521; /* just to make sure */
719 792
720 if (BN_is_negative(a)) 793 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_521_sqr)>=0)
721 return BN_nnmod(r, field, a, ctx); 794 return BN_nnmod(r, a, field, ctx);
722 795
723 /* check whether a reduction is necessary */ 796 i = BN_ucmp(field, a);
724 top = a->top; 797 if (i == 0)
725 if (top < BN_NIST_521_TOP || ( top == BN_NIST_521_TOP &&
726 (!(a->d[BN_NIST_521_TOP-1] & ~(BN_NIST_521_TOP_MASK)))))
727 { 798 {
728 int i = BN_ucmp(field, a); 799 BN_zero(r);
729 if (i == 0) 800 return 1;
730 {
731 BN_zero(r);
732 return 1;
733 }
734 else
735 {
736#ifdef BN_DEBUG
737 OPENSSL_assert(i > 0); /* because 'field' is 1111...1111 */
738#endif
739 return (r == a)? 1 : (BN_copy(r ,a) != NULL);
740 }
741 } 801 }
802 else if (i > 0)
803 return (r == a)? 1 : (BN_copy(r ,a) != NULL);
742 804
743 if (BN_num_bits(a) > 2*521) 805 if (r != a)
744 return BN_nnmod(r, field, a, ctx);
745
746 BN_CTX_start(ctx);
747 tmp = BN_CTX_get(ctx);
748 if (!tmp)
749 goto err;
750
751 if (!bn_wexpand(tmp, BN_NIST_521_TOP))
752 goto err;
753 nist_cp_bn(tmp->d, a->d, BN_NIST_521_TOP);
754
755 tmp->top = BN_NIST_521_TOP;
756 tmp->d[BN_NIST_521_TOP-1] &= BN_NIST_521_TOP_MASK;
757 bn_correct_top(tmp);
758
759 if (!BN_rshift(r, a, 521))
760 goto err;
761
762 if (!BN_uadd(r, tmp, r))
763 goto err;
764
765 if (BN_ucmp(field, r) <= 0)
766 { 806 {
767 if (!BN_usub(r, r, field)) goto err; 807 if (!bn_wexpand(r,BN_NIST_521_TOP))
808 return 0;
809 r_d = r->d;
810 nist_cp_bn(r_d,a_d, BN_NIST_521_TOP);
768 } 811 }
812 else
813 r_d = a_d;
769 814
770 ret = 1; 815 /* upper 521 bits, copy ... */
771err: 816 nist_cp_bn_0(t_d,a_d + (BN_NIST_521_TOP-1), top - (BN_NIST_521_TOP-1),BN_NIST_521_TOP);
772 BN_CTX_end(ctx); 817 /* ... and right shift */
818 for (val=t_d[0],i=0; i<BN_NIST_521_TOP-1; i++)
819 {
820 tmp = val>>BN_NIST_521_RSHIFT;
821 val = t_d[i+1];
822 t_d[i] = (tmp | val<<BN_NIST_521_LSHIFT) & BN_MASK2;
823 }
824 t_d[i] = val>>BN_NIST_521_RSHIFT;
825 /* lower 521 bits */
826 r_d[i] &= BN_NIST_521_TOP_MASK;
827
828 bn_add_words(r_d,r_d,t_d,BN_NIST_521_TOP);
829 mask = 0-(size_t)bn_sub_words(t_d,r_d,_nist_p_521,BN_NIST_521_TOP);
830 res = (BN_ULONG *)(((size_t)t_d&~mask) | ((size_t)r_d&mask));
831 nist_cp_bn(r_d,res,BN_NIST_521_TOP);
832 r->top = BN_NIST_521_TOP;
833 bn_correct_top(r);
773 834
774 bn_check_top(r); 835 return 1;
775 return ret;
776 } 836 }
diff --git a/src/lib/libcrypto/bn/bn_rand.c b/src/lib/libcrypto/bn/bn_rand.c
index f51830b12b..b376c28ff3 100644
--- a/src/lib/libcrypto/bn/bn_rand.c
+++ b/src/lib/libcrypto/bn/bn_rand.c
@@ -227,7 +227,7 @@ int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
227 227
228 228
229/* random number r: 0 <= r < range */ 229/* random number r: 0 <= r < range */
230static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) 230static int bn_rand_range(int pseudo, BIGNUM *r, const BIGNUM *range)
231 { 231 {
232 int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand; 232 int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand;
233 int n; 233 int n;
@@ -294,12 +294,12 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range)
294 } 294 }
295 295
296 296
297int BN_rand_range(BIGNUM *r, BIGNUM *range) 297int BN_rand_range(BIGNUM *r, const BIGNUM *range)
298 { 298 {
299 return bn_rand_range(0, r, range); 299 return bn_rand_range(0, r, range);
300 } 300 }
301 301
302int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range) 302int BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range)
303 { 303 {
304 return bn_rand_range(1, r, range); 304 return bn_rand_range(1, r, range);
305 } 305 }
diff --git a/src/lib/libcrypto/bn/bn_shift.c b/src/lib/libcrypto/bn/bn_shift.c
index de9312dce2..c4d301afc4 100644
--- a/src/lib/libcrypto/bn/bn_shift.c
+++ b/src/lib/libcrypto/bn/bn_shift.c
@@ -177,7 +177,7 @@ int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
177 nw=n/BN_BITS2; 177 nw=n/BN_BITS2;
178 rb=n%BN_BITS2; 178 rb=n%BN_BITS2;
179 lb=BN_BITS2-rb; 179 lb=BN_BITS2-rb;
180 if (nw > a->top || a->top == 0) 180 if (nw >= a->top || a->top == 0)
181 { 181 {
182 BN_zero(r); 182 BN_zero(r);
183 return(1); 183 return(1);
diff --git a/src/lib/libcrypto/buffer/buffer.c b/src/lib/libcrypto/buffer/buffer.c
index 3bf03c7eff..b3e947771d 100644
--- a/src/lib/libcrypto/buffer/buffer.c
+++ b/src/lib/libcrypto/buffer/buffer.c
@@ -161,61 +161,3 @@ int BUF_MEM_grow_clean(BUF_MEM *str, int len)
161 } 161 }
162 return(len); 162 return(len);
163 } 163 }
164
165char *BUF_strdup(const char *str)
166 {
167 if (str == NULL) return(NULL);
168 return BUF_strndup(str, strlen(str));
169 }
170
171char *BUF_strndup(const char *str, size_t siz)
172 {
173 char *ret;
174
175 if (str == NULL) return(NULL);
176
177 ret=OPENSSL_malloc(siz+1);
178 if (ret == NULL)
179 {
180 BUFerr(BUF_F_BUF_STRNDUP,ERR_R_MALLOC_FAILURE);
181 return(NULL);
182 }
183 BUF_strlcpy(ret,str,siz+1);
184 return(ret);
185 }
186
187void *BUF_memdup(const void *data, size_t siz)
188 {
189 void *ret;
190
191 if (data == NULL) return(NULL);
192
193 ret=OPENSSL_malloc(siz);
194 if (ret == NULL)
195 {
196 BUFerr(BUF_F_BUF_MEMDUP,ERR_R_MALLOC_FAILURE);
197 return(NULL);
198 }
199 return memcpy(ret, data, siz);
200 }
201
202size_t BUF_strlcpy(char *dst, const char *src, size_t size)
203 {
204 size_t l = 0;
205 for(; size > 1 && *src; size--)
206 {
207 *dst++ = *src++;
208 l++;
209 }
210 if (size)
211 *dst = '\0';
212 return l + strlen(src);
213 }
214
215size_t BUF_strlcat(char *dst, const char *src, size_t size)
216 {
217 size_t l = 0;
218 for(; size > 0 && *dst; size--, dst++)
219 l++;
220 return l + BUF_strlcpy(dst, src, size);
221 }
diff --git a/src/lib/libcrypto/cast/c_skey.c b/src/lib/libcrypto/cast/c_skey.c
index 76e40005c9..68e690a60c 100644
--- a/src/lib/libcrypto/cast/c_skey.c
+++ b/src/lib/libcrypto/cast/c_skey.c
@@ -57,6 +57,11 @@
57 */ 57 */
58 58
59#include <openssl/cast.h> 59#include <openssl/cast.h>
60#include <openssl/crypto.h>
61#ifdef OPENSSL_FIPS
62#include <openssl/fips.h>
63#endif
64
60#include "cast_lcl.h" 65#include "cast_lcl.h"
61#include "cast_s.h" 66#include "cast_s.h"
62 67
@@ -72,7 +77,7 @@
72#define S6 CAST_S_table6 77#define S6 CAST_S_table6
73#define S7 CAST_S_table7 78#define S7 CAST_S_table7
74 79
75void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data) 80FIPS_NON_FIPS_VCIPHER_Init(CAST)
76 { 81 {
77 CAST_LONG x[16]; 82 CAST_LONG x[16];
78 CAST_LONG z[16]; 83 CAST_LONG z[16];
diff --git a/src/lib/libcrypto/cast/cast.h b/src/lib/libcrypto/cast/cast.h
index 90b45b950a..1faf5806aa 100644
--- a/src/lib/libcrypto/cast/cast.h
+++ b/src/lib/libcrypto/cast/cast.h
@@ -83,7 +83,9 @@ typedef struct cast_key_st
83 int short_key; /* Use reduced rounds for short key */ 83 int short_key; /* Use reduced rounds for short key */
84 } CAST_KEY; 84 } CAST_KEY;
85 85
86 86#ifdef OPENSSL_FIPS
87void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
88#endif
87void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 89void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
88void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key, 90void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key,
89 int enc); 91 int enc);
diff --git a/src/lib/libcrypto/cms/cms_smime.c b/src/lib/libcrypto/cms/cms_smime.c
index b35d28d411..b9463f9abb 100644
--- a/src/lib/libcrypto/cms/cms_smime.c
+++ b/src/lib/libcrypto/cms/cms_smime.c
@@ -68,7 +68,10 @@ static int cms_copy_content(BIO *out, BIO *in, unsigned int flags)
68 if (out == NULL) 68 if (out == NULL)
69 tmpout = BIO_new(BIO_s_null()); 69 tmpout = BIO_new(BIO_s_null());
70 else if (flags & CMS_TEXT) 70 else if (flags & CMS_TEXT)
71 {
71 tmpout = BIO_new(BIO_s_mem()); 72 tmpout = BIO_new(BIO_s_mem());
73 BIO_set_mem_eof_return(tmpout, 0);
74 }
72 else 75 else
73 tmpout = out; 76 tmpout = out;
74 77
diff --git a/src/lib/libcrypto/comp/c_zlib.c b/src/lib/libcrypto/comp/c_zlib.c
index 0f34597e70..eccfd09137 100644
--- a/src/lib/libcrypto/comp/c_zlib.c
+++ b/src/lib/libcrypto/comp/c_zlib.c
@@ -727,6 +727,7 @@ static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr)
727 case BIO_CTRL_RESET: 727 case BIO_CTRL_RESET:
728 ctx->ocount = 0; 728 ctx->ocount = 0;
729 ctx->odone = 0; 729 ctx->odone = 0;
730 ret = 1;
730 break; 731 break;
731 732
732 case BIO_CTRL_FLUSH: 733 case BIO_CTRL_FLUSH:
@@ -771,7 +772,7 @@ static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr)
771 } 772 }
772 ctx->obufsize = obs; 773 ctx->obufsize = obs;
773 } 774 }
774 775 ret = 1;
775 break; 776 break;
776 777
777 case BIO_C_DO_STATE_MACHINE: 778 case BIO_C_DO_STATE_MACHINE:
@@ -783,7 +784,6 @@ static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr)
783 default: 784 default:
784 ret = BIO_ctrl(b->next_bio, cmd, num, ptr); 785 ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
785 break; 786 break;
786
787 } 787 }
788 788
789 return ret; 789 return ret;
diff --git a/src/lib/libcrypto/conf/conf_mall.c b/src/lib/libcrypto/conf/conf_mall.c
index 4ba40cf44c..1cc1fd5534 100644
--- a/src/lib/libcrypto/conf/conf_mall.c
+++ b/src/lib/libcrypto/conf/conf_mall.c
@@ -1,5 +1,5 @@
1/* conf_mall.c */ 1/* conf_mall.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -63,6 +63,7 @@
63#include <openssl/dso.h> 63#include <openssl/dso.h>
64#include <openssl/x509.h> 64#include <openssl/x509.h>
65#include <openssl/asn1.h> 65#include <openssl/asn1.h>
66#include <openssl/evp.h>
66#ifndef OPENSSL_NO_ENGINE 67#ifndef OPENSSL_NO_ENGINE
67#include <openssl/engine.h> 68#include <openssl/engine.h>
68#endif 69#endif
@@ -76,5 +77,6 @@ void OPENSSL_load_builtin_modules(void)
76#ifndef OPENSSL_NO_ENGINE 77#ifndef OPENSSL_NO_ENGINE
77 ENGINE_add_conf_module(); 78 ENGINE_add_conf_module();
78#endif 79#endif
80 EVP_add_alg_module();
79 } 81 }
80 82
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c
index 58b23ba992..e286378cb1 100644
--- a/src/lib/libcrypto/conf/conf_mod.c
+++ b/src/lib/libcrypto/conf/conf_mod.c
@@ -1,5 +1,5 @@
1/* conf_mod.c */ 1/* conf_mod.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/conf/conf_sap.c b/src/lib/libcrypto/conf/conf_sap.c
index 9c53bac1a8..760dc2632d 100644
--- a/src/lib/libcrypto/conf/conf_sap.c
+++ b/src/lib/libcrypto/conf/conf_sap.c
@@ -1,5 +1,5 @@
1/* conf_sap.c */ 1/* conf_sap.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c
index 8c68623828..8f9e88e403 100644
--- a/src/lib/libcrypto/cryptlib.c
+++ b/src/lib/libcrypto/cryptlib.c
@@ -121,275 +121,17 @@
121static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */ 121static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */
122#endif 122#endif
123 123
124DECLARE_STACK_OF(CRYPTO_dynlock)
125IMPLEMENT_STACK_OF(CRYPTO_dynlock)
126
127/* real #defines in crypto.h, keep these upto date */
128static const char* const lock_names[CRYPTO_NUM_LOCKS] =
129 {
130 "<<ERROR>>",
131 "err",
132 "ex_data",
133 "x509",
134 "x509_info",
135 "x509_pkey",
136 "x509_crl",
137 "x509_req",
138 "dsa",
139 "rsa",
140 "evp_pkey",
141 "x509_store",
142 "ssl_ctx",
143 "ssl_cert",
144 "ssl_session",
145 "ssl_sess_cert",
146 "ssl",
147 "ssl_method",
148 "rand",
149 "rand2",
150 "debug_malloc",
151 "BIO",
152 "gethostbyname",
153 "getservbyname",
154 "readdir",
155 "RSA_blinding",
156 "dh",
157 "debug_malloc2",
158 "dso",
159 "dynlock",
160 "engine",
161 "ui",
162 "ecdsa",
163 "ec",
164 "ecdh",
165 "bn",
166 "ec_pre_comp",
167 "store",
168 "comp",
169#if CRYPTO_NUM_LOCKS != 39
170# error "Inconsistency between crypto.h and cryptlib.c"
171#endif
172 };
173
174/* This is for applications to allocate new type names in the non-dynamic
175 array of lock names. These are numbered with positive numbers. */
176static STACK *app_locks=NULL;
177
178/* For applications that want a more dynamic way of handling threads, the
179 following stack is used. These are externally numbered with negative
180 numbers. */
181static STACK_OF(CRYPTO_dynlock) *dyn_locks=NULL;
182
183
184static void (MS_FAR *locking_callback)(int mode,int type, 124static void (MS_FAR *locking_callback)(int mode,int type,
185 const char *file,int line)=NULL; 125 const char *file,int line)=NULL;
186static int (MS_FAR *add_lock_callback)(int *pointer,int amount, 126static int (MS_FAR *add_lock_callback)(int *pointer,int amount,
187 int type,const char *file,int line)=NULL; 127 int type,const char *file,int line)=NULL;
188static unsigned long (MS_FAR *id_callback)(void)=NULL; 128static unsigned long (MS_FAR *id_callback)(void)=NULL;
189static struct CRYPTO_dynlock_value *(MS_FAR *dynlock_create_callback)
190 (const char *file,int line)=NULL;
191static void (MS_FAR *dynlock_lock_callback)(int mode,
192 struct CRYPTO_dynlock_value *l, const char *file,int line)=NULL;
193static void (MS_FAR *dynlock_destroy_callback)(struct CRYPTO_dynlock_value *l,
194 const char *file,int line)=NULL;
195
196int CRYPTO_get_new_lockid(char *name)
197 {
198 char *str;
199 int i;
200
201#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
202 /* A hack to make Visual C++ 5.0 work correctly when linking as
203 * a DLL using /MT. Without this, the application cannot use
204 * and floating point printf's.
205 * It also seems to be needed for Visual C 1.5 (win16) */
206 SSLeay_MSVC5_hack=(double)name[0]*(double)name[1];
207#endif
208
209 if ((app_locks == NULL) && ((app_locks=sk_new_null()) == NULL))
210 {
211 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE);
212 return(0);
213 }
214 if ((str=BUF_strdup(name)) == NULL)
215 {
216 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE);
217 return(0);
218 }
219 i=sk_push(app_locks,str);
220 if (!i)
221 OPENSSL_free(str);
222 else
223 i+=CRYPTO_NUM_LOCKS; /* gap of one :-) */
224 return(i);
225 }
226 129
227int CRYPTO_num_locks(void) 130int CRYPTO_num_locks(void)
228 { 131 {
229 return CRYPTO_NUM_LOCKS; 132 return CRYPTO_NUM_LOCKS;
230 } 133 }
231 134
232int CRYPTO_get_new_dynlockid(void)
233 {
234 int i = 0;
235 CRYPTO_dynlock *pointer = NULL;
236
237 if (dynlock_create_callback == NULL)
238 {
239 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK);
240 return(0);
241 }
242 CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK);
243 if ((dyn_locks == NULL)
244 && ((dyn_locks=sk_CRYPTO_dynlock_new_null()) == NULL))
245 {
246 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
247 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,ERR_R_MALLOC_FAILURE);
248 return(0);
249 }
250 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
251
252 pointer = (CRYPTO_dynlock *)OPENSSL_malloc(sizeof(CRYPTO_dynlock));
253 if (pointer == NULL)
254 {
255 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,ERR_R_MALLOC_FAILURE);
256 return(0);
257 }
258 pointer->references = 1;
259 pointer->data = dynlock_create_callback(__FILE__,__LINE__);
260 if (pointer->data == NULL)
261 {
262 OPENSSL_free(pointer);
263 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,ERR_R_MALLOC_FAILURE);
264 return(0);
265 }
266
267 CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK);
268 /* First, try to find an existing empty slot */
269 i=sk_CRYPTO_dynlock_find(dyn_locks,NULL);
270 /* If there was none, push, thereby creating a new one */
271 if (i == -1)
272 /* Since sk_push() returns the number of items on the
273 stack, not the location of the pushed item, we need
274 to transform the returned number into a position,
275 by decreasing it. */
276 i=sk_CRYPTO_dynlock_push(dyn_locks,pointer) - 1;
277 else
278 /* If we found a place with a NULL pointer, put our pointer
279 in it. */
280 (void)sk_CRYPTO_dynlock_set(dyn_locks,i,pointer);
281 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
282
283 if (i == -1)
284 {
285 dynlock_destroy_callback(pointer->data,__FILE__,__LINE__);
286 OPENSSL_free(pointer);
287 }
288 else
289 i += 1; /* to avoid 0 */
290 return -i;
291 }
292
293void CRYPTO_destroy_dynlockid(int i)
294 {
295 CRYPTO_dynlock *pointer = NULL;
296 if (i)
297 i = -i-1;
298 if (dynlock_destroy_callback == NULL)
299 return;
300
301 CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK);
302
303 if (dyn_locks == NULL || i >= sk_CRYPTO_dynlock_num(dyn_locks))
304 {
305 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
306 return;
307 }
308 pointer = sk_CRYPTO_dynlock_value(dyn_locks, i);
309 if (pointer != NULL)
310 {
311 --pointer->references;
312#ifdef REF_CHECK
313 if (pointer->references < 0)
314 {
315 fprintf(stderr,"CRYPTO_destroy_dynlockid, bad reference count\n");
316 abort();
317 }
318 else
319#endif
320 if (pointer->references <= 0)
321 {
322 (void)sk_CRYPTO_dynlock_set(dyn_locks, i, NULL);
323 }
324 else
325 pointer = NULL;
326 }
327 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
328
329 if (pointer)
330 {
331 dynlock_destroy_callback(pointer->data,__FILE__,__LINE__);
332 OPENSSL_free(pointer);
333 }
334 }
335
336struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i)
337 {
338 CRYPTO_dynlock *pointer = NULL;
339 if (i)
340 i = -i-1;
341
342 CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK);
343
344 if (dyn_locks != NULL && i < sk_CRYPTO_dynlock_num(dyn_locks))
345 pointer = sk_CRYPTO_dynlock_value(dyn_locks, i);
346 if (pointer)
347 pointer->references++;
348
349 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
350
351 if (pointer)
352 return pointer->data;
353 return NULL;
354 }
355
356struct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void))
357 (const char *file,int line)
358 {
359 return(dynlock_create_callback);
360 }
361
362void (*CRYPTO_get_dynlock_lock_callback(void))(int mode,
363 struct CRYPTO_dynlock_value *l, const char *file,int line)
364 {
365 return(dynlock_lock_callback);
366 }
367
368void (*CRYPTO_get_dynlock_destroy_callback(void))
369 (struct CRYPTO_dynlock_value *l, const char *file,int line)
370 {
371 return(dynlock_destroy_callback);
372 }
373
374void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(*func)
375 (const char *file, int line))
376 {
377 dynlock_create_callback=func;
378 }
379
380void CRYPTO_set_dynlock_lock_callback(void (*func)(int mode,
381 struct CRYPTO_dynlock_value *l, const char *file, int line))
382 {
383 dynlock_lock_callback=func;
384 }
385
386void CRYPTO_set_dynlock_destroy_callback(void (*func)
387 (struct CRYPTO_dynlock_value *l, const char *file, int line))
388 {
389 dynlock_destroy_callback=func;
390 }
391
392
393void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file, 135void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file,
394 int line) 136 int line)
395 { 137 {
@@ -445,6 +187,14 @@ unsigned long CRYPTO_thread_id(void)
445 return(ret); 187 return(ret);
446 } 188 }
447 189
190static void (*do_dynlock_cb)(int mode, int type, const char *file, int line);
191
192void int_CRYPTO_set_do_dynlock_callback(
193 void (*dyn_cb)(int mode, int type, const char *file, int line))
194 {
195 do_dynlock_cb = dyn_cb;
196 }
197
448void CRYPTO_lock(int mode, int type, const char *file, int line) 198void CRYPTO_lock(int mode, int type, const char *file, int line)
449 { 199 {
450#ifdef LOCK_DEBUG 200#ifdef LOCK_DEBUG
@@ -472,17 +222,8 @@ void CRYPTO_lock(int mode, int type, const char *file, int line)
472#endif 222#endif
473 if (type < 0) 223 if (type < 0)
474 { 224 {
475 if (dynlock_lock_callback != NULL) 225 if (do_dynlock_cb)
476 { 226 do_dynlock_cb(mode, type, file, line);
477 struct CRYPTO_dynlock_value *pointer
478 = CRYPTO_get_dynlock_value(type);
479
480 OPENSSL_assert(pointer != NULL);
481
482 dynlock_lock_callback(mode, pointer, file, line);
483
484 CRYPTO_destroy_dynlockid(type);
485 }
486 } 227 }
487 else 228 else
488 if (locking_callback != NULL) 229 if (locking_callback != NULL)
@@ -527,21 +268,9 @@ int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
527 return(ret); 268 return(ret);
528 } 269 }
529 270
530const char *CRYPTO_get_lock_name(int type)
531 {
532 if (type < 0)
533 return("dynamic");
534 else if (type < CRYPTO_NUM_LOCKS)
535 return(lock_names[type]);
536 else if (type-CRYPTO_NUM_LOCKS > sk_num(app_locks))
537 return("ERROR");
538 else
539 return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS));
540 }
541
542#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \ 271#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
543 defined(__INTEL__) || \ 272 defined(__INTEL__) || \
544 defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) 273 defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
545 274
546unsigned long OPENSSL_ia32cap_P=0; 275unsigned long OPENSSL_ia32cap_P=0;
547unsigned long *OPENSSL_ia32cap_loc(void) { return &OPENSSL_ia32cap_P; } 276unsigned long *OPENSSL_ia32cap_loc(void) { return &OPENSSL_ia32cap_P; }
@@ -577,6 +306,62 @@ void OPENSSL_cpuid_setup(void) {}
577#endif 306#endif
578 307
579#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(_WINDLL) 308#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(_WINDLL)
309
310#ifdef OPENSSL_FIPS
311
312#include <tlhelp32.h>
313#if defined(__GNUC__) && __GNUC__>=2
314static int DllInit(void) __attribute__((constructor));
315#elif defined(_MSC_VER)
316static int DllInit(void);
317# ifdef _WIN64
318# pragma section(".CRT$XCU",read)
319 __declspec(allocate(".CRT$XCU"))
320# else
321# pragma data_seg(".CRT$XCU")
322# endif
323 static int (*p)(void) = DllInit;
324# pragma data_seg()
325#endif
326
327static int DllInit(void)
328{
329#if defined(_WIN32_WINNT)
330 union { int(*f)(void); BYTE *p; } t = { DllInit };
331 HANDLE hModuleSnap = INVALID_HANDLE_VALUE;
332 IMAGE_DOS_HEADER *dos_header;
333 IMAGE_NT_HEADERS *nt_headers;
334 MODULEENTRY32 me32 = {sizeof(me32)};
335
336 hModuleSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,0);
337 if (hModuleSnap != INVALID_HANDLE_VALUE &&
338 Module32First(hModuleSnap,&me32)) do
339 {
340 if (t.p >= me32.modBaseAddr &&
341 t.p < me32.modBaseAddr+me32.modBaseSize)
342 {
343 dos_header=(IMAGE_DOS_HEADER *)me32.modBaseAddr;
344 if (dos_header->e_magic==IMAGE_DOS_SIGNATURE)
345 {
346 nt_headers=(IMAGE_NT_HEADERS *)
347 ((BYTE *)dos_header+dos_header->e_lfanew);
348 if (nt_headers->Signature==IMAGE_NT_SIGNATURE &&
349 me32.modBaseAddr!=(BYTE*)nt_headers->OptionalHeader.ImageBase)
350 OPENSSL_NONPIC_relocated=1;
351 }
352 break;
353 }
354 } while (Module32Next(hModuleSnap,&me32));
355
356 if (hModuleSnap != INVALID_HANDLE_VALUE)
357 CloseHandle(hModuleSnap);
358#endif
359 OPENSSL_cpuid_setup();
360 return 0;
361}
362
363#else
364
580#ifdef __CYGWIN__ 365#ifdef __CYGWIN__
581/* pick DLL_[PROCESS|THREAD]_[ATTACH|DETACH] definitions */ 366/* pick DLL_[PROCESS|THREAD]_[ATTACH|DETACH] definitions */
582#include <windows.h> 367#include <windows.h>
@@ -620,6 +405,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
620 } 405 }
621#endif 406#endif
622 407
408#endif
409
623#if defined(_WIN32) && !defined(__CYGWIN__) 410#if defined(_WIN32) && !defined(__CYGWIN__)
624#include <tchar.h> 411#include <tchar.h>
625 412
diff --git a/src/lib/libcrypto/crypto-lib.com b/src/lib/libcrypto/crypto-lib.com
index 8898f30c1f..db9c882fb0 100644
--- a/src/lib/libcrypto/crypto-lib.com
+++ b/src/lib/libcrypto/crypto-lib.com
@@ -83,7 +83,7 @@ $ ENCRYPT_TYPES = "Basic,"+ -
83 "BUFFER,BIO,STACK,LHASH,RAND,ERR,"+ - 83 "BUFFER,BIO,STACK,LHASH,RAND,ERR,"+ -
84 "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ - 84 "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
85 "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ - 85 "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ -
86 "STORE,CMS,PQUEUE" 86 "STORE,CMS,PQUEUE,JPAKE"
87$! 87$!
88$! Check To Make Sure We Have Valid Command Line Parameters. 88$! Check To Make Sure We Have Valid Command Line Parameters.
89$! 89$!
@@ -161,7 +161,7 @@ $!
161$ APPS_DES = "DES/DES,CBC3_ENC" 161$ APPS_DES = "DES/DES,CBC3_ENC"
162$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE" 162$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE"
163$ 163$
164$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time,o_str,o_dir" 164$ LIB_ = "cryptlib,dyn_lck,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time,o_str,o_dir,o_init,fips_err"
165$ LIB_MD2 = "md2_dgst,md2_one" 165$ LIB_MD2 = "md2_dgst,md2_one"
166$ LIB_MD4 = "md4_dgst,md4_one" 166$ LIB_MD4 = "md4_dgst,md4_one"
167$ LIB_MD5 = "md5_dgst,md5_one" 167$ LIB_MD5 = "md5_dgst,md5_one"
@@ -197,9 +197,9 @@ $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ -
197 "ec2_smpl,ec2_mult" 197 "ec2_smpl,ec2_mult"
198$ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ - 198$ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ -
199 "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ - 199 "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ -
200 "rsa_pss,rsa_x931,rsa_asn1,rsa_depr" 200 "rsa_pss,rsa_x931,rsa_x931g,rsa_asn1,rsa_depr,rsa_eng"
201$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ - 201$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ -
202 "dsa_err,dsa_ossl,dsa_depr" 202 "dsa_err,dsa_ossl,dsa_depr,dsa_utl"
203$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err" 203$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err"
204$ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err,dh_depr" 204$ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err,dh_depr"
205$ LIB_ECDH = "ech_lib,ech_ossl,ech_key,ech_err" 205$ LIB_ECDH = "ech_lib,ech_ossl,ech_key,ech_err"
@@ -211,8 +211,8 @@ $ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ -
211 "tb_cipher,tb_digest,"+ - 211 "tb_cipher,tb_digest,"+ -
212 "eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,eng_padlock" 212 "eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,eng_padlock"
213$ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,"+ - 213$ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,"+ -
214 "aes_ctr,aes_ige,aes_wrap" 214 "aes_ctr,aes_ige"
215$ LIB_BUFFER = "buffer,buf_err" 215$ LIB_BUFFER = "buffer,buf_str,buf_err"
216$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ - 216$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
217 "bss_mem,bss_null,bss_fd,"+ - 217 "bss_mem,bss_null,bss_fd,"+ -
218 "bss_file,bss_sock,bss_conn,"+ - 218 "bss_file,bss_sock,bss_conn,"+ -
@@ -224,18 +224,19 @@ $ LIB_STACK = "stack"
224$ LIB_LHASH = "lhash,lh_stats" 224$ LIB_LHASH = "lhash,lh_stats"
225$ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ - 225$ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ -
226 "rand_vms" 226 "rand_vms"
227$ LIB_ERR = "err,err_all,err_prn" 227$ LIB_ERR = "err,err_def,err_all,err_prn,err_str,err_bio"
228$ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err" 228$ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err"
229$ LIB_EVP = "encode,digest,evp_enc,evp_key,evp_acnf,"+ - 229$ LIB_EVP = "encode,digest,dig_eng,evp_enc,evp_key,evp_acnf,evp_cnf,"+ -
230 "e_des,e_bf,e_idea,e_des3,e_camellia,e_seed,"+ - 230 "e_des,e_bf,e_idea,e_des3,e_camellia,"+ -
231 "e_rc4,e_aes,names,"+ - 231 "e_rc4,e_aes,names,e_seed,"+ -
232 "e_xcbc_d,e_rc2,e_cast,e_rc5" 232 "e_xcbc_d,e_rc2,e_cast,e_rc5,enc_min"
233$ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1," + - 233$ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1," + -
234 "m_dss,m_dss1,m_mdc2,m_ripemd,m_ecdsa,"+ - 234 "m_dss,m_dss1,m_mdc2,m_ripemd,m_ecdsa,"+ -
235 "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ - 235 "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ -
236 "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ - 236 "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ -
237 "c_all,c_allc,c_alld,evp_lib,bio_ok,"+- 237 "c_all,c_allc,c_alld,evp_lib,bio_ok,"+-
238 "evp_pkey,evp_pbe,p5_crpt,p5_crpt2" 238 "evp_pkey,evp_pbe,p5_crpt,p5_crpt2"
239$ LIB_EVP_3 = "e_old"
239$ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ - 240$ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ -
240 "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ - 241 "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ -
241 "a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ - 242 "a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ -
@@ -245,7 +246,7 @@ $ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ -
245$ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ - 246$ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ -
246 "tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ - 247 "tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ -
247 "f_int,f_string,n_pkey,"+ - 248 "f_int,f_string,n_pkey,"+ -
248 "f_enum,a_hdr,x_pkey,a_bool,x_exten,asn_mime,"+ - 249 "f_enum,a_hdr,x_pkey,a_bool,x_exten,"+ -
249 "asn1_gen,asn1_par,asn1_lib,asn1_err,a_meth,a_bytes,a_strnid,"+ - 250 "asn1_gen,asn1_par,asn1_lib,asn1_err,a_meth,a_bytes,a_strnid,"+ -
250 "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid" 251 "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid"
251$ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ - 252$ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ -
@@ -280,6 +281,7 @@ $ LIB_STORE = "str_err,str_lib,str_meth,str_mem"
280$ LIB_CMS = "cms_lib,cms_asn1,cms_att,cms_io,cms_smime,cms_err,"+ - 281$ LIB_CMS = "cms_lib,cms_asn1,cms_att,cms_io,cms_smime,cms_err,"+ -
281 "cms_sd,cms_dd,cms_cd,cms_env,cms_enc,cms_ess" 282 "cms_sd,cms_dd,cms_cd,cms_env,cms_enc,cms_ess"
282$ LIB_PQUEUE = "pqueue" 283$ LIB_PQUEUE = "pqueue"
284$ LIB_JPAKE = "jpake,jpake_err"
283$! 285$!
284$! Setup exceptional compilations 286$! Setup exceptional compilations
285$! 287$!
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index fe2c1d6403..0e4fb0723c 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -219,7 +219,13 @@ typedef struct openssl_item_st
219#define CRYPTO_LOCK_EC_PRE_COMP 36 219#define CRYPTO_LOCK_EC_PRE_COMP 36
220#define CRYPTO_LOCK_STORE 37 220#define CRYPTO_LOCK_STORE 37
221#define CRYPTO_LOCK_COMP 38 221#define CRYPTO_LOCK_COMP 38
222#ifndef OPENSSL_FIPS
222#define CRYPTO_NUM_LOCKS 39 223#define CRYPTO_NUM_LOCKS 39
224#else
225#define CRYPTO_LOCK_FIPS 39
226#define CRYPTO_LOCK_FIPS2 40
227#define CRYPTO_NUM_LOCKS 41
228#endif
223 229
224#define CRYPTO_LOCK 1 230#define CRYPTO_LOCK 1
225#define CRYPTO_UNLOCK 2 231#define CRYPTO_UNLOCK 2
@@ -341,14 +347,7 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
341 347
342/* Set standard debugging functions (not done by default 348/* Set standard debugging functions (not done by default
343 * unless CRYPTO_MDEBUG is defined) */ 349 * unless CRYPTO_MDEBUG is defined) */
344#define CRYPTO_malloc_debug_init() do {\ 350void CRYPTO_malloc_debug_init(void);
345 CRYPTO_set_mem_debug_functions(\
346 CRYPTO_dbg_malloc,\
347 CRYPTO_dbg_realloc,\
348 CRYPTO_dbg_free,\
349 CRYPTO_dbg_set_options,\
350 CRYPTO_dbg_get_options);\
351 } while(0)
352 351
353int CRYPTO_mem_ctrl(int mode); 352int CRYPTO_mem_ctrl(int mode);
354int CRYPTO_is_mem_check_on(void); 353int CRYPTO_is_mem_check_on(void);
@@ -363,6 +362,7 @@ int CRYPTO_is_mem_check_on(void);
363#define is_MemCheck_on() CRYPTO_is_mem_check_on() 362#define is_MemCheck_on() CRYPTO_is_mem_check_on()
364 363
365#define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__) 364#define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__)
365#define OPENSSL_strdup(str) CRYPTO_strdup((str),__FILE__,__LINE__)
366#define OPENSSL_realloc(addr,num) \ 366#define OPENSSL_realloc(addr,num) \
367 CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__) 367 CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)
368#define OPENSSL_realloc_clean(addr,old_num,num) \ 368#define OPENSSL_realloc_clean(addr,old_num,num) \
@@ -427,6 +427,9 @@ const char *CRYPTO_get_lock_name(int type);
427int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file, 427int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file,
428 int line); 428 int line);
429 429
430void int_CRYPTO_set_do_dynlock_callback(
431 void (*do_dynlock_cb)(int mode, int type, const char *file, int line));
432
430int CRYPTO_get_new_dynlockid(void); 433int CRYPTO_get_new_dynlockid(void);
431void CRYPTO_destroy_dynlockid(int i); 434void CRYPTO_destroy_dynlockid(int i);
432struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i); 435struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
@@ -451,6 +454,10 @@ int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
451 void (*f)(void *,int), 454 void (*f)(void *,int),
452 void (*so)(long), 455 void (*so)(long),
453 long (*go)(void)); 456 long (*go)(void));
457void CRYPTO_set_mem_info_functions(
458 int (*push_info_fn)(const char *info, const char *file, int line),
459 int (*pop_info_fn)(void),
460 int (*remove_all_info_fn)(void));
454void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *)); 461void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *));
455void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)); 462void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *));
456void CRYPTO_get_mem_ex_functions(void *(**m)(size_t,const char *,int), 463void CRYPTO_get_mem_ex_functions(void *(**m)(size_t,const char *,int),
@@ -467,6 +474,7 @@ void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int),
467void *CRYPTO_malloc_locked(int num, const char *file, int line); 474void *CRYPTO_malloc_locked(int num, const char *file, int line);
468void CRYPTO_free_locked(void *); 475void CRYPTO_free_locked(void *);
469void *CRYPTO_malloc(int num, const char *file, int line); 476void *CRYPTO_malloc(int num, const char *file, int line);
477char *CRYPTO_strdup(const char *str, const char *file, int line);
470void CRYPTO_free(void *); 478void CRYPTO_free(void *);
471void *CRYPTO_realloc(void *addr,int num, const char *file, int line); 479void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
472void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file, 480void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file,
@@ -506,6 +514,9 @@ void CRYPTO_dbg_free(void *addr,int before_p);
506void CRYPTO_dbg_set_options(long bits); 514void CRYPTO_dbg_set_options(long bits);
507long CRYPTO_dbg_get_options(void); 515long CRYPTO_dbg_get_options(void);
508 516
517int CRYPTO_dbg_push_info(const char *info, const char *file, int line);
518int CRYPTO_dbg_pop_info(void);
519int CRYPTO_dbg_remove_all_info(void);
509 520
510#ifndef OPENSSL_NO_FP_API 521#ifndef OPENSSL_NO_FP_API
511void CRYPTO_mem_leaks_fp(FILE *); 522void CRYPTO_mem_leaks_fp(FILE *);
@@ -523,12 +534,69 @@ unsigned long *OPENSSL_ia32cap_loc(void);
523#define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc())) 534#define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc()))
524int OPENSSL_isservice(void); 535int OPENSSL_isservice(void);
525 536
537#ifdef OPENSSL_FIPS
538#define FIPS_ERROR_IGNORED(alg) OpenSSLDie(__FILE__, __LINE__, \
539 alg " previous FIPS forbidden algorithm error ignored");
540
541#define FIPS_BAD_ABORT(alg) OpenSSLDie(__FILE__, __LINE__, \
542 #alg " Algorithm forbidden in FIPS mode");
543
544#ifdef OPENSSL_FIPS_STRICT
545#define FIPS_BAD_ALGORITHM(alg) FIPS_BAD_ABORT(alg)
546#else
547#define FIPS_BAD_ALGORITHM(alg) \
548 { \
549 FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_NON_FIPS_METHOD); \
550 ERR_add_error_data(2, "Algorithm=", #alg); \
551 return 0; \
552 }
553#endif
554
555/* Low level digest API blocking macro */
556
557#define FIPS_NON_FIPS_MD_Init(alg) \
558 int alg##_Init(alg##_CTX *c) \
559 { \
560 if (FIPS_mode()) \
561 FIPS_BAD_ALGORITHM(alg) \
562 return private_##alg##_Init(c); \
563 } \
564 int private_##alg##_Init(alg##_CTX *c)
565
566/* For ciphers the API often varies from cipher to cipher and each needs to
567 * be treated as a special case. Variable key length ciphers (Blowfish, RC4,
568 * CAST) however are very similar and can use a blocking macro.
569 */
570
571#define FIPS_NON_FIPS_VCIPHER_Init(alg) \
572 void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data) \
573 { \
574 if (FIPS_mode()) \
575 FIPS_BAD_ABORT(alg) \
576 private_##alg##_set_key(key, len, data); \
577 } \
578 void private_##alg##_set_key(alg##_KEY *key, int len, \
579 const unsigned char *data)
580
581#else
582
583#define FIPS_NON_FIPS_VCIPHER_Init(alg) \
584 void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data)
585
586#define FIPS_NON_FIPS_MD_Init(alg) \
587 int alg##_Init(alg##_CTX *c)
588
589#endif /* def OPENSSL_FIPS */
590
526/* BEGIN ERROR CODES */ 591/* BEGIN ERROR CODES */
527/* The following lines are auto generated by the script mkerr.pl. Any changes 592/* The following lines are auto generated by the script mkerr.pl. Any changes
528 * made after this point may be overwritten when the script is next run. 593 * made after this point may be overwritten when the script is next run.
529 */ 594 */
530void ERR_load_CRYPTO_strings(void); 595void ERR_load_CRYPTO_strings(void);
531 596
597#define OPENSSL_HAVE_INIT 1
598void OPENSSL_init(void);
599
532/* Error codes for the CRYPTO functions. */ 600/* Error codes for the CRYPTO functions. */
533 601
534/* Function codes. */ 602/* Function codes. */
diff --git a/src/lib/libcrypto/des/des_enc.c b/src/lib/libcrypto/des/des_enc.c
index 0fe4e0b2ad..22701e0669 100644
--- a/src/lib/libcrypto/des/des_enc.c
+++ b/src/lib/libcrypto/des/des_enc.c
@@ -293,6 +293,8 @@ void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
293 293
294#ifndef DES_DEFAULT_OPTIONS 294#ifndef DES_DEFAULT_OPTIONS
295 295
296#if !defined(OPENSSL_FIPS_DES_ASM)
297
296#undef CBC_ENC_C__DONT_UPDATE_IV 298#undef CBC_ENC_C__DONT_UPDATE_IV
297#include "ncbc_enc.c" /* DES_ncbc_encrypt */ 299#include "ncbc_enc.c" /* DES_ncbc_encrypt */
298 300
@@ -408,4 +410,6 @@ void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
408 tin[0]=tin[1]=0; 410 tin[0]=tin[1]=0;
409 } 411 }
410 412
413#endif
414
411#endif /* DES_DEFAULT_OPTIONS */ 415#endif /* DES_DEFAULT_OPTIONS */
diff --git a/src/lib/libcrypto/des/ecb_enc.c b/src/lib/libcrypto/des/ecb_enc.c
index 00d5b91e8c..75ae6cf8bb 100644
--- a/src/lib/libcrypto/des/ecb_enc.c
+++ b/src/lib/libcrypto/des/ecb_enc.c
@@ -57,54 +57,7 @@
57 */ 57 */
58 58
59#include "des_locl.h" 59#include "des_locl.h"
60#include "des_ver.h"
61#include "spr.h" 60#include "spr.h"
62#include <openssl/opensslv.h>
63#include <openssl/bio.h>
64
65OPENSSL_GLOBAL const char libdes_version[]="libdes" OPENSSL_VERSION_PTEXT;
66OPENSSL_GLOBAL const char DES_version[]="DES" OPENSSL_VERSION_PTEXT;
67
68const char *DES_options(void)
69 {
70 static int init=1;
71 static char buf[32];
72
73 if (init)
74 {
75 const char *ptr,*unroll,*risc,*size;
76
77#ifdef DES_PTR
78 ptr="ptr";
79#else
80 ptr="idx";
81#endif
82#if defined(DES_RISC1) || defined(DES_RISC2)
83#ifdef DES_RISC1
84 risc="risc1";
85#endif
86#ifdef DES_RISC2
87 risc="risc2";
88#endif
89#else
90 risc="cisc";
91#endif
92#ifdef DES_UNROLL
93 unroll="16";
94#else
95 unroll="4";
96#endif
97 if (sizeof(DES_LONG) != sizeof(long))
98 size="int";
99 else
100 size="long";
101 BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
102 size);
103 init=0;
104 }
105 return(buf);
106 }
107
108 61
109void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, 62void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
110 DES_key_schedule *ks, int enc) 63 DES_key_schedule *ks, int enc)
diff --git a/src/lib/libcrypto/des/enc_read.c b/src/lib/libcrypto/des/enc_read.c
index c70fb686b8..e7da2ec66b 100644
--- a/src/lib/libcrypto/des/enc_read.c
+++ b/src/lib/libcrypto/des/enc_read.c
@@ -147,7 +147,11 @@ int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
147 /* first - get the length */ 147 /* first - get the length */
148 while (net_num < HDRSIZE) 148 while (net_num < HDRSIZE)
149 { 149 {
150#ifndef _WIN32
150 i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num); 151 i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
152#else
153 i=_read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
154#endif
151#ifdef EINTR 155#ifdef EINTR
152 if ((i == -1) && (errno == EINTR)) continue; 156 if ((i == -1) && (errno == EINTR)) continue;
153#endif 157#endif
diff --git a/src/lib/libcrypto/des/enc_writ.c b/src/lib/libcrypto/des/enc_writ.c
index af5b8c2349..c2f032c9a6 100644
--- a/src/lib/libcrypto/des/enc_writ.c
+++ b/src/lib/libcrypto/des/enc_writ.c
@@ -153,7 +153,11 @@ int DES_enc_write(int fd, const void *_buf, int len,
153 { 153 {
154 /* eay 26/08/92 I was not doing writing from where we 154 /* eay 26/08/92 I was not doing writing from where we
155 * got up to. */ 155 * got up to. */
156#ifndef _WIN32
156 i=write(fd,(void *)&(outbuf[j]),outnum-j); 157 i=write(fd,(void *)&(outbuf[j]),outnum-j);
158#else
159 i=_write(fd,(void *)&(outbuf[j]),outnum-j);
160#endif
157 if (i == -1) 161 if (i == -1)
158 { 162 {
159#ifdef EINTR 163#ifdef EINTR
diff --git a/src/lib/libcrypto/des/set_key.c b/src/lib/libcrypto/des/set_key.c
index a43ef3c881..c0806d593c 100644
--- a/src/lib/libcrypto/des/set_key.c
+++ b/src/lib/libcrypto/des/set_key.c
@@ -64,6 +64,10 @@
64 * 1.0 First working version 64 * 1.0 First working version
65 */ 65 */
66#include "des_locl.h" 66#include "des_locl.h"
67#ifdef OPENSSL_FIPS
68#include <openssl/fips.h>
69#endif
70
67 71
68OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */ 72OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */
69 73
@@ -349,6 +353,10 @@ void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule)
349 k = &schedule->ks->deslong[0]; 353 k = &schedule->ks->deslong[0];
350 in = &(*key)[0]; 354 in = &(*key)[0];
351 355
356#ifdef OPENSSL_FIPS
357 FIPS_selftest_check();
358#endif
359
352 c2l(in,c); 360 c2l(in,c);
353 c2l(in,d); 361 c2l(in,d);
354 362
@@ -405,3 +413,4 @@ void des_fixup_key_parity(des_cblock *key)
405 des_set_odd_parity(key); 413 des_set_odd_parity(key);
406 } 414 }
407*/ 415*/
416
diff --git a/src/lib/libcrypto/dh/Makefile b/src/lib/libcrypto/dh/Makefile
index 950cad9c5b..d01fa960eb 100644
--- a/src/lib/libcrypto/dh/Makefile
+++ b/src/lib/libcrypto/dh/Makefile
@@ -33,7 +33,7 @@ top:
33all: lib 33all: lib
34 34
35lib: $(LIBOBJ) 35lib: $(LIBOBJ)
36 $(AR) $(LIB) $(LIBOBJ) 36 $(ARX) $(LIB) $(LIBOBJ)
37 $(RANLIB) $(LIB) || echo Never mind. 37 $(RANLIB) $(LIB) || echo Never mind.
38 @touch lib 38 @touch lib
39 39
@@ -129,11 +129,11 @@ dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
129dh_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 129dh_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
130dh_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 130dh_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
131dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h 131dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
132dh_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 132dh_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
133dh_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 133dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
134dh_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 134dh_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
135dh_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 135dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
136dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 136dh_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
137dh_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 137dh_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
138dh_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 138dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
139dh_lib.o: ../cryptlib.h dh_lib.c 139dh_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h dh_lib.c
diff --git a/src/lib/libcrypto/dh/dh.h b/src/lib/libcrypto/dh/dh.h
index 0afabc7dd3..0a39742773 100644
--- a/src/lib/libcrypto/dh/dh.h
+++ b/src/lib/libcrypto/dh/dh.h
@@ -77,6 +77,8 @@
77# define OPENSSL_DH_MAX_MODULUS_BITS 10000 77# define OPENSSL_DH_MAX_MODULUS_BITS 10000
78#endif 78#endif
79 79
80#define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024
81
80#define DH_FLAG_CACHE_MONT_P 0x01 82#define DH_FLAG_CACHE_MONT_P 0x01
81#define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH 83#define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH
82 * implementation now uses constant time 84 * implementation now uses constant time
@@ -167,6 +169,11 @@ struct dh_st
167 169
168const DH_METHOD *DH_OpenSSL(void); 170const DH_METHOD *DH_OpenSSL(void);
169 171
172#ifdef OPENSSL_FIPS
173DH * FIPS_dh_new(void);
174void FIPS_dh_free(DH *dh);
175#endif
176
170void DH_set_default_method(const DH_METHOD *meth); 177void DH_set_default_method(const DH_METHOD *meth);
171const DH_METHOD *DH_get_default_method(void); 178const DH_METHOD *DH_get_default_method(void);
172int DH_set_method(DH *dh, const DH_METHOD *meth); 179int DH_set_method(DH *dh, const DH_METHOD *meth);
@@ -218,6 +225,9 @@ void ERR_load_DH_strings(void);
218#define DH_F_DHPARAMS_PRINT 100 225#define DH_F_DHPARAMS_PRINT 100
219#define DH_F_DHPARAMS_PRINT_FP 101 226#define DH_F_DHPARAMS_PRINT_FP 101
220#define DH_F_DH_BUILTIN_GENPARAMS 106 227#define DH_F_DH_BUILTIN_GENPARAMS 106
228#define DH_F_DH_COMPUTE_KEY 107
229#define DH_F_DH_GENERATE_KEY 108
230#define DH_F_DH_GENERATE_PARAMETERS 109
221#define DH_F_DH_NEW_METHOD 105 231#define DH_F_DH_NEW_METHOD 105
222#define DH_F_GENERATE_KEY 103 232#define DH_F_GENERATE_KEY 103
223#define DH_F_GENERATE_PARAMETERS 104 233#define DH_F_GENERATE_PARAMETERS 104
@@ -225,6 +235,7 @@ void ERR_load_DH_strings(void);
225/* Reason codes. */ 235/* Reason codes. */
226#define DH_R_BAD_GENERATOR 101 236#define DH_R_BAD_GENERATOR 101
227#define DH_R_INVALID_PUBKEY 102 237#define DH_R_INVALID_PUBKEY 102
238#define DH_R_KEY_SIZE_TOO_SMALL 104
228#define DH_R_MODULUS_TOO_LARGE 103 239#define DH_R_MODULUS_TOO_LARGE 103
229#define DH_R_NO_PRIVATE_VALUE 100 240#define DH_R_NO_PRIVATE_VALUE 100
230#define DH_R_INVALID_PUBKEY 102 241#define DH_R_INVALID_PUBKEY 102
diff --git a/src/lib/libcrypto/dh/dh_asn1.c b/src/lib/libcrypto/dh/dh_asn1.c
index 769b5b68c5..76740af2bd 100644
--- a/src/lib/libcrypto/dh/dh_asn1.c
+++ b/src/lib/libcrypto/dh/dh_asn1.c
@@ -1,5 +1,5 @@
1/* dh_asn1.c */ 1/* dh_asn1.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/dh/dh_check.c b/src/lib/libcrypto/dh/dh_check.c
index b846913004..316cb9221d 100644
--- a/src/lib/libcrypto/dh/dh_check.c
+++ b/src/lib/libcrypto/dh/dh_check.c
@@ -70,6 +70,8 @@
70 * should hold. 70 * should hold.
71 */ 71 */
72 72
73#ifndef OPENSSL_FIPS
74
73int DH_check(const DH *dh, int *ret) 75int DH_check(const DH *dh, int *ret)
74 { 76 {
75 int ok=0; 77 int ok=0;
@@ -140,3 +142,5 @@ err:
140 if (q != NULL) BN_free(q); 142 if (q != NULL) BN_free(q);
141 return(ok); 143 return(ok);
142 } 144 }
145
146#endif
diff --git a/src/lib/libcrypto/dh/dh_err.c b/src/lib/libcrypto/dh/dh_err.c
index b2361c7389..b364362fca 100644
--- a/src/lib/libcrypto/dh/dh_err.c
+++ b/src/lib/libcrypto/dh/dh_err.c
@@ -1,6 +1,6 @@
1/* crypto/dh/dh_err.c */ 1/* crypto/dh/dh_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -74,6 +74,9 @@ static ERR_STRING_DATA DH_str_functs[]=
74{ERR_FUNC(DH_F_DHPARAMS_PRINT), "DHparams_print"}, 74{ERR_FUNC(DH_F_DHPARAMS_PRINT), "DHparams_print"},
75{ERR_FUNC(DH_F_DHPARAMS_PRINT_FP), "DHparams_print_fp"}, 75{ERR_FUNC(DH_F_DHPARAMS_PRINT_FP), "DHparams_print_fp"},
76{ERR_FUNC(DH_F_DH_BUILTIN_GENPARAMS), "DH_BUILTIN_GENPARAMS"}, 76{ERR_FUNC(DH_F_DH_BUILTIN_GENPARAMS), "DH_BUILTIN_GENPARAMS"},
77{ERR_FUNC(DH_F_DH_COMPUTE_KEY), "DH_compute_key"},
78{ERR_FUNC(DH_F_DH_GENERATE_KEY), "DH_generate_key"},
79{ERR_FUNC(DH_F_DH_GENERATE_PARAMETERS), "DH_generate_parameters"},
77{ERR_FUNC(DH_F_DH_NEW_METHOD), "DH_new_method"}, 80{ERR_FUNC(DH_F_DH_NEW_METHOD), "DH_new_method"},
78{ERR_FUNC(DH_F_GENERATE_KEY), "GENERATE_KEY"}, 81{ERR_FUNC(DH_F_GENERATE_KEY), "GENERATE_KEY"},
79{ERR_FUNC(DH_F_GENERATE_PARAMETERS), "GENERATE_PARAMETERS"}, 82{ERR_FUNC(DH_F_GENERATE_PARAMETERS), "GENERATE_PARAMETERS"},
@@ -84,6 +87,7 @@ static ERR_STRING_DATA DH_str_reasons[]=
84 { 87 {
85{ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"}, 88{ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"},
86{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"}, 89{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"},
90{ERR_REASON(DH_R_KEY_SIZE_TOO_SMALL) ,"key size too small"},
87{ERR_REASON(DH_R_MODULUS_TOO_LARGE) ,"modulus too large"}, 91{ERR_REASON(DH_R_MODULUS_TOO_LARGE) ,"modulus too large"},
88{ERR_REASON(DH_R_NO_PRIVATE_VALUE) ,"no private value"}, 92{ERR_REASON(DH_R_NO_PRIVATE_VALUE) ,"no private value"},
89{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"}, 93{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"},
diff --git a/src/lib/libcrypto/dh/dh_gen.c b/src/lib/libcrypto/dh/dh_gen.c
index cfd5b11868..999e1deb40 100644
--- a/src/lib/libcrypto/dh/dh_gen.c
+++ b/src/lib/libcrypto/dh/dh_gen.c
@@ -66,6 +66,8 @@
66#include <openssl/bn.h> 66#include <openssl/bn.h>
67#include <openssl/dh.h> 67#include <openssl/dh.h>
68 68
69#ifndef OPENSSL_FIPS
70
69static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB *cb); 71static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB *cb);
70 72
71int DH_generate_parameters_ex(DH *ret, int prime_len, int generator, BN_GENCB *cb) 73int DH_generate_parameters_ex(DH *ret, int prime_len, int generator, BN_GENCB *cb)
@@ -173,3 +175,5 @@ err:
173 } 175 }
174 return ok; 176 return ok;
175 } 177 }
178
179#endif
diff --git a/src/lib/libcrypto/dh/dh_key.c b/src/lib/libcrypto/dh/dh_key.c
index e7db440342..79dd331863 100644
--- a/src/lib/libcrypto/dh/dh_key.c
+++ b/src/lib/libcrypto/dh/dh_key.c
@@ -62,6 +62,8 @@
62#include <openssl/rand.h> 62#include <openssl/rand.h>
63#include <openssl/dh.h> 63#include <openssl/dh.h>
64 64
65#ifndef OPENSSL_FIPS
66
65static int generate_key(DH *dh); 67static int generate_key(DH *dh);
66static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 68static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
67static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, 69static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
@@ -261,3 +263,5 @@ static int dh_finish(DH *dh)
261 BN_MONT_CTX_free(dh->method_mont_p); 263 BN_MONT_CTX_free(dh->method_mont_p);
262 return(1); 264 return(1);
263 } 265 }
266
267#endif
diff --git a/src/lib/libcrypto/dsa/Makefile b/src/lib/libcrypto/dsa/Makefile
index 5493f19e85..2cc45cdc62 100644
--- a/src/lib/libcrypto/dsa/Makefile
+++ b/src/lib/libcrypto/dsa/Makefile
@@ -18,9 +18,9 @@ APPS=
18 18
19LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
20LIBSRC= dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c \ 20LIBSRC= dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c \
21 dsa_err.c dsa_ossl.c dsa_depr.c 21 dsa_err.c dsa_ossl.c dsa_depr.c dsa_utl.c
22LIBOBJ= dsa_gen.o dsa_key.o dsa_lib.o dsa_asn1.o dsa_vrf.o dsa_sign.o \ 22LIBOBJ= dsa_gen.o dsa_key.o dsa_lib.o dsa_asn1.o dsa_vrf.o dsa_sign.o \
23 dsa_err.o dsa_ossl.o dsa_depr.o 23 dsa_err.o dsa_ossl.o dsa_depr.o dsa_utl.o
24 24
25SRC= $(LIBSRC) 25SRC= $(LIBSRC)
26 26
@@ -35,7 +35,7 @@ top:
35all: lib 35all: lib
36 36
37lib: $(LIBOBJ) 37lib: $(LIBOBJ)
38 $(AR) $(LIB) $(LIBOBJ) 38 $(ARX) $(LIB) $(LIBOBJ)
39 $(RANLIB) $(LIB) || echo Never mind. 39 $(RANLIB) $(LIB) || echo Never mind.
40 @touch lib 40 @touch lib
41 41
@@ -78,9 +78,10 @@ clean:
78 78
79dsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h 79dsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
80dsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h 80dsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
81dsa_asn1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 81dsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
82dsa_asn1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 82dsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
83dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h 83dsa_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
84dsa_asn1.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
84dsa_asn1.o: ../../include/openssl/opensslconf.h 85dsa_asn1.o: ../../include/openssl/opensslconf.h
85dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 86dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
86dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 87dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
@@ -90,8 +91,9 @@ dsa_depr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
90dsa_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 91dsa_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
91dsa_depr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 92dsa_depr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
92dsa_depr.o: ../../include/openssl/err.h ../../include/openssl/evp.h 93dsa_depr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
93dsa_depr.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 94dsa_depr.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
94dsa_depr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 95dsa_depr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
96dsa_depr.o: ../../include/openssl/opensslconf.h
95dsa_depr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 97dsa_depr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
96dsa_depr.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 98dsa_depr.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
97dsa_depr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 99dsa_depr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -108,12 +110,13 @@ dsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
108dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 110dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
109dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 111dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
110dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h 112dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h
111dsa_gen.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 113dsa_gen.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
112dsa_gen.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 114dsa_gen.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
113dsa_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 115dsa_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
114dsa_gen.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 116dsa_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
115dsa_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 117dsa_gen.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
116dsa_gen.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_gen.c 118dsa_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
119dsa_gen.o: ../cryptlib.h dsa_gen.c
117dsa_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h 120dsa_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
118dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 121dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
119dsa_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 122dsa_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
@@ -129,14 +132,14 @@ dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
129dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 132dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
130dsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 133dsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
131dsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h 134dsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
132dsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 135dsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
133dsa_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 136dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
134dsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 137dsa_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
135dsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 138dsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
136dsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 139dsa_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
137dsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 140dsa_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
138dsa_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 141dsa_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
139dsa_lib.o: ../cryptlib.h dsa_lib.c 142dsa_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h dsa_lib.c
140dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h 143dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
141dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 144dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
142dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 145dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -151,19 +154,34 @@ dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h
151dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 154dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
152dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 155dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
153dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 156dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
154dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/lhash.h 157dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/fips.h
155dsa_sign.o: ../../include/openssl/opensslconf.h 158dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
156dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 159dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
157dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 160dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
158dsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 161dsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
159dsa_sign.o: ../cryptlib.h dsa_sign.c 162dsa_sign.o: ../cryptlib.h dsa_sign.c
163dsa_utl.o: ../../e_os.h ../../include/openssl/asn1.h
164dsa_utl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
165dsa_utl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
166dsa_utl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
167dsa_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
168dsa_utl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
169dsa_utl.o: ../../include/openssl/engine.h ../../include/openssl/err.h
170dsa_utl.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
171dsa_utl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
172dsa_utl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
173dsa_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
174dsa_utl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
175dsa_utl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
176dsa_utl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
177dsa_utl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h dsa_utl.c
160dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h 178dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h
161dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h 179dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
162dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h 180dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
163dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h 181dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
164dsa_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 182dsa_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
165dsa_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 183dsa_vrf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
166dsa_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 184dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
167dsa_vrf.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 185dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
168dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 186dsa_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
169dsa_vrf.o: ../cryptlib.h dsa_vrf.c 187dsa_vrf.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_vrf.c
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h
index 3a8fe5b56b..702c50d6dc 100644
--- a/src/lib/libcrypto/dsa/dsa.h
+++ b/src/lib/libcrypto/dsa/dsa.h
@@ -88,6 +88,8 @@
88# define OPENSSL_DSA_MAX_MODULUS_BITS 10000 88# define OPENSSL_DSA_MAX_MODULUS_BITS 10000
89#endif 89#endif
90 90
91#define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024
92
91#define DSA_FLAG_CACHE_MONT_P 0x01 93#define DSA_FLAG_CACHE_MONT_P 0x01
92#define DSA_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DSA 94#define DSA_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DSA
93 * implementation now uses constant time 95 * implementation now uses constant time
@@ -97,6 +99,25 @@
97 * be used for all exponents. 99 * be used for all exponents.
98 */ 100 */
99 101
102/* If this flag is set the DSA method is FIPS compliant and can be used
103 * in FIPS mode. This is set in the validated module method. If an
104 * application sets this flag in its own methods it is its reposibility
105 * to ensure the result is compliant.
106 */
107
108#define DSA_FLAG_FIPS_METHOD 0x0400
109
110/* If this flag is set the operations normally disabled in FIPS mode are
111 * permitted it is then the applications responsibility to ensure that the
112 * usage is compliant.
113 */
114
115#define DSA_FLAG_NON_FIPS_ALLOW 0x0400
116
117#ifdef OPENSSL_FIPS
118#define FIPS_DSA_SIZE_T int
119#endif
120
100#ifdef __cplusplus 121#ifdef __cplusplus
101extern "C" { 122extern "C" {
102#endif 123#endif
@@ -189,6 +210,11 @@ void DSA_set_default_method(const DSA_METHOD *);
189const DSA_METHOD *DSA_get_default_method(void); 210const DSA_METHOD *DSA_get_default_method(void);
190int DSA_set_method(DSA *dsa, const DSA_METHOD *); 211int DSA_set_method(DSA *dsa, const DSA_METHOD *);
191 212
213#ifdef OPENSSL_FIPS
214DSA * FIPS_dsa_new(void);
215void FIPS_dsa_free (DSA *r);
216#endif
217
192DSA * DSA_new(void); 218DSA * DSA_new(void);
193DSA * DSA_new_method(ENGINE *engine); 219DSA * DSA_new_method(ENGINE *engine);
194void DSA_free (DSA *r); 220void DSA_free (DSA *r);
@@ -249,6 +275,11 @@ int DSA_print_fp(FILE *bp, const DSA *x, int off);
249DH *DSA_dup_DH(const DSA *r); 275DH *DSA_dup_DH(const DSA *r);
250#endif 276#endif
251 277
278#ifdef OPENSSL_FIPS
279int FIPS_dsa_sig_encode(unsigned char *out, DSA_SIG *sig);
280int FIPS_dsa_sig_decode(DSA_SIG *sig, const unsigned char *in, int inlen);
281#endif
282
252/* BEGIN ERROR CODES */ 283/* BEGIN ERROR CODES */
253/* The following lines are auto generated by the script mkerr.pl. Any changes 284/* The following lines are auto generated by the script mkerr.pl. Any changes
254 * made after this point may be overwritten when the script is next run. 285 * made after this point may be overwritten when the script is next run.
@@ -261,11 +292,16 @@ void ERR_load_DSA_strings(void);
261#define DSA_F_D2I_DSA_SIG 110 292#define DSA_F_D2I_DSA_SIG 110
262#define DSA_F_DSAPARAMS_PRINT 100 293#define DSA_F_DSAPARAMS_PRINT 100
263#define DSA_F_DSAPARAMS_PRINT_FP 101 294#define DSA_F_DSAPARAMS_PRINT_FP 101
295#define DSA_F_DSA_BUILTIN_KEYGEN 119
296#define DSA_F_DSA_BUILTIN_PARAMGEN 118
264#define DSA_F_DSA_DO_SIGN 112 297#define DSA_F_DSA_DO_SIGN 112
265#define DSA_F_DSA_DO_VERIFY 113 298#define DSA_F_DSA_DO_VERIFY 113
299#define DSA_F_DSA_GENERATE_PARAMETERS 117
266#define DSA_F_DSA_NEW_METHOD 103 300#define DSA_F_DSA_NEW_METHOD 103
267#define DSA_F_DSA_PRINT 104 301#define DSA_F_DSA_PRINT 104
268#define DSA_F_DSA_PRINT_FP 105 302#define DSA_F_DSA_PRINT_FP 105
303#define DSA_F_DSA_SET_DEFAULT_METHOD 115
304#define DSA_F_DSA_SET_METHOD 116
269#define DSA_F_DSA_SIGN 106 305#define DSA_F_DSA_SIGN 106
270#define DSA_F_DSA_SIGN_SETUP 107 306#define DSA_F_DSA_SIGN_SETUP 107
271#define DSA_F_DSA_SIG_NEW 109 307#define DSA_F_DSA_SIG_NEW 109
@@ -276,8 +312,11 @@ void ERR_load_DSA_strings(void);
276/* Reason codes. */ 312/* Reason codes. */
277#define DSA_R_BAD_Q_VALUE 102 313#define DSA_R_BAD_Q_VALUE 102
278#define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100 314#define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100
315#define DSA_R_KEY_SIZE_TOO_SMALL 106
279#define DSA_R_MISSING_PARAMETERS 101 316#define DSA_R_MISSING_PARAMETERS 101
280#define DSA_R_MODULUS_TOO_LARGE 103 317#define DSA_R_MODULUS_TOO_LARGE 103
318#define DSA_R_NON_FIPS_METHOD 104
319#define DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE 105
281 320
282#ifdef __cplusplus 321#ifdef __cplusplus
283} 322}
diff --git a/src/lib/libcrypto/dsa/dsa_asn1.c b/src/lib/libcrypto/dsa/dsa_asn1.c
index 23fce555aa..0645facb4b 100644
--- a/src/lib/libcrypto/dsa/dsa_asn1.c
+++ b/src/lib/libcrypto/dsa/dsa_asn1.c
@@ -1,5 +1,5 @@
1/* dsa_asn1.c */ 1/* dsa_asn1.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -61,6 +61,11 @@
61#include <openssl/dsa.h> 61#include <openssl/dsa.h>
62#include <openssl/asn1.h> 62#include <openssl/asn1.h>
63#include <openssl/asn1t.h> 63#include <openssl/asn1t.h>
64#include <openssl/bn.h>
65#ifdef OPENSSL_FIPS
66#include <openssl/fips.h>
67#endif
68
64 69
65/* Override the default new methods */ 70/* Override the default new methods */
66static int sig_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it) 71static int sig_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
@@ -83,7 +88,7 @@ ASN1_SEQUENCE_cb(DSA_SIG, sig_cb) = {
83 ASN1_SIMPLE(DSA_SIG, s, CBIGNUM) 88 ASN1_SIMPLE(DSA_SIG, s, CBIGNUM)
84} ASN1_SEQUENCE_END_cb(DSA_SIG, DSA_SIG) 89} ASN1_SEQUENCE_END_cb(DSA_SIG, DSA_SIG)
85 90
86IMPLEMENT_ASN1_FUNCTIONS_const(DSA_SIG) 91IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DSA_SIG,DSA_SIG,DSA_SIG)
87 92
88/* Override the default free and new methods */ 93/* Override the default free and new methods */
89static int dsa_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it) 94static int dsa_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
@@ -138,3 +143,76 @@ ASN1_CHOICE_cb(DSAPublicKey, dsa_cb) = {
138} ASN1_CHOICE_END_cb(DSA, DSAPublicKey, write_params) 143} ASN1_CHOICE_END_cb(DSA, DSAPublicKey, write_params)
139 144
140IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DSA, DSAPublicKey, DSAPublicKey) 145IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DSA, DSAPublicKey, DSAPublicKey)
146
147int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
148 unsigned int *siglen, DSA *dsa)
149 {
150 DSA_SIG *s;
151#ifdef OPENSSL_FIPS
152 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
153 {
154 DSAerr(DSA_F_DSA_SIGN, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
155 return 0;
156 }
157#endif
158 s=DSA_do_sign(dgst,dlen,dsa);
159 if (s == NULL)
160 {
161 *siglen=0;
162 return(0);
163 }
164 *siglen=i2d_DSA_SIG(s,&sig);
165 DSA_SIG_free(s);
166 return(1);
167 }
168
169int DSA_size(const DSA *r)
170 {
171 int ret,i;
172 ASN1_INTEGER bs;
173 unsigned char buf[4]; /* 4 bytes looks really small.
174 However, i2d_ASN1_INTEGER() will not look
175 beyond the first byte, as long as the second
176 parameter is NULL. */
177
178 i=BN_num_bits(r->q);
179 bs.length=(i+7)/8;
180 bs.data=buf;
181 bs.type=V_ASN1_INTEGER;
182 /* If the top bit is set the asn1 encoding is 1 larger. */
183 buf[0]=0xff;
184
185 i=i2d_ASN1_INTEGER(&bs,NULL);
186 i+=i; /* r and s */
187 ret=ASN1_object_size(1,i,V_ASN1_SEQUENCE);
188 return(ret);
189 }
190
191/* data has already been hashed (probably with SHA or SHA-1). */
192/* returns
193 * 1: correct signature
194 * 0: incorrect signature
195 * -1: error
196 */
197int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
198 const unsigned char *sigbuf, int siglen, DSA *dsa)
199 {
200 DSA_SIG *s;
201 int ret=-1;
202#ifdef OPENSSL_FIPS
203 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
204 {
205 DSAerr(DSA_F_DSA_VERIFY, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
206 return 0;
207 }
208#endif
209
210 s = DSA_SIG_new();
211 if (s == NULL) return(ret);
212 if (d2i_DSA_SIG(&s,&sigbuf,siglen) == NULL) goto err;
213 ret=DSA_do_verify(dgst,dgst_len,s,dsa);
214err:
215 DSA_SIG_free(s);
216 return(ret);
217 }
218
diff --git a/src/lib/libcrypto/dsa/dsa_err.c b/src/lib/libcrypto/dsa/dsa_err.c
index 768711994b..872839af94 100644
--- a/src/lib/libcrypto/dsa/dsa_err.c
+++ b/src/lib/libcrypto/dsa/dsa_err.c
@@ -1,6 +1,6 @@
1/* crypto/dsa/dsa_err.c */ 1/* crypto/dsa/dsa_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -73,11 +73,16 @@ static ERR_STRING_DATA DSA_str_functs[]=
73{ERR_FUNC(DSA_F_D2I_DSA_SIG), "d2i_DSA_SIG"}, 73{ERR_FUNC(DSA_F_D2I_DSA_SIG), "d2i_DSA_SIG"},
74{ERR_FUNC(DSA_F_DSAPARAMS_PRINT), "DSAparams_print"}, 74{ERR_FUNC(DSA_F_DSAPARAMS_PRINT), "DSAparams_print"},
75{ERR_FUNC(DSA_F_DSAPARAMS_PRINT_FP), "DSAparams_print_fp"}, 75{ERR_FUNC(DSA_F_DSAPARAMS_PRINT_FP), "DSAparams_print_fp"},
76{ERR_FUNC(DSA_F_DSA_BUILTIN_KEYGEN), "DSA_BUILTIN_KEYGEN"},
77{ERR_FUNC(DSA_F_DSA_BUILTIN_PARAMGEN), "DSA_BUILTIN_PARAMGEN"},
76{ERR_FUNC(DSA_F_DSA_DO_SIGN), "DSA_do_sign"}, 78{ERR_FUNC(DSA_F_DSA_DO_SIGN), "DSA_do_sign"},
77{ERR_FUNC(DSA_F_DSA_DO_VERIFY), "DSA_do_verify"}, 79{ERR_FUNC(DSA_F_DSA_DO_VERIFY), "DSA_do_verify"},
80{ERR_FUNC(DSA_F_DSA_GENERATE_PARAMETERS), "DSA_generate_parameters"},
78{ERR_FUNC(DSA_F_DSA_NEW_METHOD), "DSA_new_method"}, 81{ERR_FUNC(DSA_F_DSA_NEW_METHOD), "DSA_new_method"},
79{ERR_FUNC(DSA_F_DSA_PRINT), "DSA_print"}, 82{ERR_FUNC(DSA_F_DSA_PRINT), "DSA_print"},
80{ERR_FUNC(DSA_F_DSA_PRINT_FP), "DSA_print_fp"}, 83{ERR_FUNC(DSA_F_DSA_PRINT_FP), "DSA_print_fp"},
84{ERR_FUNC(DSA_F_DSA_SET_DEFAULT_METHOD), "DSA_set_default_method"},
85{ERR_FUNC(DSA_F_DSA_SET_METHOD), "DSA_set_method"},
81{ERR_FUNC(DSA_F_DSA_SIGN), "DSA_sign"}, 86{ERR_FUNC(DSA_F_DSA_SIGN), "DSA_sign"},
82{ERR_FUNC(DSA_F_DSA_SIGN_SETUP), "DSA_sign_setup"}, 87{ERR_FUNC(DSA_F_DSA_SIGN_SETUP), "DSA_sign_setup"},
83{ERR_FUNC(DSA_F_DSA_SIG_NEW), "DSA_SIG_new"}, 88{ERR_FUNC(DSA_F_DSA_SIG_NEW), "DSA_SIG_new"},
@@ -91,8 +96,11 @@ static ERR_STRING_DATA DSA_str_reasons[]=
91 { 96 {
92{ERR_REASON(DSA_R_BAD_Q_VALUE) ,"bad q value"}, 97{ERR_REASON(DSA_R_BAD_Q_VALUE) ,"bad q value"},
93{ERR_REASON(DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),"data too large for key size"}, 98{ERR_REASON(DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),"data too large for key size"},
99{ERR_REASON(DSA_R_KEY_SIZE_TOO_SMALL) ,"key size too small"},
94{ERR_REASON(DSA_R_MISSING_PARAMETERS) ,"missing parameters"}, 100{ERR_REASON(DSA_R_MISSING_PARAMETERS) ,"missing parameters"},
95{ERR_REASON(DSA_R_MODULUS_TOO_LARGE) ,"modulus too large"}, 101{ERR_REASON(DSA_R_MODULUS_TOO_LARGE) ,"modulus too large"},
102{ERR_REASON(DSA_R_NON_FIPS_METHOD) ,"non fips method"},
103{ERR_REASON(DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE),"operation not allowed in fips mode"},
96{0,NULL} 104{0,NULL}
97 }; 105 };
98 106
diff --git a/src/lib/libcrypto/dsa/dsa_gen.c b/src/lib/libcrypto/dsa/dsa_gen.c
index ca0b86a6cf..6f1728e3cf 100644
--- a/src/lib/libcrypto/dsa/dsa_gen.c
+++ b/src/lib/libcrypto/dsa/dsa_gen.c
@@ -82,6 +82,8 @@
82#include <openssl/rand.h> 82#include <openssl/rand.h>
83#include <openssl/sha.h> 83#include <openssl/sha.h>
84 84
85#ifndef OPENSSL_FIPS
86
85static int dsa_builtin_paramgen(DSA *ret, int bits, 87static int dsa_builtin_paramgen(DSA *ret, int bits,
86 unsigned char *seed_in, int seed_len, 88 unsigned char *seed_in, int seed_len,
87 int *counter_ret, unsigned long *h_ret, BN_GENCB *cb); 89 int *counter_ret, unsigned long *h_ret, BN_GENCB *cb);
@@ -320,3 +322,4 @@ err:
320 return ok; 322 return ok;
321 } 323 }
322#endif 324#endif
325#endif
diff --git a/src/lib/libcrypto/dsa/dsa_key.c b/src/lib/libcrypto/dsa/dsa_key.c
index c4aa86bc6d..5e39124230 100644
--- a/src/lib/libcrypto/dsa/dsa_key.c
+++ b/src/lib/libcrypto/dsa/dsa_key.c
@@ -64,6 +64,8 @@
64#include <openssl/dsa.h> 64#include <openssl/dsa.h>
65#include <openssl/rand.h> 65#include <openssl/rand.h>
66 66
67#ifndef OPENSSL_FIPS
68
67static int dsa_builtin_keygen(DSA *dsa); 69static int dsa_builtin_keygen(DSA *dsa);
68 70
69int DSA_generate_key(DSA *dsa) 71int DSA_generate_key(DSA *dsa)
@@ -126,3 +128,5 @@ err:
126 return(ok); 128 return(ok);
127 } 129 }
128#endif 130#endif
131
132#endif
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c
index e9b75902db..7ac9dc8c89 100644
--- a/src/lib/libcrypto/dsa/dsa_lib.c
+++ b/src/lib/libcrypto/dsa/dsa_lib.c
@@ -76,6 +76,14 @@ static const DSA_METHOD *default_DSA_method = NULL;
76 76
77void DSA_set_default_method(const DSA_METHOD *meth) 77void DSA_set_default_method(const DSA_METHOD *meth)
78 { 78 {
79#ifdef OPENSSL_FIPS
80 if (FIPS_mode() && !(meth->flags & DSA_FLAG_FIPS_METHOD))
81 {
82 DSAerr(DSA_F_DSA_SET_DEFAULT_METHOD, DSA_R_NON_FIPS_METHOD);
83 return;
84 }
85#endif
86
79 default_DSA_method = meth; 87 default_DSA_method = meth;
80 } 88 }
81 89
@@ -96,6 +104,13 @@ int DSA_set_method(DSA *dsa, const DSA_METHOD *meth)
96 /* NB: The caller is specifically setting a method, so it's not up to us 104 /* NB: The caller is specifically setting a method, so it's not up to us
97 * to deal with which ENGINE it comes from. */ 105 * to deal with which ENGINE it comes from. */
98 const DSA_METHOD *mtmp; 106 const DSA_METHOD *mtmp;
107#ifdef OPENSSL_FIPS
108 if (FIPS_mode() && !(meth->flags & DSA_FLAG_FIPS_METHOD))
109 {
110 DSAerr(DSA_F_DSA_SET_METHOD, DSA_R_NON_FIPS_METHOD);
111 return 0;
112 }
113#endif
99 mtmp = dsa->meth; 114 mtmp = dsa->meth;
100 if (mtmp->finish) mtmp->finish(dsa); 115 if (mtmp->finish) mtmp->finish(dsa);
101#ifndef OPENSSL_NO_ENGINE 116#ifndef OPENSSL_NO_ENGINE
@@ -147,6 +162,18 @@ DSA *DSA_new_method(ENGINE *engine)
147 } 162 }
148 } 163 }
149#endif 164#endif
165#ifdef OPENSSL_FIPS
166 if (FIPS_mode() && !(ret->meth->flags & DSA_FLAG_FIPS_METHOD))
167 {
168 DSAerr(DSA_F_DSA_NEW_METHOD, DSA_R_NON_FIPS_METHOD);
169#ifndef OPENSSL_NO_ENGINE
170 if (ret->engine)
171 ENGINE_finish(ret->engine);
172#endif
173 OPENSSL_free(ret);
174 return NULL;
175 }
176#endif
150 177
151 ret->pad=0; 178 ret->pad=0;
152 ret->version=0; 179 ret->version=0;
@@ -233,28 +260,6 @@ int DSA_up_ref(DSA *r)
233 return ((i > 1) ? 1 : 0); 260 return ((i > 1) ? 1 : 0);
234 } 261 }
235 262
236int DSA_size(const DSA *r)
237 {
238 int ret,i;
239 ASN1_INTEGER bs;
240 unsigned char buf[4]; /* 4 bytes looks really small.
241 However, i2d_ASN1_INTEGER() will not look
242 beyond the first byte, as long as the second
243 parameter is NULL. */
244
245 i=BN_num_bits(r->q);
246 bs.length=(i+7)/8;
247 bs.data=buf;
248 bs.type=V_ASN1_INTEGER;
249 /* If the top bit is set the asn1 encoding is 1 larger. */
250 buf[0]=0xff;
251
252 i=i2d_ASN1_INTEGER(&bs,NULL);
253 i+=i; /* r and s */
254 ret=ASN1_object_size(1,i,V_ASN1_SEQUENCE);
255 return(ret);
256 }
257
258int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 263int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
259 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) 264 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
260 { 265 {
diff --git a/src/lib/libcrypto/dsa/dsa_ossl.c b/src/lib/libcrypto/dsa/dsa_ossl.c
index 75ff7cc4af..412cf1d88b 100644
--- a/src/lib/libcrypto/dsa/dsa_ossl.c
+++ b/src/lib/libcrypto/dsa/dsa_ossl.c
@@ -65,6 +65,8 @@
65#include <openssl/rand.h> 65#include <openssl/rand.h>
66#include <openssl/asn1.h> 66#include <openssl/asn1.h>
67 67
68#ifndef OPENSSL_FIPS
69
68static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); 70static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
69static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp); 71static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
70static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, 72static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
@@ -391,3 +393,4 @@ static int dsa_finish(DSA *dsa)
391 return(1); 393 return(1);
392} 394}
393 395
396#endif
diff --git a/src/lib/libcrypto/dsa/dsa_sign.c b/src/lib/libcrypto/dsa/dsa_sign.c
index 89205026f0..4cfbbe57a8 100644
--- a/src/lib/libcrypto/dsa/dsa_sign.c
+++ b/src/lib/libcrypto/dsa/dsa_sign.c
@@ -64,29 +64,32 @@
64#include <openssl/dsa.h> 64#include <openssl/dsa.h>
65#include <openssl/rand.h> 65#include <openssl/rand.h>
66#include <openssl/asn1.h> 66#include <openssl/asn1.h>
67#ifdef OPENSSL_FIPS
68#include <openssl/fips.h>
69#endif
67 70
68DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
69 {
70 return dsa->meth->dsa_do_sign(dgst, dlen, dsa);
71 }
72 71
73int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, 72DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
74 unsigned int *siglen, DSA *dsa)
75 { 73 {
76 DSA_SIG *s; 74#ifdef OPENSSL_FIPS
77 s=DSA_do_sign(dgst,dlen,dsa); 75 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
78 if (s == NULL)
79 { 76 {
80 *siglen=0; 77 DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
81 return(0); 78 return NULL;
82 } 79 }
83 *siglen=i2d_DSA_SIG(s,&sig); 80#endif
84 DSA_SIG_free(s); 81 return dsa->meth->dsa_do_sign(dgst, dlen, dsa);
85 return(1);
86 } 82 }
87 83
88int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) 84int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
89 { 85 {
86#ifdef OPENSSL_FIPS
87 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
88 {
89 DSAerr(DSA_F_DSA_SIGN_SETUP, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
90 return 0;
91 }
92#endif
90 return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp); 93 return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp);
91 } 94 }
92 95
diff --git a/src/lib/libcrypto/dsa/dsa_vrf.c b/src/lib/libcrypto/dsa/dsa_vrf.c
index c4aeddd056..c75e423048 100644
--- a/src/lib/libcrypto/dsa/dsa_vrf.c
+++ b/src/lib/libcrypto/dsa/dsa_vrf.c
@@ -64,31 +64,21 @@
64#include <openssl/dsa.h> 64#include <openssl/dsa.h>
65#include <openssl/rand.h> 65#include <openssl/rand.h>
66#include <openssl/asn1.h> 66#include <openssl/asn1.h>
67#ifdef OPENSSL_FIPS
68#include <openssl/fips.h>
69#endif
70
67#include <openssl/asn1_mac.h> 71#include <openssl/asn1_mac.h>
68 72
69int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, 73int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
70 DSA *dsa) 74 DSA *dsa)
71 { 75 {
76#ifdef OPENSSL_FIPS
77 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
78 {
79 DSAerr(DSA_F_DSA_DO_VERIFY, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
80 return 0;
81 }
82#endif
72 return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa); 83 return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa);
73 } 84 }
74
75/* data has already been hashed (probably with SHA or SHA-1). */
76/* returns
77 * 1: correct signature
78 * 0: incorrect signature
79 * -1: error
80 */
81int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
82 const unsigned char *sigbuf, int siglen, DSA *dsa)
83 {
84 DSA_SIG *s;
85 int ret=-1;
86
87 s = DSA_SIG_new();
88 if (s == NULL) return(ret);
89 if (d2i_DSA_SIG(&s,&sigbuf,siglen) == NULL) goto err;
90 ret=DSA_do_verify(dgst,dgst_len,s,dsa);
91err:
92 DSA_SIG_free(s);
93 return(ret);
94 }
diff --git a/src/lib/libcrypto/ecdh/Makefile b/src/lib/libcrypto/ecdh/Makefile
index 65d8904ee8..7a7b618eeb 100644
--- a/src/lib/libcrypto/ecdh/Makefile
+++ b/src/lib/libcrypto/ecdh/Makefile
@@ -34,7 +34,7 @@ top:
34all: lib 34all: lib
35 35
36lib: $(LIBOBJ) 36lib: $(LIBOBJ)
37 $(AR) $(LIB) $(LIBOBJ) 37 $(ARX) $(LIB) $(LIBOBJ)
38 $(RANLIB) $(LIB) || echo Never mind. 38 $(RANLIB) $(LIB) || echo Never mind.
39 @touch lib 39 @touch lib
40 40
@@ -88,26 +88,27 @@ ech_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
88ech_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 88ech_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
89ech_key.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 89ech_key.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
90ech_key.o: ../../include/openssl/engine.h ../../include/openssl/evp.h 90ech_key.o: ../../include/openssl/engine.h ../../include/openssl/evp.h
91ech_key.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 91ech_key.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
92ech_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 92ech_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
93ech_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 93ech_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
94ech_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 94ech_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
95ech_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 95ech_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
96ech_key.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 96ech_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
97ech_key.o: ../../include/openssl/x509_vfy.h ech_key.c ech_locl.h 97ech_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
98ech_key.o: ech_key.c ech_locl.h
98ech_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 99ech_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
99ech_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 100ech_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
100ech_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 101ech_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
101ech_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 102ech_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
102ech_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h 103ech_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
103ech_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 104ech_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
104ech_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 105ech_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
105ech_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 106ech_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
106ech_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 107ech_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
107ech_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 108ech_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
108ech_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 109ech_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
109ech_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 110ech_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
110ech_lib.o: ech_lib.c ech_locl.h 111ech_lib.o: ../../include/openssl/x509_vfy.h ech_lib.c ech_locl.h
111ech_ossl.o: ../../e_os.h ../../include/openssl/asn1.h 112ech_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
112ech_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 113ech_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
113ech_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 114ech_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
diff --git a/src/lib/libcrypto/ecdsa/Makefile b/src/lib/libcrypto/ecdsa/Makefile
index 9b48d5641f..4865f3c8d6 100644
--- a/src/lib/libcrypto/ecdsa/Makefile
+++ b/src/lib/libcrypto/ecdsa/Makefile
@@ -34,7 +34,7 @@ top:
34all: lib 34all: lib
35 35
36lib: $(LIBOBJ) 36lib: $(LIBOBJ)
37 $(AR) $(LIB) $(LIBOBJ) 37 $(ARX) $(LIB) $(LIBOBJ)
38 $(RANLIB) $(LIB) || echo Never mind. 38 $(RANLIB) $(LIB) || echo Never mind.
39 @touch lib 39 @touch lib
40 40
@@ -97,13 +97,14 @@ ecs_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
97ecs_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 97ecs_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
98ecs_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 98ecs_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
99ecs_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h 99ecs_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
100ecs_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 100ecs_lib.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
101ecs_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 101ecs_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
102ecs_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 102ecs_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
103ecs_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 103ecs_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
104ecs_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 104ecs_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
105ecs_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 105ecs_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
106ecs_lib.o: ../../include/openssl/x509_vfy.h ecs_lib.c ecs_locl.h 106ecs_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
107ecs_lib.o: ecs_lib.c ecs_locl.h
107ecs_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 108ecs_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
108ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h 109ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
109ecs_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 110ecs_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
@@ -118,8 +119,9 @@ ecs_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
118ecs_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 119ecs_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
119ecs_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 120ecs_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
120ecs_sign.o: ../../include/openssl/engine.h ../../include/openssl/evp.h 121ecs_sign.o: ../../include/openssl/engine.h ../../include/openssl/evp.h
121ecs_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 122ecs_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
122ecs_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 123ecs_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
124ecs_sign.o: ../../include/openssl/opensslconf.h
123ecs_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 125ecs_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
124ecs_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 126ecs_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
125ecs_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 127ecs_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -130,10 +132,11 @@ ecs_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
130ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 132ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
131ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 133ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
132ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/evp.h 134ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/evp.h
133ecs_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 135ecs_vrf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
134ecs_vrf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 136ecs_vrf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
135ecs_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 137ecs_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
136ecs_vrf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 138ecs_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
137ecs_vrf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 139ecs_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
138ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 140ecs_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
139ecs_vrf.o: ../../include/openssl/x509_vfy.h ecs_locl.h ecs_vrf.c 141ecs_vrf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
142ecs_vrf.o: ecs_locl.h ecs_vrf.c
diff --git a/src/lib/libcrypto/engine/Makefile b/src/lib/libcrypto/engine/Makefile
index 47cc619b8a..0cc3722089 100644
--- a/src/lib/libcrypto/engine/Makefile
+++ b/src/lib/libcrypto/engine/Makefile
@@ -41,7 +41,7 @@ top:
41all: lib 41all: lib
42 42
43lib: $(LIBOBJ) 43lib: $(LIBOBJ)
44 $(AR) $(LIB) $(LIBOBJ) 44 $(ARX) $(LIB) $(LIBOBJ)
45 $(RANLIB) $(LIB) || echo Never mind. 45 $(RANLIB) $(LIB) || echo Never mind.
46 @touch lib 46 @touch lib
47 47
@@ -88,34 +88,35 @@ eng_all.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
88eng_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 88eng_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
89eng_all.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 89eng_all.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
90eng_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h 90eng_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
91eng_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 91eng_all.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
92eng_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 92eng_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
93eng_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 93eng_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
94eng_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 94eng_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
95eng_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 95eng_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
96eng_all.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 96eng_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
97eng_all.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_all.c eng_int.h 97eng_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
98eng_all.o: ../cryptlib.h eng_all.c eng_int.h
98eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h 99eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h
99eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 100eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
100eng_cnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h 101eng_cnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
101eng_cnf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 102eng_cnf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
102eng_cnf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 103eng_cnf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
103eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h 104eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h
104eng_cnf.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 105eng_cnf.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
105eng_cnf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 106eng_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
106eng_cnf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 107eng_cnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
107eng_cnf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 108eng_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
108eng_cnf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 109eng_cnf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
109eng_cnf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 110eng_cnf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
110eng_cnf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 111eng_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
111eng_cnf.o: ../cryptlib.h eng_cnf.c eng_int.h 112eng_cnf.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_cnf.c eng_int.h
112eng_cryptodev.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 113eng_cryptodev.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
113eng_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h 114eng_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
114eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 115eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
115eng_cryptodev.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 116eng_cryptodev.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
116eng_cryptodev.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 117eng_cryptodev.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
117eng_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 118eng_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
118eng_cryptodev.o: ../../include/openssl/obj_mac.h 119eng_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
119eng_cryptodev.o: ../../include/openssl/objects.h 120eng_cryptodev.o: ../../include/openssl/objects.h
120eng_cryptodev.o: ../../include/openssl/opensslconf.h 121eng_cryptodev.o: ../../include/openssl/opensslconf.h
121eng_cryptodev.o: ../../include/openssl/opensslv.h 122eng_cryptodev.o: ../../include/openssl/opensslv.h
@@ -130,8 +131,9 @@ eng_ctrl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
130eng_ctrl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 131eng_ctrl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
131eng_ctrl.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 132eng_ctrl.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
132eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/evp.h 133eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
133eng_ctrl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 134eng_ctrl.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
134eng_ctrl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 135eng_ctrl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
136eng_ctrl.o: ../../include/openssl/opensslconf.h
135eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 137eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
136eng_ctrl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 138eng_ctrl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
137eng_ctrl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 139eng_ctrl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -143,49 +145,50 @@ eng_dyn.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h
143eng_dyn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 145eng_dyn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
144eng_dyn.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 146eng_dyn.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
145eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h 147eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h
146eng_dyn.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 148eng_dyn.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
147eng_dyn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 149eng_dyn.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
148eng_dyn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 150eng_dyn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
149eng_dyn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 151eng_dyn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
150eng_dyn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 152eng_dyn.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
151eng_dyn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 153eng_dyn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
152eng_dyn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 154eng_dyn.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
153eng_dyn.o: ../cryptlib.h eng_dyn.c eng_int.h 155eng_dyn.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_dyn.c eng_int.h
154eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 156eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
155eng_err.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 157eng_err.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
156eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 158eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
157eng_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 159eng_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
158eng_err.o: ../../include/openssl/engine.h ../../include/openssl/err.h 160eng_err.o: ../../include/openssl/engine.h ../../include/openssl/err.h
159eng_err.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 161eng_err.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
160eng_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 162eng_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
161eng_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 163eng_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
162eng_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 164eng_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
163eng_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 165eng_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
164eng_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 166eng_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
165eng_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 167eng_err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
166eng_err.o: eng_err.c 168eng_err.o: ../../include/openssl/x509_vfy.h eng_err.c
167eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h 169eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h
168eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 170eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
169eng_fat.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h 171eng_fat.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
170eng_fat.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 172eng_fat.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
171eng_fat.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 173eng_fat.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
172eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h 174eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h
173eng_fat.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 175eng_fat.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
174eng_fat.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 176eng_fat.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
175eng_fat.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 177eng_fat.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
176eng_fat.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 178eng_fat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
177eng_fat.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 179eng_fat.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
178eng_fat.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 180eng_fat.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
179eng_fat.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 181eng_fat.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
180eng_fat.o: ../cryptlib.h eng_fat.c eng_int.h 182eng_fat.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_fat.c eng_int.h
181eng_init.o: ../../e_os.h ../../include/openssl/asn1.h 183eng_init.o: ../../e_os.h ../../include/openssl/asn1.h
182eng_init.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 184eng_init.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
183eng_init.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 185eng_init.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
184eng_init.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 186eng_init.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
185eng_init.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 187eng_init.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
186eng_init.o: ../../include/openssl/err.h ../../include/openssl/evp.h 188eng_init.o: ../../include/openssl/err.h ../../include/openssl/evp.h
187eng_init.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 189eng_init.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
188eng_init.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 190eng_init.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
191eng_init.o: ../../include/openssl/opensslconf.h
189eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 192eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
190eng_init.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 193eng_init.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
191eng_init.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 194eng_init.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -197,22 +200,23 @@ eng_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
197eng_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 200eng_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
198eng_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 201eng_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
199eng_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h 202eng_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
200eng_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 203eng_lib.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
201eng_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 204eng_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
202eng_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 205eng_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
203eng_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 206eng_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
204eng_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 207eng_lib.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
205eng_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 208eng_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
206eng_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 209eng_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
207eng_lib.o: ../cryptlib.h eng_int.h eng_lib.c 210eng_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h eng_lib.c
208eng_list.o: ../../e_os.h ../../include/openssl/asn1.h 211eng_list.o: ../../e_os.h ../../include/openssl/asn1.h
209eng_list.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 212eng_list.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
210eng_list.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 213eng_list.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
211eng_list.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 214eng_list.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
212eng_list.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 215eng_list.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
213eng_list.o: ../../include/openssl/err.h ../../include/openssl/evp.h 216eng_list.o: ../../include/openssl/err.h ../../include/openssl/evp.h
214eng_list.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 217eng_list.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
215eng_list.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 218eng_list.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
219eng_list.o: ../../include/openssl/opensslconf.h
216eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 220eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
217eng_list.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 221eng_list.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
218eng_list.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 222eng_list.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -225,8 +229,9 @@ eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
225eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 229eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
226eng_openssl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 230eng_openssl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
227eng_openssl.o: ../../include/openssl/engine.h ../../include/openssl/err.h 231eng_openssl.o: ../../include/openssl/engine.h ../../include/openssl/err.h
228eng_openssl.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 232eng_openssl.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
229eng_openssl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 233eng_openssl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
234eng_openssl.o: ../../include/openssl/objects.h
230eng_openssl.o: ../../include/openssl/opensslconf.h 235eng_openssl.o: ../../include/openssl/opensslconf.h
231eng_openssl.o: ../../include/openssl/opensslv.h 236eng_openssl.o: ../../include/openssl/opensslv.h
232eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h 237eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
@@ -242,8 +247,9 @@ eng_padlock.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h
242eng_padlock.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 247eng_padlock.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
243eng_padlock.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 248eng_padlock.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
244eng_padlock.o: ../../include/openssl/engine.h ../../include/openssl/err.h 249eng_padlock.o: ../../include/openssl/engine.h ../../include/openssl/err.h
245eng_padlock.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 250eng_padlock.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
246eng_padlock.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 251eng_padlock.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
252eng_padlock.o: ../../include/openssl/objects.h
247eng_padlock.o: ../../include/openssl/opensslconf.h 253eng_padlock.o: ../../include/openssl/opensslconf.h
248eng_padlock.o: ../../include/openssl/opensslv.h 254eng_padlock.o: ../../include/openssl/opensslv.h
249eng_padlock.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 255eng_padlock.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
@@ -257,8 +263,9 @@ eng_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
257eng_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 263eng_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
258eng_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 264eng_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
259eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h 265eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
260eng_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 266eng_pkey.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
261eng_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 267eng_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
268eng_pkey.o: ../../include/openssl/opensslconf.h
262eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 269eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
263eng_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 270eng_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
264eng_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 271eng_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -270,8 +277,8 @@ eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
270eng_table.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 277eng_table.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
271eng_table.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 278eng_table.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
272eng_table.o: ../../include/openssl/err.h ../../include/openssl/evp.h 279eng_table.o: ../../include/openssl/err.h ../../include/openssl/evp.h
273eng_table.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 280eng_table.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
274eng_table.o: ../../include/openssl/objects.h 281eng_table.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
275eng_table.o: ../../include/openssl/opensslconf.h 282eng_table.o: ../../include/openssl/opensslconf.h
276eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 283eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
277eng_table.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 284eng_table.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
@@ -285,8 +292,8 @@ tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
285tb_cipher.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 292tb_cipher.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
286tb_cipher.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 293tb_cipher.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
287tb_cipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h 294tb_cipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h
288tb_cipher.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 295tb_cipher.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
289tb_cipher.o: ../../include/openssl/objects.h 296tb_cipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
290tb_cipher.o: ../../include/openssl/opensslconf.h 297tb_cipher.o: ../../include/openssl/opensslconf.h
291tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 298tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
292tb_cipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 299tb_cipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
@@ -299,22 +306,22 @@ tb_dh.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
299tb_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 306tb_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
300tb_dh.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 307tb_dh.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
301tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h 308tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h
302tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 309tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
303tb_dh.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 310tb_dh.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
304tb_dh.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 311tb_dh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
305tb_dh.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 312tb_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
306tb_dh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 313tb_dh.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
307tb_dh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 314tb_dh.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
308tb_dh.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 315tb_dh.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
309tb_dh.o: ../cryptlib.h eng_int.h tb_dh.c 316tb_dh.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_dh.c
310tb_digest.o: ../../e_os.h ../../include/openssl/asn1.h 317tb_digest.o: ../../e_os.h ../../include/openssl/asn1.h
311tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 318tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
312tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 319tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
313tb_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 320tb_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
314tb_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 321tb_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
315tb_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h 322tb_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
316tb_digest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 323tb_digest.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
317tb_digest.o: ../../include/openssl/objects.h 324tb_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
318tb_digest.o: ../../include/openssl/opensslconf.h 325tb_digest.o: ../../include/openssl/opensslconf.h
319tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 326tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
320tb_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 327tb_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
@@ -327,35 +334,37 @@ tb_dsa.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
327tb_dsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 334tb_dsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
328tb_dsa.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 335tb_dsa.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
329tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h 336tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
330tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 337tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
331tb_dsa.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 338tb_dsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
332tb_dsa.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 339tb_dsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
333tb_dsa.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 340tb_dsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
334tb_dsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 341tb_dsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
335tb_dsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 342tb_dsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
336tb_dsa.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 343tb_dsa.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
337tb_dsa.o: ../cryptlib.h eng_int.h tb_dsa.c 344tb_dsa.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_dsa.c
338tb_ecdh.o: ../../e_os.h ../../include/openssl/asn1.h 345tb_ecdh.o: ../../e_os.h ../../include/openssl/asn1.h
339tb_ecdh.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 346tb_ecdh.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
340tb_ecdh.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 347tb_ecdh.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
341tb_ecdh.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 348tb_ecdh.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
342tb_ecdh.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 349tb_ecdh.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
343tb_ecdh.o: ../../include/openssl/err.h ../../include/openssl/evp.h 350tb_ecdh.o: ../../include/openssl/err.h ../../include/openssl/evp.h
344tb_ecdh.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 351tb_ecdh.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
345tb_ecdh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 352tb_ecdh.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
346tb_ecdh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 353tb_ecdh.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
347tb_ecdh.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 354tb_ecdh.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
348tb_ecdh.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 355tb_ecdh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
349tb_ecdh.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 356tb_ecdh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
350tb_ecdh.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_ecdh.c 357tb_ecdh.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
358tb_ecdh.o: ../cryptlib.h eng_int.h tb_ecdh.c
351tb_ecdsa.o: ../../e_os.h ../../include/openssl/asn1.h 359tb_ecdsa.o: ../../e_os.h ../../include/openssl/asn1.h
352tb_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 360tb_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
353tb_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 361tb_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
354tb_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 362tb_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
355tb_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 363tb_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
356tb_ecdsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h 364tb_ecdsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h
357tb_ecdsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 365tb_ecdsa.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
358tb_ecdsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 366tb_ecdsa.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
367tb_ecdsa.o: ../../include/openssl/opensslconf.h
359tb_ecdsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 368tb_ecdsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
360tb_ecdsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 369tb_ecdsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
361tb_ecdsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 370tb_ecdsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -367,34 +376,36 @@ tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
367tb_rand.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 376tb_rand.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
368tb_rand.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 377tb_rand.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
369tb_rand.o: ../../include/openssl/err.h ../../include/openssl/evp.h 378tb_rand.o: ../../include/openssl/err.h ../../include/openssl/evp.h
370tb_rand.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 379tb_rand.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
371tb_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 380tb_rand.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
372tb_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 381tb_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
373tb_rand.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 382tb_rand.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
374tb_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 383tb_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
375tb_rand.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 384tb_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
376tb_rand.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_rand.c 385tb_rand.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
386tb_rand.o: ../cryptlib.h eng_int.h tb_rand.c
377tb_rsa.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 387tb_rsa.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
378tb_rsa.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 388tb_rsa.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
379tb_rsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 389tb_rsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
380tb_rsa.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 390tb_rsa.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
381tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h 391tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
382tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 392tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
383tb_rsa.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 393tb_rsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
384tb_rsa.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 394tb_rsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
385tb_rsa.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 395tb_rsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
386tb_rsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 396tb_rsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
387tb_rsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 397tb_rsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
388tb_rsa.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 398tb_rsa.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
389tb_rsa.o: ../cryptlib.h eng_int.h tb_rsa.c 399tb_rsa.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_rsa.c
390tb_store.o: ../../e_os.h ../../include/openssl/asn1.h 400tb_store.o: ../../e_os.h ../../include/openssl/asn1.h
391tb_store.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 401tb_store.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
392tb_store.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 402tb_store.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
393tb_store.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 403tb_store.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
394tb_store.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 404tb_store.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
395tb_store.o: ../../include/openssl/err.h ../../include/openssl/evp.h 405tb_store.o: ../../include/openssl/err.h ../../include/openssl/evp.h
396tb_store.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 406tb_store.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
397tb_store.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 407tb_store.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
408tb_store.o: ../../include/openssl/opensslconf.h
398tb_store.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 409tb_store.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
399tb_store.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 410tb_store.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
400tb_store.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 411tb_store.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
diff --git a/src/lib/libcrypto/engine/eng_cnf.c b/src/lib/libcrypto/engine/eng_cnf.c
index 8417ddaaef..08066cea59 100644
--- a/src/lib/libcrypto/engine/eng_cnf.c
+++ b/src/lib/libcrypto/engine/eng_cnf.c
@@ -1,5 +1,5 @@
1/* eng_cnf.c */ 1/* eng_cnf.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -98,7 +98,7 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
98 CONF_VALUE *ecmd; 98 CONF_VALUE *ecmd;
99 char *ctrlname, *ctrlvalue; 99 char *ctrlname, *ctrlvalue;
100 ENGINE *e = NULL; 100 ENGINE *e = NULL;
101 int soft = 0; 101 int soft = 0;
102 102
103 name = skip_dot(name); 103 name = skip_dot(name);
104#ifdef ENGINE_CONF_DEBUG 104#ifdef ENGINE_CONF_DEBUG
@@ -127,8 +127,8 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
127 /* Override engine name to use */ 127 /* Override engine name to use */
128 if (!strcmp(ctrlname, "engine_id")) 128 if (!strcmp(ctrlname, "engine_id"))
129 name = ctrlvalue; 129 name = ctrlvalue;
130 else if (!strcmp(ctrlname, "soft_load")) 130 else if (!strcmp(ctrlname, "soft_load"))
131 soft = 1; 131 soft = 1;
132 /* Load a dynamic ENGINE */ 132 /* Load a dynamic ENGINE */
133 else if (!strcmp(ctrlname, "dynamic_path")) 133 else if (!strcmp(ctrlname, "dynamic_path"))
134 { 134 {
@@ -151,11 +151,11 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
151 if (!e) 151 if (!e)
152 { 152 {
153 e = ENGINE_by_id(name); 153 e = ENGINE_by_id(name);
154 if (!e && soft) 154 if (!e && soft)
155 { 155 {
156 ERR_clear_error(); 156 ERR_clear_error();
157 return 1; 157 return 1;
158 } 158 }
159 if (!e) 159 if (!e)
160 return 0; 160 return 0;
161 } 161 }
diff --git a/src/lib/libcrypto/engine/enginetest.c b/src/lib/libcrypto/engine/enginetest.c
index cf82f490db..e3834611db 100644
--- a/src/lib/libcrypto/engine/enginetest.c
+++ b/src/lib/libcrypto/engine/enginetest.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <openssl/e_os2.h>
61 62
62#ifdef OPENSSL_NO_ENGINE 63#ifdef OPENSSL_NO_ENGINE
63int main(int argc, char *argv[]) 64int main(int argc, char *argv[])
@@ -66,7 +67,6 @@ int main(int argc, char *argv[])
66 return(0); 67 return(0);
67} 68}
68#else 69#else
69#include <openssl/e_os2.h>
70#include <openssl/buffer.h> 70#include <openssl/buffer.h>
71#include <openssl/crypto.h> 71#include <openssl/crypto.h>
72#include <openssl/engine.h> 72#include <openssl/engine.h>
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c
index 7952e70ab0..292404a2fb 100644
--- a/src/lib/libcrypto/err/err.c
+++ b/src/lib/libcrypto/err/err.c
@@ -119,480 +119,9 @@
119#include <openssl/bio.h> 119#include <openssl/bio.h>
120#include <openssl/err.h> 120#include <openssl/err.h>
121 121
122static void err_load_strings(int lib, ERR_STRING_DATA *str); 122static unsigned long get_error_values(int inc,int top,
123 123 const char **file,int *line,
124static void ERR_STATE_free(ERR_STATE *s); 124 const char **data,int *flags);
125#ifndef OPENSSL_NO_ERR
126static ERR_STRING_DATA ERR_str_libraries[]=
127 {
128{ERR_PACK(ERR_LIB_NONE,0,0) ,"unknown library"},
129{ERR_PACK(ERR_LIB_SYS,0,0) ,"system library"},
130{ERR_PACK(ERR_LIB_BN,0,0) ,"bignum routines"},
131{ERR_PACK(ERR_LIB_RSA,0,0) ,"rsa routines"},
132{ERR_PACK(ERR_LIB_DH,0,0) ,"Diffie-Hellman routines"},
133{ERR_PACK(ERR_LIB_EVP,0,0) ,"digital envelope routines"},
134{ERR_PACK(ERR_LIB_BUF,0,0) ,"memory buffer routines"},
135{ERR_PACK(ERR_LIB_OBJ,0,0) ,"object identifier routines"},
136{ERR_PACK(ERR_LIB_PEM,0,0) ,"PEM routines"},
137{ERR_PACK(ERR_LIB_DSA,0,0) ,"dsa routines"},
138{ERR_PACK(ERR_LIB_X509,0,0) ,"x509 certificate routines"},
139{ERR_PACK(ERR_LIB_ASN1,0,0) ,"asn1 encoding routines"},
140{ERR_PACK(ERR_LIB_CONF,0,0) ,"configuration file routines"},
141{ERR_PACK(ERR_LIB_CRYPTO,0,0) ,"common libcrypto routines"},
142{ERR_PACK(ERR_LIB_EC,0,0) ,"elliptic curve routines"},
143{ERR_PACK(ERR_LIB_SSL,0,0) ,"SSL routines"},
144{ERR_PACK(ERR_LIB_BIO,0,0) ,"BIO routines"},
145{ERR_PACK(ERR_LIB_PKCS7,0,0) ,"PKCS7 routines"},
146{ERR_PACK(ERR_LIB_X509V3,0,0) ,"X509 V3 routines"},
147{ERR_PACK(ERR_LIB_PKCS12,0,0) ,"PKCS12 routines"},
148{ERR_PACK(ERR_LIB_RAND,0,0) ,"random number generator"},
149{ERR_PACK(ERR_LIB_DSO,0,0) ,"DSO support routines"},
150{ERR_PACK(ERR_LIB_ENGINE,0,0) ,"engine routines"},
151{ERR_PACK(ERR_LIB_OCSP,0,0) ,"OCSP routines"},
152{ERR_PACK(ERR_LIB_FIPS,0,0) ,"FIPS routines"},
153{ERR_PACK(ERR_LIB_CMS,0,0) ,"CMS routines"},
154{0,NULL},
155 };
156
157static ERR_STRING_DATA ERR_str_functs[]=
158 {
159 {ERR_PACK(0,SYS_F_FOPEN,0), "fopen"},
160 {ERR_PACK(0,SYS_F_CONNECT,0), "connect"},
161 {ERR_PACK(0,SYS_F_GETSERVBYNAME,0), "getservbyname"},
162 {ERR_PACK(0,SYS_F_SOCKET,0), "socket"},
163 {ERR_PACK(0,SYS_F_IOCTLSOCKET,0), "ioctlsocket"},
164 {ERR_PACK(0,SYS_F_BIND,0), "bind"},
165 {ERR_PACK(0,SYS_F_LISTEN,0), "listen"},
166 {ERR_PACK(0,SYS_F_ACCEPT,0), "accept"},
167#ifdef OPENSSL_SYS_WINDOWS
168 {ERR_PACK(0,SYS_F_WSASTARTUP,0), "WSAstartup"},
169#endif
170 {ERR_PACK(0,SYS_F_OPENDIR,0), "opendir"},
171 {ERR_PACK(0,SYS_F_FREAD,0), "fread"},
172 {0,NULL},
173 };
174
175static ERR_STRING_DATA ERR_str_reasons[]=
176 {
177{ERR_R_SYS_LIB ,"system lib"},
178{ERR_R_BN_LIB ,"BN lib"},
179{ERR_R_RSA_LIB ,"RSA lib"},
180{ERR_R_DH_LIB ,"DH lib"},
181{ERR_R_EVP_LIB ,"EVP lib"},
182{ERR_R_BUF_LIB ,"BUF lib"},
183{ERR_R_OBJ_LIB ,"OBJ lib"},
184{ERR_R_PEM_LIB ,"PEM lib"},
185{ERR_R_DSA_LIB ,"DSA lib"},
186{ERR_R_X509_LIB ,"X509 lib"},
187{ERR_R_ASN1_LIB ,"ASN1 lib"},
188{ERR_R_CONF_LIB ,"CONF lib"},
189{ERR_R_CRYPTO_LIB ,"CRYPTO lib"},
190{ERR_R_EC_LIB ,"EC lib"},
191{ERR_R_SSL_LIB ,"SSL lib"},
192{ERR_R_BIO_LIB ,"BIO lib"},
193{ERR_R_PKCS7_LIB ,"PKCS7 lib"},
194{ERR_R_X509V3_LIB ,"X509V3 lib"},
195{ERR_R_PKCS12_LIB ,"PKCS12 lib"},
196{ERR_R_RAND_LIB ,"RAND lib"},
197{ERR_R_DSO_LIB ,"DSO lib"},
198{ERR_R_ENGINE_LIB ,"ENGINE lib"},
199{ERR_R_OCSP_LIB ,"OCSP lib"},
200
201{ERR_R_NESTED_ASN1_ERROR ,"nested asn1 error"},
202{ERR_R_BAD_ASN1_OBJECT_HEADER ,"bad asn1 object header"},
203{ERR_R_BAD_GET_ASN1_OBJECT_CALL ,"bad get asn1 object call"},
204{ERR_R_EXPECTING_AN_ASN1_SEQUENCE ,"expecting an asn1 sequence"},
205{ERR_R_ASN1_LENGTH_MISMATCH ,"asn1 length mismatch"},
206{ERR_R_MISSING_ASN1_EOS ,"missing asn1 eos"},
207
208{ERR_R_FATAL ,"fatal"},
209{ERR_R_MALLOC_FAILURE ,"malloc failure"},
210{ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED ,"called a function you should not call"},
211{ERR_R_PASSED_NULL_PARAMETER ,"passed a null parameter"},
212{ERR_R_INTERNAL_ERROR ,"internal error"},
213{ERR_R_DISABLED ,"called a function that was disabled at compile-time"},
214
215{0,NULL},
216 };
217#endif
218
219
220/* Define the predeclared (but externally opaque) "ERR_FNS" type */
221struct st_ERR_FNS
222 {
223 /* Works on the "error_hash" string table */
224 LHASH *(*cb_err_get)(int create);
225 void (*cb_err_del)(void);
226 ERR_STRING_DATA *(*cb_err_get_item)(const ERR_STRING_DATA *);
227 ERR_STRING_DATA *(*cb_err_set_item)(ERR_STRING_DATA *);
228 ERR_STRING_DATA *(*cb_err_del_item)(ERR_STRING_DATA *);
229 /* Works on the "thread_hash" error-state table */
230 LHASH *(*cb_thread_get)(int create);
231 void (*cb_thread_release)(LHASH **hash);
232 ERR_STATE *(*cb_thread_get_item)(const ERR_STATE *);
233 ERR_STATE *(*cb_thread_set_item)(ERR_STATE *);
234 void (*cb_thread_del_item)(const ERR_STATE *);
235 /* Returns the next available error "library" numbers */
236 int (*cb_get_next_lib)(void);
237 };
238
239/* Predeclarations of the "err_defaults" functions */
240static LHASH *int_err_get(int create);
241static void int_err_del(void);
242static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *);
243static ERR_STRING_DATA *int_err_set_item(ERR_STRING_DATA *);
244static ERR_STRING_DATA *int_err_del_item(ERR_STRING_DATA *);
245static LHASH *int_thread_get(int create);
246static void int_thread_release(LHASH **hash);
247static ERR_STATE *int_thread_get_item(const ERR_STATE *);
248static ERR_STATE *int_thread_set_item(ERR_STATE *);
249static void int_thread_del_item(const ERR_STATE *);
250static int int_err_get_next_lib(void);
251/* The static ERR_FNS table using these defaults functions */
252static const ERR_FNS err_defaults =
253 {
254 int_err_get,
255 int_err_del,
256 int_err_get_item,
257 int_err_set_item,
258 int_err_del_item,
259 int_thread_get,
260 int_thread_release,
261 int_thread_get_item,
262 int_thread_set_item,
263 int_thread_del_item,
264 int_err_get_next_lib
265 };
266
267/* The replacable table of ERR_FNS functions we use at run-time */
268static const ERR_FNS *err_fns = NULL;
269
270/* Eg. rather than using "err_get()", use "ERRFN(err_get)()". */
271#define ERRFN(a) err_fns->cb_##a
272
273/* The internal state used by "err_defaults" - as such, the setting, reading,
274 * creating, and deleting of this data should only be permitted via the
275 * "err_defaults" functions. This way, a linked module can completely defer all
276 * ERR state operation (together with requisite locking) to the implementations
277 * and state in the loading application. */
278static LHASH *int_error_hash = NULL;
279static LHASH *int_thread_hash = NULL;
280static int int_thread_hash_references = 0;
281static int int_err_library_number= ERR_LIB_USER;
282
283/* Internal function that checks whether "err_fns" is set and if not, sets it to
284 * the defaults. */
285static void err_fns_check(void)
286 {
287 if (err_fns) return;
288
289 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
290 if (!err_fns)
291 err_fns = &err_defaults;
292 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
293 }
294
295/* API functions to get or set the underlying ERR functions. */
296
297const ERR_FNS *ERR_get_implementation(void)
298 {
299 err_fns_check();
300 return err_fns;
301 }
302
303int ERR_set_implementation(const ERR_FNS *fns)
304 {
305 int ret = 0;
306
307 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
308 /* It's too late if 'err_fns' is non-NULL. BTW: not much point setting
309 * an error is there?! */
310 if (!err_fns)
311 {
312 err_fns = fns;
313 ret = 1;
314 }
315 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
316 return ret;
317 }
318
319/* These are the callbacks provided to "lh_new()" when creating the LHASH tables
320 * internal to the "err_defaults" implementation. */
321
322/* static unsigned long err_hash(ERR_STRING_DATA *a); */
323static unsigned long err_hash(const void *a_void);
324/* static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b); */
325static int err_cmp(const void *a_void, const void *b_void);
326/* static unsigned long pid_hash(ERR_STATE *pid); */
327static unsigned long pid_hash(const void *pid_void);
328/* static int pid_cmp(ERR_STATE *a,ERR_STATE *pid); */
329static int pid_cmp(const void *a_void,const void *pid_void);
330static unsigned long get_error_values(int inc,int top,const char **file,int *line,
331 const char **data,int *flags);
332
333/* The internal functions used in the "err_defaults" implementation */
334
335static LHASH *int_err_get(int create)
336 {
337 LHASH *ret = NULL;
338
339 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
340 if (!int_error_hash && create)
341 {
342 CRYPTO_push_info("int_err_get (err.c)");
343 int_error_hash = lh_new(err_hash, err_cmp);
344 CRYPTO_pop_info();
345 }
346 if (int_error_hash)
347 ret = int_error_hash;
348 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
349
350 return ret;
351 }
352
353static void int_err_del(void)
354 {
355 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
356 if (int_error_hash)
357 {
358 lh_free(int_error_hash);
359 int_error_hash = NULL;
360 }
361 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
362 }
363
364static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *d)
365 {
366 ERR_STRING_DATA *p;
367 LHASH *hash;
368
369 err_fns_check();
370 hash = ERRFN(err_get)(0);
371 if (!hash)
372 return NULL;
373
374 CRYPTO_r_lock(CRYPTO_LOCK_ERR);
375 p = (ERR_STRING_DATA *)lh_retrieve(hash, d);
376 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
377
378 return p;
379 }
380
381static ERR_STRING_DATA *int_err_set_item(ERR_STRING_DATA *d)
382 {
383 ERR_STRING_DATA *p;
384 LHASH *hash;
385
386 err_fns_check();
387 hash = ERRFN(err_get)(1);
388 if (!hash)
389 return NULL;
390
391 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
392 p = (ERR_STRING_DATA *)lh_insert(hash, d);
393 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
394
395 return p;
396 }
397
398static ERR_STRING_DATA *int_err_del_item(ERR_STRING_DATA *d)
399 {
400 ERR_STRING_DATA *p;
401 LHASH *hash;
402
403 err_fns_check();
404 hash = ERRFN(err_get)(0);
405 if (!hash)
406 return NULL;
407
408 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
409 p = (ERR_STRING_DATA *)lh_delete(hash, d);
410 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
411
412 return p;
413 }
414
415static LHASH *int_thread_get(int create)
416 {
417 LHASH *ret = NULL;
418
419 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
420 if (!int_thread_hash && create)
421 {
422 CRYPTO_push_info("int_thread_get (err.c)");
423 int_thread_hash = lh_new(pid_hash, pid_cmp);
424 CRYPTO_pop_info();
425 }
426 if (int_thread_hash)
427 {
428 int_thread_hash_references++;
429 ret = int_thread_hash;
430 }
431 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
432 return ret;
433 }
434
435static void int_thread_release(LHASH **hash)
436 {
437 int i;
438
439 if (hash == NULL || *hash == NULL)
440 return;
441
442 i = CRYPTO_add(&int_thread_hash_references, -1, CRYPTO_LOCK_ERR);
443
444#ifdef REF_PRINT
445 fprintf(stderr,"%4d:%s\n",int_thread_hash_references,"ERR");
446#endif
447 if (i > 0) return;
448#ifdef REF_CHECK
449 if (i < 0)
450 {
451 fprintf(stderr,"int_thread_release, bad reference count\n");
452 abort(); /* ok */
453 }
454#endif
455 *hash = NULL;
456 }
457
458static ERR_STATE *int_thread_get_item(const ERR_STATE *d)
459 {
460 ERR_STATE *p;
461 LHASH *hash;
462
463 err_fns_check();
464 hash = ERRFN(thread_get)(0);
465 if (!hash)
466 return NULL;
467
468 CRYPTO_r_lock(CRYPTO_LOCK_ERR);
469 p = (ERR_STATE *)lh_retrieve(hash, d);
470 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
471
472 ERRFN(thread_release)(&hash);
473 return p;
474 }
475
476static ERR_STATE *int_thread_set_item(ERR_STATE *d)
477 {
478 ERR_STATE *p;
479 LHASH *hash;
480
481 err_fns_check();
482 hash = ERRFN(thread_get)(1);
483 if (!hash)
484 return NULL;
485
486 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
487 p = (ERR_STATE *)lh_insert(hash, d);
488 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
489
490 ERRFN(thread_release)(&hash);
491 return p;
492 }
493
494static void int_thread_del_item(const ERR_STATE *d)
495 {
496 ERR_STATE *p;
497 LHASH *hash;
498
499 err_fns_check();
500 hash = ERRFN(thread_get)(0);
501 if (!hash)
502 return;
503
504 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
505 p = (ERR_STATE *)lh_delete(hash, d);
506 /* make sure we don't leak memory */
507 if (int_thread_hash_references == 1
508 && int_thread_hash && (lh_num_items(int_thread_hash) == 0))
509 {
510 lh_free(int_thread_hash);
511 int_thread_hash = NULL;
512 }
513 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
514
515 ERRFN(thread_release)(&hash);
516 if (p)
517 ERR_STATE_free(p);
518 }
519
520static int int_err_get_next_lib(void)
521 {
522 int ret;
523
524 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
525 ret = int_err_library_number++;
526 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
527
528 return ret;
529 }
530
531
532#ifndef OPENSSL_NO_ERR
533#define NUM_SYS_STR_REASONS 127
534#define LEN_SYS_STR_REASON 32
535
536static ERR_STRING_DATA SYS_str_reasons[NUM_SYS_STR_REASONS + 1];
537/* SYS_str_reasons is filled with copies of strerror() results at
538 * initialization.
539 * 'errno' values up to 127 should cover all usual errors,
540 * others will be displayed numerically by ERR_error_string.
541 * It is crucial that we have something for each reason code
542 * that occurs in ERR_str_reasons, or bogus reason strings
543 * will be returned for SYSerr(), which always gets an errno
544 * value and never one of those 'standard' reason codes. */
545
546static void build_SYS_str_reasons(void)
547 {
548 /* OPENSSL_malloc cannot be used here, use static storage instead */
549 static char strerror_tab[NUM_SYS_STR_REASONS][LEN_SYS_STR_REASON];
550 int i;
551 static int init = 1;
552
553 CRYPTO_r_lock(CRYPTO_LOCK_ERR);
554 if (!init)
555 {
556 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
557 return;
558 }
559
560 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
561 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
562 if (!init)
563 {
564 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
565 return;
566 }
567
568 for (i = 1; i <= NUM_SYS_STR_REASONS; i++)
569 {
570 ERR_STRING_DATA *str = &SYS_str_reasons[i - 1];
571
572 str->error = (unsigned long)i;
573 if (str->string == NULL)
574 {
575 char (*dest)[LEN_SYS_STR_REASON] = &(strerror_tab[i - 1]);
576 char *src = strerror(i);
577 if (src != NULL)
578 {
579 strncpy(*dest, src, sizeof *dest);
580 (*dest)[sizeof *dest - 1] = '\0';
581 str->string = *dest;
582 }
583 }
584 if (str->string == NULL)
585 str->string = "unknown";
586 }
587
588 /* Now we still have SYS_str_reasons[NUM_SYS_STR_REASONS] = {0, NULL},
589 * as required by ERR_load_strings. */
590
591 init = 0;
592
593 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
594 }
595#endif
596 125
597#define err_clear_data(p,i) \ 126#define err_clear_data(p,i) \
598 do { \ 127 do { \
@@ -614,68 +143,6 @@ static void build_SYS_str_reasons(void)
614 (p)->err_line[i]= -1; \ 143 (p)->err_line[i]= -1; \
615 } while(0) 144 } while(0)
616 145
617static void ERR_STATE_free(ERR_STATE *s)
618 {
619 int i;
620
621 if (s == NULL)
622 return;
623
624 for (i=0; i<ERR_NUM_ERRORS; i++)
625 {
626 err_clear_data(s,i);
627 }
628 OPENSSL_free(s);
629 }
630
631void ERR_load_ERR_strings(void)
632 {
633 err_fns_check();
634#ifndef OPENSSL_NO_ERR
635 err_load_strings(0,ERR_str_libraries);
636 err_load_strings(0,ERR_str_reasons);
637 err_load_strings(ERR_LIB_SYS,ERR_str_functs);
638 build_SYS_str_reasons();
639 err_load_strings(ERR_LIB_SYS,SYS_str_reasons);
640#endif
641 }
642
643static void err_load_strings(int lib, ERR_STRING_DATA *str)
644 {
645 while (str->error)
646 {
647 if (lib)
648 str->error|=ERR_PACK(lib,0,0);
649 ERRFN(err_set_item)(str);
650 str++;
651 }
652 }
653
654void ERR_load_strings(int lib, ERR_STRING_DATA *str)
655 {
656 ERR_load_ERR_strings();
657 err_load_strings(lib, str);
658 }
659
660void ERR_unload_strings(int lib, ERR_STRING_DATA *str)
661 {
662 while (str->error)
663 {
664 if (lib)
665 str->error|=ERR_PACK(lib,0,0);
666 ERRFN(err_del_item)(str);
667 str++;
668 }
669 }
670
671void ERR_free_strings(void)
672 {
673 err_fns_check();
674 ERRFN(err_del)();
675 }
676
677/********************************************************/
678
679void ERR_put_error(int lib, int func, int reason, const char *file, 146void ERR_put_error(int lib, int func, int reason, const char *file,
680 int line) 147 int line)
681 { 148 {
@@ -830,218 +297,6 @@ static unsigned long get_error_values(int inc, int top, const char **file, int *
830 return ret; 297 return ret;
831 } 298 }
832 299
833void ERR_error_string_n(unsigned long e, char *buf, size_t len)
834 {
835 char lsbuf[64], fsbuf[64], rsbuf[64];
836 const char *ls,*fs,*rs;
837 unsigned long l,f,r;
838
839 l=ERR_GET_LIB(e);
840 f=ERR_GET_FUNC(e);
841 r=ERR_GET_REASON(e);
842
843 ls=ERR_lib_error_string(e);
844 fs=ERR_func_error_string(e);
845 rs=ERR_reason_error_string(e);
846
847 if (ls == NULL)
848 BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
849 if (fs == NULL)
850 BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
851 if (rs == NULL)
852 BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
853
854 BIO_snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf,
855 fs?fs:fsbuf, rs?rs:rsbuf);
856 if (strlen(buf) == len-1)
857 {
858 /* output may be truncated; make sure we always have 5
859 * colon-separated fields, i.e. 4 colons ... */
860#define NUM_COLONS 4
861 if (len > NUM_COLONS) /* ... if possible */
862 {
863 int i;
864 char *s = buf;
865
866 for (i = 0; i < NUM_COLONS; i++)
867 {
868 char *colon = strchr(s, ':');
869 if (colon == NULL || colon > &buf[len-1] - NUM_COLONS + i)
870 {
871 /* set colon no. i at last possible position
872 * (buf[len-1] is the terminating 0)*/
873 colon = &buf[len-1] - NUM_COLONS + i;
874 *colon = ':';
875 }
876 s = colon + 1;
877 }
878 }
879 }
880 }
881
882/* BAD for multi-threading: uses a local buffer if ret == NULL */
883/* ERR_error_string_n should be used instead for ret != NULL
884 * as ERR_error_string cannot know how large the buffer is */
885char *ERR_error_string(unsigned long e, char *ret)
886 {
887 static char buf[256];
888
889 if (ret == NULL) ret=buf;
890 ERR_error_string_n(e, ret, 256);
891
892 return ret;
893 }
894
895LHASH *ERR_get_string_table(void)
896 {
897 err_fns_check();
898 return ERRFN(err_get)(0);
899 }
900
901LHASH *ERR_get_err_state_table(void)
902 {
903 err_fns_check();
904 return ERRFN(thread_get)(0);
905 }
906
907void ERR_release_err_state_table(LHASH **hash)
908 {
909 err_fns_check();
910 ERRFN(thread_release)(hash);
911 }
912
913const char *ERR_lib_error_string(unsigned long e)
914 {
915 ERR_STRING_DATA d,*p;
916 unsigned long l;
917
918 err_fns_check();
919 l=ERR_GET_LIB(e);
920 d.error=ERR_PACK(l,0,0);
921 p=ERRFN(err_get_item)(&d);
922 return((p == NULL)?NULL:p->string);
923 }
924
925const char *ERR_func_error_string(unsigned long e)
926 {
927 ERR_STRING_DATA d,*p;
928 unsigned long l,f;
929
930 err_fns_check();
931 l=ERR_GET_LIB(e);
932 f=ERR_GET_FUNC(e);
933 d.error=ERR_PACK(l,f,0);
934 p=ERRFN(err_get_item)(&d);
935 return((p == NULL)?NULL:p->string);
936 }
937
938const char *ERR_reason_error_string(unsigned long e)
939 {
940 ERR_STRING_DATA d,*p=NULL;
941 unsigned long l,r;
942
943 err_fns_check();
944 l=ERR_GET_LIB(e);
945 r=ERR_GET_REASON(e);
946 d.error=ERR_PACK(l,0,r);
947 p=ERRFN(err_get_item)(&d);
948 if (!p)
949 {
950 d.error=ERR_PACK(0,0,r);
951 p=ERRFN(err_get_item)(&d);
952 }
953 return((p == NULL)?NULL:p->string);
954 }
955
956/* static unsigned long err_hash(ERR_STRING_DATA *a) */
957static unsigned long err_hash(const void *a_void)
958 {
959 unsigned long ret,l;
960
961 l=((const ERR_STRING_DATA *)a_void)->error;
962 ret=l^ERR_GET_LIB(l)^ERR_GET_FUNC(l);
963 return(ret^ret%19*13);
964 }
965
966/* static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b) */
967static int err_cmp(const void *a_void, const void *b_void)
968 {
969 return((int)(((const ERR_STRING_DATA *)a_void)->error -
970 ((const ERR_STRING_DATA *)b_void)->error));
971 }
972
973/* static unsigned long pid_hash(ERR_STATE *a) */
974static unsigned long pid_hash(const void *a_void)
975 {
976 return(((const ERR_STATE *)a_void)->pid*13);
977 }
978
979/* static int pid_cmp(ERR_STATE *a, ERR_STATE *b) */
980static int pid_cmp(const void *a_void, const void *b_void)
981 {
982 return((int)((long)((const ERR_STATE *)a_void)->pid -
983 (long)((const ERR_STATE *)b_void)->pid));
984 }
985
986void ERR_remove_state(unsigned long pid)
987 {
988 ERR_STATE tmp;
989
990 err_fns_check();
991 if (pid == 0)
992 pid=(unsigned long)CRYPTO_thread_id();
993 tmp.pid=pid;
994 /* thread_del_item automatically destroys the LHASH if the number of
995 * items reaches zero. */
996 ERRFN(thread_del_item)(&tmp);
997 }
998
999ERR_STATE *ERR_get_state(void)
1000 {
1001 static ERR_STATE fallback;
1002 ERR_STATE *ret,tmp,*tmpp=NULL;
1003 int i;
1004 unsigned long pid;
1005
1006 err_fns_check();
1007 pid=(unsigned long)CRYPTO_thread_id();
1008 tmp.pid=pid;
1009 ret=ERRFN(thread_get_item)(&tmp);
1010
1011 /* ret == the error state, if NULL, make a new one */
1012 if (ret == NULL)
1013 {
1014 ret=(ERR_STATE *)OPENSSL_malloc(sizeof(ERR_STATE));
1015 if (ret == NULL) return(&fallback);
1016 ret->pid=pid;
1017 ret->top=0;
1018 ret->bottom=0;
1019 for (i=0; i<ERR_NUM_ERRORS; i++)
1020 {
1021 ret->err_data[i]=NULL;
1022 ret->err_data_flags[i]=0;
1023 }
1024 tmpp = ERRFN(thread_set_item)(ret);
1025 /* To check if insertion failed, do a get. */
1026 if (ERRFN(thread_get_item)(ret) != ret)
1027 {
1028 ERR_STATE_free(ret); /* could not insert it */
1029 return(&fallback);
1030 }
1031 /* If a race occured in this function and we came second, tmpp
1032 * is the first one that we just replaced. */
1033 if (tmpp)
1034 ERR_STATE_free(tmpp);
1035 }
1036 return ret;
1037 }
1038
1039int ERR_get_next_error_library(void)
1040 {
1041 err_fns_check();
1042 return ERRFN(get_next_lib)();
1043 }
1044
1045void ERR_set_error_data(char *data, int flags) 300void ERR_set_error_data(char *data, int flags)
1046 { 301 {
1047 ERR_STATE *es; 302 ERR_STATE *es;
@@ -1128,3 +383,34 @@ int ERR_pop_to_mark(void)
1128 es->err_flags[es->top]&=~ERR_FLAG_MARK; 383 es->err_flags[es->top]&=~ERR_FLAG_MARK;
1129 return 1; 384 return 1;
1130 } 385 }
386
387#ifdef OPENSSL_FIPS
388
389static ERR_STATE *fget_state(void)
390 {
391 static ERR_STATE fstate;
392 return &fstate;
393 }
394
395ERR_STATE *(*get_state_func)(void) = fget_state;
396void (*remove_state_func)(unsigned long pid);
397
398ERR_STATE *ERR_get_state(void)
399 {
400 return get_state_func();
401 }
402
403void int_ERR_set_state_func(ERR_STATE *(*get_func)(void),
404 void (*remove_func)(unsigned long pid))
405 {
406 get_state_func = get_func;
407 remove_state_func = remove_func;
408 }
409
410void ERR_remove_state(unsigned long pid)
411 {
412 if (remove_state_func)
413 remove_state_func(pid);
414 }
415
416#endif
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h
index 8d9f0da172..dcac415231 100644
--- a/src/lib/libcrypto/err/err.h
+++ b/src/lib/libcrypto/err/err.h
@@ -142,6 +142,7 @@ typedef struct err_state_st
142#define ERR_LIB_STORE 44 142#define ERR_LIB_STORE 44
143#define ERR_LIB_FIPS 45 143#define ERR_LIB_FIPS 45
144#define ERR_LIB_CMS 46 144#define ERR_LIB_CMS 46
145#define ERR_LIB_JPAKE 47
145 146
146#define ERR_LIB_USER 128 147#define ERR_LIB_USER 128
147 148
@@ -175,6 +176,7 @@ typedef struct err_state_st
175#define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__) 176#define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__)
176#define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__) 177#define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__)
177#define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__) 178#define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__)
179#define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__)
178 180
179/* Borland C seems too stupid to be able to shift and do longs in 181/* Borland C seems too stupid to be able to shift and do longs in
180 * the pre-processor :-( */ 182 * the pre-processor :-( */
@@ -306,6 +308,12 @@ int ERR_get_next_error_library(void);
306int ERR_set_mark(void); 308int ERR_set_mark(void);
307int ERR_pop_to_mark(void); 309int ERR_pop_to_mark(void);
308 310
311#ifdef OPENSSL_FIPS
312void int_ERR_set_state_func(ERR_STATE *(*get_func)(void),
313 void (*remove_func)(unsigned long pid));
314void int_ERR_lib_init(void);
315#endif
316
309/* Already defined in ossl_typ.h */ 317/* Already defined in ossl_typ.h */
310/* typedef struct st_ERR_FNS ERR_FNS; */ 318/* typedef struct st_ERR_FNS ERR_FNS; */
311/* An application can use this function and provide the return value to loaded 319/* An application can use this function and provide the return value to loaded
diff --git a/src/lib/libcrypto/err/err_all.c b/src/lib/libcrypto/err/err_all.c
index 5813060ce2..f21a5276ed 100644
--- a/src/lib/libcrypto/err/err_all.c
+++ b/src/lib/libcrypto/err/err_all.c
@@ -94,9 +94,16 @@
94#include <openssl/ui.h> 94#include <openssl/ui.h>
95#include <openssl/ocsp.h> 95#include <openssl/ocsp.h>
96#include <openssl/err.h> 96#include <openssl/err.h>
97#ifdef OPENSSL_FIPS
98#include <openssl/fips.h>
99#endif
100
97#ifndef OPENSSL_NO_CMS 101#ifndef OPENSSL_NO_CMS
98#include <openssl/cms.h> 102#include <openssl/cms.h>
99#endif 103#endif
104#ifndef OPENSSL_NO_JPAKE
105#include <openssl/jpake.h>
106#endif
100 107
101void ERR_load_crypto_strings(void) 108void ERR_load_crypto_strings(void)
102 { 109 {
@@ -141,8 +148,14 @@ void ERR_load_crypto_strings(void)
141#endif 148#endif
142 ERR_load_OCSP_strings(); 149 ERR_load_OCSP_strings();
143 ERR_load_UI_strings(); 150 ERR_load_UI_strings();
151#ifdef OPENSSL_FIPS
152 ERR_load_FIPS_strings();
153#endif
144#ifndef OPENSSL_NO_CMS 154#ifndef OPENSSL_NO_CMS
145 ERR_load_CMS_strings(); 155 ERR_load_CMS_strings();
146#endif 156#endif
157#ifndef OPENSSL_NO_JPAKE
158 ERR_load_JPAKE_strings();
159#endif
147#endif 160#endif
148 } 161 }
diff --git a/src/lib/libcrypto/err/err_prn.c b/src/lib/libcrypto/err/err_prn.c
index 2224a901e5..4cdf342fa6 100644
--- a/src/lib/libcrypto/err/err_prn.c
+++ b/src/lib/libcrypto/err/err_prn.c
@@ -86,12 +86,7 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
86#ifndef OPENSSL_NO_FP_API 86#ifndef OPENSSL_NO_FP_API
87static int print_fp(const char *str, size_t len, void *fp) 87static int print_fp(const char *str, size_t len, void *fp)
88 { 88 {
89 BIO bio; 89 return fwrite(str, 1, len, fp);
90
91 BIO_set(&bio,BIO_s_file());
92 BIO_set_fp(&bio,fp,BIO_NOCLOSE);
93
94 return BIO_printf(&bio, "%s", str);
95 } 90 }
96void ERR_print_errors_fp(FILE *fp) 91void ERR_print_errors_fp(FILE *fp)
97 { 92 {
@@ -99,13 +94,64 @@ void ERR_print_errors_fp(FILE *fp)
99 } 94 }
100#endif 95#endif
101 96
102static int print_bio(const char *str, size_t len, void *bp) 97void ERR_error_string_n(unsigned long e, char *buf, size_t len)
103 { 98 {
104 return BIO_write((BIO *)bp, str, len); 99 char lsbuf[64], fsbuf[64], rsbuf[64];
100 const char *ls,*fs,*rs;
101 unsigned long l,f,r;
102
103 l=ERR_GET_LIB(e);
104 f=ERR_GET_FUNC(e);
105 r=ERR_GET_REASON(e);
106
107 ls=ERR_lib_error_string(e);
108 fs=ERR_func_error_string(e);
109 rs=ERR_reason_error_string(e);
110
111 if (ls == NULL)
112 BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
113 if (fs == NULL)
114 BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
115 if (rs == NULL)
116 BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
117
118 BIO_snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf,
119 fs?fs:fsbuf, rs?rs:rsbuf);
120 if (strlen(buf) == len-1)
121 {
122 /* output may be truncated; make sure we always have 5
123 * colon-separated fields, i.e. 4 colons ... */
124#define NUM_COLONS 4
125 if (len > NUM_COLONS) /* ... if possible */
126 {
127 int i;
128 char *s = buf;
129
130 for (i = 0; i < NUM_COLONS; i++)
131 {
132 char *colon = strchr(s, ':');
133 if (colon == NULL || colon > &buf[len-1] - NUM_COLONS + i)
134 {
135 /* set colon no. i at last possible position
136 * (buf[len-1] is the terminating 0)*/
137 colon = &buf[len-1] - NUM_COLONS + i;
138 *colon = ':';
139 }
140 s = colon + 1;
141 }
142 }
143 }
105 } 144 }
106void ERR_print_errors(BIO *bp) 145
146/* BAD for multi-threading: uses a local buffer if ret == NULL */
147/* ERR_error_string_n should be used instead for ret != NULL
148 * as ERR_error_string cannot know how large the buffer is */
149char *ERR_error_string(unsigned long e, char *ret)
107 { 150 {
108 ERR_print_errors_cb(print_bio, bp); 151 static char buf[256];
109 } 152
153 if (ret == NULL) ret=buf;
154 ERR_error_string_n(e, ret, 256);
110 155
111 156 return ret;
157 }
diff --git a/src/lib/libcrypto/err/openssl.ec b/src/lib/libcrypto/err/openssl.ec
index 1938f081ac..868826624d 100644
--- a/src/lib/libcrypto/err/openssl.ec
+++ b/src/lib/libcrypto/err/openssl.ec
@@ -31,7 +31,9 @@ L COMP crypto/comp/comp.h crypto/comp/comp_err.c
31L ECDSA crypto/ecdsa/ecdsa.h crypto/ecdsa/ecs_err.c 31L ECDSA crypto/ecdsa/ecdsa.h crypto/ecdsa/ecs_err.c
32L ECDH crypto/ecdh/ecdh.h crypto/ecdh/ech_err.c 32L ECDH crypto/ecdh/ecdh.h crypto/ecdh/ech_err.c
33L STORE crypto/store/store.h crypto/store/str_err.c 33L STORE crypto/store/store.h crypto/store/str_err.c
34L FIPS fips/fips.h crypto/fips_err.h
34L CMS crypto/cms/cms.h crypto/cms/cms_err.c 35L CMS crypto/cms/cms.h crypto/cms/cms_err.c
36L JPAKE crypto/jpake/jpake.h crypto/jpake/jpake_err.c
35 37
36# additional header files to be scanned for function names 38# additional header files to be scanned for function names
37L NONE crypto/x509/x509_vfy.h NONE 39L NONE crypto/x509/x509_vfy.h NONE
diff --git a/src/lib/libcrypto/evp/Makefile b/src/lib/libcrypto/evp/Makefile
index 9de56dc03d..c204f84c1d 100644
--- a/src/lib/libcrypto/evp/Makefile
+++ b/src/lib/libcrypto/evp/Makefile
@@ -18,10 +18,10 @@ TESTDATA=evptests.txt
18APPS= 18APPS=
19 19
20LIB=$(TOP)/libcrypto.a 20LIB=$(TOP)/libcrypto.a
21LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \ 21LIBSRC= encode.c digest.c dig_eng.c evp_enc.c evp_key.c evp_acnf.c evp_cnf.c \
22 e_des.c e_bf.c e_idea.c e_des3.c e_camellia.c\ 22 e_des.c e_bf.c e_idea.c e_des3.c e_camellia.c\
23 e_rc4.c e_aes.c names.c e_seed.c \ 23 e_rc4.c e_aes.c names.c e_seed.c \
24 e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \ 24 e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c enc_min.c \
25 m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \ 25 m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \
26 m_dss.c m_dss1.c m_mdc2.c m_ripemd.c m_ecdsa.c\ 26 m_dss.c m_dss1.c m_mdc2.c m_ripemd.c m_ecdsa.c\
27 p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ 27 p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \
@@ -30,10 +30,10 @@ LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \
30 evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \ 30 evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \
31 e_old.c 31 e_old.c
32 32
33LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \ 33LIBOBJ= encode.o digest.o dig_eng.o evp_enc.o evp_key.o evp_acnf.o evp_cnf.o \
34 e_des.o e_bf.o e_idea.o e_des3.o e_camellia.o\ 34 e_des.o e_bf.o e_idea.o e_des3.o e_camellia.o\
35 e_rc4.o e_aes.o names.o e_seed.o \ 35 e_rc4.o e_aes.o names.o e_seed.o \
36 e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \ 36 e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o enc_min.o \
37 m_null.o m_md2.o m_md4.o m_md5.o m_sha.o m_sha1.o \ 37 m_null.o m_md2.o m_md4.o m_md5.o m_sha.o m_sha1.o \
38 m_dss.o m_dss1.o m_mdc2.o m_ripemd.o m_ecdsa.o\ 38 m_dss.o m_dss1.o m_mdc2.o m_ripemd.o m_ecdsa.o\
39 p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \ 39 p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \
@@ -55,7 +55,7 @@ top:
55all: lib 55all: lib
56 56
57lib: $(LIBOBJ) 57lib: $(LIBOBJ)
58 $(AR) $(LIB) $(LIBOBJ) 58 $(ARX) $(LIB) $(LIBOBJ)
59 $(RANLIB) $(LIB) || echo Never mind. 59 $(RANLIB) $(LIB) || echo Never mind.
60 @touch lib 60 @touch lib
61 61
@@ -101,177 +101,201 @@ bio_b64.o: ../../e_os.h ../../include/openssl/asn1.h
101bio_b64.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 101bio_b64.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
102bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 102bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
103bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h 103bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h
104bio_b64.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 104bio_b64.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
105bio_b64.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 105bio_b64.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
106bio_b64.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 106bio_b64.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
107bio_b64.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 107bio_b64.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
108bio_b64.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_b64.c 108bio_b64.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
109bio_b64.o: ../cryptlib.h bio_b64.c
109bio_enc.o: ../../e_os.h ../../include/openssl/asn1.h 110bio_enc.o: ../../e_os.h ../../include/openssl/asn1.h
110bio_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 111bio_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
111bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 112bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
112bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 113bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
113bio_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 114bio_enc.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
114bio_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 115bio_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
115bio_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 116bio_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
116bio_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 117bio_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
117bio_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_enc.c 118bio_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
119bio_enc.o: ../cryptlib.h bio_enc.c
118bio_md.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 120bio_md.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
119bio_md.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 121bio_md.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
120bio_md.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 122bio_md.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
121bio_md.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 123bio_md.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
122bio_md.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 124bio_md.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
123bio_md.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 125bio_md.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
124bio_md.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 126bio_md.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
125bio_md.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 127bio_md.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
126bio_md.o: ../cryptlib.h bio_md.c 128bio_md.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_md.c
127bio_ok.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 129bio_ok.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
128bio_ok.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 130bio_ok.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
129bio_ok.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 131bio_ok.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
130bio_ok.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 132bio_ok.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
131bio_ok.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 133bio_ok.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
132bio_ok.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 134bio_ok.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
133bio_ok.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 135bio_ok.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
134bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 136bio_ok.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
135bio_ok.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_ok.c 137bio_ok.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
138bio_ok.o: ../cryptlib.h bio_ok.c
136c_all.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 139c_all.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
137c_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 140c_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
138c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 141c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
139c_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 142c_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
140c_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h 143c_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h
141c_all.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 144c_all.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
142c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 145c_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
143c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 146c_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
144c_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 147c_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
145c_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 148c_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
146c_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 149c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
147c_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 150c_all.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
148c_all.o: ../cryptlib.h c_all.c 151c_all.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_all.c
149c_allc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 152c_allc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
150c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 153c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
151c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 154c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
152c_allc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 155c_allc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
153c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 156c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
154c_allc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 157c_allc.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
155c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 158c_allc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
156c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 159c_allc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
157c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h 160c_allc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
158c_allc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 161c_allc.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
159c_allc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 162c_allc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
160c_allc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 163c_allc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
161c_allc.o: ../cryptlib.h c_allc.c 164c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_allc.c
162c_alld.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 165c_alld.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
163c_alld.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 166c_alld.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
164c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 167c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
165c_alld.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 168c_alld.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
166c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h 169c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h
167c_alld.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 170c_alld.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
168c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 171c_alld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
169c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 172c_alld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
170c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h 173c_alld.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
171c_alld.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 174c_alld.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
172c_alld.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 175c_alld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
173c_alld.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 176c_alld.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
174c_alld.o: ../cryptlib.h c_alld.c 177c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_alld.c
178dig_eng.o: ../../e_os.h ../../include/openssl/asn1.h
179dig_eng.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
180dig_eng.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
181dig_eng.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
182dig_eng.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
183dig_eng.o: ../../include/openssl/err.h ../../include/openssl/evp.h
184dig_eng.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
185dig_eng.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
186dig_eng.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
187dig_eng.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
188dig_eng.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
189dig_eng.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
190dig_eng.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
191dig_eng.o: ../cryptlib.h dig_eng.c evp_locl.h
175digest.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 192digest.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
176digest.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 193digest.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
177digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 194digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
178digest.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 195digest.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
179digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h 196digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h
180digest.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 197digest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
181digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 198digest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
182digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 199digest.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
183digest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 200digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
184digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 201digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
185digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 202digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
186digest.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 203digest.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
187digest.o: ../cryptlib.h digest.c 204digest.o: ../../include/openssl/x509_vfy.h ../cryptlib.h digest.c evp_locl.h
188e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h 205e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
189e_aes.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h 206e_aes.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
190e_aes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 207e_aes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
191e_aes.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 208e_aes.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
192e_aes.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 209e_aes.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
193e_aes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 210e_aes.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
194e_aes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 211e_aes.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
195e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h e_aes.c 212e_aes.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
196e_aes.o: evp_locl.h 213e_aes.o: ../../include/openssl/symhacks.h e_aes.c evp_locl.h
197e_bf.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 214e_bf.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
198e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/buffer.h 215e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/buffer.h
199e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 216e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
200e_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h 217e_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
201e_bf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 218e_bf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
202e_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 219e_bf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
203e_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 220e_bf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
204e_bf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 221e_bf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
205e_bf.o: ../../include/openssl/symhacks.h ../cryptlib.h e_bf.c evp_locl.h 222e_bf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
223e_bf.o: ../cryptlib.h e_bf.c evp_locl.h
206e_camellia.o: ../../include/openssl/opensslconf.h e_camellia.c 224e_camellia.o: ../../include/openssl/opensslconf.h e_camellia.c
207e_cast.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 225e_cast.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
208e_cast.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 226e_cast.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
209e_cast.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 227e_cast.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
210e_cast.o: ../../include/openssl/err.h ../../include/openssl/evp.h 228e_cast.o: ../../include/openssl/err.h ../../include/openssl/evp.h
211e_cast.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 229e_cast.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
212e_cast.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 230e_cast.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
213e_cast.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 231e_cast.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
214e_cast.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 232e_cast.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
215e_cast.o: ../../include/openssl/symhacks.h ../cryptlib.h e_cast.c evp_locl.h 233e_cast.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
234e_cast.o: ../cryptlib.h e_cast.c evp_locl.h
216e_des.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 235e_des.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
217e_des.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 236e_des.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
218e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h 237e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
219e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 238e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
220e_des.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 239e_des.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
221e_des.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 240e_des.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
222e_des.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 241e_des.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
223e_des.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 242e_des.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
224e_des.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 243e_des.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
225e_des.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h 244e_des.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
226e_des.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des.c evp_locl.h 245e_des.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
246e_des.o: ../cryptlib.h e_des.c evp_locl.h
227e_des3.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 247e_des3.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
228e_des3.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 248e_des3.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
229e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h 249e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
230e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 250e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
231e_des3.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 251e_des3.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
232e_des3.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 252e_des3.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
233e_des3.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 253e_des3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
234e_des3.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 254e_des3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
235e_des3.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 255e_des3.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
236e_des3.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h 256e_des3.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
237e_des3.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des3.c evp_locl.h 257e_des3.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
258e_des3.o: ../cryptlib.h e_des3.c evp_locl.h
238e_idea.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 259e_idea.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
239e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 260e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
240e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 261e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
241e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h 262e_idea.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
242e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 263e_idea.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
243e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 264e_idea.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
244e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 265e_idea.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
245e_idea.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 266e_idea.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
246e_idea.o: ../../include/openssl/symhacks.h ../cryptlib.h e_idea.c evp_locl.h 267e_idea.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
268e_idea.o: ../cryptlib.h e_idea.c evp_locl.h
247e_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 269e_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
248e_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 270e_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
249e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 271e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
250e_null.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 272e_null.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
251e_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 273e_null.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
252e_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 274e_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
253e_null.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 275e_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
254e_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 276e_null.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
255e_null.o: ../cryptlib.h e_null.c 277e_null.o: ../../include/openssl/symhacks.h ../cryptlib.h e_null.c
256e_old.o: e_old.c 278e_old.o: e_old.c
257e_rc2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 279e_rc2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
258e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 280e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
259e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 281e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
260e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 282e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
261e_rc2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 283e_rc2.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
262e_rc2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 284e_rc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
263e_rc2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h 285e_rc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
264e_rc2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 286e_rc2.o: ../../include/openssl/rc2.h ../../include/openssl/safestack.h
265e_rc2.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc2.c evp_locl.h 287e_rc2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
288e_rc2.o: ../cryptlib.h e_rc2.c evp_locl.h
266e_rc4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 289e_rc4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
267e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 290e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
268e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 291e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
269e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 292e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
270e_rc4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 293e_rc4.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
271e_rc4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 294e_rc4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
272e_rc4.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc4.h 295e_rc4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
273e_rc4.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 296e_rc4.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
274e_rc4.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc4.c 297e_rc4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
298e_rc4.o: ../cryptlib.h e_rc4.c evp_locl.h
275e_rc5.o: ../../e_os.h ../../include/openssl/bio.h 299e_rc5.o: ../../e_os.h ../../include/openssl/bio.h
276e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 300e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
277e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 301e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
@@ -282,107 +306,141 @@ e_rc5.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc5.c
282e_seed.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 306e_seed.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
283e_seed.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 307e_seed.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
284e_seed.o: ../../include/openssl/err.h ../../include/openssl/evp.h 308e_seed.o: ../../include/openssl/err.h ../../include/openssl/evp.h
285e_seed.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 309e_seed.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
286e_seed.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 310e_seed.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
287e_seed.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 311e_seed.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
288e_seed.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 312e_seed.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
289e_seed.o: ../../include/openssl/symhacks.h e_seed.c 313e_seed.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
314e_seed.o: e_seed.c
290e_xcbc_d.o: ../../e_os.h ../../include/openssl/asn1.h 315e_xcbc_d.o: ../../e_os.h ../../include/openssl/asn1.h
291e_xcbc_d.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 316e_xcbc_d.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
292e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h 317e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
293e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h 318e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
294e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h 319e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
295e_xcbc_d.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 320e_xcbc_d.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
296e_xcbc_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 321e_xcbc_d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
322e_xcbc_d.o: ../../include/openssl/opensslconf.h
297e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 323e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
298e_xcbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 324e_xcbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
299e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h 325e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
300e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c 326e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c
327enc_min.o: ../../e_os.h ../../include/openssl/asn1.h
328enc_min.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
329enc_min.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
330enc_min.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
331enc_min.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
332enc_min.o: ../../include/openssl/err.h ../../include/openssl/evp.h
333enc_min.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
334enc_min.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
335enc_min.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
336enc_min.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
337enc_min.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
338enc_min.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
339enc_min.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
340enc_min.o: ../../include/openssl/x509_vfy.h ../cryptlib.h enc_min.c evp_locl.h
301encode.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 341encode.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
302encode.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 342encode.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
303encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 343encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
304encode.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 344encode.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
305encode.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 345encode.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
306encode.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 346encode.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
307encode.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 347encode.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
308encode.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 348encode.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
309encode.o: ../cryptlib.h encode.c 349encode.o: ../../include/openssl/symhacks.h ../cryptlib.h encode.c
310evp_acnf.o: ../../e_os.h ../../include/openssl/asn1.h 350evp_acnf.o: ../../e_os.h ../../include/openssl/asn1.h
311evp_acnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 351evp_acnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
312evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h 352evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
313evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 353evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
314evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 354evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
315evp_acnf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 355evp_acnf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
316evp_acnf.o: ../../include/openssl/opensslconf.h 356evp_acnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
317evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 357evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
318evp_acnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 358evp_acnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
319evp_acnf.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_acnf.c 359evp_acnf.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_acnf.c
360evp_cnf.o: ../../e_os.h ../../include/openssl/asn1.h
361evp_cnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
362evp_cnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
363evp_cnf.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
364evp_cnf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
365evp_cnf.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
366evp_cnf.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
367evp_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
368evp_cnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
369evp_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
370evp_cnf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
371evp_cnf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
372evp_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
373evp_cnf.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
374evp_cnf.o: ../cryptlib.h evp_cnf.c
320evp_enc.o: ../../e_os.h ../../include/openssl/asn1.h 375evp_enc.o: ../../e_os.h ../../include/openssl/asn1.h
321evp_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 376evp_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
322evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 377evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
323evp_enc.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 378evp_enc.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
324evp_enc.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 379evp_enc.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
325evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 380evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
326evp_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 381evp_enc.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
327evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 382evp_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
328evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 383evp_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
329evp_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 384evp_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
330evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 385evp_enc.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
331evp_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 386evp_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
332evp_enc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 387evp_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
333evp_enc.o: ../cryptlib.h evp_enc.c evp_locl.h 388evp_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_enc.c evp_locl.h
334evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 389evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
335evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 390evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
336evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h 391evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h
337evp_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 392evp_err.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
338evp_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 393evp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
339evp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 394evp_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
340evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 395evp_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
341evp_err.o: ../../include/openssl/symhacks.h evp_err.c 396evp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
397evp_err.o: evp_err.c
342evp_key.o: ../../e_os.h ../../include/openssl/asn1.h 398evp_key.o: ../../e_os.h ../../include/openssl/asn1.h
343evp_key.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 399evp_key.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
344evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 400evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
345evp_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 401evp_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
346evp_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 402evp_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
347evp_key.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 403evp_key.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
348evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 404evp_key.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
349evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 405evp_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
350evp_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 406evp_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
351evp_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 407evp_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
352evp_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 408evp_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
353evp_key.o: ../../include/openssl/ui.h ../../include/openssl/x509.h 409evp_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
354evp_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_key.c 410evp_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
411evp_key.o: ../cryptlib.h evp_key.c
355evp_lib.o: ../../e_os.h ../../include/openssl/asn1.h 412evp_lib.o: ../../e_os.h ../../include/openssl/asn1.h
356evp_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 413evp_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
357evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 414evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
358evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h 415evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
359evp_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 416evp_lib.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
360evp_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 417evp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
361evp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 418evp_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
362evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 419evp_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
363evp_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_lib.c 420evp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
421evp_lib.o: ../cryptlib.h evp_lib.c
364evp_pbe.o: ../../e_os.h ../../include/openssl/asn1.h 422evp_pbe.o: ../../e_os.h ../../include/openssl/asn1.h
365evp_pbe.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 423evp_pbe.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
366evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 424evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
367evp_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 425evp_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
368evp_pbe.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 426evp_pbe.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
369evp_pbe.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 427evp_pbe.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
370evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 428evp_pbe.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
371evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 429evp_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
372evp_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 430evp_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
373evp_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 431evp_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
374evp_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 432evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
375evp_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 433evp_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
376evp_pbe.o: ../cryptlib.h evp_pbe.c 434evp_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pbe.c
377evp_pkey.o: ../../e_os.h ../../include/openssl/asn1.h 435evp_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
378evp_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 436evp_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
379evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 437evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
380evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 438evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
381evp_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 439evp_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
382evp_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 440evp_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
383evp_pkey.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 441evp_pkey.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
384evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 442evp_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
385evp_pkey.o: ../../include/openssl/opensslconf.h 443evp_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
386evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 444evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
387evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 445evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
388evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 446evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
@@ -394,106 +452,110 @@ m_dss.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
394m_dss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 452m_dss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
395m_dss.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 453m_dss.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
396m_dss.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 454m_dss.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
397m_dss.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 455m_dss.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
398m_dss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 456m_dss.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
399m_dss.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 457m_dss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
400m_dss.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 458m_dss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
401m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 459m_dss.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
402m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 460m_dss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
403m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 461m_dss.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
404m_dss.o: ../cryptlib.h m_dss.c 462m_dss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_dss.c
405m_dss1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 463m_dss1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
406m_dss1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 464m_dss1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
407m_dss1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 465m_dss1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
408m_dss1.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 466m_dss1.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
409m_dss1.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 467m_dss1.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
410m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 468m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
411m_dss1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 469m_dss1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
412m_dss1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 470m_dss1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
413m_dss1.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 471m_dss1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
414m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 472m_dss1.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
415m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 473m_dss1.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
416m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 474m_dss1.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
417m_dss1.o: ../cryptlib.h m_dss1.c 475m_dss1.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_dss1.c
418m_ecdsa.o: ../../e_os.h ../../include/openssl/asn1.h 476m_ecdsa.o: ../../e_os.h ../../include/openssl/asn1.h
419m_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 477m_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
420m_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 478m_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
421m_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 479m_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
422m_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 480m_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
423m_ecdsa.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 481m_ecdsa.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
424m_ecdsa.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 482m_ecdsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
425m_ecdsa.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 483m_ecdsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
426m_ecdsa.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 484m_ecdsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
427m_ecdsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 485m_ecdsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
428m_ecdsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 486m_ecdsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
429m_ecdsa.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 487m_ecdsa.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
430m_ecdsa.o: ../cryptlib.h m_ecdsa.c 488m_ecdsa.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_ecdsa.c
431m_md2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 489m_md2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
432m_md2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 490m_md2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
433m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 491m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
434m_md2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 492m_md2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
435m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h 493m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
436m_md2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h 494m_md2.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
437m_md2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 495m_md2.o: ../../include/openssl/md2.h ../../include/openssl/obj_mac.h
438m_md2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 496m_md2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
439m_md2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 497m_md2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
440m_md2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 498m_md2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
441m_md2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 499m_md2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
442m_md2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 500m_md2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
443m_md2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md2.c 501m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
502m_md2.o: ../cryptlib.h evp_locl.h m_md2.c
444m_md4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 503m_md4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
445m_md4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 504m_md4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
446m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 505m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
447m_md4.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 506m_md4.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
448m_md4.o: ../../include/openssl/err.h ../../include/openssl/evp.h 507m_md4.o: ../../include/openssl/err.h ../../include/openssl/evp.h
449m_md4.o: ../../include/openssl/lhash.h ../../include/openssl/md4.h 508m_md4.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
450m_md4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 509m_md4.o: ../../include/openssl/md4.h ../../include/openssl/obj_mac.h
451m_md4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 510m_md4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
452m_md4.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 511m_md4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
453m_md4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 512m_md4.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
454m_md4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 513m_md4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
455m_md4.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 514m_md4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
456m_md4.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md4.c 515m_md4.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
516m_md4.o: ../cryptlib.h evp_locl.h m_md4.c
457m_md5.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 517m_md5.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
458m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 518m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
459m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 519m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
460m_md5.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 520m_md5.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
461m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h 521m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
462m_md5.o: ../../include/openssl/lhash.h ../../include/openssl/md5.h 522m_md5.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
463m_md5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 523m_md5.o: ../../include/openssl/md5.h ../../include/openssl/obj_mac.h
464m_md5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 524m_md5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
465m_md5.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 525m_md5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
466m_md5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 526m_md5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
467m_md5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 527m_md5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
468m_md5.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 528m_md5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
469m_md5.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md5.c 529m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
530m_md5.o: ../cryptlib.h evp_locl.h m_md5.c
470m_mdc2.o: ../../e_os.h ../../include/openssl/bio.h 531m_mdc2.o: ../../e_os.h ../../include/openssl/bio.h
471m_mdc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 532m_mdc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
472m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 533m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
473m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 534m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
474m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 535m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
475m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 536m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
476m_mdc2.o: ../../include/openssl/symhacks.h ../cryptlib.h m_mdc2.c 537m_mdc2.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h m_mdc2.c
477m_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 538m_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
478m_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 539m_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
479m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 540m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
480m_null.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 541m_null.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
481m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h 542m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h
482m_null.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 543m_null.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
483m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 544m_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
484m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 545m_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
485m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 546m_null.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
486m_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 547m_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
487m_null.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 548m_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
488m_null.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_null.c 549m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
550m_null.o: ../cryptlib.h m_null.c
489m_ripemd.o: ../../e_os.h ../../include/openssl/asn1.h 551m_ripemd.o: ../../e_os.h ../../include/openssl/asn1.h
490m_ripemd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 552m_ripemd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
491m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 553m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
492m_ripemd.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 554m_ripemd.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
493m_ripemd.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 555m_ripemd.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
494m_ripemd.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 556m_ripemd.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
495m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 557m_ripemd.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
496m_ripemd.o: ../../include/openssl/opensslconf.h 558m_ripemd.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
497m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 559m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
498m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/ripemd.h 560m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/ripemd.h
499m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 561m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
@@ -505,60 +567,62 @@ m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
505m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 567m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
506m_sha.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 568m_sha.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
507m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h 569m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h
508m_sha.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 570m_sha.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
509m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 571m_sha.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
510m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 572m_sha.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
511m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 573m_sha.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
512m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 574m_sha.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
513m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 575m_sha.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
514m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 576m_sha.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
515m_sha.o: ../cryptlib.h m_sha.c 577m_sha.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_locl.h m_sha.c
516m_sha1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 578m_sha1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
517m_sha1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 579m_sha1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
518m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 580m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
519m_sha1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 581m_sha1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
520m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h 582m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h
521m_sha1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 583m_sha1.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
522m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 584m_sha1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
523m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 585m_sha1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
524m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 586m_sha1.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
525m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 587m_sha1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
526m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 588m_sha1.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
527m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 589m_sha1.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
528m_sha1.o: ../cryptlib.h m_sha1.c 590m_sha1.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_sha1.c
529names.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 591names.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
530names.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 592names.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
531names.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 593names.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
532names.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 594names.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
533names.o: ../../include/openssl/err.h ../../include/openssl/evp.h 595names.o: ../../include/openssl/err.h ../../include/openssl/evp.h
534names.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 596names.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
535names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 597names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
536names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 598names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
537names.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 599names.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
538names.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 600names.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
539names.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 601names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
540names.o: ../../include/openssl/x509_vfy.h ../cryptlib.h names.c 602names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
603names.o: ../cryptlib.h names.c
541p5_crpt.o: ../../e_os.h ../../include/openssl/asn1.h 604p5_crpt.o: ../../e_os.h ../../include/openssl/asn1.h
542p5_crpt.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 605p5_crpt.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
543p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 606p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
544p5_crpt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 607p5_crpt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
545p5_crpt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 608p5_crpt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
546p5_crpt.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 609p5_crpt.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
547p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 610p5_crpt.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
548p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 611p5_crpt.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
549p5_crpt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 612p5_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
550p5_crpt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 613p5_crpt.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
551p5_crpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 614p5_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
552p5_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 615p5_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
553p5_crpt.o: ../cryptlib.h p5_crpt.c 616p5_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_crpt.c
554p5_crpt2.o: ../../e_os.h ../../include/openssl/asn1.h 617p5_crpt2.o: ../../e_os.h ../../include/openssl/asn1.h
555p5_crpt2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 618p5_crpt2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
556p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 619p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
557p5_crpt2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 620p5_crpt2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
558p5_crpt2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 621p5_crpt2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
559p5_crpt2.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h 622p5_crpt2.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
560p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 623p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/lhash.h
561p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 624p5_crpt2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
625p5_crpt2.o: ../../include/openssl/opensslconf.h
562p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 626p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
563p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 627p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
564p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 628p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -569,27 +633,29 @@ p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
569p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 633p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
570p_dec.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 634p_dec.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
571p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h 635p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h
572p_dec.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 636p_dec.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
573p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 637p_dec.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
574p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 638p_dec.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
575p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 639p_dec.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
576p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 640p_dec.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
577p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 641p_dec.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
578p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 642p_dec.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
579p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_dec.c 643p_dec.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
644p_dec.o: ../cryptlib.h p_dec.c
580p_enc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 645p_enc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
581p_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 646p_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
582p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 647p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
583p_enc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 648p_enc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
584p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 649p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
585p_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 650p_enc.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
586p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 651p_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
587p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 652p_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
588p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 653p_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
589p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 654p_enc.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
590p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 655p_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
591p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 656p_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
592p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_enc.c 657p_enc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
658p_enc.o: ../cryptlib.h p_enc.c
593p_lib.o: ../../e_os.h ../../include/openssl/asn1.h 659p_lib.o: ../../e_os.h ../../include/openssl/asn1.h
594p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h 660p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
595p_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h 661p_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
@@ -597,60 +663,63 @@ p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
597p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 663p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
598p_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 664p_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
599p_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 665p_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
600p_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 666p_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
601p_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 667p_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
602p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 668p_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
603p_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 669p_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
604p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 670p_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
605p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 671p_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
606p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 672p_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
607p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_lib.c 673p_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
674p_lib.o: ../cryptlib.h p_lib.c
608p_open.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 675p_open.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
609p_open.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 676p_open.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
610p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 677p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
611p_open.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 678p_open.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
612p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h 679p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h
613p_open.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 680p_open.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
614p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 681p_open.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
615p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 682p_open.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
616p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 683p_open.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
617p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 684p_open.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
618p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 685p_open.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
619p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 686p_open.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
620p_open.o: ../cryptlib.h p_open.c 687p_open.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_open.c
621p_seal.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 688p_seal.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
622p_seal.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 689p_seal.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
623p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 690p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
624p_seal.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 691p_seal.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
625p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h 692p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h
626p_seal.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 693p_seal.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
627p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 694p_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
628p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 695p_seal.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
629p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 696p_seal.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
630p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 697p_seal.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
631p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 698p_seal.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
632p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 699p_seal.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
633p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_seal.c 700p_seal.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
701p_seal.o: ../cryptlib.h p_seal.c
634p_sign.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 702p_sign.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
635p_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 703p_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
636p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 704p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
637p_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 705p_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
638p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h 706p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
639p_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 707p_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
640p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 708p_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
641p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 709p_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
642p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 710p_sign.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
643p_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 711p_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
644p_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 712p_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
645p_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_sign.c 713p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
714p_sign.o: ../cryptlib.h p_sign.c
646p_verify.o: ../../e_os.h ../../include/openssl/asn1.h 715p_verify.o: ../../e_os.h ../../include/openssl/asn1.h
647p_verify.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 716p_verify.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
648p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 717p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
649p_verify.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 718p_verify.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
650p_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 719p_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
651p_verify.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 720p_verify.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
652p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 721p_verify.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
653p_verify.o: ../../include/openssl/opensslconf.h 722p_verify.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
654p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 723p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
655p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 724p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
656p_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 725p_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
diff --git a/src/lib/libcrypto/evp/bio_md.c b/src/lib/libcrypto/evp/bio_md.c
index d648ac6da6..ed5c1135fd 100644
--- a/src/lib/libcrypto/evp/bio_md.c
+++ b/src/lib/libcrypto/evp/bio_md.c
@@ -192,13 +192,8 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
192 ret=0; 192 ret=0;
193 break; 193 break;
194 case BIO_C_GET_MD_CTX: 194 case BIO_C_GET_MD_CTX:
195 if (b->init) 195 pctx=ptr;
196 { 196 *pctx=ctx;
197 pctx=ptr;
198 *pctx=ctx;
199 }
200 else
201 ret=0;
202 break; 197 break;
203 case BIO_C_SET_MD_CTX: 198 case BIO_C_SET_MD_CTX:
204 if (b->init) 199 if (b->init)
diff --git a/src/lib/libcrypto/evp/digest.c b/src/lib/libcrypto/evp/digest.c
index 762e6d3450..3bc2d1295c 100644
--- a/src/lib/libcrypto/evp/digest.c
+++ b/src/lib/libcrypto/evp/digest.c
@@ -116,6 +116,7 @@
116#ifndef OPENSSL_NO_ENGINE 116#ifndef OPENSSL_NO_ENGINE
117#include <openssl/engine.h> 117#include <openssl/engine.h>
118#endif 118#endif
119#include "evp_locl.h"
119 120
120void EVP_MD_CTX_init(EVP_MD_CTX *ctx) 121void EVP_MD_CTX_init(EVP_MD_CTX *ctx)
121 { 122 {
@@ -137,18 +138,77 @@ int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type)
137 return EVP_DigestInit_ex(ctx, type, NULL); 138 return EVP_DigestInit_ex(ctx, type, NULL);
138 } 139 }
139 140
140int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) 141#ifdef OPENSSL_FIPS
142
143/* The purpose of these is to trap programs that attempt to use non FIPS
144 * algorithms in FIPS mode and ignore the errors.
145 */
146
147static int bad_init(EVP_MD_CTX *ctx)
148 { FIPS_ERROR_IGNORED("Digest init"); return 0;}
149
150static int bad_update(EVP_MD_CTX *ctx,const void *data,size_t count)
151 { FIPS_ERROR_IGNORED("Digest update"); return 0;}
152
153static int bad_final(EVP_MD_CTX *ctx,unsigned char *md)
154 { FIPS_ERROR_IGNORED("Digest Final"); return 0;}
155
156static const EVP_MD bad_md =
141 { 157 {
142 EVP_MD_CTX_clear_flags(ctx,EVP_MD_CTX_FLAG_CLEANED); 158 0,
159 0,
160 0,
161 0,
162 bad_init,
163 bad_update,
164 bad_final,
165 NULL,
166 NULL,
167 NULL,
168 0,
169 {0,0,0,0},
170 };
171
172#endif
173
143#ifndef OPENSSL_NO_ENGINE 174#ifndef OPENSSL_NO_ENGINE
144 /* Whether it's nice or not, "Inits" can be used on "Final"'d contexts 175
145 * so this context may already have an ENGINE! Try to avoid releasing 176#ifdef OPENSSL_FIPS
146 * the previous handle, re-querying for an ENGINE, and having a 177
147 * reinitialisation, when it may all be unecessary. */ 178static int do_engine_null(ENGINE *impl) { return 0;}
148 if (ctx->engine && ctx->digest && (!type || 179static int do_evp_md_engine_null(EVP_MD_CTX *ctx,
149 (type && (type->type == ctx->digest->type)))) 180 const EVP_MD **ptype, ENGINE *impl)
150 goto skip_to_init; 181 { return 1; }
151 if (type) 182
183static int (*do_engine_init)(ENGINE *impl)
184 = do_engine_null;
185
186static int (*do_engine_finish)(ENGINE *impl)
187 = do_engine_null;
188
189static int (*do_evp_md_engine)
190 (EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl)
191 = do_evp_md_engine_null;
192
193void int_EVP_MD_set_engine_callbacks(
194 int (*eng_md_init)(ENGINE *impl),
195 int (*eng_md_fin)(ENGINE *impl),
196 int (*eng_md_evp)
197 (EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl))
198 {
199 do_engine_init = eng_md_init;
200 do_engine_finish = eng_md_fin;
201 do_evp_md_engine = eng_md_evp;
202 }
203
204#else
205
206#define do_engine_init ENGINE_init
207#define do_engine_finish ENGINE_finish
208
209static int do_evp_md_engine(EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl)
210 {
211 if (*ptype)
152 { 212 {
153 /* Ensure an ENGINE left lying around from last time is cleared 213 /* Ensure an ENGINE left lying around from last time is cleared
154 * (the previous check attempted to avoid this if the same 214 * (the previous check attempted to avoid this if the same
@@ -159,25 +219,25 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
159 { 219 {
160 if (!ENGINE_init(impl)) 220 if (!ENGINE_init(impl))
161 { 221 {
162 EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR); 222 EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_INITIALIZATION_ERROR);
163 return 0; 223 return 0;
164 } 224 }
165 } 225 }
166 else 226 else
167 /* Ask if an ENGINE is reserved for this job */ 227 /* Ask if an ENGINE is reserved for this job */
168 impl = ENGINE_get_digest_engine(type->type); 228 impl = ENGINE_get_digest_engine((*ptype)->type);
169 if(impl) 229 if(impl)
170 { 230 {
171 /* There's an ENGINE for this job ... (apparently) */ 231 /* There's an ENGINE for this job ... (apparently) */
172 const EVP_MD *d = ENGINE_get_digest(impl, type->type); 232 const EVP_MD *d = ENGINE_get_digest(impl, (*ptype)->type);
173 if(!d) 233 if(!d)
174 { 234 {
175 /* Same comment from evp_enc.c */ 235 /* Same comment from evp_enc.c */
176 EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR); 236 EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_INITIALIZATION_ERROR);
177 return 0; 237 return 0;
178 } 238 }
179 /* We'll use the ENGINE's private digest definition */ 239 /* We'll use the ENGINE's private digest definition */
180 type = d; 240 *ptype = d;
181 /* Store the ENGINE functional reference so we know 241 /* Store the ENGINE functional reference so we know
182 * 'type' came from an ENGINE and we need to release 242 * 'type' came from an ENGINE and we need to release
183 * it when done. */ 243 * it when done. */
@@ -189,12 +249,52 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
189 else 249 else
190 if(!ctx->digest) 250 if(!ctx->digest)
191 { 251 {
192 EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_NO_DIGEST_SET); 252 EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_NO_DIGEST_SET);
193 return 0; 253 return 0;
194 } 254 }
255 return 1;
256 }
257
258#endif
259
260#endif
261
262int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
263 {
264 M_EVP_MD_CTX_clear_flags(ctx,EVP_MD_CTX_FLAG_CLEANED);
265#ifdef OPENSSL_FIPS
266 if(FIPS_selftest_failed())
267 {
268 FIPSerr(FIPS_F_EVP_DIGESTINIT_EX,FIPS_R_FIPS_SELFTEST_FAILED);
269 ctx->digest = &bad_md;
270 return 0;
271 }
272#endif
273#ifndef OPENSSL_NO_ENGINE
274 /* Whether it's nice or not, "Inits" can be used on "Final"'d contexts
275 * so this context may already have an ENGINE! Try to avoid releasing
276 * the previous handle, re-querying for an ENGINE, and having a
277 * reinitialisation, when it may all be unecessary. */
278 if (ctx->engine && ctx->digest && (!type ||
279 (type && (type->type == ctx->digest->type))))
280 goto skip_to_init;
281 if (!do_evp_md_engine(ctx, &type, impl))
282 return 0;
195#endif 283#endif
196 if (ctx->digest != type) 284 if (ctx->digest != type)
197 { 285 {
286#ifdef OPENSSL_FIPS
287 if (FIPS_mode())
288 {
289 if (!(type->flags & EVP_MD_FLAG_FIPS)
290 && !(ctx->flags & EVP_MD_CTX_FLAG_NON_FIPS_ALLOW))
291 {
292 EVPerr(EVP_F_EVP_DIGESTINIT_EX, EVP_R_DISABLED_FOR_FIPS);
293 ctx->digest = &bad_md;
294 return 0;
295 }
296 }
297#endif
198 if (ctx->digest && ctx->digest->ctx_size) 298 if (ctx->digest && ctx->digest->ctx_size)
199 OPENSSL_free(ctx->md_data); 299 OPENSSL_free(ctx->md_data);
200 ctx->digest=type; 300 ctx->digest=type;
@@ -202,7 +302,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
202 ctx->md_data=OPENSSL_malloc(type->ctx_size); 302 ctx->md_data=OPENSSL_malloc(type->ctx_size);
203 } 303 }
204#ifndef OPENSSL_NO_ENGINE 304#ifndef OPENSSL_NO_ENGINE
205skip_to_init: 305 skip_to_init:
206#endif 306#endif
207 return ctx->digest->init(ctx); 307 return ctx->digest->init(ctx);
208 } 308 }
@@ -210,6 +310,9 @@ skip_to_init:
210int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, 310int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data,
211 size_t count) 311 size_t count)
212 { 312 {
313#ifdef OPENSSL_FIPS
314 FIPS_selftest_check();
315#endif
213 return ctx->digest->update(ctx,data,count); 316 return ctx->digest->update(ctx,data,count);
214 } 317 }
215 318
@@ -226,6 +329,9 @@ int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
226int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) 329int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
227 { 330 {
228 int ret; 331 int ret;
332#ifdef OPENSSL_FIPS
333 FIPS_selftest_check();
334#endif
229 335
230 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE); 336 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE);
231 ret=ctx->digest->final(ctx,md); 337 ret=ctx->digest->final(ctx,md);
@@ -234,7 +340,7 @@ int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
234 if (ctx->digest->cleanup) 340 if (ctx->digest->cleanup)
235 { 341 {
236 ctx->digest->cleanup(ctx); 342 ctx->digest->cleanup(ctx);
237 EVP_MD_CTX_set_flags(ctx,EVP_MD_CTX_FLAG_CLEANED); 343 M_EVP_MD_CTX_set_flags(ctx,EVP_MD_CTX_FLAG_CLEANED);
238 } 344 }
239 memset(ctx->md_data,0,ctx->digest->ctx_size); 345 memset(ctx->md_data,0,ctx->digest->ctx_size);
240 return ret; 346 return ret;
@@ -256,7 +362,7 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
256 } 362 }
257#ifndef OPENSSL_NO_ENGINE 363#ifndef OPENSSL_NO_ENGINE
258 /* Make sure it's safe to copy a digest context using an ENGINE */ 364 /* Make sure it's safe to copy a digest context using an ENGINE */
259 if (in->engine && !ENGINE_init(in->engine)) 365 if (in->engine && !do_engine_init(in->engine))
260 { 366 {
261 EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,ERR_R_ENGINE_LIB); 367 EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,ERR_R_ENGINE_LIB);
262 return 0; 368 return 0;
@@ -266,7 +372,7 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
266 if (out->digest == in->digest) 372 if (out->digest == in->digest)
267 { 373 {
268 tmp_buf = out->md_data; 374 tmp_buf = out->md_data;
269 EVP_MD_CTX_set_flags(out,EVP_MD_CTX_FLAG_REUSE); 375 M_EVP_MD_CTX_set_flags(out,EVP_MD_CTX_FLAG_REUSE);
270 } 376 }
271 else tmp_buf = NULL; 377 else tmp_buf = NULL;
272 EVP_MD_CTX_cleanup(out); 378 EVP_MD_CTX_cleanup(out);
@@ -292,7 +398,7 @@ int EVP_Digest(const void *data, size_t count,
292 int ret; 398 int ret;
293 399
294 EVP_MD_CTX_init(&ctx); 400 EVP_MD_CTX_init(&ctx);
295 EVP_MD_CTX_set_flags(&ctx,EVP_MD_CTX_FLAG_ONESHOT); 401 M_EVP_MD_CTX_set_flags(&ctx,EVP_MD_CTX_FLAG_ONESHOT);
296 ret=EVP_DigestInit_ex(&ctx, type, impl) 402 ret=EVP_DigestInit_ex(&ctx, type, impl)
297 && EVP_DigestUpdate(&ctx, data, count) 403 && EVP_DigestUpdate(&ctx, data, count)
298 && EVP_DigestFinal_ex(&ctx, md, size); 404 && EVP_DigestFinal_ex(&ctx, md, size);
@@ -314,10 +420,10 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
314 * because sometimes only copies of the context are ever finalised. 420 * because sometimes only copies of the context are ever finalised.
315 */ 421 */
316 if (ctx->digest && ctx->digest->cleanup 422 if (ctx->digest && ctx->digest->cleanup
317 && !EVP_MD_CTX_test_flags(ctx,EVP_MD_CTX_FLAG_CLEANED)) 423 && !M_EVP_MD_CTX_test_flags(ctx,EVP_MD_CTX_FLAG_CLEANED))
318 ctx->digest->cleanup(ctx); 424 ctx->digest->cleanup(ctx);
319 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data 425 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data
320 && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)) 426 && !M_EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE))
321 { 427 {
322 OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size); 428 OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size);
323 OPENSSL_free(ctx->md_data); 429 OPENSSL_free(ctx->md_data);
@@ -326,7 +432,7 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
326 if(ctx->engine) 432 if(ctx->engine)
327 /* The EVP_MD we used belongs to an ENGINE, release the 433 /* The EVP_MD we used belongs to an ENGINE, release the
328 * functional reference we held for this reason. */ 434 * functional reference we held for this reason. */
329 ENGINE_finish(ctx->engine); 435 do_engine_finish(ctx->engine);
330#endif 436#endif
331 memset(ctx,'\0',sizeof *ctx); 437 memset(ctx,'\0',sizeof *ctx);
332 438
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c
index bd6c0a3a62..c9a5ee8d75 100644
--- a/src/lib/libcrypto/evp/e_aes.c
+++ b/src/lib/libcrypto/evp/e_aes.c
@@ -69,32 +69,29 @@ typedef struct
69 69
70IMPLEMENT_BLOCK_CIPHER(aes_128, ks, AES, EVP_AES_KEY, 70IMPLEMENT_BLOCK_CIPHER(aes_128, ks, AES, EVP_AES_KEY,
71 NID_aes_128, 16, 16, 16, 128, 71 NID_aes_128, 16, 16, 16, 128,
72 0, aes_init_key, NULL, 72 EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
73 EVP_CIPHER_set_asn1_iv, 73 aes_init_key,
74 EVP_CIPHER_get_asn1_iv, 74 NULL, NULL, NULL, NULL)
75 NULL)
76IMPLEMENT_BLOCK_CIPHER(aes_192, ks, AES, EVP_AES_KEY, 75IMPLEMENT_BLOCK_CIPHER(aes_192, ks, AES, EVP_AES_KEY,
77 NID_aes_192, 16, 24, 16, 128, 76 NID_aes_192, 16, 24, 16, 128,
78 0, aes_init_key, NULL, 77 EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
79 EVP_CIPHER_set_asn1_iv, 78 aes_init_key,
80 EVP_CIPHER_get_asn1_iv, 79 NULL, NULL, NULL, NULL)
81 NULL)
82IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY, 80IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY,
83 NID_aes_256, 16, 32, 16, 128, 81 NID_aes_256, 16, 32, 16, 128,
84 0, aes_init_key, NULL, 82 EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
85 EVP_CIPHER_set_asn1_iv, 83 aes_init_key,
86 EVP_CIPHER_get_asn1_iv, 84 NULL, NULL, NULL, NULL)
87 NULL)
88 85
89#define IMPLEMENT_AES_CFBR(ksize,cbits) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16) 86#define IMPLEMENT_AES_CFBR(ksize,cbits,flags) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16,flags)
90 87
91IMPLEMENT_AES_CFBR(128,1) 88IMPLEMENT_AES_CFBR(128,1,EVP_CIPH_FLAG_FIPS)
92IMPLEMENT_AES_CFBR(192,1) 89IMPLEMENT_AES_CFBR(192,1,EVP_CIPH_FLAG_FIPS)
93IMPLEMENT_AES_CFBR(256,1) 90IMPLEMENT_AES_CFBR(256,1,EVP_CIPH_FLAG_FIPS)
94 91
95IMPLEMENT_AES_CFBR(128,8) 92IMPLEMENT_AES_CFBR(128,8,EVP_CIPH_FLAG_FIPS)
96IMPLEMENT_AES_CFBR(192,8) 93IMPLEMENT_AES_CFBR(192,8,EVP_CIPH_FLAG_FIPS)
97IMPLEMENT_AES_CFBR(256,8) 94IMPLEMENT_AES_CFBR(256,8,EVP_CIPH_FLAG_FIPS)
98 95
99static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 96static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
100 const unsigned char *iv, int enc) 97 const unsigned char *iv, int enc)
diff --git a/src/lib/libcrypto/evp/e_des.c b/src/lib/libcrypto/evp/e_des.c
index 856323648c..04376df232 100644
--- a/src/lib/libcrypto/evp/e_des.c
+++ b/src/lib/libcrypto/evp/e_des.c
@@ -129,18 +129,21 @@ static int des_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
129 } 129 }
130 130
131BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64, 131BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64,
132 EVP_CIPH_RAND_KEY, des_init_key, NULL, 132 EVP_CIPH_RAND_KEY,
133 des_init_key, NULL,
133 EVP_CIPHER_set_asn1_iv, 134 EVP_CIPHER_set_asn1_iv,
134 EVP_CIPHER_get_asn1_iv, 135 EVP_CIPHER_get_asn1_iv,
135 des_ctrl) 136 des_ctrl)
136 137
137BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,1, 138BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,1,
138 EVP_CIPH_RAND_KEY, des_init_key,NULL, 139 EVP_CIPH_RAND_KEY,
140 des_init_key, NULL,
139 EVP_CIPHER_set_asn1_iv, 141 EVP_CIPHER_set_asn1_iv,
140 EVP_CIPHER_get_asn1_iv,des_ctrl) 142 EVP_CIPHER_get_asn1_iv,des_ctrl)
141 143
142BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,8, 144BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,8,
143 EVP_CIPH_RAND_KEY,des_init_key,NULL, 145 EVP_CIPH_RAND_KEY,
146 des_init_key,NULL,
144 EVP_CIPHER_set_asn1_iv, 147 EVP_CIPHER_set_asn1_iv,
145 EVP_CIPHER_get_asn1_iv,des_ctrl) 148 EVP_CIPHER_get_asn1_iv,des_ctrl)
146 149
diff --git a/src/lib/libcrypto/evp/e_des3.c b/src/lib/libcrypto/evp/e_des3.c
index ac148efab2..f910af19b1 100644
--- a/src/lib/libcrypto/evp/e_des3.c
+++ b/src/lib/libcrypto/evp/e_des3.c
@@ -111,8 +111,7 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
111#ifdef KSSL_DEBUG 111#ifdef KSSL_DEBUG
112 { 112 {
113 int i; 113 int i;
114 char *cp; 114 printf("des_ede_cbc_cipher(ctx=%lx, buflen=%d)\n", (unsigned long)ctx, ctx->buf_len);
115 printf("des_ede_cbc_cipher(ctx=%lx, buflen=%d)\n", ctx, ctx->buf_len);
116 printf("\t iv= "); 115 printf("\t iv= ");
117 for(i=0;i<8;i++) 116 for(i=0;i<8;i++)
118 printf("%02X",ctx->iv[i]); 117 printf("%02X",ctx->iv[i]);
@@ -164,9 +163,9 @@ static int des_ede3_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
164 } 163 }
165 164
166BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64, 165BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
167 EVP_CIPH_RAND_KEY, des_ede_init_key, NULL, 166 EVP_CIPH_RAND_KEY|EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
168 EVP_CIPHER_set_asn1_iv, 167 des_ede_init_key,
169 EVP_CIPHER_get_asn1_iv, 168 NULL, NULL, NULL,
170 des3_ctrl) 169 des3_ctrl)
171 170
172#define des_ede3_cfb64_cipher des_ede_cfb64_cipher 171#define des_ede3_cfb64_cipher des_ede_cfb64_cipher
@@ -175,21 +174,21 @@ BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
175#define des_ede3_ecb_cipher des_ede_ecb_cipher 174#define des_ede3_ecb_cipher des_ede_ecb_cipher
176 175
177BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64, 176BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64,
178 EVP_CIPH_RAND_KEY, des_ede3_init_key, NULL, 177 EVP_CIPH_RAND_KEY|EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
179 EVP_CIPHER_set_asn1_iv, 178 des_ede3_init_key,
180 EVP_CIPHER_get_asn1_iv, 179 NULL, NULL, NULL,
181 des3_ctrl) 180 des3_ctrl)
182 181
183BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,1, 182BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,1,
184 EVP_CIPH_RAND_KEY, des_ede3_init_key,NULL, 183 EVP_CIPH_RAND_KEY|EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
185 EVP_CIPHER_set_asn1_iv, 184 des_ede3_init_key,
186 EVP_CIPHER_get_asn1_iv, 185 NULL, NULL, NULL,
187 des3_ctrl) 186 des3_ctrl)
188 187
189BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,8, 188BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,8,
190 EVP_CIPH_RAND_KEY, des_ede3_init_key,NULL, 189 EVP_CIPH_RAND_KEY|EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
191 EVP_CIPHER_set_asn1_iv, 190 des_ede3_init_key,
192 EVP_CIPHER_get_asn1_iv, 191 NULL, NULL, NULL,
193 des3_ctrl) 192 des3_ctrl)
194 193
195static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 194static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
@@ -216,7 +215,7 @@ static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
216#ifdef KSSL_DEBUG 215#ifdef KSSL_DEBUG
217 { 216 {
218 int i; 217 int i;
219 printf("des_ede3_init_key(ctx=%lx)\n", ctx); 218 printf("des_ede3_init_key(ctx=%lx)\n", (unsigned long)ctx);
220 printf("\tKEY= "); 219 printf("\tKEY= ");
221 for(i=0;i<24;i++) printf("%02X",key[i]); printf("\n"); 220 for(i=0;i<24;i++) printf("%02X",key[i]); printf("\n");
222 printf("\t IV= "); 221 printf("\t IV= ");
diff --git a/src/lib/libcrypto/evp/e_null.c b/src/lib/libcrypto/evp/e_null.c
index 5205259f18..0872d733e4 100644
--- a/src/lib/libcrypto/evp/e_null.c
+++ b/src/lib/libcrypto/evp/e_null.c
@@ -69,7 +69,7 @@ static const EVP_CIPHER n_cipher=
69 { 69 {
70 NID_undef, 70 NID_undef,
71 1,0,0, 71 1,0,0,
72 0, 72 EVP_CIPH_FLAG_FIPS,
73 null_init_key, 73 null_init_key,
74 null_cipher, 74 null_cipher,
75 NULL, 75 NULL,
diff --git a/src/lib/libcrypto/evp/e_rc4.c b/src/lib/libcrypto/evp/e_rc4.c
index 67af850bea..55baad7446 100644
--- a/src/lib/libcrypto/evp/e_rc4.c
+++ b/src/lib/libcrypto/evp/e_rc4.c
@@ -64,6 +64,7 @@
64#include <openssl/evp.h> 64#include <openssl/evp.h>
65#include <openssl/objects.h> 65#include <openssl/objects.h>
66#include <openssl/rc4.h> 66#include <openssl/rc4.h>
67#include "evp_locl.h"
67 68
68/* FIXME: surely this is available elsewhere? */ 69/* FIXME: surely this is available elsewhere? */
69#define EVP_RC4_KEY_SIZE 16 70#define EVP_RC4_KEY_SIZE 16
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index 1aa2d6fb35..51011f2b14 100644
--- a/src/lib/libcrypto/evp/evp.h
+++ b/src/lib/libcrypto/evp/evp.h
@@ -75,6 +75,10 @@
75#include <openssl/bio.h> 75#include <openssl/bio.h>
76#endif 76#endif
77 77
78#ifdef OPENSSL_FIPS
79#include <openssl/fips.h>
80#endif
81
78/* 82/*
79#define EVP_RC2_KEY_SIZE 16 83#define EVP_RC2_KEY_SIZE 16
80#define EVP_RC4_KEY_SIZE 16 84#define EVP_RC4_KEY_SIZE 16
@@ -250,9 +254,19 @@ typedef int evp_verify_method(int type,const unsigned char *m,
250 unsigned int m_length,const unsigned char *sigbuf, 254 unsigned int m_length,const unsigned char *sigbuf,
251 unsigned int siglen, void *key); 255 unsigned int siglen, void *key);
252 256
257typedef struct
258 {
259 EVP_MD_CTX *mctx;
260 void *key;
261 } EVP_MD_SVCTX;
262
253#define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single 263#define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single
254 * block */ 264 * block */
255 265
266#define EVP_MD_FLAG_FIPS 0x0400 /* Note if suitable for use in FIPS mode */
267
268#define EVP_MD_FLAG_SVCTX 0x0800 /* pass EVP_MD_SVCTX to sign/verify */
269
256#define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0} 270#define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0}
257 271
258#ifndef OPENSSL_NO_DSA 272#ifndef OPENSSL_NO_DSA
@@ -306,6 +320,15 @@ struct env_md_ctx_st
306#define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008 /* Allow use of non FIPS digest 320#define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008 /* Allow use of non FIPS digest
307 * in FIPS mode */ 321 * in FIPS mode */
308 322
323#define EVP_MD_CTX_FLAG_PAD_MASK 0xF0 /* RSA mode to use */
324#define EVP_MD_CTX_FLAG_PAD_PKCS1 0x00 /* PKCS#1 v1.5 mode */
325#define EVP_MD_CTX_FLAG_PAD_X931 0x10 /* X9.31 mode */
326#define EVP_MD_CTX_FLAG_PAD_PSS 0x20 /* PSS mode */
327#define M_EVP_MD_CTX_FLAG_PSS_SALT(ctx) \
328 ((ctx->flags>>16) &0xFFFF) /* seed length */
329#define EVP_MD_CTX_FLAG_PSS_MDLEN 0xFFFF /* salt len same as digest */
330#define EVP_MD_CTX_FLAG_PSS_MREC 0xFFFE /* salt max or auto recovered */
331
309struct evp_cipher_st 332struct evp_cipher_st
310 { 333 {
311 int nid; 334 int nid;
@@ -349,6 +372,14 @@ struct evp_cipher_st
349#define EVP_CIPH_NO_PADDING 0x100 372#define EVP_CIPH_NO_PADDING 0x100
350/* cipher handles random key generation */ 373/* cipher handles random key generation */
351#define EVP_CIPH_RAND_KEY 0x200 374#define EVP_CIPH_RAND_KEY 0x200
375/* Note if suitable for use in FIPS mode */
376#define EVP_CIPH_FLAG_FIPS 0x400
377/* Allow non FIPS cipher in FIPS mode */
378#define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0x800
379/* Allow use default ASN1 get/set iv */
380#define EVP_CIPH_FLAG_DEFAULT_ASN1 0x1000
381/* Buffer length in bits not bytes: CFB1 mode only */
382#define EVP_CIPH_FLAG_LENGTH_BITS 0x2000
352 383
353/* ctrl() values */ 384/* ctrl() values */
354 385
@@ -432,6 +463,18 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
432#define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) 463#define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a))
433#define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) 464#define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a))
434 465
466/* Macros to reduce FIPS dependencies: do NOT use in applications */
467#define M_EVP_MD_size(e) ((e)->md_size)
468#define M_EVP_MD_block_size(e) ((e)->block_size)
469#define M_EVP_MD_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs))
470#define M_EVP_MD_CTX_clear_flags(ctx,flgs) ((ctx)->flags&=~(flgs))
471#define M_EVP_MD_CTX_test_flags(ctx,flgs) ((ctx)->flags&(flgs))
472#define M_EVP_MD_type(e) ((e)->type)
473#define M_EVP_MD_CTX_type(e) M_EVP_MD_type(M_EVP_MD_CTX_md(e))
474#define M_EVP_MD_CTX_md(e) ((e)->digest)
475
476#define M_EVP_CIPHER_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs))
477
435int EVP_MD_type(const EVP_MD *md); 478int EVP_MD_type(const EVP_MD *md);
436#define EVP_MD_nid(e) EVP_MD_type(e) 479#define EVP_MD_nid(e) EVP_MD_type(e)
437#define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e)) 480#define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e))
@@ -527,6 +570,10 @@ int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md,
527 const unsigned char *salt, const unsigned char *data, 570 const unsigned char *salt, const unsigned char *data,
528 int datal, int count, unsigned char *key,unsigned char *iv); 571 int datal, int count, unsigned char *key,unsigned char *iv);
529 572
573void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
574void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
575int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx,int flags);
576
530int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, 577int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher,
531 const unsigned char *key, const unsigned char *iv); 578 const unsigned char *key, const unsigned char *iv);
532int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl, 579int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
@@ -885,6 +932,24 @@ int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
885 EVP_PBE_KEYGEN *keygen); 932 EVP_PBE_KEYGEN *keygen);
886void EVP_PBE_cleanup(void); 933void EVP_PBE_cleanup(void);
887 934
935#ifdef OPENSSL_FIPS
936#ifndef OPENSSL_NO_ENGINE
937void int_EVP_MD_set_engine_callbacks(
938 int (*eng_md_init)(ENGINE *impl),
939 int (*eng_md_fin)(ENGINE *impl),
940 int (*eng_md_evp)
941 (EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl));
942void int_EVP_MD_init_engine_callbacks(void);
943void int_EVP_CIPHER_set_engine_callbacks(
944 int (*eng_ciph_fin)(ENGINE *impl),
945 int (*eng_ciph_evp)
946 (EVP_CIPHER_CTX *ctx, const EVP_CIPHER **pciph, ENGINE *impl));
947void int_EVP_CIPHER_init_engine_callbacks(void);
948#endif
949#endif
950
951void EVP_add_alg_module(void);
952
888/* BEGIN ERROR CODES */ 953/* BEGIN ERROR CODES */
889/* The following lines are auto generated by the script mkerr.pl. Any changes 954/* The following lines are auto generated by the script mkerr.pl. Any changes
890 * made after this point may be overwritten when the script is next run. 955 * made after this point may be overwritten when the script is next run.
@@ -895,16 +960,23 @@ void ERR_load_EVP_strings(void);
895 960
896/* Function codes. */ 961/* Function codes. */
897#define EVP_F_AES_INIT_KEY 133 962#define EVP_F_AES_INIT_KEY 133
963#define EVP_F_ALG_MODULE_INIT 138
898#define EVP_F_CAMELLIA_INIT_KEY 159 964#define EVP_F_CAMELLIA_INIT_KEY 159
899#define EVP_F_D2I_PKEY 100 965#define EVP_F_D2I_PKEY 100
966#define EVP_F_DO_EVP_ENC_ENGINE 140
967#define EVP_F_DO_EVP_ENC_ENGINE_FULL 141
968#define EVP_F_DO_EVP_MD_ENGINE 139
969#define EVP_F_DO_EVP_MD_ENGINE_FULL 142
900#define EVP_F_DSAPKEY2PKCS8 134 970#define EVP_F_DSAPKEY2PKCS8 134
901#define EVP_F_DSA_PKEY2PKCS8 135 971#define EVP_F_DSA_PKEY2PKCS8 135
902#define EVP_F_ECDSA_PKEY2PKCS8 129 972#define EVP_F_ECDSA_PKEY2PKCS8 129
903#define EVP_F_ECKEY_PKEY2PKCS8 132 973#define EVP_F_ECKEY_PKEY2PKCS8 132
974#define EVP_F_EVP_CIPHERINIT 137
904#define EVP_F_EVP_CIPHERINIT_EX 123 975#define EVP_F_EVP_CIPHERINIT_EX 123
905#define EVP_F_EVP_CIPHER_CTX_CTRL 124 976#define EVP_F_EVP_CIPHER_CTX_CTRL 124
906#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 977#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122
907#define EVP_F_EVP_DECRYPTFINAL_EX 101 978#define EVP_F_EVP_DECRYPTFINAL_EX 101
979#define EVP_F_EVP_DIGESTINIT 136
908#define EVP_F_EVP_DIGESTINIT_EX 128 980#define EVP_F_EVP_DIGESTINIT_EX 128
909#define EVP_F_EVP_ENCRYPTFINAL_EX 127 981#define EVP_F_EVP_ENCRYPTFINAL_EX 127
910#define EVP_F_EVP_MD_CTX_COPY_EX 110 982#define EVP_F_EVP_MD_CTX_COPY_EX 110
@@ -946,15 +1018,20 @@ void ERR_load_EVP_strings(void);
946#define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 1018#define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138
947#define EVP_R_DECODE_ERROR 114 1019#define EVP_R_DECODE_ERROR 114
948#define EVP_R_DIFFERENT_KEY_TYPES 101 1020#define EVP_R_DIFFERENT_KEY_TYPES 101
1021#define EVP_R_DISABLED_FOR_FIPS 144
949#define EVP_R_ENCODE_ERROR 115 1022#define EVP_R_ENCODE_ERROR 115
1023#define EVP_R_ERROR_LOADING_SECTION 145
1024#define EVP_R_ERROR_SETTING_FIPS_MODE 146
950#define EVP_R_EVP_PBE_CIPHERINIT_ERROR 119 1025#define EVP_R_EVP_PBE_CIPHERINIT_ERROR 119
951#define EVP_R_EXPECTING_AN_RSA_KEY 127 1026#define EVP_R_EXPECTING_AN_RSA_KEY 127
952#define EVP_R_EXPECTING_A_DH_KEY 128 1027#define EVP_R_EXPECTING_A_DH_KEY 128
953#define EVP_R_EXPECTING_A_DSA_KEY 129 1028#define EVP_R_EXPECTING_A_DSA_KEY 129
954#define EVP_R_EXPECTING_A_ECDSA_KEY 141 1029#define EVP_R_EXPECTING_A_ECDSA_KEY 141
955#define EVP_R_EXPECTING_A_EC_KEY 142 1030#define EVP_R_EXPECTING_A_EC_KEY 142
1031#define EVP_R_FIPS_MODE_NOT_SUPPORTED 147
956#define EVP_R_INITIALIZATION_ERROR 134 1032#define EVP_R_INITIALIZATION_ERROR 134
957#define EVP_R_INPUT_NOT_INITIALIZED 111 1033#define EVP_R_INPUT_NOT_INITIALIZED 111
1034#define EVP_R_INVALID_FIPS_MODE 148
958#define EVP_R_INVALID_KEY_LENGTH 130 1035#define EVP_R_INVALID_KEY_LENGTH 130
959#define EVP_R_IV_TOO_LARGE 102 1036#define EVP_R_IV_TOO_LARGE 102
960#define EVP_R_KEYGEN_FAILURE 120 1037#define EVP_R_KEYGEN_FAILURE 120
@@ -966,6 +1043,7 @@ void ERR_load_EVP_strings(void);
966#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 1043#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105
967#define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117 1044#define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117
968#define EVP_R_PUBLIC_KEY_NOT_RSA 106 1045#define EVP_R_PUBLIC_KEY_NOT_RSA 106
1046#define EVP_R_UNKNOWN_OPTION 149
969#define EVP_R_UNKNOWN_PBE_ALGORITHM 121 1047#define EVP_R_UNKNOWN_PBE_ALGORITHM 121
970#define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS 135 1048#define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS 135
971#define EVP_R_UNSUPPORTED_CIPHER 107 1049#define EVP_R_UNSUPPORTED_CIPHER 107
diff --git a/src/lib/libcrypto/evp/evp_acnf.c b/src/lib/libcrypto/evp/evp_acnf.c
index ff3e311cc5..643a1864e8 100644
--- a/src/lib/libcrypto/evp/evp_acnf.c
+++ b/src/lib/libcrypto/evp/evp_acnf.c
@@ -1,5 +1,5 @@
1/* evp_acnf.c */ 1/* evp_acnf.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c
index 6e582c458d..30e0ca4d9f 100644
--- a/src/lib/libcrypto/evp/evp_enc.c
+++ b/src/lib/libcrypto/evp/evp_enc.c
@@ -66,13 +66,15 @@
66#endif 66#endif
67#include "evp_locl.h" 67#include "evp_locl.h"
68 68
69const char EVP_version[]="EVP" OPENSSL_VERSION_PTEXT; 69#ifdef OPENSSL_FIPS
70 #define M_do_cipher(ctx, out, in, inl) \
71 EVP_Cipher(ctx,out,in,inl)
72#else
73 #define M_do_cipher(ctx, out, in, inl) \
74 ctx->cipher->do_cipher(ctx,out,in,inl)
75#endif
70 76
71void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) 77const char EVP_version[]="EVP" OPENSSL_VERSION_PTEXT;
72 {
73 memset(ctx,0,sizeof(EVP_CIPHER_CTX));
74 /* ctx->cipher=NULL; */
75 }
76 78
77EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) 79EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void)
78 { 80 {
@@ -90,144 +92,6 @@ int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
90 return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc); 92 return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc);
91 } 93 }
92 94
93int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,
94 const unsigned char *key, const unsigned char *iv, int enc)
95 {
96 if (enc == -1)
97 enc = ctx->encrypt;
98 else
99 {
100 if (enc)
101 enc = 1;
102 ctx->encrypt = enc;
103 }
104#ifndef OPENSSL_NO_ENGINE
105 /* Whether it's nice or not, "Inits" can be used on "Final"'d contexts
106 * so this context may already have an ENGINE! Try to avoid releasing
107 * the previous handle, re-querying for an ENGINE, and having a
108 * reinitialisation, when it may all be unecessary. */
109 if (ctx->engine && ctx->cipher && (!cipher ||
110 (cipher && (cipher->nid == ctx->cipher->nid))))
111 goto skip_to_init;
112#endif
113 if (cipher)
114 {
115 /* Ensure a context left lying around from last time is cleared
116 * (the previous check attempted to avoid this if the same
117 * ENGINE and EVP_CIPHER could be used). */
118 EVP_CIPHER_CTX_cleanup(ctx);
119
120 /* Restore encrypt field: it is zeroed by cleanup */
121 ctx->encrypt = enc;
122#ifndef OPENSSL_NO_ENGINE
123 if(impl)
124 {
125 if (!ENGINE_init(impl))
126 {
127 EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
128 return 0;
129 }
130 }
131 else
132 /* Ask if an ENGINE is reserved for this job */
133 impl = ENGINE_get_cipher_engine(cipher->nid);
134 if(impl)
135 {
136 /* There's an ENGINE for this job ... (apparently) */
137 const EVP_CIPHER *c = ENGINE_get_cipher(impl, cipher->nid);
138 if(!c)
139 {
140 /* One positive side-effect of US's export
141 * control history, is that we should at least
142 * be able to avoid using US mispellings of
143 * "initialisation"? */
144 EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
145 return 0;
146 }
147 /* We'll use the ENGINE's private cipher definition */
148 cipher = c;
149 /* Store the ENGINE functional reference so we know
150 * 'cipher' came from an ENGINE and we need to release
151 * it when done. */
152 ctx->engine = impl;
153 }
154 else
155 ctx->engine = NULL;
156#endif
157
158 ctx->cipher=cipher;
159 if (ctx->cipher->ctx_size)
160 {
161 ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
162 if (!ctx->cipher_data)
163 {
164 EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE);
165 return 0;
166 }
167 }
168 else
169 {
170 ctx->cipher_data = NULL;
171 }
172 ctx->key_len = cipher->key_len;
173 ctx->flags = 0;
174 if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT)
175 {
176 if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL))
177 {
178 EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
179 return 0;
180 }
181 }
182 }
183 else if(!ctx->cipher)
184 {
185 EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_NO_CIPHER_SET);
186 return 0;
187 }
188#ifndef OPENSSL_NO_ENGINE
189skip_to_init:
190#endif
191 /* we assume block size is a power of 2 in *cryptUpdate */
192 OPENSSL_assert(ctx->cipher->block_size == 1
193 || ctx->cipher->block_size == 8
194 || ctx->cipher->block_size == 16);
195
196 if(!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_CUSTOM_IV)) {
197 switch(EVP_CIPHER_CTX_mode(ctx)) {
198
199 case EVP_CIPH_STREAM_CIPHER:
200 case EVP_CIPH_ECB_MODE:
201 break;
202
203 case EVP_CIPH_CFB_MODE:
204 case EVP_CIPH_OFB_MODE:
205
206 ctx->num = 0;
207
208 case EVP_CIPH_CBC_MODE:
209
210 OPENSSL_assert(EVP_CIPHER_CTX_iv_length(ctx) <=
211 (int)sizeof(ctx->iv));
212 if(iv) memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx));
213 memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));
214 break;
215
216 default:
217 return 0;
218 break;
219 }
220 }
221
222 if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {
223 if(!ctx->cipher->init(ctx,key,iv,enc)) return 0;
224 }
225 ctx->buf_len=0;
226 ctx->final_used=0;
227 ctx->block_mask=ctx->cipher->block_size-1;
228 return 1;
229 }
230
231int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, 95int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
232 const unsigned char *in, int inl) 96 const unsigned char *in, int inl)
233 { 97 {
@@ -287,7 +151,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
287 151
288 if(ctx->buf_len == 0 && (inl&(ctx->block_mask)) == 0) 152 if(ctx->buf_len == 0 && (inl&(ctx->block_mask)) == 0)
289 { 153 {
290 if(ctx->cipher->do_cipher(ctx,out,in,inl)) 154 if(M_do_cipher(ctx,out,in,inl))
291 { 155 {
292 *outl=inl; 156 *outl=inl;
293 return 1; 157 return 1;
@@ -314,7 +178,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
314 { 178 {
315 j=bl-i; 179 j=bl-i;
316 memcpy(&(ctx->buf[i]),in,j); 180 memcpy(&(ctx->buf[i]),in,j);
317 if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,bl)) return 0; 181 if(!M_do_cipher(ctx,out,ctx->buf,bl)) return 0;
318 inl-=j; 182 inl-=j;
319 in+=j; 183 in+=j;
320 out+=bl; 184 out+=bl;
@@ -327,7 +191,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
327 inl-=i; 191 inl-=i;
328 if (inl > 0) 192 if (inl > 0)
329 { 193 {
330 if(!ctx->cipher->do_cipher(ctx,out,in,inl)) return 0; 194 if(!M_do_cipher(ctx,out,in,inl)) return 0;
331 *outl+=inl; 195 *outl+=inl;
332 } 196 }
333 197
@@ -371,7 +235,7 @@ int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
371 n=b-bl; 235 n=b-bl;
372 for (i=bl; i<b; i++) 236 for (i=bl; i<b; i++)
373 ctx->buf[i]=n; 237 ctx->buf[i]=n;
374 ret=ctx->cipher->do_cipher(ctx,out,ctx->buf,b); 238 ret=M_do_cipher(ctx,out,ctx->buf,b);
375 239
376 240
377 if(ret) 241 if(ret)
@@ -493,28 +357,6 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
493 } 357 }
494 } 358 }
495 359
496int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c)
497 {
498 if (c->cipher != NULL)
499 {
500 if(c->cipher->cleanup && !c->cipher->cleanup(c))
501 return 0;
502 /* Cleanse cipher context data */
503 if (c->cipher_data)
504 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size);
505 }
506 if (c->cipher_data)
507 OPENSSL_free(c->cipher_data);
508#ifndef OPENSSL_NO_ENGINE
509 if (c->engine)
510 /* The EVP_CIPHER we used belongs to an ENGINE, release the
511 * functional reference we held for this reason. */
512 ENGINE_finish(c->engine);
513#endif
514 memset(c,0,sizeof(EVP_CIPHER_CTX));
515 return 1;
516 }
517
518int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen) 360int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen)
519 { 361 {
520 if(c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH) 362 if(c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH)
@@ -536,27 +378,6 @@ int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad)
536 return 1; 378 return 1;
537 } 379 }
538 380
539int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr)
540{
541 int ret;
542 if(!ctx->cipher) {
543 EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_NO_CIPHER_SET);
544 return 0;
545 }
546
547 if(!ctx->cipher->ctrl) {
548 EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_CTRL_NOT_IMPLEMENTED);
549 return 0;
550 }
551
552 ret = ctx->cipher->ctrl(ctx, type, arg, ptr);
553 if(ret == -1) {
554 EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED);
555 return 0;
556 }
557 return ret;
558}
559
560int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) 381int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key)
561 { 382 {
562 if (ctx->cipher->flags & EVP_CIPH_RAND_KEY) 383 if (ctx->cipher->flags & EVP_CIPH_RAND_KEY)
@@ -566,3 +387,54 @@ int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key)
566 return 1; 387 return 1;
567 } 388 }
568 389
390#ifndef OPENSSL_NO_ENGINE
391
392#ifdef OPENSSL_FIPS
393
394static int do_evp_enc_engine_full(EVP_CIPHER_CTX *ctx, const EVP_CIPHER **pcipher, ENGINE *impl)
395 {
396 if(impl)
397 {
398 if (!ENGINE_init(impl))
399 {
400 EVPerr(EVP_F_DO_EVP_ENC_ENGINE_FULL, EVP_R_INITIALIZATION_ERROR);
401 return 0;
402 }
403 }
404 else
405 /* Ask if an ENGINE is reserved for this job */
406 impl = ENGINE_get_cipher_engine((*pcipher)->nid);
407 if(impl)
408 {
409 /* There's an ENGINE for this job ... (apparently) */
410 const EVP_CIPHER *c = ENGINE_get_cipher(impl, (*pcipher)->nid);
411 if(!c)
412 {
413 /* One positive side-effect of US's export
414 * control history, is that we should at least
415 * be able to avoid using US mispellings of
416 * "initialisation"? */
417 EVPerr(EVP_F_DO_EVP_ENC_ENGINE_FULL, EVP_R_INITIALIZATION_ERROR);
418 return 0;
419 }
420 /* We'll use the ENGINE's private cipher definition */
421 *pcipher = c;
422 /* Store the ENGINE functional reference so we know
423 * 'cipher' came from an ENGINE and we need to release
424 * it when done. */
425 ctx->engine = impl;
426 }
427 else
428 ctx->engine = NULL;
429 return 1;
430 }
431
432void int_EVP_CIPHER_init_engine_callbacks(void)
433 {
434 int_EVP_CIPHER_set_engine_callbacks(
435 ENGINE_finish, do_evp_enc_engine_full);
436 }
437
438#endif
439
440#endif
diff --git a/src/lib/libcrypto/evp/evp_err.c b/src/lib/libcrypto/evp/evp_err.c
index e8c9e8de9c..b5b900d4fe 100644
--- a/src/lib/libcrypto/evp/evp_err.c
+++ b/src/lib/libcrypto/evp/evp_err.c
@@ -1,6 +1,6 @@
1/* crypto/evp/evp_err.c */ 1/* crypto/evp/evp_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -71,16 +71,23 @@
71static ERR_STRING_DATA EVP_str_functs[]= 71static ERR_STRING_DATA EVP_str_functs[]=
72 { 72 {
73{ERR_FUNC(EVP_F_AES_INIT_KEY), "AES_INIT_KEY"}, 73{ERR_FUNC(EVP_F_AES_INIT_KEY), "AES_INIT_KEY"},
74{ERR_FUNC(EVP_F_ALG_MODULE_INIT), "ALG_MODULE_INIT"},
74{ERR_FUNC(EVP_F_CAMELLIA_INIT_KEY), "CAMELLIA_INIT_KEY"}, 75{ERR_FUNC(EVP_F_CAMELLIA_INIT_KEY), "CAMELLIA_INIT_KEY"},
75{ERR_FUNC(EVP_F_D2I_PKEY), "D2I_PKEY"}, 76{ERR_FUNC(EVP_F_D2I_PKEY), "D2I_PKEY"},
77{ERR_FUNC(EVP_F_DO_EVP_ENC_ENGINE), "DO_EVP_ENC_ENGINE"},
78{ERR_FUNC(EVP_F_DO_EVP_ENC_ENGINE_FULL), "DO_EVP_ENC_ENGINE_FULL"},
79{ERR_FUNC(EVP_F_DO_EVP_MD_ENGINE), "DO_EVP_MD_ENGINE"},
80{ERR_FUNC(EVP_F_DO_EVP_MD_ENGINE_FULL), "DO_EVP_MD_ENGINE_FULL"},
76{ERR_FUNC(EVP_F_DSAPKEY2PKCS8), "DSAPKEY2PKCS8"}, 81{ERR_FUNC(EVP_F_DSAPKEY2PKCS8), "DSAPKEY2PKCS8"},
77{ERR_FUNC(EVP_F_DSA_PKEY2PKCS8), "DSA_PKEY2PKCS8"}, 82{ERR_FUNC(EVP_F_DSA_PKEY2PKCS8), "DSA_PKEY2PKCS8"},
78{ERR_FUNC(EVP_F_ECDSA_PKEY2PKCS8), "ECDSA_PKEY2PKCS8"}, 83{ERR_FUNC(EVP_F_ECDSA_PKEY2PKCS8), "ECDSA_PKEY2PKCS8"},
79{ERR_FUNC(EVP_F_ECKEY_PKEY2PKCS8), "ECKEY_PKEY2PKCS8"}, 84{ERR_FUNC(EVP_F_ECKEY_PKEY2PKCS8), "ECKEY_PKEY2PKCS8"},
85{ERR_FUNC(EVP_F_EVP_CIPHERINIT), "EVP_CipherInit"},
80{ERR_FUNC(EVP_F_EVP_CIPHERINIT_EX), "EVP_CipherInit_ex"}, 86{ERR_FUNC(EVP_F_EVP_CIPHERINIT_EX), "EVP_CipherInit_ex"},
81{ERR_FUNC(EVP_F_EVP_CIPHER_CTX_CTRL), "EVP_CIPHER_CTX_ctrl"}, 87{ERR_FUNC(EVP_F_EVP_CIPHER_CTX_CTRL), "EVP_CIPHER_CTX_ctrl"},
82{ERR_FUNC(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH), "EVP_CIPHER_CTX_set_key_length"}, 88{ERR_FUNC(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH), "EVP_CIPHER_CTX_set_key_length"},
83{ERR_FUNC(EVP_F_EVP_DECRYPTFINAL_EX), "EVP_DecryptFinal_ex"}, 89{ERR_FUNC(EVP_F_EVP_DECRYPTFINAL_EX), "EVP_DecryptFinal_ex"},
90{ERR_FUNC(EVP_F_EVP_DIGESTINIT), "EVP_DigestInit"},
84{ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX), "EVP_DigestInit_ex"}, 91{ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX), "EVP_DigestInit_ex"},
85{ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX), "EVP_EncryptFinal_ex"}, 92{ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX), "EVP_EncryptFinal_ex"},
86{ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX), "EVP_MD_CTX_copy_ex"}, 93{ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX), "EVP_MD_CTX_copy_ex"},
@@ -125,15 +132,20 @@ static ERR_STRING_DATA EVP_str_reasons[]=
125{ERR_REASON(EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH),"data not multiple of block length"}, 132{ERR_REASON(EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH),"data not multiple of block length"},
126{ERR_REASON(EVP_R_DECODE_ERROR) ,"decode error"}, 133{ERR_REASON(EVP_R_DECODE_ERROR) ,"decode error"},
127{ERR_REASON(EVP_R_DIFFERENT_KEY_TYPES) ,"different key types"}, 134{ERR_REASON(EVP_R_DIFFERENT_KEY_TYPES) ,"different key types"},
135{ERR_REASON(EVP_R_DISABLED_FOR_FIPS) ,"disabled for fips"},
128{ERR_REASON(EVP_R_ENCODE_ERROR) ,"encode error"}, 136{ERR_REASON(EVP_R_ENCODE_ERROR) ,"encode error"},
137{ERR_REASON(EVP_R_ERROR_LOADING_SECTION) ,"error loading section"},
138{ERR_REASON(EVP_R_ERROR_SETTING_FIPS_MODE),"error setting fips mode"},
129{ERR_REASON(EVP_R_EVP_PBE_CIPHERINIT_ERROR),"evp pbe cipherinit error"}, 139{ERR_REASON(EVP_R_EVP_PBE_CIPHERINIT_ERROR),"evp pbe cipherinit error"},
130{ERR_REASON(EVP_R_EXPECTING_AN_RSA_KEY) ,"expecting an rsa key"}, 140{ERR_REASON(EVP_R_EXPECTING_AN_RSA_KEY) ,"expecting an rsa key"},
131{ERR_REASON(EVP_R_EXPECTING_A_DH_KEY) ,"expecting a dh key"}, 141{ERR_REASON(EVP_R_EXPECTING_A_DH_KEY) ,"expecting a dh key"},
132{ERR_REASON(EVP_R_EXPECTING_A_DSA_KEY) ,"expecting a dsa key"}, 142{ERR_REASON(EVP_R_EXPECTING_A_DSA_KEY) ,"expecting a dsa key"},
133{ERR_REASON(EVP_R_EXPECTING_A_ECDSA_KEY) ,"expecting a ecdsa key"}, 143{ERR_REASON(EVP_R_EXPECTING_A_ECDSA_KEY) ,"expecting a ecdsa key"},
134{ERR_REASON(EVP_R_EXPECTING_A_EC_KEY) ,"expecting a ec key"}, 144{ERR_REASON(EVP_R_EXPECTING_A_EC_KEY) ,"expecting a ec key"},
145{ERR_REASON(EVP_R_FIPS_MODE_NOT_SUPPORTED),"fips mode not supported"},
135{ERR_REASON(EVP_R_INITIALIZATION_ERROR) ,"initialization error"}, 146{ERR_REASON(EVP_R_INITIALIZATION_ERROR) ,"initialization error"},
136{ERR_REASON(EVP_R_INPUT_NOT_INITIALIZED) ,"input not initialized"}, 147{ERR_REASON(EVP_R_INPUT_NOT_INITIALIZED) ,"input not initialized"},
148{ERR_REASON(EVP_R_INVALID_FIPS_MODE) ,"invalid fips mode"},
137{ERR_REASON(EVP_R_INVALID_KEY_LENGTH) ,"invalid key length"}, 149{ERR_REASON(EVP_R_INVALID_KEY_LENGTH) ,"invalid key length"},
138{ERR_REASON(EVP_R_IV_TOO_LARGE) ,"iv too large"}, 150{ERR_REASON(EVP_R_IV_TOO_LARGE) ,"iv too large"},
139{ERR_REASON(EVP_R_KEYGEN_FAILURE) ,"keygen failure"}, 151{ERR_REASON(EVP_R_KEYGEN_FAILURE) ,"keygen failure"},
@@ -145,6 +157,8 @@ static ERR_STRING_DATA EVP_str_reasons[]=
145{ERR_REASON(EVP_R_NO_VERIFY_FUNCTION_CONFIGURED),"no verify function configured"}, 157{ERR_REASON(EVP_R_NO_VERIFY_FUNCTION_CONFIGURED),"no verify function configured"},
146{ERR_REASON(EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE),"pkcs8 unknown broken type"}, 158{ERR_REASON(EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE),"pkcs8 unknown broken type"},
147{ERR_REASON(EVP_R_PUBLIC_KEY_NOT_RSA) ,"public key not rsa"}, 159{ERR_REASON(EVP_R_PUBLIC_KEY_NOT_RSA) ,"public key not rsa"},
160{ERR_REASON(EVP_R_SEED_KEY_SETUP_FAILED) ,"seed key setup failed"},
161{ERR_REASON(EVP_R_UNKNOWN_OPTION) ,"unknown option"},
148{ERR_REASON(EVP_R_UNKNOWN_PBE_ALGORITHM) ,"unknown pbe algorithm"}, 162{ERR_REASON(EVP_R_UNKNOWN_PBE_ALGORITHM) ,"unknown pbe algorithm"},
149{ERR_REASON(EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS),"unsuported number of rounds"}, 163{ERR_REASON(EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS),"unsuported number of rounds"},
150{ERR_REASON(EVP_R_UNSUPPORTED_CIPHER) ,"unsupported cipher"}, 164{ERR_REASON(EVP_R_UNSUPPORTED_CIPHER) ,"unsupported cipher"},
diff --git a/src/lib/libcrypto/evp/evp_lib.c b/src/lib/libcrypto/evp/evp_lib.c
index edb28ef38e..174cf6c594 100644
--- a/src/lib/libcrypto/evp/evp_lib.c
+++ b/src/lib/libcrypto/evp/evp_lib.c
@@ -67,6 +67,8 @@ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
67 67
68 if (c->cipher->set_asn1_parameters != NULL) 68 if (c->cipher->set_asn1_parameters != NULL)
69 ret=c->cipher->set_asn1_parameters(c,type); 69 ret=c->cipher->set_asn1_parameters(c,type);
70 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1)
71 ret=EVP_CIPHER_set_asn1_iv(c, type);
70 else 72 else
71 ret=-1; 73 ret=-1;
72 return(ret); 74 return(ret);
@@ -78,6 +80,8 @@ int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
78 80
79 if (c->cipher->get_asn1_parameters != NULL) 81 if (c->cipher->get_asn1_parameters != NULL)
80 ret=c->cipher->get_asn1_parameters(c,type); 82 ret=c->cipher->get_asn1_parameters(c,type);
83 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1)
84 ret=EVP_CIPHER_get_asn1_iv(c, type);
81 else 85 else
82 ret=-1; 86 ret=-1;
83 return(ret); 87 return(ret);
@@ -178,11 +182,6 @@ int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx)
178 return ctx->cipher->block_size; 182 return ctx->cipher->block_size;
179 } 183 }
180 184
181int EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl)
182 {
183 return ctx->cipher->do_cipher(ctx,out,in,inl);
184 }
185
186const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx) 185const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx)
187 { 186 {
188 return ctx->cipher; 187 return ctx->cipher;
@@ -193,11 +192,6 @@ unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher)
193 return cipher->flags; 192 return cipher->flags;
194 } 193 }
195 194
196unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx)
197 {
198 return ctx->cipher->flags;
199 }
200
201void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx) 195void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx)
202 { 196 {
203 return ctx->app_data; 197 return ctx->app_data;
@@ -213,11 +207,6 @@ int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher)
213 return cipher->iv_len; 207 return cipher->iv_len;
214 } 208 }
215 209
216int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx)
217 {
218 return ctx->cipher->iv_len;
219 }
220
221int EVP_CIPHER_key_length(const EVP_CIPHER *cipher) 210int EVP_CIPHER_key_length(const EVP_CIPHER *cipher)
222 { 211 {
223 return cipher->key_len; 212 return cipher->key_len;
@@ -228,11 +217,6 @@ int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx)
228 return ctx->key_len; 217 return ctx->key_len;
229 } 218 }
230 219
231int EVP_CIPHER_nid(const EVP_CIPHER *cipher)
232 {
233 return cipher->nid;
234 }
235
236int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx) 220int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx)
237 { 221 {
238 return ctx->cipher->nid; 222 return ctx->cipher->nid;
@@ -277,3 +261,18 @@ int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags)
277 { 261 {
278 return (ctx->flags & flags); 262 return (ctx->flags & flags);
279 } 263 }
264
265void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags)
266 {
267 ctx->flags |= flags;
268 }
269
270void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags)
271 {
272 ctx->flags &= ~flags;
273 }
274
275int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags)
276 {
277 return (ctx->flags & flags);
278 }
diff --git a/src/lib/libcrypto/evp/evp_locl.h b/src/lib/libcrypto/evp/evp_locl.h
index 073b0adcff..eabcc96f30 100644
--- a/src/lib/libcrypto/evp/evp_locl.h
+++ b/src/lib/libcrypto/evp/evp_locl.h
@@ -1,5 +1,5 @@
1/* evp_locl.h */ 1/* evp_locl.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -92,7 +92,7 @@ static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns
92#define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \ 92#define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \
93static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ 93static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
94{\ 94{\
95 cprefix##_cfb##cbits##_encrypt(in, out, (long)(cbits==1?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\ 95 cprefix##_cfb##cbits##_encrypt(in, out, (long)((cbits==1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
96 return 1;\ 96 return 1;\
97} 97}
98 98
@@ -226,11 +226,27 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; }
226 226
227#define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data) 227#define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data)
228 228
229#define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len) \ 229#define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len,fl) \
230 BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \ 230 BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \
231 BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \ 231 BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \
232 NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \ 232 NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \
233 0, cipher##_init_key, NULL, \ 233 (fl)|EVP_CIPH_FLAG_DEFAULT_ASN1, \
234 EVP_CIPHER_set_asn1_iv, \ 234 cipher##_init_key, NULL, NULL, NULL, NULL)
235 EVP_CIPHER_get_asn1_iv, \ 235
236 NULL) 236#ifdef OPENSSL_FIPS
237#define RC2_set_key private_RC2_set_key
238#define RC4_set_key private_RC4_set_key
239#define CAST_set_key private_CAST_set_key
240#define RC5_32_set_key private_RC5_32_set_key
241#define BF_set_key private_BF_set_key
242#define Camellia_set_key private_Camellia_set_key
243#define idea_set_encrypt_key private_idea_set_encrypt_key
244
245#define MD5_Init private_MD5_Init
246#define MD4_Init private_MD4_Init
247#define MD2_Init private_MD2_Init
248#define MDC2_Init private_MDC2_Init
249#define SHA_Init private_SHA_Init
250
251#endif
252
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c
index c26d2de0f3..5e830be65f 100644
--- a/src/lib/libcrypto/evp/evp_pbe.c
+++ b/src/lib/libcrypto/evp/evp_pbe.c
@@ -1,5 +1,5 @@
1/* evp_pbe.c */ 1/* evp_pbe.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/evp/evp_pkey.c b/src/lib/libcrypto/evp/evp_pkey.c
index 0147f3e02a..10d9e9e772 100644
--- a/src/lib/libcrypto/evp/evp_pkey.c
+++ b/src/lib/libcrypto/evp/evp_pkey.c
@@ -1,5 +1,5 @@
1/* evp_pkey.c */ 1/* evp_pkey.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/evp/m_dss.c b/src/lib/libcrypto/evp/m_dss.c
index a948c77fa4..6b0c0aa7a3 100644
--- a/src/lib/libcrypto/evp/m_dss.c
+++ b/src/lib/libcrypto/evp/m_dss.c
@@ -81,7 +81,7 @@ static const EVP_MD dsa_md=
81 NID_dsaWithSHA, 81 NID_dsaWithSHA,
82 NID_dsaWithSHA, 82 NID_dsaWithSHA,
83 SHA_DIGEST_LENGTH, 83 SHA_DIGEST_LENGTH,
84 0, 84 EVP_MD_FLAG_FIPS,
85 init, 85 init,
86 update, 86 update,
87 final, 87 final,
diff --git a/src/lib/libcrypto/evp/m_dss1.c b/src/lib/libcrypto/evp/m_dss1.c
index c12e13972b..da8babc147 100644
--- a/src/lib/libcrypto/evp/m_dss1.c
+++ b/src/lib/libcrypto/evp/m_dss1.c
@@ -68,6 +68,8 @@
68#include <openssl/dsa.h> 68#include <openssl/dsa.h>
69#endif 69#endif
70 70
71#ifndef OPENSSL_FIPS
72
71static int init(EVP_MD_CTX *ctx) 73static int init(EVP_MD_CTX *ctx)
72 { return SHA1_Init(ctx->md_data); } 74 { return SHA1_Init(ctx->md_data); }
73 75
@@ -98,3 +100,4 @@ const EVP_MD *EVP_dss1(void)
98 return(&dss1_md); 100 return(&dss1_md);
99 } 101 }
100#endif 102#endif
103#endif
diff --git a/src/lib/libcrypto/evp/m_md2.c b/src/lib/libcrypto/evp/m_md2.c
index 5ce849f161..8eee6236ba 100644
--- a/src/lib/libcrypto/evp/m_md2.c
+++ b/src/lib/libcrypto/evp/m_md2.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include "evp_locl.h"
61 62
62#ifndef OPENSSL_NO_MD2 63#ifndef OPENSSL_NO_MD2
63 64
diff --git a/src/lib/libcrypto/evp/m_md4.c b/src/lib/libcrypto/evp/m_md4.c
index 1e0b7c5b42..5cd2ab5ade 100644
--- a/src/lib/libcrypto/evp/m_md4.c
+++ b/src/lib/libcrypto/evp/m_md4.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include "evp_locl.h"
61 62
62#ifndef OPENSSL_NO_MD4 63#ifndef OPENSSL_NO_MD4
63 64
diff --git a/src/lib/libcrypto/evp/m_md5.c b/src/lib/libcrypto/evp/m_md5.c
index 63c142119e..6455829671 100644
--- a/src/lib/libcrypto/evp/m_md5.c
+++ b/src/lib/libcrypto/evp/m_md5.c
@@ -62,6 +62,7 @@
62#ifndef OPENSSL_NO_MD5 62#ifndef OPENSSL_NO_MD5
63 63
64#include <openssl/evp.h> 64#include <openssl/evp.h>
65#include "evp_locl.h"
65#include <openssl/objects.h> 66#include <openssl/objects.h>
66#include <openssl/x509.h> 67#include <openssl/x509.h>
67#include <openssl/md5.h> 68#include <openssl/md5.h>
diff --git a/src/lib/libcrypto/evp/m_mdc2.c b/src/lib/libcrypto/evp/m_mdc2.c
index 36c4e9b134..9f9bcf06ed 100644
--- a/src/lib/libcrypto/evp/m_mdc2.c
+++ b/src/lib/libcrypto/evp/m_mdc2.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include "evp_locl.h"
61 62
62#ifndef OPENSSL_NO_MDC2 63#ifndef OPENSSL_NO_MDC2
63 64
diff --git a/src/lib/libcrypto/evp/m_sha.c b/src/lib/libcrypto/evp/m_sha.c
index acccc8f92d..3f30dfc579 100644
--- a/src/lib/libcrypto/evp/m_sha.c
+++ b/src/lib/libcrypto/evp/m_sha.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include "evp_locl.h"
61 62
62#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) 63#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0)
63 64
diff --git a/src/lib/libcrypto/evp/m_sha1.c b/src/lib/libcrypto/evp/m_sha1.c
index 4679b1c463..471ec30be0 100644
--- a/src/lib/libcrypto/evp/m_sha1.c
+++ b/src/lib/libcrypto/evp/m_sha1.c
@@ -68,6 +68,8 @@
68#include <openssl/rsa.h> 68#include <openssl/rsa.h>
69#endif 69#endif
70 70
71#ifndef OPENSSL_FIPS
72
71static int init(EVP_MD_CTX *ctx) 73static int init(EVP_MD_CTX *ctx)
72 { return SHA1_Init(ctx->md_data); } 74 { return SHA1_Init(ctx->md_data); }
73 75
@@ -97,7 +99,6 @@ const EVP_MD *EVP_sha1(void)
97 { 99 {
98 return(&sha1_md); 100 return(&sha1_md);
99 } 101 }
100#endif
101 102
102#ifndef OPENSSL_NO_SHA256 103#ifndef OPENSSL_NO_SHA256
103static int init224(EVP_MD_CTX *ctx) 104static int init224(EVP_MD_CTX *ctx)
@@ -202,3 +203,7 @@ static const EVP_MD sha512_md=
202const EVP_MD *EVP_sha512(void) 203const EVP_MD *EVP_sha512(void)
203 { return(&sha512_md); } 204 { return(&sha512_md); }
204#endif /* ifndef OPENSSL_NO_SHA512 */ 205#endif /* ifndef OPENSSL_NO_SHA512 */
206
207#endif
208
209#endif
diff --git a/src/lib/libcrypto/evp/names.c b/src/lib/libcrypto/evp/names.c
index 88c1e780dd..e2e04c3570 100644
--- a/src/lib/libcrypto/evp/names.c
+++ b/src/lib/libcrypto/evp/names.c
@@ -66,6 +66,10 @@ int EVP_add_cipher(const EVP_CIPHER *c)
66 { 66 {
67 int r; 67 int r;
68 68
69#ifdef OPENSSL_FIPS
70 OPENSSL_init();
71#endif
72
69 r=OBJ_NAME_add(OBJ_nid2sn(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c); 73 r=OBJ_NAME_add(OBJ_nid2sn(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c);
70 if (r == 0) return(0); 74 if (r == 0) return(0);
71 r=OBJ_NAME_add(OBJ_nid2ln(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c); 75 r=OBJ_NAME_add(OBJ_nid2ln(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c);
@@ -77,6 +81,9 @@ int EVP_add_digest(const EVP_MD *md)
77 int r; 81 int r;
78 const char *name; 82 const char *name;
79 83
84#ifdef OPENSSL_FIPS
85 OPENSSL_init();
86#endif
80 name=OBJ_nid2sn(md->type); 87 name=OBJ_nid2sn(md->type);
81 r=OBJ_NAME_add(name,OBJ_NAME_TYPE_MD_METH,(const char *)md); 88 r=OBJ_NAME_add(name,OBJ_NAME_TYPE_MD_METH,(const char *)md);
82 if (r == 0) return(0); 89 if (r == 0) return(0);
diff --git a/src/lib/libcrypto/evp/p5_crpt.c b/src/lib/libcrypto/evp/p5_crpt.c
index 48d50014a0..2a265fdee2 100644
--- a/src/lib/libcrypto/evp/p5_crpt.c
+++ b/src/lib/libcrypto/evp/p5_crpt.c
@@ -1,5 +1,5 @@
1/* p5_crpt.c */ 1/* p5_crpt.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/evp/p5_crpt2.c b/src/lib/libcrypto/evp/p5_crpt2.c
index c969d5a206..6bec77baf9 100644
--- a/src/lib/libcrypto/evp/p5_crpt2.c
+++ b/src/lib/libcrypto/evp/p5_crpt2.c
@@ -1,5 +1,5 @@
1/* p5_crpt2.c */ 1/* p5_crpt2.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/evp/p_sign.c b/src/lib/libcrypto/evp/p_sign.c
index e4ae5906f5..bf41a0db68 100644
--- a/src/lib/libcrypto/evp/p_sign.c
+++ b/src/lib/libcrypto/evp/p_sign.c
@@ -84,10 +84,6 @@ int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
84 MS_STATIC EVP_MD_CTX tmp_ctx; 84 MS_STATIC EVP_MD_CTX tmp_ctx;
85 85
86 *siglen=0; 86 *siglen=0;
87 EVP_MD_CTX_init(&tmp_ctx);
88 EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
89 EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
90 EVP_MD_CTX_cleanup(&tmp_ctx);
91 for (i=0; i<4; i++) 87 for (i=0; i<4; i++)
92 { 88 {
93 v=ctx->digest->required_pkey_type[i]; 89 v=ctx->digest->required_pkey_type[i];
@@ -108,7 +104,23 @@ int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
108 EVPerr(EVP_F_EVP_SIGNFINAL,EVP_R_NO_SIGN_FUNCTION_CONFIGURED); 104 EVPerr(EVP_F_EVP_SIGNFINAL,EVP_R_NO_SIGN_FUNCTION_CONFIGURED);
109 return(0); 105 return(0);
110 } 106 }
111 return(ctx->digest->sign(ctx->digest->type,m,m_len,sigret,siglen, 107 EVP_MD_CTX_init(&tmp_ctx);
112 pkey->pkey.ptr)); 108 EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
109 if (ctx->digest->flags & EVP_MD_FLAG_SVCTX)
110 {
111 EVP_MD_SVCTX sctmp;
112 sctmp.mctx = &tmp_ctx;
113 sctmp.key = pkey->pkey.ptr;
114 i = ctx->digest->sign(ctx->digest->type,
115 NULL, -1, sigret, siglen, &sctmp);
116 }
117 else
118 {
119 EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
120 i = ctx->digest->sign(ctx->digest->type,m,m_len,sigret,siglen,
121 pkey->pkey.ptr);
122 }
123 EVP_MD_CTX_cleanup(&tmp_ctx);
124 return i;
113 } 125 }
114 126
diff --git a/src/lib/libcrypto/evp/p_verify.c b/src/lib/libcrypto/evp/p_verify.c
index 21a40a375e..2d46dffe7e 100644
--- a/src/lib/libcrypto/evp/p_verify.c
+++ b/src/lib/libcrypto/evp/p_verify.c
@@ -85,17 +85,29 @@ int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
85 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_WRONG_PUBLIC_KEY_TYPE); 85 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_WRONG_PUBLIC_KEY_TYPE);
86 return(-1); 86 return(-1);
87 } 87 }
88 EVP_MD_CTX_init(&tmp_ctx); 88 if (ctx->digest->verify == NULL)
89 EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
90 EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
91 EVP_MD_CTX_cleanup(&tmp_ctx);
92 if (ctx->digest->verify == NULL)
93 { 89 {
94 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_NO_VERIFY_FUNCTION_CONFIGURED); 90 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_NO_VERIFY_FUNCTION_CONFIGURED);
95 return(0); 91 return(0);
96 } 92 }
97 93
98 return(ctx->digest->verify(ctx->digest->type,m,m_len, 94 EVP_MD_CTX_init(&tmp_ctx);
99 sigbuf,siglen,pkey->pkey.ptr)); 95 EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
96 if (ctx->digest->flags & EVP_MD_FLAG_SVCTX)
97 {
98 EVP_MD_SVCTX sctmp;
99 sctmp.mctx = &tmp_ctx;
100 sctmp.key = pkey->pkey.ptr;
101 i = ctx->digest->verify(ctx->digest->type,
102 NULL, -1, sigbuf, siglen, &sctmp);
103 }
104 else
105 {
106 EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
107 i = ctx->digest->verify(ctx->digest->type,m,m_len,
108 sigbuf,siglen,pkey->pkey.ptr);
109 }
110 EVP_MD_CTX_cleanup(&tmp_ctx);
111 return i;
100 } 112 }
101 113
diff --git a/src/lib/libcrypto/hmac/hmac.c b/src/lib/libcrypto/hmac/hmac.c
index 1d140f7adb..cbc1c76a57 100644
--- a/src/lib/libcrypto/hmac/hmac.c
+++ b/src/lib/libcrypto/hmac/hmac.c
@@ -61,6 +61,8 @@
61#include "cryptlib.h" 61#include "cryptlib.h"
62#include <openssl/hmac.h> 62#include <openssl/hmac.h>
63 63
64#ifndef OPENSSL_FIPS
65
64void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 66void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
65 const EVP_MD *md, ENGINE *impl) 67 const EVP_MD *md, ENGINE *impl)
66 { 68 {
@@ -178,3 +180,4 @@ void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags)
178 EVP_MD_CTX_set_flags(&ctx->md_ctx, flags); 180 EVP_MD_CTX_set_flags(&ctx->md_ctx, flags);
179 } 181 }
180 182
183#endif
diff --git a/src/lib/libcrypto/idea/idea.h b/src/lib/libcrypto/idea/idea.h
index bf97a37e39..a137d4cbce 100644
--- a/src/lib/libcrypto/idea/idea.h
+++ b/src/lib/libcrypto/idea/idea.h
@@ -83,6 +83,9 @@ typedef struct idea_key_st
83const char *idea_options(void); 83const char *idea_options(void);
84void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, 84void idea_ecb_encrypt(const unsigned char *in, unsigned char *out,
85 IDEA_KEY_SCHEDULE *ks); 85 IDEA_KEY_SCHEDULE *ks);
86#ifdef OPENSSL_FIPS
87void private_idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks);
88#endif
86void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 89void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks);
87void idea_set_decrypt_key(const IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 90void idea_set_decrypt_key(const IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk);
88void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, 91void idea_cbc_encrypt(const unsigned char *in, unsigned char *out,
diff --git a/src/lib/libcrypto/install.com b/src/lib/libcrypto/install.com
index 58a4fecdaa..ffad1f97a7 100644
--- a/src/lib/libcrypto/install.com
+++ b/src/lib/libcrypto/install.com
@@ -35,12 +35,12 @@ $
35$ SDIRS := ,- 35$ SDIRS := ,-
36 OBJECTS,- 36 OBJECTS,-
37 MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,- 37 MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,-
38 DES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,- 38 DES,AES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,-
39 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,- 39 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,-
40 BUFFER,BIO,STACK,LHASH,RAND,ERR,- 40 BUFFER,BIO,STACK,LHASH,RAND,ERR,-
41 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,- 41 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,-
42 UI,KRB5,- 42 UI,KRB5,-
43 STORE,CMS,PQUEUE 43 STORE,PQUEUE,JPAKE
44$ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,- 44$ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,-
45 symhacks.h,ossl_typ.h 45 symhacks.h,ossl_typ.h
46$ EXHEADER_OBJECTS := objects.h,obj_mac.h 46$ EXHEADER_OBJECTS := objects.h,obj_mac.h
@@ -52,6 +52,7 @@ $ EXHEADER_MDC2 := mdc2.h
52$ EXHEADER_HMAC := hmac.h 52$ EXHEADER_HMAC := hmac.h
53$ EXHEADER_RIPEMD := ripemd.h 53$ EXHEADER_RIPEMD := ripemd.h
54$ EXHEADER_DES := des.h,des_old.h 54$ EXHEADER_DES := des.h,des_old.h
55$ EXHEADER_AES := aes.h
55$ EXHEADER_RC2 := rc2.h 56$ EXHEADER_RC2 := rc2.h
56$ EXHEADER_RC4 := rc4.h 57$ EXHEADER_RC4 := rc4.h
57$ EXHEADER_RC5 := rc5.h 58$ EXHEADER_RC5 := rc5.h
@@ -69,7 +70,6 @@ $ EXHEADER_DH := dh.h
69$ EXHEADER_ECDH := ecdh.h 70$ EXHEADER_ECDH := ecdh.h
70$ EXHEADER_DSO := dso.h 71$ EXHEADER_DSO := dso.h
71$ EXHEADER_ENGINE := engine.h 72$ EXHEADER_ENGINE := engine.h
72$ EXHEADER_AES := aes.h
73$ EXHEADER_BUFFER := buffer.h 73$ EXHEADER_BUFFER := buffer.h
74$ EXHEADER_BIO := bio.h 74$ EXHEADER_BIO := bio.h
75$ EXHEADER_STACK := stack.h,safestack.h 75$ EXHEADER_STACK := stack.h,safestack.h
@@ -92,7 +92,7 @@ $ EXHEADER_KRB5 := krb5_asn.h
92$! EXHEADER_STORE := store.h,str_compat.h 92$! EXHEADER_STORE := store.h,str_compat.h
93$ EXHEADER_STORE := store.h 93$ EXHEADER_STORE := store.h
94$ EXHEADER_PQUEUE := pqueue.h,pq_compat.h 94$ EXHEADER_PQUEUE := pqueue.h,pq_compat.h
95$ EXHEADER_CMS := cms.h 95$ EXHEADER_JPAKE := jpake.h
96$ LIBS := LIBCRYPTO 96$ LIBS := LIBCRYPTO
97$ 97$
98$ VEXE_DIR := [-.VAX.EXE.CRYPTO] 98$ VEXE_DIR := [-.VAX.EXE.CRYPTO]
diff --git a/src/lib/libcrypto/md2/md2.h b/src/lib/libcrypto/md2/md2.h
index a46120e7d4..d59c9f2593 100644
--- a/src/lib/libcrypto/md2/md2.h
+++ b/src/lib/libcrypto/md2/md2.h
@@ -81,6 +81,9 @@ typedef struct MD2state_st
81 } MD2_CTX; 81 } MD2_CTX;
82 82
83const char *MD2_options(void); 83const char *MD2_options(void);
84#ifdef OPENSSL_FIPS
85int private_MD2_Init(MD2_CTX *c);
86#endif
84int MD2_Init(MD2_CTX *c); 87int MD2_Init(MD2_CTX *c);
85int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); 88int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len);
86int MD2_Final(unsigned char *md, MD2_CTX *c); 89int 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 6f68b25c6a..cc4eeaf7a7 100644
--- a/src/lib/libcrypto/md2/md2_dgst.c
+++ b/src/lib/libcrypto/md2/md2_dgst.c
@@ -62,6 +62,11 @@
62#include <openssl/md2.h> 62#include <openssl/md2.h>
63#include <openssl/opensslv.h> 63#include <openssl/opensslv.h>
64#include <openssl/crypto.h> 64#include <openssl/crypto.h>
65#ifdef OPENSSL_FIPS
66#include <openssl/fips.h>
67#endif
68
69#include <openssl/err.h>
65 70
66const char MD2_version[]="MD2" OPENSSL_VERSION_PTEXT; 71const char MD2_version[]="MD2" OPENSSL_VERSION_PTEXT;
67 72
@@ -116,7 +121,7 @@ const char *MD2_options(void)
116 return("md2(int)"); 121 return("md2(int)");
117 } 122 }
118 123
119int MD2_Init(MD2_CTX *c) 124FIPS_NON_FIPS_MD_Init(MD2)
120 { 125 {
121 c->num=0; 126 c->num=0;
122 memset(c->state,0,sizeof c->state); 127 memset(c->state,0,sizeof c->state);
diff --git a/src/lib/libcrypto/md4/md4.h b/src/lib/libcrypto/md4/md4.h
index 5598c93a4f..ba1fe4a6ee 100644
--- a/src/lib/libcrypto/md4/md4.h
+++ b/src/lib/libcrypto/md4/md4.h
@@ -105,6 +105,9 @@ typedef struct MD4state_st
105 unsigned int num; 105 unsigned int num;
106 } MD4_CTX; 106 } MD4_CTX;
107 107
108#ifdef OPENSSL_FIPS
109int private_MD4_Init(MD4_CTX *c);
110#endif
108int MD4_Init(MD4_CTX *c); 111int MD4_Init(MD4_CTX *c);
109int MD4_Update(MD4_CTX *c, const void *data, size_t len); 112int MD4_Update(MD4_CTX *c, const void *data, size_t len);
110int MD4_Final(unsigned char *md, MD4_CTX *c); 113int MD4_Final(unsigned char *md, MD4_CTX *c);
diff --git a/src/lib/libcrypto/md4/md4_dgst.c b/src/lib/libcrypto/md4/md4_dgst.c
index cfef94af39..0f5448601d 100644
--- a/src/lib/libcrypto/md4/md4_dgst.c
+++ b/src/lib/libcrypto/md4/md4_dgst.c
@@ -59,6 +59,11 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "md4_locl.h" 60#include "md4_locl.h"
61#include <openssl/opensslv.h> 61#include <openssl/opensslv.h>
62#include <openssl/err.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62 67
63const char MD4_version[]="MD4" OPENSSL_VERSION_PTEXT; 68const char MD4_version[]="MD4" OPENSSL_VERSION_PTEXT;
64 69
@@ -70,7 +75,7 @@ const char MD4_version[]="MD4" OPENSSL_VERSION_PTEXT;
70#define INIT_DATA_C (unsigned long)0x98badcfeL 75#define INIT_DATA_C (unsigned long)0x98badcfeL
71#define INIT_DATA_D (unsigned long)0x10325476L 76#define INIT_DATA_D (unsigned long)0x10325476L
72 77
73int MD4_Init(MD4_CTX *c) 78FIPS_NON_FIPS_MD_Init(MD4)
74 { 79 {
75 c->A=INIT_DATA_A; 80 c->A=INIT_DATA_A;
76 c->B=INIT_DATA_B; 81 c->B=INIT_DATA_B;
diff --git a/src/lib/libcrypto/md5/md5.h b/src/lib/libcrypto/md5/md5.h
index dbdc0e1abc..0761f84a27 100644
--- a/src/lib/libcrypto/md5/md5.h
+++ b/src/lib/libcrypto/md5/md5.h
@@ -105,6 +105,9 @@ typedef struct MD5state_st
105 unsigned int num; 105 unsigned int num;
106 } MD5_CTX; 106 } MD5_CTX;
107 107
108#ifdef OPENSSL_FIPS
109int private_MD5_Init(MD5_CTX *c);
110#endif
108int MD5_Init(MD5_CTX *c); 111int MD5_Init(MD5_CTX *c);
109int MD5_Update(MD5_CTX *c, const void *data, size_t len); 112int MD5_Update(MD5_CTX *c, const void *data, size_t len);
110int MD5_Final(unsigned char *md, MD5_CTX *c); 113int MD5_Final(unsigned char *md, MD5_CTX *c);
diff --git a/src/lib/libcrypto/md5/md5_dgst.c b/src/lib/libcrypto/md5/md5_dgst.c
index b96e332ba4..47bb9020ee 100644
--- a/src/lib/libcrypto/md5/md5_dgst.c
+++ b/src/lib/libcrypto/md5/md5_dgst.c
@@ -59,6 +59,11 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "md5_locl.h" 60#include "md5_locl.h"
61#include <openssl/opensslv.h> 61#include <openssl/opensslv.h>
62#include <openssl/err.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62 67
63const char MD5_version[]="MD5" OPENSSL_VERSION_PTEXT; 68const char MD5_version[]="MD5" OPENSSL_VERSION_PTEXT;
64 69
@@ -70,7 +75,7 @@ const char MD5_version[]="MD5" OPENSSL_VERSION_PTEXT;
70#define INIT_DATA_C (unsigned long)0x98badcfeL 75#define INIT_DATA_C (unsigned long)0x98badcfeL
71#define INIT_DATA_D (unsigned long)0x10325476L 76#define INIT_DATA_D (unsigned long)0x10325476L
72 77
73int MD5_Init(MD5_CTX *c) 78FIPS_NON_FIPS_MD_Init(MD5)
74 { 79 {
75 c->A=INIT_DATA_A; 80 c->A=INIT_DATA_A;
76 c->B=INIT_DATA_B; 81 c->B=INIT_DATA_B;
diff --git a/src/lib/libcrypto/mdc2/Makefile b/src/lib/libcrypto/mdc2/Makefile
index 1d064f17a6..ea25688d88 100644
--- a/src/lib/libcrypto/mdc2/Makefile
+++ b/src/lib/libcrypto/mdc2/Makefile
@@ -33,7 +33,7 @@ top:
33all: lib 33all: lib
34 34
35lib: $(LIBOBJ) 35lib: $(LIBOBJ)
36 $(AR) $(LIB) $(LIBOBJ) 36 $(ARX) $(LIB) $(LIBOBJ)
37 $(RANLIB) $(LIB) || echo Never mind. 37 $(RANLIB) $(LIB) || echo Never mind.
38 @touch lib 38 @touch lib
39 39
diff --git a/src/lib/libcrypto/mdc2/mdc2.h b/src/lib/libcrypto/mdc2/mdc2.h
index 72778a5212..7e1354116a 100644
--- a/src/lib/libcrypto/mdc2/mdc2.h
+++ b/src/lib/libcrypto/mdc2/mdc2.h
@@ -80,7 +80,9 @@ typedef struct mdc2_ctx_st
80 int pad_type; /* either 1 or 2, default 1 */ 80 int pad_type; /* either 1 or 2, default 1 */
81 } MDC2_CTX; 81 } MDC2_CTX;
82 82
83 83#ifdef OPENSSL_FIPS
84int private_MDC2_Init(MDC2_CTX *c);
85#endif
84int MDC2_Init(MDC2_CTX *c); 86int MDC2_Init(MDC2_CTX *c);
85int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); 87int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len);
86int MDC2_Final(unsigned char *md, MDC2_CTX *c); 88int MDC2_Final(unsigned char *md, MDC2_CTX *c);
diff --git a/src/lib/libcrypto/mem.c b/src/lib/libcrypto/mem.c
index 6635167228..00ebaf0b9b 100644
--- a/src/lib/libcrypto/mem.c
+++ b/src/lib/libcrypto/mem.c
@@ -101,7 +101,7 @@ static void (*free_locked_func)(void *) = free;
101 101
102/* may be changed as long as 'allow_customize_debug' is set */ 102/* may be changed as long as 'allow_customize_debug' is set */
103/* XXX use correct function pointer types */ 103/* XXX use correct function pointer types */
104#ifdef CRYPTO_MDEBUG 104#if defined(CRYPTO_MDEBUG) && !defined(OPENSSL_FIPS)
105/* use default functions from mem_dbg.c */ 105/* use default functions from mem_dbg.c */
106static void (*malloc_debug_func)(void *,int,const char *,int,int) 106static void (*malloc_debug_func)(void *,int,const char *,int,int)
107 = CRYPTO_dbg_malloc; 107 = CRYPTO_dbg_malloc;
@@ -110,6 +110,14 @@ static void (*realloc_debug_func)(void *,void *,int,const char *,int,int)
110static void (*free_debug_func)(void *,int) = CRYPTO_dbg_free; 110static void (*free_debug_func)(void *,int) = CRYPTO_dbg_free;
111static void (*set_debug_options_func)(long) = CRYPTO_dbg_set_options; 111static void (*set_debug_options_func)(long) = CRYPTO_dbg_set_options;
112static long (*get_debug_options_func)(void) = CRYPTO_dbg_get_options; 112static long (*get_debug_options_func)(void) = CRYPTO_dbg_get_options;
113
114static int (*push_info_func)(const char *info, const char *file, int line)
115 = CRYPTO_dbg_push_info;
116static int (*pop_info_func)(void)
117 = CRYPTO_dbg_pop_info;
118static int (*remove_all_info_func)(void)
119 = CRYPTO_dbg_remove_all_info;
120
113#else 121#else
114/* applications can use CRYPTO_malloc_debug_init() to select above case 122/* applications can use CRYPTO_malloc_debug_init() to select above case
115 * at run-time */ 123 * at run-time */
@@ -119,6 +127,13 @@ static void (*realloc_debug_func)(void *,void *,int,const char *,int,int)
119static void (*free_debug_func)(void *,int) = NULL; 127static void (*free_debug_func)(void *,int) = NULL;
120static void (*set_debug_options_func)(long) = NULL; 128static void (*set_debug_options_func)(long) = NULL;
121static long (*get_debug_options_func)(void) = NULL; 129static long (*get_debug_options_func)(void) = NULL;
130
131
132static int (*push_info_func)(const char *info, const char *file, int line)
133 = NULL;
134static int (*pop_info_func)(void) = NULL;
135static int (*remove_all_info_func)(void) = NULL;
136
122#endif 137#endif
123 138
124 139
@@ -194,6 +209,15 @@ int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
194 return 1; 209 return 1;
195 } 210 }
196 211
212void CRYPTO_set_mem_info_functions(
213 int (*push_info_fn)(const char *info, const char *file, int line),
214 int (*pop_info_fn)(void),
215 int (*remove_all_info_fn)(void))
216 {
217 push_info_func = push_info_fn;
218 pop_info_func = pop_info_fn;
219 remove_all_info_func = remove_all_info_fn;
220 }
197 221
198void CRYPTO_get_mem_functions(void *(**m)(size_t), void *(**r)(void *, size_t), 222void CRYPTO_get_mem_functions(void *(**m)(size_t), void *(**r)(void *, size_t),
199 void (**f)(void *)) 223 void (**f)(void *))
@@ -399,3 +423,24 @@ long CRYPTO_get_mem_debug_options(void)
399 return get_debug_options_func(); 423 return get_debug_options_func();
400 return 0; 424 return 0;
401 } 425 }
426
427int CRYPTO_push_info_(const char *info, const char *file, int line)
428 {
429 if (push_info_func)
430 return push_info_func(info, file, line);
431 return 1;
432 }
433
434int CRYPTO_pop_info(void)
435 {
436 if (pop_info_func)
437 return pop_info_func();
438 return 1;
439 }
440
441int CRYPTO_remove_all_info(void)
442 {
443 if (remove_all_info_func)
444 return remove_all_info_func();
445 return 1;
446 }
diff --git a/src/lib/libcrypto/mem_dbg.c b/src/lib/libcrypto/mem_dbg.c
index 8316485217..dfeb084799 100644
--- a/src/lib/libcrypto/mem_dbg.c
+++ b/src/lib/libcrypto/mem_dbg.c
@@ -330,7 +330,7 @@ static APP_INFO *pop_info(void)
330 return(ret); 330 return(ret);
331 } 331 }
332 332
333int CRYPTO_push_info_(const char *info, const char *file, int line) 333int CRYPTO_dbg_push_info(const char *info, const char *file, int line)
334 { 334 {
335 APP_INFO *ami, *amim; 335 APP_INFO *ami, *amim;
336 int ret=0; 336 int ret=0;
@@ -380,7 +380,7 @@ int CRYPTO_push_info_(const char *info, const char *file, int line)
380 return(ret); 380 return(ret);
381 } 381 }
382 382
383int CRYPTO_pop_info(void) 383int CRYPTO_dbg_pop_info(void)
384 { 384 {
385 int ret=0; 385 int ret=0;
386 386
@@ -395,7 +395,7 @@ int CRYPTO_pop_info(void)
395 return(ret); 395 return(ret);
396 } 396 }
397 397
398int CRYPTO_remove_all_info(void) 398int CRYPTO_dbg_remove_all_info(void)
399 { 399 {
400 int ret=0; 400 int ret=0;
401 401
@@ -793,3 +793,25 @@ void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb)
793 lh_doall_arg(mh, LHASH_DOALL_ARG_FN(cb_leak), &cb); 793 lh_doall_arg(mh, LHASH_DOALL_ARG_FN(cb_leak), &cb);
794 CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC2); 794 CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC2);
795 } 795 }
796
797void CRYPTO_malloc_debug_init(void)
798 {
799 CRYPTO_set_mem_debug_functions(
800 CRYPTO_dbg_malloc,
801 CRYPTO_dbg_realloc,
802 CRYPTO_dbg_free,
803 CRYPTO_dbg_set_options,
804 CRYPTO_dbg_get_options);
805 CRYPTO_set_mem_info_functions(
806 CRYPTO_dbg_push_info,
807 CRYPTO_dbg_pop_info,
808 CRYPTO_dbg_remove_all_info);
809 }
810
811char *CRYPTO_strdup(const char *str, const char *file, int line)
812 {
813 char *ret = CRYPTO_malloc(strlen(str)+1, file, line);
814
815 strcpy(ret, str);
816 return ret;
817 }
diff --git a/src/lib/libcrypto/objects/obj_dat.pl b/src/lib/libcrypto/objects/obj_dat.pl
index 8a09a46ee6..7de2f77afd 100644
--- a/src/lib/libcrypto/objects/obj_dat.pl
+++ b/src/lib/libcrypto/objects/obj_dat.pl
@@ -2,7 +2,9 @@
2 2
3# fixes bug in floating point emulation on sparc64 when 3# fixes bug in floating point emulation on sparc64 when
4# this script produces off-by-one output on sparc64 4# this script produces off-by-one output on sparc64
5use integer; 5eval 'use integer;';
6
7print STDERR "Warning: perl module integer not found.\n" if ($@);
6 8
7sub obj_cmp 9sub obj_cmp
8 { 10 {
diff --git a/src/lib/libcrypto/objects/obj_mac.num b/src/lib/libcrypto/objects/obj_mac.num
index 53c9cb0d6a..e3f56bc52c 100644
--- a/src/lib/libcrypto/objects/obj_mac.num
+++ b/src/lib/libcrypto/objects/obj_mac.num
@@ -854,3 +854,5 @@ id_GostR3411_94_with_GostR3410_2001_cc 853
854id_GostR3410_2001_ParamSet_cc 854 854id_GostR3410_2001_ParamSet_cc 854
855hmac 855 855hmac 855
856LocalKeySet 856 856LocalKeySet 856
857freshest_crl 857
858id_on_permanentIdentifier 858
diff --git a/src/lib/libcrypto/objects/objects.txt b/src/lib/libcrypto/objects/objects.txt
index e009702e55..a6a811b8e7 100644
--- a/src/lib/libcrypto/objects/objects.txt
+++ b/src/lib/libcrypto/objects/objects.txt
@@ -557,6 +557,7 @@ id-cmc 24 : id-cmc-confirmCertAcceptance
557 557
558# other names 558# other names
559id-on 1 : id-on-personalData 559id-on 1 : id-on-personalData
560id-on 3 : id-on-permanentIdentifier : Permanent Identifier
560 561
561# personal data attributes 562# personal data attributes
562id-pda 1 : id-pda-dateOfBirth 563id-pda 1 : id-pda-dateOfBirth
@@ -726,6 +727,8 @@ id-ce 35 : authorityKeyIdentifier : X509v3 Authority Key Identifier
726id-ce 36 : policyConstraints : X509v3 Policy Constraints 727id-ce 36 : policyConstraints : X509v3 Policy Constraints
727!Cname ext-key-usage 728!Cname ext-key-usage
728id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage 729id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage
730!Cname freshest-crl
731id-ce 46 : freshestCRL : X509v3 Freshest CRL
729!Cname inhibit-any-policy 732!Cname inhibit-any-policy
730id-ce 54 : inhibitAnyPolicy : X509v3 Inhibit Any Policy 733id-ce 54 : inhibitAnyPolicy : X509v3 Inhibit Any Policy
731!Cname target-information 734!Cname target-information
diff --git a/src/lib/libcrypto/ocsp/ocsp_asn.c b/src/lib/libcrypto/ocsp/ocsp_asn.c
index 39b7a1c568..bfe892ac70 100644
--- a/src/lib/libcrypto/ocsp/ocsp_asn.c
+++ b/src/lib/libcrypto/ocsp/ocsp_asn.c
@@ -1,5 +1,5 @@
1/* ocsp_asn.c */ 1/* ocsp_asn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/ocsp/ocsp_ht.c b/src/lib/libcrypto/ocsp/ocsp_ht.c
index a8e569b74a..6abb30b2c0 100644
--- a/src/lib/libcrypto/ocsp/ocsp_ht.c
+++ b/src/lib/libcrypto/ocsp/ocsp_ht.c
@@ -1,5 +1,5 @@
1/* ocsp_ht.c */ 1/* ocsp_ht.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -56,11 +56,12 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/asn1.h>
60#include <stdio.h> 59#include <stdio.h>
61#include <stdlib.h> 60#include <stdlib.h>
62#include <ctype.h> 61#include <ctype.h>
63#include <string.h> 62#include <string.h>
63#include "e_os.h"
64#include <openssl/asn1.h>
64#include <openssl/ocsp.h> 65#include <openssl/ocsp.h>
65#include <openssl/err.h> 66#include <openssl/err.h>
66#include <openssl/buffer.h> 67#include <openssl/buffer.h>
diff --git a/src/lib/libcrypto/ocsp/ocsp_srv.c b/src/lib/libcrypto/ocsp/ocsp_srv.c
index fffa134e75..1c606dd0b6 100644
--- a/src/lib/libcrypto/ocsp/ocsp_srv.c
+++ b/src/lib/libcrypto/ocsp/ocsp_srv.c
@@ -1,5 +1,5 @@
1/* ocsp_srv.c */ 1/* ocsp_srv.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/ocsp/ocsp_vfy.c b/src/lib/libcrypto/ocsp/ocsp_vfy.c
index 23ea41c847..4a0c3870d8 100644
--- a/src/lib/libcrypto/ocsp/ocsp_vfy.c
+++ b/src/lib/libcrypto/ocsp/ocsp_vfy.c
@@ -1,5 +1,5 @@
1/* ocsp_vfy.c */ 1/* ocsp_vfy.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/opensslconf.h.in b/src/lib/libcrypto/opensslconf.h.in
index cee83acf98..1c77f03c3d 100644
--- a/src/lib/libcrypto/opensslconf.h.in
+++ b/src/lib/libcrypto/opensslconf.h.in
@@ -1,5 +1,20 @@
1/* crypto/opensslconf.h.in */ 1/* crypto/opensslconf.h.in */
2 2
3#ifdef OPENSSL_DOING_MAKEDEPEND
4
5/* Include any symbols here that have to be explicitly set to enable a feature
6 * that should be visible to makedepend.
7 *
8 * [Our "make depend" doesn't actually look at this, we use actual build settings
9 * instead; we want to make it easy to remove subdirectories with disabled algorithms.]
10 */
11
12#ifndef OPENSSL_FIPS
13#define OPENSSL_FIPS
14#endif
15
16#endif
17
3/* Generate 80386 code? */ 18/* Generate 80386 code? */
4#undef I386_ONLY 19#undef I386_ONLY
5 20
diff --git a/src/lib/libcrypto/opensslv.h b/src/lib/libcrypto/opensslv.h
index 5bdd370ac9..09687b5136 100644
--- a/src/lib/libcrypto/opensslv.h
+++ b/src/lib/libcrypto/opensslv.h
@@ -25,11 +25,11 @@
25 * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for 25 * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
26 * major minor fix final patch/beta) 26 * major minor fix final patch/beta)
27 */ 27 */
28#define OPENSSL_VERSION_NUMBER 0x0090809fL 28#define OPENSSL_VERSION_NUMBER 0x009080afL
29#ifdef OPENSSL_FIPS 29#ifdef OPENSSL_FIPS
30#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8i-fips 15 Sep 2008" 30#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8j-fips 07 Jan 2009"
31#else 31#else
32#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8i 15 Sep 2008" 32#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8j 07 Jan 2009"
33#endif 33#endif
34#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT 34#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
35 35
diff --git a/src/lib/libcrypto/ossl_typ.h b/src/lib/libcrypto/ossl_typ.h
index 734200428f..0e7a380880 100644
--- a/src/lib/libcrypto/ossl_typ.h
+++ b/src/lib/libcrypto/ossl_typ.h
@@ -100,6 +100,8 @@ typedef int ASN1_NULL;
100#undef X509_EXTENSIONS 100#undef X509_EXTENSIONS
101#undef X509_CERT_PAIR 101#undef X509_CERT_PAIR
102#undef PKCS7_ISSUER_AND_SERIAL 102#undef PKCS7_ISSUER_AND_SERIAL
103#undef OCSP_REQUEST
104#undef OCSP_RESPONSE
103#endif 105#endif
104 106
105#ifdef BIGNUM 107#ifdef BIGNUM
diff --git a/src/lib/libcrypto/pem/pem.h b/src/lib/libcrypto/pem/pem.h
index 670afa670b..6f8e01544b 100644
--- a/src/lib/libcrypto/pem/pem.h
+++ b/src/lib/libcrypto/pem/pem.h
@@ -125,6 +125,7 @@ extern "C" {
125#define PEM_STRING_DSA "DSA PRIVATE KEY" 125#define PEM_STRING_DSA "DSA PRIVATE KEY"
126#define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY" 126#define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY"
127#define PEM_STRING_PKCS7 "PKCS7" 127#define PEM_STRING_PKCS7 "PKCS7"
128#define PEM_STRING_PKCS7_SIGNED "PKCS #7 SIGNED DATA"
128#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY" 129#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY"
129#define PEM_STRING_PKCS8INF "PRIVATE KEY" 130#define PEM_STRING_PKCS8INF "PRIVATE KEY"
130#define PEM_STRING_DHPARAMS "DH PARAMETERS" 131#define PEM_STRING_DHPARAMS "DH PARAMETERS"
diff --git a/src/lib/libcrypto/pem/pem_all.c b/src/lib/libcrypto/pem/pem_all.c
index 66cbc7eb82..69dd19bf2e 100644
--- a/src/lib/libcrypto/pem/pem_all.c
+++ b/src/lib/libcrypto/pem/pem_all.c
@@ -194,7 +194,49 @@ RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb,
194 194
195#endif 195#endif
196 196
197#ifdef OPENSSL_FIPS
198
199int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc,
200 unsigned char *kstr, int klen,
201 pem_password_cb *cb, void *u)
202{
203 EVP_PKEY *k;
204 int ret;
205 k = EVP_PKEY_new();
206 if (!k)
207 return 0;
208 EVP_PKEY_set1_RSA(k, x);
209
210 ret = PEM_write_bio_PrivateKey(bp, k, enc, kstr, klen, cb, u);
211 EVP_PKEY_free(k);
212 return ret;
213}
214
215#ifndef OPENSSL_NO_FP_API
216int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc,
217 unsigned char *kstr, int klen,
218 pem_password_cb *cb, void *u)
219{
220 EVP_PKEY *k;
221 int ret;
222 k = EVP_PKEY_new();
223 if (!k)
224 return 0;
225
226 EVP_PKEY_set1_RSA(k, x);
227
228 ret = PEM_write_PrivateKey(fp, k, enc, kstr, klen, cb, u);
229 EVP_PKEY_free(k);
230 return ret;
231}
232#endif
233
234#else
235
197IMPLEMENT_PEM_write_cb_const(RSAPrivateKey, RSA, PEM_STRING_RSA, RSAPrivateKey) 236IMPLEMENT_PEM_write_cb_const(RSAPrivateKey, RSA, PEM_STRING_RSA, RSAPrivateKey)
237
238#endif
239
198IMPLEMENT_PEM_rw_const(RSAPublicKey, RSA, PEM_STRING_RSA_PUBLIC, RSAPublicKey) 240IMPLEMENT_PEM_rw_const(RSAPublicKey, RSA, PEM_STRING_RSA_PUBLIC, RSAPublicKey)
199IMPLEMENT_PEM_rw(RSA_PUBKEY, RSA, PEM_STRING_PUBLIC, RSA_PUBKEY) 241IMPLEMENT_PEM_rw(RSA_PUBKEY, RSA, PEM_STRING_PUBLIC, RSA_PUBKEY)
200 242
@@ -224,7 +266,47 @@ DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb,
224 return pkey_get_dsa(pktmp, dsa); 266 return pkey_get_dsa(pktmp, dsa);
225} 267}
226 268
269#ifdef OPENSSL_FIPS
270
271int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, const EVP_CIPHER *enc,
272 unsigned char *kstr, int klen,
273 pem_password_cb *cb, void *u)
274{
275 EVP_PKEY *k;
276 int ret;
277 k = EVP_PKEY_new();
278 if (!k)
279 return 0;
280 EVP_PKEY_set1_DSA(k, x);
281
282 ret = PEM_write_bio_PrivateKey(bp, k, enc, kstr, klen, cb, u);
283 EVP_PKEY_free(k);
284 return ret;
285}
286
287#ifndef OPENSSL_NO_FP_API
288int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc,
289 unsigned char *kstr, int klen,
290 pem_password_cb *cb, void *u)
291{
292 EVP_PKEY *k;
293 int ret;
294 k = EVP_PKEY_new();
295 if (!k)
296 return 0;
297 EVP_PKEY_set1_DSA(k, x);
298 ret = PEM_write_PrivateKey(fp, k, enc, kstr, klen, cb, u);
299 EVP_PKEY_free(k);
300 return ret;
301}
302#endif
303
304#else
305
227IMPLEMENT_PEM_write_cb_const(DSAPrivateKey, DSA, PEM_STRING_DSA, DSAPrivateKey) 306IMPLEMENT_PEM_write_cb_const(DSAPrivateKey, DSA, PEM_STRING_DSA, DSAPrivateKey)
307
308#endif
309
228IMPLEMENT_PEM_rw(DSA_PUBKEY, DSA, PEM_STRING_PUBLIC, DSA_PUBKEY) 310IMPLEMENT_PEM_rw(DSA_PUBKEY, DSA, PEM_STRING_PUBLIC, DSA_PUBKEY)
229 311
230#ifndef OPENSSL_NO_FP_API 312#ifndef OPENSSL_NO_FP_API
@@ -270,8 +352,49 @@ EC_KEY *PEM_read_bio_ECPrivateKey(BIO *bp, EC_KEY **key, pem_password_cb *cb,
270 352
271IMPLEMENT_PEM_rw_const(ECPKParameters, EC_GROUP, PEM_STRING_ECPARAMETERS, ECPKParameters) 353IMPLEMENT_PEM_rw_const(ECPKParameters, EC_GROUP, PEM_STRING_ECPARAMETERS, ECPKParameters)
272 354
355
356
357#ifdef OPENSSL_FIPS
358
359int PEM_write_bio_ECPrivateKey(BIO *bp, EC_KEY *x, const EVP_CIPHER *enc,
360 unsigned char *kstr, int klen,
361 pem_password_cb *cb, void *u)
362{
363 EVP_PKEY *k;
364 int ret;
365 k = EVP_PKEY_new();
366 if (!k)
367 return 0;
368 EVP_PKEY_set1_EC_KEY(k, x);
369
370 ret = PEM_write_bio_PrivateKey(bp, k, enc, kstr, klen, cb, u);
371 EVP_PKEY_free(k);
372 return ret;
373}
374
375#ifndef OPENSSL_NO_FP_API
376int PEM_write_ECPrivateKey(FILE *fp, EC_KEY *x, const EVP_CIPHER *enc,
377 unsigned char *kstr, int klen,
378 pem_password_cb *cb, void *u)
379{
380 EVP_PKEY *k;
381 int ret;
382 k = EVP_PKEY_new();
383 if (!k)
384 return 0;
385 EVP_PKEY_set1_EC_KEY(k, x);
386 ret = PEM_write_PrivateKey(fp, k, enc, kstr, klen, cb, u);
387 EVP_PKEY_free(k);
388 return ret;
389}
390#endif
391
392#else
393
273IMPLEMENT_PEM_write_cb(ECPrivateKey, EC_KEY, PEM_STRING_ECPRIVATEKEY, ECPrivateKey) 394IMPLEMENT_PEM_write_cb(ECPrivateKey, EC_KEY, PEM_STRING_ECPRIVATEKEY, ECPrivateKey)
274 395
396#endif
397
275IMPLEMENT_PEM_rw(EC_PUBKEY, EC_KEY, PEM_STRING_PUBLIC, EC_PUBKEY) 398IMPLEMENT_PEM_rw(EC_PUBKEY, EC_KEY, PEM_STRING_PUBLIC, EC_PUBKEY)
276 399
277#ifndef OPENSSL_NO_FP_API 400#ifndef OPENSSL_NO_FP_API
@@ -301,8 +424,59 @@ IMPLEMENT_PEM_rw_const(DHparams, DH, PEM_STRING_DHPARAMS, DHparams)
301 * (When reading, parameter PEM_STRING_EVP_PKEY is a wildcard for anything 424 * (When reading, parameter PEM_STRING_EVP_PKEY is a wildcard for anything
302 * appropriate.) 425 * appropriate.)
303 */ 426 */
427
428#ifdef OPENSSL_FIPS
429
430static const char *pkey_str(EVP_PKEY *x)
431 {
432 switch (x->type)
433 {
434 case EVP_PKEY_RSA:
435 return PEM_STRING_RSA;
436
437 case EVP_PKEY_DSA:
438 return PEM_STRING_DSA;
439
440 case EVP_PKEY_EC:
441 return PEM_STRING_ECPRIVATEKEY;
442
443 default:
444 return NULL;
445 }
446 }
447
448
449int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
450 unsigned char *kstr, int klen,
451 pem_password_cb *cb, void *u)
452 {
453 if (FIPS_mode())
454 return PEM_write_bio_PKCS8PrivateKey(bp, x, enc,
455 (char *)kstr, klen, cb, u);
456 else
457 return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey,
458 pkey_str(x), bp,(char *)x,enc,kstr,klen,cb,u);
459 }
460
461#ifndef OPENSSL_NO_FP_API
462int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
463 unsigned char *kstr, int klen,
464 pem_password_cb *cb, void *u)
465 {
466 if (FIPS_mode())
467 return PEM_write_PKCS8PrivateKey(fp, x, enc,
468 (char *)kstr, klen, cb, u);
469 else
470 return PEM_ASN1_write((i2d_of_void *)i2d_PrivateKey,
471 pkey_str(x), fp,(char *)x,enc,kstr,klen,cb,u);
472 }
473#endif
474
475#else
304IMPLEMENT_PEM_write_cb(PrivateKey, EVP_PKEY, ((x->type == EVP_PKEY_DSA)?PEM_STRING_DSA:\ 476IMPLEMENT_PEM_write_cb(PrivateKey, EVP_PKEY, ((x->type == EVP_PKEY_DSA)?PEM_STRING_DSA:\
305 (x->type == EVP_PKEY_RSA)?PEM_STRING_RSA:PEM_STRING_ECPRIVATEKEY), PrivateKey) 477 (x->type == EVP_PKEY_RSA)?PEM_STRING_RSA:PEM_STRING_ECPRIVATEKEY), PrivateKey)
306 478
479#endif
480
307IMPLEMENT_PEM_rw(PUBKEY, EVP_PKEY, PEM_STRING_PUBLIC, PUBKEY) 481IMPLEMENT_PEM_rw(PUBKEY, EVP_PKEY, PEM_STRING_PUBLIC, PUBKEY)
308 482
diff --git a/src/lib/libcrypto/pem/pem_lib.c b/src/lib/libcrypto/pem/pem_lib.c
index 9bae4c8850..cbafefe416 100644
--- a/src/lib/libcrypto/pem/pem_lib.c
+++ b/src/lib/libcrypto/pem/pem_lib.c
@@ -216,6 +216,9 @@ static int check_pem(const char *nm, const char *name)
216 if(!strcmp(nm, PEM_STRING_X509) && 216 if(!strcmp(nm, PEM_STRING_X509) &&
217 !strcmp(name, PEM_STRING_PKCS7)) return 1; 217 !strcmp(name, PEM_STRING_PKCS7)) return 1;
218 218
219 if(!strcmp(nm, PEM_STRING_PKCS7_SIGNED) &&
220 !strcmp(name, PEM_STRING_PKCS7)) return 1;
221
219 return 0; 222 return 0;
220} 223}
221 224
diff --git a/src/lib/libcrypto/pem/pem_x509.c b/src/lib/libcrypto/pem/pem_x509.c
index 19f88d8d3a..3f709f13e6 100644
--- a/src/lib/libcrypto/pem/pem_x509.c
+++ b/src/lib/libcrypto/pem/pem_x509.c
@@ -1,5 +1,5 @@
1/* pem_x509.c */ 1/* pem_x509.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pem/pem_xaux.c b/src/lib/libcrypto/pem/pem_xaux.c
index 63ce660cf1..7cc7491009 100644
--- a/src/lib/libcrypto/pem/pem_xaux.c
+++ b/src/lib/libcrypto/pem/pem_xaux.c
@@ -1,5 +1,5 @@
1/* pem_xaux.c */ 1/* pem_xaux.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_add.c b/src/lib/libcrypto/pkcs12/p12_add.c
index 41bdc00551..1f3e378f5c 100644
--- a/src/lib/libcrypto/pkcs12/p12_add.c
+++ b/src/lib/libcrypto/pkcs12/p12_add.c
@@ -1,5 +1,5 @@
1/* p12_add.c */ 1/* p12_add.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_asn.c b/src/lib/libcrypto/pkcs12/p12_asn.c
index a3739fee1a..6e27633817 100644
--- a/src/lib/libcrypto/pkcs12/p12_asn.c
+++ b/src/lib/libcrypto/pkcs12/p12_asn.c
@@ -1,5 +1,5 @@
1/* p12_asn.c */ 1/* p12_asn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_attr.c b/src/lib/libcrypto/pkcs12/p12_attr.c
index 026cf3826a..68d6c5ad15 100644
--- a/src/lib/libcrypto/pkcs12/p12_attr.c
+++ b/src/lib/libcrypto/pkcs12/p12_attr.c
@@ -1,5 +1,5 @@
1/* p12_attr.c */ 1/* p12_attr.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_crpt.c b/src/lib/libcrypto/pkcs12/p12_crpt.c
index 3ad33c49d8..f8b952e27e 100644
--- a/src/lib/libcrypto/pkcs12/p12_crpt.c
+++ b/src/lib/libcrypto/pkcs12/p12_crpt.c
@@ -1,5 +1,5 @@
1/* p12_crpt.c */ 1/* p12_crpt.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_crt.c b/src/lib/libcrypto/pkcs12/p12_crt.c
index 9748256b6f..e863de52ce 100644
--- a/src/lib/libcrypto/pkcs12/p12_crt.c
+++ b/src/lib/libcrypto/pkcs12/p12_crt.c
@@ -1,5 +1,5 @@
1/* p12_crt.c */ 1/* p12_crt.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -59,6 +59,10 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include <openssl/pkcs12.h> 61#include <openssl/pkcs12.h>
62#ifdef OPENSSL_FIPS
63#include <openssl/fips.h>
64#endif
65
62 66
63 67
64static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags, PKCS12_SAFEBAG *bag); 68static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags, PKCS12_SAFEBAG *bag);
@@ -90,7 +94,14 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
90 94
91 /* Set defaults */ 95 /* Set defaults */
92 if (!nid_cert) 96 if (!nid_cert)
97 {
98#ifdef OPENSSL_FIPS
99 if (FIPS_mode())
100 nid_cert = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
101 else
102#endif
93 nid_cert = NID_pbe_WithSHA1And40BitRC2_CBC; 103 nid_cert = NID_pbe_WithSHA1And40BitRC2_CBC;
104 }
94 if (!nid_key) 105 if (!nid_key)
95 nid_key = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; 106 nid_key = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
96 if (!iter) 107 if (!iter)
diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c
index 74c961a92b..ba77dbbe32 100644
--- a/src/lib/libcrypto/pkcs12/p12_decr.c
+++ b/src/lib/libcrypto/pkcs12/p12_decr.c
@@ -1,5 +1,5 @@
1/* p12_decr.c */ 1/* p12_decr.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_init.c b/src/lib/libcrypto/pkcs12/p12_init.c
index 6bdc132631..d4d84b056a 100644
--- a/src/lib/libcrypto/pkcs12/p12_init.c
+++ b/src/lib/libcrypto/pkcs12/p12_init.c
@@ -1,5 +1,5 @@
1/* p12_init.c */ 1/* p12_init.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_key.c b/src/lib/libcrypto/pkcs12/p12_key.c
index 18e72d0a1b..9e57eee4a4 100644
--- a/src/lib/libcrypto/pkcs12/p12_key.c
+++ b/src/lib/libcrypto/pkcs12/p12_key.c
@@ -1,5 +1,5 @@
1/* p12_key.c */ 1/* p12_key.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_kiss.c b/src/lib/libcrypto/pkcs12/p12_kiss.c
index c2ee2cc6f3..5c4c6ec988 100644
--- a/src/lib/libcrypto/pkcs12/p12_kiss.c
+++ b/src/lib/libcrypto/pkcs12/p12_kiss.c
@@ -1,5 +1,5 @@
1/* p12_kiss.c */ 1/* p12_kiss.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c
index c408cc8ab8..70bfef6e5d 100644
--- a/src/lib/libcrypto/pkcs12/p12_mutl.c
+++ b/src/lib/libcrypto/pkcs12/p12_mutl.c
@@ -1,5 +1,5 @@
1/* p12_mutl.c */ 1/* p12_mutl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_npas.c b/src/lib/libcrypto/pkcs12/p12_npas.c
index 48eacc5c49..47e5e9c377 100644
--- a/src/lib/libcrypto/pkcs12/p12_npas.c
+++ b/src/lib/libcrypto/pkcs12/p12_npas.c
@@ -1,5 +1,5 @@
1/* p12_npas.c */ 1/* p12_npas.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_p8d.c b/src/lib/libcrypto/pkcs12/p12_p8d.c
index 3c6f377933..deba81e4a9 100644
--- a/src/lib/libcrypto/pkcs12/p12_p8d.c
+++ b/src/lib/libcrypto/pkcs12/p12_p8d.c
@@ -1,5 +1,5 @@
1/* p12_p8d.c */ 1/* p12_p8d.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_p8e.c b/src/lib/libcrypto/pkcs12/p12_p8e.c
index 3d47956652..bf20a77b4c 100644
--- a/src/lib/libcrypto/pkcs12/p12_p8e.c
+++ b/src/lib/libcrypto/pkcs12/p12_p8e.c
@@ -1,5 +1,5 @@
1/* p12_p8e.c */ 1/* p12_p8e.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/p12_utl.c b/src/lib/libcrypto/pkcs12/p12_utl.c
index 243ec76be9..ca30ac4f6d 100644
--- a/src/lib/libcrypto/pkcs12/p12_utl.c
+++ b/src/lib/libcrypto/pkcs12/p12_utl.c
@@ -1,5 +1,5 @@
1/* p12_utl.c */ 1/* p12_utl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs12/pkcs12.h b/src/lib/libcrypto/pkcs12/pkcs12.h
index a2d7e359a0..4bee605dc0 100644
--- a/src/lib/libcrypto/pkcs12/pkcs12.h
+++ b/src/lib/libcrypto/pkcs12/pkcs12.h
@@ -1,5 +1,5 @@
1/* pkcs12.h */ 1/* pkcs12.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs7/pk7_asn1.c b/src/lib/libcrypto/pkcs7/pk7_asn1.c
index 77931feeb4..1f70d31386 100644
--- a/src/lib/libcrypto/pkcs7/pk7_asn1.c
+++ b/src/lib/libcrypto/pkcs7/pk7_asn1.c
@@ -1,5 +1,5 @@
1/* pk7_asn.c */ 1/* pk7_asn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs7/pk7_attr.c b/src/lib/libcrypto/pkcs7/pk7_attr.c
index 735c8800e1..d549717169 100644
--- a/src/lib/libcrypto/pkcs7/pk7_attr.c
+++ b/src/lib/libcrypto/pkcs7/pk7_attr.c
@@ -1,5 +1,5 @@
1/* pk7_attr.c */ 1/* pk7_attr.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs7/pk7_mime.c b/src/lib/libcrypto/pkcs7/pk7_mime.c
index 17b68992f7..bf190360d7 100644
--- a/src/lib/libcrypto/pkcs7/pk7_mime.c
+++ b/src/lib/libcrypto/pkcs7/pk7_mime.c
@@ -1,5 +1,5 @@
1/* pk7_mime.c */ 1/* pk7_mime.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/pkcs7/pk7_smime.c b/src/lib/libcrypto/pkcs7/pk7_smime.c
index 5c6b0fe24b..c34db1d6fe 100644
--- a/src/lib/libcrypto/pkcs7/pk7_smime.c
+++ b/src/lib/libcrypto/pkcs7/pk7_smime.c
@@ -1,5 +1,5 @@
1/* pk7_smime.c */ 1/* pk7_smime.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -282,6 +282,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
282 PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_MALLOC_FAILURE); 282 PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_MALLOC_FAILURE);
283 goto err; 283 goto err;
284 } 284 }
285 BIO_set_mem_eof_return(tmpout, 0);
285 } else tmpout = out; 286 } else tmpout = out;
286 287
287 /* We now have to 'read' from p7bio to calculate digests etc. */ 288 /* We now have to 'read' from p7bio to calculate digests etc. */
diff --git a/src/lib/libcrypto/rand/Makefile b/src/lib/libcrypto/rand/Makefile
index 27694aa664..30794305cb 100644
--- a/src/lib/libcrypto/rand/Makefile
+++ b/src/lib/libcrypto/rand/Makefile
@@ -17,9 +17,9 @@ TEST= randtest.c
17APPS= 17APPS=
18 18
19LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
20LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \ 20LIBSRC=md_rand.c randfile.c rand_lib.c rand_eng.c rand_err.c rand_egd.c \
21 rand_win.c rand_unix.c rand_os2.c rand_nw.c 21 rand_win.c rand_unix.c rand_os2.c rand_nw.c
22LIBOBJ=md_rand.o randfile.o rand_lib.o rand_err.o rand_egd.o \ 22LIBOBJ=md_rand.o randfile.o rand_lib.o rand_eng.o rand_err.o rand_egd.o \
23 rand_win.o rand_unix.o rand_os2.o rand_nw.o 23 rand_win.o rand_unix.o rand_os2.o rand_nw.o
24 24
25SRC= $(LIBSRC) 25SRC= $(LIBSRC)
@@ -35,7 +35,7 @@ top:
35all: lib 35all: lib
36 36
37lib: $(LIBOBJ) 37lib: $(LIBOBJ)
38 $(AR) $(LIB) $(LIBOBJ) 38 $(ARX) $(LIB) $(LIBOBJ)
39 $(RANLIB) $(LIB) || echo Never mind. 39 $(RANLIB) $(LIB) || echo Never mind.
40 @touch lib 40 @touch lib
41 41
@@ -79,17 +79,34 @@ clean:
79md_rand.o: ../../e_os.h ../../include/openssl/asn1.h 79md_rand.o: ../../e_os.h ../../include/openssl/asn1.h
80md_rand.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h 80md_rand.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
81md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 81md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
82md_rand.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 82md_rand.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
83md_rand.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 83md_rand.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
84md_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 84md_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
85md_rand.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 85md_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
86md_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 86md_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
87md_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 87md_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
88md_rand.o: md_rand.c rand_lcl.h 88md_rand.o: ../../include/openssl/symhacks.h md_rand.c rand_lcl.h
89rand_egd.o: ../../include/openssl/buffer.h ../../include/openssl/e_os2.h 89rand_egd.o: ../../include/openssl/buffer.h ../../include/openssl/e_os2.h
90rand_egd.o: ../../include/openssl/opensslconf.h 90rand_egd.o: ../../include/openssl/opensslconf.h
91rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 91rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
92rand_egd.o: rand_egd.c 92rand_egd.o: rand_egd.c
93rand_eng.o: ../../e_os.h ../../include/openssl/asn1.h
94rand_eng.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
95rand_eng.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
96rand_eng.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
97rand_eng.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
98rand_eng.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
99rand_eng.o: ../../include/openssl/err.h ../../include/openssl/evp.h
100rand_eng.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h
101rand_eng.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
102rand_eng.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
103rand_eng.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
104rand_eng.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
105rand_eng.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
106rand_eng.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
107rand_eng.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
108rand_eng.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
109rand_eng.o: ../cryptlib.h rand_eng.c rand_lcl.h
93rand_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h 110rand_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
94rand_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 111rand_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
95rand_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 112rand_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
@@ -99,34 +116,39 @@ rand_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
99rand_err.o: rand_err.c 116rand_err.o: rand_err.c
100rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h 117rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h
101rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 118rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
102rand_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 119rand_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
120rand_lib.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
103rand_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 121rand_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
104rand_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 122rand_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
105rand_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h 123rand_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
124rand_lib.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h
106rand_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 125rand_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
107rand_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 126rand_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
108rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 127rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
109rand_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 128rand_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
110rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 129rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
111rand_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 130rand_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
131rand_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
112rand_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 132rand_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
113rand_lib.o: ../cryptlib.h rand_lib.c 133rand_lib.o: ../cryptlib.h rand_lcl.h rand_lib.c
114rand_nw.o: ../../e_os.h ../../include/openssl/asn1.h 134rand_nw.o: ../../e_os.h ../../include/openssl/asn1.h
115rand_nw.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 135rand_nw.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
116rand_nw.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 136rand_nw.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
117rand_nw.o: ../../include/openssl/err.h ../../include/openssl/evp.h 137rand_nw.o: ../../include/openssl/err.h ../../include/openssl/evp.h
118rand_nw.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 138rand_nw.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
119rand_nw.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 139rand_nw.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
120rand_nw.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 140rand_nw.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
121rand_nw.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 141rand_nw.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
122rand_nw.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 142rand_nw.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
123rand_nw.o: ../../include/openssl/symhacks.h ../cryptlib.h rand_lcl.h rand_nw.c 143rand_nw.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
144rand_nw.o: ../cryptlib.h rand_lcl.h rand_nw.c
124rand_os2.o: ../../e_os.h ../../include/openssl/asn1.h 145rand_os2.o: ../../e_os.h ../../include/openssl/asn1.h
125rand_os2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 146rand_os2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
126rand_os2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 147rand_os2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
127rand_os2.o: ../../include/openssl/err.h ../../include/openssl/evp.h 148rand_os2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
128rand_os2.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 149rand_os2.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
129rand_os2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 150rand_os2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
151rand_os2.o: ../../include/openssl/opensslconf.h
130rand_os2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 152rand_os2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
131rand_os2.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 153rand_os2.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
132rand_os2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 154rand_os2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -136,8 +158,8 @@ rand_unix.o: ../../e_os.h ../../include/openssl/asn1.h
136rand_unix.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 158rand_unix.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
137rand_unix.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 159rand_unix.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
138rand_unix.o: ../../include/openssl/err.h ../../include/openssl/evp.h 160rand_unix.o: ../../include/openssl/err.h ../../include/openssl/evp.h
139rand_unix.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 161rand_unix.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
140rand_unix.o: ../../include/openssl/objects.h 162rand_unix.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
141rand_unix.o: ../../include/openssl/opensslconf.h 163rand_unix.o: ../../include/openssl/opensslconf.h
142rand_unix.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 164rand_unix.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
143rand_unix.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 165rand_unix.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
@@ -148,8 +170,9 @@ rand_win.o: ../../e_os.h ../../include/openssl/asn1.h
148rand_win.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 170rand_win.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
149rand_win.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 171rand_win.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
150rand_win.o: ../../include/openssl/err.h ../../include/openssl/evp.h 172rand_win.o: ../../include/openssl/err.h ../../include/openssl/evp.h
151rand_win.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 173rand_win.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
152rand_win.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 174rand_win.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
175rand_win.o: ../../include/openssl/opensslconf.h
153rand_win.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 176rand_win.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
154rand_win.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 177rand_win.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
155rand_win.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 178rand_win.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
diff --git a/src/lib/libcrypto/rand/md_rand.c b/src/lib/libcrypto/rand/md_rand.c
index 9783d0c23e..0f8dd3e00f 100644
--- a/src/lib/libcrypto/rand/md_rand.c
+++ b/src/lib/libcrypto/rand/md_rand.c
@@ -126,6 +126,10 @@
126 126
127#include <openssl/crypto.h> 127#include <openssl/crypto.h>
128#include <openssl/err.h> 128#include <openssl/err.h>
129#ifdef OPENSSL_FIPS
130#include <openssl/fips.h>
131#endif
132
129 133
130#ifdef BN_DEBUG 134#ifdef BN_DEBUG
131# define PREDICT 135# define PREDICT
@@ -332,6 +336,14 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
332#endif 336#endif
333 int do_stir_pool = 0; 337 int do_stir_pool = 0;
334 338
339#ifdef OPENSSL_FIPS
340 if(FIPS_mode())
341 {
342 FIPSerr(FIPS_F_SSLEAY_RAND_BYTES,FIPS_R_NON_FIPS_METHOD);
343 return 0;
344 }
345#endif
346
335#ifdef PREDICT 347#ifdef PREDICT
336 if (rand_predictable) 348 if (rand_predictable)
337 { 349 {
diff --git a/src/lib/libcrypto/rand/rand.h b/src/lib/libcrypto/rand/rand.h
index ac6c021763..ea89153cba 100644
--- a/src/lib/libcrypto/rand/rand.h
+++ b/src/lib/libcrypto/rand/rand.h
@@ -72,7 +72,7 @@ extern "C" {
72#endif 72#endif
73 73
74#if defined(OPENSSL_FIPS) 74#if defined(OPENSSL_FIPS)
75#define FIPS_RAND_SIZE_T size_t 75#define FIPS_RAND_SIZE_T int
76#endif 76#endif
77 77
78/* Already defined in ossl_typ.h */ 78/* Already defined in ossl_typ.h */
@@ -111,6 +111,15 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes);
111int RAND_egd(const char *path); 111int RAND_egd(const char *path);
112int RAND_egd_bytes(const char *path,int bytes); 112int RAND_egd_bytes(const char *path,int bytes);
113int RAND_poll(void); 113int RAND_poll(void);
114#ifndef OPENSSL_NO_ENGINE
115#ifdef OPENSSL_FIPS
116void int_RAND_init_engine_callbacks(void);
117void int_RAND_set_callbacks(
118 int (*set_rand_func)(const RAND_METHOD *meth,
119 const RAND_METHOD **pmeth),
120 const RAND_METHOD *(*get_rand_func)(const RAND_METHOD **pmeth));
121#endif
122#endif
114 123
115#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) 124#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
116 125
@@ -128,11 +137,29 @@ void ERR_load_RAND_strings(void);
128/* Error codes for the RAND functions. */ 137/* Error codes for the RAND functions. */
129 138
130/* Function codes. */ 139/* Function codes. */
140#define RAND_F_ENG_RAND_GET_RAND_METHOD 108
141#define RAND_F_FIPS_RAND 103
142#define RAND_F_FIPS_RAND_BYTES 102
143#define RAND_F_FIPS_RAND_GET_RAND_METHOD 109
144#define RAND_F_FIPS_RAND_SET_DT 106
145#define RAND_F_FIPS_SET_DT 104
146#define RAND_F_FIPS_SET_PRNG_SEED 107
147#define RAND_F_FIPS_SET_TEST_MODE 105
131#define RAND_F_RAND_GET_RAND_METHOD 101 148#define RAND_F_RAND_GET_RAND_METHOD 101
132#define RAND_F_SSLEAY_RAND_BYTES 100 149#define RAND_F_SSLEAY_RAND_BYTES 100
133 150
134/* Reason codes. */ 151/* Reason codes. */
152#define RAND_R_NON_FIPS_METHOD 105
153#define RAND_R_NOT_IN_TEST_MODE 106
154#define RAND_R_NO_KEY_SET 107
155#define RAND_R_PRNG_ASKING_FOR_TOO_MUCH 101
156#define RAND_R_PRNG_ERROR 108
157#define RAND_R_PRNG_KEYED 109
158#define RAND_R_PRNG_NOT_REKEYED 102
159#define RAND_R_PRNG_NOT_RESEEDED 103
135#define RAND_R_PRNG_NOT_SEEDED 100 160#define RAND_R_PRNG_NOT_SEEDED 100
161#define RAND_R_PRNG_SEED_MUST_NOT_MATCH_KEY 110
162#define RAND_R_PRNG_STUCK 104
136 163
137#ifdef __cplusplus 164#ifdef __cplusplus
138} 165}
diff --git a/src/lib/libcrypto/rand/rand_err.c b/src/lib/libcrypto/rand/rand_err.c
index 386934dcd1..829fb44d77 100644
--- a/src/lib/libcrypto/rand/rand_err.c
+++ b/src/lib/libcrypto/rand/rand_err.c
@@ -1,6 +1,6 @@
1/* crypto/rand/rand_err.c */ 1/* crypto/rand/rand_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -70,6 +70,14 @@
70 70
71static ERR_STRING_DATA RAND_str_functs[]= 71static ERR_STRING_DATA RAND_str_functs[]=
72 { 72 {
73{ERR_FUNC(RAND_F_ENG_RAND_GET_RAND_METHOD), "ENG_RAND_GET_RAND_METHOD"},
74{ERR_FUNC(RAND_F_FIPS_RAND), "FIPS_RAND"},
75{ERR_FUNC(RAND_F_FIPS_RAND_BYTES), "FIPS_RAND_BYTES"},
76{ERR_FUNC(RAND_F_FIPS_RAND_GET_RAND_METHOD), "FIPS_RAND_GET_RAND_METHOD"},
77{ERR_FUNC(RAND_F_FIPS_RAND_SET_DT), "FIPS_RAND_SET_DT"},
78{ERR_FUNC(RAND_F_FIPS_SET_DT), "FIPS_SET_DT"},
79{ERR_FUNC(RAND_F_FIPS_SET_PRNG_SEED), "FIPS_SET_PRNG_SEED"},
80{ERR_FUNC(RAND_F_FIPS_SET_TEST_MODE), "FIPS_SET_TEST_MODE"},
73{ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"}, 81{ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"},
74{ERR_FUNC(RAND_F_SSLEAY_RAND_BYTES), "SSLEAY_RAND_BYTES"}, 82{ERR_FUNC(RAND_F_SSLEAY_RAND_BYTES), "SSLEAY_RAND_BYTES"},
75{0,NULL} 83{0,NULL}
@@ -77,7 +85,17 @@ static ERR_STRING_DATA RAND_str_functs[]=
77 85
78static ERR_STRING_DATA RAND_str_reasons[]= 86static ERR_STRING_DATA RAND_str_reasons[]=
79 { 87 {
88{ERR_REASON(RAND_R_NON_FIPS_METHOD) ,"non fips method"},
89{ERR_REASON(RAND_R_NOT_IN_TEST_MODE) ,"not in test mode"},
90{ERR_REASON(RAND_R_NO_KEY_SET) ,"no key set"},
91{ERR_REASON(RAND_R_PRNG_ASKING_FOR_TOO_MUCH),"prng asking for too much"},
92{ERR_REASON(RAND_R_PRNG_ERROR) ,"prng error"},
93{ERR_REASON(RAND_R_PRNG_KEYED) ,"prng keyed"},
94{ERR_REASON(RAND_R_PRNG_NOT_REKEYED) ,"prng not rekeyed"},
95{ERR_REASON(RAND_R_PRNG_NOT_RESEEDED) ,"prng not reseeded"},
80{ERR_REASON(RAND_R_PRNG_NOT_SEEDED) ,"PRNG not seeded"}, 96{ERR_REASON(RAND_R_PRNG_NOT_SEEDED) ,"PRNG not seeded"},
97{ERR_REASON(RAND_R_PRNG_SEED_MUST_NOT_MATCH_KEY),"prng seed must not match key"},
98{ERR_REASON(RAND_R_PRNG_STUCK) ,"prng stuck"},
81{0,NULL} 99{0,NULL}
82 }; 100 };
83 101
diff --git a/src/lib/libcrypto/rand/rand_lcl.h b/src/lib/libcrypto/rand/rand_lcl.h
index 618a8ec899..18cc9b1e4a 100644
--- a/src/lib/libcrypto/rand/rand_lcl.h
+++ b/src/lib/libcrypto/rand/rand_lcl.h
@@ -154,5 +154,16 @@
154#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md2(), NULL) 154#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md2(), NULL)
155#endif 155#endif
156 156
157#ifndef OPENSSL_NO_ENGINE
158void int_RAND_set_callbacks(
159 int (*set_rand_func)(const RAND_METHOD *meth,
160 const RAND_METHOD **pmeth),
161 const RAND_METHOD *(*get_rand_func)
162 (const RAND_METHOD **pmeth));
163int eng_RAND_set_rand_method(const RAND_METHOD *meth,
164 const RAND_METHOD **pmeth);
165const RAND_METHOD *eng_RAND_get_rand_method(const RAND_METHOD **pmeth);
166#endif
167
157 168
158#endif 169#endif
diff --git a/src/lib/libcrypto/rand/rand_lib.c b/src/lib/libcrypto/rand/rand_lib.c
index 513e338985..da6b4e0e86 100644
--- a/src/lib/libcrypto/rand/rand_lib.c
+++ b/src/lib/libcrypto/rand/rand_lib.c
@@ -60,15 +60,82 @@
60#include <time.h> 60#include <time.h>
61#include "cryptlib.h" 61#include "cryptlib.h"
62#include <openssl/rand.h> 62#include <openssl/rand.h>
63#include "rand_lcl.h"
64#ifdef OPENSSL_FIPS
65#include <openssl/fips.h>
66#include <openssl/fips_rand.h>
67#endif
68
63#ifndef OPENSSL_NO_ENGINE 69#ifndef OPENSSL_NO_ENGINE
64#include <openssl/engine.h> 70#include <openssl/engine.h>
65#endif 71#endif
66 72
73static const RAND_METHOD *default_RAND_meth = NULL;
74
75#ifdef OPENSSL_FIPS
76
77static int fips_RAND_set_rand_method(const RAND_METHOD *meth,
78 const RAND_METHOD **pmeth)
79 {
80 *pmeth = meth;
81 return 1;
82 }
83
84static const RAND_METHOD *fips_RAND_get_rand_method(const RAND_METHOD **pmeth)
85 {
86 if (!*pmeth)
87 {
88 if(FIPS_mode())
89 *pmeth=FIPS_rand_method();
90 else
91 *pmeth = RAND_SSLeay();
92 }
93
94 if(FIPS_mode()
95 && *pmeth != FIPS_rand_check())
96 {
97 RANDerr(RAND_F_FIPS_RAND_GET_RAND_METHOD,RAND_R_NON_FIPS_METHOD);
98 return 0;
99 }
100
101 return *pmeth;
102 }
103
104static int (*RAND_set_rand_method_func)(const RAND_METHOD *meth,
105 const RAND_METHOD **pmeth)
106 = fips_RAND_set_rand_method;
107static const RAND_METHOD *(*RAND_get_rand_method_func)
108 (const RAND_METHOD **pmeth)
109 = fips_RAND_get_rand_method;
110
111#ifndef OPENSSL_NO_ENGINE
112void int_RAND_set_callbacks(
113 int (*set_rand_func)(const RAND_METHOD *meth,
114 const RAND_METHOD **pmeth),
115 const RAND_METHOD *(*get_rand_func)
116 (const RAND_METHOD **pmeth))
117 {
118 RAND_set_rand_method_func = set_rand_func;
119 RAND_get_rand_method_func = get_rand_func;
120 }
121#endif
122
123int RAND_set_rand_method(const RAND_METHOD *meth)
124 {
125 return RAND_set_rand_method_func(meth, &default_RAND_meth);
126 }
127
128const RAND_METHOD *RAND_get_rand_method(void)
129 {
130 return RAND_get_rand_method_func(&default_RAND_meth);
131 }
132
133#else
134
67#ifndef OPENSSL_NO_ENGINE 135#ifndef OPENSSL_NO_ENGINE
68/* non-NULL if default_RAND_meth is ENGINE-provided */ 136/* non-NULL if default_RAND_meth is ENGINE-provided */
69static ENGINE *funct_ref =NULL; 137static ENGINE *funct_ref =NULL;
70#endif 138#endif
71static const RAND_METHOD *default_RAND_meth = NULL;
72 139
73int RAND_set_rand_method(const RAND_METHOD *meth) 140int RAND_set_rand_method(const RAND_METHOD *meth)
74 { 141 {
@@ -129,6 +196,8 @@ int RAND_set_rand_engine(ENGINE *engine)
129 } 196 }
130#endif 197#endif
131 198
199#endif
200
132void RAND_cleanup(void) 201void RAND_cleanup(void)
133 { 202 {
134 const RAND_METHOD *meth = RAND_get_rand_method(); 203 const RAND_METHOD *meth = RAND_get_rand_method();
diff --git a/src/lib/libcrypto/rand/randfile.c b/src/lib/libcrypto/rand/randfile.c
index 005cb38cb0..f63fbc1731 100644
--- a/src/lib/libcrypto/rand/randfile.c
+++ b/src/lib/libcrypto/rand/randfile.c
@@ -81,10 +81,25 @@
81# include <sys/stat.h> 81# include <sys/stat.h>
82#endif 82#endif
83 83
84#ifdef _WIN32
85#define stat _stat
86#define chmod _chmod
87#define open _open
88#define fdopen _fdopen
89#endif
90
84#undef BUFSIZE 91#undef BUFSIZE
85#define BUFSIZE 1024 92#define BUFSIZE 1024
86#define RAND_DATA 1024 93#define RAND_DATA 1024
87 94
95#ifdef OPENSSL_SYS_VMS
96/* This declaration is a nasty hack to get around vms' extension to fopen
97 * for passing in sharing options being disabled by our /STANDARD=ANSI89 */
98static FILE *(*const vms_fopen)(const char *, const char *, ...) =
99 (FILE *(*)(const char *, const char *, ...))fopen;
100#define VMS_OPEN_ATTRS "shr=get,put,upd,del","ctx=bin,stm","rfm=stm","rat=none","mrs=0"
101#endif
102
88/* #define RFILE ".rnd" - defined in ../../e_os.h */ 103/* #define RFILE ".rnd" - defined in ../../e_os.h */
89 104
90/* Note that these functions are intended for seed files only. 105/* Note that these functions are intended for seed files only.
@@ -106,7 +121,11 @@ int RAND_load_file(const char *file, long bytes)
106 RAND_add(&sb,sizeof(sb),0.0); 121 RAND_add(&sb,sizeof(sb),0.0);
107 if (bytes == 0) return(ret); 122 if (bytes == 0) return(ret);
108 123
124#ifdef OPENSSL_SYS_VMS
125 in=vms_fopen(file,"rb",VMS_OPEN_ATTRS);
126#else
109 in=fopen(file,"rb"); 127 in=fopen(file,"rb");
128#endif
110 if (in == NULL) goto err; 129 if (in == NULL) goto err;
111#if defined(S_IFBLK) && defined(S_IFCHR) 130#if defined(S_IFBLK) && defined(S_IFCHR)
112 if (sb.st_mode & (S_IFBLK | S_IFCHR)) { 131 if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
@@ -167,7 +186,7 @@ int RAND_write_file(const char *file)
167#endif 186#endif
168 } 187 }
169 188
170#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32) 189#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_VMS)
171 { 190 {
172 /* For some reason Win32 can't write to files created this way */ 191 /* For some reason Win32 can't write to files created this way */
173 192
@@ -178,8 +197,34 @@ int RAND_write_file(const char *file)
178 out = fdopen(fd, "wb"); 197 out = fdopen(fd, "wb");
179 } 198 }
180#endif 199#endif
200
201#ifdef OPENSSL_SYS_VMS
202 /* VMS NOTE: Prior versions of this routine created a _new_
203 * version of the rand file for each call into this routine, then
204 * deleted all existing versions named ;-1, and finally renamed
205 * the current version as ';1'. Under concurrent usage, this
206 * resulted in an RMS race condition in rename() which could
207 * orphan files (see vms message help for RMS$_REENT). With the
208 * fopen() calls below, openssl/VMS now shares the top-level
209 * version of the rand file. Note that there may still be
210 * conditions where the top-level rand file is locked. If so, this
211 * code will then create a new version of the rand file. Without
212 * the delete and rename code, this can result in ascending file
213 * versions that stop at version 32767, and this routine will then
214 * return an error. The remedy for this is to recode the calling
215 * application to avoid concurrent use of the rand file, or
216 * synchronize usage at the application level. Also consider
217 * whether or not you NEED a persistent rand file in a concurrent
218 * use situation.
219 */
220
221 out = vms_fopen(file,"rb+",VMS_OPEN_ATTRS);
222 if (out == NULL)
223 out = vms_fopen(file,"wb",VMS_OPEN_ATTRS);
224#else
181 if (out == NULL) 225 if (out == NULL)
182 out = fopen(file,"wb"); 226 out = fopen(file,"wb");
227#endif
183 if (out == NULL) goto err; 228 if (out == NULL) goto err;
184 229
185#ifndef NO_CHMOD 230#ifndef NO_CHMOD
@@ -201,25 +246,6 @@ int RAND_write_file(const char *file)
201 ret+=i; 246 ret+=i;
202 if (n <= 0) break; 247 if (n <= 0) break;
203 } 248 }
204#ifdef OPENSSL_SYS_VMS
205 /* Try to delete older versions of the file, until there aren't
206 any */
207 {
208 char *tmpf;
209
210 tmpf = OPENSSL_malloc(strlen(file) + 4); /* to add ";-1" and a nul */
211 if (tmpf)
212 {
213 strcpy(tmpf, file);
214 strcat(tmpf, ";-1");
215 while(delete(tmpf) == 0)
216 ;
217 rename(file,";1"); /* Make sure it's version 1, or we
218 will reach the limit (32767) at
219 some point... */
220 }
221 }
222#endif /* OPENSSL_SYS_VMS */
223 249
224 fclose(out); 250 fclose(out);
225 OPENSSL_cleanse(buf,BUFSIZE); 251 OPENSSL_cleanse(buf,BUFSIZE);
diff --git a/src/lib/libcrypto/rc2/rc2.h b/src/lib/libcrypto/rc2/rc2.h
index 34c8362317..e542ec94ff 100644
--- a/src/lib/libcrypto/rc2/rc2.h
+++ b/src/lib/libcrypto/rc2/rc2.h
@@ -79,7 +79,9 @@ typedef struct rc2_key_st
79 RC2_INT data[64]; 79 RC2_INT data[64];
80 } RC2_KEY; 80 } RC2_KEY;
81 81
82 82#ifdef OPENSSL_FIPS
83void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits);
84#endif
83void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); 85void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits);
84void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, 86void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key,
85 int enc); 87 int enc);
diff --git a/src/lib/libcrypto/rc2/rc2_skey.c b/src/lib/libcrypto/rc2/rc2_skey.c
index 4953642056..4e000e5b99 100644
--- a/src/lib/libcrypto/rc2/rc2_skey.c
+++ b/src/lib/libcrypto/rc2/rc2_skey.c
@@ -57,6 +57,11 @@
57 */ 57 */
58 58
59#include <openssl/rc2.h> 59#include <openssl/rc2.h>
60#include <openssl/crypto.h>
61#ifdef OPENSSL_FIPS
62#include <openssl/fips.h>
63#endif
64
60#include "rc2_locl.h" 65#include "rc2_locl.h"
61 66
62static unsigned char key_table[256]={ 67static unsigned char key_table[256]={
@@ -94,8 +99,20 @@ static unsigned char key_table[256]={
94 * BSAFE uses the 'retarded' version. What I previously shipped is 99 * BSAFE uses the 'retarded' version. What I previously shipped is
95 * the same as specifying 1024 for the 'bits' parameter. Bsafe uses 100 * the same as specifying 1024 for the 'bits' parameter. Bsafe uses
96 * a version where the bits parameter is the same as len*8 */ 101 * a version where the bits parameter is the same as len*8 */
102
103#ifdef OPENSSL_FIPS
97void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) 104void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits)
98 { 105 {
106 if (FIPS_mode())
107 FIPS_BAD_ABORT(RC2)
108 private_RC2_set_key(key, len, data, bits);
109 }
110void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,
111 int bits)
112#else
113void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits)
114#endif
115 {
99 int i,j; 116 int i,j;
100 unsigned char *k; 117 unsigned char *k;
101 RC2_INT *ki; 118 RC2_INT *ki;
diff --git a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl
index 92c52f3433..3a54623495 100755
--- a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl
+++ b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl
@@ -358,6 +358,8 @@ ___
358 358
359$code =~ s/#([bwd])/$1/gm; 359$code =~ s/#([bwd])/$1/gm;
360 360
361$code =~ s/RC4_set_key/private_RC4_set_key/g if ($ENV{FIPSCANLIB} ne "");
362
361print $code; 363print $code;
362 364
363close STDOUT; 365close STDOUT;
diff --git a/src/lib/libcrypto/rc4/rc4.h b/src/lib/libcrypto/rc4/rc4.h
index 7aec04fe93..2d8620d33b 100644
--- a/src/lib/libcrypto/rc4/rc4.h
+++ b/src/lib/libcrypto/rc4/rc4.h
@@ -76,6 +76,9 @@ typedef struct rc4_key_st
76 76
77 77
78const char *RC4_options(void); 78const char *RC4_options(void);
79#ifdef OPENSSL_FIPS
80void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
81#endif
79void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 82void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
80void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, 83void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
81 unsigned char *outdata); 84 unsigned char *outdata);
diff --git a/src/lib/libcrypto/rc4/rc4_skey.c b/src/lib/libcrypto/rc4/rc4_skey.c
index 46b77ec321..4478d1a4b3 100644
--- a/src/lib/libcrypto/rc4/rc4_skey.c
+++ b/src/lib/libcrypto/rc4/rc4_skey.c
@@ -59,6 +59,11 @@
59#include <openssl/rc4.h> 59#include <openssl/rc4.h>
60#include "rc4_locl.h" 60#include "rc4_locl.h"
61#include <openssl/opensslv.h> 61#include <openssl/opensslv.h>
62#include <openssl/crypto.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62 67
63const char RC4_version[]="RC4" OPENSSL_VERSION_PTEXT; 68const char RC4_version[]="RC4" OPENSSL_VERSION_PTEXT;
64 69
@@ -85,7 +90,11 @@ const char *RC4_options(void)
85 * Date: Wed, 14 Sep 1994 06:35:31 GMT 90 * Date: Wed, 14 Sep 1994 06:35:31 GMT
86 */ 91 */
87 92
93#ifdef OPENSSL_FIPS
94void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
95#else
88void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) 96void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
97#endif
89 { 98 {
90 register RC4_INT tmp; 99 register RC4_INT tmp;
91 register int id1,id2; 100 register int id1,id2;
@@ -127,7 +136,12 @@ void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
127 * 136 *
128 * <appro@fy.chalmers.se> 137 * <appro@fy.chalmers.se>
129 */ 138 */
130 if (OPENSSL_ia32cap_P & (1<<20)) { 139#ifdef OPENSSL_FIPS
140 unsigned long *ia32cap_ptr = OPENSSL_ia32cap_loc();
141 if (ia32cap_ptr && (*ia32cap_ptr & (1<<28))) {
142#else
143 if (OPENSSL_ia32cap_P & (1<<28)) {
144#endif
131 unsigned char *cp=(unsigned char *)d; 145 unsigned char *cp=(unsigned char *)d;
132 146
133 for (i=0;i<256;i++) cp[i]=i; 147 for (i=0;i<256;i++) cp[i]=i;
diff --git a/src/lib/libcrypto/rc5/rc5.h b/src/lib/libcrypto/rc5/rc5.h
index 4b3c153b50..f73a2a02a4 100644
--- a/src/lib/libcrypto/rc5/rc5.h
+++ b/src/lib/libcrypto/rc5/rc5.h
@@ -94,7 +94,10 @@ typedef struct rc5_key_st
94 RC5_32_INT data[2*(RC5_16_ROUNDS+1)]; 94 RC5_32_INT data[2*(RC5_16_ROUNDS+1)];
95 } RC5_32_KEY; 95 } RC5_32_KEY;
96 96
97 97#ifdef OPENSSL_FIPS
98void private_RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
99 int rounds);
100#endif
98void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, 101void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
99 int rounds); 102 int rounds);
100void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key, 103void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key,
diff --git a/src/lib/libcrypto/ripemd/ripemd.h b/src/lib/libcrypto/ripemd/ripemd.h
index 033a5965b5..3b6d04386d 100644
--- a/src/lib/libcrypto/ripemd/ripemd.h
+++ b/src/lib/libcrypto/ripemd/ripemd.h
@@ -90,7 +90,9 @@ typedef struct RIPEMD160state_st
90 RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 90 RIPEMD160_LONG data[RIPEMD160_LBLOCK];
91 unsigned int num; 91 unsigned int num;
92 } RIPEMD160_CTX; 92 } RIPEMD160_CTX;
93 93#ifdef OPENSSL_FIPS
94int private_RIPEMD160_Init(RIPEMD160_CTX *c);
95#endif
94int RIPEMD160_Init(RIPEMD160_CTX *c); 96int RIPEMD160_Init(RIPEMD160_CTX *c);
95int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 97int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len);
96int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 98int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
diff --git a/src/lib/libcrypto/ripemd/rmd_dgst.c b/src/lib/libcrypto/ripemd/rmd_dgst.c
index 1f2401aa7e..a845e17ed8 100644
--- a/src/lib/libcrypto/ripemd/rmd_dgst.c
+++ b/src/lib/libcrypto/ripemd/rmd_dgst.c
@@ -59,6 +59,11 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "rmd_locl.h" 60#include "rmd_locl.h"
61#include <openssl/opensslv.h> 61#include <openssl/opensslv.h>
62#include <openssl/err.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62 67
63const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT; 68const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT;
64 69
@@ -69,7 +74,7 @@ const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT;
69 void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,size_t num); 74 void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,size_t num);
70# endif 75# endif
71 76
72int RIPEMD160_Init(RIPEMD160_CTX *c) 77FIPS_NON_FIPS_MD_Init(RIPEMD160)
73 { 78 {
74 c->A=RIPEMD160_A; 79 c->A=RIPEMD160_A;
75 c->B=RIPEMD160_B; 80 c->B=RIPEMD160_B;
diff --git a/src/lib/libcrypto/ripemd/rmd_locl.h b/src/lib/libcrypto/ripemd/rmd_locl.h
index f14b346e66..ce12a8000e 100644
--- a/src/lib/libcrypto/ripemd/rmd_locl.h
+++ b/src/lib/libcrypto/ripemd/rmd_locl.h
@@ -72,7 +72,7 @@
72 */ 72 */
73#ifdef RMD160_ASM 73#ifdef RMD160_ASM
74# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) 74# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
75# define ripemd160_block_data_order ripemd160_block_asm_data_order 75# define ripemd160_block_host_order ripemd160_block_asm_data_order
76# endif 76# endif
77#endif 77#endif
78 78
diff --git a/src/lib/libcrypto/rsa/Makefile b/src/lib/libcrypto/rsa/Makefile
index 8f1c611800..7b1fd6428c 100644
--- a/src/lib/libcrypto/rsa/Makefile
+++ b/src/lib/libcrypto/rsa/Makefile
@@ -19,10 +19,10 @@ APPS=
19LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
20LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \ 20LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \
21 rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \ 21 rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \
22 rsa_pss.c rsa_x931.c rsa_asn1.c rsa_depr.c 22 rsa_pss.c rsa_x931.c rsa_x931g.c rsa_asn1.c rsa_depr.c rsa_eng.c
23LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \ 23LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \
24 rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \ 24 rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \
25 rsa_pss.o rsa_x931.o rsa_asn1.o rsa_depr.o 25 rsa_pss.o rsa_x931.o rsa_x931g.o rsa_asn1.o rsa_depr.o rsa_eng.o
26 26
27SRC= $(LIBSRC) 27SRC= $(LIBSRC)
28 28
@@ -37,7 +37,7 @@ top:
37all: lib 37all: lib
38 38
39lib: $(LIBOBJ) 39lib: $(LIBOBJ)
40 $(AR) $(LIB) $(LIBOBJ) 40 $(ARX) $(LIB) $(LIBOBJ)
41 $(RANLIB) $(LIB) || echo Never mind. 41 $(RANLIB) $(LIB) || echo Never mind.
42 @touch lib 42 @touch lib
43 43
@@ -114,6 +114,21 @@ rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
114rsa_eay.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h 114rsa_eay.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
115rsa_eay.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 115rsa_eay.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
116rsa_eay.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_eay.c 116rsa_eay.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_eay.c
117rsa_eng.o: ../../e_os.h ../../include/openssl/asn1.h
118rsa_eng.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
119rsa_eng.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
120rsa_eng.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
121rsa_eng.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
122rsa_eng.o: ../../include/openssl/engine.h ../../include/openssl/err.h
123rsa_eng.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
124rsa_eng.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
125rsa_eng.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
126rsa_eng.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
127rsa_eng.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
128rsa_eng.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
129rsa_eng.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
130rsa_eng.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
131rsa_eng.o: ../../include/openssl/x509_vfy.h ../cryptlib.h rsa_eng.c
117rsa_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 132rsa_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
118rsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 133rsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
119rsa_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h 134rsa_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
@@ -136,15 +151,15 @@ rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
136rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 151rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
137rsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 152rsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
138rsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h 153rsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
139rsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 154rsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
140rsa_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 155rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
141rsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 156rsa_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
142rsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 157rsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
143rsa_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h 158rsa_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
144rsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 159rsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
145rsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 160rsa_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
146rsa_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 161rsa_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
147rsa_lib.o: ../cryptlib.h rsa_lib.c 162rsa_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h rsa_lib.c
148rsa_none.o: ../../e_os.h ../../include/openssl/asn1.h 163rsa_none.o: ../../e_os.h ../../include/openssl/asn1.h
149rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 164rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
150rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 165rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -167,9 +182,9 @@ rsa_oaep.o: ../../e_os.h ../../include/openssl/asn1.h
167rsa_oaep.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 182rsa_oaep.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
168rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 183rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
169rsa_oaep.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 184rsa_oaep.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
170rsa_oaep.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 185rsa_oaep.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
171rsa_oaep.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 186rsa_oaep.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
172rsa_oaep.o: ../../include/openssl/opensslconf.h 187rsa_oaep.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
173rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 188rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
174rsa_oaep.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h 189rsa_oaep.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
175rsa_oaep.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 190rsa_oaep.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
@@ -188,21 +203,23 @@ rsa_pss.o: ../../e_os.h ../../include/openssl/asn1.h
188rsa_pss.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 203rsa_pss.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
189rsa_pss.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 204rsa_pss.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
190rsa_pss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 205rsa_pss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
191rsa_pss.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 206rsa_pss.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
192rsa_pss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 207rsa_pss.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
193rsa_pss.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 208rsa_pss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
194rsa_pss.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 209rsa_pss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
195rsa_pss.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 210rsa_pss.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
196rsa_pss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 211rsa_pss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
197rsa_pss.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pss.c 212rsa_pss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
213rsa_pss.o: ../cryptlib.h rsa_pss.c
198rsa_saos.o: ../../e_os.h ../../include/openssl/asn1.h 214rsa_saos.o: ../../e_os.h ../../include/openssl/asn1.h
199rsa_saos.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 215rsa_saos.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
200rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 216rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
201rsa_saos.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 217rsa_saos.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
202rsa_saos.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 218rsa_saos.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
203rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h 219rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h
204rsa_saos.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 220rsa_saos.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
205rsa_saos.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 221rsa_saos.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
222rsa_saos.o: ../../include/openssl/opensslconf.h
206rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 223rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
207rsa_saos.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 224rsa_saos.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
208rsa_saos.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 225rsa_saos.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
@@ -215,8 +232,9 @@ rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
215rsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 232rsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
216rsa_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 233rsa_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
217rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h 234rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
218rsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 235rsa_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
219rsa_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 236rsa_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
237rsa_sign.o: ../../include/openssl/opensslconf.h
220rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 238rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
221rsa_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 239rsa_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
222rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 240rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
@@ -242,3 +260,11 @@ rsa_x931.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
242rsa_x931.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h 260rsa_x931.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
243rsa_x931.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 261rsa_x931.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
244rsa_x931.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_x931.c 262rsa_x931.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_x931.c
263rsa_x931g.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
264rsa_x931g.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
265rsa_x931g.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
266rsa_x931g.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
267rsa_x931g.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
268rsa_x931g.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
269rsa_x931g.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
270rsa_x931g.o: rsa_x931g.c
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h
index 3699afaaaf..5bb932ae15 100644
--- a/src/lib/libcrypto/rsa/rsa.h
+++ b/src/lib/libcrypto/rsa/rsa.h
@@ -74,6 +74,25 @@
74#error RSA is disabled. 74#error RSA is disabled.
75#endif 75#endif
76 76
77/* If this flag is set the RSA method is FIPS compliant and can be used
78 * in FIPS mode. This is set in the validated module method. If an
79 * application sets this flag in its own methods it is its reposibility
80 * to ensure the result is compliant.
81 */
82
83#define RSA_FLAG_FIPS_METHOD 0x0400
84
85/* If this flag is set the operations normally disabled in FIPS mode are
86 * permitted it is then the applications responsibility to ensure that the
87 * usage is compliant.
88 */
89
90#define RSA_FLAG_NON_FIPS_ALLOW 0x0400
91
92#ifdef OPENSSL_FIPS
93#define FIPS_RSA_SIZE_T int
94#endif
95
77#ifdef __cplusplus 96#ifdef __cplusplus
78extern "C" { 97extern "C" {
79#endif 98#endif
@@ -163,6 +182,8 @@ struct rsa_st
163# define OPENSSL_RSA_MAX_MODULUS_BITS 16384 182# define OPENSSL_RSA_MAX_MODULUS_BITS 16384
164#endif 183#endif
165 184
185#define OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 1024
186
166#ifndef OPENSSL_RSA_SMALL_MODULUS_BITS 187#ifndef OPENSSL_RSA_SMALL_MODULUS_BITS
167# define OPENSSL_RSA_SMALL_MODULUS_BITS 3072 188# define OPENSSL_RSA_SMALL_MODULUS_BITS 3072
168#endif 189#endif
@@ -240,6 +261,11 @@ RSA * RSA_generate_key(int bits, unsigned long e,void
240 261
241/* New version */ 262/* New version */
242int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); 263int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
264int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2,
265 const BIGNUM *Xp1, const BIGNUM *Xp2, const BIGNUM *Xp,
266 const BIGNUM *Xq1, const BIGNUM *Xq2, const BIGNUM *Xq,
267 const BIGNUM *e, BN_GENCB *cb);
268int RSA_X931_generate_key_ex(RSA *rsa, int bits, const BIGNUM *e, BN_GENCB *cb);
243 269
244int RSA_check_key(const RSA *); 270int RSA_check_key(const RSA *);
245 /* next 4 return -1 on error */ 271 /* next 4 return -1 on error */
@@ -257,6 +283,11 @@ int RSA_up_ref(RSA *r);
257 283
258int RSA_flags(const RSA *r); 284int RSA_flags(const RSA *r);
259 285
286#ifdef OPENSSL_FIPS
287RSA *FIPS_rsa_new(void);
288void FIPS_rsa_free(RSA *r);
289#endif
290
260void RSA_set_default_method(const RSA_METHOD *meth); 291void RSA_set_default_method(const RSA_METHOD *meth);
261const RSA_METHOD *RSA_get_default_method(void); 292const RSA_METHOD *RSA_get_default_method(void);
262const RSA_METHOD *RSA_get_method(const RSA *rsa); 293const RSA_METHOD *RSA_get_method(const RSA *rsa);
@@ -370,6 +401,8 @@ void ERR_load_RSA_strings(void);
370/* Error codes for the RSA functions. */ 401/* Error codes for the RSA functions. */
371 402
372/* Function codes. */ 403/* Function codes. */
404#define RSA_F_FIPS_RSA_SIGN 140
405#define RSA_F_FIPS_RSA_VERIFY 141
373#define RSA_F_MEMORY_LOCK 100 406#define RSA_F_MEMORY_LOCK 100
374#define RSA_F_RSA_BUILTIN_KEYGEN 129 407#define RSA_F_RSA_BUILTIN_KEYGEN 129
375#define RSA_F_RSA_CHECK_KEY 123 408#define RSA_F_RSA_CHECK_KEY 123
@@ -401,7 +434,11 @@ void ERR_load_RSA_strings(void);
401#define RSA_F_RSA_PADDING_CHECK_X931 128 434#define RSA_F_RSA_PADDING_CHECK_X931 128
402#define RSA_F_RSA_PRINT 115 435#define RSA_F_RSA_PRINT 115
403#define RSA_F_RSA_PRINT_FP 116 436#define RSA_F_RSA_PRINT_FP 116
437#define RSA_F_RSA_PRIVATE_ENCRYPT 137
438#define RSA_F_RSA_PUBLIC_DECRYPT 138
404#define RSA_F_RSA_SETUP_BLINDING 136 439#define RSA_F_RSA_SETUP_BLINDING 136
440#define RSA_F_RSA_SET_DEFAULT_METHOD 139
441#define RSA_F_RSA_SET_METHOD 142
405#define RSA_F_RSA_SIGN 117 442#define RSA_F_RSA_SIGN 117
406#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118 443#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118
407#define RSA_F_RSA_VERIFY 119 444#define RSA_F_RSA_VERIFY 119
@@ -435,10 +472,12 @@ void ERR_load_RSA_strings(void);
435#define RSA_R_KEY_SIZE_TOO_SMALL 120 472#define RSA_R_KEY_SIZE_TOO_SMALL 120
436#define RSA_R_LAST_OCTET_INVALID 134 473#define RSA_R_LAST_OCTET_INVALID 134
437#define RSA_R_MODULUS_TOO_LARGE 105 474#define RSA_R_MODULUS_TOO_LARGE 105
475#define RSA_R_NON_FIPS_METHOD 141
438#define RSA_R_NO_PUBLIC_EXPONENT 140 476#define RSA_R_NO_PUBLIC_EXPONENT 140
439#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113 477#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113
440#define RSA_R_N_DOES_NOT_EQUAL_P_Q 127 478#define RSA_R_N_DOES_NOT_EQUAL_P_Q 127
441#define RSA_R_OAEP_DECODING_ERROR 121 479#define RSA_R_OAEP_DECODING_ERROR 121
480#define RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE 142
442#define RSA_R_PADDING_CHECK_FAILED 114 481#define RSA_R_PADDING_CHECK_FAILED 114
443#define RSA_R_P_NOT_PRIME 128 482#define RSA_R_P_NOT_PRIME 128
444#define RSA_R_Q_NOT_PRIME 129 483#define RSA_R_Q_NOT_PRIME 129
diff --git a/src/lib/libcrypto/rsa/rsa_asn1.c b/src/lib/libcrypto/rsa/rsa_asn1.c
index bbbf26d50e..6e8a803e81 100644
--- a/src/lib/libcrypto/rsa/rsa_asn1.c
+++ b/src/lib/libcrypto/rsa/rsa_asn1.c
@@ -1,5 +1,5 @@
1/* rsa_asn1.c */ 1/* rsa_asn1.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c
index 5a6eda7961..04ec789ee9 100644
--- a/src/lib/libcrypto/rsa/rsa_eay.c
+++ b/src/lib/libcrypto/rsa/rsa_eay.c
@@ -115,7 +115,7 @@
115#include <openssl/rsa.h> 115#include <openssl/rsa.h>
116#include <openssl/rand.h> 116#include <openssl/rand.h>
117 117
118#ifndef RSA_NULL 118#if !defined(RSA_NULL) && !defined(OPENSSL_FIPS)
119 119
120static int RSA_eay_public_encrypt(int flen, const unsigned char *from, 120static int RSA_eay_public_encrypt(int flen, const unsigned char *from,
121 unsigned char *to, RSA *rsa,int padding); 121 unsigned char *to, RSA *rsa,int padding);
diff --git a/src/lib/libcrypto/rsa/rsa_err.c b/src/lib/libcrypto/rsa/rsa_err.c
index fe3ba1b44b..501f5ea389 100644
--- a/src/lib/libcrypto/rsa/rsa_err.c
+++ b/src/lib/libcrypto/rsa/rsa_err.c
@@ -1,6 +1,6 @@
1/* crypto/rsa/rsa_err.c */ 1/* crypto/rsa/rsa_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -70,6 +70,8 @@
70 70
71static ERR_STRING_DATA RSA_str_functs[]= 71static ERR_STRING_DATA RSA_str_functs[]=
72 { 72 {
73{ERR_FUNC(RSA_F_FIPS_RSA_SIGN), "FIPS_RSA_SIGN"},
74{ERR_FUNC(RSA_F_FIPS_RSA_VERIFY), "FIPS_RSA_VERIFY"},
73{ERR_FUNC(RSA_F_MEMORY_LOCK), "MEMORY_LOCK"}, 75{ERR_FUNC(RSA_F_MEMORY_LOCK), "MEMORY_LOCK"},
74{ERR_FUNC(RSA_F_RSA_BUILTIN_KEYGEN), "RSA_BUILTIN_KEYGEN"}, 76{ERR_FUNC(RSA_F_RSA_BUILTIN_KEYGEN), "RSA_BUILTIN_KEYGEN"},
75{ERR_FUNC(RSA_F_RSA_CHECK_KEY), "RSA_check_key"}, 77{ERR_FUNC(RSA_F_RSA_CHECK_KEY), "RSA_check_key"},
@@ -101,7 +103,11 @@ static ERR_STRING_DATA RSA_str_functs[]=
101{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_X931), "RSA_padding_check_X931"}, 103{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_X931), "RSA_padding_check_X931"},
102{ERR_FUNC(RSA_F_RSA_PRINT), "RSA_print"}, 104{ERR_FUNC(RSA_F_RSA_PRINT), "RSA_print"},
103{ERR_FUNC(RSA_F_RSA_PRINT_FP), "RSA_print_fp"}, 105{ERR_FUNC(RSA_F_RSA_PRINT_FP), "RSA_print_fp"},
106{ERR_FUNC(RSA_F_RSA_PRIVATE_ENCRYPT), "RSA_private_encrypt"},
107{ERR_FUNC(RSA_F_RSA_PUBLIC_DECRYPT), "RSA_public_decrypt"},
104{ERR_FUNC(RSA_F_RSA_SETUP_BLINDING), "RSA_setup_blinding"}, 108{ERR_FUNC(RSA_F_RSA_SETUP_BLINDING), "RSA_setup_blinding"},
109{ERR_FUNC(RSA_F_RSA_SET_DEFAULT_METHOD), "RSA_set_default_method"},
110{ERR_FUNC(RSA_F_RSA_SET_METHOD), "RSA_set_method"},
105{ERR_FUNC(RSA_F_RSA_SIGN), "RSA_sign"}, 111{ERR_FUNC(RSA_F_RSA_SIGN), "RSA_sign"},
106{ERR_FUNC(RSA_F_RSA_SIGN_ASN1_OCTET_STRING), "RSA_sign_ASN1_OCTET_STRING"}, 112{ERR_FUNC(RSA_F_RSA_SIGN_ASN1_OCTET_STRING), "RSA_sign_ASN1_OCTET_STRING"},
107{ERR_FUNC(RSA_F_RSA_VERIFY), "RSA_verify"}, 113{ERR_FUNC(RSA_F_RSA_VERIFY), "RSA_verify"},
@@ -138,10 +144,12 @@ static ERR_STRING_DATA RSA_str_reasons[]=
138{ERR_REASON(RSA_R_KEY_SIZE_TOO_SMALL) ,"key size too small"}, 144{ERR_REASON(RSA_R_KEY_SIZE_TOO_SMALL) ,"key size too small"},
139{ERR_REASON(RSA_R_LAST_OCTET_INVALID) ,"last octet invalid"}, 145{ERR_REASON(RSA_R_LAST_OCTET_INVALID) ,"last octet invalid"},
140{ERR_REASON(RSA_R_MODULUS_TOO_LARGE) ,"modulus too large"}, 146{ERR_REASON(RSA_R_MODULUS_TOO_LARGE) ,"modulus too large"},
147{ERR_REASON(RSA_R_NON_FIPS_METHOD) ,"non fips method"},
141{ERR_REASON(RSA_R_NO_PUBLIC_EXPONENT) ,"no public exponent"}, 148{ERR_REASON(RSA_R_NO_PUBLIC_EXPONENT) ,"no public exponent"},
142{ERR_REASON(RSA_R_NULL_BEFORE_BLOCK_MISSING),"null before block missing"}, 149{ERR_REASON(RSA_R_NULL_BEFORE_BLOCK_MISSING),"null before block missing"},
143{ERR_REASON(RSA_R_N_DOES_NOT_EQUAL_P_Q) ,"n does not equal p q"}, 150{ERR_REASON(RSA_R_N_DOES_NOT_EQUAL_P_Q) ,"n does not equal p q"},
144{ERR_REASON(RSA_R_OAEP_DECODING_ERROR) ,"oaep decoding error"}, 151{ERR_REASON(RSA_R_OAEP_DECODING_ERROR) ,"oaep decoding error"},
152{ERR_REASON(RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE),"operation not allowed in fips mode"},
145{ERR_REASON(RSA_R_PADDING_CHECK_FAILED) ,"padding check failed"}, 153{ERR_REASON(RSA_R_PADDING_CHECK_FAILED) ,"padding check failed"},
146{ERR_REASON(RSA_R_P_NOT_PRIME) ,"p not prime"}, 154{ERR_REASON(RSA_R_P_NOT_PRIME) ,"p not prime"},
147{ERR_REASON(RSA_R_Q_NOT_PRIME) ,"q not prime"}, 155{ERR_REASON(RSA_R_Q_NOT_PRIME) ,"q not prime"},
diff --git a/src/lib/libcrypto/rsa/rsa_gen.c b/src/lib/libcrypto/rsa/rsa_gen.c
index 767f7ab682..41278f83c6 100644
--- a/src/lib/libcrypto/rsa/rsa_gen.c
+++ b/src/lib/libcrypto/rsa/rsa_gen.c
@@ -68,6 +68,8 @@
68#include <openssl/bn.h> 68#include <openssl/bn.h>
69#include <openssl/rsa.h> 69#include <openssl/rsa.h>
70 70
71#ifndef OPENSSL_FIPS
72
71static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb); 73static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb);
72 74
73/* NB: this wrapper would normally be placed in rsa_lib.c and the static 75/* NB: this wrapper would normally be placed in rsa_lib.c and the static
@@ -217,3 +219,4 @@ err:
217 return ok; 219 return ok;
218 } 220 }
219 221
222#endif
diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c
index 104aa4c1f2..5714841f4c 100644
--- a/src/lib/libcrypto/rsa/rsa_lib.c
+++ b/src/lib/libcrypto/rsa/rsa_lib.c
@@ -67,215 +67,6 @@
67#include <openssl/engine.h> 67#include <openssl/engine.h>
68#endif 68#endif
69 69
70const char RSA_version[]="RSA" OPENSSL_VERSION_PTEXT;
71
72static const RSA_METHOD *default_RSA_meth=NULL;
73
74RSA *RSA_new(void)
75 {
76 RSA *r=RSA_new_method(NULL);
77
78 return r;
79 }
80
81void RSA_set_default_method(const RSA_METHOD *meth)
82 {
83 default_RSA_meth = meth;
84 }
85
86const RSA_METHOD *RSA_get_default_method(void)
87 {
88 if (default_RSA_meth == NULL)
89 {
90#ifdef RSA_NULL
91 default_RSA_meth=RSA_null_method();
92#else
93#if 0 /* was: #ifdef RSAref */
94 default_RSA_meth=RSA_PKCS1_RSAref();
95#else
96 default_RSA_meth=RSA_PKCS1_SSLeay();
97#endif
98#endif
99 }
100
101 return default_RSA_meth;
102 }
103
104const RSA_METHOD *RSA_get_method(const RSA *rsa)
105 {
106 return rsa->meth;
107 }
108
109int RSA_set_method(RSA *rsa, const RSA_METHOD *meth)
110 {
111 /* NB: The caller is specifically setting a method, so it's not up to us
112 * to deal with which ENGINE it comes from. */
113 const RSA_METHOD *mtmp;
114 mtmp = rsa->meth;
115 if (mtmp->finish) mtmp->finish(rsa);
116#ifndef OPENSSL_NO_ENGINE
117 if (rsa->engine)
118 {
119 ENGINE_finish(rsa->engine);
120 rsa->engine = NULL;
121 }
122#endif
123 rsa->meth = meth;
124 if (meth->init) meth->init(rsa);
125 return 1;
126 }
127
128RSA *RSA_new_method(ENGINE *engine)
129 {
130 RSA *ret;
131
132 ret=(RSA *)OPENSSL_malloc(sizeof(RSA));
133 if (ret == NULL)
134 {
135 RSAerr(RSA_F_RSA_NEW_METHOD,ERR_R_MALLOC_FAILURE);
136 return NULL;
137 }
138
139 ret->meth = RSA_get_default_method();
140#ifndef OPENSSL_NO_ENGINE
141 if (engine)
142 {
143 if (!ENGINE_init(engine))
144 {
145 RSAerr(RSA_F_RSA_NEW_METHOD, ERR_R_ENGINE_LIB);
146 OPENSSL_free(ret);
147 return NULL;
148 }
149 ret->engine = engine;
150 }
151 else
152 ret->engine = ENGINE_get_default_RSA();
153 if(ret->engine)
154 {
155 ret->meth = ENGINE_get_RSA(ret->engine);
156 if(!ret->meth)
157 {
158 RSAerr(RSA_F_RSA_NEW_METHOD,
159 ERR_R_ENGINE_LIB);
160 ENGINE_finish(ret->engine);
161 OPENSSL_free(ret);
162 return NULL;
163 }
164 }
165#endif
166
167 ret->pad=0;
168 ret->version=0;
169 ret->n=NULL;
170 ret->e=NULL;
171 ret->d=NULL;
172 ret->p=NULL;
173 ret->q=NULL;
174 ret->dmp1=NULL;
175 ret->dmq1=NULL;
176 ret->iqmp=NULL;
177 ret->references=1;
178 ret->_method_mod_n=NULL;
179 ret->_method_mod_p=NULL;
180 ret->_method_mod_q=NULL;
181 ret->blinding=NULL;
182 ret->mt_blinding=NULL;
183 ret->bignum_data=NULL;
184 ret->flags=ret->meth->flags;
185 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data);
186 if ((ret->meth->init != NULL) && !ret->meth->init(ret))
187 {
188#ifndef OPENSSL_NO_ENGINE
189 if (ret->engine)
190 ENGINE_finish(ret->engine);
191#endif
192 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data);
193 OPENSSL_free(ret);
194 ret=NULL;
195 }
196 return(ret);
197 }
198
199void RSA_free(RSA *r)
200 {
201 int i;
202
203 if (r == NULL) return;
204
205 i=CRYPTO_add(&r->references,-1,CRYPTO_LOCK_RSA);
206#ifdef REF_PRINT
207 REF_PRINT("RSA",r);
208#endif
209 if (i > 0) return;
210#ifdef REF_CHECK
211 if (i < 0)
212 {
213 fprintf(stderr,"RSA_free, bad reference count\n");
214 abort();
215 }
216#endif
217
218 if (r->meth->finish)
219 r->meth->finish(r);
220#ifndef OPENSSL_NO_ENGINE
221 if (r->engine)
222 ENGINE_finish(r->engine);
223#endif
224
225 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, r, &r->ex_data);
226
227 if (r->n != NULL) BN_clear_free(r->n);
228 if (r->e != NULL) BN_clear_free(r->e);
229 if (r->d != NULL) BN_clear_free(r->d);
230 if (r->p != NULL) BN_clear_free(r->p);
231 if (r->q != NULL) BN_clear_free(r->q);
232 if (r->dmp1 != NULL) BN_clear_free(r->dmp1);
233 if (r->dmq1 != NULL) BN_clear_free(r->dmq1);
234 if (r->iqmp != NULL) BN_clear_free(r->iqmp);
235 if (r->blinding != NULL) BN_BLINDING_free(r->blinding);
236 if (r->mt_blinding != NULL) BN_BLINDING_free(r->mt_blinding);
237 if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data);
238 OPENSSL_free(r);
239 }
240
241int RSA_up_ref(RSA *r)
242 {
243 int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA);
244#ifdef REF_PRINT
245 REF_PRINT("RSA",r);
246#endif
247#ifdef REF_CHECK
248 if (i < 2)
249 {
250 fprintf(stderr, "RSA_up_ref, bad reference count\n");
251 abort();
252 }
253#endif
254 return ((i > 1) ? 1 : 0);
255 }
256
257int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
258 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
259 {
260 return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, argl, argp,
261 new_func, dup_func, free_func);
262 }
263
264int RSA_set_ex_data(RSA *r, int idx, void *arg)
265 {
266 return(CRYPTO_set_ex_data(&r->ex_data,idx,arg));
267 }
268
269void *RSA_get_ex_data(const RSA *r, int idx)
270 {
271 return(CRYPTO_get_ex_data(&r->ex_data,idx));
272 }
273
274int RSA_size(const RSA *r)
275 {
276 return(BN_num_bytes(r->n));
277 }
278
279int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, 70int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
280 RSA *rsa, int padding) 71 RSA *rsa, int padding)
281 { 72 {
@@ -285,6 +76,13 @@ int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
285int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, 76int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
286 RSA *rsa, int padding) 77 RSA *rsa, int padding)
287 { 78 {
79#ifdef OPENSSL_FIPS
80 if(FIPS_mode() && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW))
81 {
82 RSAerr(RSA_F_RSA_PRIVATE_ENCRYPT, RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
83 return 0;
84 }
85#endif
288 return(rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding)); 86 return(rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding));
289 } 87 }
290 88
@@ -297,12 +95,19 @@ int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
297int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, 95int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
298 RSA *rsa, int padding) 96 RSA *rsa, int padding)
299 { 97 {
98#ifdef OPENSSL_FIPS
99 if(FIPS_mode() && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW))
100 {
101 RSAerr(RSA_F_RSA_PUBLIC_DECRYPT, RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
102 return 0;
103 }
104#endif
300 return(rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding)); 105 return(rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding));
301 } 106 }
302 107
303int RSA_flags(const RSA *r) 108int RSA_size(const RSA *r)
304 { 109 {
305 return((r == NULL)?0:r->meth->flags); 110 return(BN_num_bytes(r->n));
306 } 111 }
307 112
308void RSA_blinding_off(RSA *rsa) 113void RSA_blinding_off(RSA *rsa)
@@ -427,48 +232,3 @@ err:
427 232
428 return ret; 233 return ret;
429} 234}
430
431int RSA_memory_lock(RSA *r)
432 {
433 int i,j,k,off;
434 char *p;
435 BIGNUM *bn,**t[6],*b;
436 BN_ULONG *ul;
437
438 if (r->d == NULL) return(1);
439 t[0]= &r->d;
440 t[1]= &r->p;
441 t[2]= &r->q;
442 t[3]= &r->dmp1;
443 t[4]= &r->dmq1;
444 t[5]= &r->iqmp;
445 k=sizeof(BIGNUM)*6;
446 off=k/sizeof(BN_ULONG)+1;
447 j=1;
448 for (i=0; i<6; i++)
449 j+= (*t[i])->top;
450 if ((p=OPENSSL_malloc_locked((off+j)*sizeof(BN_ULONG))) == NULL)
451 {
452 RSAerr(RSA_F_RSA_MEMORY_LOCK,ERR_R_MALLOC_FAILURE);
453 return(0);
454 }
455 bn=(BIGNUM *)p;
456 ul=(BN_ULONG *)&(p[off]);
457 for (i=0; i<6; i++)
458 {
459 b= *(t[i]);
460 *(t[i])= &(bn[i]);
461 memcpy((char *)&(bn[i]),(char *)b,sizeof(BIGNUM));
462 bn[i].flags=BN_FLG_STATIC_DATA;
463 bn[i].d=ul;
464 memcpy((char *)ul,b->d,sizeof(BN_ULONG)*b->top);
465 ul+=b->top;
466 BN_clear_free(b);
467 }
468
469 /* I should fix this so it can still be done */
470 r->flags&= ~(RSA_FLAG_CACHE_PRIVATE|RSA_FLAG_CACHE_PUBLIC);
471
472 r->bignum_data=p;
473 return(1);
474 }
diff --git a/src/lib/libcrypto/rsa/rsa_null.c b/src/lib/libcrypto/rsa/rsa_null.c
index 491572c82b..2f2202f142 100644
--- a/src/lib/libcrypto/rsa/rsa_null.c
+++ b/src/lib/libcrypto/rsa/rsa_null.c
@@ -1,5 +1,5 @@
1/* rsa_null.c */ 1/* rsa_null.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/rsa/rsa_oaep.c b/src/lib/libcrypto/rsa/rsa_oaep.c
index 3652677a99..4d30c9d2d3 100644
--- a/src/lib/libcrypto/rsa/rsa_oaep.c
+++ b/src/lib/libcrypto/rsa/rsa_oaep.c
@@ -187,7 +187,7 @@ int PKCS1_MGF1(unsigned char *mask, long len,
187 int mdlen; 187 int mdlen;
188 188
189 EVP_MD_CTX_init(&c); 189 EVP_MD_CTX_init(&c);
190 mdlen = EVP_MD_size(dgst); 190 mdlen = M_EVP_MD_size(dgst);
191 for (i = 0; outlen < len; i++) 191 for (i = 0; outlen < len; i++)
192 { 192 {
193 cnt[0] = (unsigned char)((i >> 24) & 255); 193 cnt[0] = (unsigned char)((i >> 24) & 255);
diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c
index 71aabeea1b..5488c06f6d 100644
--- a/src/lib/libcrypto/rsa/rsa_sign.c
+++ b/src/lib/libcrypto/rsa/rsa_sign.c
@@ -90,6 +90,14 @@ int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
90 i = SSL_SIG_LENGTH; 90 i = SSL_SIG_LENGTH;
91 s = m; 91 s = m;
92 } else { 92 } else {
93 /* NB: in FIPS mode block anything that isn't a TLS signature */
94#ifdef OPENSSL_FIPS
95 if(FIPS_mode() && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW))
96 {
97 RSAerr(RSA_F_RSA_SIGN, RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
98 return 0;
99 }
100#endif
93 sig.algor= &algor; 101 sig.algor= &algor;
94 sig.algor->algorithm=OBJ_nid2obj(type); 102 sig.algor->algorithm=OBJ_nid2obj(type);
95 if (sig.algor->algorithm == NULL) 103 if (sig.algor->algorithm == NULL)
@@ -167,10 +175,22 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len,
167 RSAerr(RSA_F_RSA_VERIFY,ERR_R_MALLOC_FAILURE); 175 RSAerr(RSA_F_RSA_VERIFY,ERR_R_MALLOC_FAILURE);
168 goto err; 176 goto err;
169 } 177 }
170 if((dtype == NID_md5_sha1) && (m_len != SSL_SIG_LENGTH) ) { 178 if(dtype == NID_md5_sha1)
179 {
180 if (m_len != SSL_SIG_LENGTH)
181 {
171 RSAerr(RSA_F_RSA_VERIFY,RSA_R_INVALID_MESSAGE_LENGTH); 182 RSAerr(RSA_F_RSA_VERIFY,RSA_R_INVALID_MESSAGE_LENGTH);
172 goto err; 183 goto err;
173 } 184 }
185 }
186 /* NB: in FIPS mode block anything that isn't a TLS signature */
187#ifdef OPENSSL_FIPS
188 else if(FIPS_mode() && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW))
189 {
190 RSAerr(RSA_F_RSA_VERIFY, RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
191 return 0;
192 }
193#endif
174 i=RSA_public_decrypt((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING); 194 i=RSA_public_decrypt((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING);
175 195
176 if (i <= 0) goto err; 196 if (i <= 0) goto err;
diff --git a/src/lib/libcrypto/sha/sha.h b/src/lib/libcrypto/sha/sha.h
index eed44d7f94..47a2c29f66 100644
--- a/src/lib/libcrypto/sha/sha.h
+++ b/src/lib/libcrypto/sha/sha.h
@@ -106,6 +106,9 @@ typedef struct SHAstate_st
106 } SHA_CTX; 106 } SHA_CTX;
107 107
108#ifndef OPENSSL_NO_SHA0 108#ifndef OPENSSL_NO_SHA0
109#ifdef OPENSSL_FIPS
110int private_SHA_Init(SHA_CTX *c);
111#endif
109int SHA_Init(SHA_CTX *c); 112int SHA_Init(SHA_CTX *c);
110int SHA_Update(SHA_CTX *c, const void *data, size_t len); 113int SHA_Update(SHA_CTX *c, const void *data, size_t len);
111int SHA_Final(unsigned char *md, SHA_CTX *c); 114int SHA_Final(unsigned char *md, SHA_CTX *c);
diff --git a/src/lib/libcrypto/sha/sha1_one.c b/src/lib/libcrypto/sha/sha1_one.c
index 7c65b60276..4831174198 100644
--- a/src/lib/libcrypto/sha/sha1_one.c
+++ b/src/lib/libcrypto/sha/sha1_one.c
@@ -61,7 +61,7 @@
61#include <openssl/sha.h> 61#include <openssl/sha.h>
62#include <openssl/crypto.h> 62#include <openssl/crypto.h>
63 63
64#ifndef OPENSSL_NO_SHA1 64#if !defined(OPENSSL_NO_SHA1)
65unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) 65unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md)
66 { 66 {
67 SHA_CTX c; 67 SHA_CTX c;
diff --git a/src/lib/libcrypto/sha/sha1dgst.c b/src/lib/libcrypto/sha/sha1dgst.c
index 50d1925cde..d31f0781a0 100644
--- a/src/lib/libcrypto/sha/sha1dgst.c
+++ b/src/lib/libcrypto/sha/sha1dgst.c
@@ -63,6 +63,10 @@
63#define SHA_1 63#define SHA_1
64 64
65#include <openssl/opensslv.h> 65#include <openssl/opensslv.h>
66#ifdef OPENSSL_FIPS
67#include <openssl/fips.h>
68#endif
69
66 70
67const char SHA1_version[]="SHA1" OPENSSL_VERSION_PTEXT; 71const char SHA1_version[]="SHA1" OPENSSL_VERSION_PTEXT;
68 72
diff --git a/src/lib/libcrypto/sha/sha_dgst.c b/src/lib/libcrypto/sha/sha_dgst.c
index 70eb56032c..598f4d721a 100644
--- a/src/lib/libcrypto/sha/sha_dgst.c
+++ b/src/lib/libcrypto/sha/sha_dgst.c
@@ -57,6 +57,12 @@
57 */ 57 */
58 58
59#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60#include <openssl/crypto.h>
61#ifdef OPENSSL_FIPS
62#include <openssl/fips.h>
63#endif
64
65#include <openssl/err.h>
60#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA) 66#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA)
61 67
62#undef SHA_1 68#undef SHA_1
diff --git a/src/lib/libcrypto/sha/sha_locl.h b/src/lib/libcrypto/sha/sha_locl.h
index e37e5726e3..da46ddfe79 100644
--- a/src/lib/libcrypto/sha/sha_locl.h
+++ b/src/lib/libcrypto/sha/sha_locl.h
@@ -122,8 +122,15 @@ void sha1_block_data_order (SHA_CTX *c, const void *p,size_t num);
122#define INIT_DATA_h3 0x10325476UL 122#define INIT_DATA_h3 0x10325476UL
123#define INIT_DATA_h4 0xc3d2e1f0UL 123#define INIT_DATA_h4 0xc3d2e1f0UL
124 124
125#if defined(SHA_0) && defined(OPENSSL_FIPS)
126FIPS_NON_FIPS_MD_Init(SHA)
127#else
125int HASH_INIT (SHA_CTX *c) 128int HASH_INIT (SHA_CTX *c)
129#endif
126 { 130 {
131#if defined(SHA_1) && defined(OPENSSL_FIPS)
132 FIPS_selftest_check();
133#endif
127 c->h0=INIT_DATA_h0; 134 c->h0=INIT_DATA_h0;
128 c->h1=INIT_DATA_h1; 135 c->h1=INIT_DATA_h1;
129 c->h2=INIT_DATA_h2; 136 c->h2=INIT_DATA_h2;
diff --git a/src/lib/libcrypto/symhacks.h b/src/lib/libcrypto/symhacks.h
index 64528ad5c2..6cfb5fe479 100644
--- a/src/lib/libcrypto/symhacks.h
+++ b/src/lib/libcrypto/symhacks.h
@@ -179,6 +179,11 @@
179#define ENGINE_set_load_privkey_function ENGINE_set_load_privkey_fn 179#define ENGINE_set_load_privkey_function ENGINE_set_load_privkey_fn
180#undef ENGINE_get_load_privkey_function 180#undef ENGINE_get_load_privkey_function
181#define ENGINE_get_load_privkey_function ENGINE_get_load_privkey_fn 181#define ENGINE_get_load_privkey_function ENGINE_get_load_privkey_fn
182#undef ENGINE_set_load_ssl_client_cert_function
183#define ENGINE_set_load_ssl_client_cert_function \
184 ENGINE_set_ld_ssl_clnt_cert_fn
185#undef ENGINE_get_ssl_client_cert_function
186#define ENGINE_get_ssl_client_cert_function ENGINE_get_ssl_client_cert_fn
182 187
183/* Hack some long OCSP names */ 188/* Hack some long OCSP names */
184#undef OCSP_REQUEST_get_ext_by_critical 189#undef OCSP_REQUEST_get_ext_by_critical
diff --git a/src/lib/libcrypto/ui/ui_openssl.c b/src/lib/libcrypto/ui/ui_openssl.c
index 8446673ed4..5fbedf6ff8 100644
--- a/src/lib/libcrypto/ui/ui_openssl.c
+++ b/src/lib/libcrypto/ui/ui_openssl.c
@@ -678,6 +678,8 @@ static int noecho_fgets(char *buf, int size, FILE *tty)
678 size--; 678 size--;
679#ifdef WIN16TTY 679#ifdef WIN16TTY
680 i=_inchar(); 680 i=_inchar();
681#elif defined(_WIN32)
682 i=_getch();
681#else 683#else
682 i=getch(); 684 i=getch();
683#endif 685#endif
diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num
index 62664f3c37..0eb54ddc89 100644
--- a/src/lib/libcrypto/util/libeay.num
+++ b/src/lib/libcrypto/util/libeay.num
@@ -2804,12 +2804,12 @@ OPENSSL_cleanse 3245 EXIST::FUNCTION:
2804ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE 2804ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE
2805ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH 2805ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH
2806EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES 2806EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES
2807FIPS_corrupt_rsa 3249 NOEXIST::FUNCTION: 2807FIPS_corrupt_rsa 3249 EXIST:OPENSSL_FIPS:FUNCTION:
2808FIPS_selftest_des 3250 NOEXIST::FUNCTION: 2808FIPS_selftest_des 3250 EXIST:OPENSSL_FIPS:FUNCTION:
2809EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES 2809EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES
2810EVP_aes_192_cfb8 3252 EXIST::FUNCTION:AES 2810EVP_aes_192_cfb8 3252 EXIST::FUNCTION:AES
2811FIPS_mode_set 3253 NOEXIST::FUNCTION: 2811FIPS_mode_set 3253 EXIST:OPENSSL_FIPS:FUNCTION:
2812FIPS_selftest_dsa 3254 NOEXIST::FUNCTION: 2812FIPS_selftest_dsa 3254 EXIST:OPENSSL_FIPS:FUNCTION:
2813EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES 2813EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES
2814FIPS_allow_md5 3256 NOEXIST::FUNCTION: 2814FIPS_allow_md5 3256 NOEXIST::FUNCTION:
2815DES_ede3_cfb_encrypt 3257 EXIST::FUNCTION:DES 2815DES_ede3_cfb_encrypt 3257 EXIST::FUNCTION:DES
@@ -2817,44 +2817,44 @@ EVP_des_ede3_cfb8 3258 EXIST::FUNCTION:DES
2817FIPS_rand_seeded 3259 NOEXIST::FUNCTION: 2817FIPS_rand_seeded 3259 NOEXIST::FUNCTION:
2818AES_cfbr_encrypt_block 3260 EXIST::FUNCTION:AES 2818AES_cfbr_encrypt_block 3260 EXIST::FUNCTION:AES
2819AES_cfb8_encrypt 3261 EXIST::FUNCTION:AES 2819AES_cfb8_encrypt 3261 EXIST::FUNCTION:AES
2820FIPS_rand_seed 3262 NOEXIST::FUNCTION: 2820FIPS_rand_seed 3262 EXIST:OPENSSL_FIPS:FUNCTION:
2821FIPS_corrupt_des 3263 NOEXIST::FUNCTION: 2821FIPS_corrupt_des 3263 EXIST:OPENSSL_FIPS:FUNCTION:
2822EVP_aes_192_cfb1 3264 EXIST::FUNCTION:AES 2822EVP_aes_192_cfb1 3264 EXIST::FUNCTION:AES
2823FIPS_selftest_aes 3265 NOEXIST::FUNCTION: 2823FIPS_selftest_aes 3265 EXIST:OPENSSL_FIPS:FUNCTION:
2824FIPS_set_prng_key 3266 NOEXIST::FUNCTION: 2824FIPS_set_prng_key 3266 NOEXIST::FUNCTION:
2825EVP_des_cfb8 3267 EXIST::FUNCTION:DES 2825EVP_des_cfb8 3267 EXIST::FUNCTION:DES
2826FIPS_corrupt_dsa 3268 NOEXIST::FUNCTION: 2826FIPS_corrupt_dsa 3268 EXIST:OPENSSL_FIPS:FUNCTION:
2827FIPS_test_mode 3269 NOEXIST::FUNCTION: 2827FIPS_test_mode 3269 NOEXIST::FUNCTION:
2828FIPS_rand_method 3270 NOEXIST::FUNCTION: 2828FIPS_rand_method 3270 EXIST:OPENSSL_FIPS:FUNCTION:
2829EVP_aes_256_cfb1 3271 EXIST::FUNCTION:AES 2829EVP_aes_256_cfb1 3271 EXIST::FUNCTION:AES
2830ERR_load_FIPS_strings 3272 NOEXIST::FUNCTION: 2830ERR_load_FIPS_strings 3272 EXIST:OPENSSL_FIPS:FUNCTION:
2831FIPS_corrupt_aes 3273 NOEXIST::FUNCTION: 2831FIPS_corrupt_aes 3273 EXIST:OPENSSL_FIPS:FUNCTION:
2832FIPS_selftest_sha1 3274 NOEXIST::FUNCTION: 2832FIPS_selftest_sha1 3274 EXIST:OPENSSL_FIPS:FUNCTION:
2833FIPS_selftest_rsa 3275 NOEXIST::FUNCTION: 2833FIPS_selftest_rsa 3275 EXIST:OPENSSL_FIPS:FUNCTION:
2834FIPS_corrupt_sha1 3276 NOEXIST::FUNCTION: 2834FIPS_corrupt_sha1 3276 EXIST:OPENSSL_FIPS:FUNCTION:
2835EVP_des_cfb1 3277 EXIST::FUNCTION:DES 2835EVP_des_cfb1 3277 EXIST::FUNCTION:DES
2836FIPS_dsa_check 3278 NOEXIST::FUNCTION: 2836FIPS_dsa_check 3278 NOEXIST::FUNCTION:
2837AES_cfb1_encrypt 3279 EXIST::FUNCTION:AES 2837AES_cfb1_encrypt 3279 EXIST::FUNCTION:AES
2838EVP_des_ede3_cfb1 3280 EXIST::FUNCTION:DES 2838EVP_des_ede3_cfb1 3280 EXIST::FUNCTION:DES
2839FIPS_rand_check 3281 NOEXIST::FUNCTION: 2839FIPS_rand_check 3281 EXIST:OPENSSL_FIPS:FUNCTION:
2840FIPS_md5_allowed 3282 NOEXIST::FUNCTION: 2840FIPS_md5_allowed 3282 NOEXIST::FUNCTION:
2841FIPS_mode 3283 NOEXIST::FUNCTION: 2841FIPS_mode 3283 EXIST:OPENSSL_FIPS:FUNCTION:
2842FIPS_selftest_failed 3284 NOEXIST::FUNCTION: 2842FIPS_selftest_failed 3284 EXIST:OPENSSL_FIPS:FUNCTION:
2843sk_is_sorted 3285 EXIST::FUNCTION: 2843sk_is_sorted 3285 EXIST::FUNCTION:
2844X509_check_ca 3286 EXIST::FUNCTION: 2844X509_check_ca 3286 EXIST::FUNCTION:
2845private_idea_set_encrypt_key 3287 NOEXIST::FUNCTION: 2845private_idea_set_encrypt_key 3287 EXIST:OPENSSL_FIPS:FUNCTION:IDEA
2846HMAC_CTX_set_flags 3288 EXIST::FUNCTION:HMAC 2846HMAC_CTX_set_flags 3288 EXIST::FUNCTION:HMAC
2847private_SHA_Init 3289 NOEXIST::FUNCTION: 2847private_SHA_Init 3289 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA0
2848private_CAST_set_key 3290 NOEXIST::FUNCTION: 2848private_CAST_set_key 3290 EXIST:OPENSSL_FIPS:FUNCTION:CAST
2849private_RIPEMD160_Init 3291 NOEXIST::FUNCTION: 2849private_RIPEMD160_Init 3291 EXIST:OPENSSL_FIPS:FUNCTION:RIPEMD
2850private_RC5_32_set_key 3292 NOEXIST::FUNCTION: 2850private_RC5_32_set_key 3292 EXIST:OPENSSL_FIPS:FUNCTION:RC5
2851private_MD5_Init 3293 NOEXIST::FUNCTION: 2851private_MD5_Init 3293 EXIST:OPENSSL_FIPS:FUNCTION:MD5
2852private_RC4_set_key 3294 NOEXIST::FUNCTION: 2852private_RC4_set_key 3294 EXIST:OPENSSL_FIPS:FUNCTION:RC4
2853private_MDC2_Init 3295 NOEXIST::FUNCTION: 2853private_MDC2_Init 3295 EXIST:OPENSSL_FIPS:FUNCTION:MDC2
2854private_RC2_set_key 3296 NOEXIST::FUNCTION: 2854private_RC2_set_key 3296 EXIST:OPENSSL_FIPS:FUNCTION:RC2
2855private_MD4_Init 3297 NOEXIST::FUNCTION: 2855private_MD4_Init 3297 EXIST:OPENSSL_FIPS:FUNCTION:MD4
2856private_BF_set_key 3298 NOEXIST::FUNCTION: 2856private_BF_set_key 3298 EXIST:OPENSSL_FIPS:FUNCTION:BF
2857private_MD2_Init 3299 NOEXIST::FUNCTION: 2857private_MD2_Init 3299 EXIST:OPENSSL_FIPS:FUNCTION:MD2
2858d2i_PROXY_CERT_INFO_EXTENSION 3300 EXIST::FUNCTION: 2858d2i_PROXY_CERT_INFO_EXTENSION 3300 EXIST::FUNCTION:
2859PROXY_POLICY_it 3301 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: 2859PROXY_POLICY_it 3301 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
2860PROXY_POLICY_it 3301 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: 2860PROXY_POLICY_it 3301 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
@@ -2868,13 +2868,13 @@ PROXY_CERT_INFO_EXTENSION_it 3307 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTI
2868PROXY_POLICY_free 3308 EXIST::FUNCTION: 2868PROXY_POLICY_free 3308 EXIST::FUNCTION:
2869PROXY_POLICY_new 3309 EXIST::FUNCTION: 2869PROXY_POLICY_new 3309 EXIST::FUNCTION:
2870BN_MONT_CTX_set_locked 3310 EXIST::FUNCTION: 2870BN_MONT_CTX_set_locked 3310 EXIST::FUNCTION:
2871FIPS_selftest_rng 3311 NOEXIST::FUNCTION: 2871FIPS_selftest_rng 3311 EXIST:OPENSSL_FIPS:FUNCTION:
2872EVP_sha384 3312 EXIST::FUNCTION:SHA,SHA512 2872EVP_sha384 3312 EXIST::FUNCTION:SHA,SHA512
2873EVP_sha512 3313 EXIST::FUNCTION:SHA,SHA512 2873EVP_sha512 3313 EXIST::FUNCTION:SHA,SHA512
2874EVP_sha224 3314 EXIST::FUNCTION:SHA,SHA256 2874EVP_sha224 3314 EXIST::FUNCTION:SHA,SHA256
2875EVP_sha256 3315 EXIST::FUNCTION:SHA,SHA256 2875EVP_sha256 3315 EXIST::FUNCTION:SHA,SHA256
2876FIPS_selftest_hmac 3316 NOEXIST::FUNCTION: 2876FIPS_selftest_hmac 3316 EXIST:OPENSSL_FIPS:FUNCTION:
2877FIPS_corrupt_rng 3317 NOEXIST::FUNCTION: 2877FIPS_corrupt_rng 3317 EXIST:OPENSSL_FIPS:FUNCTION:
2878BN_mod_exp_mont_consttime 3318 EXIST::FUNCTION: 2878BN_mod_exp_mont_consttime 3318 EXIST::FUNCTION:
2879RSA_X931_hash_id 3319 EXIST::FUNCTION:RSA 2879RSA_X931_hash_id 3319 EXIST::FUNCTION:RSA
2880RSA_padding_check_X931 3320 EXIST::FUNCTION:RSA 2880RSA_padding_check_X931 3320 EXIST::FUNCTION:RSA
@@ -2882,7 +2882,7 @@ RSA_verify_PKCS1_PSS 3321 EXIST::FUNCTION:RSA
2882RSA_padding_add_X931 3322 EXIST::FUNCTION:RSA 2882RSA_padding_add_X931 3322 EXIST::FUNCTION:RSA
2883RSA_padding_add_PKCS1_PSS 3323 EXIST::FUNCTION:RSA 2883RSA_padding_add_PKCS1_PSS 3323 EXIST::FUNCTION:RSA
2884PKCS1_MGF1 3324 EXIST::FUNCTION:RSA 2884PKCS1_MGF1 3324 EXIST::FUNCTION:RSA
2885BN_X931_generate_Xpq 3325 NOEXIST::FUNCTION: 2885BN_X931_generate_Xpq 3325 EXIST::FUNCTION:
2886RSA_X931_generate_key 3326 NOEXIST::FUNCTION: 2886RSA_X931_generate_key 3326 NOEXIST::FUNCTION:
2887BN_X931_derive_prime 3327 NOEXIST::FUNCTION: 2887BN_X931_derive_prime 3327 NOEXIST::FUNCTION:
2888BN_X931_generate_prime 3328 NOEXIST::FUNCTION: 2888BN_X931_generate_prime 3328 NOEXIST::FUNCTION:
@@ -3652,51 +3652,75 @@ CMS_set1_eContentType 4040 EXIST::FUNCTION:CMS
3652CMS_ReceiptRequest_create0 4041 EXIST::FUNCTION:CMS 3652CMS_ReceiptRequest_create0 4041 EXIST::FUNCTION:CMS
3653CMS_add1_signer 4042 EXIST::FUNCTION:CMS 3653CMS_add1_signer 4042 EXIST::FUNCTION:CMS
3654CMS_RecipientInfo_set0_pkey 4043 EXIST::FUNCTION:CMS 3654CMS_RecipientInfo_set0_pkey 4043 EXIST::FUNCTION:CMS
3655ENGINE_set_load_ssl_client_cert_function 4044 EXIST::FUNCTION:ENGINE 3655ENGINE_set_load_ssl_client_cert_function 4044 EXIST:!VMS:FUNCTION:ENGINE
3656ENGINE_get_ssl_client_cert_function 4045 EXIST::FUNCTION:ENGINE 3656ENGINE_set_ld_ssl_clnt_cert_fn 4044 EXIST:VMS:FUNCTION:ENGINE
3657ENGINE_get_ssl_client_cert_function 4045 EXIST:!VMS:FUNCTION:ENGINE
3658ENGINE_get_ssl_client_cert_fn 4045 EXIST:VMS:FUNCTION:ENGINE
3657ENGINE_load_ssl_client_cert 4046 EXIST::FUNCTION:ENGINE 3659ENGINE_load_ssl_client_cert 4046 EXIST::FUNCTION:ENGINE
3658ENGINE_load_capi 4047 EXIST::FUNCTION:CAPIENG,ENGINE 3660ENGINE_load_capi 4047 EXIST::FUNCTION:CAPIENG,ENGINE
3659OPENSSL_isservice 4048 EXIST::FUNCTION: 3661OPENSSL_isservice 4048 EXIST::FUNCTION:
3660FIPS_dsa_sig_decode 4049 NOEXIST::FUNCTION: 3662FIPS_dsa_sig_decode 4049 EXIST:OPENSSL_FIPS:FUNCTION:DSA
3661EVP_CIPHER_CTX_clear_flags 4050 NOEXIST::FUNCTION: 3663EVP_CIPHER_CTX_clear_flags 4050 EXIST::FUNCTION:
3662FIPS_rand_status 4051 NOEXIST::FUNCTION: 3664FIPS_rand_status 4051 EXIST:OPENSSL_FIPS:FUNCTION:
3663FIPS_rand_set_key 4052 NOEXIST::FUNCTION: 3665FIPS_rand_set_key 4052 EXIST:OPENSSL_FIPS:FUNCTION:
3664CRYPTO_set_mem_info_functions 4053 NOEXIST::FUNCTION: 3666CRYPTO_set_mem_info_functions 4053 EXIST::FUNCTION:
3665RSA_X931_generate_key_ex 4054 NOEXIST::FUNCTION: 3667RSA_X931_generate_key_ex 4054 EXIST::FUNCTION:RSA
3666int_ERR_set_state_func 4055 NOEXIST::FUNCTION: 3668int_ERR_set_state_func 4055 EXIST:OPENSSL_FIPS:FUNCTION:
3667int_EVP_MD_set_engine_callbacks 4056 NOEXIST::FUNCTION: 3669int_EVP_MD_set_engine_callbacks 4056 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3668int_CRYPTO_set_do_dynlock_callback 4057 NOEXIST::FUNCTION: 3670int_CRYPTO_set_do_dynlock_callback 4057 EXIST::FUNCTION:
3669FIPS_rng_stick 4058 NOEXIST::FUNCTION: 3671FIPS_rng_stick 4058 EXIST:OPENSSL_FIPS:FUNCTION:
3670EVP_CIPHER_CTX_set_flags 4059 NOEXIST::FUNCTION: 3672EVP_CIPHER_CTX_set_flags 4059 EXIST::FUNCTION:
3671BN_X931_generate_prime_ex 4060 NOEXIST::FUNCTION: 3673BN_X931_generate_prime_ex 4060 EXIST::FUNCTION:
3672FIPS_selftest_check 4061 NOEXIST::FUNCTION: 3674FIPS_selftest_check 4061 EXIST:OPENSSL_FIPS:FUNCTION:
3673FIPS_rand_set_dt 4062 NOEXIST::FUNCTION: 3675FIPS_rand_set_dt 4062 EXIST:OPENSSL_FIPS:FUNCTION:
3674CRYPTO_dbg_pop_info 4063 NOEXIST::FUNCTION: 3676CRYPTO_dbg_pop_info 4063 EXIST::FUNCTION:
3675FIPS_dsa_free 4064 NOEXIST::FUNCTION: 3677FIPS_dsa_free 4064 EXIST:OPENSSL_FIPS:FUNCTION:DSA
3676RSA_X931_derive_ex 4065 NOEXIST::FUNCTION: 3678RSA_X931_derive_ex 4065 EXIST::FUNCTION:RSA
3677FIPS_rsa_new 4066 NOEXIST::FUNCTION: 3679FIPS_rsa_new 4066 EXIST:OPENSSL_FIPS:FUNCTION:RSA
3678FIPS_rand_bytes 4067 NOEXIST::FUNCTION: 3680FIPS_rand_bytes 4067 EXIST:OPENSSL_FIPS:FUNCTION:
3679fips_cipher_test 4068 NOEXIST::FUNCTION: 3681fips_cipher_test 4068 EXIST:OPENSSL_FIPS:FUNCTION:
3680EVP_CIPHER_CTX_test_flags 4069 NOEXIST::FUNCTION: 3682EVP_CIPHER_CTX_test_flags 4069 EXIST::FUNCTION:
3681CRYPTO_malloc_debug_init 4070 NOEXIST::FUNCTION: 3683CRYPTO_malloc_debug_init 4070 EXIST::FUNCTION:
3682CRYPTO_dbg_push_info 4071 NOEXIST::FUNCTION: 3684CRYPTO_dbg_push_info 4071 EXIST::FUNCTION:
3683FIPS_corrupt_rsa_keygen 4072 NOEXIST::FUNCTION: 3685FIPS_corrupt_rsa_keygen 4072 EXIST:OPENSSL_FIPS:FUNCTION:
3684FIPS_dh_new 4073 NOEXIST::FUNCTION: 3686FIPS_dh_new 4073 EXIST:OPENSSL_FIPS:FUNCTION:DH
3685FIPS_corrupt_dsa_keygen 4074 NOEXIST::FUNCTION: 3687FIPS_corrupt_dsa_keygen 4074 EXIST:OPENSSL_FIPS:FUNCTION:
3686FIPS_dh_free 4075 NOEXIST::FUNCTION: 3688FIPS_dh_free 4075 EXIST:OPENSSL_FIPS:FUNCTION:DH
3687fips_pkey_signature_test 4076 NOEXIST::FUNCTION: 3689fips_pkey_signature_test 4076 EXIST:OPENSSL_FIPS:FUNCTION:
3688EVP_add_alg_module 4077 NOEXIST::FUNCTION: 3690EVP_add_alg_module 4077 EXIST::FUNCTION:
3689int_RAND_init_engine_callbacks 4078 NOEXIST::FUNCTION: 3691int_RAND_init_engine_callbacks 4078 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3690int_EVP_CIPHER_set_engine_callbacks 4079 NOEXIST::FUNCTION: 3692int_EVP_CIPHER_set_engine_callbacks 4079 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3691int_EVP_MD_init_engine_callbacks 4080 NOEXIST::FUNCTION: 3693int_EVP_MD_init_engine_callbacks 4080 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3692FIPS_rand_test_mode 4081 NOEXIST::FUNCTION: 3694FIPS_rand_test_mode 4081 EXIST:OPENSSL_FIPS:FUNCTION:
3693FIPS_rand_reset 4082 NOEXIST::FUNCTION: 3695FIPS_rand_reset 4082 EXIST:OPENSSL_FIPS:FUNCTION:
3694FIPS_dsa_new 4083 NOEXIST::FUNCTION: 3696FIPS_dsa_new 4083 EXIST:OPENSSL_FIPS:FUNCTION:DSA
3695int_RAND_set_callbacks 4084 NOEXIST::FUNCTION: 3697int_RAND_set_callbacks 4084 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3696BN_X931_derive_prime_ex 4085 NOEXIST::FUNCTION: 3698BN_X931_derive_prime_ex 4085 EXIST::FUNCTION:
3697int_ERR_lib_init 4086 NOEXIST::FUNCTION: 3699int_ERR_lib_init 4086 EXIST:OPENSSL_FIPS:FUNCTION:
3698int_EVP_CIPHER_init_engine_callbacks 4087 NOEXIST::FUNCTION: 3700int_EVP_CIPHER_init_engine_callbacks 4087 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3699FIPS_rsa_free 4088 NOEXIST::FUNCTION: 3701FIPS_rsa_free 4088 EXIST:OPENSSL_FIPS:FUNCTION:RSA
3700FIPS_dsa_sig_encode 4089 NOEXIST::FUNCTION: 3702FIPS_dsa_sig_encode 4089 EXIST:OPENSSL_FIPS:FUNCTION:DSA
3701CRYPTO_dbg_remove_all_info 4090 NOEXIST::FUNCTION: 3703CRYPTO_dbg_remove_all_info 4090 EXIST::FUNCTION:
3702OPENSSL_init 4091 NOEXIST::FUNCTION: 3704OPENSSL_init 4091 EXIST::FUNCTION:
3705private_Camellia_set_key 4092 EXIST:OPENSSL_FIPS:FUNCTION:CAMELLIA
3706CRYPTO_strdup 4093 EXIST::FUNCTION:
3707JPAKE_STEP3A_process 4094 EXIST::FUNCTION:JPAKE
3708JPAKE_STEP1_release 4095 EXIST::FUNCTION:JPAKE
3709JPAKE_get_shared_key 4096 EXIST::FUNCTION:JPAKE
3710JPAKE_STEP3B_init 4097 EXIST::FUNCTION:JPAKE
3711JPAKE_STEP1_generate 4098 EXIST::FUNCTION:JPAKE
3712JPAKE_STEP1_init 4099 EXIST::FUNCTION:JPAKE
3713JPAKE_STEP3B_process 4100 EXIST::FUNCTION:JPAKE
3714JPAKE_STEP2_generate 4101 EXIST::FUNCTION:JPAKE
3715JPAKE_CTX_new 4102 EXIST::FUNCTION:JPAKE
3716JPAKE_CTX_free 4103 EXIST::FUNCTION:JPAKE
3717JPAKE_STEP3B_release 4104 EXIST::FUNCTION:JPAKE
3718JPAKE_STEP3A_release 4105 EXIST::FUNCTION:JPAKE
3719JPAKE_STEP2_process 4106 EXIST::FUNCTION:JPAKE
3720JPAKE_STEP3B_generate 4107 EXIST::FUNCTION:JPAKE
3721JPAKE_STEP1_process 4108 EXIST::FUNCTION:JPAKE
3722JPAKE_STEP3A_generate 4109 EXIST::FUNCTION:JPAKE
3723JPAKE_STEP2_release 4110 EXIST::FUNCTION:JPAKE
3724JPAKE_STEP3A_init 4111 EXIST::FUNCTION:JPAKE
3725ERR_load_JPAKE_strings 4112 EXIST::FUNCTION:JPAKE
3726JPAKE_STEP2_init 4113 EXIST::FUNCTION:JPAKE
diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl
index 7ba804ce33..4c16f1dc9e 100644
--- a/src/lib/libcrypto/util/mk1mf.pl
+++ b/src/lib/libcrypto/util/mk1mf.pl
@@ -15,6 +15,18 @@ my $engines = "";
15local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic 15local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic
16local $zlib_lib = ""; 16local $zlib_lib = "";
17 17
18local $fips_canister_path = "";
19my $fips_premain_dso_exe_path = "";
20my $fips_premain_c_path = "";
21my $fips_sha1_exe_path = "";
22
23local $fipscanisterbuild = 0;
24local $fipsdso = 0;
25
26my $fipslibdir = "";
27my $baseaddr = "";
28
29my $ex_l_libs = "";
18 30
19open(IN,"<Makefile") || die "unable to open Makefile!\n"; 31open(IN,"<Makefile") || die "unable to open Makefile!\n";
20while(<IN>) { 32while(<IN>) {
@@ -221,6 +233,7 @@ $cflags.=" -DOPENSSL_NO_SSL2" if $no_ssl2;
221$cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3; 233$cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3;
222$cflags.=" -DOPENSSL_NO_TLSEXT" if $no_tlsext; 234$cflags.=" -DOPENSSL_NO_TLSEXT" if $no_tlsext;
223$cflags.=" -DOPENSSL_NO_CMS" if $no_cms; 235$cflags.=" -DOPENSSL_NO_CMS" if $no_cms;
236$cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake;
224$cflags.=" -DOPENSSL_NO_CAPIENG" if $no_capieng; 237$cflags.=" -DOPENSSL_NO_CAPIENG" if $no_capieng;
225$cflags.=" -DOPENSSL_NO_ERR" if $no_err; 238$cflags.=" -DOPENSSL_NO_ERR" if $no_err;
226$cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; 239$cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5;
@@ -229,7 +242,7 @@ $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa;
229$cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh; 242$cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh;
230$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; 243$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine;
231$cflags.=" -DOPENSSL_NO_HW" if $no_hw; 244$cflags.=" -DOPENSSL_NO_HW" if $no_hw;
232 245$cflags.=" -DOPENSSL_FIPS" if $fips;
233$cflags.= " -DZLIB" if $zlib_opt; 246$cflags.= " -DZLIB" if $zlib_opt;
234$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2; 247$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
235 248
@@ -251,9 +264,9 @@ else
251 264
252$ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); 265$ex_libs="$l_flags$ex_libs" if ($l_flags ne "");
253 266
254
255%shlib_ex_cflags=("SSL" => " -DOPENSSL_BUILD_SHLIBSSL", 267%shlib_ex_cflags=("SSL" => " -DOPENSSL_BUILD_SHLIBSSL",
256 "CRYPTO" => " -DOPENSSL_BUILD_SHLIBCRYPTO"); 268 "CRYPTO" => " -DOPENSSL_BUILD_SHLIBCRYPTO",
269 "FIPS" => " -DOPENSSL_BUILD_SHLIBCRYPTO");
257 270
258if ($msdos) 271if ($msdos)
259 { 272 {
@@ -281,11 +294,21 @@ for (;;)
281 { 294 {
282 if ($lib ne "") 295 if ($lib ne "")
283 { 296 {
284 $uc=$lib; 297 if ($fips && $dir =~ /^fips/)
285 $uc =~ s/^lib(.*)\.a/$1/; 298 {
286 $uc =~ tr/a-z/A-Z/; 299 $uc = "FIPS";
287 $lib_nam{$uc}=$uc; 300 }
288 $lib_obj{$uc}.=$libobj." "; 301 else
302 {
303 $uc=$lib;
304 $uc =~ s/^lib(.*)\.a/$1/;
305 $uc =~ tr/a-z/A-Z/;
306 }
307 if (($uc ne "FIPS") || $fipscanisterbuild)
308 {
309 $lib_nam{$uc}=$uc;
310 $lib_obj{$uc}.=$libobj." ";
311 }
289 } 312 }
290 last if ($val eq "FINISHED"); 313 last if ($val eq "FINISHED");
291 $lib=""; 314 $lib="";
@@ -328,11 +351,130 @@ for (;;)
328 if ($key eq "LIBNAMES" && $dir eq "engines" && $no_static_engine) 351 if ($key eq "LIBNAMES" && $dir eq "engines" && $no_static_engine)
329 { $engines.=$val } 352 { $engines.=$val }
330 353
354 if ($key eq "FIPS_EX_OBJ")
355 {
356 $fips_ex_obj=&var_add("crypto",$val,0);
357 }
358
359 if ($key eq "FIPSLIBDIR")
360 {
361 $fipslibdir=$val;
362 $fipslibdir =~ s/\/$//;
363 $fipslibdir =~ s/\//$o/g;
364 }
365
366 if ($key eq "BASEADDR")
367 { $baseaddr=$val;}
368
331 if (!($_=<IN>)) 369 if (!($_=<IN>))
332 { $_="RELATIVE_DIRECTORY=FINISHED\n"; } 370 { $_="RELATIVE_DIRECTORY=FINISHED\n"; }
333 } 371 }
334close(IN); 372close(IN);
335 373
374if ($fips)
375 {
376
377 foreach (split " ", $fips_ex_obj)
378 {
379 $fips_exclude_obj{$1} = 1 if (/\/([^\/]*)$/);
380 }
381
382 $fips_exclude_obj{"cpu_win32"} = 1;
383 $fips_exclude_obj{"bn_asm"} = 1;
384 $fips_exclude_obj{"des_enc"} = 1;
385 $fips_exclude_obj{"fcrypt_b"} = 1;
386 $fips_exclude_obj{"aes_core"} = 1;
387 $fips_exclude_obj{"aes_cbc"} = 1;
388
389 my @ltmp = split " ", $lib_obj{"CRYPTO"};
390
391
392 $lib_obj{"CRYPTO"} = "";
393
394 foreach(@ltmp)
395 {
396 if (/\/([^\/]*)$/ && exists $fips_exclude_obj{$1})
397 {
398 if ($fipscanisterbuild)
399 {
400 $lib_obj{"FIPS"} .= "$_ ";
401 }
402 }
403 else
404 {
405 $lib_obj{"CRYPTO"} .= "$_ ";
406 }
407 }
408
409 }
410
411if ($fipscanisterbuild)
412 {
413 $fips_canister_path = "\$(LIB_D)${o}fipscanister.lib" if $fips_canister_path eq "";
414 $fips_premain_c_path = "\$(LIB_D)${o}fips_premain.c";
415 }
416else
417 {
418 if ($fips_canister_path eq "")
419 {
420 $fips_canister_path = "\$(FIPSLIB_D)${o}fipscanister.lib";
421 }
422
423 if ($fips_premain_c_path eq "")
424 {
425 $fips_premain_c_path = "\$(FIPSLIB_D)${o}fips_premain.c";
426 }
427 }
428
429if ($fips)
430 {
431 if ($fips_sha1_exe_path eq "")
432 {
433 $fips_sha1_exe_path =
434 "\$(BIN_D)${o}fips_standalone_sha1$exep";
435 }
436 }
437 else
438 {
439 $fips_sha1_exe_path = "";
440 }
441
442if ($fips_premain_dso_exe_path eq "")
443 {
444 $fips_premain_dso_exe_path = "\$(BIN_D)${o}fips_premain_dso$exep";
445 }
446
447# $ex_build_targets .= "\$(BIN_D)${o}\$(E_PREMAIN_DSO)$exep" if ($fips);
448
449#$ex_l_libs .= " \$(L_FIPS)" if $fipsdso;
450
451if ($fips)
452 {
453 if (!$shlib)
454 {
455 $ex_build_targets .= " \$(LIB_D)$o$crypto_compat \$(PREMAIN_DSO_EXE)";
456 $ex_l_libs .= " \$(O_FIPSCANISTER)";
457 $ex_libs_dep .= " \$(O_FIPSCANISTER)" if $fipscanisterbuild;
458 }
459 if ($fipscanisterbuild)
460 {
461 $fipslibdir = "\$(LIB_D)";
462 }
463 else
464 {
465 if ($fipslibdir eq "")
466 {
467 open (IN, "util/fipslib_path.txt") || fipslib_error();
468 $fipslibdir = <IN>;
469 chomp $fipslibdir;
470 close IN;
471 }
472 fips_check_files($fipslibdir,
473 "fipscanister.lib", "fipscanister.lib.sha1",
474 "fips_premain.c", "fips_premain.c.sha1");
475 }
476 }
477
336if ($shlib) 478if ($shlib)
337 { 479 {
338 $extra_install= <<"EOF"; 480 $extra_install= <<"EOF";
@@ -398,6 +540,7 @@ SRC_D=$src_dir
398LINK=$link 540LINK=$link
399LFLAGS=$lflags 541LFLAGS=$lflags
400RSC=$rsc 542RSC=$rsc
543FIPSLINK=\$(PERL) util${o}fipslink.pl
401 544
402AES_ASM_OBJ=$aes_asm_obj 545AES_ASM_OBJ=$aes_asm_obj
403AES_ASM_SRC=$aes_asm_src 546AES_ASM_SRC=$aes_asm_src
@@ -441,6 +584,17 @@ MKLIB=$bin_dir$mklib
441MLFLAGS=$mlflags 584MLFLAGS=$mlflags
442ASM=$bin_dir$asm 585ASM=$bin_dir$asm
443 586
587# FIPS validated module and support file locations
588
589E_PREMAIN_DSO=fips_premain_dso
590
591FIPSLIB_D=$fipslibdir
592BASEADDR=$baseaddr
593FIPS_PREMAIN_SRC=$fips_premain_c_path
594O_FIPSCANISTER=$fips_canister_path
595FIPS_SHA1_EXE=$fips_sha1_exe_path
596PREMAIN_DSO_EXE=$fips_premain_dso_exe_path
597
444###################################################### 598######################################################
445# You should not need to touch anything below this point 599# You should not need to touch anything below this point
446###################################################### 600######################################################
@@ -448,6 +602,7 @@ ASM=$bin_dir$asm
448E_EXE=openssl 602E_EXE=openssl
449SSL=$ssl 603SSL=$ssl
450CRYPTO=$crypto 604CRYPTO=$crypto
605LIBFIPS=libosslfips
451 606
452# BIN_D - Binary output directory 607# BIN_D - Binary output directory
453# TEST_D - Binary test file output directory 608# TEST_D - Binary test file output directory
@@ -468,12 +623,14 @@ INCL_D=\$(TMP_D)
468 623
469O_SSL= \$(LIB_D)$o$plib\$(SSL)$shlibp 624O_SSL= \$(LIB_D)$o$plib\$(SSL)$shlibp
470O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp 625O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp
626O_FIPS= \$(LIB_D)$o$plib\$(LIBFIPS)$shlibp
471SO_SSL= $plib\$(SSL)$so_shlibp 627SO_SSL= $plib\$(SSL)$so_shlibp
472SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp 628SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp
473L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp 629L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp
474L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp 630L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp
631L_FIPS= \$(LIB_D)$o$plib\$(LIBFIPS)$libp
475 632
476L_LIBS= \$(L_SSL) \$(L_CRYPTO) 633L_LIBS= \$(L_SSL) \$(L_CRYPTO) $ex_l_libs
477 634
478###################################################### 635######################################################
479# Don't touch anything below this point 636# Don't touch anything below this point
@@ -483,13 +640,13 @@ INC=-I\$(INC_D) -I\$(INCL_D)
483APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG) 640APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG)
484LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) 641LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG)
485SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG) 642SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG)
486LIBS_DEP=\$(O_CRYPTO) \$(O_SSL) 643LIBS_DEP=\$(O_CRYPTO) \$(O_SSL) $ex_libs_dep
487 644
488############################################# 645#############################################
489EOF 646EOF
490 647
491$rules=<<"EOF"; 648$rules=<<"EOF";
492all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers lib exe 649all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers \$(FIPS_SHA1_EXE) lib exe $ex_build_targets
493 650
494banner: 651banner:
495$banner 652$banner
@@ -604,6 +761,26 @@ $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)");
604$defs.=&do_defs("E_OBJ",$e_exe,"\$(OBJ_D)",$obj); 761$defs.=&do_defs("E_OBJ",$e_exe,"\$(OBJ_D)",$obj);
605$rules.=&do_compile_rule("\$(OBJ_D)",$e_exe,'-DMONOLITH $(APP_CFLAGS)'); 762$rules.=&do_compile_rule("\$(OBJ_D)",$e_exe,'-DMONOLITH $(APP_CFLAGS)');
606 763
764# Special case rules for fips_start and fips_end fips_premain_dso
765
766if ($fips)
767 {
768 if ($fipscanisterbuild)
769 {
770 $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_start$obj",
771 "fips${o}fips_canister.c",
772 "-DFIPS_START \$(SHLIB_CFLAGS)");
773 $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_end$obj",
774 "fips${o}fips_canister.c", "\$(SHLIB_CFLAGS)");
775 }
776 $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_standalone_sha1$obj",
777 "fips${o}sha${o}fips_standalone_sha1.c",
778 "\$(SHLIB_CFLAGS)");
779 $rules.=&cc_compile_target("\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj",
780 "fips${o}fips_premain.c",
781 "-DFINGERPRINT_PREMAIN_DSO_LOAD \$(SHLIB_CFLAGS)");
782 }
783
607foreach (values %lib_nam) 784foreach (values %lib_nam)
608 { 785 {
609 $lib_obj=$lib_obj{$_}; 786 $lib_obj=$lib_obj{$_};
@@ -614,27 +791,41 @@ foreach (values %lib_nam)
614 $rules.="\$(O_SSL):\n\n"; 791 $rules.="\$(O_SSL):\n\n";
615 next; 792 next;
616 } 793 }
617 if (($aes_asm_obj ne "") && ($_ eq "CRYPTO")) 794
618 { 795 if ((!$fips && ($_ eq "CRYPTO")) || ($fips && ($_ eq "FIPS")))
619 $lib_obj =~ s/\s(\S*\/aes_core\S*)/ \$(AES_ASM_OBJ)/;
620 $lib_obj =~ s/\s\S*\/aes_cbc\S*//;
621 $rules.=&do_asm_rule($aes_asm_obj,$aes_asm_src);
622 }
623 if (($bn_asm_obj ne "") && ($_ eq "CRYPTO"))
624 {
625 $lib_obj =~ s/\s\S*\/bn_asm\S*/ \$(BN_ASM_OBJ)/;
626 $rules.=&do_asm_rule($bn_asm_obj,$bn_asm_src);
627 }
628 if (($bnco_asm_obj ne "") && ($_ eq "CRYPTO"))
629 {
630 $lib_obj .= "\$(BNCO_ASM_OBJ)";
631 $rules.=&do_asm_rule($bnco_asm_obj,$bnco_asm_src);
632 }
633 if (($des_enc_obj ne "") && ($_ eq "CRYPTO"))
634 { 796 {
635 $lib_obj =~ s/\s\S*des_enc\S*/ \$(DES_ENC_OBJ)/; 797 if ($cpuid_asm_obj ne "")
636 $lib_obj =~ s/\s\S*\/fcrypt_b\S*\s*/ /; 798 {
637 $rules.=&do_asm_rule($des_enc_obj,$des_enc_src); 799 $lib_obj =~ s/(\S*\/cryptlib\S*)/$1 \$(CPUID_ASM_OBJ)/;
800 $rules.=&do_asm_rule($cpuid_asm_obj,$cpuid_asm_src);
801 }
802 if ($aes_asm_obj ne "")
803 {
804 $lib_obj =~ s/\s(\S*\/aes_core\S*)/ \$(AES_ASM_OBJ)/;
805 $lib_obj =~ s/\s\S*\/aes_cbc\S*//;
806 $rules.=&do_asm_rule($aes_asm_obj,$aes_asm_src);
807 }
808 if ($sha1_asm_obj ne "")
809 {
810 $lib_obj =~ s/\s(\S*\/sha1dgst\S*)/ $1 \$(SHA1_ASM_OBJ)/;
811 $rules.=&do_asm_rule($sha1_asm_obj,$sha1_asm_src);
812 }
813 if ($bn_asm_obj ne "")
814 {
815 $lib_obj =~ s/\s\S*\/bn_asm\S*/ \$(BN_ASM_OBJ)/;
816 $rules.=&do_asm_rule($bn_asm_obj,$bn_asm_src);
817 }
818 if ($bnco_asm_obj ne "")
819 {
820 $lib_obj .= "\$(BNCO_ASM_OBJ)";
821 $rules.=&do_asm_rule($bnco_asm_obj,$bnco_asm_src);
822 }
823 if ($des_enc_obj ne "")
824 {
825 $lib_obj =~ s/\s\S*des_enc\S*/ \$(DES_ENC_OBJ)/;
826 $lib_obj =~ s/\s\S*\/fcrypt_b\S*\s*/ /;
827 $rules.=&do_asm_rule($des_enc_obj,$des_enc_src);
828 }
638 } 829 }
639 if (($bf_enc_obj ne "") && ($_ eq "CRYPTO")) 830 if (($bf_enc_obj ne "") && ($_ eq "CRYPTO"))
640 { 831 {
@@ -661,21 +852,11 @@ foreach (values %lib_nam)
661 $lib_obj =~ s/\s(\S*\/md5_dgst\S*)/ $1 \$(MD5_ASM_OBJ)/; 852 $lib_obj =~ s/\s(\S*\/md5_dgst\S*)/ $1 \$(MD5_ASM_OBJ)/;
662 $rules.=&do_asm_rule($md5_asm_obj,$md5_asm_src); 853 $rules.=&do_asm_rule($md5_asm_obj,$md5_asm_src);
663 } 854 }
664 if (($sha1_asm_obj ne "") && ($_ eq "CRYPTO"))
665 {
666 $lib_obj =~ s/\s(\S*\/sha1dgst\S*)/ $1 \$(SHA1_ASM_OBJ)/;
667 $rules.=&do_asm_rule($sha1_asm_obj,$sha1_asm_src);
668 }
669 if (($rmd160_asm_obj ne "") && ($_ eq "CRYPTO")) 855 if (($rmd160_asm_obj ne "") && ($_ eq "CRYPTO"))
670 { 856 {
671 $lib_obj =~ s/\s(\S*\/rmd_dgst\S*)/ $1 \$(RMD160_ASM_OBJ)/; 857 $lib_obj =~ s/\s(\S*\/rmd_dgst\S*)/ $1 \$(RMD160_ASM_OBJ)/;
672 $rules.=&do_asm_rule($rmd160_asm_obj,$rmd160_asm_src); 858 $rules.=&do_asm_rule($rmd160_asm_obj,$rmd160_asm_src);
673 } 859 }
674 if (($cpuid_asm_obj ne "") && ($_ eq "CRYPTO"))
675 {
676 $lib_obj =~ s/\s(\S*\/cversion\S*)/ $1 \$(CPUID_ASM_OBJ)/;
677 $rules.=&do_asm_rule($cpuid_asm_obj,$cpuid_asm_src);
678 }
679 $defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj); 860 $defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj);
680 $lib=($slib)?" \$(SHLIB_CFLAGS)".$shlib_ex_cflags{$_}:" \$(LIB_CFLAGS)"; 861 $lib=($slib)?" \$(SHLIB_CFLAGS)".$shlib_ex_cflags{$_}:" \$(LIB_CFLAGS)";
681 $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib); 862 $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib);
@@ -690,15 +871,43 @@ if (($platform eq "VC-WIN32") || ($platform eq "VC-NT")) {
690\$(OBJ_D)\\\$(SSL).res: ms\\version32.rc 871\$(OBJ_D)\\\$(SSL).res: ms\\version32.rc
691 \$(RSC) /fo"\$(OBJ_D)\\\$(SSL).res" /d SSL ms\\version32.rc 872 \$(RSC) /fo"\$(OBJ_D)\\\$(SSL).res" /d SSL ms\\version32.rc
692 873
874\$(OBJ_D)\\\$(LIBFIPS).res: ms\\version32.rc
875 \$(RSC) /fo"\$(OBJ_D)\\\$(LIBFIPS).res" /d FIPS ms\\version32.rc
876
693EOF 877EOF
694} 878}
695 879
696$defs.=&do_defs("T_EXE",$test,"\$(TEST_D)",$exep); 880$defs.=&do_defs("T_EXE",$test,"\$(TEST_D)",$exep);
697foreach (split(/\s+/,$test)) 881foreach (split(/\s+/,$test))
698 { 882 {
883 my $t_libs;
699 $t=&bname($_); 884 $t=&bname($_);
885 my $ltype;
886 # Check to see if test program is FIPS
887 if ($fips && /fips/)
888 {
889 # If fipsdso link to libosslfips.dll
890 # otherwise perform static link to
891 # $(O_FIPSCANISTER)
892 if ($fipsdso)
893 {
894 $t_libs = "\$(L_FIPS)";
895 $ltype = 0;
896 }
897 else
898 {
899 $t_libs = "\$(O_FIPSCANISTER)";
900 $ltype = 2;
901 }
902 }
903 else
904 {
905 $t_libs = "\$(L_LIBS)";
906 $ltype = 0;
907 }
908
700 $tt="\$(OBJ_D)${o}$t${obj}"; 909 $tt="\$(OBJ_D)${o}$t${obj}";
701 $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); 910 $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","$t_libs \$(EX_LIBS)", $ltype);
702 } 911 }
703 912
704$defs.=&do_defs("E_SHLIB",$engines,"\$(ENG_D)",$shlibp); 913$defs.=&do_defs("E_SHLIB",$engines,"\$(ENG_D)",$shlibp);
@@ -712,9 +921,69 @@ foreach (split(/\s+/,$engines))
712 921
713 922
714$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); 923$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)");
715$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)");
716 924
717$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); 925if ($fips)
926 {
927 if ($shlib)
928 {
929 if ($fipsdso)
930 {
931 $rules.= &do_lib_rule("\$(CRYPTOOBJ)",
932 "\$(O_CRYPTO)", "$crypto",
933 $shlib, "", "");
934 $rules.= &do_lib_rule(
935 "\$(O_FIPSCANISTER)",
936 "\$(O_FIPS)", "\$(LIBFIPS)",
937 $shlib, "\$(SO_CRYPTO)", "\$(BASEADDR)");
938 $rules.= &do_sdef_rule();
939 }
940 else
941 {
942 $rules.= &do_lib_rule(
943 "\$(CRYPTOOBJ) \$(O_FIPSCANISTER)",
944 "\$(O_CRYPTO)", "$crypto",
945 $shlib, "\$(SO_CRYPTO)", "\$(BASEADDR)");
946 }
947 }
948 else
949 {
950 $rules.= &do_lib_rule("\$(CRYPTOOBJ)",
951 "\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)", "");
952 $rules.= &do_lib_rule("\$(CRYPTOOBJ) \$(FIPSOBJ)",
953 "\$(LIB_D)$o$crypto_compat",$crypto,$shlib,"\$(SO_CRYPTO)", "");
954 }
955 }
956 else
957 {
958 $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,
959 "\$(SO_CRYPTO)");
960 }
961
962if ($fips)
963 {
964 if ($fipscanisterbuild)
965 {
966 $rules.= &do_rlink_rule("\$(O_FIPSCANISTER)",
967 "\$(OBJ_D)${o}fips_start$obj",
968 "\$(FIPSOBJ)",
969 "\$(OBJ_D)${o}fips_end$obj",
970 "\$(FIPS_SHA1_EXE)", "");
971 $rules.=&do_link_rule("\$(FIPS_SHA1_EXE)",
972 "\$(OBJ_D)${o}fips_standalone_sha1$obj \$(OBJ_D)${o}sha1dgst$obj \$(SHA1_ASM_OBJ)",
973 "","\$(EX_LIBS)", 1);
974 }
975 else
976 {
977 $rules.=&do_link_rule("\$(FIPS_SHA1_EXE)",
978 "\$(OBJ_D)${o}fips_standalone_sha1$obj \$(O_FIPSCANISTER)",
979 "","", 1);
980
981 }
982 $rules.=&do_link_rule("\$(PREMAIN_DSO_EXE)","\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj \$(CRYPTOOBJ) \$(O_FIPSCANISTER)","","\$(EX_LIBS)", 1);
983
984 }
985
986$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)", ($fips && !$shlib) ? 2 : 0);
718 987
719print $defs; 988print $defs;
720 989
@@ -752,6 +1021,8 @@ sub var_add
752 return("") if $no_dh && $dir =~ /\/dh/; 1021 return("") if $no_dh && $dir =~ /\/dh/;
753 return("") if $no_ec && $dir =~ /\/ec/; 1022 return("") if $no_ec && $dir =~ /\/ec/;
754 return("") if $no_cms && $dir =~ /\/cms/; 1023 return("") if $no_cms && $dir =~ /\/cms/;
1024 return("") if $no_jpake && $dir =~ /\/jpake/;
1025 return("") if !$fips && $dir =~ /^fips/;
755 if ($no_des && $dir =~ /\/des/) 1026 if ($no_des && $dir =~ /\/des/)
756 { 1027 {
757 if ($val =~ /read_pwd/) 1028 if ($val =~ /read_pwd/)
@@ -1011,6 +1282,7 @@ sub read_options
1011 "no-hmac" => \$no_hmac, 1282 "no-hmac" => \$no_hmac,
1012 "no-asm" => \$no_asm, 1283 "no-asm" => \$no_asm,
1013 "nasm" => \$nasm, 1284 "nasm" => \$nasm,
1285 "ml64" => \$ml64,
1014 "nw-nasm" => \$nw_nasm, 1286 "nw-nasm" => \$nw_nasm,
1015 "nw-mwasm" => \$nw_mwasm, 1287 "nw-mwasm" => \$nw_mwasm,
1016 "gaswin" => \$gaswin, 1288 "gaswin" => \$gaswin,
@@ -1018,6 +1290,7 @@ sub read_options
1018 "no-ssl3" => \$no_ssl3, 1290 "no-ssl3" => \$no_ssl3,
1019 "no-tlsext" => \$no_tlsext, 1291 "no-tlsext" => \$no_tlsext,
1020 "no-cms" => \$no_cms, 1292 "no-cms" => \$no_cms,
1293 "no-jpake" => \$no_jpake,
1021 "no-capieng" => \$no_capieng, 1294 "no-capieng" => \$no_capieng,
1022 "no-err" => \$no_err, 1295 "no-err" => \$no_err,
1023 "no-sock" => \$no_sock, 1296 "no-sock" => \$no_sock,
@@ -1045,6 +1318,9 @@ sub read_options
1045 "no-shared" => 0, 1318 "no-shared" => 0,
1046 "no-zlib" => 0, 1319 "no-zlib" => 0,
1047 "no-zlib-dynamic" => 0, 1320 "no-zlib-dynamic" => 0,
1321 "fips" => \$fips,
1322 "fipscanisterbuild" => [\$fips, \$fipscanisterbuild],
1323 "fipsdso" => [\$fips, \$fipscanisterbuild, \$fipsdso],
1048 ); 1324 );
1049 1325
1050 if (exists $valid_options{$_}) 1326 if (exists $valid_options{$_})
@@ -1086,6 +1362,18 @@ sub read_options
1086 {return 1;} 1362 {return 1;}
1087 return 0; 1363 return 0;
1088 } 1364 }
1365 # experimental-xxx is mostly like enable-xxx, but opensslconf.v
1366 # will still set OPENSSL_NO_xxx unless we set OPENSSL_EXPERIMENTAL_xxx.
1367 # (No need to fail if we don't know the algorithm -- this is for adventurous users only.)
1368 elsif (/^experimental-/)
1369 {
1370 my $algo, $ALGO;
1371 ($algo = $_) =~ s/^experimental-//;
1372 ($ALGO = $algo) =~ tr/[a-z]/[A-Z]/;
1373
1374 $xcflags="-DOPENSSL_EXPERIMENTAL_$ALGO $xcflags";
1375
1376 }
1089 elsif (/^--with-krb5-flavor=(.*)$/) 1377 elsif (/^--with-krb5-flavor=(.*)$/)
1090 { 1378 {
1091 my $krb5_flavor = $1; 1379 my $krb5_flavor = $1;
@@ -1109,3 +1397,31 @@ sub read_options
1109 else { return(0); } 1397 else { return(0); }
1110 return(1); 1398 return(1);
1111 } 1399 }
1400
1401sub fipslib_error
1402 {
1403 print STDERR "***FIPS module directory sanity check failed***\n";
1404 print STDERR "FIPS module build failed, or was deleted\n";
1405 print STDERR "Please rebuild FIPS module.\n";
1406 exit 1;
1407 }
1408
1409sub fips_check_files
1410 {
1411 my $dir = shift @_;
1412 my $ret = 1;
1413 if (!-d $dir)
1414 {
1415 print STDERR "FIPS module directory $dir does not exist\n";
1416 fipslib_error();
1417 }
1418 foreach (@_)
1419 {
1420 if (!-f "$dir${o}$_")
1421 {
1422 print STDERR "FIPS module file $_ does not exist!\n";
1423 $ret = 0;
1424 }
1425 }
1426 fipslib_error() if ($ret == 0);
1427 }
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl
index 8ecfde1848..5ae9ebb619 100644
--- a/src/lib/libcrypto/util/mkdef.pl
+++ b/src/lib/libcrypto/util/mkdef.pl
@@ -79,7 +79,7 @@ my $OS2=0;
79my $safe_stack_def = 0; 79my $safe_stack_def = 0;
80 80
81my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", 81my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
82 "EXPORT_VAR_AS_FUNCTION", "ZLIB" ); 82 "EXPORT_VAR_AS_FUNCTION", "ZLIB", "OPENSSL_FIPS");
83my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); 83my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" );
84my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", 84my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
85 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", 85 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
@@ -102,6 +102,8 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
102 "CMS", 102 "CMS",
103 # CryptoAPI Engine 103 # CryptoAPI Engine
104 "CAPIENG", 104 "CAPIENG",
105 # JPAKE
106 "JPAKE",
105 # Deprecated functions 107 # Deprecated functions
106 "DEPRECATED" ); 108 "DEPRECATED" );
107 109
@@ -122,7 +124,8 @@ my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5;
122my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; my $no_camellia; 124my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; my $no_camellia;
123my $no_seed; 125my $no_seed;
124my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated; 126my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated;
125my $no_rfc3779; my $no_tlsext; my $no_cms; my $no_capieng; 127my $no_rfc3779; my $no_tlsext; my $no_cms; my $no_capieng; my $no_jpake;
128my $fips;
126 129
127 130
128foreach (@ARGV, split(/ /, $options)) 131foreach (@ARGV, split(/ /, $options))
@@ -144,12 +147,13 @@ foreach (@ARGV, split(/ /, $options))
144 } 147 }
145 $VMS=1 if $_ eq "VMS"; 148 $VMS=1 if $_ eq "VMS";
146 $OS2=1 if $_ eq "OS2"; 149 $OS2=1 if $_ eq "OS2";
150 $fips=1 if /^fips/;
151
147 if ($_ eq "zlib" || $_ eq "zlib-dynamic" 152 if ($_ eq "zlib" || $_ eq "zlib-dynamic"
148 || $_ eq "enable-zlib-dynamic") { 153 || $_ eq "enable-zlib-dynamic") {
149 $zlib = 1; 154 $zlib = 1;
150 } 155 }
151 156
152
153 $do_ssl=1 if $_ eq "ssleay"; 157 $do_ssl=1 if $_ eq "ssleay";
154 if ($_ eq "ssl") { 158 if ($_ eq "ssl") {
155 $do_ssl=1; 159 $do_ssl=1;
@@ -209,6 +213,7 @@ foreach (@ARGV, split(/ /, $options))
209 elsif (/^no-tlsext$/) { $no_tlsext=1; } 213 elsif (/^no-tlsext$/) { $no_tlsext=1; }
210 elsif (/^no-cms$/) { $no_cms=1; } 214 elsif (/^no-cms$/) { $no_cms=1; }
211 elsif (/^no-capieng$/) { $no_capieng=1; } 215 elsif (/^no-capieng$/) { $no_capieng=1; }
216 elsif (/^no-jpake$/) { $no_jpake=1; }
212 } 217 }
213 218
214 219
@@ -305,6 +310,8 @@ $crypto.=" crypto/tmdiff.h";
305$crypto.=" crypto/store/store.h"; 310$crypto.=" crypto/store/store.h";
306$crypto.=" crypto/pqueue/pqueue.h"; 311$crypto.=" crypto/pqueue/pqueue.h";
307$crypto.=" crypto/cms/cms.h"; 312$crypto.=" crypto/cms/cms.h";
313$crypto.=" crypto/jpake/jpake.h";
314$crypto.=" fips/fips.h fips/rand/fips_rand.h";
308 315
309my $symhacks="crypto/symhacks.h"; 316my $symhacks="crypto/symhacks.h";
310 317
@@ -1090,6 +1097,9 @@ sub is_valid
1090 if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { 1097 if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) {
1091 return 1; 1098 return 1;
1092 } 1099 }
1100 if ($keyword eq "OPENSSL_FIPS" && $fips) {
1101 return 1;
1102 }
1093 if ($keyword eq "ZLIB" && $zlib) { return 1; } 1103 if ($keyword eq "ZLIB" && $zlib) { return 1; }
1094 return 0; 1104 return 0;
1095 } else { 1105 } else {
@@ -1135,6 +1145,7 @@ sub is_valid
1135 if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } 1145 if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; }
1136 if ($keyword eq "CMS" && $no_cms) { return 0; } 1146 if ($keyword eq "CMS" && $no_cms) { return 0; }
1137 if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } 1147 if ($keyword eq "CAPIENG" && $no_capieng) { return 0; }
1148 if ($keyword eq "JPAKE" && $no_jpake) { return 0; }
1138 if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; } 1149 if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; }
1139 1150
1140 # Nothing recognise as true 1151 # Nothing recognise as true
diff --git a/src/lib/libcrypto/util/mkerr.pl b/src/lib/libcrypto/util/mkerr.pl
index 53e14ab4df..554bebb159 100644
--- a/src/lib/libcrypto/util/mkerr.pl
+++ b/src/lib/libcrypto/util/mkerr.pl
@@ -44,7 +44,8 @@ while (@ARGV) {
44} 44}
45 45
46if($recurse) { 46if($recurse) {
47 @source = (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>); 47 @source = ( <crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>,
48 <fips/*.c>, <fips/*/*.c>);
48} else { 49} else {
49 @source = @ARGV; 50 @source = @ARGV;
50} 51}
diff --git a/src/lib/libcrypto/util/mkfiles.pl b/src/lib/libcrypto/util/mkfiles.pl
index 1282392fea..67fb8694c8 100644
--- a/src/lib/libcrypto/util/mkfiles.pl
+++ b/src/lib/libcrypto/util/mkfiles.pl
@@ -47,6 +47,7 @@ my @dirs = (
47"crypto/x509", 47"crypto/x509",
48"crypto/x509v3", 48"crypto/x509v3",
49"crypto/conf", 49"crypto/conf",
50"crypto/jpake",
50"crypto/txt_db", 51"crypto/txt_db",
51"crypto/pkcs7", 52"crypto/pkcs7",
52"crypto/pkcs12", 53"crypto/pkcs12",
@@ -58,6 +59,15 @@ my @dirs = (
58"crypto/store", 59"crypto/store",
59"crypto/pqueue", 60"crypto/pqueue",
60"crypto/cms", 61"crypto/cms",
62"fips",
63"fips/aes",
64"fips/des",
65"fips/dsa",
66"fips/dh",
67"fips/hmac",
68"fips/rand",
69"fips/rsa",
70"fips/sha",
61"ssl", 71"ssl",
62"apps", 72"apps",
63"engines", 73"engines",
diff --git a/src/lib/libcrypto/util/mklink.pl b/src/lib/libcrypto/util/mklink.pl
index d9bc98aab8..eacc327882 100644
--- a/src/lib/libcrypto/util/mklink.pl
+++ b/src/lib/libcrypto/util/mklink.pl
@@ -15,13 +15,21 @@
15# Apart from this, this script should be able to handle even the most 15# Apart from this, this script should be able to handle even the most
16# pathological cases. 16# pathological cases.
17 17
18use Cwd; 18my $pwd;
19eval 'use Cwd;';
20if ($@)
21 {
22 $pwd = `pwd`;
23 }
24else
25 {
26 $pwd = getcwd();
27 }
19 28
20my $from = shift; 29my $from = shift;
21my @files = @ARGV; 30my @files = @ARGV;
22 31
23my @from_path = split(/[\\\/]/, $from); 32my @from_path = split(/[\\\/]/, $from);
24my $pwd = getcwd();
25chomp($pwd); 33chomp($pwd);
26my @pwd_path = split(/[\\\/]/, $pwd); 34my @pwd_path = split(/[\\\/]/, $pwd);
27 35
diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl
index 1e254119e6..166785db8d 100644
--- a/src/lib/libcrypto/util/pl/VC-32.pl
+++ b/src/lib/libcrypto/util/pl/VC-32.pl
@@ -4,12 +4,26 @@
4# 4#
5 5
6$ssl= "ssleay32"; 6$ssl= "ssleay32";
7$crypto="libeay32"; 7
8if ($fips && !$shlib)
9 {
10 $crypto="libeayfips32";
11 $crypto_compat = "libeaycompat32.lib";
12 }
13else
14 {
15 $crypto="libeay32";
16 }
17
18if ($fipscanisterbuild)
19 {
20 $fips_canister_path = "\$(LIB_D)\\fipscanister.lib";
21 }
8 22
9$o='\\'; 23$o='\\';
10$cp='$(PERL) util/copy.pl'; 24$cp='$(PERL) util/copy.pl';
11$mkdir='$(PERL) util/mkdir-p.pl'; 25$mkdir='$(PERL) util/mkdir-p.pl';
12$rm='del'; 26$rm='del /Q';
13 27
14$zlib_lib="zlib1.lib"; 28$zlib_lib="zlib1.lib";
15 29
@@ -96,7 +110,7 @@ else # Win32
96 $base_cflags=' /W3 /WX /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32'; 110 $base_cflags=' /W3 /WX /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32';
97 $base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE'; # shut up VC8 111 $base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE'; # shut up VC8
98 $base_cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE'; # shut up VC8 112 $base_cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE'; # shut up VC8
99 my $f = $shlib?' /MD':' /MT'; 113 my $f = $shlib || $fips ?' /MD':' /MT';
100 $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib 114 $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
101 $opt_cflags=$f.' /Ox /O2 /Ob2'; 115 $opt_cflags=$f.' /Ox /O2 /Ob2';
102 $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; 116 $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
@@ -165,12 +179,17 @@ if ($nasm) {
165 # pick newest version 179 # pick newest version
166 $asm=($ver gt $vew?"nasm":"nasmw")." -f win32"; 180 $asm=($ver gt $vew?"nasm":"nasmw")." -f win32";
167 $afile='-o '; 181 $afile='-o ';
182} elsif ($ml64) {
183 $asm='ml64 /c /Cp /Cx';
184 $asm.=' /Zi' if $debug;
185 $afile='/Fo';
168} else { 186} else {
169 $asm='ml /Cp /coff /c /Cx'; 187 $asm='ml /Cp /coff /c /Cx';
170 $asm.=" /Zi" if $debug; 188 $asm.=" /Zi" if $debug;
171 $afile='/Fo'; 189 $afile='/Fo';
172} 190}
173 191
192$aes_asm_obj='';
174$bn_asm_obj=''; 193$bn_asm_obj='';
175$bn_asm_src=''; 194$bn_asm_src='';
176$des_enc_obj=''; 195$des_enc_obj='';
@@ -179,11 +198,13 @@ $bf_enc_obj='';
179$bf_enc_src=''; 198$bf_enc_src='';
180 199
181if (!$no_asm) 200if (!$no_asm)
201 {
202 if ($FLAVOR =~ "WIN32")
182 { 203 {
183 $aes_asm_obj='crypto\aes\asm\a_win32.obj'; 204 $aes_asm_obj='crypto\aes\asm\a_win32.obj';
184 $aes_asm_src='crypto\aes\asm\a_win32.asm'; 205 $aes_asm_src='crypto\aes\asm\a_win32.asm';
185 $bn_asm_obj='crypto\bn\asm\bn_win32.obj'; 206 $bn_asm_obj='crypto\bn\asm\bn_win32.obj crypto\bn\asm\mt_win32.obj';
186 $bn_asm_src='crypto\bn\asm\bn_win32.asm'; 207 $bn_asm_src='crypto\bn\asm\bn_win32.asm crypto\bn\asm\mt_win32.asm';
187 $bnco_asm_obj='crypto\bn\asm\co_win32.obj'; 208 $bnco_asm_obj='crypto\bn\asm\co_win32.obj';
188 $bnco_asm_src='crypto\bn\asm\co_win32.asm'; 209 $bnco_asm_src='crypto\bn\asm\co_win32.asm';
189 $des_enc_obj='crypto\des\asm\d_win32.obj crypto\des\asm\y_win32.obj'; 210 $des_enc_obj='crypto\des\asm\d_win32.obj crypto\des\asm\y_win32.obj';
@@ -204,12 +225,26 @@ if (!$no_asm)
204 $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm'; 225 $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm';
205 $cpuid_asm_obj='crypto\cpu_win32.obj'; 226 $cpuid_asm_obj='crypto\cpu_win32.obj';
206 $cpuid_asm_src='crypto\cpu_win32.asm'; 227 $cpuid_asm_src='crypto\cpu_win32.asm';
207 $cflags.=" -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; 228 $cflags.=" -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DMD5_ASM -DSHA1_ASM -DRMD160_ASM";
208 } 229 }
230 elsif ($FLAVOR =~ "WIN64A")
231 {
232 $aes_asm_obj='$(OBJ_D)\aes-x86_64.obj';
233 $aes_asm_src='crypto\aes\asm\aes-x86_64.asm';
234 $bn_asm_obj='$(OBJ_D)\x86_64-mont.obj $(OBJ_D)\bn_asm.obj';
235 $bn_asm_src='crypto\bn\asm\x86_64-mont.asm';
236 $sha1_asm_obj='$(OBJ_D)\sha1-x86_64.obj $(OBJ_D)\sha256-x86_64.obj $(OBJ_D)\sha512-x86_64.obj';
237 $sha1_asm_src='crypto\sha\asm\sha1-x86_64.asm crypto\sha\asm\sha256-x86_64.asm crypto\sha\asm\sha512-x86_64.asm';
238 $cpuid_asm_obj='$(OBJ_D)\cpuid-x86_64.obj';
239 $cpuid_asm_src='crypto\cpuid-x86_64.asm';
240 $cflags.=" -DOPENSSL_CPUID_OBJ -DAES_ASM -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM";
241 }
242 }
209 243
210if ($shlib && $FLAVOR !~ /CE/) 244if ($shlib && $FLAVOR !~ /CE/)
211 { 245 {
212 $mlflags.=" $lflags /dll"; 246 $mlflags.=" $lflags /dll";
247# $cflags =~ s| /MD| /MT|;
213 $lib_cflag=" -D_WINDLL"; 248 $lib_cflag=" -D_WINDLL";
214 $out_def="out32dll"; 249 $out_def="out32dll";
215 $tmp_def="tmp32dll"; 250 $tmp_def="tmp32dll";
@@ -232,8 +267,8 @@ $(INCO_D)\applink.c: ms\applink.c
232EXHEADER= $(EXHEADER) $(INCO_D)\applink.c 267EXHEADER= $(EXHEADER) $(INCO_D)\applink.c
233 268
234LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj 269LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj
235CRYPTOOBJ=$(OBJ_D)\uplink.obj $(CRYPTOOBJ)
236___ 270___
271$banner .= "CRYPTOOBJ=\$(OBJ_D)\\uplink.obj \$(CRYPTOOBJ)\n";
237 $banner.=<<'___' if ($FLAVOR =~ /WIN64/); 272 $banner.=<<'___' if ($FLAVOR =~ /WIN64/);
238CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ) 273CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ)
239___ 274___
@@ -250,26 +285,56 @@ $cflags.=" /Fd$out_def";
250 285
251sub do_lib_rule 286sub do_lib_rule
252 { 287 {
253 local($objs,$target,$name,$shlib)=@_; 288 my($objs,$target,$name,$shlib,$ign,$base_addr) = @_;
254 local($ret); 289 local($ret);
255 290
256 $taget =~ s/\//$o/g if $o ne '/'; 291 $taget =~ s/\//$o/g if $o ne '/';
257 if ($name ne "") 292 my $base_arg;
293 if ($base_addr ne "")
294 {
295 $base_arg= " /base:$base_addr";
296 }
297 else
298 {
299 $base_arg = "";
300 }
301 if ($target =~ /O_CRYPTO/ && $fipsdso)
302 {
303 $name = "/def:ms/libeayfips.def";
304 }
305 elsif ($name ne "")
258 { 306 {
259 $name =~ tr/a-z/A-Z/; 307 $name =~ tr/a-z/A-Z/;
260 $name = "/def:ms/${name}.def"; 308 $name = "/def:ms/${name}.def";
261 } 309 }
262# $target="\$(LIB_D)$o$target"; 310# $target="\$(LIB_D)$o$target";
263 $ret.="$target: $objs\n"; 311# $ret.="$target: $objs\n";
264 if (!$shlib) 312 if (!$shlib)
265 { 313 {
266# $ret.="\t\$(RM) \$(O_$Name)\n"; 314# $ret.="\t\$(RM) \$(O_$Name)\n";
267 $ex =' '; 315 $ex =' ';
316 $ret.="$target: $objs\n";
268 $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs $ex\n<<\n"; 317 $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs $ex\n<<\n";
269 } 318 }
270 else 319 else
271 { 320 {
272 local($ex)=($target =~ /O_CRYPTO/)?'':' $(L_CRYPTO)'; 321 my $ex = "";
322 if ($target =~ /O_SSL/)
323 {
324 $ex .= " \$(L_CRYPTO)";
325 #$ex .= " \$(L_FIPS)" if $fipsdso;
326 }
327 my $fipstarget;
328 if ($fipsdso)
329 {
330 $fipstarget = "O_FIPS";
331 }
332 else
333 {
334 $fipstarget = "O_CRYPTO";
335 }
336
337
273 if ($name eq "") 338 if ($name eq "")
274 { 339 {
275 $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/); 340 $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
@@ -290,7 +355,39 @@ sub do_lib_rule
290 $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/); 355 $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
291 } 356 }
292 $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/; 357 $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/;
293 $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; 358
359 if ($fips && $target =~ /$fipstarget/)
360 {
361 $ex.= $mwex unless $fipscanisterbuild;
362 $ret.="$target: $objs \$(PREMAIN_DSO_EXE)";
363 if ($fipsdso)
364 {
365 $ex.=" \$(OBJ_D)\\\$(LIBFIPS).res";
366 $ret.=" \$(OBJ_D)\\\$(LIBFIPS).res";
367 $ret.=" ms/\$(LIBFIPS).def";
368 }
369 $ret.="\n\tSET FIPS_LINK=\$(LINK)\n";
370 $ret.="\tSET FIPS_CC=\$(CC)\n";
371 $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
372 $ret.="\tSET PREMAIN_DSO_EXE=\$(PREMAIN_DSO_EXE)\n";
373 $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
374 $ret.="\tSET FIPS_TARGET=$target\n";
375 $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
376 $ret.="\t\$(FIPSLINK) \$(MLFLAGS) /map $base_arg $efile$target ";
377 $ret.="$name @<<\n \$(SHLIB_EX_OBJ) $objs ";
378 $ret.="\$(OBJ_D)${o}fips_premain.obj $ex\n<<\n";
379 }
380 else
381 {
382 $ret.="$target: $objs";
383 if ($target =~ /O_CRYPTO/ && $fipsdso)
384 {
385 $ret .= " \$(O_FIPS)";
386 $ex .= " \$(L_FIPS)";
387 }
388 $ret.="\n\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
389 }
390
294 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;2\n\n"; 391 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;2\n\n";
295 } 392 }
296 $ret.="\n"; 393 $ret.="\n";
@@ -299,16 +396,64 @@ sub do_lib_rule
299 396
300sub do_link_rule 397sub do_link_rule
301 { 398 {
302 local($target,$files,$dep_libs,$libs)=@_; 399 my($target,$files,$dep_libs,$libs,$standalone)=@_;
303 local($ret,$_); 400 local($ret,$_);
304
305 $file =~ s/\//$o/g if $o ne '/'; 401 $file =~ s/\//$o/g if $o ne '/';
306 $n=&bname($targer); 402 $n=&bname($targer);
307 $ret.="$target: $files $dep_libs\n"; 403 $ret.="$target: $files $dep_libs\n";
308 $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n"; 404 if ($standalone == 1)
309 $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; 405 {
310 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;1\n\n"; 406 $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n\t";
407 $ret.= "$mwex advapi32.lib " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild);
408 $ret.="$files $libs\n<<\n";
409 }
410 elsif ($standalone == 2)
411 {
412 $ret.="\tSET FIPS_LINK=\$(LINK)\n";
413 $ret.="\tSET FIPS_CC=\$(CC)\n";
414 $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
415 $ret.="\tSET PREMAIN_DSO_EXE=\n";
416 $ret.="\tSET FIPS_TARGET=$target\n";
417 $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
418 $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
419 $ret.="\t\$(FIPSLINK) \$(LFLAGS) /map $efile$target @<<\n";
420 $ret.="\t\$(APP_EX_OBJ) $files \$(OBJ_D)${o}fips_premain.obj $libs\n<<\n";
421 }
422 else
423 {
424 $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n";
425 $ret.="\t\$(APP_EX_OBJ) $files $libs\n<<\n";
426 }
427 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;1\n\n";
311 return($ret); 428 return($ret);
312 } 429 }
313 430
431sub do_rlink_rule
432 {
433 local($target,$rl_start, $rl_mid, $rl_end,$dep_libs,$libs)=@_;
434 local($ret,$_);
435 my $files = "$rl_start $rl_mid $rl_end";
436
437 $file =~ s/\//$o/g if $o ne '/';
438 $n=&bname($targer);
439 $ret.="$target: $files $dep_libs \$(FIPS_SHA1_EXE)\n";
440 $ret.="\t\$(PERL) ms\\segrenam.pl \$\$a $rl_start\n";
441 $ret.="\t\$(PERL) ms\\segrenam.pl \$\$b $rl_mid\n";
442 $ret.="\t\$(PERL) ms\\segrenam.pl \$\$c $rl_end\n";
443 $ret.="\t\$(MKLIB) $lfile$target @<<\n\t$files\n<<\n";
444 $ret.="\t\$(FIPS_SHA1_EXE) $target > ${target}.sha1\n";
445 $ret.="\t\$(PERL) util${o}copy.pl -stripcr fips${o}fips_premain.c \$(LIB_D)${o}fips_premain.c\n";
446 $ret.="\t\$(CP) fips${o}fips_premain.c.sha1 \$(LIB_D)${o}fips_premain.c.sha1\n";
447 $ret.="\n";
448 return($ret);
449 }
450
451sub do_sdef_rule
452 {
453 my $ret = "ms/\$(LIBFIPS).def: \$(O_FIPSCANISTER)\n";
454 $ret.="\t\$(PERL) util/mksdef.pl \$(MLFLAGS) /out:dummy.dll /def:ms/libeay32.def @<<\n \$(O_FIPSCANISTER)\n<<\n";
455 $ret.="\n";
456 return $ret;
457 }
458
3141; 4591;
diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c
index 37f9a48206..341e0ba6a4 100644
--- a/src/lib/libcrypto/x509/by_dir.c
+++ b/src/lib/libcrypto/x509/by_dir.c
@@ -74,6 +74,10 @@
74#include <openssl/lhash.h> 74#include <openssl/lhash.h>
75#include <openssl/x509.h> 75#include <openssl/x509.h>
76 76
77#ifdef _WIN32
78#define stat _stat
79#endif
80
77typedef struct lookup_dir_st 81typedef struct lookup_dir_st
78 { 82 {
79 BUF_MEM *buffer; 83 BUF_MEM *buffer;
diff --git a/src/lib/libcrypto/x509/x509_cmp.c b/src/lib/libcrypto/x509/x509_cmp.c
index 0d6bc653b2..e4c682fc44 100644
--- a/src/lib/libcrypto/x509/x509_cmp.c
+++ b/src/lib/libcrypto/x509/x509_cmp.c
@@ -322,10 +322,16 @@ unsigned long X509_NAME_hash(X509_NAME *x)
322 { 322 {
323 unsigned long ret=0; 323 unsigned long ret=0;
324 unsigned char md[16]; 324 unsigned char md[16];
325 EVP_MD_CTX md_ctx;
325 326
326 /* Make sure X509_NAME structure contains valid cached encoding */ 327 /* Make sure X509_NAME structure contains valid cached encoding */
327 i2d_X509_NAME(x,NULL); 328 i2d_X509_NAME(x,NULL);
328 EVP_Digest(x->bytes->data, x->bytes->length, md, NULL, EVP_md5(), NULL); 329 EVP_MD_CTX_init(&md_ctx);
330 EVP_MD_CTX_set_flags(&md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
331 EVP_DigestInit_ex(&md_ctx, EVP_md5(), NULL);
332 EVP_DigestUpdate(&md_ctx, x->bytes->data, x->bytes->length);
333 EVP_DigestFinal_ex(&md_ctx,md,NULL);
334 EVP_MD_CTX_cleanup(&md_ctx);
329 335
330 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| 336 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)|
331 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) 337 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L)
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c
index 9c84a59d52..ed18700585 100644
--- a/src/lib/libcrypto/x509/x509_trs.c
+++ b/src/lib/libcrypto/x509/x509_trs.c
@@ -1,5 +1,5 @@
1/* x509_trs.c */ 1/* x509_trs.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509/x509cset.c b/src/lib/libcrypto/x509/x509cset.c
index 9d1646d5c8..7f4004b291 100644
--- a/src/lib/libcrypto/x509/x509cset.c
+++ b/src/lib/libcrypto/x509/x509cset.c
@@ -1,5 +1,5 @@
1/* crypto/x509/x509cset.c */ 1/* crypto/x509/x509cset.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509/x509spki.c b/src/lib/libcrypto/x509/x509spki.c
index ed868b838e..02a203d72c 100644
--- a/src/lib/libcrypto/x509/x509spki.c
+++ b/src/lib/libcrypto/x509/x509spki.c
@@ -1,5 +1,5 @@
1/* x509spki.c */ 1/* x509spki.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/ext_dat.h b/src/lib/libcrypto/x509v3/ext_dat.h
index 5c063ac65d..3eaec46f8a 100644
--- a/src/lib/libcrypto/x509v3/ext_dat.h
+++ b/src/lib/libcrypto/x509v3/ext_dat.h
@@ -1,5 +1,5 @@
1/* ext_dat.h */ 1/* ext_dat.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/pcy_data.c b/src/lib/libcrypto/x509v3/pcy_data.c
index 4711b1ee92..fb392b901f 100644
--- a/src/lib/libcrypto/x509v3/pcy_data.c
+++ b/src/lib/libcrypto/x509v3/pcy_data.c
@@ -1,5 +1,5 @@
1/* pcy_data.c */ 1/* pcy_data.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2004. 3 * project 2004.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/pcy_tree.c b/src/lib/libcrypto/x509v3/pcy_tree.c
index b1ce77b9af..6c87a7f506 100644
--- a/src/lib/libcrypto/x509v3/pcy_tree.c
+++ b/src/lib/libcrypto/x509v3/pcy_tree.c
@@ -1,5 +1,5 @@
1/* pcy_tree.c */ 1/* pcy_tree.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2004. 3 * project 2004.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/tabtest.c b/src/lib/libcrypto/x509v3/tabtest.c
index dad0d38dd5..5ed6eb6891 100644
--- a/src/lib/libcrypto/x509v3/tabtest.c
+++ b/src/lib/libcrypto/x509v3/tabtest.c
@@ -1,5 +1,5 @@
1/* tabtest.c */ 1/* tabtest.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_addr.c b/src/lib/libcrypto/x509v3/v3_addr.c
index c6730ab3fd..a37f844d3c 100644
--- a/src/lib/libcrypto/x509v3/v3_addr.c
+++ b/src/lib/libcrypto/x509v3/v3_addr.c
@@ -878,6 +878,7 @@ int v3_addr_canonize(IPAddrBlocks *addr)
878 v3_addr_get_afi(f))) 878 v3_addr_get_afi(f)))
879 return 0; 879 return 0;
880 } 880 }
881 (void)sk_IPAddressFamily_set_cmp_func(addr, IPAddressFamily_cmp);
881 sk_IPAddressFamily_sort(addr); 882 sk_IPAddressFamily_sort(addr);
882 assert(v3_addr_is_canonical(addr)); 883 assert(v3_addr_is_canonical(addr));
883 return 1; 884 return 1;
diff --git a/src/lib/libcrypto/x509v3/v3_akey.c b/src/lib/libcrypto/x509v3/v3_akey.c
index ac0548b775..c6b68ee221 100644
--- a/src/lib/libcrypto/x509v3/v3_akey.c
+++ b/src/lib/libcrypto/x509v3/v3_akey.c
@@ -1,5 +1,5 @@
1/* v3_akey.c */ 1/* v3_akey.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_akeya.c b/src/lib/libcrypto/x509v3/v3_akeya.c
index 2aafa26ba7..2c50f7360e 100644
--- a/src/lib/libcrypto/x509v3/v3_akeya.c
+++ b/src/lib/libcrypto/x509v3/v3_akeya.c
@@ -1,5 +1,5 @@
1/* v3_akey_asn1.c */ 1/* v3_akey_asn1.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_alt.c b/src/lib/libcrypto/x509v3/v3_alt.c
index ac3139d1e6..75fda7f268 100644
--- a/src/lib/libcrypto/x509v3/v3_alt.c
+++ b/src/lib/libcrypto/x509v3/v3_alt.c
@@ -1,5 +1,5 @@
1/* v3_alt.c */ 1/* v3_alt.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -527,7 +527,8 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
527 return gen; 527 return gen;
528 528
529 err: 529 err:
530 GENERAL_NAME_free(gen); 530 if (!out)
531 GENERAL_NAME_free(gen);
531 return NULL; 532 return NULL;
532 } 533 }
533 534
diff --git a/src/lib/libcrypto/x509v3/v3_bcons.c b/src/lib/libcrypto/x509v3/v3_bcons.c
index 74b1233071..82aa488f75 100644
--- a/src/lib/libcrypto/x509v3/v3_bcons.c
+++ b/src/lib/libcrypto/x509v3/v3_bcons.c
@@ -1,5 +1,5 @@
1/* v3_bcons.c */ 1/* v3_bcons.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_bitst.c b/src/lib/libcrypto/x509v3/v3_bitst.c
index cf31f0816e..058d0d4dce 100644
--- a/src/lib/libcrypto/x509v3/v3_bitst.c
+++ b/src/lib/libcrypto/x509v3/v3_bitst.c
@@ -1,5 +1,5 @@
1/* v3_bitst.c */ 1/* v3_bitst.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_conf.c b/src/lib/libcrypto/x509v3/v3_conf.c
index 2b867305fb..11eb6b7fd5 100644
--- a/src/lib/libcrypto/x509v3/v3_conf.c
+++ b/src/lib/libcrypto/x509v3/v3_conf.c
@@ -1,5 +1,5 @@
1/* v3_conf.c */ 1/* v3_conf.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_cpols.c b/src/lib/libcrypto/x509v3/v3_cpols.c
index a40f490aa9..95596055ab 100644
--- a/src/lib/libcrypto/x509v3/v3_cpols.c
+++ b/src/lib/libcrypto/x509v3/v3_cpols.c
@@ -1,5 +1,5 @@
1/* v3_cpols.c */ 1/* v3_cpols.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_crld.c b/src/lib/libcrypto/x509v3/v3_crld.c
index c6e3ebae7b..181a8977b1 100644
--- a/src/lib/libcrypto/x509v3/v3_crld.c
+++ b/src/lib/libcrypto/x509v3/v3_crld.c
@@ -1,5 +1,5 @@
1/* v3_crld.c */ 1/* v3_crld.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_enum.c b/src/lib/libcrypto/x509v3/v3_enum.c
index a236cb22e1..36576eaa4d 100644
--- a/src/lib/libcrypto/x509v3/v3_enum.c
+++ b/src/lib/libcrypto/x509v3/v3_enum.c
@@ -1,5 +1,5 @@
1/* v3_enum.c */ 1/* v3_enum.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_extku.c b/src/lib/libcrypto/x509v3/v3_extku.c
index a4efe0031e..c0d14500ed 100644
--- a/src/lib/libcrypto/x509v3/v3_extku.c
+++ b/src/lib/libcrypto/x509v3/v3_extku.c
@@ -1,5 +1,5 @@
1/* v3_extku.c */ 1/* v3_extku.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_genn.c b/src/lib/libcrypto/x509v3/v3_genn.c
index 650b510980..84b4b1c881 100644
--- a/src/lib/libcrypto/x509v3/v3_genn.c
+++ b/src/lib/libcrypto/x509v3/v3_genn.c
@@ -1,5 +1,5 @@
1/* v3_genn.c */ 1/* v3_genn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_ia5.c b/src/lib/libcrypto/x509v3/v3_ia5.c
index b739ccd036..4ff12b52b5 100644
--- a/src/lib/libcrypto/x509v3/v3_ia5.c
+++ b/src/lib/libcrypto/x509v3/v3_ia5.c
@@ -1,5 +1,5 @@
1/* v3_ia5.c */ 1/* v3_ia5.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_info.c b/src/lib/libcrypto/x509v3/v3_info.c
index e0ef69de42..e1b8699f92 100644
--- a/src/lib/libcrypto/x509v3/v3_info.c
+++ b/src/lib/libcrypto/x509v3/v3_info.c
@@ -1,5 +1,5 @@
1/* v3_info.c */ 1/* v3_info.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_int.c b/src/lib/libcrypto/x509v3/v3_int.c
index 9a48dc1508..4bfd14cf46 100644
--- a/src/lib/libcrypto/x509v3/v3_int.c
+++ b/src/lib/libcrypto/x509v3/v3_int.c
@@ -1,5 +1,5 @@
1/* v3_int.c */ 1/* v3_int.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_lib.c b/src/lib/libcrypto/x509v3/v3_lib.c
index f3015ea610..df3a48f43e 100644
--- a/src/lib/libcrypto/x509v3/v3_lib.c
+++ b/src/lib/libcrypto/x509v3/v3_lib.c
@@ -1,5 +1,5 @@
1/* v3_lib.c */ 1/* v3_lib.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_ocsp.c b/src/lib/libcrypto/x509v3/v3_ocsp.c
index 62aac06335..e426ea930c 100644
--- a/src/lib/libcrypto/x509v3/v3_ocsp.c
+++ b/src/lib/libcrypto/x509v3/v3_ocsp.c
@@ -1,5 +1,5 @@
1/* v3_ocsp.c */ 1/* v3_ocsp.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_pku.c b/src/lib/libcrypto/x509v3/v3_pku.c
index 5c4626e89b..076f3ff48e 100644
--- a/src/lib/libcrypto/x509v3/v3_pku.c
+++ b/src/lib/libcrypto/x509v3/v3_pku.c
@@ -1,5 +1,5 @@
1/* v3_pku.c */ 1/* v3_pku.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_prn.c b/src/lib/libcrypto/x509v3/v3_prn.c
index 20bd9bda19..c1bb17f105 100644
--- a/src/lib/libcrypto/x509v3/v3_prn.c
+++ b/src/lib/libcrypto/x509v3/v3_prn.c
@@ -1,5 +1,5 @@
1/* v3_prn.c */ 1/* v3_prn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_purp.c b/src/lib/libcrypto/x509v3/v3_purp.c
index c54e7887c7..e18751e01c 100644
--- a/src/lib/libcrypto/x509v3/v3_purp.c
+++ b/src/lib/libcrypto/x509v3/v3_purp.c
@@ -1,5 +1,5 @@
1/* v3_purp.c */ 1/* v3_purp.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_skey.c b/src/lib/libcrypto/x509v3/v3_skey.c
index da0a3558f6..202c9e4896 100644
--- a/src/lib/libcrypto/x509v3/v3_skey.c
+++ b/src/lib/libcrypto/x509v3/v3_skey.c
@@ -1,5 +1,5 @@
1/* v3_skey.c */ 1/* v3_skey.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_sxnet.c b/src/lib/libcrypto/x509v3/v3_sxnet.c
index eaea9ea01b..2a6bf11b65 100644
--- a/src/lib/libcrypto/x509v3/v3_sxnet.c
+++ b/src/lib/libcrypto/x509v3/v3_sxnet.c
@@ -1,5 +1,5 @@
1/* v3_sxnet.c */ 1/* v3_sxnet.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3_utl.c b/src/lib/libcrypto/x509v3/v3_utl.c
index 57be441399..2cb53008e3 100644
--- a/src/lib/libcrypto/x509v3/v3_utl.c
+++ b/src/lib/libcrypto/x509v3/v3_utl.c
@@ -1,5 +1,5 @@
1/* v3_utl.c */ 1/* v3_utl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -736,17 +736,20 @@ static int ipv6_from_asc(unsigned char *v6, const char *in)
736 736
737 /* Format result */ 737 /* Format result */
738 738
739 /* Copy initial part */ 739 if (v6stat.zero_pos >= 0)
740 if (v6stat.zero_pos > 0) 740 {
741 /* Copy initial part */
741 memcpy(v6, v6stat.tmp, v6stat.zero_pos); 742 memcpy(v6, v6stat.tmp, v6stat.zero_pos);
742 /* Zero middle */ 743 /* Zero middle */
743 if (v6stat.total != 16)
744 memset(v6 + v6stat.zero_pos, 0, 16 - v6stat.total); 744 memset(v6 + v6stat.zero_pos, 0, 16 - v6stat.total);
745 /* Copy final part */ 745 /* Copy final part */
746 if (v6stat.total != v6stat.zero_pos) 746 if (v6stat.total != v6stat.zero_pos)
747 memcpy(v6 + v6stat.zero_pos + 16 - v6stat.total, 747 memcpy(v6 + v6stat.zero_pos + 16 - v6stat.total,
748 v6stat.tmp + v6stat.zero_pos, 748 v6stat.tmp + v6stat.zero_pos,
749 v6stat.total - v6stat.zero_pos); 749 v6stat.total - v6stat.zero_pos);
750 }
751 else
752 memcpy(v6, v6stat.tmp, 16);
750 753
751 return 1; 754 return 1;
752 } 755 }
diff --git a/src/lib/libcrypto/x509v3/v3conf.c b/src/lib/libcrypto/x509v3/v3conf.c
index 00cf5b4a5b..a9e6ca3542 100644
--- a/src/lib/libcrypto/x509v3/v3conf.c
+++ b/src/lib/libcrypto/x509v3/v3conf.c
@@ -1,5 +1,5 @@
1/* v3conf.c */ 1/* v3conf.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/v3prin.c b/src/lib/libcrypto/x509v3/v3prin.c
index b529814319..d5ff268296 100644
--- a/src/lib/libcrypto/x509v3/v3prin.c
+++ b/src/lib/libcrypto/x509v3/v3prin.c
@@ -1,5 +1,5 @@
1/* v3prin.c */ 1/* v3prin.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libcrypto/x509v3/x509v3.h b/src/lib/libcrypto/x509v3/x509v3.h
index 5ba59f71c9..9ef83da755 100644
--- a/src/lib/libcrypto/x509v3/x509v3.h
+++ b/src/lib/libcrypto/x509v3/x509v3.h
@@ -1,5 +1,5 @@
1/* x509v3.h */ 1/* x509v3.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c
index b2765ba801..eb56cf987b 100644
--- a/src/lib/libssl/d1_pkt.c
+++ b/src/lib/libssl/d1_pkt.c
@@ -597,6 +597,7 @@ again:
597 /* check whether this is a repeat, or aged record */ 597 /* check whether this is a repeat, or aged record */
598 if ( ! dtls1_record_replay_check(s, bitmap, &(rr->seq_num))) 598 if ( ! dtls1_record_replay_check(s, bitmap, &(rr->seq_num)))
599 { 599 {
600 rr->length = 0;
600 s->packet_length=0; /* dump this record */ 601 s->packet_length=0; /* dump this record */
601 goto again; /* get another record */ 602 goto again; /* get another record */
602 } 603 }
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c
index 9b823fddbd..50308487aa 100644
--- a/src/lib/libssl/s3_clnt.c
+++ b/src/lib/libssl/s3_clnt.c
@@ -972,7 +972,7 @@ int ssl3_get_server_certificate(SSL *s)
972 } 972 }
973 973
974 i=ssl_verify_cert_chain(s,sk); 974 i=ssl_verify_cert_chain(s,sk);
975 if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) 975 if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)
976#ifndef OPENSSL_NO_KRB5 976#ifndef OPENSSL_NO_KRB5
977 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) 977 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK))
978 != (SSL_aKRB5|SSL_kKRB5) 978 != (SSL_aKRB5|SSL_kKRB5)
@@ -1006,7 +1006,7 @@ int ssl3_get_server_certificate(SSL *s)
1006 == (SSL_aKRB5|SSL_kKRB5))? 0: 1; 1006 == (SSL_aKRB5|SSL_kKRB5))? 0: 1;
1007 1007
1008#ifdef KSSL_DEBUG 1008#ifdef KSSL_DEBUG
1009 printf("pkey,x = %p, %p\n", pkey,x); 1009 printf("pkey,x = %p, %p\n", (void *)pkey,(void *)x);
1010 printf("ssl_cert_type(x,pkey) = %d\n", ssl_cert_type(x,pkey)); 1010 printf("ssl_cert_type(x,pkey) = %d\n", ssl_cert_type(x,pkey));
1011 printf("cipher, alg, nc = %s, %lx, %d\n", s->s3->tmp.new_cipher->name, 1011 printf("cipher, alg, nc = %s, %lx, %d\n", s->s3->tmp.new_cipher->name,
1012 s->s3->tmp.new_cipher->algorithms, need_cert); 1012 s->s3->tmp.new_cipher->algorithms, need_cert);
@@ -1459,7 +1459,7 @@ int ssl3_get_key_exchange(SSL *s)
1459 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); 1459 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
1460 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); 1460 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
1461 EVP_VerifyUpdate(&md_ctx,param,param_len); 1461 EVP_VerifyUpdate(&md_ctx,param,param_len);
1462 if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) 1462 if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0)
1463 { 1463 {
1464 /* bad signature */ 1464 /* bad signature */
1465 al=SSL_AD_DECRYPT_ERROR; 1465 al=SSL_AD_DECRYPT_ERROR;
@@ -1477,7 +1477,7 @@ int ssl3_get_key_exchange(SSL *s)
1477 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); 1477 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
1478 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); 1478 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
1479 EVP_VerifyUpdate(&md_ctx,param,param_len); 1479 EVP_VerifyUpdate(&md_ctx,param,param_len);
1480 if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) 1480 if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0)
1481 { 1481 {
1482 /* bad signature */ 1482 /* bad signature */
1483 al=SSL_AD_DECRYPT_ERROR; 1483 al=SSL_AD_DECRYPT_ERROR;
@@ -1777,7 +1777,7 @@ int ssl3_get_cert_status(SSL *s)
1777 goto f_err; 1777 goto f_err;
1778 } 1778 }
1779 n2l3(p, resplen); 1779 n2l3(p, resplen);
1780 if (resplen + 4 != n) 1780 if (resplen + 4 != (unsigned long)n)
1781 { 1781 {
1782 al = SSL_AD_DECODE_ERROR; 1782 al = SSL_AD_DECODE_ERROR;
1783 SSLerr(SSL_F_SSL3_GET_CERT_STATUS,SSL_R_LENGTH_MISMATCH); 1783 SSLerr(SSL_F_SSL3_GET_CERT_STATUS,SSL_R_LENGTH_MISMATCH);
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c
index 72853a2e72..9476dcddf6 100644
--- a/src/lib/libssl/s3_pkt.c
+++ b/src/lib/libssl/s3_pkt.c
@@ -753,8 +753,15 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
753 s->rwstate=SSL_NOTHING; 753 s->rwstate=SSL_NOTHING;
754 return(s->s3->wpend_ret); 754 return(s->s3->wpend_ret);
755 } 755 }
756 else if (i <= 0) 756 else if (i <= 0) {
757 if (s->version == DTLS1_VERSION ||
758 s->version == DTLS1_BAD_VER) {
759 /* For DTLS, just drop it. That's kind of the whole
760 point in using a datagram service */
761 s->s3->wbuf.left = 0;
762 }
757 return(i); 763 return(i);
764 }
758 s->s3->wbuf.offset+=i; 765 s->s3->wbuf.offset+=i;
759 s->s3->wbuf.left-=i; 766 s->s3->wbuf.left-=i;
760 } 767 }
diff --git a/src/lib/libssl/s3_srvr.c b/src/lib/libssl/s3_srvr.c
index 398ce469d6..80b45eb86f 100644
--- a/src/lib/libssl/s3_srvr.c
+++ b/src/lib/libssl/s3_srvr.c
@@ -902,22 +902,28 @@ int ssl3_get_client_hello(SSL *s)
902 break; 902 break;
903 } 903 }
904 } 904 }
905 if (j == 0) 905 if (j == 0 && (s->options & SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG) && (sk_SSL_CIPHER_num(ciphers) == 1))
906 { 906 {
907 if ((s->options & SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG) && (sk_SSL_CIPHER_num(ciphers) == 1)) 907 /* Special case as client bug workaround: the previously used cipher may
908 { 908 * not be in the current list, the client instead might be trying to
909 /* Very bad for multi-threading.... */ 909 * continue using a cipher that before wasn't chosen due to server
910 s->session->cipher=sk_SSL_CIPHER_value(ciphers, 0); 910 * preferences. We'll have to reject the connection if the cipher is not
911 } 911 * enabled, though. */
912 else 912 c = sk_SSL_CIPHER_value(ciphers, 0);
913 if (sk_SSL_CIPHER_find(SSL_get_ciphers(s), c) >= 0)
913 { 914 {
914 /* we need to have the cipher in the cipher 915 s->session->cipher = c;
915 * list if we are asked to reuse it */ 916 j = 1;
916 al=SSL_AD_ILLEGAL_PARAMETER;
917 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_REQUIRED_CIPHER_MISSING);
918 goto f_err;
919 } 917 }
920 } 918 }
919 if (j == 0)
920 {
921 /* we need to have the cipher in the cipher
922 * list if we are asked to reuse it */
923 al=SSL_AD_ILLEGAL_PARAMETER;
924 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_REQUIRED_CIPHER_MISSING);
925 goto f_err;
926 }
921 } 927 }
922 928
923 /* compression */ 929 /* compression */
@@ -2560,7 +2566,7 @@ int ssl3_get_client_certificate(SSL *s)
2560 else 2566 else
2561 { 2567 {
2562 i=ssl_verify_cert_chain(s,sk); 2568 i=ssl_verify_cert_chain(s,sk);
2563 if (!i) 2569 if (i <= 0)
2564 { 2570 {
2565 al=ssl_verify_alarm_type(s->verify_result); 2571 al=ssl_verify_alarm_type(s->verify_result);
2566 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); 2572 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED);
diff --git a/src/lib/libssl/src/CHANGES b/src/lib/libssl/src/CHANGES
index 72cc168f6a..c888c56c26 100644
--- a/src/lib/libssl/src/CHANGES
+++ b/src/lib/libssl/src/CHANGES
@@ -2,6 +2,48 @@
2 OpenSSL CHANGES 2 OpenSSL CHANGES
3 _______________ 3 _______________
4 4
5 Changes between 0.9.8i and 0.9.8j [07 Jan 2009]
6
7 *) Properly check EVP_VerifyFinal() and similar return values
8 (CVE-2008-5077).
9 [Ben Laurie, Bodo Moeller, Google Security Team]
10
11 *) Properly check EVP_VerifyFinal() and similar return values
12 (CVE-2008-5077).
13 [Ben Laurie, Bodo Moeller, Google Security Team]
14
15 *) Enable TLS extensions by default.
16 [Ben Laurie]
17
18 *) Allow the CHIL engine to be loaded, whether the application is
19 multithreaded or not. (This does not release the developer from the
20 obligation to set up the dynamic locking callbacks.)
21 [Sander Temme <sander@temme.net>]
22
23 *) Use correct exit code if there is an error in dgst command.
24 [Steve Henson; problem pointed out by Roland Dirlewanger]
25
26 *) Tweak Configure so that you need to say "experimental-jpake" to enable
27 JPAKE, and need to use -DOPENSSL_EXPERIMENTAL_JPAKE in applications.
28 [Bodo Moeller]
29
30 *) Add experimental JPAKE support, including demo authentication in
31 s_client and s_server.
32 [Ben Laurie]
33
34 *) Set the comparison function in v3_addr_canonize().
35 [Rob Austein <sra@hactrn.net>]
36
37 *) Add support for XMPP STARTTLS in s_client.
38 [Philip Paeps <philip@freebsd.org>]
39
40 *) Change the server-side SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG behavior
41 to ensure that even with this option, only ciphersuites in the
42 server's preference list will be accepted. (Note that the option
43 applies only when resuming a session, so the earlier behavior was
44 just about the algorithm choice for symmetric cryptography.)
45 [Bodo Moeller]
46
5 Changes between 0.9.8h and 0.9.8i [15 Sep 2008] 47 Changes between 0.9.8h and 0.9.8i [15 Sep 2008]
6 48
7 *) Fix a state transitition in s3_srvr.c and d1_srvr.c 49 *) Fix a state transitition in s3_srvr.c and d1_srvr.c
@@ -34,6 +76,10 @@
34 76
35 [Neel Mehta, Bodo Moeller] 77 [Neel Mehta, Bodo Moeller]
36 78
79 *) Allow engines to be "soft loaded" - i.e. optionally don't die if
80 the load fails. Useful for distros.
81 [Ben Laurie and the FreeBSD team]
82
37 *) Add support for Local Machine Keyset attribute in PKCS#12 files. 83 *) Add support for Local Machine Keyset attribute in PKCS#12 files.
38 [Steve Henson] 84 [Steve Henson]
39 85
@@ -52,9 +98,11 @@
52 This work was sponsored by Logica. 98 This work was sponsored by Logica.
53 [Steve Henson] 99 [Steve Henson]
54 100
55 *) Allow engines to be "soft loaded" - i.e. optionally don't die if 101 *) Fix bug in X509_ATTRIBUTE creation: dont set attribute using
56 the load fails. Useful for distros. 102 ASN1_TYPE_set1 if MBSTRING flag set. This bug would crash certain
57 [Ben Laurie and the FreeBSD team] 103 attribute creation routines such as certifcate requests and PKCS#12
104 files.
105 [Steve Henson]
58 106
59 Changes between 0.9.8g and 0.9.8h [28 May 2008] 107 Changes between 0.9.8g and 0.9.8h [28 May 2008]
60 108
diff --git a/src/lib/libssl/src/Configure b/src/lib/libssl/src/Configure
index f24d738feb..09b58f2113 100644
--- a/src/lib/libssl/src/Configure
+++ b/src/lib/libssl/src/Configure
@@ -6,11 +6,13 @@ eval 'exec perl -S $0 ${1+"$@"}'
6## 6##
7 7
8require 5.000; 8require 5.000;
9use strict; 9eval 'use strict;';
10
11print STDERR "Warning: perl module strict not found.\n" if ($@);
10 12
11# see INSTALL for instructions. 13# see INSTALL for instructions.
12 14
13my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [enable-montasm] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n"; 15my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [enable-montasm] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
14 16
15# Options: 17# Options:
16# 18#
@@ -155,9 +157,9 @@ my %table=(
155"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)::::::", 157"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)::::::",
156"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)::::::", 158"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)::::::",
157"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", 159"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
158"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", 160"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
159"debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", 161"debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll",
160"debug-steve64", "gcc:-m64 -DL_ENDIAN -DTERMIO -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DOPENSSL_NO_DEPRECATED -g -pedantic -Wall -Werror -Wno-long-long -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 162"debug-steve64", "gcc:-m64 -DL_ENDIAN -DTERMIO -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DOPENSSL_NO_DEPRECATED -g -pedantic -Wall -Werror -Wno-long-long -Wsign-compare -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
161"debug-steve32", "gcc:-m32 -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DOPENSSL_NO_DEPRECATED -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 163"debug-steve32", "gcc:-m32 -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DOPENSSL_NO_DEPRECATED -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
162"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared", 164"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared",
163"debug-steve-opt", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -O3 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared", 165"debug-steve-opt", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -O3 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared",
@@ -577,6 +579,11 @@ my $prefix="";
577my $openssldir=""; 579my $openssldir="";
578my $exe_ext=""; 580my $exe_ext="";
579my $install_prefix=""; 581my $install_prefix="";
582my $fipslibdir="/usr/local/ssl/fips-1.0/lib/";
583my $nofipscanistercheck=0;
584my $fipsdso=0;
585my $fipscanisterinternal="n";
586my $baseaddr="0xFB00000";
580my $no_threads=0; 587my $no_threads=0;
581my $threads=0; 588my $threads=0;
582my $no_shared=0; # but "no-shared" is default 589my $no_shared=0; # but "no-shared" is default
@@ -600,6 +607,7 @@ my $rc2 ="crypto/rc2/rc2.h";
600my $bf ="crypto/bf/bf_locl.h"; 607my $bf ="crypto/bf/bf_locl.h";
601my $bn_asm ="bn_asm.o"; 608my $bn_asm ="bn_asm.o";
602my $des_enc="des_enc.o fcrypt_b.o"; 609my $des_enc="des_enc.o fcrypt_b.o";
610my $fips_des_enc="fips_des_enc.o";
603my $aes_enc="aes_core.o aes_cbc.o"; 611my $aes_enc="aes_core.o aes_cbc.o";
604my $bf_enc ="bf_enc.o"; 612my $bf_enc ="bf_enc.o";
605my $cast_enc="c_enc.o"; 613my $cast_enc="c_enc.o";
@@ -611,32 +619,40 @@ my $rmd160_obj="";
611my $processor=""; 619my $processor="";
612my $default_ranlib; 620my $default_ranlib;
613my $perl; 621my $perl;
622my $fips=0;
614 623
615 624
616# All of the following is disabled by default (RC5 was enabled before 0.9.8): 625# All of the following is disabled by default (RC5 was enabled before 0.9.8):
617 626
618my %disabled = ( # "what" => "comment" 627my %disabled = ( # "what" => "comment" [or special keyword "experimental"]
619 "camellia" => "default", 628 "camellia" => "default",
620 "capieng" => "default", 629 "capieng" => "default",
621 "cms" => "default", 630 "cms" => "default",
622 "gmp" => "default", 631 "gmp" => "default",
632 "jpake" => "experimental",
623 "mdc2" => "default", 633 "mdc2" => "default",
624 "montasm" => "default", # explicit option in 0.9.8 only (implicitly enabled in 0.9.9) 634 "montasm" => "default", # explicit option in 0.9.8 only (implicitly enabled in 0.9.9)
625 "rc5" => "default", 635 "rc5" => "default",
626 "rfc3779" => "default", 636 "rfc3779" => "default",
627 "seed" => "default", 637 "seed" => "default",
628 "shared" => "default", 638 "shared" => "default",
629 "tlsext" => "default",
630 "zlib" => "default", 639 "zlib" => "default",
631 "zlib-dynamic" => "default" 640 "zlib-dynamic" => "default"
632 ); 641 );
642my @experimental = ();
643
644# This is what $depflags will look like with the above defaults
645# (we need this to see if we should advise the user to run "make depend"):
646my $default_depflags = " -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED";
633 647
634# Additional "no-..." options will be collected in %disabled.
635# To remove something from %disabled, use e.g. "enable-rc5".
636# For symmetry, "disable-..." is a synonym for "no-...".
637 648
638# This is what $depflags will look like with the above default: 649# Explicit "no-..." options will be collected in %disabled along with the defaults.
639my $default_depflags = "-DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_TLSEXT "; 650# To remove something from %disabled, use "enable-foo" (unless it's experimental).
651# For symmetry, "disable-foo" is a synonym for "no-foo".
652
653# For features called "experimental" here, a more explicit "experimental-foo" is needed to enable.
654# We will collect such requests in @experimental.
655# To avoid accidental use of experimental features, applications will have to use -DOPENSSL_EXPERIMENTAL_FOO.
640 656
641 657
642my $no_sse2=0; 658my $no_sse2=0;
@@ -645,6 +661,7 @@ my $no_sse2=0;
645 661
646my $flags; 662my $flags;
647my $depflags; 663my $depflags;
664my $openssl_experimental_defines;
648my $openssl_algorithm_defines; 665my $openssl_algorithm_defines;
649my $openssl_thread_defines; 666my $openssl_thread_defines;
650my $openssl_sys_defines=""; 667my $openssl_sys_defines="";
@@ -665,6 +682,7 @@ while($argv_unprocessed)
665 { 682 {
666 $flags=""; 683 $flags="";
667 $depflags=""; 684 $depflags="";
685 $openssl_experimental_defines="";
668 $openssl_algorithm_defines=""; 686 $openssl_algorithm_defines="";
669 $openssl_thread_defines=""; 687 $openssl_thread_defines="";
670 $openssl_sys_defines=""; 688 $openssl_sys_defines="";
@@ -690,25 +708,35 @@ PROCESS_ARGS:
690 708
691 if (/^no-(.+)$/ || /^disable-(.+)$/) 709 if (/^no-(.+)$/ || /^disable-(.+)$/)
692 { 710 {
693 if ($1 eq "ssl") 711 if (!($disabled{$1} eq "experimental"))
694 {
695 $disabled{"ssl2"} = "option(ssl)";
696 $disabled{"ssl3"} = "option(ssl)";
697 }
698 elsif ($1 eq "tls")
699 {
700 $disabled{"tls1"} = "option(tls)"
701 }
702 else
703 { 712 {
704 $disabled{$1} = "option"; 713 if ($1 eq "ssl")
714 {
715 $disabled{"ssl2"} = "option(ssl)";
716 $disabled{"ssl3"} = "option(ssl)";
717 }
718 elsif ($1 eq "tls")
719 {
720 $disabled{"tls1"} = "option(tls)"
721 }
722 else
723 {
724 $disabled{$1} = "option";
725 }
705 } 726 }
706 } 727 }
707 elsif (/^enable-(.+)$/) 728 elsif (/^enable-(.+)$/ || /^experimental-(.+)$/)
708 { 729 {
709 delete $disabled{$1}; 730 my $algo = $1;
731 if ($disabled{$algo} eq "experimental")
732 {
733 die "You are requesting an experimental feature; please say 'experimental-$algo' if you are sure\n"
734 unless (/^experimental-/);
735 push @experimental, $algo;
736 }
737 delete $disabled{$algo};
710 738
711 $threads = 1 if ($1 eq "threads"); 739 $threads = 1 if ($algo eq "threads");
712 } 740 }
713 elsif (/^--test-sanity$/) 741 elsif (/^--test-sanity$/)
714 { 742 {
@@ -739,12 +767,36 @@ PROCESS_ARGS:
739 } 767 }
740 elsif (/^386$/) 768 elsif (/^386$/)
741 { $processor=386; } 769 { $processor=386; }
770 elsif (/^fips$/)
771 {
772 $fips=1;
773 }
742 elsif (/^rsaref$/) 774 elsif (/^rsaref$/)
743 { 775 {
744 # No RSAref support any more since it's not needed. 776 # No RSAref support any more since it's not needed.
745 # The check for the option is there so scripts aren't 777 # The check for the option is there so scripts aren't
746 # broken 778 # broken
747 } 779 }
780 elsif (/^nofipscanistercheck$/)
781 {
782 $fips = 1;
783 $nofipscanistercheck = 1;
784 }
785 elsif (/^fipscanisterbuild$/)
786 {
787 $fips = 1;
788 $nofipscanistercheck = 1;
789 $fipslibdir="";
790 $fipscanisterinternal="y";
791 }
792 elsif (/^fipsdso$/)
793 {
794 $fips = 1;
795 $nofipscanistercheck = 1;
796 $fipslibdir="";
797 $fipscanisterinternal="y";
798 $fipsdso = 1;
799 }
748 elsif (/^[-+]/) 800 elsif (/^[-+]/)
749 { 801 {
750 if (/^-[lL](.*)$/) 802 if (/^-[lL](.*)$/)
@@ -779,6 +831,14 @@ PROCESS_ARGS:
779 { 831 {
780 $withargs{"zlib-include"}="-I$1"; 832 $withargs{"zlib-include"}="-I$1";
781 } 833 }
834 elsif (/^--with-fipslibdir=(.*)$/)
835 {
836 $fipslibdir="$1/";
837 }
838 elsif (/^--with-baseaddr=(.*)$/)
839 {
840 $baseaddr="$1";
841 }
782 else 842 else
783 { 843 {
784 print STDERR $usage; 844 print STDERR $usage;
@@ -886,6 +946,50 @@ print "Configuring for $target\n";
886 946
887&usage if (!defined($table{$target})); 947&usage if (!defined($table{$target}));
888 948
949my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
950my $cc = $fields[$idx_cc];
951my $cflags = $fields[$idx_cflags];
952my $unistd = $fields[$idx_unistd];
953my $thread_cflag = $fields[$idx_thread_cflag];
954my $sys_id = $fields[$idx_sys_id];
955my $lflags = $fields[$idx_lflags];
956my $bn_ops = $fields[$idx_bn_ops];
957my $cpuid_obj = $fields[$idx_cpuid_obj];
958my $bn_obj = $fields[$idx_bn_obj];
959my $des_obj = $fields[$idx_des_obj];
960my $aes_obj = $fields[$idx_aes_obj];
961my $bf_obj = $fields[$idx_bf_obj];
962my $md5_obj = $fields[$idx_md5_obj];
963my $sha1_obj = $fields[$idx_sha1_obj];
964my $cast_obj = $fields[$idx_cast_obj];
965my $rc4_obj = $fields[$idx_rc4_obj];
966my $rmd160_obj = $fields[$idx_rmd160_obj];
967my $rc5_obj = $fields[$idx_rc5_obj];
968my $dso_scheme = $fields[$idx_dso_scheme];
969my $shared_target = $fields[$idx_shared_target];
970my $shared_cflag = $fields[$idx_shared_cflag];
971my $shared_ldflag = $fields[$idx_shared_ldflag];
972my $shared_extension = $fields[$idx_shared_extension];
973my $ranlib = $fields[$idx_ranlib];
974my $arflags = $fields[$idx_arflags];
975
976if ($fips)
977 {
978 delete $disabled{"shared"} if ($disabled{"shared"} eq "default");
979 $disabled{"asm"}="forced"
980 if ($target !~ "VC\-.*" &&
981 "$cpuid_obj:$bn_obj:$aes_obj:$des_obj:$sha1_obj" eq "::::");
982 }
983
984foreach (sort @experimental)
985 {
986 my $ALGO;
987 ($ALGO = $_) =~ tr/[a-z]/[A-Z]/;
988
989 # opensslconf.h will set OPENSSL_NO_... unless OPENSSL_EXPERIMENTAL_... is defined
990 $openssl_experimental_defines .= "#define OPENSSL_NO_$ALGO\n";
991 $cflags .= " -DOPENSSL_EXPERIMENTAL_$ALGO";
992 }
889 993
890foreach (sort (keys %disabled)) 994foreach (sort (keys %disabled))
891 { 995 {
@@ -936,7 +1040,7 @@ foreach (sort (keys %disabled))
936 push @skip, $algo; 1040 push @skip, $algo;
937 print " (skip dir)"; 1041 print " (skip dir)";
938 1042
939 $depflags .="-DOPENSSL_NO_$ALGO "; 1043 $depflags .= " -DOPENSSL_NO_$ALGO";
940 } 1044 }
941 } 1045 }
942 } 1046 }
@@ -949,10 +1053,22 @@ my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
949 1053
950$IsMK1MF=1 if ($target eq "mingw" && $^O ne "cygwin" && !is_msys()); 1054$IsMK1MF=1 if ($target eq "mingw" && $^O ne "cygwin" && !is_msys());
951 1055
1056$no_shared = 0 if ($fipsdso && !$IsMK1MF);
1057
952$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw"); 1058$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw");
953$exe_ext=".nlm" if ($target =~ /netware/); 1059$exe_ext=".nlm" if ($target =~ /netware/);
954$exe_ext=".pm" if ($target =~ /vos/); 1060$exe_ext=".pm" if ($target =~ /vos/);
955$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq ""); 1061if ($openssldir eq "" and $prefix eq "")
1062 {
1063 if ($fips)
1064 {
1065 $openssldir="/usr/local/ssl/fips";
1066 }
1067 else
1068 {
1069 $openssldir="/usr/local/ssl";
1070 }
1071 }
956$prefix=$openssldir if $prefix eq ""; 1072$prefix=$openssldir if $prefix eq "";
957 1073
958$default_ranlib= &which("ranlib") or $default_ranlib="true"; 1074$default_ranlib= &which("ranlib") or $default_ranlib="true";
@@ -960,7 +1076,7 @@ $perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl")
960 or $perl="perl"; 1076 or $perl="perl";
961 1077
962chop $openssldir if $openssldir =~ /\/$/; 1078chop $openssldir if $openssldir =~ /\/$/;
963chop $prefix if $prefix =~ /\/$/; 1079chop $prefix if $prefix =~ /.\/$/;
964 1080
965$openssldir=$prefix . "/ssl" if $openssldir eq ""; 1081$openssldir=$prefix . "/ssl" if $openssldir eq "";
966$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/])/; 1082$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/])/;
@@ -968,33 +1084,6 @@ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/]
968 1084
969print "IsMK1MF=$IsMK1MF\n"; 1085print "IsMK1MF=$IsMK1MF\n";
970 1086
971my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
972my $cc = $fields[$idx_cc];
973my $cflags = $fields[$idx_cflags];
974my $unistd = $fields[$idx_unistd];
975my $thread_cflag = $fields[$idx_thread_cflag];
976my $sys_id = $fields[$idx_sys_id];
977my $lflags = $fields[$idx_lflags];
978my $bn_ops = $fields[$idx_bn_ops];
979my $cpuid_obj = $fields[$idx_cpuid_obj];
980my $bn_obj = $fields[$idx_bn_obj];
981my $des_obj = $fields[$idx_des_obj];
982my $aes_obj = $fields[$idx_aes_obj];
983my $bf_obj = $fields[$idx_bf_obj];
984my $md5_obj = $fields[$idx_md5_obj];
985my $sha1_obj = $fields[$idx_sha1_obj];
986my $cast_obj = $fields[$idx_cast_obj];
987my $rc4_obj = $fields[$idx_rc4_obj];
988my $rmd160_obj = $fields[$idx_rmd160_obj];
989my $rc5_obj = $fields[$idx_rc5_obj];
990my $dso_scheme = $fields[$idx_dso_scheme];
991my $shared_target = $fields[$idx_shared_target];
992my $shared_cflag = $fields[$idx_shared_cflag];
993my $shared_ldflag = $fields[$idx_shared_ldflag];
994my $shared_extension = $fields[$idx_shared_extension];
995my $ranlib = $fields[$idx_ranlib];
996my $arflags = $fields[$idx_arflags];
997
998# '%' in $lflags is used to split flags to "pre-" and post-flags 1087# '%' in $lflags is used to split flags to "pre-" and post-flags
999my ($prelflags,$postlflags)=split('%',$lflags); 1088my ($prelflags,$postlflags)=split('%',$lflags);
1000if (defined($postlflags)) { $lflags=$postlflags; } 1089if (defined($postlflags)) { $lflags=$postlflags; }
@@ -1128,6 +1217,8 @@ if ($no_asm)
1128 { 1217 {
1129 $cpuid_obj=$bn_obj=$des_obj=$aes_obj=$bf_obj=$cast_obj=$rc4_obj=$rc5_obj=""; 1218 $cpuid_obj=$bn_obj=$des_obj=$aes_obj=$bf_obj=$cast_obj=$rc4_obj=$rc5_obj="";
1130 $sha1_obj=$md5_obj=$rmd160_obj=""; 1219 $sha1_obj=$md5_obj=$rmd160_obj="";
1220 $cflags=~s/\-D[BL]_ENDIAN// if ($fips);
1221 $thread_cflags=~s/\-D[BL]_ENDIAN// if ($fips);
1131 } 1222 }
1132if ($montasm) 1223if ($montasm)
1133 { 1224 {
@@ -1166,7 +1257,7 @@ if ($zlib)
1166my $shared_mark = ""; 1257my $shared_mark = "";
1167if ($shared_target eq "") 1258if ($shared_target eq "")
1168 { 1259 {
1169 $no_shared_warn = 1 if !$no_shared; 1260 $no_shared_warn = 1 if !$no_shared && !$fips;
1170 $no_shared = 1; 1261 $no_shared = 1;
1171 } 1262 }
1172if (!$no_shared) 1263if (!$no_shared)
@@ -1255,8 +1346,14 @@ $bn_obj = $bn_asm unless $bn_obj ne "";
1255# bn86* is the only one implementing bn_*_part_words 1346# bn86* is the only one implementing bn_*_part_words
1256$cflags.=" -DOPENSSL_BN_ASM_PART_WORDS" if ($bn_obj =~ /bn86/); 1347$cflags.=" -DOPENSSL_BN_ASM_PART_WORDS" if ($bn_obj =~ /bn86/);
1257$cflags.=" -DOPENSSL_IA32_SSE2" if (!$no_sse2 && $bn_obj =~ /bn86/); 1348$cflags.=" -DOPENSSL_IA32_SSE2" if (!$no_sse2 && $bn_obj =~ /bn86/);
1349
1258$cflags.=" -DOPENSSL_BN_ASM_MONT" if ($bn_obj =~ /\-mont|mo86\-/); 1350$cflags.=" -DOPENSSL_BN_ASM_MONT" if ($bn_obj =~ /\-mont|mo86\-/);
1259 1351
1352if ($fips)
1353 {
1354 $openssl_other_defines.="#define OPENSSL_FIPS\n";
1355 }
1356
1260$des_obj=$des_enc unless ($des_obj =~ /\.o$/); 1357$des_obj=$des_enc unless ($des_obj =~ /\.o$/);
1261$bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); 1358$bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/);
1262$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); 1359$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/);
@@ -1341,7 +1438,8 @@ while (<IN>)
1341 if ($sdirs) { 1438 if ($sdirs) {
1342 my $dir; 1439 my $dir;
1343 foreach $dir (@skip) { 1440 foreach $dir (@skip) {
1344 s/([ ])$dir /\1/; 1441 s/(\s)$dir\s/$1/;
1442 s/\s$dir$//;
1345 } 1443 }
1346 } 1444 }
1347 $sdirs = 0 unless /\\$/; 1445 $sdirs = 0 unless /\\$/;
@@ -1362,7 +1460,7 @@ while (<IN>)
1362 s/^CC=.*$/CC= $cc/; 1460 s/^CC=.*$/CC= $cc/;
1363 s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; 1461 s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
1364 s/^CFLAG=.*$/CFLAG= $cflags/; 1462 s/^CFLAG=.*$/CFLAG= $cflags/;
1365 s/^DEPFLAG=.*$/DEPFLAG= $depflags/; 1463 s/^DEPFLAG=.*$/DEPFLAG=$depflags/;
1366 s/^PEX_LIBS=.*$/PEX_LIBS= $prelflags/; 1464 s/^PEX_LIBS=.*$/PEX_LIBS= $prelflags/;
1367 s/^EX_LIBS=.*$/EX_LIBS= $lflags/; 1465 s/^EX_LIBS=.*$/EX_LIBS= $lflags/;
1368 s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/; 1466 s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
@@ -1385,9 +1483,24 @@ while (<IN>)
1385 s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/; 1483 s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/;
1386 s/^LIBZLIB=.*/LIBZLIB=$withargs{"zlib-lib"}/; 1484 s/^LIBZLIB=.*/LIBZLIB=$withargs{"zlib-lib"}/;
1387 s/^ZLIB_INCLUDE=.*/ZLIB_INCLUDE=$withargs{"zlib-include"}/; 1485 s/^ZLIB_INCLUDE=.*/ZLIB_INCLUDE=$withargs{"zlib-include"}/;
1486 s/^FIPSLIBDIR=.*/FIPSLIBDIR=$fipslibdir/;
1487 if ($fipsdso)
1488 {
1489 s/^FIPSCANLIB=.*/FIPSCANLIB=libfips/;
1490 s/^SHARED_FIPS=.*/SHARED_FIPS=libfips\$(SHLIB_EXT)/;
1491 s/^SHLIBDIRS=.*/SHLIBDIRS= crypto ssl fips/;
1492 }
1493 else
1494 {
1495 s/^FIPSCANLIB=.*/FIPSCANLIB=libcrypto/ if $fips;
1496 s/^SHARED_FIPS=.*/SHARED_FIPS=/;
1497 s/^SHLIBDIRS=.*/SHLIBDIRS= crypto ssl/;
1498 }
1499 s/^FIPSCANISTERINTERNAL=.*/FIPSCANISTERINTERNAL=$fipscanisterinternal/;
1500 s/^BASEADDR=.*/BASEADDR=$baseaddr/;
1388 s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/; 1501 s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/;
1389 s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/; 1502 s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/;
1390 s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared); 1503 s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_FIPS) \$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared);
1391 if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/) 1504 if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/)
1392 { 1505 {
1393 my $sotmp = $1; 1506 my $sotmp = $1;
@@ -1491,6 +1604,7 @@ print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configur
1491 1604
1492print OUT "/* OpenSSL was configured with the following options: */\n"; 1605print OUT "/* OpenSSL was configured with the following options: */\n";
1493my $openssl_algorithm_defines_trans = $openssl_algorithm_defines; 1606my $openssl_algorithm_defines_trans = $openssl_algorithm_defines;
1607$openssl_experimental_defines =~ s/^\s*#\s*define\s+OPENSSL_NO_(.*)/#ifndef OPENSSL_EXPERIMENTAL_$1\n# ifndef OPENSSL_NO_$1\n# define OPENSSL_NO_$1\n# endif\n#endif/mg;
1494$openssl_algorithm_defines_trans =~ s/^\s*#\s*define\s+OPENSSL_(.*)/# if defined(OPENSSL_$1) \&\& !defined($1)\n# define $1\n# endif/mg; 1608$openssl_algorithm_defines_trans =~ s/^\s*#\s*define\s+OPENSSL_(.*)/# if defined(OPENSSL_$1) \&\& !defined($1)\n# define $1\n# endif/mg;
1495$openssl_algorithm_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; 1609$openssl_algorithm_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg;
1496$openssl_algorithm_defines = " /* no ciphers excluded */\n" if $openssl_algorithm_defines eq ""; 1610$openssl_algorithm_defines = " /* no ciphers excluded */\n" if $openssl_algorithm_defines eq "";
@@ -1499,8 +1613,10 @@ $openssl_sys_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/
1499$openssl_other_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; 1613$openssl_other_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg;
1500print OUT $openssl_sys_defines; 1614print OUT $openssl_sys_defines;
1501print OUT "#ifndef OPENSSL_DOING_MAKEDEPEND\n\n"; 1615print OUT "#ifndef OPENSSL_DOING_MAKEDEPEND\n\n";
1616print OUT $openssl_experimental_defines;
1617print OUT "\n";
1502print OUT $openssl_algorithm_defines; 1618print OUT $openssl_algorithm_defines;
1503print OUT "\n#endif /* OPENSSL_DOING_MAKEDEPEND */\n"; 1619print OUT "\n#endif /* OPENSSL_DOING_MAKEDEPEND */\n\n";
1504print OUT $openssl_thread_defines; 1620print OUT $openssl_thread_defines;
1505print OUT $openssl_other_defines,"\n"; 1621print OUT $openssl_other_defines,"\n";
1506 1622
@@ -1682,9 +1798,16 @@ BEGIN
1682 BEGIN 1798 BEGIN
1683 BLOCK "040904b0" 1799 BLOCK "040904b0"
1684 BEGIN 1800 BEGIN
1801#if defined(FIPS)
1802 VALUE "Comments", "WARNING: TEST VERSION ONLY ***NOT*** FIPS 140-2 VALIDATED.\\0"
1803#endif
1685 // Required: 1804 // Required:
1686 VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0" 1805 VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0"
1806#if defined(FIPS)
1807 VALUE "FileDescription", "TEST UNVALIDATED FIPS140-2 DLL\\0"
1808#else
1687 VALUE "FileDescription", "OpenSSL Shared Library\\0" 1809 VALUE "FileDescription", "OpenSSL Shared Library\\0"
1810#endif
1688 VALUE "FileVersion", "$version\\0" 1811 VALUE "FileVersion", "$version\\0"
1689#if defined(CRYPTO) 1812#if defined(CRYPTO)
1690 VALUE "InternalName", "libeay32\\0" 1813 VALUE "InternalName", "libeay32\\0"
@@ -1692,12 +1815,15 @@ BEGIN
1692#elif defined(SSL) 1815#elif defined(SSL)
1693 VALUE "InternalName", "ssleay32\\0" 1816 VALUE "InternalName", "ssleay32\\0"
1694 VALUE "OriginalFilename", "ssleay32.dll\\0" 1817 VALUE "OriginalFilename", "ssleay32.dll\\0"
1818#elif defined(FIPS)
1819 VALUE "InternalName", "libosslfips\\0"
1820 VALUE "OriginalFilename", "libosslfips.dll\\0"
1695#endif 1821#endif
1696 VALUE "ProductName", "The OpenSSL Toolkit\\0" 1822 VALUE "ProductName", "The OpenSSL Toolkit\\0"
1697 VALUE "ProductVersion", "$version\\0" 1823 VALUE "ProductVersion", "$version\\0"
1698 // Optional: 1824 // Optional:
1699 //VALUE "Comments", "\\0" 1825 //VALUE "Comments", "\\0"
1700 VALUE "LegalCopyright", "Copyright © 1998-2005 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0" 1826 VALUE "LegalCopyright", "Copyright © 1998-2007 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0"
1701 //VALUE "LegalTrademarks", "\\0" 1827 //VALUE "LegalTrademarks", "\\0"
1702 //VALUE "PrivateBuild", "\\0" 1828 //VALUE "PrivateBuild", "\\0"
1703 //VALUE "SpecialBuild", "\\0" 1829 //VALUE "SpecialBuild", "\\0"
@@ -1734,6 +1860,21 @@ libraries on this platform, they will at least look at it and try their best
1734(but please first make sure you have tried with a current version of OpenSSL). 1860(but please first make sure you have tried with a current version of OpenSSL).
1735EOF 1861EOF
1736 1862
1863print <<\EOF if ($fipscanisterinternal eq "y");
1864
1865WARNING: OpenSSL has been configured using unsupported option(s) to internally
1866generate a fipscanister.o object module for TESTING PURPOSES ONLY; that
1867compiled module is NOT FIPS 140-2 validated and CANNOT be used to replace the
1868OpenSSL FIPS Object Module as identified by the CMVP
1869(http://csrc.nist.gov/cryptval/) in any application requiring the use of FIPS
1870140-2 validated software.
1871
1872This is an OpenSSL 0.9.8 test version.
1873
1874See the file README.FIPS for details of how to build a test library.
1875
1876EOF
1877
1737exit(0); 1878exit(0);
1738 1879
1739sub usage 1880sub usage
diff --git a/src/lib/libssl/src/FAQ b/src/lib/libssl/src/FAQ
index 1b14ffe9a4..ce71246fb8 100644
--- a/src/lib/libssl/src/FAQ
+++ b/src/lib/libssl/src/FAQ
@@ -78,7 +78,7 @@ OpenSSL - Frequently Asked Questions
78* Which is the current version of OpenSSL? 78* Which is the current version of OpenSSL?
79 79
80The current version is available from <URL: http://www.openssl.org>. 80The current version is available from <URL: http://www.openssl.org>.
81OpenSSL 0.9.8i was released on Sep 15th, 2008. 81OpenSSL 0.9.8j was released on Jan 7th, 2009.
82 82
83In addition to the current stable release, you can also access daily 83In addition to the current stable release, you can also access daily
84snapshots of the OpenSSL development version at <URL: 84snapshots of the OpenSSL development version at <URL:
diff --git a/src/lib/libssl/src/Makefile b/src/lib/libssl/src/Makefile
index 43b1d9796a..fe0fe16843 100644
--- a/src/lib/libssl/src/Makefile
+++ b/src/lib/libssl/src/Makefile
@@ -4,7 +4,7 @@
4## Makefile for OpenSSL 4## Makefile for OpenSSL
5## 5##
6 6
7VERSION=0.9.8i 7VERSION=0.9.8j
8MAJOR=0 8MAJOR=0
9MINOR=9.8 9MINOR=9.8
10SHLIB_VERSION_NUMBER=0.9.8 10SHLIB_VERSION_NUMBER=0.9.8
@@ -13,7 +13,7 @@ SHLIB_MAJOR=0
13SHLIB_MINOR=9.8 13SHLIB_MINOR=9.8
14SHLIB_EXT= 14SHLIB_EXT=
15PLATFORM=dist 15PLATFORM=dist
16OPTIONS= no-camellia no-capieng no-cms no-gmp no-krb5 no-mdc2 no-montasm no-rc5 no-rfc3779 no-seed no-shared no-tlsext no-zlib no-zlib-dynamic 16OPTIONS= no-camellia no-capieng no-cms no-gmp no-jpake no-krb5 no-mdc2 no-montasm no-rc5 no-rfc3779 no-seed no-shared no-zlib no-zlib-dynamic
17CONFIGURE_ARGS=dist 17CONFIGURE_ARGS=dist
18SHLIB_TARGET= 18SHLIB_TARGET=
19 19
@@ -61,12 +61,13 @@ OPENSSLDIR=/usr/local/ssl
61 61
62CC= cc 62CC= cc
63CFLAG= -O 63CFLAG= -O
64DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_TLSEXT 64DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED
65PEX_LIBS= 65PEX_LIBS=
66EX_LIBS= 66EX_LIBS=
67EXE_EXT= 67EXE_EXT=
68ARFLAGS= 68ARFLAGS=
69AR=ar $(ARFLAGS) r 69AR=ar $(ARFLAGS) r
70ARD=ar $(ARFLAGS) d
70RANLIB= /usr/bin/ranlib 71RANLIB= /usr/bin/ranlib
71PERL= /usr/bin/perl 72PERL= /usr/bin/perl
72TAR= tar 73TAR= tar
@@ -106,7 +107,33 @@ LIBKRB5=
106ZLIB_INCLUDE= 107ZLIB_INCLUDE=
107LIBZLIB= 108LIBZLIB=
108 109
109DIRS= crypto ssl engines apps test tools 110# This is the location of fipscanister.o and friends.
111# The FIPS module build will place it $(INSTALLTOP)/lib
112# but since $(INSTALLTOP) can only take the default value
113# when the module is built it will be in /usr/local/ssl/lib
114# $(INSTALLTOP) for this build make be different so hard
115# code the path.
116
117FIPSLIBDIR=/usr/local/ssl/fips-1.0/lib/
118
119# This is set to "y" if fipscanister.o is compiled internally as
120# opposed to coming from an external validated location.
121
122FIPSCANISTERINTERNAL=n
123
124# The location of the library which contains fipscanister.o
125# normally it will be libcrypto unless fipsdso is set in which
126# case it will be libfips. If not compiling in FIPS mode at all
127# this is empty making it a useful test for a FIPS compile.
128
129FIPSCANLIB=
130
131# Shared library base address. Currently only used on Windows.
132#
133
134BASEADDR=0xFB00000
135
136DIRS= crypto fips ssl engines apps test tools
110SHLIBDIRS= crypto ssl 137SHLIBDIRS= crypto ssl
111 138
112# dirs in crypto to build 139# dirs in crypto to build
@@ -140,6 +167,7 @@ WDIRS= windows
140LIBS= libcrypto.a libssl.a 167LIBS= libcrypto.a libssl.a
141SHARED_CRYPTO=libcrypto$(SHLIB_EXT) 168SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
142SHARED_SSL=libssl$(SHLIB_EXT) 169SHARED_SSL=libssl$(SHLIB_EXT)
170SHARED_FIPS=
143SHARED_LIBS= 171SHARED_LIBS=
144SHARED_LIBS_LINK_EXTS= 172SHARED_LIBS_LINK_EXTS=
145SHARED_LDFLAGS= 173SHARED_LDFLAGS=
@@ -193,6 +221,10 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
193 SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \ 221 SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \
194 MD5_ASM_OBJ='${MD5_ASM_OBJ}' \ 222 MD5_ASM_OBJ='${MD5_ASM_OBJ}' \
195 RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \ 223 RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \
224 FIPSLIBDIR='${FIPSLIBDIR}' \
225 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
226 FIPSCANISTERINTERNAL='${FIPSCANISTERINTERNAL}' \
227 FIPS_EX_OBJ='${FIPS_EX_OBJ}' \
196 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES= 228 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
197# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors, 229# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
198# which in turn eliminates ambiguities in variable treatment with -e. 230# which in turn eliminates ambiguities in variable treatment with -e.
@@ -211,7 +243,8 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
211# subdirectories defined in $(DIRS). It requires that the target 243# subdirectories defined in $(DIRS). It requires that the target
212# is given through the shell variable `target'. 244# is given through the shell variable `target'.
213BUILD_CMD= if [ -d "$$dir" ]; then \ 245BUILD_CMD= if [ -d "$$dir" ]; then \
214 ( cd $$dir && echo "making $$target in $$dir..." && \ 246 ( [ $$target != all -a -z "$(FIPSCANLIB)" ] && FIPSCANLIB=/dev/null; \
247 cd $$dir && echo "making $$target in $$dir..." && \
215 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \ 248 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
216 ) || exit 1; \ 249 ) || exit 1; \
217 fi 250 fi
@@ -224,13 +257,84 @@ BUILD_ONE_CMD=\
224reflect: 257reflect:
225 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) 258 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
226 259
260FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \
261 ../crypto/aes/aes_ecb.o \
262 ../crypto/aes/aes_ofb.o \
263 ../crypto/bn/bn_add.o \
264 ../crypto/bn/bn_blind.o \
265 ../crypto/bn/bn_ctx.o \
266 ../crypto/bn/bn_div.o \
267 ../crypto/bn/bn_exp2.o \
268 ../crypto/bn/bn_exp.o \
269 ../crypto/bn/bn_gcd.o \
270 ../crypto/bn/bn_lib.o \
271 ../crypto/bn/bn_mod.o \
272 ../crypto/bn/bn_mont.o \
273 ../crypto/bn/bn_mul.o \
274 ../crypto/bn/bn_prime.o \
275 ../crypto/bn/bn_rand.o \
276 ../crypto/bn/bn_recp.o \
277 ../crypto/bn/bn_shift.o \
278 ../crypto/bn/bn_sqr.o \
279 ../crypto/bn/bn_word.o \
280 ../crypto/bn/bn_x931p.o \
281 ../crypto/buffer/buf_str.o \
282 ../crypto/cryptlib.o \
283 ../crypto/des/cfb64ede.o \
284 ../crypto/des/cfb64enc.o \
285 ../crypto/des/cfb_enc.o \
286 ../crypto/des/ecb3_enc.o \
287 ../crypto/des/ecb_enc.o \
288 ../crypto/des/ofb64ede.o \
289 ../crypto/des/ofb64enc.o \
290 ../crypto/des/fcrypt.o \
291 ../crypto/des/set_key.o \
292 ../crypto/dsa/dsa_utl.o \
293 ../crypto/dsa/dsa_sign.o \
294 ../crypto/dsa/dsa_vrf.o \
295 ../crypto/err/err.o \
296 ../crypto/evp/digest.o \
297 ../crypto/evp/enc_min.o \
298 ../crypto/evp/e_aes.o \
299 ../crypto/evp/e_des3.o \
300 ../crypto/evp/p_sign.o \
301 ../crypto/evp/p_verify.o \
302 ../crypto/mem_clr.o \
303 ../crypto/mem.o \
304 ../crypto/rand/md_rand.o \
305 ../crypto/rand/rand_egd.o \
306 ../crypto/rand/randfile.o \
307 ../crypto/rand/rand_lib.o \
308 ../crypto/rand/rand_os2.o \
309 ../crypto/rand/rand_unix.o \
310 ../crypto/rand/rand_win.o \
311 ../crypto/rsa/rsa_lib.o \
312 ../crypto/rsa/rsa_none.o \
313 ../crypto/rsa/rsa_oaep.o \
314 ../crypto/rsa/rsa_pk1.o \
315 ../crypto/rsa/rsa_pss.o \
316 ../crypto/rsa/rsa_ssl.o \
317 ../crypto/rsa/rsa_x931.o \
318 ../crypto/sha/sha1dgst.o \
319 ../crypto/sha/sha256.o \
320 ../crypto/sha/sha512.o \
321 ../crypto/uid.o
322
227sub_all: build_all 323sub_all: build_all
228build_all: build_libs build_apps build_tests build_tools 324build_all: build_libs build_apps build_tests build_tools
229 325
230build_libs: build_crypto build_ssl build_engines 326build_libs: build_crypto build_fips build_ssl build_shared build_engines
231 327
232build_crypto: 328build_crypto:
233 @dir=crypto; target=all; $(BUILD_ONE_CMD) 329 if [ -n "$(FIPSCANLIB)" ]; then \
330 EXCL_OBJ='$(AES_ASM_OBJ) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ) $(SHA1_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \
331 ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \
332 else \
333 ARX='${AR}' ; \
334 fi ; export ARX ; \
335 dir=crypto; target=all; $(BUILD_ONE_CMD)
336build_fips:
337 @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
234build_ssl: 338build_ssl:
235 @dir=ssl; target=all; $(BUILD_ONE_CMD) 339 @dir=ssl; target=all; $(BUILD_ONE_CMD)
236build_engines: 340build_engines:
@@ -246,9 +350,20 @@ all_testapps: build_libs build_testapps
246build_testapps: 350build_testapps:
247 @dir=crypto; target=testapps; $(BUILD_ONE_CMD) 351 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
248 352
249libcrypto$(SHLIB_EXT): libcrypto.a 353build_shared: $(SHARED_LIBS)
354libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
250 @if [ "$(SHLIB_TARGET)" != "" ]; then \ 355 @if [ "$(SHLIB_TARGET)" != "" ]; then \
251 $(MAKE) SHLIBDIRS=crypto build-shared; \ 356 if [ "$(FIPSCANLIB)" = "libfips" ]; then \
357 $(ARD) libcrypto.a fipscanister.o ; \
358 $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
359 $(AR) libcrypto.a fips/fipscanister.o ; \
360 else \
361 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
362 FIPSLD_CC=$(CC); CC=fips/fipsld; \
363 export CC FIPSLD_CC; \
364 fi; \
365 $(MAKE) -e SHLIBDIRS='crypto' build-shared; \
366 fi \
252 else \ 367 else \
253 echo "There's no support for shared libraries on this platform" >&2; \ 368 echo "There's no support for shared libraries on this platform" >&2; \
254 exit 1; \ 369 exit 1; \
@@ -256,12 +371,32 @@ libcrypto$(SHLIB_EXT): libcrypto.a
256 371
257libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a 372libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
258 @if [ "$(SHLIB_TARGET)" != "" ]; then \ 373 @if [ "$(SHLIB_TARGET)" != "" ]; then \
259 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ 374 shlibdeps=-lcrypto; \
375 [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
376 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
377 else \
378 echo "There's no support for shared libraries on this platform" >&2 ; \
379 exit 1; \
380 fi
381
382fips/fipscanister.o: build_fips
383libfips$(SHLIB_EXT): fips/fipscanister.o
384 @if [ "$(SHLIB_TARGET)" != "" ]; then \
385 FIPSLD_CC=$(CC); CC=fips/fipsld; export CC FIPSLD_CC; \
386 $(MAKE) -f Makefile.shared -e $(BUILDENV) \
387 CC=$${CC} LIBNAME=fips THIS=$@ \
388 LIBEXTRAS=fips/fipscanister.o \
389 LIBDEPS="$(EX_LIBS)" \
390 LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
391 link_o.$(SHLIB_TARGET) || { rm -f $@; exit 1; } \
260 else \ 392 else \
261 echo "There's no support for shared libraries on this platform" >&2; \ 393 echo "There's no support for shared libraries on this platform" >&2; \
262 exit 1; \ 394 exit 1; \
263 fi 395 fi
264 396
397libfips.a:
398 dir=fips; target=all; $(BUILD_ONE_CMD)
399
265clean-shared: 400clean-shared:
266 @set -e; for i in $(SHLIBDIRS); do \ 401 @set -e; for i in $(SHLIBDIRS); do \
267 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \ 402 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
diff --git a/src/lib/libssl/src/Makefile.org b/src/lib/libssl/src/Makefile.org
index 22b1699257..4be7dad7d6 100644
--- a/src/lib/libssl/src/Makefile.org
+++ b/src/lib/libssl/src/Makefile.org
@@ -65,6 +65,7 @@ EX_LIBS=
65EXE_EXT= 65EXE_EXT=
66ARFLAGS= 66ARFLAGS=
67AR=ar $(ARFLAGS) r 67AR=ar $(ARFLAGS) r
68ARD=ar $(ARFLAGS) d
68RANLIB= ranlib 69RANLIB= ranlib
69PERL= perl 70PERL= perl
70TAR= tar 71TAR= tar
@@ -104,8 +105,34 @@ LIBKRB5=
104ZLIB_INCLUDE= 105ZLIB_INCLUDE=
105LIBZLIB= 106LIBZLIB=
106 107
107DIRS= crypto ssl engines apps test tools 108# This is the location of fipscanister.o and friends.
108SHLIBDIRS= crypto ssl 109# The FIPS module build will place it $(INSTALLTOP)/lib
110# but since $(INSTALLTOP) can only take the default value
111# when the module is built it will be in /usr/local/ssl/lib
112# $(INSTALLTOP) for this build make be different so hard
113# code the path.
114
115FIPSLIBDIR=/usr/local/ssl/lib/
116
117# This is set to "y" if fipscanister.o is compiled internally as
118# opposed to coming from an external validated location.
119
120FIPSCANISTERINTERNAL=n
121
122# The location of the library which contains fipscanister.o
123# normally it will be libcrypto unless fipsdso is set in which
124# case it will be libfips. If not compiling in FIPS mode at all
125# this is empty making it a useful test for a FIPS compile.
126
127FIPSCANLIB=
128
129# Shared library base address. Currently only used on Windows.
130#
131
132BASEADDR=
133
134DIRS= crypto fips ssl engines apps test tools
135SHLIBDIRS= crypto ssl fips
109 136
110# dirs in crypto to build 137# dirs in crypto to build
111SDIRS= \ 138SDIRS= \
@@ -115,7 +142,7 @@ SDIRS= \
115 bn ec rsa dsa ecdsa dh ecdh dso engine \ 142 bn ec rsa dsa ecdsa dh ecdh dso engine \
116 buffer bio stack lhash rand err \ 143 buffer bio stack lhash rand err \
117 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \ 144 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
118 store cms pqueue 145 store cms pqueue jpake
119# keep in mind that the above list is adjusted by ./Configure 146# keep in mind that the above list is adjusted by ./Configure
120# according to no-xxx arguments... 147# according to no-xxx arguments...
121 148
@@ -138,6 +165,7 @@ WDIRS= windows
138LIBS= libcrypto.a libssl.a 165LIBS= libcrypto.a libssl.a
139SHARED_CRYPTO=libcrypto$(SHLIB_EXT) 166SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
140SHARED_SSL=libssl$(SHLIB_EXT) 167SHARED_SSL=libssl$(SHLIB_EXT)
168SHARED_FIPS=
141SHARED_LIBS= 169SHARED_LIBS=
142SHARED_LIBS_LINK_EXTS= 170SHARED_LIBS_LINK_EXTS=
143SHARED_LDFLAGS= 171SHARED_LDFLAGS=
@@ -191,6 +219,10 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
191 SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \ 219 SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \
192 MD5_ASM_OBJ='${MD5_ASM_OBJ}' \ 220 MD5_ASM_OBJ='${MD5_ASM_OBJ}' \
193 RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \ 221 RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \
222 FIPSLIBDIR='${FIPSLIBDIR}' \
223 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
224 FIPSCANISTERINTERNAL='${FIPSCANISTERINTERNAL}' \
225 FIPS_EX_OBJ='${FIPS_EX_OBJ}' \
194 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES= 226 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
195# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors, 227# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
196# which in turn eliminates ambiguities in variable treatment with -e. 228# which in turn eliminates ambiguities in variable treatment with -e.
@@ -209,7 +241,8 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
209# subdirectories defined in $(DIRS). It requires that the target 241# subdirectories defined in $(DIRS). It requires that the target
210# is given through the shell variable `target'. 242# is given through the shell variable `target'.
211BUILD_CMD= if [ -d "$$dir" ]; then \ 243BUILD_CMD= if [ -d "$$dir" ]; then \
212 ( cd $$dir && echo "making $$target in $$dir..." && \ 244 ( [ $$target != all -a -z "$(FIPSCANLIB)" ] && FIPSCANLIB=/dev/null; \
245 cd $$dir && echo "making $$target in $$dir..." && \
213 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \ 246 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
214 ) || exit 1; \ 247 ) || exit 1; \
215 fi 248 fi
@@ -222,13 +255,84 @@ BUILD_ONE_CMD=\
222reflect: 255reflect:
223 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) 256 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
224 257
258FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \
259 ../crypto/aes/aes_ecb.o \
260 ../crypto/aes/aes_ofb.o \
261 ../crypto/bn/bn_add.o \
262 ../crypto/bn/bn_blind.o \
263 ../crypto/bn/bn_ctx.o \
264 ../crypto/bn/bn_div.o \
265 ../crypto/bn/bn_exp2.o \
266 ../crypto/bn/bn_exp.o \
267 ../crypto/bn/bn_gcd.o \
268 ../crypto/bn/bn_lib.o \
269 ../crypto/bn/bn_mod.o \
270 ../crypto/bn/bn_mont.o \
271 ../crypto/bn/bn_mul.o \
272 ../crypto/bn/bn_prime.o \
273 ../crypto/bn/bn_rand.o \
274 ../crypto/bn/bn_recp.o \
275 ../crypto/bn/bn_shift.o \
276 ../crypto/bn/bn_sqr.o \
277 ../crypto/bn/bn_word.o \
278 ../crypto/bn/bn_x931p.o \
279 ../crypto/buffer/buf_str.o \
280 ../crypto/cryptlib.o \
281 ../crypto/des/cfb64ede.o \
282 ../crypto/des/cfb64enc.o \
283 ../crypto/des/cfb_enc.o \
284 ../crypto/des/ecb3_enc.o \
285 ../crypto/des/ecb_enc.o \
286 ../crypto/des/ofb64ede.o \
287 ../crypto/des/ofb64enc.o \
288 ../crypto/des/fcrypt.o \
289 ../crypto/des/set_key.o \
290 ../crypto/dsa/dsa_utl.o \
291 ../crypto/dsa/dsa_sign.o \
292 ../crypto/dsa/dsa_vrf.o \
293 ../crypto/err/err.o \
294 ../crypto/evp/digest.o \
295 ../crypto/evp/enc_min.o \
296 ../crypto/evp/e_aes.o \
297 ../crypto/evp/e_des3.o \
298 ../crypto/evp/p_sign.o \
299 ../crypto/evp/p_verify.o \
300 ../crypto/mem_clr.o \
301 ../crypto/mem.o \
302 ../crypto/rand/md_rand.o \
303 ../crypto/rand/rand_egd.o \
304 ../crypto/rand/randfile.o \
305 ../crypto/rand/rand_lib.o \
306 ../crypto/rand/rand_os2.o \
307 ../crypto/rand/rand_unix.o \
308 ../crypto/rand/rand_win.o \
309 ../crypto/rsa/rsa_lib.o \
310 ../crypto/rsa/rsa_none.o \
311 ../crypto/rsa/rsa_oaep.o \
312 ../crypto/rsa/rsa_pk1.o \
313 ../crypto/rsa/rsa_pss.o \
314 ../crypto/rsa/rsa_ssl.o \
315 ../crypto/rsa/rsa_x931.o \
316 ../crypto/sha/sha1dgst.o \
317 ../crypto/sha/sha256.o \
318 ../crypto/sha/sha512.o \
319 ../crypto/uid.o
320
225sub_all: build_all 321sub_all: build_all
226build_all: build_libs build_apps build_tests build_tools 322build_all: build_libs build_apps build_tests build_tools
227 323
228build_libs: build_crypto build_ssl build_engines 324build_libs: build_crypto build_fips build_ssl build_shared build_engines
229 325
230build_crypto: 326build_crypto:
231 @dir=crypto; target=all; $(BUILD_ONE_CMD) 327 if [ -n "$(FIPSCANLIB)" ]; then \
328 EXCL_OBJ='$(AES_ASM_OBJ) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ) $(SHA1_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \
329 ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \
330 else \
331 ARX='${AR}' ; \
332 fi ; export ARX ; \
333 dir=crypto; target=all; $(BUILD_ONE_CMD)
334build_fips:
335 @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
232build_ssl: 336build_ssl:
233 @dir=ssl; target=all; $(BUILD_ONE_CMD) 337 @dir=ssl; target=all; $(BUILD_ONE_CMD)
234build_engines: 338build_engines:
@@ -244,9 +348,20 @@ all_testapps: build_libs build_testapps
244build_testapps: 348build_testapps:
245 @dir=crypto; target=testapps; $(BUILD_ONE_CMD) 349 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
246 350
247libcrypto$(SHLIB_EXT): libcrypto.a 351build_shared: $(SHARED_LIBS)
352libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
248 @if [ "$(SHLIB_TARGET)" != "" ]; then \ 353 @if [ "$(SHLIB_TARGET)" != "" ]; then \
249 $(MAKE) SHLIBDIRS=crypto build-shared; \ 354 if [ "$(FIPSCANLIB)" = "libfips" ]; then \
355 $(ARD) libcrypto.a fipscanister.o ; \
356 $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
357 $(AR) libcrypto.a fips/fipscanister.o ; \
358 else \
359 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
360 FIPSLD_CC=$(CC); CC=fips/fipsld; \
361 export CC FIPSLD_CC; \
362 fi; \
363 $(MAKE) -e SHLIBDIRS='crypto' build-shared; \
364 fi \
250 else \ 365 else \
251 echo "There's no support for shared libraries on this platform" >&2; \ 366 echo "There's no support for shared libraries on this platform" >&2; \
252 exit 1; \ 367 exit 1; \
@@ -254,12 +369,32 @@ libcrypto$(SHLIB_EXT): libcrypto.a
254 369
255libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a 370libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
256 @if [ "$(SHLIB_TARGET)" != "" ]; then \ 371 @if [ "$(SHLIB_TARGET)" != "" ]; then \
257 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ 372 shlibdeps=-lcrypto; \
373 [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
374 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
375 else \
376 echo "There's no support for shared libraries on this platform" >&2 ; \
377 exit 1; \
378 fi
379
380fips/fipscanister.o: build_fips
381libfips$(SHLIB_EXT): fips/fipscanister.o
382 @if [ "$(SHLIB_TARGET)" != "" ]; then \
383 FIPSLD_CC=$(CC); CC=fips/fipsld; export CC FIPSLD_CC; \
384 $(MAKE) -f Makefile.shared -e $(BUILDENV) \
385 CC=$${CC} LIBNAME=fips THIS=$@ \
386 LIBEXTRAS=fips/fipscanister.o \
387 LIBDEPS="$(EX_LIBS)" \
388 LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
389 link_o.$(SHLIB_TARGET) || { rm -f $@; exit 1; } \
258 else \ 390 else \
259 echo "There's no support for shared libraries on this platform" >&2; \ 391 echo "There's no support for shared libraries on this platform" >&2; \
260 exit 1; \ 392 exit 1; \
261 fi 393 fi
262 394
395libfips.a:
396 dir=fips; target=all; $(BUILD_ONE_CMD)
397
263clean-shared: 398clean-shared:
264 @set -e; for i in $(SHLIBDIRS); do \ 399 @set -e; for i in $(SHLIBDIRS); do \
265 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \ 400 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
diff --git a/src/lib/libssl/src/Makefile.shared b/src/lib/libssl/src/Makefile.shared
index c6006f70bf..3183436ac6 100644
--- a/src/lib/libssl/src/Makefile.shared
+++ b/src/lib/libssl/src/Makefile.shared
@@ -101,15 +101,13 @@ LINK_SO= \
101 LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \ 101 LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
102 SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \ 102 SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
103 SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ 103 SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
104 nm -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' ' > lib$(LIBNAME).exp; \
105 LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \ 104 LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
106 LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ 105 LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
107 LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ 106 LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
108 $${SHAREDCMD} $${SHAREDFLAGS} \ 107 $${SHAREDCMD} $${SHAREDFLAGS} \
109 -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ 108 -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
110 $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \ 109 $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
111 ) && $(SYMLINK_SO); \ 110 ) && $(SYMLINK_SO)
112 ( $(SET_X); rm -f lib$(LIBNAME).exp )
113 111
114SYMLINK_SO= \ 112SYMLINK_SO= \
115 if [ -n "$$INHIBIT_SYMLINKS" ]; then :; else \ 113 if [ -n "$$INHIBIT_SYMLINKS" ]; then :; else \
@@ -202,8 +200,10 @@ link_app.bsd:
202# to use native NSModule(3) API and refers to dlfcn as termporary hack. 200# to use native NSModule(3) API and refers to dlfcn as termporary hack.
203link_o.darwin: 201link_o.darwin:
204 @ $(CALC_VERSIONS); \ 202 @ $(CALC_VERSIONS); \
205 SHLIB=lib$(LIBNAME); \ 203 SHLIB=`expr "$$THIS" : '.*/\([^/\.]*\)\.'`; \
206 SHLIB_SUFFIX=.so; \ 204 SHLIB=$${SHLIB:-lib$(LIBNAME)}; \
205 SHLIB_SUFFIX=`expr "$$THIS" : '.*\(\.[^\.]*\)$$'`; \
206 SHLIB_SUFFIX=$${SHLIB_SUFFIX:-.so}; \
207 ALLSYMSFLAGS='-all_load'; \ 207 ALLSYMSFLAGS='-all_load'; \
208 NOALLSYMSFLAGS=''; \ 208 NOALLSYMSFLAGS=''; \
209 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS)"; \ 209 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS)"; \
diff --git a/src/lib/libssl/src/NEWS b/src/lib/libssl/src/NEWS
index 6488ffa122..322c3848f2 100644
--- a/src/lib/libssl/src/NEWS
+++ b/src/lib/libssl/src/NEWS
@@ -5,6 +5,11 @@
5 This file gives a brief overview of the major changes between each OpenSSL 5 This file gives a brief overview of the major changes between each OpenSSL
6 release. For more details please read the CHANGES file. 6 release. For more details please read the CHANGES file.
7 7
8 Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j:
9
10 o Fix security issue (CVE-2008-5077)
11 o Merge FIPS 140-2 branch code.
12
8 Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h: 13 Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h:
9 14
10 o CryptoAPI ENGINE support. 15 o CryptoAPI ENGINE support.
diff --git a/src/lib/libssl/src/README b/src/lib/libssl/src/README
index a2d87d4a49..b3baac4a36 100644
--- a/src/lib/libssl/src/README
+++ b/src/lib/libssl/src/README
@@ -1,5 +1,5 @@
1 1
2 OpenSSL 0.9.8i 2 OpenSSL 0.9.8j
3 3
4 Copyright (c) 1998-2008 The OpenSSL Project 4 Copyright (c) 1998-2008 The OpenSSL Project
5 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson 5 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
diff --git a/src/lib/libssl/src/apps/Makefile b/src/lib/libssl/src/apps/Makefile
index 7eade4e274..402981aede 100644
--- a/src/lib/libssl/src/apps/Makefile
+++ b/src/lib/libssl/src/apps/Makefile
@@ -152,10 +152,13 @@ $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
152 $(RM) $(EXE) 152 $(RM) $(EXE)
153 shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \ 153 shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
154 shlib_target="$(SHLIB_TARGET)"; \ 154 shlib_target="$(SHLIB_TARGET)"; \
155 elif [ -n "$(FIPSCANLIB)" ]; then \
156 FIPSLD_CC=$(CC); CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
155 fi; \ 157 fi; \
156 LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \ 158 LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \
159 [ "x$(FIPSCANLIB)" = "xlibfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
157 $(MAKE) -f $(TOP)/Makefile.shared -e \ 160 $(MAKE) -f $(TOP)/Makefile.shared -e \
158 APPNAME=$(EXE) OBJECTS="$(PROGRAM).o $(E_OBJ)" \ 161 CC=$${CC} APPNAME=$(EXE) OBJECTS="$(PROGRAM).o $(E_OBJ)" \
159 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \ 162 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
160 link_app.$${shlib_target} 163 link_app.$${shlib_target}
161 -(cd ..; \ 164 -(cd ..; \
@@ -173,65 +176,66 @@ app_rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
173app_rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 176app_rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
174app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 177app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
175app_rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 178app_rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
176app_rand.o: ../include/openssl/evp.h ../include/openssl/lhash.h 179app_rand.o: ../include/openssl/evp.h ../include/openssl/fips.h
177app_rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 180app_rand.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
178app_rand.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 181app_rand.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
179app_rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 182app_rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
180app_rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 183app_rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
181app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h 184app_rand.o: ../include/openssl/rand.h ../include/openssl/safestack.h
182app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 185app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h
183app_rand.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 186app_rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
184app_rand.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h 187app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
185app_rand.o: app_rand.c apps.h 188app_rand.o: ../include/openssl/x509v3.h app_rand.c apps.h
186apps.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 189apps.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
187apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h 190apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h
188apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h 191apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h
189apps.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 192apps.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
190apps.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 193apps.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
191apps.o: ../include/openssl/engine.h ../include/openssl/err.h 194apps.o: ../include/openssl/engine.h ../include/openssl/err.h
192apps.o: ../include/openssl/evp.h ../include/openssl/lhash.h 195apps.o: ../include/openssl/evp.h ../include/openssl/fips.h
193apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 196apps.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
194apps.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 197apps.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
195apps.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 198apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
196apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h 199apps.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
197apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h 200apps.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
198apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 201apps.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
199apps.o: ../include/openssl/sha.h ../include/openssl/stack.h 202apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h
200apps.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 203apps.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
201apps.o: ../include/openssl/ui.h ../include/openssl/x509.h 204apps.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
202apps.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.c apps.h 205apps.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
206apps.o: ../include/openssl/x509v3.h apps.c apps.h
203asn1pars.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 207asn1pars.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
204asn1pars.o: ../include/openssl/buffer.h ../include/openssl/conf.h 208asn1pars.o: ../include/openssl/buffer.h ../include/openssl/conf.h
205asn1pars.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 209asn1pars.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
206asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 210asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
207asn1pars.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 211asn1pars.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
208asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h 212asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h
209asn1pars.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 213asn1pars.o: ../include/openssl/fips.h ../include/openssl/lhash.h
210asn1pars.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 214asn1pars.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
211asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 215asn1pars.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
212asn1pars.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 216asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
213asn1pars.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 217asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h
214asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h 218asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
215asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 219asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h
216asn1pars.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 220asn1pars.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
217asn1pars.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 221asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
218asn1pars.o: asn1pars.c 222asn1pars.o: ../include/openssl/x509v3.h apps.h asn1pars.c
219ca.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 223ca.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
220ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h 224ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h
221ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h 225ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h
222ca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 226ca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
223ca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 227ca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
224ca.o: ../include/openssl/engine.h ../include/openssl/err.h 228ca.o: ../include/openssl/engine.h ../include/openssl/err.h
225ca.o: ../include/openssl/evp.h ../include/openssl/lhash.h 229ca.o: ../include/openssl/evp.h ../include/openssl/fips.h
226ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 230ca.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
227ca.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 231ca.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
228ca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 232ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
229ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h 233ca.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
230ca.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h 234ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
231ca.o: ../include/openssl/sha.h ../include/openssl/stack.h 235ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h
232ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 236ca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
233ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 237ca.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
234ca.o: ../include/openssl/x509v3.h apps.h ca.c 238ca.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ca.c
235ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 239ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
236ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h 240ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h
237ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h 241ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -239,82 +243,83 @@ ciphers.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
239ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 243ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
240ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 244ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
241ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h 245ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h
242ciphers.o: ../include/openssl/evp.h ../include/openssl/hmac.h 246ciphers.o: ../include/openssl/evp.h ../include/openssl/fips.h
243ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 247ciphers.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
244ciphers.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 248ciphers.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
245ciphers.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 249ciphers.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
246ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 250ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
247ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h 251ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
248ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 252ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
249ciphers.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h 253ciphers.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
250ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h 254ciphers.o: ../include/openssl/safestack.h ../include/openssl/sha.h
251ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 255ciphers.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
252ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 256ciphers.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
253ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 257ciphers.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
254ciphers.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 258ciphers.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
255ciphers.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 259ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
256ciphers.o: ciphers.c 260ciphers.o: ../include/openssl/x509v3.h apps.h ciphers.c
257cms.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 261cms.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
258cms.o: ../include/openssl/buffer.h ../include/openssl/conf.h 262cms.o: ../include/openssl/buffer.h ../include/openssl/conf.h
259cms.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 263cms.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
260cms.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 264cms.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
261cms.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 265cms.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
262cms.o: ../include/openssl/evp.h ../include/openssl/lhash.h 266cms.o: ../include/openssl/evp.h ../include/openssl/fips.h
263cms.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 267cms.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
264cms.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 268cms.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
265cms.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 269cms.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
266cms.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h 270cms.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
267cms.o: ../include/openssl/sha.h ../include/openssl/stack.h 271cms.o: ../include/openssl/safestack.h ../include/openssl/sha.h
268cms.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 272cms.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
269cms.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 273cms.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
270cms.o: ../include/openssl/x509v3.h apps.h cms.c 274cms.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h cms.c
271crl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 275crl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
272crl.o: ../include/openssl/buffer.h ../include/openssl/conf.h 276crl.o: ../include/openssl/buffer.h ../include/openssl/conf.h
273crl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 277crl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
274crl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 278crl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
275crl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 279crl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
276crl.o: ../include/openssl/err.h ../include/openssl/evp.h 280crl.o: ../include/openssl/err.h ../include/openssl/evp.h
277crl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 281crl.o: ../include/openssl/fips.h ../include/openssl/lhash.h
278crl.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 282crl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
279crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 283crl.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
280crl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 284crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
281crl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 285crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
282crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h 286crl.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
283crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 287crl.o: ../include/openssl/sha.h ../include/openssl/stack.h
284crl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 288crl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
285crl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h crl.c 289crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
290crl.o: ../include/openssl/x509v3.h apps.h crl.c
286crl2p7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 291crl2p7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
287crl2p7.o: ../include/openssl/buffer.h ../include/openssl/conf.h 292crl2p7.o: ../include/openssl/buffer.h ../include/openssl/conf.h
288crl2p7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 293crl2p7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
289crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 294crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
290crl2p7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 295crl2p7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
291crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h 296crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h
292crl2p7.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 297crl2p7.o: ../include/openssl/fips.h ../include/openssl/lhash.h
293crl2p7.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 298crl2p7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
294crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 299crl2p7.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
295crl2p7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 300crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
296crl2p7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 301crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
297crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h 302crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
298crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 303crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h
299crl2p7.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 304crl2p7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
300crl2p7.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 305crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
301crl2p7.o: crl2p7.c 306crl2p7.o: ../include/openssl/x509v3.h apps.h crl2p7.c
302dgst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 307dgst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
303dgst.o: ../include/openssl/buffer.h ../include/openssl/conf.h 308dgst.o: ../include/openssl/buffer.h ../include/openssl/conf.h
304dgst.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 309dgst.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
305dgst.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 310dgst.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
306dgst.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 311dgst.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
307dgst.o: ../include/openssl/err.h ../include/openssl/evp.h 312dgst.o: ../include/openssl/err.h ../include/openssl/evp.h
308dgst.o: ../include/openssl/hmac.h ../include/openssl/lhash.h 313dgst.o: ../include/openssl/fips.h ../include/openssl/hmac.h
309dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 314dgst.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
310dgst.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 315dgst.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
311dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 316dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
312dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h 317dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
313dgst.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h 318dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
314dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h 319dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h
315dgst.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 320dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
316dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 321dgst.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
317dgst.o: ../include/openssl/x509v3.h apps.h dgst.c 322dgst.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dgst.c
318dh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 323dh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
319dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h 324dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h
320dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h 325dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -322,15 +327,16 @@ dh.o: ../include/openssl/dh.h ../include/openssl/e_os2.h
322dh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 327dh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
323dh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 328dh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
324dh.o: ../include/openssl/err.h ../include/openssl/evp.h 329dh.o: ../include/openssl/err.h ../include/openssl/evp.h
325dh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 330dh.o: ../include/openssl/fips.h ../include/openssl/lhash.h
326dh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 331dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
327dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 332dh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
328dh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 333dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
329dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 334dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h
330dh.o: ../include/openssl/safestack.h ../include/openssl/sha.h 335dh.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
331dh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 336dh.o: ../include/openssl/sha.h ../include/openssl/stack.h
332dh.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 337dh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
333dh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dh.c 338dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
339dh.o: ../include/openssl/x509v3.h apps.h dh.c
334dsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 340dsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
335dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h 341dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
336dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h 342dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -338,15 +344,16 @@ dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
338dsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 344dsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
339dsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 345dsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
340dsa.o: ../include/openssl/err.h ../include/openssl/evp.h 346dsa.o: ../include/openssl/err.h ../include/openssl/evp.h
341dsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 347dsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h
342dsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 348dsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
343dsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 349dsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
344dsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 350dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
345dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 351dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
346dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h 352dsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
347dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 353dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
348dsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 354dsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
349dsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dsa.c 355dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
356dsa.o: ../include/openssl/x509v3.h apps.h dsa.c
350dsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 357dsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
351dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h 358dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h
352dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h 359dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -354,65 +361,68 @@ dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h
354dsaparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 361dsaparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
355dsaparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 362dsaparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
356dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h 363dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h
357dsaparam.o: ../include/openssl/evp.h ../include/openssl/lhash.h 364dsaparam.o: ../include/openssl/evp.h ../include/openssl/fips.h
358dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 365dsaparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
359dsaparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 366dsaparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
360dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 367dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
361dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h 368dsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
362dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 369dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
363dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 370dsaparam.o: ../include/openssl/rand.h ../include/openssl/rsa.h
364dsaparam.o: ../include/openssl/sha.h ../include/openssl/stack.h 371dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h
365dsaparam.o: ../include/openssl/store.h ../include/openssl/symhacks.h 372dsaparam.o: ../include/openssl/stack.h ../include/openssl/store.h
366dsaparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h 373dsaparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
367dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 374dsaparam.o: ../include/openssl/ui.h ../include/openssl/x509.h
368dsaparam.o: ../include/openssl/x509v3.h apps.h dsaparam.c 375dsaparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
376dsaparam.o: dsaparam.c
369ec.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 377ec.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
370ec.o: ../include/openssl/buffer.h ../include/openssl/conf.h 378ec.o: ../include/openssl/buffer.h ../include/openssl/conf.h
371ec.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 379ec.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
372ec.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 380ec.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
373ec.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 381ec.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
374ec.o: ../include/openssl/err.h ../include/openssl/evp.h 382ec.o: ../include/openssl/err.h ../include/openssl/evp.h
375ec.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 383ec.o: ../include/openssl/fips.h ../include/openssl/lhash.h
376ec.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 384ec.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
377ec.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 385ec.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
378ec.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 386ec.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
379ec.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 387ec.o: ../include/openssl/pem.h ../include/openssl/pem2.h
380ec.o: ../include/openssl/safestack.h ../include/openssl/sha.h 388ec.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
381ec.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 389ec.o: ../include/openssl/sha.h ../include/openssl/stack.h
382ec.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 390ec.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
383ec.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ec.c 391ec.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
392ec.o: ../include/openssl/x509v3.h apps.h ec.c
384ecparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 393ecparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
385ecparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h 394ecparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h
386ecparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h 395ecparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h
387ecparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 396ecparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
388ecparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 397ecparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
389ecparam.o: ../include/openssl/engine.h ../include/openssl/err.h 398ecparam.o: ../include/openssl/engine.h ../include/openssl/err.h
390ecparam.o: ../include/openssl/evp.h ../include/openssl/lhash.h 399ecparam.o: ../include/openssl/evp.h ../include/openssl/fips.h
391ecparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 400ecparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
392ecparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 401ecparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
393ecparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 402ecparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
394ecparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h 403ecparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
395ecparam.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h 404ecparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
396ecparam.o: ../include/openssl/sha.h ../include/openssl/stack.h 405ecparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h
397ecparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 406ecparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
398ecparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 407ecparam.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
399ecparam.o: ../include/openssl/x509v3.h apps.h ecparam.c 408ecparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
409ecparam.o: ecparam.c
400enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 410enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
401enc.o: ../include/openssl/buffer.h ../include/openssl/conf.h 411enc.o: ../include/openssl/buffer.h ../include/openssl/conf.h
402enc.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 412enc.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
403enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 413enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
404enc.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 414enc.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
405enc.o: ../include/openssl/err.h ../include/openssl/evp.h 415enc.o: ../include/openssl/err.h ../include/openssl/evp.h
406enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 416enc.o: ../include/openssl/fips.h ../include/openssl/lhash.h
407enc.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 417enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
408enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 418enc.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
409enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 419enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
410enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 420enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
411enc.o: ../include/openssl/rand.h ../include/openssl/safestack.h 421enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
412enc.o: ../include/openssl/sha.h ../include/openssl/stack.h 422enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
413enc.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 423enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
414enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 424enc.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
415enc.o: ../include/openssl/x509v3.h apps.h enc.c 425enc.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h enc.c
416engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 426engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
417engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h 427engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h
418engine.o: ../include/openssl/comp.h ../include/openssl/conf.h 428engine.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -420,21 +430,21 @@ engine.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
420engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 430engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
421engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 431engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
422engine.o: ../include/openssl/engine.h ../include/openssl/err.h 432engine.o: ../include/openssl/engine.h ../include/openssl/err.h
423engine.o: ../include/openssl/evp.h ../include/openssl/hmac.h 433engine.o: ../include/openssl/evp.h ../include/openssl/fips.h
424engine.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 434engine.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
425engine.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 435engine.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
426engine.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 436engine.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
427engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 437engine.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
428engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h 438engine.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
429engine.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 439engine.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
430engine.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h 440engine.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
431engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h 441engine.o: ../include/openssl/safestack.h ../include/openssl/sha.h
432engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 442engine.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
433engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 443engine.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
434engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 444engine.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
435engine.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 445engine.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
436engine.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 446engine.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
437engine.o: engine.c 447engine.o: ../include/openssl/x509v3.h apps.h engine.c
438errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 448errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
439errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h 449errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
440errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h 450errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -442,21 +452,21 @@ errstr.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
442errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 452errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
443errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 453errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
444errstr.o: ../include/openssl/engine.h ../include/openssl/err.h 454errstr.o: ../include/openssl/engine.h ../include/openssl/err.h
445errstr.o: ../include/openssl/evp.h ../include/openssl/hmac.h 455errstr.o: ../include/openssl/evp.h ../include/openssl/fips.h
446errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 456errstr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
447errstr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 457errstr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
448errstr.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 458errstr.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
449errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 459errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
450errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h 460errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
451errstr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 461errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
452errstr.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h 462errstr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
453errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h 463errstr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
454errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 464errstr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
455errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 465errstr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
456errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 466errstr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
457errstr.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 467errstr.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
458errstr.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 468errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
459errstr.o: errstr.c 469errstr.o: ../include/openssl/x509v3.h apps.h errstr.c
460gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 470gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
461gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h 471gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h
462gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h 472gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -464,18 +474,19 @@ gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h
464gendh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 474gendh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
465gendh.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 475gendh.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
466gendh.o: ../include/openssl/engine.h ../include/openssl/err.h 476gendh.o: ../include/openssl/engine.h ../include/openssl/err.h
467gendh.o: ../include/openssl/evp.h ../include/openssl/lhash.h 477gendh.o: ../include/openssl/evp.h ../include/openssl/fips.h
468gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 478gendh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
469gendh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 479gendh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
470gendh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 480gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
471gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h 481gendh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
472gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 482gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
473gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 483gendh.o: ../include/openssl/rand.h ../include/openssl/rsa.h
474gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h 484gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h
475gendh.o: ../include/openssl/store.h ../include/openssl/symhacks.h 485gendh.o: ../include/openssl/stack.h ../include/openssl/store.h
476gendh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h 486gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
477gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 487gendh.o: ../include/openssl/ui.h ../include/openssl/x509.h
478gendh.o: ../include/openssl/x509v3.h apps.h gendh.c 488gendh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
489gendh.o: gendh.c
479gendsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 490gendsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
480gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h 491gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
481gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h 492gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -483,16 +494,16 @@ gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
483gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 494gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
484gendsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 495gendsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
485gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h 496gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h
486gendsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 497gendsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h
487gendsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 498gendsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
488gendsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 499gendsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
489gendsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 500gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
490gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 501gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
491gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h 502gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
492gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 503gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
493gendsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 504gendsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
494gendsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 505gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
495gendsa.o: gendsa.c 506gendsa.o: ../include/openssl/x509v3.h apps.h gendsa.c
496genrsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 507genrsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
497genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h 508genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
498genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h 509genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -500,33 +511,35 @@ genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
500genrsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 511genrsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
501genrsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 512genrsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
502genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h 513genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h
503genrsa.o: ../include/openssl/evp.h ../include/openssl/lhash.h 514genrsa.o: ../include/openssl/evp.h ../include/openssl/fips.h
504genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 515genrsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
505genrsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 516genrsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
506genrsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 517genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
507genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h 518genrsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
508genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 519genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
509genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 520genrsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h
510genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h 521genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
511genrsa.o: ../include/openssl/store.h ../include/openssl/symhacks.h 522genrsa.o: ../include/openssl/stack.h ../include/openssl/store.h
512genrsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h 523genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
513genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 524genrsa.o: ../include/openssl/ui.h ../include/openssl/x509.h
514genrsa.o: ../include/openssl/x509v3.h apps.h genrsa.c 525genrsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
526genrsa.o: genrsa.c
515nseq.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 527nseq.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
516nseq.o: ../include/openssl/buffer.h ../include/openssl/conf.h 528nseq.o: ../include/openssl/buffer.h ../include/openssl/conf.h
517nseq.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 529nseq.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
518nseq.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 530nseq.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
519nseq.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 531nseq.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
520nseq.o: ../include/openssl/err.h ../include/openssl/evp.h 532nseq.o: ../include/openssl/err.h ../include/openssl/evp.h
521nseq.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 533nseq.o: ../include/openssl/fips.h ../include/openssl/lhash.h
522nseq.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 534nseq.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
523nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 535nseq.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
524nseq.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 536nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
525nseq.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 537nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h
526nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h 538nseq.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
527nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 539nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h
528nseq.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 540nseq.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
529nseq.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h nseq.c 541nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
542nseq.o: ../include/openssl/x509v3.h apps.h nseq.c
530ocsp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 543ocsp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
531ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h 544ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h
532ocsp.o: ../include/openssl/comp.h ../include/openssl/conf.h 545ocsp.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -534,20 +547,21 @@ ocsp.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
534ocsp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 547ocsp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
535ocsp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 548ocsp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
536ocsp.o: ../include/openssl/engine.h ../include/openssl/err.h 549ocsp.o: ../include/openssl/engine.h ../include/openssl/err.h
537ocsp.o: ../include/openssl/evp.h ../include/openssl/hmac.h 550ocsp.o: ../include/openssl/evp.h ../include/openssl/fips.h
538ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 551ocsp.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
539ocsp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 552ocsp.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
540ocsp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 553ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
541ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 554ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
542ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h 555ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
543ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 556ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
544ocsp.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h 557ocsp.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
545ocsp.o: ../include/openssl/sha.h ../include/openssl/ssl.h 558ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h
546ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 559ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
547ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 560ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
548ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 561ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
549ocsp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 562ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
550ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c 563ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
564ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c
551openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 565openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
552openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h 566openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
553openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h 567openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -555,21 +569,21 @@ openssl.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
555openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 569openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
556openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 570openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
557openssl.o: ../include/openssl/engine.h ../include/openssl/err.h 571openssl.o: ../include/openssl/engine.h ../include/openssl/err.h
558openssl.o: ../include/openssl/evp.h ../include/openssl/hmac.h 572openssl.o: ../include/openssl/evp.h ../include/openssl/fips.h
559openssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 573openssl.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
560openssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 574openssl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
561openssl.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 575openssl.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
562openssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 576openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
563openssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h 577openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
564openssl.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 578openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
565openssl.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h 579openssl.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
566openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h 580openssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
567openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 581openssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
568openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 582openssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
569openssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 583openssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
570openssl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 584openssl.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
571openssl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 585openssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
572openssl.o: openssl.c progs.h s_apps.h 586openssl.o: ../include/openssl/x509v3.h apps.h openssl.c progs.h s_apps.h
573passwd.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 587passwd.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
574passwd.o: ../include/openssl/buffer.h ../include/openssl/conf.h 588passwd.o: ../include/openssl/buffer.h ../include/openssl/conf.h
575passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h 589passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h
@@ -577,95 +591,97 @@ passwd.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
577passwd.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 591passwd.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
578passwd.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 592passwd.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
579passwd.o: ../include/openssl/err.h ../include/openssl/evp.h 593passwd.o: ../include/openssl/err.h ../include/openssl/evp.h
580passwd.o: ../include/openssl/lhash.h ../include/openssl/md5.h 594passwd.o: ../include/openssl/fips.h ../include/openssl/lhash.h
581passwd.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 595passwd.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
582passwd.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 596passwd.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
583passwd.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 597passwd.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
584passwd.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 598passwd.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
585passwd.o: ../include/openssl/safestack.h ../include/openssl/sha.h 599passwd.o: ../include/openssl/rand.h ../include/openssl/safestack.h
586passwd.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 600passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h
587passwd.o: ../include/openssl/txt_db.h ../include/openssl/ui.h 601passwd.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
588passwd.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h 602passwd.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
589passwd.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 603passwd.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
590passwd.o: passwd.c 604passwd.o: ../include/openssl/x509v3.h apps.h passwd.c
591pkcs12.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 605pkcs12.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
592pkcs12.o: ../include/openssl/buffer.h ../include/openssl/conf.h 606pkcs12.o: ../include/openssl/buffer.h ../include/openssl/conf.h
593pkcs12.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 607pkcs12.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
594pkcs12.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 608pkcs12.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
595pkcs12.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 609pkcs12.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
596pkcs12.o: ../include/openssl/err.h ../include/openssl/evp.h 610pkcs12.o: ../include/openssl/err.h ../include/openssl/evp.h
597pkcs12.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 611pkcs12.o: ../include/openssl/fips.h ../include/openssl/lhash.h
598pkcs12.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 612pkcs12.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
599pkcs12.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 613pkcs12.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
600pkcs12.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 614pkcs12.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
601pkcs12.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h 615pkcs12.o: ../include/openssl/pem.h ../include/openssl/pem2.h
602pkcs12.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h 616pkcs12.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
603pkcs12.o: ../include/openssl/sha.h ../include/openssl/stack.h 617pkcs12.o: ../include/openssl/safestack.h ../include/openssl/sha.h
604pkcs12.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 618pkcs12.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
605pkcs12.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 619pkcs12.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
606pkcs12.o: ../include/openssl/x509v3.h apps.h pkcs12.c 620pkcs12.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
621pkcs12.o: pkcs12.c
607pkcs7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 622pkcs7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
608pkcs7.o: ../include/openssl/buffer.h ../include/openssl/conf.h 623pkcs7.o: ../include/openssl/buffer.h ../include/openssl/conf.h
609pkcs7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 624pkcs7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
610pkcs7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 625pkcs7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
611pkcs7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 626pkcs7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
612pkcs7.o: ../include/openssl/err.h ../include/openssl/evp.h 627pkcs7.o: ../include/openssl/err.h ../include/openssl/evp.h
613pkcs7.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 628pkcs7.o: ../include/openssl/fips.h ../include/openssl/lhash.h
614pkcs7.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 629pkcs7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
615pkcs7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 630pkcs7.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
616pkcs7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 631pkcs7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
617pkcs7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 632pkcs7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
618pkcs7.o: ../include/openssl/safestack.h ../include/openssl/sha.h 633pkcs7.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
619pkcs7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 634pkcs7.o: ../include/openssl/sha.h ../include/openssl/stack.h
620pkcs7.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 635pkcs7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
621pkcs7.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 636pkcs7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
622pkcs7.o: pkcs7.c 637pkcs7.o: ../include/openssl/x509v3.h apps.h pkcs7.c
623pkcs8.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 638pkcs8.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
624pkcs8.o: ../include/openssl/buffer.h ../include/openssl/conf.h 639pkcs8.o: ../include/openssl/buffer.h ../include/openssl/conf.h
625pkcs8.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 640pkcs8.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
626pkcs8.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 641pkcs8.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
627pkcs8.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 642pkcs8.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
628pkcs8.o: ../include/openssl/err.h ../include/openssl/evp.h 643pkcs8.o: ../include/openssl/err.h ../include/openssl/evp.h
629pkcs8.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 644pkcs8.o: ../include/openssl/fips.h ../include/openssl/lhash.h
630pkcs8.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 645pkcs8.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
631pkcs8.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 646pkcs8.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
632pkcs8.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 647pkcs8.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
633pkcs8.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h 648pkcs8.o: ../include/openssl/pem.h ../include/openssl/pem2.h
634pkcs8.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h 649pkcs8.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
635pkcs8.o: ../include/openssl/sha.h ../include/openssl/stack.h 650pkcs8.o: ../include/openssl/safestack.h ../include/openssl/sha.h
636pkcs8.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 651pkcs8.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
637pkcs8.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 652pkcs8.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
638pkcs8.o: ../include/openssl/x509v3.h apps.h pkcs8.c 653pkcs8.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
654pkcs8.o: pkcs8.c
639prime.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 655prime.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
640prime.o: ../include/openssl/bn.h ../include/openssl/buffer.h 656prime.o: ../include/openssl/bn.h ../include/openssl/buffer.h
641prime.o: ../include/openssl/conf.h ../include/openssl/crypto.h 657prime.o: ../include/openssl/conf.h ../include/openssl/crypto.h
642prime.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 658prime.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
643prime.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 659prime.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
644prime.o: ../include/openssl/engine.h ../include/openssl/evp.h 660prime.o: ../include/openssl/engine.h ../include/openssl/evp.h
645prime.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 661prime.o: ../include/openssl/fips.h ../include/openssl/lhash.h
646prime.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 662prime.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
647prime.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 663prime.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
648prime.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 664prime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
649prime.o: ../include/openssl/safestack.h ../include/openssl/sha.h 665prime.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
650prime.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 666prime.o: ../include/openssl/sha.h ../include/openssl/stack.h
651prime.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 667prime.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
652prime.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 668prime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
653prime.o: prime.c 669prime.o: ../include/openssl/x509v3.h apps.h prime.c
654rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 670rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
655rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h 671rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
656rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 672rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
657rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 673rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
658rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 674rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
659rand.o: ../include/openssl/err.h ../include/openssl/evp.h 675rand.o: ../include/openssl/err.h ../include/openssl/evp.h
660rand.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 676rand.o: ../include/openssl/fips.h ../include/openssl/lhash.h
661rand.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 677rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
662rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 678rand.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
663rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 679rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
664rand.o: ../include/openssl/rand.h ../include/openssl/safestack.h 680rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
665rand.o: ../include/openssl/sha.h ../include/openssl/stack.h 681rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h
666rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 682rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
667rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 683rand.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
668rand.o: ../include/openssl/x509v3.h apps.h rand.c 684rand.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h rand.c
669req.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 685req.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
670req.o: ../include/openssl/bn.h ../include/openssl/buffer.h 686req.o: ../include/openssl/bn.h ../include/openssl/buffer.h
671req.o: ../include/openssl/conf.h ../include/openssl/crypto.h 687req.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -673,50 +689,52 @@ req.o: ../include/openssl/dh.h ../include/openssl/dsa.h
673req.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 689req.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
674req.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 690req.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
675req.o: ../include/openssl/engine.h ../include/openssl/err.h 691req.o: ../include/openssl/engine.h ../include/openssl/err.h
676req.o: ../include/openssl/evp.h ../include/openssl/lhash.h 692req.o: ../include/openssl/evp.h ../include/openssl/fips.h
677req.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 693req.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
678req.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 694req.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
679req.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 695req.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
680req.o: ../include/openssl/pem.h ../include/openssl/pem2.h 696req.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
681req.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 697req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
682req.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 698req.o: ../include/openssl/rand.h ../include/openssl/rsa.h
683req.o: ../include/openssl/sha.h ../include/openssl/stack.h 699req.o: ../include/openssl/safestack.h ../include/openssl/sha.h
684req.o: ../include/openssl/store.h ../include/openssl/symhacks.h 700req.o: ../include/openssl/stack.h ../include/openssl/store.h
685req.o: ../include/openssl/txt_db.h ../include/openssl/ui.h 701req.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
686req.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 702req.o: ../include/openssl/ui.h ../include/openssl/x509.h
687req.o: ../include/openssl/x509v3.h apps.h req.c 703req.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h req.c
688rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 704rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
689rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h 705rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
690rsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h 706rsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
691rsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 707rsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
692rsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 708rsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
693rsa.o: ../include/openssl/engine.h ../include/openssl/err.h 709rsa.o: ../include/openssl/engine.h ../include/openssl/err.h
694rsa.o: ../include/openssl/evp.h ../include/openssl/lhash.h 710rsa.o: ../include/openssl/evp.h ../include/openssl/fips.h
695rsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 711rsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
696rsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 712rsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
697rsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 713rsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
698rsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h 714rsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
699rsa.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h 715rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
700rsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h 716rsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
701rsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 717rsa.o: ../include/openssl/sha.h ../include/openssl/stack.h
702rsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 718rsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
703rsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h rsa.c 719rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
720rsa.o: ../include/openssl/x509v3.h apps.h rsa.c
704rsautl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 721rsautl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
705rsautl.o: ../include/openssl/buffer.h ../include/openssl/conf.h 722rsautl.o: ../include/openssl/buffer.h ../include/openssl/conf.h
706rsautl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 723rsautl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
707rsautl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 724rsautl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
708rsautl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 725rsautl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
709rsautl.o: ../include/openssl/err.h ../include/openssl/evp.h 726rsautl.o: ../include/openssl/err.h ../include/openssl/evp.h
710rsautl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 727rsautl.o: ../include/openssl/fips.h ../include/openssl/lhash.h
711rsautl.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 728rsautl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
712rsautl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 729rsautl.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
713rsautl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 730rsautl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
714rsautl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 731rsautl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
715rsautl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 732rsautl.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
716rsautl.o: ../include/openssl/sha.h ../include/openssl/stack.h 733rsautl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
717rsautl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 734rsautl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
718rsautl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 735rsautl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
719rsautl.o: ../include/openssl/x509v3.h apps.h rsautl.c 736rsautl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
737rsautl.o: rsautl.c
720s_cb.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 738s_cb.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
721s_cb.o: ../include/openssl/bn.h ../include/openssl/buffer.h 739s_cb.o: ../include/openssl/bn.h ../include/openssl/buffer.h
722s_cb.o: ../include/openssl/comp.h ../include/openssl/conf.h 740s_cb.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -724,21 +742,21 @@ s_cb.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
724s_cb.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 742s_cb.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
725s_cb.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 743s_cb.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
726s_cb.o: ../include/openssl/engine.h ../include/openssl/err.h 744s_cb.o: ../include/openssl/engine.h ../include/openssl/err.h
727s_cb.o: ../include/openssl/evp.h ../include/openssl/hmac.h 745s_cb.o: ../include/openssl/evp.h ../include/openssl/fips.h
728s_cb.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 746s_cb.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
729s_cb.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 747s_cb.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
730s_cb.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 748s_cb.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
731s_cb.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 749s_cb.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
732s_cb.o: ../include/openssl/pem.h ../include/openssl/pem2.h 750s_cb.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
733s_cb.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 751s_cb.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
734s_cb.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h 752s_cb.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
735s_cb.o: ../include/openssl/sha.h ../include/openssl/ssl.h 753s_cb.o: ../include/openssl/safestack.h ../include/openssl/sha.h
736s_cb.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 754s_cb.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
737s_cb.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 755s_cb.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
738s_cb.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 756s_cb.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
739s_cb.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 757s_cb.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
740s_cb.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 758s_cb.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
741s_cb.o: s_apps.h s_cb.c 759s_cb.o: ../include/openssl/x509v3.h apps.h s_apps.h s_cb.c
742s_client.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 760s_client.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
743s_client.o: ../include/openssl/bn.h ../include/openssl/buffer.h 761s_client.o: ../include/openssl/bn.h ../include/openssl/buffer.h
744s_client.o: ../include/openssl/comp.h ../include/openssl/conf.h 762s_client.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -746,21 +764,22 @@ s_client.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
746s_client.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 764s_client.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
747s_client.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 765s_client.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
748s_client.o: ../include/openssl/engine.h ../include/openssl/err.h 766s_client.o: ../include/openssl/engine.h ../include/openssl/err.h
749s_client.o: ../include/openssl/evp.h ../include/openssl/hmac.h 767s_client.o: ../include/openssl/evp.h ../include/openssl/fips.h
750s_client.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 768s_client.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
751s_client.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 769s_client.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
752s_client.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 770s_client.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
753s_client.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 771s_client.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
754s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h 772s_client.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
755s_client.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 773s_client.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
756s_client.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 774s_client.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
757s_client.o: ../include/openssl/safestack.h ../include/openssl/sha.h 775s_client.o: ../include/openssl/rand.h ../include/openssl/safestack.h
758s_client.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 776s_client.o: ../include/openssl/sha.h ../include/openssl/ssl.h
759s_client.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 777s_client.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
760s_client.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 778s_client.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
761s_client.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h 779s_client.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
762s_client.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 780s_client.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
763s_client.o: ../include/openssl/x509v3.h apps.h s_apps.h s_client.c timeouts.h 781s_client.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
782s_client.o: s_apps.h s_client.c timeouts.h
764s_server.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 783s_server.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
765s_server.o: ../include/openssl/bn.h ../include/openssl/buffer.h 784s_server.o: ../include/openssl/bn.h ../include/openssl/buffer.h
766s_server.o: ../include/openssl/comp.h ../include/openssl/conf.h 785s_server.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -769,23 +788,23 @@ s_server.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
769s_server.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 788s_server.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
770s_server.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 789s_server.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
771s_server.o: ../include/openssl/engine.h ../include/openssl/err.h 790s_server.o: ../include/openssl/engine.h ../include/openssl/err.h
772s_server.o: ../include/openssl/evp.h ../include/openssl/hmac.h 791s_server.o: ../include/openssl/evp.h ../include/openssl/fips.h
773s_server.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 792s_server.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
774s_server.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 793s_server.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
775s_server.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 794s_server.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
776s_server.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 795s_server.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
777s_server.o: ../include/openssl/pem.h ../include/openssl/pem2.h 796s_server.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
778s_server.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 797s_server.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
779s_server.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 798s_server.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
780s_server.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 799s_server.o: ../include/openssl/rand.h ../include/openssl/rsa.h
781s_server.o: ../include/openssl/sha.h ../include/openssl/ssl.h 800s_server.o: ../include/openssl/safestack.h ../include/openssl/sha.h
782s_server.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 801s_server.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
783s_server.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 802s_server.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
784s_server.o: ../include/openssl/store.h ../include/openssl/symhacks.h 803s_server.o: ../include/openssl/stack.h ../include/openssl/store.h
785s_server.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h 804s_server.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
786s_server.o: ../include/openssl/ui.h ../include/openssl/x509.h 805s_server.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
787s_server.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 806s_server.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
788s_server.o: s_apps.h s_server.c timeouts.h 807s_server.o: ../include/openssl/x509v3.h apps.h s_apps.h s_server.c timeouts.h
789s_socket.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 808s_socket.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
790s_socket.o: ../include/openssl/bn.h ../include/openssl/buffer.h 809s_socket.o: ../include/openssl/bn.h ../include/openssl/buffer.h
791s_socket.o: ../include/openssl/comp.h ../include/openssl/conf.h 810s_socket.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -793,20 +812,21 @@ s_socket.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
793s_socket.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 812s_socket.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
794s_socket.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 813s_socket.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
795s_socket.o: ../include/openssl/engine.h ../include/openssl/evp.h 814s_socket.o: ../include/openssl/engine.h ../include/openssl/evp.h
796s_socket.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 815s_socket.o: ../include/openssl/fips.h ../include/openssl/hmac.h
797s_socket.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 816s_socket.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
798s_socket.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 817s_socket.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
799s_socket.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 818s_socket.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
800s_socket.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 819s_socket.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
801s_socket.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 820s_socket.o: ../include/openssl/pem.h ../include/openssl/pem2.h
802s_socket.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 821s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
803s_socket.o: ../include/openssl/safestack.h ../include/openssl/sha.h 822s_socket.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
804s_socket.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 823s_socket.o: ../include/openssl/sha.h ../include/openssl/ssl.h
805s_socket.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 824s_socket.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
806s_socket.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 825s_socket.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
807s_socket.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h 826s_socket.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
808s_socket.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 827s_socket.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
809s_socket.o: ../include/openssl/x509v3.h apps.h s_apps.h s_socket.c 828s_socket.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
829s_socket.o: s_apps.h s_socket.c
810s_time.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 830s_time.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
811s_time.o: ../include/openssl/bn.h ../include/openssl/buffer.h 831s_time.o: ../include/openssl/bn.h ../include/openssl/buffer.h
812s_time.o: ../include/openssl/comp.h ../include/openssl/conf.h 832s_time.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -814,21 +834,21 @@ s_time.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
814s_time.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 834s_time.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
815s_time.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 835s_time.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
816s_time.o: ../include/openssl/engine.h ../include/openssl/err.h 836s_time.o: ../include/openssl/engine.h ../include/openssl/err.h
817s_time.o: ../include/openssl/evp.h ../include/openssl/hmac.h 837s_time.o: ../include/openssl/evp.h ../include/openssl/fips.h
818s_time.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 838s_time.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
819s_time.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 839s_time.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
820s_time.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 840s_time.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
821s_time.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 841s_time.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
822s_time.o: ../include/openssl/pem.h ../include/openssl/pem2.h 842s_time.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
823s_time.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 843s_time.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
824s_time.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h 844s_time.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
825s_time.o: ../include/openssl/sha.h ../include/openssl/ssl.h 845s_time.o: ../include/openssl/safestack.h ../include/openssl/sha.h
826s_time.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 846s_time.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
827s_time.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 847s_time.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
828s_time.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 848s_time.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
829s_time.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 849s_time.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
830s_time.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 850s_time.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
831s_time.o: s_apps.h s_time.c 851s_time.o: ../include/openssl/x509v3.h apps.h s_apps.h s_time.c
832sess_id.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 852sess_id.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
833sess_id.o: ../include/openssl/bn.h ../include/openssl/buffer.h 853sess_id.o: ../include/openssl/bn.h ../include/openssl/buffer.h
834sess_id.o: ../include/openssl/comp.h ../include/openssl/conf.h 854sess_id.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -836,37 +856,37 @@ sess_id.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
836sess_id.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 856sess_id.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
837sess_id.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 857sess_id.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
838sess_id.o: ../include/openssl/engine.h ../include/openssl/err.h 858sess_id.o: ../include/openssl/engine.h ../include/openssl/err.h
839sess_id.o: ../include/openssl/evp.h ../include/openssl/hmac.h 859sess_id.o: ../include/openssl/evp.h ../include/openssl/fips.h
840sess_id.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 860sess_id.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
841sess_id.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 861sess_id.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
842sess_id.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 862sess_id.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
843sess_id.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 863sess_id.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
844sess_id.o: ../include/openssl/pem.h ../include/openssl/pem2.h 864sess_id.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
845sess_id.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 865sess_id.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
846sess_id.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h 866sess_id.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
847sess_id.o: ../include/openssl/sha.h ../include/openssl/ssl.h 867sess_id.o: ../include/openssl/safestack.h ../include/openssl/sha.h
848sess_id.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 868sess_id.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
849sess_id.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 869sess_id.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
850sess_id.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 870sess_id.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
851sess_id.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 871sess_id.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
852sess_id.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 872sess_id.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
853sess_id.o: sess_id.c 873sess_id.o: ../include/openssl/x509v3.h apps.h sess_id.c
854smime.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 874smime.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
855smime.o: ../include/openssl/buffer.h ../include/openssl/conf.h 875smime.o: ../include/openssl/buffer.h ../include/openssl/conf.h
856smime.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 876smime.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
857smime.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 877smime.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
858smime.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 878smime.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
859smime.o: ../include/openssl/err.h ../include/openssl/evp.h 879smime.o: ../include/openssl/err.h ../include/openssl/evp.h
860smime.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 880smime.o: ../include/openssl/fips.h ../include/openssl/lhash.h
861smime.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 881smime.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
862smime.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 882smime.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
863smime.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 883smime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
864smime.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 884smime.o: ../include/openssl/pem.h ../include/openssl/pem2.h
865smime.o: ../include/openssl/safestack.h ../include/openssl/sha.h 885smime.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
866smime.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 886smime.o: ../include/openssl/sha.h ../include/openssl/stack.h
867smime.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 887smime.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
868smime.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 888smime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
869smime.o: smime.c 889smime.o: ../include/openssl/x509v3.h apps.h smime.c
870speed.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h 890speed.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
871speed.o: ../include/openssl/bio.h ../include/openssl/blowfish.h 891speed.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
872speed.o: ../include/openssl/bn.h ../include/openssl/buffer.h 892speed.o: ../include/openssl/bn.h ../include/openssl/buffer.h
@@ -876,53 +896,54 @@ speed.o: ../include/openssl/des_old.h ../include/openssl/dsa.h
876speed.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 896speed.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
877speed.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 897speed.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
878speed.o: ../include/openssl/engine.h ../include/openssl/err.h 898speed.o: ../include/openssl/engine.h ../include/openssl/err.h
879speed.o: ../include/openssl/evp.h ../include/openssl/hmac.h 899speed.o: ../include/openssl/evp.h ../include/openssl/fips.h
880speed.o: ../include/openssl/idea.h ../include/openssl/lhash.h 900speed.o: ../include/openssl/hmac.h ../include/openssl/idea.h
881speed.o: ../include/openssl/md2.h ../include/openssl/md4.h 901speed.o: ../include/openssl/lhash.h ../include/openssl/md2.h
882speed.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h 902speed.o: ../include/openssl/md4.h ../include/openssl/md5.h
883speed.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 903speed.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
884speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 904speed.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
885speed.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 905speed.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
886speed.o: ../include/openssl/rand.h ../include/openssl/rc2.h 906speed.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
887speed.o: ../include/openssl/rc4.h ../include/openssl/ripemd.h 907speed.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
888speed.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 908speed.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
889speed.o: ../include/openssl/sha.h ../include/openssl/stack.h 909speed.o: ../include/openssl/safestack.h ../include/openssl/sha.h
890speed.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 910speed.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
891speed.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h 911speed.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
892speed.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 912speed.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
893speed.o: ../include/openssl/x509v3.h apps.h speed.c testdsa.h testrsa.h 913speed.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
914speed.o: speed.c testdsa.h testrsa.h
894spkac.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 915spkac.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
895spkac.o: ../include/openssl/buffer.h ../include/openssl/conf.h 916spkac.o: ../include/openssl/buffer.h ../include/openssl/conf.h
896spkac.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 917spkac.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
897spkac.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 918spkac.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
898spkac.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 919spkac.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
899spkac.o: ../include/openssl/err.h ../include/openssl/evp.h 920spkac.o: ../include/openssl/err.h ../include/openssl/evp.h
900spkac.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 921spkac.o: ../include/openssl/fips.h ../include/openssl/lhash.h
901spkac.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 922spkac.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
902spkac.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 923spkac.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
903spkac.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 924spkac.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
904spkac.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 925spkac.o: ../include/openssl/pem.h ../include/openssl/pem2.h
905spkac.o: ../include/openssl/safestack.h ../include/openssl/sha.h 926spkac.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
906spkac.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 927spkac.o: ../include/openssl/sha.h ../include/openssl/stack.h
907spkac.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 928spkac.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
908spkac.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 929spkac.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
909spkac.o: spkac.c 930spkac.o: ../include/openssl/x509v3.h apps.h spkac.c
910verify.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 931verify.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
911verify.o: ../include/openssl/buffer.h ../include/openssl/conf.h 932verify.o: ../include/openssl/buffer.h ../include/openssl/conf.h
912verify.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 933verify.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
913verify.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 934verify.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
914verify.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 935verify.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
915verify.o: ../include/openssl/err.h ../include/openssl/evp.h 936verify.o: ../include/openssl/err.h ../include/openssl/evp.h
916verify.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 937verify.o: ../include/openssl/fips.h ../include/openssl/lhash.h
917verify.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 938verify.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
918verify.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 939verify.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
919verify.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 940verify.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
920verify.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 941verify.o: ../include/openssl/pem.h ../include/openssl/pem2.h
921verify.o: ../include/openssl/safestack.h ../include/openssl/sha.h 942verify.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
922verify.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 943verify.o: ../include/openssl/sha.h ../include/openssl/stack.h
923verify.o: ../include/openssl/txt_db.h ../include/openssl/x509.h 944verify.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
924verify.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 945verify.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
925verify.o: verify.c 946verify.o: ../include/openssl/x509v3.h apps.h verify.c
926version.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 947version.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
927version.o: ../include/openssl/blowfish.h ../include/openssl/bn.h 948version.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
928version.o: ../include/openssl/buffer.h ../include/openssl/conf.h 949version.o: ../include/openssl/buffer.h ../include/openssl/conf.h
@@ -930,18 +951,18 @@ version.o: ../include/openssl/crypto.h ../include/openssl/des.h
930version.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h 951version.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
931version.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 952version.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
932version.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 953version.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
933version.o: ../include/openssl/evp.h ../include/openssl/idea.h 954version.o: ../include/openssl/evp.h ../include/openssl/fips.h
934version.o: ../include/openssl/lhash.h ../include/openssl/md2.h 955version.o: ../include/openssl/idea.h ../include/openssl/lhash.h
935version.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 956version.o: ../include/openssl/md2.h ../include/openssl/obj_mac.h
936version.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 957version.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
937version.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 958version.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
938version.o: ../include/openssl/pkcs7.h ../include/openssl/rc4.h 959version.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
939version.o: ../include/openssl/safestack.h ../include/openssl/sha.h 960version.o: ../include/openssl/rc4.h ../include/openssl/safestack.h
940version.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 961version.o: ../include/openssl/sha.h ../include/openssl/stack.h
941version.o: ../include/openssl/txt_db.h ../include/openssl/ui.h 962version.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
942version.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h 963version.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
943version.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h 964version.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
944version.o: version.c 965version.o: ../include/openssl/x509v3.h apps.h version.c
945x509.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 966x509.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
946x509.o: ../include/openssl/bn.h ../include/openssl/buffer.h 967x509.o: ../include/openssl/bn.h ../include/openssl/buffer.h
947x509.o: ../include/openssl/conf.h ../include/openssl/crypto.h 968x509.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -949,13 +970,13 @@ x509.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
949x509.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 970x509.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
950x509.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 971x509.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
951x509.o: ../include/openssl/err.h ../include/openssl/evp.h 972x509.o: ../include/openssl/err.h ../include/openssl/evp.h
952x509.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 973x509.o: ../include/openssl/fips.h ../include/openssl/lhash.h
953x509.o: ../include/openssl/objects.h ../include/openssl/ocsp.h 974x509.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
954x509.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 975x509.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
955x509.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 976x509.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
956x509.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 977x509.o: ../include/openssl/pem.h ../include/openssl/pem2.h
957x509.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 978x509.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
958x509.o: ../include/openssl/sha.h ../include/openssl/stack.h 979x509.o: ../include/openssl/safestack.h ../include/openssl/sha.h
959x509.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h 980x509.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
960x509.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 981x509.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
961x509.o: ../include/openssl/x509v3.h apps.h x509.c 982x509.o: ../include/openssl/x509_vfy.h ../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 5209caba2e..367eb177e1 100644
--- a/src/lib/libssl/src/apps/apps.c
+++ b/src/lib/libssl/src/apps/apps.c
@@ -115,6 +115,7 @@
115#include <sys/types.h> 115#include <sys/types.h>
116#include <sys/stat.h> 116#include <sys/stat.h>
117#include <ctype.h> 117#include <ctype.h>
118#include <assert.h>
118#include <openssl/err.h> 119#include <openssl/err.h>
119#include <openssl/x509.h> 120#include <openssl/x509.h>
120#include <openssl/x509v3.h> 121#include <openssl/x509v3.h>
@@ -129,6 +130,9 @@
129#include <openssl/rsa.h> 130#include <openssl/rsa.h>
130#endif 131#endif
131#include <openssl/bn.h> 132#include <openssl/bn.h>
133#ifndef OPENSSL_NO_JPAKE
134#include <openssl/jpake.h>
135#endif
132 136
133#define NON_MAIN 137#define NON_MAIN
134#include "apps.h" 138#include "apps.h"
@@ -2333,3 +2337,233 @@ void policies_print(BIO *out, X509_STORE_CTX *ctx)
2333 if (free_out) 2337 if (free_out)
2334 BIO_free(out); 2338 BIO_free(out);
2335 } 2339 }
2340
2341#ifndef OPENSSL_NO_JPAKE
2342
2343static JPAKE_CTX *jpake_init(const char *us, const char *them,
2344 const char *secret)
2345 {
2346 BIGNUM *p = NULL;
2347 BIGNUM *g = NULL;
2348 BIGNUM *q = NULL;
2349 BIGNUM *bnsecret = BN_new();
2350 JPAKE_CTX *ctx;
2351
2352 /* Use a safe prime for p (that we found earlier) */
2353 BN_hex2bn(&p, "F9E5B365665EA7A05A9C534502780FEE6F1AB5BD4F49947FD036DBD7E905269AF46EF28B0FC07487EE4F5D20FB3C0AF8E700F3A2FA3414970CBED44FEDFF80CE78D800F184BB82435D137AADA2C6C16523247930A63B85661D1FC817A51ACD96168E95898A1F83A79FFB529368AA7833ABD1B0C3AEDDB14D2E1A2F71D99F763F");
2354 g = BN_new();
2355 BN_set_word(g, 2);
2356 q = BN_new();
2357 BN_rshift1(q, p);
2358
2359 BN_bin2bn((const unsigned char *)secret, strlen(secret), bnsecret);
2360
2361 ctx = JPAKE_CTX_new(us, them, p, g, q, bnsecret);
2362 BN_free(bnsecret);
2363 BN_free(q);
2364 BN_free(g);
2365 BN_free(p);
2366
2367 return ctx;
2368 }
2369
2370static void jpake_send_part(BIO *conn, const JPAKE_STEP_PART *p)
2371 {
2372 BN_print(conn, p->gx);
2373 BIO_puts(conn, "\n");
2374 BN_print(conn, p->zkpx.gr);
2375 BIO_puts(conn, "\n");
2376 BN_print(conn, p->zkpx.b);
2377 BIO_puts(conn, "\n");
2378 }
2379
2380static void jpake_send_step1(BIO *bconn, JPAKE_CTX *ctx)
2381 {
2382 JPAKE_STEP1 s1;
2383
2384 JPAKE_STEP1_init(&s1);
2385 JPAKE_STEP1_generate(&s1, ctx);
2386 jpake_send_part(bconn, &s1.p1);
2387 jpake_send_part(bconn, &s1.p2);
2388 (void)BIO_flush(bconn);
2389 JPAKE_STEP1_release(&s1);
2390 }
2391
2392static void jpake_send_step2(BIO *bconn, JPAKE_CTX *ctx)
2393 {
2394 JPAKE_STEP2 s2;
2395
2396 JPAKE_STEP2_init(&s2);
2397 JPAKE_STEP2_generate(&s2, ctx);
2398 jpake_send_part(bconn, &s2);
2399 (void)BIO_flush(bconn);
2400 JPAKE_STEP2_release(&s2);
2401 }
2402
2403static void jpake_send_step3a(BIO *bconn, JPAKE_CTX *ctx)
2404 {
2405 JPAKE_STEP3A s3a;
2406
2407 JPAKE_STEP3A_init(&s3a);
2408 JPAKE_STEP3A_generate(&s3a, ctx);
2409 BIO_write(bconn, s3a.hhk, sizeof s3a.hhk);
2410 (void)BIO_flush(bconn);
2411 JPAKE_STEP3A_release(&s3a);
2412 }
2413
2414static void jpake_send_step3b(BIO *bconn, JPAKE_CTX *ctx)
2415 {
2416 JPAKE_STEP3B s3b;
2417
2418 JPAKE_STEP3B_init(&s3b);
2419 JPAKE_STEP3B_generate(&s3b, ctx);
2420 BIO_write(bconn, s3b.hk, sizeof s3b.hk);
2421 (void)BIO_flush(bconn);
2422 JPAKE_STEP3B_release(&s3b);
2423 }
2424
2425static void readbn(BIGNUM **bn, BIO *bconn)
2426 {
2427 char buf[10240];
2428 int l;
2429
2430 l = BIO_gets(bconn, buf, sizeof buf);
2431 assert(l >= 0);
2432 assert(buf[l-1] == '\n');
2433 buf[l-1] = '\0';
2434 BN_hex2bn(bn, buf);
2435 }
2436
2437static void jpake_receive_part(JPAKE_STEP_PART *p, BIO *bconn)
2438 {
2439 readbn(&p->gx, bconn);
2440 readbn(&p->zkpx.gr, bconn);
2441 readbn(&p->zkpx.b, bconn);
2442 }
2443
2444static void jpake_receive_step1(JPAKE_CTX *ctx, BIO *bconn)
2445 {
2446 JPAKE_STEP1 s1;
2447
2448 JPAKE_STEP1_init(&s1);
2449 jpake_receive_part(&s1.p1, bconn);
2450 jpake_receive_part(&s1.p2, bconn);
2451 if(!JPAKE_STEP1_process(ctx, &s1))
2452 {
2453 ERR_print_errors(bio_err);
2454 exit(1);
2455 }
2456 JPAKE_STEP1_release(&s1);
2457 }
2458
2459static void jpake_receive_step2(JPAKE_CTX *ctx, BIO *bconn)
2460 {
2461 JPAKE_STEP2 s2;
2462
2463 JPAKE_STEP2_init(&s2);
2464 jpake_receive_part(&s2, bconn);
2465 if(!JPAKE_STEP2_process(ctx, &s2))
2466 {
2467 ERR_print_errors(bio_err);
2468 exit(1);
2469 }
2470 JPAKE_STEP2_release(&s2);
2471 }
2472
2473static void jpake_receive_step3a(JPAKE_CTX *ctx, BIO *bconn)
2474 {
2475 JPAKE_STEP3A s3a;
2476 int l;
2477
2478 JPAKE_STEP3A_init(&s3a);
2479 l = BIO_read(bconn, s3a.hhk, sizeof s3a.hhk);
2480 assert(l == sizeof s3a.hhk);
2481 if(!JPAKE_STEP3A_process(ctx, &s3a))
2482 {
2483 ERR_print_errors(bio_err);
2484 exit(1);
2485 }
2486 JPAKE_STEP3A_release(&s3a);
2487 }
2488
2489static void jpake_receive_step3b(JPAKE_CTX *ctx, BIO *bconn)
2490 {
2491 JPAKE_STEP3B s3b;
2492 int l;
2493
2494 JPAKE_STEP3B_init(&s3b);
2495 l = BIO_read(bconn, s3b.hk, sizeof s3b.hk);
2496 assert(l == sizeof s3b.hk);
2497 if(!JPAKE_STEP3B_process(ctx, &s3b))
2498 {
2499 ERR_print_errors(bio_err);
2500 exit(1);
2501 }
2502 JPAKE_STEP3B_release(&s3b);
2503 }
2504
2505void jpake_client_auth(BIO *out, BIO *conn, const char *secret)
2506 {
2507 JPAKE_CTX *ctx;
2508 BIO *bconn;
2509
2510 BIO_puts(out, "Authenticating with JPAKE\n");
2511
2512 ctx = jpake_init("client", "server", secret);
2513
2514 bconn = BIO_new(BIO_f_buffer());
2515 BIO_push(bconn, conn);
2516
2517 jpake_send_step1(bconn, ctx);
2518 jpake_receive_step1(ctx, bconn);
2519 jpake_send_step2(bconn, ctx);
2520 jpake_receive_step2(ctx, bconn);
2521 jpake_send_step3a(bconn, ctx);
2522 jpake_receive_step3b(ctx, bconn);
2523
2524 /*
2525 * The problem is that you must use the derived key in the
2526 * session key or you are subject to man-in-the-middle
2527 * attacks.
2528 */
2529 BIO_puts(out, "JPAKE authentication succeeded (N.B. This version can"
2530 " be MitMed. See the version in HEAD for how to do it"
2531 " properly)\n");
2532
2533 BIO_pop(bconn);
2534 BIO_free(bconn);
2535 }
2536
2537void jpake_server_auth(BIO *out, BIO *conn, const char *secret)
2538 {
2539 JPAKE_CTX *ctx;
2540 BIO *bconn;
2541
2542 BIO_puts(out, "Authenticating with JPAKE\n");
2543
2544 ctx = jpake_init("server", "client", secret);
2545
2546 bconn = BIO_new(BIO_f_buffer());
2547 BIO_push(bconn, conn);
2548
2549 jpake_receive_step1(ctx, bconn);
2550 jpake_send_step1(bconn, ctx);
2551 jpake_receive_step2(ctx, bconn);
2552 jpake_send_step2(bconn, ctx);
2553 jpake_receive_step3a(ctx, bconn);
2554 jpake_send_step3b(bconn, ctx);
2555
2556 /*
2557 * The problem is that you must use the derived key in the
2558 * session key or you are subject to man-in-the-middle
2559 * attacks.
2560 */
2561 BIO_puts(out, "JPAKE authentication succeeded (N.B. This version can"
2562 " be MitMed. See the version in HEAD for how to do it"
2563 " properly)\n");
2564
2565 BIO_pop(bconn);
2566 BIO_free(bconn);
2567 }
2568
2569#endif
diff --git a/src/lib/libssl/src/apps/apps.h b/src/lib/libssl/src/apps/apps.h
index 0df170813a..88579094b1 100644
--- a/src/lib/libssl/src/apps/apps.h
+++ b/src/lib/libssl/src/apps/apps.h
@@ -149,9 +149,11 @@ int WIN32_rename(const char *oldname,const char *newname);
149#ifndef NON_MAIN 149#ifndef NON_MAIN
150CONF *config=NULL; 150CONF *config=NULL;
151BIO *bio_err=NULL; 151BIO *bio_err=NULL;
152int in_FIPS_mode=0;
152#else 153#else
153extern CONF *config; 154extern CONF *config;
154extern BIO *bio_err; 155extern BIO *bio_err;
156extern int in_FIPS_mode;
155#endif 157#endif
156 158
157#else 159#else
@@ -160,6 +162,7 @@ extern BIO *bio_err;
160extern CONF *config; 162extern CONF *config;
161extern char *default_config_file; 163extern char *default_config_file;
162extern BIO *bio_err; 164extern BIO *bio_err;
165extern int in_FIPS_mode;
163 166
164#endif 167#endif
165 168
@@ -335,6 +338,10 @@ X509_NAME *parse_name(char *str, long chtype, int multirdn);
335int args_verify(char ***pargs, int *pargc, 338int args_verify(char ***pargs, int *pargc,
336 int *badarg, BIO *err, X509_VERIFY_PARAM **pm); 339 int *badarg, BIO *err, X509_VERIFY_PARAM **pm);
337void policies_print(BIO *out, X509_STORE_CTX *ctx); 340void policies_print(BIO *out, X509_STORE_CTX *ctx);
341#ifndef OPENSSL_NO_JPAKE
342void jpake_client_auth(BIO *out, BIO *conn, const char *secret);
343void jpake_server_auth(BIO *out, BIO *conn, const char *secret);
344#endif
338 345
339#define FORMAT_UNDEF 0 346#define FORMAT_UNDEF 0
340#define FORMAT_ASN1 1 347#define FORMAT_ASN1 1
diff --git a/src/lib/libssl/src/apps/asn1pars.c b/src/lib/libssl/src/apps/asn1pars.c
index b1a7c8e5db..bde61d02d1 100644
--- a/src/lib/libssl/src/apps/asn1pars.c
+++ b/src/lib/libssl/src/apps/asn1pars.c
@@ -56,7 +56,7 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59/* A nice addition from Dr Stephen Henson <shenson@bigfoot.com> to 59/* A nice addition from Dr Stephen Henson <steve@openssl.org> to
60 * add the -strparse option which parses nested binary structures 60 * add the -strparse option which parses nested binary structures
61 */ 61 */
62 62
diff --git a/src/lib/libssl/src/apps/crl.c b/src/lib/libssl/src/apps/crl.c
index a0040fba11..c395b2afd5 100644
--- a/src/lib/libssl/src/apps/crl.c
+++ b/src/lib/libssl/src/apps/crl.c
@@ -85,6 +85,7 @@ static const char *crl_usage[]={
85" -issuer - print issuer DN\n", 85" -issuer - print issuer DN\n",
86" -lastupdate - lastUpdate field\n", 86" -lastupdate - lastUpdate field\n",
87" -nextupdate - nextUpdate field\n", 87" -nextupdate - nextUpdate field\n",
88" -crlnumber - print CRL number\n",
88" -noout - no CRL output\n", 89" -noout - no CRL output\n",
89" -CAfile name - verify CRL using certificates in file \"name\"\n", 90" -CAfile name - verify CRL using certificates in file \"name\"\n",
90" -CApath dir - verify CRL using certificates in \"dir\"\n", 91" -CApath dir - verify CRL using certificates in \"dir\"\n",
@@ -107,7 +108,7 @@ int MAIN(int argc, char **argv)
107 int informat,outformat; 108 int informat,outformat;
108 char *infile=NULL,*outfile=NULL; 109 char *infile=NULL,*outfile=NULL;
109 int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0; 110 int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0;
110 int fingerprint = 0; 111 int fingerprint = 0, crlnumber = 0;
111 const char **pp; 112 const char **pp;
112 X509_STORE *store = NULL; 113 X509_STORE *store = NULL;
113 X509_STORE_CTX ctx; 114 X509_STORE_CTX ctx;
@@ -206,6 +207,8 @@ int MAIN(int argc, char **argv)
206 noout= ++num; 207 noout= ++num;
207 else if (strcmp(*argv,"-fingerprint") == 0) 208 else if (strcmp(*argv,"-fingerprint") == 0)
208 fingerprint= ++num; 209 fingerprint= ++num;
210 else if (strcmp(*argv,"-crlnumber") == 0)
211 crlnumber= ++num;
209 else if ((md_alg=EVP_get_digestbyname(*argv + 1))) 212 else if ((md_alg=EVP_get_digestbyname(*argv + 1)))
210 { 213 {
211 /* ok */ 214 /* ok */
@@ -281,7 +284,21 @@ bad:
281 { 284 {
282 print_name(bio_out, "issuer=", X509_CRL_get_issuer(x), nmflag); 285 print_name(bio_out, "issuer=", X509_CRL_get_issuer(x), nmflag);
283 } 286 }
284 287 if (crlnumber == i)
288 {
289 ASN1_INTEGER *crlnum;
290 crlnum = X509_CRL_get_ext_d2i(x, NID_crl_number,
291 NULL, NULL);
292 BIO_printf(bio_out,"crlNumber=");
293 if (crlnum)
294 {
295 i2a_ASN1_INTEGER(bio_out, crlnum);
296 ASN1_INTEGER_free(crlnum);
297 }
298 else
299 BIO_puts(bio_out, "<NONE>");
300 BIO_printf(bio_out,"\n");
301 }
285 if (hash == i) 302 if (hash == i)
286 { 303 {
287 BIO_printf(bio_out,"%08lx\n", 304 BIO_printf(bio_out,"%08lx\n",
diff --git a/src/lib/libssl/src/apps/dgst.c b/src/lib/libssl/src/apps/dgst.c
index c5ecf93d1b..9ebfc22e79 100644
--- a/src/lib/libssl/src/apps/dgst.c
+++ b/src/lib/libssl/src/apps/dgst.c
@@ -76,7 +76,7 @@
76 76
77int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, 77int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
78 EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title, 78 EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
79 const char *file,BIO *bmd,const char *hmac_key); 79 const char *file,BIO *bmd,const char *hmac_key, int non_fips_allow);
80 80
81int MAIN(int, char **); 81int MAIN(int, char **);
82 82
@@ -84,7 +84,7 @@ int MAIN(int argc, char **argv)
84 { 84 {
85 ENGINE *e = NULL; 85 ENGINE *e = NULL;
86 unsigned char *buf=NULL; 86 unsigned char *buf=NULL;
87 int i,err=0; 87 int i,err=1;
88 const EVP_MD *md=NULL,*m; 88 const EVP_MD *md=NULL,*m;
89 BIO *in=NULL,*inp; 89 BIO *in=NULL,*inp;
90 BIO *bmd=NULL; 90 BIO *bmd=NULL;
@@ -101,14 +101,16 @@ int MAIN(int argc, char **argv)
101 EVP_PKEY *sigkey = NULL; 101 EVP_PKEY *sigkey = NULL;
102 unsigned char *sigbuf = NULL; 102 unsigned char *sigbuf = NULL;
103 int siglen = 0; 103 int siglen = 0;
104 unsigned int sig_flags = 0;
104 char *passargin = NULL, *passin = NULL; 105 char *passargin = NULL, *passin = NULL;
105#ifndef OPENSSL_NO_ENGINE 106#ifndef OPENSSL_NO_ENGINE
106 char *engine=NULL; 107 char *engine=NULL;
107#endif 108#endif
108 char *hmac_key=NULL; 109 char *hmac_key=NULL;
110 int non_fips_allow = 0;
109 111
110 apps_startup(); 112 apps_startup();
111 113ERR_load_crypto_strings();
112 if ((buf=(unsigned char *)OPENSSL_malloc(BUFSIZE)) == NULL) 114 if ((buf=(unsigned char *)OPENSSL_malloc(BUFSIZE)) == NULL)
113 { 115 {
114 BIO_printf(bio_err,"out of memory\n"); 116 BIO_printf(bio_err,"out of memory\n");
@@ -167,6 +169,27 @@ int MAIN(int argc, char **argv)
167 keyfile=*(++argv); 169 keyfile=*(++argv);
168 do_verify = 1; 170 do_verify = 1;
169 } 171 }
172 else if (strcmp(*argv,"-x931") == 0)
173 sig_flags = EVP_MD_CTX_FLAG_PAD_X931;
174 else if (strcmp(*argv,"-pss_saltlen") == 0)
175 {
176 int saltlen;
177 if (--argc < 1) break;
178 saltlen=atoi(*(++argv));
179 if (saltlen == -1)
180 sig_flags = EVP_MD_CTX_FLAG_PSS_MREC;
181 else if (saltlen == -2)
182 sig_flags = EVP_MD_CTX_FLAG_PSS_MDLEN;
183 else if (saltlen < -2 || saltlen >= 0xFFFE)
184 {
185 BIO_printf(bio_err, "Invalid PSS salt length %d\n", saltlen);
186 goto end;
187 }
188 else
189 sig_flags = saltlen;
190 sig_flags <<= 16;
191 sig_flags |= EVP_MD_CTX_FLAG_PAD_PSS;
192 }
170 else if (strcmp(*argv,"-signature") == 0) 193 else if (strcmp(*argv,"-signature") == 0)
171 { 194 {
172 if (--argc < 1) break; 195 if (--argc < 1) break;
@@ -190,6 +213,8 @@ int MAIN(int argc, char **argv)
190 out_bin = 1; 213 out_bin = 1;
191 else if (strcmp(*argv,"-d") == 0) 214 else if (strcmp(*argv,"-d") == 0)
192 debug=1; 215 debug=1;
216 else if (strcmp(*argv,"-non-fips-allow") == 0)
217 non_fips_allow=1;
193 else if (!strcmp(*argv,"-fips-fingerprint")) 218 else if (!strcmp(*argv,"-fips-fingerprint"))
194 hmac_key = "etaonrishdlcupfm"; 219 hmac_key = "etaonrishdlcupfm";
195 else if (!strcmp(*argv,"-hmac")) 220 else if (!strcmp(*argv,"-hmac"))
@@ -356,8 +381,20 @@ int MAIN(int argc, char **argv)
356 goto end; 381 goto end;
357 } 382 }
358 } 383 }
359
360 384
385 if (non_fips_allow)
386 {
387 EVP_MD_CTX *md_ctx;
388 BIO_get_md_ctx(bmd,&md_ctx);
389 EVP_MD_CTX_set_flags(md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
390 }
391
392 if (sig_flags)
393 {
394 EVP_MD_CTX *md_ctx;
395 BIO_get_md_ctx(bmd,&md_ctx);
396 EVP_MD_CTX_set_flags(md_ctx, sig_flags);
397 }
361 398
362 /* we use md as a filter, reading from 'in' */ 399 /* we use md as a filter, reading from 'in' */
363 if (!BIO_set_md(bmd,md)) 400 if (!BIO_set_md(bmd,md))
@@ -373,11 +410,12 @@ int MAIN(int argc, char **argv)
373 { 410 {
374 BIO_set_fp(in,stdin,BIO_NOCLOSE); 411 BIO_set_fp(in,stdin,BIO_NOCLOSE);
375 err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf, 412 err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
376 siglen,"","(stdin)",bmd,hmac_key); 413 siglen,"","(stdin)",bmd,hmac_key,non_fips_allow);
377 } 414 }
378 else 415 else
379 { 416 {
380 name=OBJ_nid2sn(md->type); 417 name=OBJ_nid2sn(md->type);
418 err = 0;
381 for (i=0; i<argc; i++) 419 for (i=0; i<argc; i++)
382 { 420 {
383 char *tmp,*tofree=NULL; 421 char *tmp,*tofree=NULL;
@@ -399,7 +437,7 @@ int MAIN(int argc, char **argv)
399 else 437 else
400 tmp=""; 438 tmp="";
401 r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf, 439 r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
402 siglen,tmp,argv[i],bmd,hmac_key); 440 siglen,tmp,argv[i],bmd,hmac_key,non_fips_allow);
403 if(r) 441 if(r)
404 err=r; 442 err=r;
405 if(tofree) 443 if(tofree)
@@ -426,7 +464,7 @@ end:
426 464
427int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, 465int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
428 EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title, 466 EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
429 const char *file,BIO *bmd,const char *hmac_key) 467 const char *file,BIO *bmd,const char *hmac_key,int non_fips_allow)
430 { 468 {
431 unsigned int len; 469 unsigned int len;
432 int i; 470 int i;
diff --git a/src/lib/libssl/src/apps/dsa.c b/src/lib/libssl/src/apps/dsa.c
index 7518a2fe96..cbc1fe3f81 100644
--- a/src/lib/libssl/src/apps/dsa.c
+++ b/src/lib/libssl/src/apps/dsa.c
@@ -96,9 +96,7 @@ int MAIN(int, char **);
96 96
97int MAIN(int argc, char **argv) 97int MAIN(int argc, char **argv)
98 { 98 {
99#ifndef OPENSSL_NO_ENGINE
100 ENGINE *e = NULL; 99 ENGINE *e = NULL;
101#endif
102 int ret=1; 100 int ret=1;
103 DSA *dsa=NULL; 101 DSA *dsa=NULL;
104 int i,badops=0; 102 int i,badops=0;
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c
index a41ea800ac..47c6eb604d 100644
--- a/src/lib/libssl/src/apps/enc.c
+++ b/src/lib/libssl/src/apps/enc.c
@@ -127,6 +127,7 @@ int MAIN(int argc, char **argv)
127 char *engine = NULL; 127 char *engine = NULL;
128#endif 128#endif
129 const EVP_MD *dgst=NULL; 129 const EVP_MD *dgst=NULL;
130 int non_fips_allow = 0;
130 131
131 apps_startup(); 132 apps_startup();
132 133
@@ -261,6 +262,8 @@ int MAIN(int argc, char **argv)
261 if (--argc < 1) goto bad; 262 if (--argc < 1) goto bad;
262 md= *(++argv); 263 md= *(++argv);
263 } 264 }
265 else if (strcmp(*argv,"-non-fips-allow") == 0)
266 non_fips_allow = 1;
264 else if ((argv[0][0] == '-') && 267 else if ((argv[0][0] == '-') &&
265 ((c=EVP_get_cipherbyname(&(argv[0][1]))) != NULL)) 268 ((c=EVP_get_cipherbyname(&(argv[0][1]))) != NULL))
266 { 269 {
@@ -314,7 +317,10 @@ bad:
314 317
315 if (dgst == NULL) 318 if (dgst == NULL)
316 { 319 {
317 dgst = EVP_md5(); 320 if (in_FIPS_mode)
321 dgst = EVP_sha1();
322 else
323 dgst = EVP_md5();
318 } 324 }
319 325
320 if (bufsize != NULL) 326 if (bufsize != NULL)
@@ -549,6 +555,11 @@ bad:
549 */ 555 */
550 556
551 BIO_get_cipher_ctx(benc, &ctx); 557 BIO_get_cipher_ctx(benc, &ctx);
558
559 if (non_fips_allow)
560 EVP_CIPHER_CTX_set_flags(ctx,
561 EVP_CIPH_FLAG_NON_FIPS_ALLOW);
562
552 if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc)) 563 if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc))
553 { 564 {
554 BIO_printf(bio_err, "Error setting cipher %s\n", 565 BIO_printf(bio_err, "Error setting cipher %s\n",
diff --git a/src/lib/libssl/src/apps/engine.c b/src/lib/libssl/src/apps/engine.c
index 25c8617107..1d0dd9bfbc 100644
--- a/src/lib/libssl/src/apps/engine.c
+++ b/src/lib/libssl/src/apps/engine.c
@@ -56,7 +56,6 @@
56 * 56 *
57 */ 57 */
58 58
59#ifndef OPENSSL_NO_ENGINE
60 59
61#include <stdio.h> 60#include <stdio.h>
62#include <stdlib.h> 61#include <stdlib.h>
@@ -66,6 +65,7 @@
66#endif 65#endif
67#include "apps.h" 66#include "apps.h"
68#include <openssl/err.h> 67#include <openssl/err.h>
68#ifndef OPENSSL_NO_ENGINE
69#include <openssl/engine.h> 69#include <openssl/engine.h>
70#include <openssl/ssl.h> 70#include <openssl/ssl.h>
71 71
diff --git a/src/lib/libssl/src/apps/genrsa.c b/src/lib/libssl/src/apps/genrsa.c
index 1599bb7a69..fdc0d4a07d 100644
--- a/src/lib/libssl/src/apps/genrsa.c
+++ b/src/lib/libssl/src/apps/genrsa.c
@@ -95,6 +95,7 @@ int MAIN(int argc, char **argv)
95 int ret=1; 95 int ret=1;
96 int i,num=DEFBITS; 96 int i,num=DEFBITS;
97 long l; 97 long l;
98 int use_x931 = 0;
98 const EVP_CIPHER *enc=NULL; 99 const EVP_CIPHER *enc=NULL;
99 unsigned long f4=RSA_F4; 100 unsigned long f4=RSA_F4;
100 char *outfile=NULL; 101 char *outfile=NULL;
@@ -138,6 +139,8 @@ int MAIN(int argc, char **argv)
138 f4=3; 139 f4=3;
139 else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0) 140 else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
140 f4=RSA_F4; 141 f4=RSA_F4;
142 else if (strcmp(*argv,"-x931") == 0)
143 use_x931 = 1;
141#ifndef OPENSSL_NO_ENGINE 144#ifndef OPENSSL_NO_ENGINE
142 else if (strcmp(*argv,"-engine") == 0) 145 else if (strcmp(*argv,"-engine") == 0)
143 { 146 {
@@ -266,7 +269,17 @@ bad:
266 BIO_printf(bio_err,"Generating RSA private key, %d bit long modulus\n", 269 BIO_printf(bio_err,"Generating RSA private key, %d bit long modulus\n",
267 num); 270 num);
268 271
269 if(!BN_set_word(bn, f4) || !RSA_generate_key_ex(rsa, num, bn, &cb)) 272 if (use_x931)
273 {
274 BIGNUM *pubexp;
275 pubexp = BN_new();
276 if (!BN_set_word(pubexp, f4))
277 goto err;
278 if (!RSA_X931_generate_key_ex(rsa, num, pubexp, &cb))
279 goto err;
280 BN_free(pubexp);
281 }
282 else if(!BN_set_word(bn, f4) || !RSA_generate_key_ex(rsa, num, bn, &cb))
270 goto err; 283 goto err;
271 284
272 app_RAND_write_file(NULL, bio_err); 285 app_RAND_write_file(NULL, bio_err);
diff --git a/src/lib/libssl/src/apps/makeapps.com b/src/lib/libssl/src/apps/makeapps.com
index 826ab5bec6..0580a1f401 100644
--- a/src/lib/libssl/src/apps/makeapps.com
+++ b/src/lib/libssl/src/apps/makeapps.com
@@ -142,7 +142,7 @@ $ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+-
142 "RSA;RSAUTL;DSA;DSAPARAM;EC;ECPARAM;"+- 142 "RSA;RSAUTL;DSA;DSAPARAM;EC;ECPARAM;"+-
143 "X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+- 143 "X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+-
144 "S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+- 144 "S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+-
145 "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;CMS;RAND;ENGINE;OCSP;PRIME" 145 "CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP;PRIME"
146$ TCPIP_PROGRAMS = ",," 146$ TCPIP_PROGRAMS = ",,"
147$ IF COMPILER .EQS. "VAXC" THEN - 147$ IF COMPILER .EQS. "VAXC" THEN -
148 TCPIP_PROGRAMS = ",OPENSSL," 148 TCPIP_PROGRAMS = ",OPENSSL,"
diff --git a/src/lib/libssl/src/apps/nseq.c b/src/lib/libssl/src/apps/nseq.c
index dc71d45012..e3c4dba547 100644
--- a/src/lib/libssl/src/apps/nseq.c
+++ b/src/lib/libssl/src/apps/nseq.c
@@ -1,5 +1,5 @@
1/* nseq.c */ 1/* nseq.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/apps/ocsp.c b/src/lib/libssl/src/apps/ocsp.c
index 1001f3b25d..251044d77f 100644
--- a/src/lib/libssl/src/apps/ocsp.c
+++ b/src/lib/libssl/src/apps/ocsp.c
@@ -1,5 +1,5 @@
1/* ocsp.c */ 1/* ocsp.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c
index ec25f990fe..7d2b476cf0 100644
--- a/src/lib/libssl/src/apps/openssl.c
+++ b/src/lib/libssl/src/apps/openssl.c
@@ -147,6 +147,7 @@ char *default_config_file=NULL;
147#ifdef MONOLITH 147#ifdef MONOLITH
148CONF *config=NULL; 148CONF *config=NULL;
149BIO *bio_err=NULL; 149BIO *bio_err=NULL;
150int in_FIPS_mode=0;
150#endif 151#endif
151 152
152 153
@@ -232,6 +233,19 @@ int main(int Argc, char *Argv[])
232 arg.data=NULL; 233 arg.data=NULL;
233 arg.count=0; 234 arg.count=0;
234 235
236 in_FIPS_mode = 0;
237
238#ifdef OPENSSL_FIPS
239 if(getenv("OPENSSL_FIPS")) {
240 if (!FIPS_mode_set(1)) {
241 ERR_load_crypto_strings();
242 ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE));
243 EXIT(1);
244 }
245 in_FIPS_mode = 1;
246 }
247#endif
248
235 if (bio_err == NULL) 249 if (bio_err == NULL)
236 if ((bio_err=BIO_new(BIO_s_file())) != NULL) 250 if ((bio_err=BIO_new(BIO_s_file())) != NULL)
237 BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); 251 BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
@@ -273,21 +287,9 @@ int main(int Argc, char *Argv[])
273 i=NCONF_load(config,p,&errline); 287 i=NCONF_load(config,p,&errline);
274 if (i == 0) 288 if (i == 0)
275 { 289 {
276 if (ERR_GET_REASON(ERR_peek_last_error()) 290 NCONF_free(config);
277 == CONF_R_NO_SUCH_FILE) 291 config = NULL;
278 { 292 ERR_clear_error();
279 BIO_printf(bio_err,
280 "WARNING: can't open config file: %s\n",p);
281 ERR_clear_error();
282 NCONF_free(config);
283 config = NULL;
284 }
285 else
286 {
287 ERR_print_errors(bio_err);
288 NCONF_free(config);
289 exit(1);
290 }
291 } 293 }
292 294
293 prog=prog_init(); 295 prog=prog_init();
diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c
index 268390ebe8..248bc1154d 100644
--- a/src/lib/libssl/src/apps/pkcs12.c
+++ b/src/lib/libssl/src/apps/pkcs12.c
@@ -1,5 +1,5 @@
1/* pkcs12.c */ 1/* pkcs12.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -111,7 +111,7 @@ int MAIN(int argc, char **argv)
111 int maciter = PKCS12_DEFAULT_ITER; 111 int maciter = PKCS12_DEFAULT_ITER;
112 int twopass = 0; 112 int twopass = 0;
113 int keytype = 0; 113 int keytype = 0;
114 int cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC; 114 int cert_pbe;
115 int key_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; 115 int key_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
116 int ret = 1; 116 int ret = 1;
117 int macver = 1; 117 int macver = 1;
@@ -128,6 +128,13 @@ int MAIN(int argc, char **argv)
128 128
129 apps_startup(); 129 apps_startup();
130 130
131#ifdef OPENSSL_FIPS
132 if (FIPS_mode())
133 cert_pbe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
134 else
135#endif
136 cert_pbe = NID_pbe_WithSHA1And40BitRC2_CBC;
137
131 enc = EVP_des_ede3_cbc(); 138 enc = EVP_des_ede3_cbc();
132 if (bio_err == NULL ) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE); 139 if (bio_err == NULL ) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
133 140
diff --git a/src/lib/libssl/src/apps/pkcs8.c b/src/lib/libssl/src/apps/pkcs8.c
index d5085444e2..9633a149bc 100644
--- a/src/lib/libssl/src/apps/pkcs8.c
+++ b/src/lib/libssl/src/apps/pkcs8.c
@@ -1,5 +1,5 @@
1/* pkcs8.c */ 1/* pkcs8.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999-2004. 3 * project 1999-2004.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/apps/rsautl.c b/src/lib/libssl/src/apps/rsautl.c
index f3c458ed27..923e2b682f 100644
--- a/src/lib/libssl/src/apps/rsautl.c
+++ b/src/lib/libssl/src/apps/rsautl.c
@@ -1,5 +1,5 @@
1/* rsautl.c */ 1/* rsautl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/apps/s_client.c b/src/lib/libssl/src/apps/s_client.c
index 78ac95c512..66d54989a2 100644
--- a/src/lib/libssl/src/apps/s_client.c
+++ b/src/lib/libssl/src/apps/s_client.c
@@ -225,6 +225,7 @@ static void sc_usage(void)
225 BIO_printf(bio_err," -crlf - convert LF from terminal into CRLF\n"); 225 BIO_printf(bio_err," -crlf - convert LF from terminal into CRLF\n");
226 BIO_printf(bio_err," -quiet - no s_client output\n"); 226 BIO_printf(bio_err," -quiet - no s_client output\n");
227 BIO_printf(bio_err," -ign_eof - ignore input eof (default when -quiet)\n"); 227 BIO_printf(bio_err," -ign_eof - ignore input eof (default when -quiet)\n");
228 BIO_printf(bio_err," -no_ign_eof - don't ignore input eof\n");
228 BIO_printf(bio_err," -ssl2 - just use SSLv2\n"); 229 BIO_printf(bio_err," -ssl2 - just use SSLv2\n");
229 BIO_printf(bio_err," -ssl3 - just use SSLv3\n"); 230 BIO_printf(bio_err," -ssl3 - just use SSLv3\n");
230 BIO_printf(bio_err," -tls1 - just use TLSv1\n"); 231 BIO_printf(bio_err," -tls1 - just use TLSv1\n");
@@ -238,7 +239,8 @@ static void sc_usage(void)
238 BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n"); 239 BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n");
239 BIO_printf(bio_err," for those protocols that support it, where\n"); 240 BIO_printf(bio_err," for those protocols that support it, where\n");
240 BIO_printf(bio_err," 'prot' defines which one to assume. Currently,\n"); 241 BIO_printf(bio_err," 'prot' defines which one to assume. Currently,\n");
241 BIO_printf(bio_err," only \"smtp\", \"pop3\", \"imap\", and \"ftp\" are supported.\n"); 242 BIO_printf(bio_err," only \"smtp\", \"pop3\", \"imap\", \"ftp\" and \"xmpp\"\n");
243 BIO_printf(bio_err," are supported.\n");
242#ifndef OPENSSL_NO_ENGINE 244#ifndef OPENSSL_NO_ENGINE
243 BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n"); 245 BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
244#endif 246#endif
@@ -280,7 +282,8 @@ enum
280 PROTO_SMTP, 282 PROTO_SMTP,
281 PROTO_POP3, 283 PROTO_POP3,
282 PROTO_IMAP, 284 PROTO_IMAP,
283 PROTO_FTP 285 PROTO_FTP,
286 PROTO_XMPP
284}; 287};
285 288
286int MAIN(int, char **); 289int MAIN(int, char **);
@@ -322,8 +325,9 @@ int MAIN(int argc, char **argv)
322#ifndef OPENSSL_NO_ENGINE 325#ifndef OPENSSL_NO_ENGINE
323 char *engine_id=NULL; 326 char *engine_id=NULL;
324 char *ssl_client_engine_id=NULL; 327 char *ssl_client_engine_id=NULL;
325 ENGINE *e=NULL, *ssl_client_engine=NULL; 328 ENGINE *ssl_client_engine=NULL;
326#endif 329#endif
330 ENGINE *e=NULL;
327#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE) 331#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE)
328 struct timeval tv; 332 struct timeval tv;
329#endif 333#endif
@@ -339,6 +343,9 @@ int MAIN(int argc, char **argv)
339 int peerlen = sizeof(peer); 343 int peerlen = sizeof(peer);
340 int enable_timeouts = 0 ; 344 int enable_timeouts = 0 ;
341 long mtu = 0; 345 long mtu = 0;
346#ifndef OPENSSL_NO_JPAKE
347 char *jpake_secret = NULL;
348#endif
342 349
343#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3) 350#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
344 meth=SSLv23_client_method(); 351 meth=SSLv23_client_method();
@@ -439,6 +446,8 @@ int MAIN(int argc, char **argv)
439 } 446 }
440 else if (strcmp(*argv,"-ign_eof") == 0) 447 else if (strcmp(*argv,"-ign_eof") == 0)
441 c_ign_eof=1; 448 c_ign_eof=1;
449 else if (strcmp(*argv,"-no_ign_eof") == 0)
450 c_ign_eof=0;
442 else if (strcmp(*argv,"-pause") == 0) 451 else if (strcmp(*argv,"-pause") == 0)
443 c_Pause=1; 452 c_Pause=1;
444 else if (strcmp(*argv,"-debug") == 0) 453 else if (strcmp(*argv,"-debug") == 0)
@@ -551,6 +560,8 @@ int MAIN(int argc, char **argv)
551 starttls_proto = PROTO_IMAP; 560 starttls_proto = PROTO_IMAP;
552 else if (strcmp(*argv,"ftp") == 0) 561 else if (strcmp(*argv,"ftp") == 0)
553 starttls_proto = PROTO_FTP; 562 starttls_proto = PROTO_FTP;
563 else if (strcmp(*argv, "xmpp") == 0)
564 starttls_proto = PROTO_XMPP;
554 else 565 else
555 goto bad; 566 goto bad;
556 } 567 }
@@ -581,6 +592,13 @@ int MAIN(int argc, char **argv)
581 /* meth=TLSv1_client_method(); */ 592 /* meth=TLSv1_client_method(); */
582 } 593 }
583#endif 594#endif
595#ifndef OPENSSL_NO_JPAKE
596 else if (strcmp(*argv,"-jpake") == 0)
597 {
598 if (--argc < 1) goto bad;
599 jpake_secret = *++argv;
600 }
601#endif
584 else 602 else
585 { 603 {
586 BIO_printf(bio_err,"unknown option %s\n",*argv); 604 BIO_printf(bio_err,"unknown option %s\n",*argv);
@@ -843,8 +861,6 @@ re_start:
843 else 861 else
844 sbio=BIO_new_socket(s,BIO_NOCLOSE); 862 sbio=BIO_new_socket(s,BIO_NOCLOSE);
845 863
846
847
848 if (nbio_test) 864 if (nbio_test)
849 { 865 {
850 BIO *test; 866 BIO *test;
@@ -888,6 +904,10 @@ SSL_set_tlsext_status_ids(con, ids);
888#endif 904#endif
889 } 905 }
890#endif 906#endif
907#ifndef OPENSSL_NO_JPAKE
908 if (jpake_secret)
909 jpake_client_auth(bio_c_out, sbio, jpake_secret);
910#endif
891 911
892 SSL_set_bio(con,sbio,sbio); 912 SSL_set_bio(con,sbio,sbio);
893 SSL_set_connect_state(con); 913 SSL_set_connect_state(con);
@@ -1000,6 +1020,28 @@ SSL_set_tlsext_status_ids(con, ids);
1000 BIO_printf(sbio,"AUTH TLS\r\n"); 1020 BIO_printf(sbio,"AUTH TLS\r\n");
1001 BIO_read(sbio,sbuf,BUFSIZZ); 1021 BIO_read(sbio,sbuf,BUFSIZZ);
1002 } 1022 }
1023 if (starttls_proto == PROTO_XMPP)
1024 {
1025 int seen = 0;
1026 BIO_printf(sbio,"<stream:stream "
1027 "xmlns:stream='http://etherx.jabber.org/streams' "
1028 "xmlns='jabber:client' to='%s' version='1.0'>", host);
1029 seen = BIO_read(sbio,mbuf,BUFSIZZ);
1030 mbuf[seen] = 0;
1031 while (!strstr(mbuf, "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'"))
1032 {
1033 if (strstr(mbuf, "/stream:features>"))
1034 goto shut;
1035 seen = BIO_read(sbio,mbuf,BUFSIZZ);
1036 mbuf[seen] = 0;
1037 }
1038 BIO_printf(sbio, "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
1039 seen = BIO_read(sbio,sbuf,BUFSIZZ);
1040 sbuf[seen] = 0;
1041 if (!strstr(sbuf, "<proceed"))
1042 goto shut;
1043 mbuf[0] = 0;
1044 }
1003 1045
1004 for (;;) 1046 for (;;)
1005 { 1047 {
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c
index 7919c437c6..84b1b28461 100644
--- a/src/lib/libssl/src/apps/s_server.c
+++ b/src/lib/libssl/src/apps/s_server.c
@@ -742,6 +742,10 @@ BIO_printf(err, "cert_status: received %d ids\n", sk_OCSP_RESPID_num(ids));
742#endif 742#endif
743int MAIN(int, char **); 743int MAIN(int, char **);
744 744
745#ifndef OPENSSL_NO_JPAKE
746static char *jpake_secret = NULL;
747#endif
748
745int MAIN(int argc, char *argv[]) 749int MAIN(int argc, char *argv[])
746 { 750 {
747 X509_STORE *store = NULL; 751 X509_STORE *store = NULL;
@@ -760,9 +764,7 @@ int MAIN(int argc, char *argv[])
760 int state=0; 764 int state=0;
761 SSL_METHOD *meth=NULL; 765 SSL_METHOD *meth=NULL;
762 int socket_type=SOCK_STREAM; 766 int socket_type=SOCK_STREAM;
763#ifndef OPENSSL_NO_ENGINE
764 ENGINE *e=NULL; 767 ENGINE *e=NULL;
765#endif
766 char *inrand=NULL; 768 char *inrand=NULL;
767 int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM; 769 int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM;
768 char *passarg = NULL, *pass = NULL; 770 char *passarg = NULL, *pass = NULL;
@@ -774,7 +776,6 @@ int MAIN(int argc, char *argv[])
774 EVP_PKEY *s_key2 = NULL; 776 EVP_PKEY *s_key2 = NULL;
775 X509 *s_cert2 = NULL; 777 X509 *s_cert2 = NULL;
776#endif 778#endif
777
778#ifndef OPENSSL_NO_TLSEXT 779#ifndef OPENSSL_NO_TLSEXT
779 tlsextctx tlsextcbp = {NULL, NULL, SSL_TLSEXT_ERR_ALERT_WARNING}; 780 tlsextctx tlsextcbp = {NULL, NULL, SSL_TLSEXT_ERR_ALERT_WARNING};
780#endif 781#endif
@@ -1071,6 +1072,14 @@ int MAIN(int argc, char *argv[])
1071 if (--argc < 1) goto bad; 1072 if (--argc < 1) goto bad;
1072 s_key_file2= *(++argv); 1073 s_key_file2= *(++argv);
1073 } 1074 }
1075
1076#endif
1077#ifndef OPENSSL_NO_JPAKE
1078 else if (strcmp(*argv,"-jpake") == 0)
1079 {
1080 if (--argc < 1) goto bad;
1081 jpake_secret = *(++argv);
1082 }
1074#endif 1083#endif
1075 else 1084 else
1076 { 1085 {
@@ -1673,6 +1682,11 @@ static int sv_body(char *hostname, int s, unsigned char *context)
1673 test=BIO_new(BIO_f_nbio_test()); 1682 test=BIO_new(BIO_f_nbio_test());
1674 sbio=BIO_push(test,sbio); 1683 sbio=BIO_push(test,sbio);
1675 } 1684 }
1685#ifndef OPENSSL_NO_JPAKE
1686 if(jpake_secret)
1687 jpake_server_auth(bio_s_out, sbio, jpake_secret);
1688#endif
1689
1676 SSL_set_bio(con,sbio,sbio); 1690 SSL_set_bio(con,sbio,sbio);
1677 SSL_set_accept_state(con); 1691 SSL_set_accept_state(con);
1678 /* SSL_set_fd(con,s); */ 1692 /* SSL_set_fd(con,s); */
diff --git a/src/lib/libssl/src/apps/smime.c b/src/lib/libssl/src/apps/smime.c
index ce8a1cbecb..75804b8d7b 100644
--- a/src/lib/libssl/src/apps/smime.c
+++ b/src/lib/libssl/src/apps/smime.c
@@ -1,5 +1,5 @@
1/* smime.c */ 1/* smime.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/apps/speed.c b/src/lib/libssl/src/apps/speed.c
index 8a1974f5fe..af077b54a8 100644
--- a/src/lib/libssl/src/apps/speed.c
+++ b/src/lib/libssl/src/apps/speed.c
@@ -2132,7 +2132,7 @@ int MAIN(int argc, char **argv)
2132 { 2132 {
2133 ret=RSA_verify(NID_md5_sha1, buf,36, buf2, 2133 ret=RSA_verify(NID_md5_sha1, buf,36, buf2,
2134 rsa_num, rsa_key[j]); 2134 rsa_num, rsa_key[j]);
2135 if (ret == 0) 2135 if (ret <= 0)
2136 { 2136 {
2137 BIO_printf(bio_err, 2137 BIO_printf(bio_err,
2138 "RSA verify failure\n"); 2138 "RSA verify failure\n");
@@ -2760,6 +2760,8 @@ static int do_multi(int multi)
2760 for(n=0 ; n < multi ; ++n) 2760 for(n=0 ; n < multi ; ++n)
2761 { 2761 {
2762 pipe(fd); 2762 pipe(fd);
2763 fflush(stdout);
2764 fflush(stderr);
2763 if(fork()) 2765 if(fork())
2764 { 2766 {
2765 close(fd[1]); 2767 close(fd[1]);
diff --git a/src/lib/libssl/src/apps/spkac.c b/src/lib/libssl/src/apps/spkac.c
index 0191d0a783..0e01ea9947 100644
--- a/src/lib/libssl/src/apps/spkac.c
+++ b/src/lib/libssl/src/apps/spkac.c
@@ -1,6 +1,6 @@
1/* apps/spkac.c */ 1/* apps/spkac.c */
2 2
3/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 3/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
4 * project 1999. Based on an original idea by Massimiliano Pala 4 * project 1999. Based on an original idea by Massimiliano Pala
5 * (madwolf@openca.org). 5 * (madwolf@openca.org).
6 */ 6 */
@@ -285,7 +285,7 @@ bad:
285 pkey = NETSCAPE_SPKI_get_pubkey(spki); 285 pkey = NETSCAPE_SPKI_get_pubkey(spki);
286 if(verify) { 286 if(verify) {
287 i = NETSCAPE_SPKI_verify(spki, pkey); 287 i = NETSCAPE_SPKI_verify(spki, pkey);
288 if(i) BIO_printf(bio_err, "Signature OK\n"); 288 if (i > 0) BIO_printf(bio_err, "Signature OK\n");
289 else { 289 else {
290 BIO_printf(bio_err, "Signature Failure\n"); 290 BIO_printf(bio_err, "Signature Failure\n");
291 ERR_print_errors(bio_err); 291 ERR_print_errors(bio_err);
diff --git a/src/lib/libssl/src/apps/verify.c b/src/lib/libssl/src/apps/verify.c
index 9ff32cb068..20cc9e354c 100644
--- a/src/lib/libssl/src/apps/verify.c
+++ b/src/lib/libssl/src/apps/verify.c
@@ -266,7 +266,7 @@ static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X
266 266
267 ret=0; 267 ret=0;
268end: 268end:
269 if (i) 269 if (i > 0)
270 { 270 {
271 fprintf(stdout,"OK\n"); 271 fprintf(stdout,"OK\n");
272 ret=1; 272 ret=1;
@@ -367,4 +367,3 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
367 ERR_clear_error(); 367 ERR_clear_error();
368 return(ok); 368 return(ok);
369 } 369 }
370
diff --git a/src/lib/libssl/src/apps/version.c b/src/lib/libssl/src/apps/version.c
index 69ef3e1bad..e9555cbde2 100644
--- a/src/lib/libssl/src/apps/version.c
+++ b/src/lib/libssl/src/apps/version.c
@@ -167,7 +167,7 @@ int MAIN(int argc, char **argv)
167 date=version=cflags=options=platform=dir=1; 167 date=version=cflags=options=platform=dir=1;
168 else 168 else
169 { 169 {
170 BIO_printf(bio_err,"usage:version -[avbofp]\n"); 170 BIO_printf(bio_err,"usage:version -[avbofpd]\n");
171 ret=1; 171 ret=1;
172 goto end; 172 goto end;
173 } 173 }
diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c
index f6938356f8..d904d34021 100644
--- a/src/lib/libssl/src/apps/x509.c
+++ b/src/lib/libssl/src/apps/x509.c
@@ -1151,7 +1151,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
1151 /* NOTE: this certificate can/should be self signed, unless it was 1151 /* NOTE: this certificate can/should be self signed, unless it was
1152 * a certificate request in which case it is not. */ 1152 * a certificate request in which case it is not. */
1153 X509_STORE_CTX_set_cert(&xsc,x); 1153 X509_STORE_CTX_set_cert(&xsc,x);
1154 if (!reqfile && !X509_verify_cert(&xsc)) 1154 if (!reqfile && X509_verify_cert(&xsc) <= 0)
1155 goto end; 1155 goto end;
1156 1156
1157 if (!X509_check_private_key(xca,pkey)) 1157 if (!X509_check_private_key(xca,pkey))
diff --git a/src/lib/libssl/src/crypto/aes/aes.h b/src/lib/libssl/src/crypto/aes/aes.h
index baf0222d49..450f2b4051 100644
--- a/src/lib/libssl/src/crypto/aes/aes.h
+++ b/src/lib/libssl/src/crypto/aes/aes.h
@@ -66,6 +66,10 @@
66#define AES_MAXNR 14 66#define AES_MAXNR 14
67#define AES_BLOCK_SIZE 16 67#define AES_BLOCK_SIZE 16
68 68
69#ifdef OPENSSL_FIPS
70#define FIPS_AES_SIZE_T int
71#endif
72
69#ifdef __cplusplus 73#ifdef __cplusplus
70extern "C" { 74extern "C" {
71#endif 75#endif
diff --git a/src/lib/libssl/src/crypto/aes/aes_cbc.c b/src/lib/libssl/src/crypto/aes/aes_cbc.c
index d2ba6bcdb4..373864cd4b 100644
--- a/src/lib/libssl/src/crypto/aes/aes_cbc.c
+++ b/src/lib/libssl/src/crypto/aes/aes_cbc.c
@@ -59,6 +59,7 @@
59#include <openssl/aes.h> 59#include <openssl/aes.h>
60#include "aes_locl.h" 60#include "aes_locl.h"
61 61
62#if !defined(OPENSSL_FIPS_AES_ASM)
62void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, 63void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
63 const unsigned long length, const AES_KEY *key, 64 const unsigned long length, const AES_KEY *key,
64 unsigned char *ivec, const int enc) { 65 unsigned char *ivec, const int enc) {
@@ -129,3 +130,4 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
129 } 130 }
130 } 131 }
131} 132}
133#endif
diff --git a/src/lib/libssl/src/crypto/aes/aes_core.c b/src/lib/libssl/src/crypto/aes/aes_core.c
index 3a80e18b0a..cffdd4daec 100644
--- a/src/lib/libssl/src/crypto/aes/aes_core.c
+++ b/src/lib/libssl/src/crypto/aes/aes_core.c
@@ -37,6 +37,10 @@
37 37
38#include <stdlib.h> 38#include <stdlib.h>
39#include <openssl/aes.h> 39#include <openssl/aes.h>
40#ifdef OPENSSL_FIPS
41#include <openssl/fips.h>
42#endif
43
40#include "aes_locl.h" 44#include "aes_locl.h"
41 45
42/* 46/*
@@ -631,6 +635,10 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
631 int i = 0; 635 int i = 0;
632 u32 temp; 636 u32 temp;
633 637
638#ifdef OPENSSL_FIPS
639 FIPS_selftest_check();
640#endif
641
634 if (!userKey || !key) 642 if (!userKey || !key)
635 return -1; 643 return -1;
636 if (bits != 128 && bits != 192 && bits != 256) 644 if (bits != 128 && bits != 192 && bits != 256)
diff --git a/src/lib/libssl/src/crypto/aes/asm/aes-586.pl b/src/lib/libssl/src/crypto/aes/asm/aes-586.pl
index 3da307bef9..e771e83953 100644
--- a/src/lib/libssl/src/crypto/aes/asm/aes-586.pl
+++ b/src/lib/libssl/src/crypto/aes/asm/aes-586.pl
@@ -955,8 +955,9 @@ my $mark=&DWP(60+240,"esp"); #copy of aes_key->rounds
955 955
956 &align (4); 956 &align (4);
957 &set_label("enc_tail"); 957 &set_label("enc_tail");
958 &push ($key eq "edi" ? $key : ""); # push ivp 958 &mov ($s0,$key eq "edi" ? $key : "");
959 &mov ($key,$_out); # load out 959 &mov ($key,$_out); # load out
960 &push ($s0); # push ivp
960 &mov ($s1,16); 961 &mov ($s1,16);
961 &sub ($s1,$s2); 962 &sub ($s1,$s2);
962 &cmp ($key,$acc); # compare with inp 963 &cmp ($key,$acc); # compare with inp
diff --git a/src/lib/libssl/src/crypto/asn1/a_mbstr.c b/src/lib/libssl/src/crypto/asn1/a_mbstr.c
index 2d4800a22a..1bcd046893 100644
--- a/src/lib/libssl/src/crypto/asn1/a_mbstr.c
+++ b/src/lib/libssl/src/crypto/asn1/a_mbstr.c
@@ -1,5 +1,5 @@
1/* a_mbstr.c */ 1/* a_mbstr.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/a_sign.c b/src/lib/libssl/src/crypto/asn1/a_sign.c
index 1081950518..4dee45fbb8 100644
--- a/src/lib/libssl/src/crypto/asn1/a_sign.c
+++ b/src/lib/libssl/src/crypto/asn1/a_sign.c
@@ -267,7 +267,12 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
267 goto err; 267 goto err;
268 } 268 }
269 269
270 EVP_SignInit_ex(&ctx,type, NULL); 270 if (!EVP_SignInit_ex(&ctx,type, NULL))
271 {
272 outl=0;
273 ASN1err(ASN1_F_ASN1_ITEM_SIGN,ERR_R_EVP_LIB);
274 goto err;
275 }
271 EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl); 276 EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl);
272 if (!EVP_SignFinal(&ctx,(unsigned char *)buf_out, 277 if (!EVP_SignFinal(&ctx,(unsigned char *)buf_out,
273 (unsigned int *)&outl,pkey)) 278 (unsigned int *)&outl,pkey))
diff --git a/src/lib/libssl/src/crypto/asn1/a_strex.c b/src/lib/libssl/src/crypto/asn1/a_strex.c
index c2dbb6f9a5..7fc14d3296 100644
--- a/src/lib/libssl/src/crypto/asn1/a_strex.c
+++ b/src/lib/libssl/src/crypto/asn1/a_strex.c
@@ -1,5 +1,5 @@
1/* a_strex.c */ 1/* a_strex.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/a_strnid.c b/src/lib/libssl/src/crypto/asn1/a_strnid.c
index 613bbc4a7d..fe515b52ba 100644
--- a/src/lib/libssl/src/crypto/asn1/a_strnid.c
+++ b/src/lib/libssl/src/crypto/asn1/a_strnid.c
@@ -1,5 +1,5 @@
1/* a_strnid.c */ 1/* a_strnid.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/a_verify.c b/src/lib/libssl/src/crypto/asn1/a_verify.c
index fdce6e4380..da3efaaf8d 100644
--- a/src/lib/libssl/src/crypto/asn1/a_verify.c
+++ b/src/lib/libssl/src/crypto/asn1/a_verify.c
@@ -100,7 +100,12 @@ int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature,
100 p=buf_in; 100 p=buf_in;
101 101
102 i2d(data,&p); 102 i2d(data,&p);
103 EVP_VerifyInit_ex(&ctx,type, NULL); 103 if (!EVP_VerifyInit_ex(&ctx,type, NULL))
104 {
105 ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
106 ret=0;
107 goto err;
108 }
104 EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl); 109 EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
105 110
106 OPENSSL_cleanse(buf_in,(unsigned int)inl); 111 OPENSSL_cleanse(buf_in,(unsigned int)inl);
diff --git a/src/lib/libssl/src/crypto/asn1/asn1t.h b/src/lib/libssl/src/crypto/asn1/asn1t.h
index bf315e65ed..ac14f9415b 100644
--- a/src/lib/libssl/src/crypto/asn1/asn1t.h
+++ b/src/lib/libssl/src/crypto/asn1/asn1t.h
@@ -1,5 +1,5 @@
1/* asn1t.h */ 1/* asn1t.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/asn_moid.c b/src/lib/libssl/src/crypto/asn1/asn_moid.c
index 9132350f10..1ea6a59248 100644
--- a/src/lib/libssl/src/crypto/asn1/asn_moid.c
+++ b/src/lib/libssl/src/crypto/asn1/asn_moid.c
@@ -1,5 +1,5 @@
1/* asn_moid.c */ 1/* asn_moid.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/asn_pack.c b/src/lib/libssl/src/crypto/asn1/asn_pack.c
index e8b671b7b5..f1a5a05632 100644
--- a/src/lib/libssl/src/crypto/asn1/asn_pack.c
+++ b/src/lib/libssl/src/crypto/asn1/asn_pack.c
@@ -1,5 +1,5 @@
1/* asn_pack.c */ 1/* asn_pack.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/nsseq.c b/src/lib/libssl/src/crypto/asn1/nsseq.c
index 50e2d4d07a..e551c57d59 100644
--- a/src/lib/libssl/src/crypto/asn1/nsseq.c
+++ b/src/lib/libssl/src/crypto/asn1/nsseq.c
@@ -1,5 +1,5 @@
1/* nsseq.c */ 1/* nsseq.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/p5_pbe.c b/src/lib/libssl/src/crypto/asn1/p5_pbe.c
index da91170094..c4582f8041 100644
--- a/src/lib/libssl/src/crypto/asn1/p5_pbe.c
+++ b/src/lib/libssl/src/crypto/asn1/p5_pbe.c
@@ -1,5 +1,5 @@
1/* p5_pbe.c */ 1/* p5_pbe.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/p5_pbev2.c b/src/lib/libssl/src/crypto/asn1/p5_pbev2.c
index c834a38ddf..2b0516afee 100644
--- a/src/lib/libssl/src/crypto/asn1/p5_pbev2.c
+++ b/src/lib/libssl/src/crypto/asn1/p5_pbev2.c
@@ -1,5 +1,5 @@
1/* p5_pbev2.c */ 1/* p5_pbev2.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999-2004. 3 * project 1999-2004.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/p8_pkey.c b/src/lib/libssl/src/crypto/asn1/p8_pkey.c
index 24b409132f..0a1957556e 100644
--- a/src/lib/libssl/src/crypto/asn1/p8_pkey.c
+++ b/src/lib/libssl/src/crypto/asn1/p8_pkey.c
@@ -1,5 +1,5 @@
1/* p8_pkey.c */ 1/* p8_pkey.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/t_bitst.c b/src/lib/libssl/src/crypto/asn1/t_bitst.c
index 397332d9b8..2e59a25fa1 100644
--- a/src/lib/libssl/src/crypto/asn1/t_bitst.c
+++ b/src/lib/libssl/src/crypto/asn1/t_bitst.c
@@ -1,5 +1,5 @@
1/* t_bitst.c */ 1/* t_bitst.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/t_crl.c b/src/lib/libssl/src/crypto/asn1/t_crl.c
index 929b3e5904..bdb244c015 100644
--- a/src/lib/libssl/src/crypto/asn1/t_crl.c
+++ b/src/lib/libssl/src/crypto/asn1/t_crl.c
@@ -1,5 +1,5 @@
1/* t_crl.c */ 1/* t_crl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/t_spki.c b/src/lib/libssl/src/crypto/asn1/t_spki.c
index c2a5797dd8..a73369b949 100644
--- a/src/lib/libssl/src/crypto/asn1/t_spki.c
+++ b/src/lib/libssl/src/crypto/asn1/t_spki.c
@@ -1,5 +1,5 @@
1/* t_spki.c */ 1/* t_spki.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/t_x509.c b/src/lib/libssl/src/crypto/asn1/t_x509.c
index cb76c32c8d..8f746f9c05 100644
--- a/src/lib/libssl/src/crypto/asn1/t_x509.c
+++ b/src/lib/libssl/src/crypto/asn1/t_x509.c
@@ -393,7 +393,7 @@ int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
393 d= (v[6]-'0')*10+(v[7]-'0'); 393 d= (v[6]-'0')*10+(v[7]-'0');
394 h= (v[8]-'0')*10+(v[9]-'0'); 394 h= (v[8]-'0')*10+(v[9]-'0');
395 m= (v[10]-'0')*10+(v[11]-'0'); 395 m= (v[10]-'0')*10+(v[11]-'0');
396 if (i >= 14 && 396 if (tm->length >= 14 &&
397 (v[12] >= '0') && (v[12] <= '9') && 397 (v[12] >= '0') && (v[12] <= '9') &&
398 (v[13] >= '0') && (v[13] <= '9')) 398 (v[13] >= '0') && (v[13] <= '9'))
399 s= (v[12]-'0')*10+(v[13]-'0'); 399 s= (v[12]-'0')*10+(v[13]-'0');
@@ -429,7 +429,7 @@ int ASN1_UTCTIME_print(BIO *bp, ASN1_UTCTIME *tm)
429 d= (v[4]-'0')*10+(v[5]-'0'); 429 d= (v[4]-'0')*10+(v[5]-'0');
430 h= (v[6]-'0')*10+(v[7]-'0'); 430 h= (v[6]-'0')*10+(v[7]-'0');
431 m= (v[8]-'0')*10+(v[9]-'0'); 431 m= (v[8]-'0')*10+(v[9]-'0');
432 if (i >=12 && 432 if (tm->length >=12 &&
433 (v[10] >= '0') && (v[10] <= '9') && 433 (v[10] >= '0') && (v[10] <= '9') &&
434 (v[11] >= '0') && (v[11] <= '9')) 434 (v[11] >= '0') && (v[11] <= '9'))
435 s= (v[10]-'0')*10+(v[11]-'0'); 435 s= (v[10]-'0')*10+(v[11]-'0');
diff --git a/src/lib/libssl/src/crypto/asn1/t_x509a.c b/src/lib/libssl/src/crypto/asn1/t_x509a.c
index ffbbfb51f4..8b18801a17 100644
--- a/src/lib/libssl/src/crypto/asn1/t_x509a.c
+++ b/src/lib/libssl/src/crypto/asn1/t_x509a.c
@@ -1,5 +1,5 @@
1/* t_x509a.c */ 1/* t_x509a.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_dec.c b/src/lib/libssl/src/crypto/asn1/tasn_dec.c
index 0ee406231e..ced641698e 100644
--- a/src/lib/libssl/src/crypto/asn1/tasn_dec.c
+++ b/src/lib/libssl/src/crypto/asn1/tasn_dec.c
@@ -1,5 +1,5 @@
1/* tasn_dec.c */ 1/* tasn_dec.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_enc.c b/src/lib/libssl/src/crypto/asn1/tasn_enc.c
index be19b36acd..2721f904a6 100644
--- a/src/lib/libssl/src/crypto/asn1/tasn_enc.c
+++ b/src/lib/libssl/src/crypto/asn1/tasn_enc.c
@@ -1,5 +1,5 @@
1/* tasn_enc.c */ 1/* tasn_enc.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_fre.c b/src/lib/libssl/src/crypto/asn1/tasn_fre.c
index bb7c1e2af4..d7c017fa1d 100644
--- a/src/lib/libssl/src/crypto/asn1/tasn_fre.c
+++ b/src/lib/libssl/src/crypto/asn1/tasn_fre.c
@@ -1,5 +1,5 @@
1/* tasn_fre.c */ 1/* tasn_fre.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_new.c b/src/lib/libssl/src/crypto/asn1/tasn_new.c
index 531dad365c..5c6a2ebd4d 100644
--- a/src/lib/libssl/src/crypto/asn1/tasn_new.c
+++ b/src/lib/libssl/src/crypto/asn1/tasn_new.c
@@ -1,5 +1,5 @@
1/* tasn_new.c */ 1/* tasn_new.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_prn.c b/src/lib/libssl/src/crypto/asn1/tasn_prn.c
index 719639b511..b9c96a6dbe 100644
--- a/src/lib/libssl/src/crypto/asn1/tasn_prn.c
+++ b/src/lib/libssl/src/crypto/asn1/tasn_prn.c
@@ -1,5 +1,5 @@
1/* tasn_prn.c */ 1/* tasn_prn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_typ.c b/src/lib/libssl/src/crypto/asn1/tasn_typ.c
index 6f17f1bec7..6252213d15 100644
--- a/src/lib/libssl/src/crypto/asn1/tasn_typ.c
+++ b/src/lib/libssl/src/crypto/asn1/tasn_typ.c
@@ -1,5 +1,5 @@
1/* tasn_typ.c */ 1/* tasn_typ.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_utl.c b/src/lib/libssl/src/crypto/asn1/tasn_utl.c
index 34d520b180..ca9ec7a32f 100644
--- a/src/lib/libssl/src/crypto/asn1/tasn_utl.c
+++ b/src/lib/libssl/src/crypto/asn1/tasn_utl.c
@@ -1,5 +1,5 @@
1/* tasn_utl.c */ 1/* tasn_utl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/x_algor.c b/src/lib/libssl/src/crypto/asn1/x_algor.c
index 33533aba86..99e53429b7 100644
--- a/src/lib/libssl/src/crypto/asn1/x_algor.c
+++ b/src/lib/libssl/src/crypto/asn1/x_algor.c
@@ -1,5 +1,5 @@
1/* x_algor.c */ 1/* x_algor.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/x_bignum.c b/src/lib/libssl/src/crypto/asn1/x_bignum.c
index 869c05d931..9cf3204a1b 100644
--- a/src/lib/libssl/src/crypto/asn1/x_bignum.c
+++ b/src/lib/libssl/src/crypto/asn1/x_bignum.c
@@ -1,5 +1,5 @@
1/* x_bignum.c */ 1/* x_bignum.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/x_exten.c b/src/lib/libssl/src/crypto/asn1/x_exten.c
index 1732e66712..3a21239926 100644
--- a/src/lib/libssl/src/crypto/asn1/x_exten.c
+++ b/src/lib/libssl/src/crypto/asn1/x_exten.c
@@ -1,5 +1,5 @@
1/* x_exten.c */ 1/* x_exten.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/x_long.c b/src/lib/libssl/src/crypto/asn1/x_long.c
index 0db233cb95..bf35457c1f 100644
--- a/src/lib/libssl/src/crypto/asn1/x_long.c
+++ b/src/lib/libssl/src/crypto/asn1/x_long.c
@@ -1,5 +1,5 @@
1/* x_long.c */ 1/* x_long.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/asn1/x_x509a.c b/src/lib/libssl/src/crypto/asn1/x_x509a.c
index 13db5fd03f..b603f82de7 100644
--- a/src/lib/libssl/src/crypto/asn1/x_x509a.c
+++ b/src/lib/libssl/src/crypto/asn1/x_x509a.c
@@ -1,5 +1,5 @@
1/* a_x509a.c */ 1/* a_x509a.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/bf/bf_skey.c b/src/lib/libssl/src/crypto/bf/bf_skey.c
index 3673cdee6e..6ac2aeb279 100644
--- a/src/lib/libssl/src/crypto/bf/bf_skey.c
+++ b/src/lib/libssl/src/crypto/bf/bf_skey.c
@@ -59,10 +59,15 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <openssl/blowfish.h> 61#include <openssl/blowfish.h>
62#include <openssl/crypto.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62#include "bf_locl.h" 67#include "bf_locl.h"
63#include "bf_pi.h" 68#include "bf_pi.h"
64 69
65void BF_set_key(BF_KEY *key, int len, const unsigned char *data) 70FIPS_NON_FIPS_VCIPHER_Init(BF)
66 { 71 {
67 int i; 72 int i;
68 BF_LONG *p,ri,in[2]; 73 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..d24ffccb65 100644
--- a/src/lib/libssl/src/crypto/bf/blowfish.h
+++ b/src/lib/libssl/src/crypto/bf/blowfish.h
@@ -104,7 +104,9 @@ typedef struct bf_key_st
104 BF_LONG S[4*256]; 104 BF_LONG S[4*256];
105 } BF_KEY; 105 } BF_KEY;
106 106
107 107#ifdef OPENSSL_FIPS
108void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data);
109#endif
108void BF_set_key(BF_KEY *key, int len, const unsigned char *data); 110void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
109 111
110void BF_encrypt(BF_LONG *data,const BF_KEY *key); 112void BF_encrypt(BF_LONG *data,const BF_KEY *key);
diff --git a/src/lib/libssl/src/crypto/bio/bss_bio.c b/src/lib/libssl/src/crypto/bio/bss_bio.c
index 0f9f0955b4..76bd48e767 100644
--- a/src/lib/libssl/src/crypto/bio/bss_bio.c
+++ b/src/lib/libssl/src/crypto/bio/bss_bio.c
@@ -919,6 +919,6 @@ int BIO_nwrite(BIO *bio, char **buf, int num)
919 919
920 ret = BIO_ctrl(bio, BIO_C_NWRITE, num, buf); 920 ret = BIO_ctrl(bio, BIO_C_NWRITE, num, buf);
921 if (ret > 0) 921 if (ret > 0)
922 bio->num_read += ret; 922 bio->num_write += ret;
923 return ret; 923 return ret;
924 } 924 }
diff --git a/src/lib/libssl/src/crypto/bio/bss_file.c b/src/lib/libssl/src/crypto/bio/bss_file.c
index 0c8c8115fa..e692a08e58 100644
--- a/src/lib/libssl/src/crypto/bio/bss_file.c
+++ b/src/lib/libssl/src/crypto/bio/bss_file.c
@@ -279,7 +279,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
279#endif 279#endif
280 { 280 {
281#if defined(OPENSSL_SYS_WINDOWS) 281#if defined(OPENSSL_SYS_WINDOWS)
282 int fd = fileno((FILE*)ptr); 282 int fd = _fileno((FILE*)ptr);
283 if (num & BIO_FP_TEXT) 283 if (num & BIO_FP_TEXT)
284 _setmode(fd,_O_TEXT); 284 _setmode(fd,_O_TEXT);
285 else 285 else
diff --git a/src/lib/libssl/src/crypto/bn/Makefile b/src/lib/libssl/src/crypto/bn/Makefile
index 0491e3db4c..f5e8f65a46 100644
--- a/src/lib/libssl/src/crypto/bn/Makefile
+++ b/src/lib/libssl/src/crypto/bn/Makefile
@@ -28,13 +28,13 @@ LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
28 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ 28 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
29 bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \ 29 bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
30 bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \ 30 bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
31 bn_depr.c bn_const.c 31 bn_depr.c bn_x931p.c bn_const.c bn_opt.c
32 32
33LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \ 33LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
34 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \ 34 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
35 bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \ 35 bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
36 bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o \ 36 bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o \
37 bn_depr.o bn_const.o 37 bn_depr.o bn_x931p.o bn_const.o bn_opt.o
38 38
39SRC= $(LIBSRC) 39SRC= $(LIBSRC)
40 40
@@ -58,7 +58,7 @@ bnbug: bnbug.c ../../libcrypto.a top
58 cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a 58 cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a
59 59
60lib: $(LIBOBJ) 60lib: $(LIBOBJ)
61 $(AR) $(LIB) $(LIBOBJ) 61 $(ARX) $(LIB) $(LIBOBJ)
62 $(RANLIB) $(LIB) || echo Never mind. 62 $(RANLIB) $(LIB) || echo Never mind.
63 @touch lib 63 @touch lib
64 64
@@ -292,6 +292,13 @@ bn_nist.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
292bn_nist.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 292bn_nist.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
293bn_nist.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 293bn_nist.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
294bn_nist.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_nist.c 294bn_nist.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_nist.c
295bn_opt.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
296bn_opt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
297bn_opt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
298bn_opt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
299bn_opt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
300bn_opt.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
301bn_opt.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_opt.c
295bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h 302bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
296bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 303bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
297bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 304bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
@@ -350,3 +357,6 @@ bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
350bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 357bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
351bn_word.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 358bn_word.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
352bn_word.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_word.c 359bn_word.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_word.c
360bn_x931p.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
361bn_x931p.o: ../../include/openssl/opensslconf.h
362bn_x931p.o: ../../include/openssl/ossl_typ.h bn_x931p.c
diff --git a/src/lib/libssl/src/crypto/bn/bn.h b/src/lib/libssl/src/crypto/bn/bn.h
index 6d754d5547..f1719a5877 100644
--- a/src/lib/libssl/src/crypto/bn/bn.h
+++ b/src/lib/libssl/src/crypto/bn/bn.h
@@ -408,8 +408,8 @@ BIGNUM *BN_CTX_get(BN_CTX *ctx);
408void BN_CTX_end(BN_CTX *ctx); 408void BN_CTX_end(BN_CTX *ctx);
409int BN_rand(BIGNUM *rnd, int bits, int top,int bottom); 409int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
410int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom); 410int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
411int BN_rand_range(BIGNUM *rnd, BIGNUM *range); 411int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
412int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range); 412int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
413int BN_num_bits(const BIGNUM *a); 413int BN_num_bits(const BIGNUM *a);
414int BN_num_bits_word(BN_ULONG); 414int BN_num_bits_word(BN_ULONG);
415BIGNUM *BN_new(void); 415BIGNUM *BN_new(void);
@@ -531,6 +531,17 @@ int BN_is_prime_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, BN_GENCB *cb);
531int BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, 531int BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx,
532 int do_trial_division, BN_GENCB *cb); 532 int do_trial_division, BN_GENCB *cb);
533 533
534int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
535
536int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
537 const BIGNUM *Xp, const BIGNUM *Xp1, const BIGNUM *Xp2,
538 const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb);
539int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
540 BIGNUM *Xp1, BIGNUM *Xp2,
541 const BIGNUM *Xp,
542 const BIGNUM *e, BN_CTX *ctx,
543 BN_GENCB *cb);
544
534BN_MONT_CTX *BN_MONT_CTX_new(void ); 545BN_MONT_CTX *BN_MONT_CTX_new(void );
535void BN_MONT_CTX_init(BN_MONT_CTX *ctx); 546void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
536int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b, 547int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,
diff --git a/src/lib/libssl/src/crypto/bn/bn_lib.c b/src/lib/libssl/src/crypto/bn/bn_lib.c
index 2649b8c538..32a8fbaf51 100644
--- a/src/lib/libssl/src/crypto/bn/bn_lib.c
+++ b/src/lib/libssl/src/crypto/bn/bn_lib.c
@@ -139,25 +139,6 @@ const BIGNUM *BN_value_one(void)
139 return(&const_one); 139 return(&const_one);
140 } 140 }
141 141
142char *BN_options(void)
143 {
144 static int init=0;
145 static char data[16];
146
147 if (!init)
148 {
149 init++;
150#ifdef BN_LLONG
151 BIO_snprintf(data,sizeof data,"bn(%d,%d)",
152 (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
153#else
154 BIO_snprintf(data,sizeof data,"bn(%d,%d)",
155 (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
156#endif
157 }
158 return(data);
159 }
160
161int BN_num_bits_word(BN_ULONG l) 142int BN_num_bits_word(BN_ULONG l)
162 { 143 {
163 static const char bits[256]={ 144 static const char bits[256]={
diff --git a/src/lib/libssl/src/crypto/bn/bn_nist.c b/src/lib/libssl/src/crypto/bn/bn_nist.c
index 1fc94f55c3..2ca5b01391 100644
--- a/src/lib/libssl/src/crypto/bn/bn_nist.c
+++ b/src/lib/libssl/src/crypto/bn/bn_nist.c
@@ -66,46 +66,157 @@
66#define BN_NIST_384_TOP (384+BN_BITS2-1)/BN_BITS2 66#define BN_NIST_384_TOP (384+BN_BITS2-1)/BN_BITS2
67#define BN_NIST_521_TOP (521+BN_BITS2-1)/BN_BITS2 67#define BN_NIST_521_TOP (521+BN_BITS2-1)/BN_BITS2
68 68
69/* pre-computed tables are "carry-less" values of modulus*(i+1) */
69#if BN_BITS2 == 64 70#if BN_BITS2 == 64
70static const BN_ULONG _nist_p_192[] = 71static const BN_ULONG _nist_p_192[][BN_NIST_192_TOP] = {
71 {0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFEULL, 72 {0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFEULL,0xFFFFFFFFFFFFFFFFULL},
72 0xFFFFFFFFFFFFFFFFULL}; 73 {0xFFFFFFFFFFFFFFFEULL,0xFFFFFFFFFFFFFFFDULL,0xFFFFFFFFFFFFFFFFULL},
73static const BN_ULONG _nist_p_224[] = 74 {0xFFFFFFFFFFFFFFFDULL,0xFFFFFFFFFFFFFFFCULL,0xFFFFFFFFFFFFFFFFULL}
75 };
76static const BN_ULONG _nist_p_192_sqr[] = {
77 0x0000000000000001ULL,0x0000000000000002ULL,0x0000000000000001ULL,
78 0xFFFFFFFFFFFFFFFEULL,0xFFFFFFFFFFFFFFFDULL,0xFFFFFFFFFFFFFFFFULL
79 };
80static const BN_ULONG _nist_p_224[][BN_NIST_224_TOP] = {
74 {0x0000000000000001ULL,0xFFFFFFFF00000000ULL, 81 {0x0000000000000001ULL,0xFFFFFFFF00000000ULL,
75 0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL}; 82 0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL},
76static const BN_ULONG _nist_p_256[] = 83 {0x0000000000000002ULL,0xFFFFFFFE00000000ULL,
84 0xFFFFFFFFFFFFFFFFULL,0x00000001FFFFFFFFULL} /* this one is "carry-full" */
85 };
86static const BN_ULONG _nist_p_224_sqr[] = {
87 0x0000000000000001ULL,0xFFFFFFFE00000000ULL,
88 0xFFFFFFFFFFFFFFFFULL,0x0000000200000000ULL,
89 0x0000000000000000ULL,0xFFFFFFFFFFFFFFFEULL,
90 0xFFFFFFFFFFFFFFFFULL
91 };
92static const BN_ULONG _nist_p_256[][BN_NIST_256_TOP] = {
77 {0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL, 93 {0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL,
78 0x0000000000000000ULL,0xFFFFFFFF00000001ULL}; 94 0x0000000000000000ULL,0xFFFFFFFF00000001ULL},
79static const BN_ULONG _nist_p_384[] = 95 {0xFFFFFFFFFFFFFFFEULL,0x00000001FFFFFFFFULL,
80 {0x00000000FFFFFFFFULL,0xFFFFFFFF00000000ULL, 96 0x0000000000000000ULL,0xFFFFFFFE00000002ULL},
81 0xFFFFFFFFFFFFFFFEULL,0xFFFFFFFFFFFFFFFFULL, 97 {0xFFFFFFFFFFFFFFFDULL,0x00000002FFFFFFFFULL,
82 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL}; 98 0x0000000000000000ULL,0xFFFFFFFD00000003ULL},
99 {0xFFFFFFFFFFFFFFFCULL,0x00000003FFFFFFFFULL,
100 0x0000000000000000ULL,0xFFFFFFFC00000004ULL},
101 {0xFFFFFFFFFFFFFFFBULL,0x00000004FFFFFFFFULL,
102 0x0000000000000000ULL,0xFFFFFFFB00000005ULL},
103 };
104static const BN_ULONG _nist_p_256_sqr[] = {
105 0x0000000000000001ULL,0xFFFFFFFE00000000ULL,
106 0xFFFFFFFFFFFFFFFFULL,0x00000001FFFFFFFEULL,
107 0x00000001FFFFFFFEULL,0x00000001FFFFFFFEULL,
108 0xFFFFFFFE00000001ULL,0xFFFFFFFE00000002ULL
109 };
110static const BN_ULONG _nist_p_384[][BN_NIST_384_TOP] = {
111 {0x00000000FFFFFFFFULL,0xFFFFFFFF00000000ULL,0xFFFFFFFFFFFFFFFEULL,
112 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
113 {0x00000001FFFFFFFEULL,0xFFFFFFFE00000000ULL,0xFFFFFFFFFFFFFFFDULL,
114 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
115 {0x00000002FFFFFFFDULL,0xFFFFFFFD00000000ULL,0xFFFFFFFFFFFFFFFCULL,
116 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
117 {0x00000003FFFFFFFCULL,0xFFFFFFFC00000000ULL,0xFFFFFFFFFFFFFFFBULL,
118 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
119 {0x00000004FFFFFFFBULL,0xFFFFFFFB00000000ULL,0xFFFFFFFFFFFFFFFAULL,
120 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL},
121 };
122static const BN_ULONG _nist_p_384_sqr[] = {
123 0xFFFFFFFE00000001ULL,0x0000000200000000ULL,0xFFFFFFFE00000000ULL,
124 0x0000000200000000ULL,0x0000000000000001ULL,0x0000000000000000ULL,
125 0x00000001FFFFFFFEULL,0xFFFFFFFE00000000ULL,0xFFFFFFFFFFFFFFFDULL,
126 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL
127 };
83static const BN_ULONG _nist_p_521[] = 128static const BN_ULONG _nist_p_521[] =
84 {0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL, 129 {0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
85 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL, 130 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
86 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL, 131 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
87 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL, 132 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
88 0x00000000000001FFULL}; 133 0x00000000000001FFULL};
134static const BN_ULONG _nist_p_521_sqr[] = {
135 0x0000000000000001ULL,0x0000000000000000ULL,0x0000000000000000ULL,
136 0x0000000000000000ULL,0x0000000000000000ULL,0x0000000000000000ULL,
137 0x0000000000000000ULL,0x0000000000000000ULL,0xFFFFFFFFFFFFFC00ULL,
138 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
139 0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
140 0xFFFFFFFFFFFFFFFFULL,0x000000000003FFFFULL
141 };
89#elif BN_BITS2 == 32 142#elif BN_BITS2 == 32
90static const BN_ULONG _nist_p_192[] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFE, 143static const BN_ULONG _nist_p_192[][BN_NIST_192_TOP] = {
91 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}; 144 {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
92static const BN_ULONG _nist_p_224[] = {0x00000001,0x00000000,0x00000000, 145 {0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFD,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
93 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}; 146 {0xFFFFFFFD,0xFFFFFFFF,0xFFFFFFFC,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}
94static const BN_ULONG _nist_p_256[] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 147 };
95 0x00000000,0x00000000,0x00000000,0x00000001,0xFFFFFFFF}; 148static const BN_ULONG _nist_p_192_sqr[] = {
96static const BN_ULONG _nist_p_384[] = {0xFFFFFFFF,0x00000000,0x00000000, 149 0x00000001,0x00000000,0x00000002,0x00000000,0x00000001,0x00000000,
97 0xFFFFFFFF,0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 150 0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFD,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
98 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}; 151 };
152static const BN_ULONG _nist_p_224[][BN_NIST_224_TOP] = {
153 {0x00000001,0x00000000,0x00000000,0xFFFFFFFF,
154 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
155 {0x00000002,0x00000000,0x00000000,0xFFFFFFFE,
156 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF}
157 };
158static const BN_ULONG _nist_p_224_sqr[] = {
159 0x00000001,0x00000000,0x00000000,0xFFFFFFFE,
160 0xFFFFFFFF,0xFFFFFFFF,0x00000000,0x00000002,
161 0x00000000,0x00000000,0xFFFFFFFE,0xFFFFFFFF,
162 0xFFFFFFFF,0xFFFFFFFF
163 };
164static const BN_ULONG _nist_p_256[][BN_NIST_256_TOP] = {
165 {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0x00000000,
166 0x00000000,0x00000000,0x00000001,0xFFFFFFFF},
167 {0xFFFFFFFE,0xFFFFFFFF,0xFFFFFFFF,0x00000001,
168 0x00000000,0x00000000,0x00000002,0xFFFFFFFE},
169 {0xFFFFFFFD,0xFFFFFFFF,0xFFFFFFFF,0x00000002,
170 0x00000000,0x00000000,0x00000003,0xFFFFFFFD},
171 {0xFFFFFFFC,0xFFFFFFFF,0xFFFFFFFF,0x00000003,
172 0x00000000,0x00000000,0x00000004,0xFFFFFFFC},
173 {0xFFFFFFFB,0xFFFFFFFF,0xFFFFFFFF,0x00000004,
174 0x00000000,0x00000000,0x00000005,0xFFFFFFFB},
175 };
176static const BN_ULONG _nist_p_256_sqr[] = {
177 0x00000001,0x00000000,0x00000000,0xFFFFFFFE,
178 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFE,0x00000001,
179 0xFFFFFFFE,0x00000001,0xFFFFFFFE,0x00000001,
180 0x00000001,0xFFFFFFFE,0x00000002,0xFFFFFFFE
181 };
182static const BN_ULONG _nist_p_384[][BN_NIST_384_TOP] = {
183 {0xFFFFFFFF,0x00000000,0x00000000,0xFFFFFFFF,0xFFFFFFFE,0xFFFFFFFF,
184 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
185 {0xFFFFFFFE,0x00000001,0x00000000,0xFFFFFFFE,0xFFFFFFFD,0xFFFFFFFF,
186 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
187 {0xFFFFFFFD,0x00000002,0x00000000,0xFFFFFFFD,0xFFFFFFFC,0xFFFFFFFF,
188 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
189 {0xFFFFFFFC,0x00000003,0x00000000,0xFFFFFFFC,0xFFFFFFFB,0xFFFFFFFF,
190 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
191 {0xFFFFFFFB,0x00000004,0x00000000,0xFFFFFFFB,0xFFFFFFFA,0xFFFFFFFF,
192 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF},
193 };
194static const BN_ULONG _nist_p_384_sqr[] = {
195 0x00000001,0xFFFFFFFE,0x00000000,0x00000002,0x00000000,0xFFFFFFFE,
196 0x00000000,0x00000002,0x00000001,0x00000000,0x00000000,0x00000000,
197 0xFFFFFFFE,0x00000001,0x00000000,0xFFFFFFFE,0xFFFFFFFD,0xFFFFFFFF,
198 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
199 };
99static const BN_ULONG _nist_p_521[] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 200static const BN_ULONG _nist_p_521[] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
100 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 201 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
101 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF, 202 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
102 0xFFFFFFFF,0x000001FF}; 203 0xFFFFFFFF,0x000001FF};
204static const BN_ULONG _nist_p_521_sqr[] = {
205 0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
206 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
207 0x00000000,0x00000000,0x00000000,0x00000000,0xFFFFFC00,0xFFFFFFFF,
208 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
209 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
210 0xFFFFFFFF,0xFFFFFFFF,0x0003FFFF
211 };
212#else
213#error "unsupported BN_BITS2"
103#endif 214#endif
104 215
105 216
106static const BIGNUM _bignum_nist_p_192 = 217static const BIGNUM _bignum_nist_p_192 =
107 { 218 {
108 (BN_ULONG *)_nist_p_192, 219 (BN_ULONG *)_nist_p_192[0],
109 BN_NIST_192_TOP, 220 BN_NIST_192_TOP,
110 BN_NIST_192_TOP, 221 BN_NIST_192_TOP,
111 0, 222 0,
@@ -114,7 +225,7 @@ static const BIGNUM _bignum_nist_p_192 =
114 225
115static const BIGNUM _bignum_nist_p_224 = 226static const BIGNUM _bignum_nist_p_224 =
116 { 227 {
117 (BN_ULONG *)_nist_p_224, 228 (BN_ULONG *)_nist_p_224[0],
118 BN_NIST_224_TOP, 229 BN_NIST_224_TOP,
119 BN_NIST_224_TOP, 230 BN_NIST_224_TOP,
120 0, 231 0,
@@ -123,7 +234,7 @@ static const BIGNUM _bignum_nist_p_224 =
123 234
124static const BIGNUM _bignum_nist_p_256 = 235static const BIGNUM _bignum_nist_p_256 =
125 { 236 {
126 (BN_ULONG *)_nist_p_256, 237 (BN_ULONG *)_nist_p_256[0],
127 BN_NIST_256_TOP, 238 BN_NIST_256_TOP,
128 BN_NIST_256_TOP, 239 BN_NIST_256_TOP,
129 0, 240 0,
@@ -132,7 +243,7 @@ static const BIGNUM _bignum_nist_p_256 =
132 243
133static const BIGNUM _bignum_nist_p_384 = 244static const BIGNUM _bignum_nist_p_384 =
134 { 245 {
135 (BN_ULONG *)_nist_p_384, 246 (BN_ULONG *)_nist_p_384[0],
136 BN_NIST_384_TOP, 247 BN_NIST_384_TOP,
137 BN_NIST_384_TOP, 248 BN_NIST_384_TOP,
138 0, 249 0,
@@ -180,7 +291,9 @@ static void nist_cp_bn_0(BN_ULONG *buf, BN_ULONG *a, int top, int max)
180 int i; 291 int i;
181 BN_ULONG *_tmp1 = (buf), *_tmp2 = (a); 292 BN_ULONG *_tmp1 = (buf), *_tmp2 = (a);
182 293
294#ifdef BN_DEBUG
183 OPENSSL_assert(top <= max); 295 OPENSSL_assert(top <= max);
296#endif
184 for (i = (top); i != 0; i--) 297 for (i = (top); i != 0; i--)
185 *_tmp1++ = *_tmp2++; 298 *_tmp1++ = *_tmp2++;
186 for (i = (max) - (top); i != 0; i--) 299 for (i = (max) - (top); i != 0; i--)
@@ -198,9 +311,14 @@ static void nist_cp_bn(BN_ULONG *buf, BN_ULONG *a, int top)
198#if BN_BITS2 == 64 311#if BN_BITS2 == 64
199#define bn_cp_64(to, n, from, m) (to)[n] = (m>=0)?((from)[m]):0; 312#define bn_cp_64(to, n, from, m) (to)[n] = (m>=0)?((from)[m]):0;
200#define bn_64_set_0(to, n) (to)[n] = (BN_ULONG)0; 313#define bn_64_set_0(to, n) (to)[n] = (BN_ULONG)0;
201/* TBD */ 314/*
202#define bn_cp_32(to, n, from, m) (to)[n] = (m>=0)?((from)[m]):0; 315 * two following macros are implemented under assumption that they
203#define bn_32_set_0(to, n) (to)[n] = (BN_ULONG)0; 316 * are called in a sequence with *ascending* n, i.e. as they are...
317 */
318#define bn_cp_32_naked(to, n, from, m) (((n)&1)?(to[(n)/2]|=((m)&1)?(from[(m)/2]&BN_MASK2h):(from[(m)/2]<<32))\
319 :(to[(n)/2] =((m)&1)?(from[(m)/2]>>32):(from[(m)/2]&BN_MASK2l)))
320#define bn_32_set_0(to, n) (((n)&1)?(to[(n)/2]&=BN_MASK2l):(to[(n)/2]=0));
321#define bn_cp_32(to,n,from,m) ((m)>=0)?bn_cp_32_naked(to,n,from,m):bn_32_set_0(to,n)
204#else 322#else
205#define bn_cp_64(to, n, from, m) \ 323#define bn_cp_64(to, n, from, m) \
206 { \ 324 { \
@@ -221,9 +339,9 @@ static void nist_cp_bn(BN_ULONG *buf, BN_ULONG *a, int top)
221 339
222#define nist_set_192(to, from, a1, a2, a3) \ 340#define nist_set_192(to, from, a1, a2, a3) \
223 { \ 341 { \
224 if (a3 != 0) bn_cp_64(to, 0, from, (a3) - 3) else bn_64_set_0(to, 0)\ 342 bn_cp_64(to, 0, from, (a3) - 3) \
225 bn_cp_64(to, 1, from, (a2) - 3) \ 343 bn_cp_64(to, 1, from, (a2) - 3) \
226 if (a1 != 0) bn_cp_64(to, 2, from, (a1) - 3) else bn_64_set_0(to, 2)\ 344 bn_cp_64(to, 2, from, (a1) - 3) \
227 } 345 }
228 346
229int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 347int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
@@ -237,11 +355,16 @@ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
237 c_d[BN_NIST_192_TOP], 355 c_d[BN_NIST_192_TOP],
238 *res; 356 *res;
239 size_t mask; 357 size_t mask;
358 static const BIGNUM _bignum_nist_p_192_sqr = {
359 (BN_ULONG *)_nist_p_192_sqr,
360 sizeof(_nist_p_192_sqr)/sizeof(_nist_p_192_sqr[0]),
361 sizeof(_nist_p_192_sqr)/sizeof(_nist_p_192_sqr[0]),
362 0,BN_FLG_STATIC_DATA };
240 363
241 field = &_bignum_nist_p_192; /* just to make sure */ 364 field = &_bignum_nist_p_192; /* just to make sure */
242 365
243 if (BN_is_negative(a) || a->top > 2*BN_NIST_192_TOP) 366 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_192_sqr)>=0)
244 return BN_nnmod(r, field, a, ctx); 367 return BN_nnmod(r, a, field, ctx);
245 368
246 i = BN_ucmp(field, a); 369 i = BN_ucmp(field, a);
247 if (i == 0) 370 if (i == 0)
@@ -265,50 +388,49 @@ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
265 nist_cp_bn_0(buf, a_d + BN_NIST_192_TOP, top - BN_NIST_192_TOP, BN_NIST_192_TOP); 388 nist_cp_bn_0(buf, a_d + BN_NIST_192_TOP, top - BN_NIST_192_TOP, BN_NIST_192_TOP);
266 389
267 nist_set_192(t_d, buf, 0, 3, 3); 390 nist_set_192(t_d, buf, 0, 3, 3);
268 carry = bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP); 391 carry = (int)bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP);
269 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_192,BN_NIST_192_TOP);
270 mask = ~mask | (0-(size_t)carry);
271 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
272
273 nist_set_192(t_d, buf, 4, 4, 0); 392 nist_set_192(t_d, buf, 4, 4, 0);
274 carry = bn_add_words(r_d, res, t_d, BN_NIST_192_TOP); 393 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP);
275 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_192,BN_NIST_192_TOP);
276 mask = ~mask | (0-(size_t)carry);
277 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
278
279 nist_set_192(t_d, buf, 5, 5, 5) 394 nist_set_192(t_d, buf, 5, 5, 5)
280 carry = bn_add_words(r_d, res, t_d, BN_NIST_192_TOP); 395 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP);
281 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_192,BN_NIST_192_TOP);
282 mask = ~mask | (0-(size_t)carry);
283 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
284 396
397 if (carry > 0)
398 carry = (int)bn_sub_words(r_d,r_d,_nist_p_192[carry-1],BN_NIST_192_TOP);
399 else
400 carry = 1;
401
402 /*
403 * we need 'if (carry==0 || result>=modulus) result-=modulus;'
404 * as comparison implies subtraction, we can write
405 * 'tmp=result-modulus; if (!carry || !borrow) result=tmp;'
406 * this is what happens below, but without explicit if:-) a.
407 */
408 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_192[0],BN_NIST_192_TOP);
409 mask &= 0-(size_t)carry;
410 res = (BN_ULONG *)(((size_t)c_d&~mask) | ((size_t)r_d&mask));
285 nist_cp_bn(r_d, res, BN_NIST_192_TOP); 411 nist_cp_bn(r_d, res, BN_NIST_192_TOP);
286 r->top = BN_NIST_192_TOP; 412 r->top = BN_NIST_192_TOP;
287 bn_correct_top(r); 413 bn_correct_top(r);
288 414
289 if (BN_ucmp(field, r) <= 0)
290 {
291 if (!BN_usub(r, r, field)) return 0;
292 }
293
294 return 1; 415 return 1;
295 } 416 }
296 417
418typedef BN_ULONG (*bn_addsub_f)(BN_ULONG *,const BN_ULONG *,const BN_ULONG *,int);
419
297#define nist_set_224(to, from, a1, a2, a3, a4, a5, a6, a7) \ 420#define nist_set_224(to, from, a1, a2, a3, a4, a5, a6, a7) \
298 { \ 421 { \
299 if (a7 != 0) bn_cp_32(to, 0, from, (a7) - 7) else bn_32_set_0(to, 0)\ 422 bn_cp_32(to, 0, from, (a7) - 7) \
300 if (a6 != 0) bn_cp_32(to, 1, from, (a6) - 7) else bn_32_set_0(to, 1)\ 423 bn_cp_32(to, 1, from, (a6) - 7) \
301 if (a5 != 0) bn_cp_32(to, 2, from, (a5) - 7) else bn_32_set_0(to, 2)\ 424 bn_cp_32(to, 2, from, (a5) - 7) \
302 if (a4 != 0) bn_cp_32(to, 3, from, (a4) - 7) else bn_32_set_0(to, 3)\ 425 bn_cp_32(to, 3, from, (a4) - 7) \
303 if (a3 != 0) bn_cp_32(to, 4, from, (a3) - 7) else bn_32_set_0(to, 4)\ 426 bn_cp_32(to, 4, from, (a3) - 7) \
304 if (a2 != 0) bn_cp_32(to, 5, from, (a2) - 7) else bn_32_set_0(to, 5)\ 427 bn_cp_32(to, 5, from, (a2) - 7) \
305 if (a1 != 0) bn_cp_32(to, 6, from, (a1) - 7) else bn_32_set_0(to, 6)\ 428 bn_cp_32(to, 6, from, (a1) - 7) \
306 } 429 }
307 430
308int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 431int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
309 BN_CTX *ctx) 432 BN_CTX *ctx)
310 { 433 {
311#if BN_BITS2 == 32
312 int top = a->top, i; 434 int top = a->top, i;
313 int carry; 435 int carry;
314 BN_ULONG *r_d, *a_d = a->d; 436 BN_ULONG *r_d, *a_d = a->d;
@@ -317,11 +439,18 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
317 c_d[BN_NIST_224_TOP], 439 c_d[BN_NIST_224_TOP],
318 *res; 440 *res;
319 size_t mask; 441 size_t mask;
442 union { bn_addsub_f f; size_t p; } u;
443 static const BIGNUM _bignum_nist_p_224_sqr = {
444 (BN_ULONG *)_nist_p_224_sqr,
445 sizeof(_nist_p_224_sqr)/sizeof(_nist_p_224_sqr[0]),
446 sizeof(_nist_p_224_sqr)/sizeof(_nist_p_224_sqr[0]),
447 0,BN_FLG_STATIC_DATA };
448
320 449
321 field = &_bignum_nist_p_224; /* just to make sure */ 450 field = &_bignum_nist_p_224; /* just to make sure */
322 451
323 if (BN_is_negative(a) || a->top > 2*BN_NIST_224_TOP) 452 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_224_sqr)>=0)
324 return BN_nnmod(r, field, a, ctx); 453 return BN_nnmod(r, a, field, ctx);
325 454
326 i = BN_ucmp(field, a); 455 i = BN_ucmp(field, a);
327 if (i == 0) 456 if (i == 0)
@@ -342,72 +471,77 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
342 else 471 else
343 r_d = a_d; 472 r_d = a_d;
344 473
474#if BN_BITS2==64
475 /* copy upper 256 bits of 448 bit number ... */
476 nist_cp_bn_0(t_d, a_d + (BN_NIST_224_TOP-1), top - (BN_NIST_224_TOP-1), BN_NIST_224_TOP);
477 /* ... and right shift by 32 to obtain upper 224 bits */
478 nist_set_224(buf, t_d, 14, 13, 12, 11, 10, 9, 8);
479 /* truncate lower part to 224 bits too */
480 r_d[BN_NIST_224_TOP-1] &= BN_MASK2l;
481#else
345 nist_cp_bn_0(buf, a_d + BN_NIST_224_TOP, top - BN_NIST_224_TOP, BN_NIST_224_TOP); 482 nist_cp_bn_0(buf, a_d + BN_NIST_224_TOP, top - BN_NIST_224_TOP, BN_NIST_224_TOP);
346 483#endif
347 nist_set_224(t_d, buf, 10, 9, 8, 7, 0, 0, 0); 484 nist_set_224(t_d, buf, 10, 9, 8, 7, 0, 0, 0);
348 carry = bn_add_words(r_d, r_d, t_d, BN_NIST_224_TOP); 485 carry = (int)bn_add_words(r_d, r_d, t_d, BN_NIST_224_TOP);
349 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_224,BN_NIST_224_TOP);
350 mask = ~mask | (0-(size_t)carry);
351 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
352
353 nist_set_224(t_d, buf, 0, 13, 12, 11, 0, 0, 0); 486 nist_set_224(t_d, buf, 0, 13, 12, 11, 0, 0, 0);
354 carry = bn_add_words(r_d, res, t_d, BN_NIST_224_TOP); 487 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_224_TOP);
355 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_224,BN_NIST_224_TOP);
356 mask = ~mask | (0-(size_t)carry);
357 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
358
359 nist_set_224(t_d, buf, 13, 12, 11, 10, 9, 8, 7); 488 nist_set_224(t_d, buf, 13, 12, 11, 10, 9, 8, 7);
360#if BRANCH_FREE 489 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_224_TOP);
361 carry = bn_sub_words(r_d, res, t_d, BN_NIST_224_TOP);
362 bn_add_words(c_d,r_d,_nist_p_224,BN_NIST_224_TOP);
363 mask = 0-(size_t)carry;
364 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
365#else
366 if (bn_sub_words(r_d, res, t_d, BN_NIST_224_TOP))
367 bn_add_words(r_d,r_d,_nist_p_224,BN_NIST_224_TOP);
368#endif
369 nist_set_224(t_d, buf, 0, 0, 0, 0, 13, 12, 11); 490 nist_set_224(t_d, buf, 0, 0, 0, 0, 13, 12, 11);
370#if BRANCH_FREE 491 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_224_TOP);
371 carry = bn_sub_words(r_d, res, t_d, BN_NIST_224_TOP);
372 bn_add_words(c_d,r_d,_nist_p_224,BN_NIST_224_TOP);
373 mask = 0-(size_t)carry;
374 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
375 492
376 nist_cp_bn(r_d, res, BN_NIST_224_TOP); 493#if BN_BITS2==64
377#else 494 carry = (int)(r_d[BN_NIST_224_TOP-1]>>32);
378 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_224_TOP))
379 bn_add_words(r_d,r_d,_nist_p_224,BN_NIST_224_TOP);
380#endif 495#endif
381 r->top = BN_NIST_224_TOP; 496 u.f = bn_sub_words;
382 bn_correct_top(r); 497 if (carry > 0)
383
384 if (BN_ucmp(field, r) <= 0)
385 { 498 {
386 if (!BN_usub(r, r, field)) return 0; 499 carry = (int)bn_sub_words(r_d,r_d,_nist_p_224[carry-1],BN_NIST_224_TOP);
500#if BN_BITS2==64
501 carry=(int)(~(r_d[BN_NIST_224_TOP-1]>>32))&1;
502#endif
387 } 503 }
504 else if (carry < 0)
505 {
506 /* it's a bit more comlicated logic in this case.
507 * if bn_add_words yields no carry, then result
508 * has to be adjusted by unconditionally *adding*
509 * the modulus. but if it does, then result has
510 * to be compared to the modulus and conditionally
511 * adjusted by *subtracting* the latter. */
512 carry = (int)bn_add_words(r_d,r_d,_nist_p_224[-carry-1],BN_NIST_224_TOP);
513 mask = 0-(size_t)carry;
514 u.p = ((size_t)bn_sub_words&mask) | ((size_t)bn_add_words&~mask);
515 }
516 else
517 carry = 1;
518
519 /* otherwise it's effectively same as in BN_nist_mod_192... */
520 mask = 0-(size_t)(*u.f)(c_d,r_d,_nist_p_224[0],BN_NIST_224_TOP);
521 mask &= 0-(size_t)carry;
522 res = (BN_ULONG *)(((size_t)c_d&~mask) | ((size_t)r_d&mask));
523 nist_cp_bn(r_d, res, BN_NIST_224_TOP);
524 r->top = BN_NIST_224_TOP;
525 bn_correct_top(r);
388 526
389 return 1; 527 return 1;
390#else /* BN_BITS!=32 */
391 return 0;
392#endif
393 } 528 }
394 529
395#define nist_set_256(to, from, a1, a2, a3, a4, a5, a6, a7, a8) \ 530#define nist_set_256(to, from, a1, a2, a3, a4, a5, a6, a7, a8) \
396 { \ 531 { \
397 if (a8 != 0) bn_cp_32(to, 0, from, (a8) - 8) else bn_32_set_0(to, 0)\ 532 bn_cp_32(to, 0, from, (a8) - 8) \
398 if (a7 != 0) bn_cp_32(to, 1, from, (a7) - 8) else bn_32_set_0(to, 1)\ 533 bn_cp_32(to, 1, from, (a7) - 8) \
399 if (a6 != 0) bn_cp_32(to, 2, from, (a6) - 8) else bn_32_set_0(to, 2)\ 534 bn_cp_32(to, 2, from, (a6) - 8) \
400 if (a5 != 0) bn_cp_32(to, 3, from, (a5) - 8) else bn_32_set_0(to, 3)\ 535 bn_cp_32(to, 3, from, (a5) - 8) \
401 if (a4 != 0) bn_cp_32(to, 4, from, (a4) - 8) else bn_32_set_0(to, 4)\ 536 bn_cp_32(to, 4, from, (a4) - 8) \
402 if (a3 != 0) bn_cp_32(to, 5, from, (a3) - 8) else bn_32_set_0(to, 5)\ 537 bn_cp_32(to, 5, from, (a3) - 8) \
403 if (a2 != 0) bn_cp_32(to, 6, from, (a2) - 8) else bn_32_set_0(to, 6)\ 538 bn_cp_32(to, 6, from, (a2) - 8) \
404 if (a1 != 0) bn_cp_32(to, 7, from, (a1) - 8) else bn_32_set_0(to, 7)\ 539 bn_cp_32(to, 7, from, (a1) - 8) \
405 } 540 }
406 541
407int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 542int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
408 BN_CTX *ctx) 543 BN_CTX *ctx)
409 { 544 {
410#if BN_BITS2 == 32
411 int i, top = a->top; 545 int i, top = a->top;
412 int carry = 0; 546 int carry = 0;
413 register BN_ULONG *a_d = a->d, *r_d; 547 register BN_ULONG *a_d = a->d, *r_d;
@@ -416,11 +550,17 @@ int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
416 c_d[BN_NIST_256_TOP], 550 c_d[BN_NIST_256_TOP],
417 *res; 551 *res;
418 size_t mask; 552 size_t mask;
553 union { bn_addsub_f f; size_t p; } u;
554 static const BIGNUM _bignum_nist_p_256_sqr = {
555 (BN_ULONG *)_nist_p_256_sqr,
556 sizeof(_nist_p_256_sqr)/sizeof(_nist_p_256_sqr[0]),
557 sizeof(_nist_p_256_sqr)/sizeof(_nist_p_256_sqr[0]),
558 0,BN_FLG_STATIC_DATA };
419 559
420 field = &_bignum_nist_p_256; /* just to make sure */ 560 field = &_bignum_nist_p_256; /* just to make sure */
421 561
422 if (BN_is_negative(a) || a->top > 2*BN_NIST_256_TOP) 562 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_256_sqr)>=0)
423 return BN_nnmod(r, field, a, ctx); 563 return BN_nnmod(r, a, field, ctx);
424 564
425 i = BN_ucmp(field, a); 565 i = BN_ucmp(field, a);
426 if (i == 0) 566 if (i == 0)
@@ -446,116 +586,84 @@ int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
446 /*S1*/ 586 /*S1*/
447 nist_set_256(t_d, buf, 15, 14, 13, 12, 11, 0, 0, 0); 587 nist_set_256(t_d, buf, 15, 14, 13, 12, 11, 0, 0, 0);
448 /*S2*/ 588 /*S2*/
449 nist_set_256(c_d,buf, 0, 15, 14, 13, 12, 0, 0, 0); 589 nist_set_256(c_d, buf, 0, 15, 14, 13, 12, 0, 0, 0);
450 carry = bn_add_words(t_d, t_d, c_d, BN_NIST_256_TOP); 590 carry = (int)bn_add_words(t_d, t_d, c_d, BN_NIST_256_TOP);
451 mask = 0-(size_t)bn_sub_words(c_d,t_d,_nist_p_256,BN_NIST_256_TOP); 591 /* left shift */
452 mask = ~mask | (0-(size_t)carry); 592 {
453 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)t_d&~mask)); 593 register BN_ULONG *ap,t,c;
454 594 ap = t_d;
455 carry = bn_add_words(t_d, res, res, BN_NIST_256_TOP); 595 c=0;
456 mask = 0-(size_t)bn_sub_words(c_d,t_d,_nist_p_256,BN_NIST_256_TOP); 596 for (i = BN_NIST_256_TOP; i != 0; --i)
457 mask = ~mask | (0-(size_t)carry); 597 {
458 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)t_d&~mask)); 598 t= *ap;
459 599 *(ap++)=((t<<1)|c)&BN_MASK2;
460 carry = bn_add_words(r_d, r_d, res, BN_NIST_256_TOP); 600 c=(t & BN_TBIT)?1:0;
461 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP); 601 }
462 mask = ~mask | (0-(size_t)carry); 602 carry <<= 1;
463 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask)); 603 carry |= c;
464 604 }
605 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_256_TOP);
465 /*S3*/ 606 /*S3*/
466 nist_set_256(t_d, buf, 15, 14, 0, 0, 0, 10, 9, 8); 607 nist_set_256(t_d, buf, 15, 14, 0, 0, 0, 10, 9, 8);
467 carry = bn_add_words(r_d, res, t_d, BN_NIST_256_TOP); 608 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_256_TOP);
468 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
469 mask = ~mask | (0-(size_t)carry);
470 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
471
472 /*S4*/ 609 /*S4*/
473 nist_set_256(t_d, buf, 8, 13, 15, 14, 13, 11, 10, 9); 610 nist_set_256(t_d, buf, 8, 13, 15, 14, 13, 11, 10, 9);
474 carry = bn_add_words(r_d, res, t_d, BN_NIST_256_TOP); 611 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_256_TOP);
475 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
476 mask = ~mask | (0-(size_t)carry);
477 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
478
479 /*D1*/ 612 /*D1*/
480 nist_set_256(t_d, buf, 10, 8, 0, 0, 0, 13, 12, 11); 613 nist_set_256(t_d, buf, 10, 8, 0, 0, 0, 13, 12, 11);
481#if BRANCH_FREE 614 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP);
482 carry = bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP);
483 bn_add_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
484 mask = 0-(size_t)carry;
485 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
486#else
487 if (bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP))
488 bn_add_words(r_d,r_d,_nist_p_256,BN_NIST_256_TOP);
489#endif
490 /*D2*/ 615 /*D2*/
491 nist_set_256(t_d, buf, 11, 9, 0, 0, 15, 14, 13, 12); 616 nist_set_256(t_d, buf, 11, 9, 0, 0, 15, 14, 13, 12);
492#if BRANCH_FREE 617 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP);
493 carry = bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP);
494 bn_add_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
495 mask = 0-(size_t)carry;
496 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
497#else
498 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))
499 bn_add_words(r_d,r_d,_nist_p_256,BN_NIST_256_TOP);
500#endif
501 /*D3*/ 618 /*D3*/
502 nist_set_256(t_d, buf, 12, 0, 10, 9, 8, 15, 14, 13); 619 nist_set_256(t_d, buf, 12, 0, 10, 9, 8, 15, 14, 13);
503#if BRANCH_FREE 620 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP);
504 carry = bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP);
505 bn_add_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
506 mask = 0-(size_t)carry;
507 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
508#else
509 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))
510 bn_add_words(r_d,r_d,_nist_p_256,BN_NIST_256_TOP);
511#endif
512 /*D4*/ 621 /*D4*/
513 nist_set_256(t_d, buf, 13, 0, 11, 10, 9, 0, 15, 14); 622 nist_set_256(t_d, buf, 13, 0, 11, 10, 9, 0, 15, 14);
514#if BRANCH_FREE 623 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP);
515 carry = bn_sub_words(r_d, res, t_d, BN_NIST_256_TOP);
516 bn_add_words(c_d,r_d,_nist_p_256,BN_NIST_256_TOP);
517 mask = 0-(size_t)carry;
518 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
519
520 nist_cp_bn(r_d, res, BN_NIST_384_TOP);
521#else
522 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))
523 bn_add_words(r_d,r_d,_nist_p_256,BN_NIST_256_TOP);
524#endif
525 r->top = BN_NIST_256_TOP;
526 bn_correct_top(r);
527 624
528 if (BN_ucmp(field, r) <= 0) 625 /* see BN_nist_mod_224 for explanation */
626 u.f = bn_sub_words;
627 if (carry > 0)
628 carry = (int)bn_sub_words(r_d,r_d,_nist_p_256[carry-1],BN_NIST_256_TOP);
629 else if (carry < 0)
529 { 630 {
530 if (!BN_usub(r, r, field)) return 0; 631 carry = (int)bn_add_words(r_d,r_d,_nist_p_256[-carry-1],BN_NIST_256_TOP);
632 mask = 0-(size_t)carry;
633 u.p = ((size_t)bn_sub_words&mask) | ((size_t)bn_add_words&~mask);
531 } 634 }
635 else
636 carry = 1;
637
638 mask = 0-(size_t)(*u.f)(c_d,r_d,_nist_p_256[0],BN_NIST_256_TOP);
639 mask &= 0-(size_t)carry;
640 res = (BN_ULONG *)(((size_t)c_d&~mask) | ((size_t)r_d&mask));
641 nist_cp_bn(r_d, res, BN_NIST_256_TOP);
642 r->top = BN_NIST_256_TOP;
643 bn_correct_top(r);
532 644
533 return 1; 645 return 1;
534#else /* BN_BITS!=32 */
535 return 0;
536#endif
537 } 646 }
538 647
539#define nist_set_384(to,from,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \ 648#define nist_set_384(to,from,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) \
540 { \ 649 { \
541 if (a12 != 0) bn_cp_32(to, 0, from, (a12) - 12) else bn_32_set_0(to, 0)\ 650 bn_cp_32(to, 0, from, (a12) - 12) \
542 if (a11 != 0) bn_cp_32(to, 1, from, (a11) - 12) else bn_32_set_0(to, 1)\ 651 bn_cp_32(to, 1, from, (a11) - 12) \
543 if (a10 != 0) bn_cp_32(to, 2, from, (a10) - 12) else bn_32_set_0(to, 2)\ 652 bn_cp_32(to, 2, from, (a10) - 12) \
544 if (a9 != 0) bn_cp_32(to, 3, from, (a9) - 12) else bn_32_set_0(to, 3)\ 653 bn_cp_32(to, 3, from, (a9) - 12) \
545 if (a8 != 0) bn_cp_32(to, 4, from, (a8) - 12) else bn_32_set_0(to, 4)\ 654 bn_cp_32(to, 4, from, (a8) - 12) \
546 if (a7 != 0) bn_cp_32(to, 5, from, (a7) - 12) else bn_32_set_0(to, 5)\ 655 bn_cp_32(to, 5, from, (a7) - 12) \
547 if (a6 != 0) bn_cp_32(to, 6, from, (a6) - 12) else bn_32_set_0(to, 6)\ 656 bn_cp_32(to, 6, from, (a6) - 12) \
548 if (a5 != 0) bn_cp_32(to, 7, from, (a5) - 12) else bn_32_set_0(to, 7)\ 657 bn_cp_32(to, 7, from, (a5) - 12) \
549 if (a4 != 0) bn_cp_32(to, 8, from, (a4) - 12) else bn_32_set_0(to, 8)\ 658 bn_cp_32(to, 8, from, (a4) - 12) \
550 if (a3 != 0) bn_cp_32(to, 9, from, (a3) - 12) else bn_32_set_0(to, 9)\ 659 bn_cp_32(to, 9, from, (a3) - 12) \
551 if (a2 != 0) bn_cp_32(to, 10, from, (a2) - 12) else bn_32_set_0(to, 10)\ 660 bn_cp_32(to, 10, from, (a2) - 12) \
552 if (a1 != 0) bn_cp_32(to, 11, from, (a1) - 12) else bn_32_set_0(to, 11)\ 661 bn_cp_32(to, 11, from, (a1) - 12) \
553 } 662 }
554 663
555int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 664int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
556 BN_CTX *ctx) 665 BN_CTX *ctx)
557 { 666 {
558#if BN_BITS2 == 32
559 int i, top = a->top; 667 int i, top = a->top;
560 int carry = 0; 668 int carry = 0;
561 register BN_ULONG *r_d, *a_d = a->d; 669 register BN_ULONG *r_d, *a_d = a->d;
@@ -564,11 +672,18 @@ int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
564 c_d[BN_NIST_384_TOP], 672 c_d[BN_NIST_384_TOP],
565 *res; 673 *res;
566 size_t mask; 674 size_t mask;
675 union { bn_addsub_f f; size_t p; } u;
676 static const BIGNUM _bignum_nist_p_384_sqr = {
677 (BN_ULONG *)_nist_p_384_sqr,
678 sizeof(_nist_p_384_sqr)/sizeof(_nist_p_384_sqr[0]),
679 sizeof(_nist_p_384_sqr)/sizeof(_nist_p_384_sqr[0]),
680 0,BN_FLG_STATIC_DATA };
681
567 682
568 field = &_bignum_nist_p_384; /* just to make sure */ 683 field = &_bignum_nist_p_384; /* just to make sure */
569 684
570 if (BN_is_negative(a) || a->top > 2*BN_NIST_384_TOP) 685 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_384_sqr)>=0)
571 return BN_nnmod(r, field, a, ctx); 686 return BN_nnmod(r, a, field, ctx);
572 687
573 i = BN_ucmp(field, a); 688 i = BN_ucmp(field, a);
574 if (i == 0) 689 if (i == 0)
@@ -606,171 +721,116 @@ int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
606 } 721 }
607 *ap=c; 722 *ap=c;
608 } 723 }
609 carry = bn_add_words(r_d+(128/BN_BITS2), r_d+(128/BN_BITS2), 724 carry = (int)bn_add_words(r_d+(128/BN_BITS2), r_d+(128/BN_BITS2),
610 t_d, BN_NIST_256_TOP); 725 t_d, BN_NIST_256_TOP);
611 /*
612 * we need if (result>=modulus) subtract(result,modulus);
613 * in n-bit space this can be expressed as
614 * if (carry || result>=modulus) subtract(result,modulus);
615 * the catch is that comparison implies subtraction and
616 * therefore one can write tmp=subtract(result,modulus);
617 * and then if(carry || !borrow) result=tmp; this's what
618 * happens below, but without explicit if:-) a.
619 */
620 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
621 mask = ~mask | (0-(size_t)carry);
622 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
623
624 /*S2 */ 726 /*S2 */
625 carry = bn_add_words(r_d, res, buf, BN_NIST_384_TOP); 727 carry += (int)bn_add_words(r_d, r_d, buf, BN_NIST_384_TOP);
626 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
627 mask = ~mask | (0-(size_t)carry);
628 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
629
630 /*S3*/ 728 /*S3*/
631 nist_set_384(t_d,buf,20,19,18,17,16,15,14,13,12,23,22,21); 729 nist_set_384(t_d,buf,20,19,18,17,16,15,14,13,12,23,22,21);
632 carry = bn_add_words(r_d, res, t_d, BN_NIST_384_TOP); 730 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
633 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
634 mask = ~mask | (0-(size_t)carry);
635 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
636
637 /*S4*/ 731 /*S4*/
638 nist_set_384(t_d,buf,19,18,17,16,15,14,13,12,20,0,23,0); 732 nist_set_384(t_d,buf,19,18,17,16,15,14,13,12,20,0,23,0);
639 carry = bn_add_words(r_d, res, t_d, BN_NIST_384_TOP); 733 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
640 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
641 mask = ~mask | (0-(size_t)carry);
642 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
643
644 /*S5*/ 734 /*S5*/
645 nist_set_384(t_d, buf,0,0,0,0,23,22,21,20,0,0,0,0); 735 nist_set_384(t_d, buf,0,0,0,0,23,22,21,20,0,0,0,0);
646 carry = bn_add_words(r_d, res, t_d, BN_NIST_384_TOP); 736 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
647 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
648 mask = ~mask | (0-(size_t)carry);
649 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
650
651 /*S6*/ 737 /*S6*/
652 nist_set_384(t_d,buf,0,0,0,0,0,0,23,22,21,0,0,20); 738 nist_set_384(t_d,buf,0,0,0,0,0,0,23,22,21,0,0,20);
653 carry = bn_add_words(r_d, res, t_d, BN_NIST_384_TOP); 739 carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
654 mask = 0-(size_t)bn_sub_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
655 mask = ~mask | (0-(size_t)carry);
656 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
657
658 /*D1*/ 740 /*D1*/
659 nist_set_384(t_d,buf,22,21,20,19,18,17,16,15,14,13,12,23); 741 nist_set_384(t_d,buf,22,21,20,19,18,17,16,15,14,13,12,23);
660#if BRANCH_FREE 742 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
661 carry = bn_sub_words(r_d, res, t_d, BN_NIST_384_TOP);
662 bn_add_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
663 mask = 0-(size_t)carry;
664 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
665#else
666 if (bn_sub_words(r_d, res, t_d, BN_NIST_384_TOP))
667 bn_add_words(r_d,r_d,_nist_p_384,BN_NIST_384_TOP);
668#endif
669 /*D2*/ 743 /*D2*/
670 nist_set_384(t_d,buf,0,0,0,0,0,0,0,23,22,21,20,0); 744 nist_set_384(t_d,buf,0,0,0,0,0,0,0,23,22,21,20,0);
671#if BRANCH_FREE 745 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
672 carry = bn_sub_words(r_d, res, t_d, BN_NIST_384_TOP);
673 bn_add_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
674 mask = 0-(size_t)carry;
675 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
676#else
677 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP))
678 bn_add_words(r_d,r_d,_nist_p_384,BN_NIST_384_TOP);
679#endif
680 /*D3*/ 746 /*D3*/
681 nist_set_384(t_d,buf,0,0,0,0,0,0,0,23,23,0,0,0); 747 nist_set_384(t_d,buf,0,0,0,0,0,0,0,23,23,0,0,0);
682#if BRANCH_FREE 748 carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
683 carry = bn_sub_words(r_d, res, t_d, BN_NIST_384_TOP);
684 bn_add_words(c_d,r_d,_nist_p_384,BN_NIST_384_TOP);
685 mask = 0-(size_t)carry;
686 res = (BN_ULONG *)(((size_t)c_d&mask) | ((size_t)r_d&~mask));
687 749
750 /* see BN_nist_mod_224 for explanation */
751 u.f = bn_sub_words;
752 if (carry > 0)
753 carry = (int)bn_sub_words(r_d,r_d,_nist_p_384[carry-1],BN_NIST_384_TOP);
754 else if (carry < 0)
755 {
756 carry = (int)bn_add_words(r_d,r_d,_nist_p_384[-carry-1],BN_NIST_384_TOP);
757 mask = 0-(size_t)carry;
758 u.p = ((size_t)bn_sub_words&mask) | ((size_t)bn_add_words&~mask);
759 }
760 else
761 carry = 1;
762
763 mask = 0-(size_t)(*u.f)(c_d,r_d,_nist_p_384[0],BN_NIST_384_TOP);
764 mask &= 0-(size_t)carry;
765 res = (BN_ULONG *)(((size_t)c_d&~mask) | ((size_t)r_d&mask));
688 nist_cp_bn(r_d, res, BN_NIST_384_TOP); 766 nist_cp_bn(r_d, res, BN_NIST_384_TOP);
689#else
690 if (bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP))
691 bn_add_words(r_d,r_d,_nist_p_384,BN_NIST_384_TOP);
692#endif
693 r->top = BN_NIST_384_TOP; 767 r->top = BN_NIST_384_TOP;
694 bn_correct_top(r); 768 bn_correct_top(r);
695 769
696 if (BN_ucmp(field, r) <= 0)
697 {
698 if (!BN_usub(r, r, field)) return 0;
699 }
700
701 return 1; 770 return 1;
702#else /* BN_BITS!=32 */
703 return 0;
704#endif
705 } 771 }
706 772
773#define BN_NIST_521_RSHIFT (521%BN_BITS2)
774#define BN_NIST_521_LSHIFT (BN_BITS2-BN_NIST_521_RSHIFT)
775#define BN_NIST_521_TOP_MASK ((BN_ULONG)BN_MASK2>>BN_NIST_521_LSHIFT)
776
707int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, 777int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
708 BN_CTX *ctx) 778 BN_CTX *ctx)
709 { 779 {
710#if BN_BITS2 == 64 780 int top = a->top, i;
711#define BN_NIST_521_TOP_MASK (BN_ULONG)0x1FF 781 BN_ULONG *r_d, *a_d = a->d,
712#elif BN_BITS2 == 32 782 t_d[BN_NIST_521_TOP],
713#define BN_NIST_521_TOP_MASK (BN_ULONG)0x1FF 783 val,tmp,*res;
714#endif 784 size_t mask;
715 int top, ret = 0; 785 static const BIGNUM _bignum_nist_p_521_sqr = {
716 BIGNUM *tmp; 786 (BN_ULONG *)_nist_p_521_sqr,
787 sizeof(_nist_p_521_sqr)/sizeof(_nist_p_521_sqr[0]),
788 sizeof(_nist_p_521_sqr)/sizeof(_nist_p_521_sqr[0]),
789 0,BN_FLG_STATIC_DATA };
717 790
718 field = &_bignum_nist_p_521; /* just to make sure */ 791 field = &_bignum_nist_p_521; /* just to make sure */
719 792
720 if (BN_is_negative(a)) 793 if (BN_is_negative(a) || BN_ucmp(a,&_bignum_nist_p_521_sqr)>=0)
721 return BN_nnmod(r, field, a, ctx); 794 return BN_nnmod(r, a, field, ctx);
722 795
723 /* check whether a reduction is necessary */ 796 i = BN_ucmp(field, a);
724 top = a->top; 797 if (i == 0)
725 if (top < BN_NIST_521_TOP || ( top == BN_NIST_521_TOP &&
726 (!(a->d[BN_NIST_521_TOP-1] & ~(BN_NIST_521_TOP_MASK)))))
727 { 798 {
728 int i = BN_ucmp(field, a); 799 BN_zero(r);
729 if (i == 0) 800 return 1;
730 {
731 BN_zero(r);
732 return 1;
733 }
734 else
735 {
736#ifdef BN_DEBUG
737 OPENSSL_assert(i > 0); /* because 'field' is 1111...1111 */
738#endif
739 return (r == a)? 1 : (BN_copy(r ,a) != NULL);
740 }
741 } 801 }
802 else if (i > 0)
803 return (r == a)? 1 : (BN_copy(r ,a) != NULL);
742 804
743 if (BN_num_bits(a) > 2*521) 805 if (r != a)
744 return BN_nnmod(r, field, a, ctx);
745
746 BN_CTX_start(ctx);
747 tmp = BN_CTX_get(ctx);
748 if (!tmp)
749 goto err;
750
751 if (!bn_wexpand(tmp, BN_NIST_521_TOP))
752 goto err;
753 nist_cp_bn(tmp->d, a->d, BN_NIST_521_TOP);
754
755 tmp->top = BN_NIST_521_TOP;
756 tmp->d[BN_NIST_521_TOP-1] &= BN_NIST_521_TOP_MASK;
757 bn_correct_top(tmp);
758
759 if (!BN_rshift(r, a, 521))
760 goto err;
761
762 if (!BN_uadd(r, tmp, r))
763 goto err;
764
765 if (BN_ucmp(field, r) <= 0)
766 { 806 {
767 if (!BN_usub(r, r, field)) goto err; 807 if (!bn_wexpand(r,BN_NIST_521_TOP))
808 return 0;
809 r_d = r->d;
810 nist_cp_bn(r_d,a_d, BN_NIST_521_TOP);
768 } 811 }
812 else
813 r_d = a_d;
769 814
770 ret = 1; 815 /* upper 521 bits, copy ... */
771err: 816 nist_cp_bn_0(t_d,a_d + (BN_NIST_521_TOP-1), top - (BN_NIST_521_TOP-1),BN_NIST_521_TOP);
772 BN_CTX_end(ctx); 817 /* ... and right shift */
818 for (val=t_d[0],i=0; i<BN_NIST_521_TOP-1; i++)
819 {
820 tmp = val>>BN_NIST_521_RSHIFT;
821 val = t_d[i+1];
822 t_d[i] = (tmp | val<<BN_NIST_521_LSHIFT) & BN_MASK2;
823 }
824 t_d[i] = val>>BN_NIST_521_RSHIFT;
825 /* lower 521 bits */
826 r_d[i] &= BN_NIST_521_TOP_MASK;
827
828 bn_add_words(r_d,r_d,t_d,BN_NIST_521_TOP);
829 mask = 0-(size_t)bn_sub_words(t_d,r_d,_nist_p_521,BN_NIST_521_TOP);
830 res = (BN_ULONG *)(((size_t)t_d&~mask) | ((size_t)r_d&mask));
831 nist_cp_bn(r_d,res,BN_NIST_521_TOP);
832 r->top = BN_NIST_521_TOP;
833 bn_correct_top(r);
773 834
774 bn_check_top(r); 835 return 1;
775 return ret;
776 } 836 }
diff --git a/src/lib/libssl/src/crypto/bn/bn_rand.c b/src/lib/libssl/src/crypto/bn/bn_rand.c
index f51830b12b..b376c28ff3 100644
--- a/src/lib/libssl/src/crypto/bn/bn_rand.c
+++ b/src/lib/libssl/src/crypto/bn/bn_rand.c
@@ -227,7 +227,7 @@ int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
227 227
228 228
229/* random number r: 0 <= r < range */ 229/* random number r: 0 <= r < range */
230static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) 230static int bn_rand_range(int pseudo, BIGNUM *r, const BIGNUM *range)
231 { 231 {
232 int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand; 232 int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand;
233 int n; 233 int n;
@@ -294,12 +294,12 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range)
294 } 294 }
295 295
296 296
297int BN_rand_range(BIGNUM *r, BIGNUM *range) 297int BN_rand_range(BIGNUM *r, const BIGNUM *range)
298 { 298 {
299 return bn_rand_range(0, r, range); 299 return bn_rand_range(0, r, range);
300 } 300 }
301 301
302int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range) 302int BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range)
303 { 303 {
304 return bn_rand_range(1, r, range); 304 return bn_rand_range(1, r, range);
305 } 305 }
diff --git a/src/lib/libssl/src/crypto/bn/bn_shift.c b/src/lib/libssl/src/crypto/bn/bn_shift.c
index de9312dce2..c4d301afc4 100644
--- a/src/lib/libssl/src/crypto/bn/bn_shift.c
+++ b/src/lib/libssl/src/crypto/bn/bn_shift.c
@@ -177,7 +177,7 @@ int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
177 nw=n/BN_BITS2; 177 nw=n/BN_BITS2;
178 rb=n%BN_BITS2; 178 rb=n%BN_BITS2;
179 lb=BN_BITS2-rb; 179 lb=BN_BITS2-rb;
180 if (nw > a->top || a->top == 0) 180 if (nw >= a->top || a->top == 0)
181 { 181 {
182 BN_zero(r); 182 BN_zero(r);
183 return(1); 183 return(1);
diff --git a/src/lib/libssl/src/crypto/buffer/buffer.c b/src/lib/libssl/src/crypto/buffer/buffer.c
index 3bf03c7eff..b3e947771d 100644
--- a/src/lib/libssl/src/crypto/buffer/buffer.c
+++ b/src/lib/libssl/src/crypto/buffer/buffer.c
@@ -161,61 +161,3 @@ int BUF_MEM_grow_clean(BUF_MEM *str, int len)
161 } 161 }
162 return(len); 162 return(len);
163 } 163 }
164
165char *BUF_strdup(const char *str)
166 {
167 if (str == NULL) return(NULL);
168 return BUF_strndup(str, strlen(str));
169 }
170
171char *BUF_strndup(const char *str, size_t siz)
172 {
173 char *ret;
174
175 if (str == NULL) return(NULL);
176
177 ret=OPENSSL_malloc(siz+1);
178 if (ret == NULL)
179 {
180 BUFerr(BUF_F_BUF_STRNDUP,ERR_R_MALLOC_FAILURE);
181 return(NULL);
182 }
183 BUF_strlcpy(ret,str,siz+1);
184 return(ret);
185 }
186
187void *BUF_memdup(const void *data, size_t siz)
188 {
189 void *ret;
190
191 if (data == NULL) return(NULL);
192
193 ret=OPENSSL_malloc(siz);
194 if (ret == NULL)
195 {
196 BUFerr(BUF_F_BUF_MEMDUP,ERR_R_MALLOC_FAILURE);
197 return(NULL);
198 }
199 return memcpy(ret, data, siz);
200 }
201
202size_t BUF_strlcpy(char *dst, const char *src, size_t size)
203 {
204 size_t l = 0;
205 for(; size > 1 && *src; size--)
206 {
207 *dst++ = *src++;
208 l++;
209 }
210 if (size)
211 *dst = '\0';
212 return l + strlen(src);
213 }
214
215size_t BUF_strlcat(char *dst, const char *src, size_t size)
216 {
217 size_t l = 0;
218 for(; size > 0 && *dst; size--, dst++)
219 l++;
220 return l + BUF_strlcpy(dst, src, size);
221 }
diff --git a/src/lib/libssl/src/crypto/cast/c_skey.c b/src/lib/libssl/src/crypto/cast/c_skey.c
index 76e40005c9..68e690a60c 100644
--- a/src/lib/libssl/src/crypto/cast/c_skey.c
+++ b/src/lib/libssl/src/crypto/cast/c_skey.c
@@ -57,6 +57,11 @@
57 */ 57 */
58 58
59#include <openssl/cast.h> 59#include <openssl/cast.h>
60#include <openssl/crypto.h>
61#ifdef OPENSSL_FIPS
62#include <openssl/fips.h>
63#endif
64
60#include "cast_lcl.h" 65#include "cast_lcl.h"
61#include "cast_s.h" 66#include "cast_s.h"
62 67
@@ -72,7 +77,7 @@
72#define S6 CAST_S_table6 77#define S6 CAST_S_table6
73#define S7 CAST_S_table7 78#define S7 CAST_S_table7
74 79
75void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data) 80FIPS_NON_FIPS_VCIPHER_Init(CAST)
76 { 81 {
77 CAST_LONG x[16]; 82 CAST_LONG x[16];
78 CAST_LONG z[16]; 83 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 90b45b950a..1faf5806aa 100644
--- a/src/lib/libssl/src/crypto/cast/cast.h
+++ b/src/lib/libssl/src/crypto/cast/cast.h
@@ -83,7 +83,9 @@ typedef struct cast_key_st
83 int short_key; /* Use reduced rounds for short key */ 83 int short_key; /* Use reduced rounds for short key */
84 } CAST_KEY; 84 } CAST_KEY;
85 85
86 86#ifdef OPENSSL_FIPS
87void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
88#endif
87void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 89void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
88void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key, 90void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key,
89 int enc); 91 int enc);
diff --git a/src/lib/libssl/src/crypto/cms/cms_smime.c b/src/lib/libssl/src/crypto/cms/cms_smime.c
index b35d28d411..b9463f9abb 100644
--- a/src/lib/libssl/src/crypto/cms/cms_smime.c
+++ b/src/lib/libssl/src/crypto/cms/cms_smime.c
@@ -68,7 +68,10 @@ static int cms_copy_content(BIO *out, BIO *in, unsigned int flags)
68 if (out == NULL) 68 if (out == NULL)
69 tmpout = BIO_new(BIO_s_null()); 69 tmpout = BIO_new(BIO_s_null());
70 else if (flags & CMS_TEXT) 70 else if (flags & CMS_TEXT)
71 {
71 tmpout = BIO_new(BIO_s_mem()); 72 tmpout = BIO_new(BIO_s_mem());
73 BIO_set_mem_eof_return(tmpout, 0);
74 }
72 else 75 else
73 tmpout = out; 76 tmpout = out;
74 77
diff --git a/src/lib/libssl/src/crypto/comp/c_zlib.c b/src/lib/libssl/src/crypto/comp/c_zlib.c
index 0f34597e70..eccfd09137 100644
--- a/src/lib/libssl/src/crypto/comp/c_zlib.c
+++ b/src/lib/libssl/src/crypto/comp/c_zlib.c
@@ -727,6 +727,7 @@ static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr)
727 case BIO_CTRL_RESET: 727 case BIO_CTRL_RESET:
728 ctx->ocount = 0; 728 ctx->ocount = 0;
729 ctx->odone = 0; 729 ctx->odone = 0;
730 ret = 1;
730 break; 731 break;
731 732
732 case BIO_CTRL_FLUSH: 733 case BIO_CTRL_FLUSH:
@@ -771,7 +772,7 @@ static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr)
771 } 772 }
772 ctx->obufsize = obs; 773 ctx->obufsize = obs;
773 } 774 }
774 775 ret = 1;
775 break; 776 break;
776 777
777 case BIO_C_DO_STATE_MACHINE: 778 case BIO_C_DO_STATE_MACHINE:
@@ -783,7 +784,6 @@ static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr)
783 default: 784 default:
784 ret = BIO_ctrl(b->next_bio, cmd, num, ptr); 785 ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
785 break; 786 break;
786
787 } 787 }
788 788
789 return ret; 789 return ret;
diff --git a/src/lib/libssl/src/crypto/conf/conf_mall.c b/src/lib/libssl/src/crypto/conf/conf_mall.c
index 4ba40cf44c..1cc1fd5534 100644
--- a/src/lib/libssl/src/crypto/conf/conf_mall.c
+++ b/src/lib/libssl/src/crypto/conf/conf_mall.c
@@ -1,5 +1,5 @@
1/* conf_mall.c */ 1/* conf_mall.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -63,6 +63,7 @@
63#include <openssl/dso.h> 63#include <openssl/dso.h>
64#include <openssl/x509.h> 64#include <openssl/x509.h>
65#include <openssl/asn1.h> 65#include <openssl/asn1.h>
66#include <openssl/evp.h>
66#ifndef OPENSSL_NO_ENGINE 67#ifndef OPENSSL_NO_ENGINE
67#include <openssl/engine.h> 68#include <openssl/engine.h>
68#endif 69#endif
@@ -76,5 +77,6 @@ void OPENSSL_load_builtin_modules(void)
76#ifndef OPENSSL_NO_ENGINE 77#ifndef OPENSSL_NO_ENGINE
77 ENGINE_add_conf_module(); 78 ENGINE_add_conf_module();
78#endif 79#endif
80 EVP_add_alg_module();
79 } 81 }
80 82
diff --git a/src/lib/libssl/src/crypto/conf/conf_mod.c b/src/lib/libssl/src/crypto/conf/conf_mod.c
index 58b23ba992..e286378cb1 100644
--- a/src/lib/libssl/src/crypto/conf/conf_mod.c
+++ b/src/lib/libssl/src/crypto/conf/conf_mod.c
@@ -1,5 +1,5 @@
1/* conf_mod.c */ 1/* conf_mod.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/conf/conf_sap.c b/src/lib/libssl/src/crypto/conf/conf_sap.c
index 9c53bac1a8..760dc2632d 100644
--- a/src/lib/libssl/src/crypto/conf/conf_sap.c
+++ b/src/lib/libssl/src/crypto/conf/conf_sap.c
@@ -1,5 +1,5 @@
1/* conf_sap.c */ 1/* conf_sap.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/cryptlib.c b/src/lib/libssl/src/crypto/cryptlib.c
index 8c68623828..8f9e88e403 100644
--- a/src/lib/libssl/src/crypto/cryptlib.c
+++ b/src/lib/libssl/src/crypto/cryptlib.c
@@ -121,275 +121,17 @@
121static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */ 121static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */
122#endif 122#endif
123 123
124DECLARE_STACK_OF(CRYPTO_dynlock)
125IMPLEMENT_STACK_OF(CRYPTO_dynlock)
126
127/* real #defines in crypto.h, keep these upto date */
128static const char* const lock_names[CRYPTO_NUM_LOCKS] =
129 {
130 "<<ERROR>>",
131 "err",
132 "ex_data",
133 "x509",
134 "x509_info",
135 "x509_pkey",
136 "x509_crl",
137 "x509_req",
138 "dsa",
139 "rsa",
140 "evp_pkey",
141 "x509_store",
142 "ssl_ctx",
143 "ssl_cert",
144 "ssl_session",
145 "ssl_sess_cert",
146 "ssl",
147 "ssl_method",
148 "rand",
149 "rand2",
150 "debug_malloc",
151 "BIO",
152 "gethostbyname",
153 "getservbyname",
154 "readdir",
155 "RSA_blinding",
156 "dh",
157 "debug_malloc2",
158 "dso",
159 "dynlock",
160 "engine",
161 "ui",
162 "ecdsa",
163 "ec",
164 "ecdh",
165 "bn",
166 "ec_pre_comp",
167 "store",
168 "comp",
169#if CRYPTO_NUM_LOCKS != 39
170# error "Inconsistency between crypto.h and cryptlib.c"
171#endif
172 };
173
174/* This is for applications to allocate new type names in the non-dynamic
175 array of lock names. These are numbered with positive numbers. */
176static STACK *app_locks=NULL;
177
178/* For applications that want a more dynamic way of handling threads, the
179 following stack is used. These are externally numbered with negative
180 numbers. */
181static STACK_OF(CRYPTO_dynlock) *dyn_locks=NULL;
182
183
184static void (MS_FAR *locking_callback)(int mode,int type, 124static void (MS_FAR *locking_callback)(int mode,int type,
185 const char *file,int line)=NULL; 125 const char *file,int line)=NULL;
186static int (MS_FAR *add_lock_callback)(int *pointer,int amount, 126static int (MS_FAR *add_lock_callback)(int *pointer,int amount,
187 int type,const char *file,int line)=NULL; 127 int type,const char *file,int line)=NULL;
188static unsigned long (MS_FAR *id_callback)(void)=NULL; 128static unsigned long (MS_FAR *id_callback)(void)=NULL;
189static struct CRYPTO_dynlock_value *(MS_FAR *dynlock_create_callback)
190 (const char *file,int line)=NULL;
191static void (MS_FAR *dynlock_lock_callback)(int mode,
192 struct CRYPTO_dynlock_value *l, const char *file,int line)=NULL;
193static void (MS_FAR *dynlock_destroy_callback)(struct CRYPTO_dynlock_value *l,
194 const char *file,int line)=NULL;
195
196int CRYPTO_get_new_lockid(char *name)
197 {
198 char *str;
199 int i;
200
201#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
202 /* A hack to make Visual C++ 5.0 work correctly when linking as
203 * a DLL using /MT. Without this, the application cannot use
204 * and floating point printf's.
205 * It also seems to be needed for Visual C 1.5 (win16) */
206 SSLeay_MSVC5_hack=(double)name[0]*(double)name[1];
207#endif
208
209 if ((app_locks == NULL) && ((app_locks=sk_new_null()) == NULL))
210 {
211 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE);
212 return(0);
213 }
214 if ((str=BUF_strdup(name)) == NULL)
215 {
216 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE);
217 return(0);
218 }
219 i=sk_push(app_locks,str);
220 if (!i)
221 OPENSSL_free(str);
222 else
223 i+=CRYPTO_NUM_LOCKS; /* gap of one :-) */
224 return(i);
225 }
226 129
227int CRYPTO_num_locks(void) 130int CRYPTO_num_locks(void)
228 { 131 {
229 return CRYPTO_NUM_LOCKS; 132 return CRYPTO_NUM_LOCKS;
230 } 133 }
231 134
232int CRYPTO_get_new_dynlockid(void)
233 {
234 int i = 0;
235 CRYPTO_dynlock *pointer = NULL;
236
237 if (dynlock_create_callback == NULL)
238 {
239 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK);
240 return(0);
241 }
242 CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK);
243 if ((dyn_locks == NULL)
244 && ((dyn_locks=sk_CRYPTO_dynlock_new_null()) == NULL))
245 {
246 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
247 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,ERR_R_MALLOC_FAILURE);
248 return(0);
249 }
250 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
251
252 pointer = (CRYPTO_dynlock *)OPENSSL_malloc(sizeof(CRYPTO_dynlock));
253 if (pointer == NULL)
254 {
255 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,ERR_R_MALLOC_FAILURE);
256 return(0);
257 }
258 pointer->references = 1;
259 pointer->data = dynlock_create_callback(__FILE__,__LINE__);
260 if (pointer->data == NULL)
261 {
262 OPENSSL_free(pointer);
263 CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID,ERR_R_MALLOC_FAILURE);
264 return(0);
265 }
266
267 CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK);
268 /* First, try to find an existing empty slot */
269 i=sk_CRYPTO_dynlock_find(dyn_locks,NULL);
270 /* If there was none, push, thereby creating a new one */
271 if (i == -1)
272 /* Since sk_push() returns the number of items on the
273 stack, not the location of the pushed item, we need
274 to transform the returned number into a position,
275 by decreasing it. */
276 i=sk_CRYPTO_dynlock_push(dyn_locks,pointer) - 1;
277 else
278 /* If we found a place with a NULL pointer, put our pointer
279 in it. */
280 (void)sk_CRYPTO_dynlock_set(dyn_locks,i,pointer);
281 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
282
283 if (i == -1)
284 {
285 dynlock_destroy_callback(pointer->data,__FILE__,__LINE__);
286 OPENSSL_free(pointer);
287 }
288 else
289 i += 1; /* to avoid 0 */
290 return -i;
291 }
292
293void CRYPTO_destroy_dynlockid(int i)
294 {
295 CRYPTO_dynlock *pointer = NULL;
296 if (i)
297 i = -i-1;
298 if (dynlock_destroy_callback == NULL)
299 return;
300
301 CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK);
302
303 if (dyn_locks == NULL || i >= sk_CRYPTO_dynlock_num(dyn_locks))
304 {
305 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
306 return;
307 }
308 pointer = sk_CRYPTO_dynlock_value(dyn_locks, i);
309 if (pointer != NULL)
310 {
311 --pointer->references;
312#ifdef REF_CHECK
313 if (pointer->references < 0)
314 {
315 fprintf(stderr,"CRYPTO_destroy_dynlockid, bad reference count\n");
316 abort();
317 }
318 else
319#endif
320 if (pointer->references <= 0)
321 {
322 (void)sk_CRYPTO_dynlock_set(dyn_locks, i, NULL);
323 }
324 else
325 pointer = NULL;
326 }
327 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
328
329 if (pointer)
330 {
331 dynlock_destroy_callback(pointer->data,__FILE__,__LINE__);
332 OPENSSL_free(pointer);
333 }
334 }
335
336struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i)
337 {
338 CRYPTO_dynlock *pointer = NULL;
339 if (i)
340 i = -i-1;
341
342 CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK);
343
344 if (dyn_locks != NULL && i < sk_CRYPTO_dynlock_num(dyn_locks))
345 pointer = sk_CRYPTO_dynlock_value(dyn_locks, i);
346 if (pointer)
347 pointer->references++;
348
349 CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
350
351 if (pointer)
352 return pointer->data;
353 return NULL;
354 }
355
356struct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void))
357 (const char *file,int line)
358 {
359 return(dynlock_create_callback);
360 }
361
362void (*CRYPTO_get_dynlock_lock_callback(void))(int mode,
363 struct CRYPTO_dynlock_value *l, const char *file,int line)
364 {
365 return(dynlock_lock_callback);
366 }
367
368void (*CRYPTO_get_dynlock_destroy_callback(void))
369 (struct CRYPTO_dynlock_value *l, const char *file,int line)
370 {
371 return(dynlock_destroy_callback);
372 }
373
374void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(*func)
375 (const char *file, int line))
376 {
377 dynlock_create_callback=func;
378 }
379
380void CRYPTO_set_dynlock_lock_callback(void (*func)(int mode,
381 struct CRYPTO_dynlock_value *l, const char *file, int line))
382 {
383 dynlock_lock_callback=func;
384 }
385
386void CRYPTO_set_dynlock_destroy_callback(void (*func)
387 (struct CRYPTO_dynlock_value *l, const char *file, int line))
388 {
389 dynlock_destroy_callback=func;
390 }
391
392
393void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file, 135void (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file,
394 int line) 136 int line)
395 { 137 {
@@ -445,6 +187,14 @@ unsigned long CRYPTO_thread_id(void)
445 return(ret); 187 return(ret);
446 } 188 }
447 189
190static void (*do_dynlock_cb)(int mode, int type, const char *file, int line);
191
192void int_CRYPTO_set_do_dynlock_callback(
193 void (*dyn_cb)(int mode, int type, const char *file, int line))
194 {
195 do_dynlock_cb = dyn_cb;
196 }
197
448void CRYPTO_lock(int mode, int type, const char *file, int line) 198void CRYPTO_lock(int mode, int type, const char *file, int line)
449 { 199 {
450#ifdef LOCK_DEBUG 200#ifdef LOCK_DEBUG
@@ -472,17 +222,8 @@ void CRYPTO_lock(int mode, int type, const char *file, int line)
472#endif 222#endif
473 if (type < 0) 223 if (type < 0)
474 { 224 {
475 if (dynlock_lock_callback != NULL) 225 if (do_dynlock_cb)
476 { 226 do_dynlock_cb(mode, type, file, line);
477 struct CRYPTO_dynlock_value *pointer
478 = CRYPTO_get_dynlock_value(type);
479
480 OPENSSL_assert(pointer != NULL);
481
482 dynlock_lock_callback(mode, pointer, file, line);
483
484 CRYPTO_destroy_dynlockid(type);
485 }
486 } 227 }
487 else 228 else
488 if (locking_callback != NULL) 229 if (locking_callback != NULL)
@@ -527,21 +268,9 @@ int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
527 return(ret); 268 return(ret);
528 } 269 }
529 270
530const char *CRYPTO_get_lock_name(int type)
531 {
532 if (type < 0)
533 return("dynamic");
534 else if (type < CRYPTO_NUM_LOCKS)
535 return(lock_names[type]);
536 else if (type-CRYPTO_NUM_LOCKS > sk_num(app_locks))
537 return("ERROR");
538 else
539 return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS));
540 }
541
542#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \ 271#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
543 defined(__INTEL__) || \ 272 defined(__INTEL__) || \
544 defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) 273 defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
545 274
546unsigned long OPENSSL_ia32cap_P=0; 275unsigned long OPENSSL_ia32cap_P=0;
547unsigned long *OPENSSL_ia32cap_loc(void) { return &OPENSSL_ia32cap_P; } 276unsigned long *OPENSSL_ia32cap_loc(void) { return &OPENSSL_ia32cap_P; }
@@ -577,6 +306,62 @@ void OPENSSL_cpuid_setup(void) {}
577#endif 306#endif
578 307
579#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(_WINDLL) 308#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(_WINDLL)
309
310#ifdef OPENSSL_FIPS
311
312#include <tlhelp32.h>
313#if defined(__GNUC__) && __GNUC__>=2
314static int DllInit(void) __attribute__((constructor));
315#elif defined(_MSC_VER)
316static int DllInit(void);
317# ifdef _WIN64
318# pragma section(".CRT$XCU",read)
319 __declspec(allocate(".CRT$XCU"))
320# else
321# pragma data_seg(".CRT$XCU")
322# endif
323 static int (*p)(void) = DllInit;
324# pragma data_seg()
325#endif
326
327static int DllInit(void)
328{
329#if defined(_WIN32_WINNT)
330 union { int(*f)(void); BYTE *p; } t = { DllInit };
331 HANDLE hModuleSnap = INVALID_HANDLE_VALUE;
332 IMAGE_DOS_HEADER *dos_header;
333 IMAGE_NT_HEADERS *nt_headers;
334 MODULEENTRY32 me32 = {sizeof(me32)};
335
336 hModuleSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,0);
337 if (hModuleSnap != INVALID_HANDLE_VALUE &&
338 Module32First(hModuleSnap,&me32)) do
339 {
340 if (t.p >= me32.modBaseAddr &&
341 t.p < me32.modBaseAddr+me32.modBaseSize)
342 {
343 dos_header=(IMAGE_DOS_HEADER *)me32.modBaseAddr;
344 if (dos_header->e_magic==IMAGE_DOS_SIGNATURE)
345 {
346 nt_headers=(IMAGE_NT_HEADERS *)
347 ((BYTE *)dos_header+dos_header->e_lfanew);
348 if (nt_headers->Signature==IMAGE_NT_SIGNATURE &&
349 me32.modBaseAddr!=(BYTE*)nt_headers->OptionalHeader.ImageBase)
350 OPENSSL_NONPIC_relocated=1;
351 }
352 break;
353 }
354 } while (Module32Next(hModuleSnap,&me32));
355
356 if (hModuleSnap != INVALID_HANDLE_VALUE)
357 CloseHandle(hModuleSnap);
358#endif
359 OPENSSL_cpuid_setup();
360 return 0;
361}
362
363#else
364
580#ifdef __CYGWIN__ 365#ifdef __CYGWIN__
581/* pick DLL_[PROCESS|THREAD]_[ATTACH|DETACH] definitions */ 366/* pick DLL_[PROCESS|THREAD]_[ATTACH|DETACH] definitions */
582#include <windows.h> 367#include <windows.h>
@@ -620,6 +405,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
620 } 405 }
621#endif 406#endif
622 407
408#endif
409
623#if defined(_WIN32) && !defined(__CYGWIN__) 410#if defined(_WIN32) && !defined(__CYGWIN__)
624#include <tchar.h> 411#include <tchar.h>
625 412
diff --git a/src/lib/libssl/src/crypto/crypto-lib.com b/src/lib/libssl/src/crypto/crypto-lib.com
index 8898f30c1f..db9c882fb0 100644
--- a/src/lib/libssl/src/crypto/crypto-lib.com
+++ b/src/lib/libssl/src/crypto/crypto-lib.com
@@ -83,7 +83,7 @@ $ ENCRYPT_TYPES = "Basic,"+ -
83 "BUFFER,BIO,STACK,LHASH,RAND,ERR,"+ - 83 "BUFFER,BIO,STACK,LHASH,RAND,ERR,"+ -
84 "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ - 84 "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
85 "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ - 85 "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ -
86 "STORE,CMS,PQUEUE" 86 "STORE,CMS,PQUEUE,JPAKE"
87$! 87$!
88$! Check To Make Sure We Have Valid Command Line Parameters. 88$! Check To Make Sure We Have Valid Command Line Parameters.
89$! 89$!
@@ -161,7 +161,7 @@ $!
161$ APPS_DES = "DES/DES,CBC3_ENC" 161$ APPS_DES = "DES/DES,CBC3_ENC"
162$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE" 162$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE"
163$ 163$
164$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time,o_str,o_dir" 164$ LIB_ = "cryptlib,dyn_lck,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time,o_str,o_dir,o_init,fips_err"
165$ LIB_MD2 = "md2_dgst,md2_one" 165$ LIB_MD2 = "md2_dgst,md2_one"
166$ LIB_MD4 = "md4_dgst,md4_one" 166$ LIB_MD4 = "md4_dgst,md4_one"
167$ LIB_MD5 = "md5_dgst,md5_one" 167$ LIB_MD5 = "md5_dgst,md5_one"
@@ -197,9 +197,9 @@ $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ -
197 "ec2_smpl,ec2_mult" 197 "ec2_smpl,ec2_mult"
198$ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ - 198$ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ -
199 "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ - 199 "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ -
200 "rsa_pss,rsa_x931,rsa_asn1,rsa_depr" 200 "rsa_pss,rsa_x931,rsa_x931g,rsa_asn1,rsa_depr,rsa_eng"
201$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ - 201$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ -
202 "dsa_err,dsa_ossl,dsa_depr" 202 "dsa_err,dsa_ossl,dsa_depr,dsa_utl"
203$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err" 203$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err"
204$ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err,dh_depr" 204$ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err,dh_depr"
205$ LIB_ECDH = "ech_lib,ech_ossl,ech_key,ech_err" 205$ LIB_ECDH = "ech_lib,ech_ossl,ech_key,ech_err"
@@ -211,8 +211,8 @@ $ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ -
211 "tb_cipher,tb_digest,"+ - 211 "tb_cipher,tb_digest,"+ -
212 "eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,eng_padlock" 212 "eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,eng_padlock"
213$ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,"+ - 213$ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,"+ -
214 "aes_ctr,aes_ige,aes_wrap" 214 "aes_ctr,aes_ige"
215$ LIB_BUFFER = "buffer,buf_err" 215$ LIB_BUFFER = "buffer,buf_str,buf_err"
216$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ - 216$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
217 "bss_mem,bss_null,bss_fd,"+ - 217 "bss_mem,bss_null,bss_fd,"+ -
218 "bss_file,bss_sock,bss_conn,"+ - 218 "bss_file,bss_sock,bss_conn,"+ -
@@ -224,18 +224,19 @@ $ LIB_STACK = "stack"
224$ LIB_LHASH = "lhash,lh_stats" 224$ LIB_LHASH = "lhash,lh_stats"
225$ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ - 225$ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ -
226 "rand_vms" 226 "rand_vms"
227$ LIB_ERR = "err,err_all,err_prn" 227$ LIB_ERR = "err,err_def,err_all,err_prn,err_str,err_bio"
228$ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err" 228$ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err"
229$ LIB_EVP = "encode,digest,evp_enc,evp_key,evp_acnf,"+ - 229$ LIB_EVP = "encode,digest,dig_eng,evp_enc,evp_key,evp_acnf,evp_cnf,"+ -
230 "e_des,e_bf,e_idea,e_des3,e_camellia,e_seed,"+ - 230 "e_des,e_bf,e_idea,e_des3,e_camellia,"+ -
231 "e_rc4,e_aes,names,"+ - 231 "e_rc4,e_aes,names,e_seed,"+ -
232 "e_xcbc_d,e_rc2,e_cast,e_rc5" 232 "e_xcbc_d,e_rc2,e_cast,e_rc5,enc_min"
233$ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1," + - 233$ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1," + -
234 "m_dss,m_dss1,m_mdc2,m_ripemd,m_ecdsa,"+ - 234 "m_dss,m_dss1,m_mdc2,m_ripemd,m_ecdsa,"+ -
235 "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ - 235 "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ -
236 "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ - 236 "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ -
237 "c_all,c_allc,c_alld,evp_lib,bio_ok,"+- 237 "c_all,c_allc,c_alld,evp_lib,bio_ok,"+-
238 "evp_pkey,evp_pbe,p5_crpt,p5_crpt2" 238 "evp_pkey,evp_pbe,p5_crpt,p5_crpt2"
239$ LIB_EVP_3 = "e_old"
239$ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ - 240$ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ -
240 "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ - 241 "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ -
241 "a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ - 242 "a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ -
@@ -245,7 +246,7 @@ $ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ -
245$ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ - 246$ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ -
246 "tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ - 247 "tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ -
247 "f_int,f_string,n_pkey,"+ - 248 "f_int,f_string,n_pkey,"+ -
248 "f_enum,a_hdr,x_pkey,a_bool,x_exten,asn_mime,"+ - 249 "f_enum,a_hdr,x_pkey,a_bool,x_exten,"+ -
249 "asn1_gen,asn1_par,asn1_lib,asn1_err,a_meth,a_bytes,a_strnid,"+ - 250 "asn1_gen,asn1_par,asn1_lib,asn1_err,a_meth,a_bytes,a_strnid,"+ -
250 "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid" 251 "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid"
251$ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ - 252$ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ -
@@ -280,6 +281,7 @@ $ LIB_STORE = "str_err,str_lib,str_meth,str_mem"
280$ LIB_CMS = "cms_lib,cms_asn1,cms_att,cms_io,cms_smime,cms_err,"+ - 281$ LIB_CMS = "cms_lib,cms_asn1,cms_att,cms_io,cms_smime,cms_err,"+ -
281 "cms_sd,cms_dd,cms_cd,cms_env,cms_enc,cms_ess" 282 "cms_sd,cms_dd,cms_cd,cms_env,cms_enc,cms_ess"
282$ LIB_PQUEUE = "pqueue" 283$ LIB_PQUEUE = "pqueue"
284$ LIB_JPAKE = "jpake,jpake_err"
283$! 285$!
284$! Setup exceptional compilations 286$! Setup exceptional compilations
285$! 287$!
diff --git a/src/lib/libssl/src/crypto/crypto.h b/src/lib/libssl/src/crypto/crypto.h
index fe2c1d6403..0e4fb0723c 100644
--- a/src/lib/libssl/src/crypto/crypto.h
+++ b/src/lib/libssl/src/crypto/crypto.h
@@ -219,7 +219,13 @@ typedef struct openssl_item_st
219#define CRYPTO_LOCK_EC_PRE_COMP 36 219#define CRYPTO_LOCK_EC_PRE_COMP 36
220#define CRYPTO_LOCK_STORE 37 220#define CRYPTO_LOCK_STORE 37
221#define CRYPTO_LOCK_COMP 38 221#define CRYPTO_LOCK_COMP 38
222#ifndef OPENSSL_FIPS
222#define CRYPTO_NUM_LOCKS 39 223#define CRYPTO_NUM_LOCKS 39
224#else
225#define CRYPTO_LOCK_FIPS 39
226#define CRYPTO_LOCK_FIPS2 40
227#define CRYPTO_NUM_LOCKS 41
228#endif
223 229
224#define CRYPTO_LOCK 1 230#define CRYPTO_LOCK 1
225#define CRYPTO_UNLOCK 2 231#define CRYPTO_UNLOCK 2
@@ -341,14 +347,7 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
341 347
342/* Set standard debugging functions (not done by default 348/* Set standard debugging functions (not done by default
343 * unless CRYPTO_MDEBUG is defined) */ 349 * unless CRYPTO_MDEBUG is defined) */
344#define CRYPTO_malloc_debug_init() do {\ 350void CRYPTO_malloc_debug_init(void);
345 CRYPTO_set_mem_debug_functions(\
346 CRYPTO_dbg_malloc,\
347 CRYPTO_dbg_realloc,\
348 CRYPTO_dbg_free,\
349 CRYPTO_dbg_set_options,\
350 CRYPTO_dbg_get_options);\
351 } while(0)
352 351
353int CRYPTO_mem_ctrl(int mode); 352int CRYPTO_mem_ctrl(int mode);
354int CRYPTO_is_mem_check_on(void); 353int CRYPTO_is_mem_check_on(void);
@@ -363,6 +362,7 @@ int CRYPTO_is_mem_check_on(void);
363#define is_MemCheck_on() CRYPTO_is_mem_check_on() 362#define is_MemCheck_on() CRYPTO_is_mem_check_on()
364 363
365#define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__) 364#define OPENSSL_malloc(num) CRYPTO_malloc((int)num,__FILE__,__LINE__)
365#define OPENSSL_strdup(str) CRYPTO_strdup((str),__FILE__,__LINE__)
366#define OPENSSL_realloc(addr,num) \ 366#define OPENSSL_realloc(addr,num) \
367 CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__) 367 CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)
368#define OPENSSL_realloc_clean(addr,old_num,num) \ 368#define OPENSSL_realloc_clean(addr,old_num,num) \
@@ -427,6 +427,9 @@ const char *CRYPTO_get_lock_name(int type);
427int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file, 427int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file,
428 int line); 428 int line);
429 429
430void int_CRYPTO_set_do_dynlock_callback(
431 void (*do_dynlock_cb)(int mode, int type, const char *file, int line));
432
430int CRYPTO_get_new_dynlockid(void); 433int CRYPTO_get_new_dynlockid(void);
431void CRYPTO_destroy_dynlockid(int i); 434void CRYPTO_destroy_dynlockid(int i);
432struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i); 435struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
@@ -451,6 +454,10 @@ int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
451 void (*f)(void *,int), 454 void (*f)(void *,int),
452 void (*so)(long), 455 void (*so)(long),
453 long (*go)(void)); 456 long (*go)(void));
457void CRYPTO_set_mem_info_functions(
458 int (*push_info_fn)(const char *info, const char *file, int line),
459 int (*pop_info_fn)(void),
460 int (*remove_all_info_fn)(void));
454void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *)); 461void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *));
455void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)); 462void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *));
456void CRYPTO_get_mem_ex_functions(void *(**m)(size_t,const char *,int), 463void CRYPTO_get_mem_ex_functions(void *(**m)(size_t,const char *,int),
@@ -467,6 +474,7 @@ void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int),
467void *CRYPTO_malloc_locked(int num, const char *file, int line); 474void *CRYPTO_malloc_locked(int num, const char *file, int line);
468void CRYPTO_free_locked(void *); 475void CRYPTO_free_locked(void *);
469void *CRYPTO_malloc(int num, const char *file, int line); 476void *CRYPTO_malloc(int num, const char *file, int line);
477char *CRYPTO_strdup(const char *str, const char *file, int line);
470void CRYPTO_free(void *); 478void CRYPTO_free(void *);
471void *CRYPTO_realloc(void *addr,int num, const char *file, int line); 479void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
472void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file, 480void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file,
@@ -506,6 +514,9 @@ void CRYPTO_dbg_free(void *addr,int before_p);
506void CRYPTO_dbg_set_options(long bits); 514void CRYPTO_dbg_set_options(long bits);
507long CRYPTO_dbg_get_options(void); 515long CRYPTO_dbg_get_options(void);
508 516
517int CRYPTO_dbg_push_info(const char *info, const char *file, int line);
518int CRYPTO_dbg_pop_info(void);
519int CRYPTO_dbg_remove_all_info(void);
509 520
510#ifndef OPENSSL_NO_FP_API 521#ifndef OPENSSL_NO_FP_API
511void CRYPTO_mem_leaks_fp(FILE *); 522void CRYPTO_mem_leaks_fp(FILE *);
@@ -523,12 +534,69 @@ unsigned long *OPENSSL_ia32cap_loc(void);
523#define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc())) 534#define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc()))
524int OPENSSL_isservice(void); 535int OPENSSL_isservice(void);
525 536
537#ifdef OPENSSL_FIPS
538#define FIPS_ERROR_IGNORED(alg) OpenSSLDie(__FILE__, __LINE__, \
539 alg " previous FIPS forbidden algorithm error ignored");
540
541#define FIPS_BAD_ABORT(alg) OpenSSLDie(__FILE__, __LINE__, \
542 #alg " Algorithm forbidden in FIPS mode");
543
544#ifdef OPENSSL_FIPS_STRICT
545#define FIPS_BAD_ALGORITHM(alg) FIPS_BAD_ABORT(alg)
546#else
547#define FIPS_BAD_ALGORITHM(alg) \
548 { \
549 FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_NON_FIPS_METHOD); \
550 ERR_add_error_data(2, "Algorithm=", #alg); \
551 return 0; \
552 }
553#endif
554
555/* Low level digest API blocking macro */
556
557#define FIPS_NON_FIPS_MD_Init(alg) \
558 int alg##_Init(alg##_CTX *c) \
559 { \
560 if (FIPS_mode()) \
561 FIPS_BAD_ALGORITHM(alg) \
562 return private_##alg##_Init(c); \
563 } \
564 int private_##alg##_Init(alg##_CTX *c)
565
566/* For ciphers the API often varies from cipher to cipher and each needs to
567 * be treated as a special case. Variable key length ciphers (Blowfish, RC4,
568 * CAST) however are very similar and can use a blocking macro.
569 */
570
571#define FIPS_NON_FIPS_VCIPHER_Init(alg) \
572 void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data) \
573 { \
574 if (FIPS_mode()) \
575 FIPS_BAD_ABORT(alg) \
576 private_##alg##_set_key(key, len, data); \
577 } \
578 void private_##alg##_set_key(alg##_KEY *key, int len, \
579 const unsigned char *data)
580
581#else
582
583#define FIPS_NON_FIPS_VCIPHER_Init(alg) \
584 void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data)
585
586#define FIPS_NON_FIPS_MD_Init(alg) \
587 int alg##_Init(alg##_CTX *c)
588
589#endif /* def OPENSSL_FIPS */
590
526/* BEGIN ERROR CODES */ 591/* BEGIN ERROR CODES */
527/* The following lines are auto generated by the script mkerr.pl. Any changes 592/* The following lines are auto generated by the script mkerr.pl. Any changes
528 * made after this point may be overwritten when the script is next run. 593 * made after this point may be overwritten when the script is next run.
529 */ 594 */
530void ERR_load_CRYPTO_strings(void); 595void ERR_load_CRYPTO_strings(void);
531 596
597#define OPENSSL_HAVE_INIT 1
598void OPENSSL_init(void);
599
532/* Error codes for the CRYPTO functions. */ 600/* Error codes for the CRYPTO functions. */
533 601
534/* Function codes. */ 602/* Function codes. */
diff --git a/src/lib/libssl/src/crypto/des/des_enc.c b/src/lib/libssl/src/crypto/des/des_enc.c
index 0fe4e0b2ad..22701e0669 100644
--- a/src/lib/libssl/src/crypto/des/des_enc.c
+++ b/src/lib/libssl/src/crypto/des/des_enc.c
@@ -293,6 +293,8 @@ void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
293 293
294#ifndef DES_DEFAULT_OPTIONS 294#ifndef DES_DEFAULT_OPTIONS
295 295
296#if !defined(OPENSSL_FIPS_DES_ASM)
297
296#undef CBC_ENC_C__DONT_UPDATE_IV 298#undef CBC_ENC_C__DONT_UPDATE_IV
297#include "ncbc_enc.c" /* DES_ncbc_encrypt */ 299#include "ncbc_enc.c" /* DES_ncbc_encrypt */
298 300
@@ -408,4 +410,6 @@ void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
408 tin[0]=tin[1]=0; 410 tin[0]=tin[1]=0;
409 } 411 }
410 412
413#endif
414
411#endif /* DES_DEFAULT_OPTIONS */ 415#endif /* DES_DEFAULT_OPTIONS */
diff --git a/src/lib/libssl/src/crypto/des/ecb_enc.c b/src/lib/libssl/src/crypto/des/ecb_enc.c
index 00d5b91e8c..75ae6cf8bb 100644
--- a/src/lib/libssl/src/crypto/des/ecb_enc.c
+++ b/src/lib/libssl/src/crypto/des/ecb_enc.c
@@ -57,54 +57,7 @@
57 */ 57 */
58 58
59#include "des_locl.h" 59#include "des_locl.h"
60#include "des_ver.h"
61#include "spr.h" 60#include "spr.h"
62#include <openssl/opensslv.h>
63#include <openssl/bio.h>
64
65OPENSSL_GLOBAL const char libdes_version[]="libdes" OPENSSL_VERSION_PTEXT;
66OPENSSL_GLOBAL const char DES_version[]="DES" OPENSSL_VERSION_PTEXT;
67
68const char *DES_options(void)
69 {
70 static int init=1;
71 static char buf[32];
72
73 if (init)
74 {
75 const char *ptr,*unroll,*risc,*size;
76
77#ifdef DES_PTR
78 ptr="ptr";
79#else
80 ptr="idx";
81#endif
82#if defined(DES_RISC1) || defined(DES_RISC2)
83#ifdef DES_RISC1
84 risc="risc1";
85#endif
86#ifdef DES_RISC2
87 risc="risc2";
88#endif
89#else
90 risc="cisc";
91#endif
92#ifdef DES_UNROLL
93 unroll="16";
94#else
95 unroll="4";
96#endif
97 if (sizeof(DES_LONG) != sizeof(long))
98 size="int";
99 else
100 size="long";
101 BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
102 size);
103 init=0;
104 }
105 return(buf);
106 }
107
108 61
109void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, 62void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
110 DES_key_schedule *ks, int enc) 63 DES_key_schedule *ks, int enc)
diff --git a/src/lib/libssl/src/crypto/des/enc_read.c b/src/lib/libssl/src/crypto/des/enc_read.c
index c70fb686b8..e7da2ec66b 100644
--- a/src/lib/libssl/src/crypto/des/enc_read.c
+++ b/src/lib/libssl/src/crypto/des/enc_read.c
@@ -147,7 +147,11 @@ int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
147 /* first - get the length */ 147 /* first - get the length */
148 while (net_num < HDRSIZE) 148 while (net_num < HDRSIZE)
149 { 149 {
150#ifndef _WIN32
150 i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num); 151 i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
152#else
153 i=_read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
154#endif
151#ifdef EINTR 155#ifdef EINTR
152 if ((i == -1) && (errno == EINTR)) continue; 156 if ((i == -1) && (errno == EINTR)) continue;
153#endif 157#endif
diff --git a/src/lib/libssl/src/crypto/des/enc_writ.c b/src/lib/libssl/src/crypto/des/enc_writ.c
index af5b8c2349..c2f032c9a6 100644
--- a/src/lib/libssl/src/crypto/des/enc_writ.c
+++ b/src/lib/libssl/src/crypto/des/enc_writ.c
@@ -153,7 +153,11 @@ int DES_enc_write(int fd, const void *_buf, int len,
153 { 153 {
154 /* eay 26/08/92 I was not doing writing from where we 154 /* eay 26/08/92 I was not doing writing from where we
155 * got up to. */ 155 * got up to. */
156#ifndef _WIN32
156 i=write(fd,(void *)&(outbuf[j]),outnum-j); 157 i=write(fd,(void *)&(outbuf[j]),outnum-j);
158#else
159 i=_write(fd,(void *)&(outbuf[j]),outnum-j);
160#endif
157 if (i == -1) 161 if (i == -1)
158 { 162 {
159#ifdef EINTR 163#ifdef EINTR
diff --git a/src/lib/libssl/src/crypto/des/set_key.c b/src/lib/libssl/src/crypto/des/set_key.c
index a43ef3c881..c0806d593c 100644
--- a/src/lib/libssl/src/crypto/des/set_key.c
+++ b/src/lib/libssl/src/crypto/des/set_key.c
@@ -64,6 +64,10 @@
64 * 1.0 First working version 64 * 1.0 First working version
65 */ 65 */
66#include "des_locl.h" 66#include "des_locl.h"
67#ifdef OPENSSL_FIPS
68#include <openssl/fips.h>
69#endif
70
67 71
68OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */ 72OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */
69 73
@@ -349,6 +353,10 @@ void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule)
349 k = &schedule->ks->deslong[0]; 353 k = &schedule->ks->deslong[0];
350 in = &(*key)[0]; 354 in = &(*key)[0];
351 355
356#ifdef OPENSSL_FIPS
357 FIPS_selftest_check();
358#endif
359
352 c2l(in,c); 360 c2l(in,c);
353 c2l(in,d); 361 c2l(in,d);
354 362
@@ -405,3 +413,4 @@ void des_fixup_key_parity(des_cblock *key)
405 des_set_odd_parity(key); 413 des_set_odd_parity(key);
406 } 414 }
407*/ 415*/
416
diff --git a/src/lib/libssl/src/crypto/dh/Makefile b/src/lib/libssl/src/crypto/dh/Makefile
index 950cad9c5b..d01fa960eb 100644
--- a/src/lib/libssl/src/crypto/dh/Makefile
+++ b/src/lib/libssl/src/crypto/dh/Makefile
@@ -33,7 +33,7 @@ top:
33all: lib 33all: lib
34 34
35lib: $(LIBOBJ) 35lib: $(LIBOBJ)
36 $(AR) $(LIB) $(LIBOBJ) 36 $(ARX) $(LIB) $(LIBOBJ)
37 $(RANLIB) $(LIB) || echo Never mind. 37 $(RANLIB) $(LIB) || echo Never mind.
38 @touch lib 38 @touch lib
39 39
@@ -129,11 +129,11 @@ dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
129dh_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 129dh_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
130dh_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 130dh_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
131dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h 131dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
132dh_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 132dh_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
133dh_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 133dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
134dh_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 134dh_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
135dh_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 135dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
136dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 136dh_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
137dh_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 137dh_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
138dh_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 138dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
139dh_lib.o: ../cryptlib.h dh_lib.c 139dh_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h dh_lib.c
diff --git a/src/lib/libssl/src/crypto/dh/dh.h b/src/lib/libssl/src/crypto/dh/dh.h
index 0afabc7dd3..0a39742773 100644
--- a/src/lib/libssl/src/crypto/dh/dh.h
+++ b/src/lib/libssl/src/crypto/dh/dh.h
@@ -77,6 +77,8 @@
77# define OPENSSL_DH_MAX_MODULUS_BITS 10000 77# define OPENSSL_DH_MAX_MODULUS_BITS 10000
78#endif 78#endif
79 79
80#define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024
81
80#define DH_FLAG_CACHE_MONT_P 0x01 82#define DH_FLAG_CACHE_MONT_P 0x01
81#define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH 83#define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH
82 * implementation now uses constant time 84 * implementation now uses constant time
@@ -167,6 +169,11 @@ struct dh_st
167 169
168const DH_METHOD *DH_OpenSSL(void); 170const DH_METHOD *DH_OpenSSL(void);
169 171
172#ifdef OPENSSL_FIPS
173DH * FIPS_dh_new(void);
174void FIPS_dh_free(DH *dh);
175#endif
176
170void DH_set_default_method(const DH_METHOD *meth); 177void DH_set_default_method(const DH_METHOD *meth);
171const DH_METHOD *DH_get_default_method(void); 178const DH_METHOD *DH_get_default_method(void);
172int DH_set_method(DH *dh, const DH_METHOD *meth); 179int DH_set_method(DH *dh, const DH_METHOD *meth);
@@ -218,6 +225,9 @@ void ERR_load_DH_strings(void);
218#define DH_F_DHPARAMS_PRINT 100 225#define DH_F_DHPARAMS_PRINT 100
219#define DH_F_DHPARAMS_PRINT_FP 101 226#define DH_F_DHPARAMS_PRINT_FP 101
220#define DH_F_DH_BUILTIN_GENPARAMS 106 227#define DH_F_DH_BUILTIN_GENPARAMS 106
228#define DH_F_DH_COMPUTE_KEY 107
229#define DH_F_DH_GENERATE_KEY 108
230#define DH_F_DH_GENERATE_PARAMETERS 109
221#define DH_F_DH_NEW_METHOD 105 231#define DH_F_DH_NEW_METHOD 105
222#define DH_F_GENERATE_KEY 103 232#define DH_F_GENERATE_KEY 103
223#define DH_F_GENERATE_PARAMETERS 104 233#define DH_F_GENERATE_PARAMETERS 104
@@ -225,6 +235,7 @@ void ERR_load_DH_strings(void);
225/* Reason codes. */ 235/* Reason codes. */
226#define DH_R_BAD_GENERATOR 101 236#define DH_R_BAD_GENERATOR 101
227#define DH_R_INVALID_PUBKEY 102 237#define DH_R_INVALID_PUBKEY 102
238#define DH_R_KEY_SIZE_TOO_SMALL 104
228#define DH_R_MODULUS_TOO_LARGE 103 239#define DH_R_MODULUS_TOO_LARGE 103
229#define DH_R_NO_PRIVATE_VALUE 100 240#define DH_R_NO_PRIVATE_VALUE 100
230#define DH_R_INVALID_PUBKEY 102 241#define DH_R_INVALID_PUBKEY 102
diff --git a/src/lib/libssl/src/crypto/dh/dh_asn1.c b/src/lib/libssl/src/crypto/dh/dh_asn1.c
index 769b5b68c5..76740af2bd 100644
--- a/src/lib/libssl/src/crypto/dh/dh_asn1.c
+++ b/src/lib/libssl/src/crypto/dh/dh_asn1.c
@@ -1,5 +1,5 @@
1/* dh_asn1.c */ 1/* dh_asn1.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/dh/dh_check.c b/src/lib/libssl/src/crypto/dh/dh_check.c
index b846913004..316cb9221d 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 @@
70 * should hold. 70 * should hold.
71 */ 71 */
72 72
73#ifndef OPENSSL_FIPS
74
73int DH_check(const DH *dh, int *ret) 75int DH_check(const DH *dh, int *ret)
74 { 76 {
75 int ok=0; 77 int ok=0;
@@ -140,3 +142,5 @@ err:
140 if (q != NULL) BN_free(q); 142 if (q != NULL) BN_free(q);
141 return(ok); 143 return(ok);
142 } 144 }
145
146#endif
diff --git a/src/lib/libssl/src/crypto/dh/dh_err.c b/src/lib/libssl/src/crypto/dh/dh_err.c
index b2361c7389..b364362fca 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 @@
1/* crypto/dh/dh_err.c */ 1/* crypto/dh/dh_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -74,6 +74,9 @@ static ERR_STRING_DATA DH_str_functs[]=
74{ERR_FUNC(DH_F_DHPARAMS_PRINT), "DHparams_print"}, 74{ERR_FUNC(DH_F_DHPARAMS_PRINT), "DHparams_print"},
75{ERR_FUNC(DH_F_DHPARAMS_PRINT_FP), "DHparams_print_fp"}, 75{ERR_FUNC(DH_F_DHPARAMS_PRINT_FP), "DHparams_print_fp"},
76{ERR_FUNC(DH_F_DH_BUILTIN_GENPARAMS), "DH_BUILTIN_GENPARAMS"}, 76{ERR_FUNC(DH_F_DH_BUILTIN_GENPARAMS), "DH_BUILTIN_GENPARAMS"},
77{ERR_FUNC(DH_F_DH_COMPUTE_KEY), "DH_compute_key"},
78{ERR_FUNC(DH_F_DH_GENERATE_KEY), "DH_generate_key"},
79{ERR_FUNC(DH_F_DH_GENERATE_PARAMETERS), "DH_generate_parameters"},
77{ERR_FUNC(DH_F_DH_NEW_METHOD), "DH_new_method"}, 80{ERR_FUNC(DH_F_DH_NEW_METHOD), "DH_new_method"},
78{ERR_FUNC(DH_F_GENERATE_KEY), "GENERATE_KEY"}, 81{ERR_FUNC(DH_F_GENERATE_KEY), "GENERATE_KEY"},
79{ERR_FUNC(DH_F_GENERATE_PARAMETERS), "GENERATE_PARAMETERS"}, 82{ERR_FUNC(DH_F_GENERATE_PARAMETERS), "GENERATE_PARAMETERS"},
@@ -84,6 +87,7 @@ static ERR_STRING_DATA DH_str_reasons[]=
84 { 87 {
85{ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"}, 88{ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"},
86{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"}, 89{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"},
90{ERR_REASON(DH_R_KEY_SIZE_TOO_SMALL) ,"key size too small"},
87{ERR_REASON(DH_R_MODULUS_TOO_LARGE) ,"modulus too large"}, 91{ERR_REASON(DH_R_MODULUS_TOO_LARGE) ,"modulus too large"},
88{ERR_REASON(DH_R_NO_PRIVATE_VALUE) ,"no private value"}, 92{ERR_REASON(DH_R_NO_PRIVATE_VALUE) ,"no private value"},
89{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"}, 93{ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"},
diff --git a/src/lib/libssl/src/crypto/dh/dh_gen.c b/src/lib/libssl/src/crypto/dh/dh_gen.c
index cfd5b11868..999e1deb40 100644
--- a/src/lib/libssl/src/crypto/dh/dh_gen.c
+++ b/src/lib/libssl/src/crypto/dh/dh_gen.c
@@ -66,6 +66,8 @@
66#include <openssl/bn.h> 66#include <openssl/bn.h>
67#include <openssl/dh.h> 67#include <openssl/dh.h>
68 68
69#ifndef OPENSSL_FIPS
70
69static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB *cb); 71static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB *cb);
70 72
71int DH_generate_parameters_ex(DH *ret, int prime_len, int generator, BN_GENCB *cb) 73int DH_generate_parameters_ex(DH *ret, int prime_len, int generator, BN_GENCB *cb)
@@ -173,3 +175,5 @@ err:
173 } 175 }
174 return ok; 176 return ok;
175 } 177 }
178
179#endif
diff --git a/src/lib/libssl/src/crypto/dh/dh_key.c b/src/lib/libssl/src/crypto/dh/dh_key.c
index e7db440342..79dd331863 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 @@
62#include <openssl/rand.h> 62#include <openssl/rand.h>
63#include <openssl/dh.h> 63#include <openssl/dh.h>
64 64
65#ifndef OPENSSL_FIPS
66
65static int generate_key(DH *dh); 67static int generate_key(DH *dh);
66static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 68static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
67static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, 69static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
@@ -261,3 +263,5 @@ static int dh_finish(DH *dh)
261 BN_MONT_CTX_free(dh->method_mont_p); 263 BN_MONT_CTX_free(dh->method_mont_p);
262 return(1); 264 return(1);
263 } 265 }
266
267#endif
diff --git a/src/lib/libssl/src/crypto/dsa/Makefile b/src/lib/libssl/src/crypto/dsa/Makefile
index 5493f19e85..2cc45cdc62 100644
--- a/src/lib/libssl/src/crypto/dsa/Makefile
+++ b/src/lib/libssl/src/crypto/dsa/Makefile
@@ -18,9 +18,9 @@ APPS=
18 18
19LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
20LIBSRC= dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c \ 20LIBSRC= dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c \
21 dsa_err.c dsa_ossl.c dsa_depr.c 21 dsa_err.c dsa_ossl.c dsa_depr.c dsa_utl.c
22LIBOBJ= dsa_gen.o dsa_key.o dsa_lib.o dsa_asn1.o dsa_vrf.o dsa_sign.o \ 22LIBOBJ= dsa_gen.o dsa_key.o dsa_lib.o dsa_asn1.o dsa_vrf.o dsa_sign.o \
23 dsa_err.o dsa_ossl.o dsa_depr.o 23 dsa_err.o dsa_ossl.o dsa_depr.o dsa_utl.o
24 24
25SRC= $(LIBSRC) 25SRC= $(LIBSRC)
26 26
@@ -35,7 +35,7 @@ top:
35all: lib 35all: lib
36 36
37lib: $(LIBOBJ) 37lib: $(LIBOBJ)
38 $(AR) $(LIB) $(LIBOBJ) 38 $(ARX) $(LIB) $(LIBOBJ)
39 $(RANLIB) $(LIB) || echo Never mind. 39 $(RANLIB) $(LIB) || echo Never mind.
40 @touch lib 40 @touch lib
41 41
@@ -78,9 +78,10 @@ clean:
78 78
79dsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h 79dsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
80dsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h 80dsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
81dsa_asn1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 81dsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
82dsa_asn1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 82dsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
83dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h 83dsa_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
84dsa_asn1.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
84dsa_asn1.o: ../../include/openssl/opensslconf.h 85dsa_asn1.o: ../../include/openssl/opensslconf.h
85dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 86dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
86dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 87dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
@@ -90,8 +91,9 @@ dsa_depr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
90dsa_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 91dsa_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
91dsa_depr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 92dsa_depr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
92dsa_depr.o: ../../include/openssl/err.h ../../include/openssl/evp.h 93dsa_depr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
93dsa_depr.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 94dsa_depr.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
94dsa_depr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 95dsa_depr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
96dsa_depr.o: ../../include/openssl/opensslconf.h
95dsa_depr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 97dsa_depr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
96dsa_depr.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 98dsa_depr.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
97dsa_depr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 99dsa_depr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -108,12 +110,13 @@ dsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
108dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 110dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
109dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 111dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
110dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h 112dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h
111dsa_gen.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 113dsa_gen.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
112dsa_gen.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 114dsa_gen.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
113dsa_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 115dsa_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
114dsa_gen.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 116dsa_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
115dsa_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 117dsa_gen.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
116dsa_gen.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_gen.c 118dsa_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
119dsa_gen.o: ../cryptlib.h dsa_gen.c
117dsa_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h 120dsa_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
118dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 121dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
119dsa_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 122dsa_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
@@ -129,14 +132,14 @@ dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
129dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 132dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
130dsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 133dsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
131dsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h 134dsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
132dsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 135dsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
133dsa_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 136dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
134dsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 137dsa_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
135dsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 138dsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
136dsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 139dsa_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
137dsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 140dsa_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
138dsa_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 141dsa_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
139dsa_lib.o: ../cryptlib.h dsa_lib.c 142dsa_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h dsa_lib.c
140dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h 143dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
141dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 144dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
142dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 145dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -151,19 +154,34 @@ dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h
151dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 154dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
152dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 155dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
153dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 156dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
154dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/lhash.h 157dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/fips.h
155dsa_sign.o: ../../include/openssl/opensslconf.h 158dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
156dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 159dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
157dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 160dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
158dsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 161dsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
159dsa_sign.o: ../cryptlib.h dsa_sign.c 162dsa_sign.o: ../cryptlib.h dsa_sign.c
163dsa_utl.o: ../../e_os.h ../../include/openssl/asn1.h
164dsa_utl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
165dsa_utl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
166dsa_utl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
167dsa_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
168dsa_utl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
169dsa_utl.o: ../../include/openssl/engine.h ../../include/openssl/err.h
170dsa_utl.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
171dsa_utl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
172dsa_utl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
173dsa_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
174dsa_utl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
175dsa_utl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
176dsa_utl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
177dsa_utl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h dsa_utl.c
160dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h 178dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h
161dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h 179dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
162dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h 180dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
163dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h 181dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
164dsa_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 182dsa_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
165dsa_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 183dsa_vrf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
166dsa_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 184dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
167dsa_vrf.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 185dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
168dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 186dsa_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
169dsa_vrf.o: ../cryptlib.h dsa_vrf.c 187dsa_vrf.o: ../../include/openssl/symhacks.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 3a8fe5b56b..702c50d6dc 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa.h
+++ b/src/lib/libssl/src/crypto/dsa/dsa.h
@@ -88,6 +88,8 @@
88# define OPENSSL_DSA_MAX_MODULUS_BITS 10000 88# define OPENSSL_DSA_MAX_MODULUS_BITS 10000
89#endif 89#endif
90 90
91#define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024
92
91#define DSA_FLAG_CACHE_MONT_P 0x01 93#define DSA_FLAG_CACHE_MONT_P 0x01
92#define DSA_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DSA 94#define DSA_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DSA
93 * implementation now uses constant time 95 * implementation now uses constant time
@@ -97,6 +99,25 @@
97 * be used for all exponents. 99 * be used for all exponents.
98 */ 100 */
99 101
102/* If this flag is set the DSA method is FIPS compliant and can be used
103 * in FIPS mode. This is set in the validated module method. If an
104 * application sets this flag in its own methods it is its reposibility
105 * to ensure the result is compliant.
106 */
107
108#define DSA_FLAG_FIPS_METHOD 0x0400
109
110/* If this flag is set the operations normally disabled in FIPS mode are
111 * permitted it is then the applications responsibility to ensure that the
112 * usage is compliant.
113 */
114
115#define DSA_FLAG_NON_FIPS_ALLOW 0x0400
116
117#ifdef OPENSSL_FIPS
118#define FIPS_DSA_SIZE_T int
119#endif
120
100#ifdef __cplusplus 121#ifdef __cplusplus
101extern "C" { 122extern "C" {
102#endif 123#endif
@@ -189,6 +210,11 @@ void DSA_set_default_method(const DSA_METHOD *);
189const DSA_METHOD *DSA_get_default_method(void); 210const DSA_METHOD *DSA_get_default_method(void);
190int DSA_set_method(DSA *dsa, const DSA_METHOD *); 211int DSA_set_method(DSA *dsa, const DSA_METHOD *);
191 212
213#ifdef OPENSSL_FIPS
214DSA * FIPS_dsa_new(void);
215void FIPS_dsa_free (DSA *r);
216#endif
217
192DSA * DSA_new(void); 218DSA * DSA_new(void);
193DSA * DSA_new_method(ENGINE *engine); 219DSA * DSA_new_method(ENGINE *engine);
194void DSA_free (DSA *r); 220void DSA_free (DSA *r);
@@ -249,6 +275,11 @@ int DSA_print_fp(FILE *bp, const DSA *x, int off);
249DH *DSA_dup_DH(const DSA *r); 275DH *DSA_dup_DH(const DSA *r);
250#endif 276#endif
251 277
278#ifdef OPENSSL_FIPS
279int FIPS_dsa_sig_encode(unsigned char *out, DSA_SIG *sig);
280int FIPS_dsa_sig_decode(DSA_SIG *sig, const unsigned char *in, int inlen);
281#endif
282
252/* BEGIN ERROR CODES */ 283/* BEGIN ERROR CODES */
253/* The following lines are auto generated by the script mkerr.pl. Any changes 284/* The following lines are auto generated by the script mkerr.pl. Any changes
254 * made after this point may be overwritten when the script is next run. 285 * made after this point may be overwritten when the script is next run.
@@ -261,11 +292,16 @@ void ERR_load_DSA_strings(void);
261#define DSA_F_D2I_DSA_SIG 110 292#define DSA_F_D2I_DSA_SIG 110
262#define DSA_F_DSAPARAMS_PRINT 100 293#define DSA_F_DSAPARAMS_PRINT 100
263#define DSA_F_DSAPARAMS_PRINT_FP 101 294#define DSA_F_DSAPARAMS_PRINT_FP 101
295#define DSA_F_DSA_BUILTIN_KEYGEN 119
296#define DSA_F_DSA_BUILTIN_PARAMGEN 118
264#define DSA_F_DSA_DO_SIGN 112 297#define DSA_F_DSA_DO_SIGN 112
265#define DSA_F_DSA_DO_VERIFY 113 298#define DSA_F_DSA_DO_VERIFY 113
299#define DSA_F_DSA_GENERATE_PARAMETERS 117
266#define DSA_F_DSA_NEW_METHOD 103 300#define DSA_F_DSA_NEW_METHOD 103
267#define DSA_F_DSA_PRINT 104 301#define DSA_F_DSA_PRINT 104
268#define DSA_F_DSA_PRINT_FP 105 302#define DSA_F_DSA_PRINT_FP 105
303#define DSA_F_DSA_SET_DEFAULT_METHOD 115
304#define DSA_F_DSA_SET_METHOD 116
269#define DSA_F_DSA_SIGN 106 305#define DSA_F_DSA_SIGN 106
270#define DSA_F_DSA_SIGN_SETUP 107 306#define DSA_F_DSA_SIGN_SETUP 107
271#define DSA_F_DSA_SIG_NEW 109 307#define DSA_F_DSA_SIG_NEW 109
@@ -276,8 +312,11 @@ void ERR_load_DSA_strings(void);
276/* Reason codes. */ 312/* Reason codes. */
277#define DSA_R_BAD_Q_VALUE 102 313#define DSA_R_BAD_Q_VALUE 102
278#define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100 314#define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100
315#define DSA_R_KEY_SIZE_TOO_SMALL 106
279#define DSA_R_MISSING_PARAMETERS 101 316#define DSA_R_MISSING_PARAMETERS 101
280#define DSA_R_MODULUS_TOO_LARGE 103 317#define DSA_R_MODULUS_TOO_LARGE 103
318#define DSA_R_NON_FIPS_METHOD 104
319#define DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE 105
281 320
282#ifdef __cplusplus 321#ifdef __cplusplus
283} 322}
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_asn1.c b/src/lib/libssl/src/crypto/dsa/dsa_asn1.c
index 23fce555aa..0645facb4b 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_asn1.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_asn1.c
@@ -1,5 +1,5 @@
1/* dsa_asn1.c */ 1/* dsa_asn1.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -61,6 +61,11 @@
61#include <openssl/dsa.h> 61#include <openssl/dsa.h>
62#include <openssl/asn1.h> 62#include <openssl/asn1.h>
63#include <openssl/asn1t.h> 63#include <openssl/asn1t.h>
64#include <openssl/bn.h>
65#ifdef OPENSSL_FIPS
66#include <openssl/fips.h>
67#endif
68
64 69
65/* Override the default new methods */ 70/* Override the default new methods */
66static int sig_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it) 71static int sig_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
@@ -83,7 +88,7 @@ ASN1_SEQUENCE_cb(DSA_SIG, sig_cb) = {
83 ASN1_SIMPLE(DSA_SIG, s, CBIGNUM) 88 ASN1_SIMPLE(DSA_SIG, s, CBIGNUM)
84} ASN1_SEQUENCE_END_cb(DSA_SIG, DSA_SIG) 89} ASN1_SEQUENCE_END_cb(DSA_SIG, DSA_SIG)
85 90
86IMPLEMENT_ASN1_FUNCTIONS_const(DSA_SIG) 91IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DSA_SIG,DSA_SIG,DSA_SIG)
87 92
88/* Override the default free and new methods */ 93/* Override the default free and new methods */
89static int dsa_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it) 94static int dsa_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
@@ -138,3 +143,76 @@ ASN1_CHOICE_cb(DSAPublicKey, dsa_cb) = {
138} ASN1_CHOICE_END_cb(DSA, DSAPublicKey, write_params) 143} ASN1_CHOICE_END_cb(DSA, DSAPublicKey, write_params)
139 144
140IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DSA, DSAPublicKey, DSAPublicKey) 145IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DSA, DSAPublicKey, DSAPublicKey)
146
147int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
148 unsigned int *siglen, DSA *dsa)
149 {
150 DSA_SIG *s;
151#ifdef OPENSSL_FIPS
152 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
153 {
154 DSAerr(DSA_F_DSA_SIGN, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
155 return 0;
156 }
157#endif
158 s=DSA_do_sign(dgst,dlen,dsa);
159 if (s == NULL)
160 {
161 *siglen=0;
162 return(0);
163 }
164 *siglen=i2d_DSA_SIG(s,&sig);
165 DSA_SIG_free(s);
166 return(1);
167 }
168
169int DSA_size(const DSA *r)
170 {
171 int ret,i;
172 ASN1_INTEGER bs;
173 unsigned char buf[4]; /* 4 bytes looks really small.
174 However, i2d_ASN1_INTEGER() will not look
175 beyond the first byte, as long as the second
176 parameter is NULL. */
177
178 i=BN_num_bits(r->q);
179 bs.length=(i+7)/8;
180 bs.data=buf;
181 bs.type=V_ASN1_INTEGER;
182 /* If the top bit is set the asn1 encoding is 1 larger. */
183 buf[0]=0xff;
184
185 i=i2d_ASN1_INTEGER(&bs,NULL);
186 i+=i; /* r and s */
187 ret=ASN1_object_size(1,i,V_ASN1_SEQUENCE);
188 return(ret);
189 }
190
191/* data has already been hashed (probably with SHA or SHA-1). */
192/* returns
193 * 1: correct signature
194 * 0: incorrect signature
195 * -1: error
196 */
197int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
198 const unsigned char *sigbuf, int siglen, DSA *dsa)
199 {
200 DSA_SIG *s;
201 int ret=-1;
202#ifdef OPENSSL_FIPS
203 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
204 {
205 DSAerr(DSA_F_DSA_VERIFY, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
206 return 0;
207 }
208#endif
209
210 s = DSA_SIG_new();
211 if (s == NULL) return(ret);
212 if (d2i_DSA_SIG(&s,&sigbuf,siglen) == NULL) goto err;
213 ret=DSA_do_verify(dgst,dgst_len,s,dsa);
214err:
215 DSA_SIG_free(s);
216 return(ret);
217 }
218
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_err.c b/src/lib/libssl/src/crypto/dsa/dsa_err.c
index 768711994b..872839af94 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_err.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_err.c
@@ -1,6 +1,6 @@
1/* crypto/dsa/dsa_err.c */ 1/* crypto/dsa/dsa_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -73,11 +73,16 @@ static ERR_STRING_DATA DSA_str_functs[]=
73{ERR_FUNC(DSA_F_D2I_DSA_SIG), "d2i_DSA_SIG"}, 73{ERR_FUNC(DSA_F_D2I_DSA_SIG), "d2i_DSA_SIG"},
74{ERR_FUNC(DSA_F_DSAPARAMS_PRINT), "DSAparams_print"}, 74{ERR_FUNC(DSA_F_DSAPARAMS_PRINT), "DSAparams_print"},
75{ERR_FUNC(DSA_F_DSAPARAMS_PRINT_FP), "DSAparams_print_fp"}, 75{ERR_FUNC(DSA_F_DSAPARAMS_PRINT_FP), "DSAparams_print_fp"},
76{ERR_FUNC(DSA_F_DSA_BUILTIN_KEYGEN), "DSA_BUILTIN_KEYGEN"},
77{ERR_FUNC(DSA_F_DSA_BUILTIN_PARAMGEN), "DSA_BUILTIN_PARAMGEN"},
76{ERR_FUNC(DSA_F_DSA_DO_SIGN), "DSA_do_sign"}, 78{ERR_FUNC(DSA_F_DSA_DO_SIGN), "DSA_do_sign"},
77{ERR_FUNC(DSA_F_DSA_DO_VERIFY), "DSA_do_verify"}, 79{ERR_FUNC(DSA_F_DSA_DO_VERIFY), "DSA_do_verify"},
80{ERR_FUNC(DSA_F_DSA_GENERATE_PARAMETERS), "DSA_generate_parameters"},
78{ERR_FUNC(DSA_F_DSA_NEW_METHOD), "DSA_new_method"}, 81{ERR_FUNC(DSA_F_DSA_NEW_METHOD), "DSA_new_method"},
79{ERR_FUNC(DSA_F_DSA_PRINT), "DSA_print"}, 82{ERR_FUNC(DSA_F_DSA_PRINT), "DSA_print"},
80{ERR_FUNC(DSA_F_DSA_PRINT_FP), "DSA_print_fp"}, 83{ERR_FUNC(DSA_F_DSA_PRINT_FP), "DSA_print_fp"},
84{ERR_FUNC(DSA_F_DSA_SET_DEFAULT_METHOD), "DSA_set_default_method"},
85{ERR_FUNC(DSA_F_DSA_SET_METHOD), "DSA_set_method"},
81{ERR_FUNC(DSA_F_DSA_SIGN), "DSA_sign"}, 86{ERR_FUNC(DSA_F_DSA_SIGN), "DSA_sign"},
82{ERR_FUNC(DSA_F_DSA_SIGN_SETUP), "DSA_sign_setup"}, 87{ERR_FUNC(DSA_F_DSA_SIGN_SETUP), "DSA_sign_setup"},
83{ERR_FUNC(DSA_F_DSA_SIG_NEW), "DSA_SIG_new"}, 88{ERR_FUNC(DSA_F_DSA_SIG_NEW), "DSA_SIG_new"},
@@ -91,8 +96,11 @@ static ERR_STRING_DATA DSA_str_reasons[]=
91 { 96 {
92{ERR_REASON(DSA_R_BAD_Q_VALUE) ,"bad q value"}, 97{ERR_REASON(DSA_R_BAD_Q_VALUE) ,"bad q value"},
93{ERR_REASON(DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),"data too large for key size"}, 98{ERR_REASON(DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),"data too large for key size"},
99{ERR_REASON(DSA_R_KEY_SIZE_TOO_SMALL) ,"key size too small"},
94{ERR_REASON(DSA_R_MISSING_PARAMETERS) ,"missing parameters"}, 100{ERR_REASON(DSA_R_MISSING_PARAMETERS) ,"missing parameters"},
95{ERR_REASON(DSA_R_MODULUS_TOO_LARGE) ,"modulus too large"}, 101{ERR_REASON(DSA_R_MODULUS_TOO_LARGE) ,"modulus too large"},
102{ERR_REASON(DSA_R_NON_FIPS_METHOD) ,"non fips method"},
103{ERR_REASON(DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE),"operation not allowed in fips mode"},
96{0,NULL} 104{0,NULL}
97 }; 105 };
98 106
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_gen.c b/src/lib/libssl/src/crypto/dsa/dsa_gen.c
index ca0b86a6cf..6f1728e3cf 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_gen.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_gen.c
@@ -82,6 +82,8 @@
82#include <openssl/rand.h> 82#include <openssl/rand.h>
83#include <openssl/sha.h> 83#include <openssl/sha.h>
84 84
85#ifndef OPENSSL_FIPS
86
85static int dsa_builtin_paramgen(DSA *ret, int bits, 87static int dsa_builtin_paramgen(DSA *ret, int bits,
86 unsigned char *seed_in, int seed_len, 88 unsigned char *seed_in, int seed_len,
87 int *counter_ret, unsigned long *h_ret, BN_GENCB *cb); 89 int *counter_ret, unsigned long *h_ret, BN_GENCB *cb);
@@ -320,3 +322,4 @@ err:
320 return ok; 322 return ok;
321 } 323 }
322#endif 324#endif
325#endif
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_key.c b/src/lib/libssl/src/crypto/dsa/dsa_key.c
index c4aa86bc6d..5e39124230 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_key.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_key.c
@@ -64,6 +64,8 @@
64#include <openssl/dsa.h> 64#include <openssl/dsa.h>
65#include <openssl/rand.h> 65#include <openssl/rand.h>
66 66
67#ifndef OPENSSL_FIPS
68
67static int dsa_builtin_keygen(DSA *dsa); 69static int dsa_builtin_keygen(DSA *dsa);
68 70
69int DSA_generate_key(DSA *dsa) 71int DSA_generate_key(DSA *dsa)
@@ -126,3 +128,5 @@ err:
126 return(ok); 128 return(ok);
127 } 129 }
128#endif 130#endif
131
132#endif
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_lib.c b/src/lib/libssl/src/crypto/dsa/dsa_lib.c
index e9b75902db..7ac9dc8c89 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_lib.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_lib.c
@@ -76,6 +76,14 @@ static const DSA_METHOD *default_DSA_method = NULL;
76 76
77void DSA_set_default_method(const DSA_METHOD *meth) 77void DSA_set_default_method(const DSA_METHOD *meth)
78 { 78 {
79#ifdef OPENSSL_FIPS
80 if (FIPS_mode() && !(meth->flags & DSA_FLAG_FIPS_METHOD))
81 {
82 DSAerr(DSA_F_DSA_SET_DEFAULT_METHOD, DSA_R_NON_FIPS_METHOD);
83 return;
84 }
85#endif
86
79 default_DSA_method = meth; 87 default_DSA_method = meth;
80 } 88 }
81 89
@@ -96,6 +104,13 @@ int DSA_set_method(DSA *dsa, const DSA_METHOD *meth)
96 /* NB: The caller is specifically setting a method, so it's not up to us 104 /* NB: The caller is specifically setting a method, so it's not up to us
97 * to deal with which ENGINE it comes from. */ 105 * to deal with which ENGINE it comes from. */
98 const DSA_METHOD *mtmp; 106 const DSA_METHOD *mtmp;
107#ifdef OPENSSL_FIPS
108 if (FIPS_mode() && !(meth->flags & DSA_FLAG_FIPS_METHOD))
109 {
110 DSAerr(DSA_F_DSA_SET_METHOD, DSA_R_NON_FIPS_METHOD);
111 return 0;
112 }
113#endif
99 mtmp = dsa->meth; 114 mtmp = dsa->meth;
100 if (mtmp->finish) mtmp->finish(dsa); 115 if (mtmp->finish) mtmp->finish(dsa);
101#ifndef OPENSSL_NO_ENGINE 116#ifndef OPENSSL_NO_ENGINE
@@ -147,6 +162,18 @@ DSA *DSA_new_method(ENGINE *engine)
147 } 162 }
148 } 163 }
149#endif 164#endif
165#ifdef OPENSSL_FIPS
166 if (FIPS_mode() && !(ret->meth->flags & DSA_FLAG_FIPS_METHOD))
167 {
168 DSAerr(DSA_F_DSA_NEW_METHOD, DSA_R_NON_FIPS_METHOD);
169#ifndef OPENSSL_NO_ENGINE
170 if (ret->engine)
171 ENGINE_finish(ret->engine);
172#endif
173 OPENSSL_free(ret);
174 return NULL;
175 }
176#endif
150 177
151 ret->pad=0; 178 ret->pad=0;
152 ret->version=0; 179 ret->version=0;
@@ -233,28 +260,6 @@ int DSA_up_ref(DSA *r)
233 return ((i > 1) ? 1 : 0); 260 return ((i > 1) ? 1 : 0);
234 } 261 }
235 262
236int DSA_size(const DSA *r)
237 {
238 int ret,i;
239 ASN1_INTEGER bs;
240 unsigned char buf[4]; /* 4 bytes looks really small.
241 However, i2d_ASN1_INTEGER() will not look
242 beyond the first byte, as long as the second
243 parameter is NULL. */
244
245 i=BN_num_bits(r->q);
246 bs.length=(i+7)/8;
247 bs.data=buf;
248 bs.type=V_ASN1_INTEGER;
249 /* If the top bit is set the asn1 encoding is 1 larger. */
250 buf[0]=0xff;
251
252 i=i2d_ASN1_INTEGER(&bs,NULL);
253 i+=i; /* r and s */
254 ret=ASN1_object_size(1,i,V_ASN1_SEQUENCE);
255 return(ret);
256 }
257
258int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 263int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
259 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) 264 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
260 { 265 {
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_ossl.c b/src/lib/libssl/src/crypto/dsa/dsa_ossl.c
index 75ff7cc4af..412cf1d88b 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_ossl.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_ossl.c
@@ -65,6 +65,8 @@
65#include <openssl/rand.h> 65#include <openssl/rand.h>
66#include <openssl/asn1.h> 66#include <openssl/asn1.h>
67 67
68#ifndef OPENSSL_FIPS
69
68static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); 70static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
69static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp); 71static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
70static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, 72static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
@@ -391,3 +393,4 @@ static int dsa_finish(DSA *dsa)
391 return(1); 393 return(1);
392} 394}
393 395
396#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..4cfbbe57a8 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_sign.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_sign.c
@@ -64,29 +64,32 @@
64#include <openssl/dsa.h> 64#include <openssl/dsa.h>
65#include <openssl/rand.h> 65#include <openssl/rand.h>
66#include <openssl/asn1.h> 66#include <openssl/asn1.h>
67#ifdef OPENSSL_FIPS
68#include <openssl/fips.h>
69#endif
67 70
68DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
69 {
70 return dsa->meth->dsa_do_sign(dgst, dlen, dsa);
71 }
72 71
73int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, 72DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
74 unsigned int *siglen, DSA *dsa)
75 { 73 {
76 DSA_SIG *s; 74#ifdef OPENSSL_FIPS
77 s=DSA_do_sign(dgst,dlen,dsa); 75 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
78 if (s == NULL)
79 { 76 {
80 *siglen=0; 77 DSAerr(DSA_F_DSA_DO_SIGN, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
81 return(0); 78 return NULL;
82 } 79 }
83 *siglen=i2d_DSA_SIG(s,&sig); 80#endif
84 DSA_SIG_free(s); 81 return dsa->meth->dsa_do_sign(dgst, dlen, dsa);
85 return(1);
86 } 82 }
87 83
88int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) 84int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
89 { 85 {
86#ifdef OPENSSL_FIPS
87 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
88 {
89 DSAerr(DSA_F_DSA_SIGN_SETUP, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
90 return 0;
91 }
92#endif
90 return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp); 93 return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp);
91 } 94 }
92 95
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_vrf.c b/src/lib/libssl/src/crypto/dsa/dsa_vrf.c
index c4aeddd056..c75e423048 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_vrf.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_vrf.c
@@ -64,31 +64,21 @@
64#include <openssl/dsa.h> 64#include <openssl/dsa.h>
65#include <openssl/rand.h> 65#include <openssl/rand.h>
66#include <openssl/asn1.h> 66#include <openssl/asn1.h>
67#ifdef OPENSSL_FIPS
68#include <openssl/fips.h>
69#endif
70
67#include <openssl/asn1_mac.h> 71#include <openssl/asn1_mac.h>
68 72
69int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, 73int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
70 DSA *dsa) 74 DSA *dsa)
71 { 75 {
76#ifdef OPENSSL_FIPS
77 if(FIPS_mode() && !(dsa->flags & DSA_FLAG_NON_FIPS_ALLOW))
78 {
79 DSAerr(DSA_F_DSA_DO_VERIFY, DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
80 return 0;
81 }
82#endif
72 return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa); 83 return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa);
73 } 84 }
74
75/* data has already been hashed (probably with SHA or SHA-1). */
76/* returns
77 * 1: correct signature
78 * 0: incorrect signature
79 * -1: error
80 */
81int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
82 const unsigned char *sigbuf, int siglen, DSA *dsa)
83 {
84 DSA_SIG *s;
85 int ret=-1;
86
87 s = DSA_SIG_new();
88 if (s == NULL) return(ret);
89 if (d2i_DSA_SIG(&s,&sigbuf,siglen) == NULL) goto err;
90 ret=DSA_do_verify(dgst,dgst_len,s,dsa);
91err:
92 DSA_SIG_free(s);
93 return(ret);
94 }
diff --git a/src/lib/libssl/src/crypto/ecdh/Makefile b/src/lib/libssl/src/crypto/ecdh/Makefile
index 65d8904ee8..7a7b618eeb 100644
--- a/src/lib/libssl/src/crypto/ecdh/Makefile
+++ b/src/lib/libssl/src/crypto/ecdh/Makefile
@@ -34,7 +34,7 @@ top:
34all: lib 34all: lib
35 35
36lib: $(LIBOBJ) 36lib: $(LIBOBJ)
37 $(AR) $(LIB) $(LIBOBJ) 37 $(ARX) $(LIB) $(LIBOBJ)
38 $(RANLIB) $(LIB) || echo Never mind. 38 $(RANLIB) $(LIB) || echo Never mind.
39 @touch lib 39 @touch lib
40 40
@@ -88,26 +88,27 @@ ech_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
88ech_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 88ech_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
89ech_key.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 89ech_key.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
90ech_key.o: ../../include/openssl/engine.h ../../include/openssl/evp.h 90ech_key.o: ../../include/openssl/engine.h ../../include/openssl/evp.h
91ech_key.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 91ech_key.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
92ech_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 92ech_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
93ech_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 93ech_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
94ech_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 94ech_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
95ech_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 95ech_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
96ech_key.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 96ech_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
97ech_key.o: ../../include/openssl/x509_vfy.h ech_key.c ech_locl.h 97ech_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
98ech_key.o: ech_key.c ech_locl.h
98ech_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 99ech_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
99ech_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 100ech_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
100ech_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 101ech_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
101ech_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 102ech_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
102ech_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h 103ech_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
103ech_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 104ech_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
104ech_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 105ech_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
105ech_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 106ech_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
106ech_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 107ech_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
107ech_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 108ech_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
108ech_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 109ech_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
109ech_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 110ech_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
110ech_lib.o: ech_lib.c ech_locl.h 111ech_lib.o: ../../include/openssl/x509_vfy.h ech_lib.c ech_locl.h
111ech_ossl.o: ../../e_os.h ../../include/openssl/asn1.h 112ech_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
112ech_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 113ech_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
113ech_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 114ech_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
diff --git a/src/lib/libssl/src/crypto/ecdsa/Makefile b/src/lib/libssl/src/crypto/ecdsa/Makefile
index 9b48d5641f..4865f3c8d6 100644
--- a/src/lib/libssl/src/crypto/ecdsa/Makefile
+++ b/src/lib/libssl/src/crypto/ecdsa/Makefile
@@ -34,7 +34,7 @@ top:
34all: lib 34all: lib
35 35
36lib: $(LIBOBJ) 36lib: $(LIBOBJ)
37 $(AR) $(LIB) $(LIBOBJ) 37 $(ARX) $(LIB) $(LIBOBJ)
38 $(RANLIB) $(LIB) || echo Never mind. 38 $(RANLIB) $(LIB) || echo Never mind.
39 @touch lib 39 @touch lib
40 40
@@ -97,13 +97,14 @@ ecs_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
97ecs_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 97ecs_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
98ecs_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 98ecs_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
99ecs_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h 99ecs_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
100ecs_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 100ecs_lib.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
101ecs_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 101ecs_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
102ecs_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 102ecs_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
103ecs_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 103ecs_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
104ecs_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 104ecs_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
105ecs_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 105ecs_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
106ecs_lib.o: ../../include/openssl/x509_vfy.h ecs_lib.c ecs_locl.h 106ecs_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
107ecs_lib.o: ecs_lib.c ecs_locl.h
107ecs_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 108ecs_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
108ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h 109ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
109ecs_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 110ecs_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
@@ -118,8 +119,9 @@ ecs_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
118ecs_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 119ecs_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
119ecs_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 120ecs_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
120ecs_sign.o: ../../include/openssl/engine.h ../../include/openssl/evp.h 121ecs_sign.o: ../../include/openssl/engine.h ../../include/openssl/evp.h
121ecs_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 122ecs_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
122ecs_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 123ecs_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
124ecs_sign.o: ../../include/openssl/opensslconf.h
123ecs_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 125ecs_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
124ecs_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 126ecs_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
125ecs_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 127ecs_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -130,10 +132,11 @@ ecs_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
130ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 132ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
131ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 133ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
132ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/evp.h 134ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/evp.h
133ecs_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 135ecs_vrf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
134ecs_vrf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 136ecs_vrf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
135ecs_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 137ecs_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
136ecs_vrf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 138ecs_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
137ecs_vrf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 139ecs_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
138ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 140ecs_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
139ecs_vrf.o: ../../include/openssl/x509_vfy.h ecs_locl.h ecs_vrf.c 141ecs_vrf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
142ecs_vrf.o: ecs_locl.h ecs_vrf.c
diff --git a/src/lib/libssl/src/crypto/engine/Makefile b/src/lib/libssl/src/crypto/engine/Makefile
index 47cc619b8a..0cc3722089 100644
--- a/src/lib/libssl/src/crypto/engine/Makefile
+++ b/src/lib/libssl/src/crypto/engine/Makefile
@@ -41,7 +41,7 @@ top:
41all: lib 41all: lib
42 42
43lib: $(LIBOBJ) 43lib: $(LIBOBJ)
44 $(AR) $(LIB) $(LIBOBJ) 44 $(ARX) $(LIB) $(LIBOBJ)
45 $(RANLIB) $(LIB) || echo Never mind. 45 $(RANLIB) $(LIB) || echo Never mind.
46 @touch lib 46 @touch lib
47 47
@@ -88,34 +88,35 @@ eng_all.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
88eng_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 88eng_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
89eng_all.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 89eng_all.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
90eng_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h 90eng_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
91eng_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 91eng_all.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
92eng_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 92eng_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
93eng_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 93eng_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
94eng_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 94eng_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
95eng_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 95eng_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
96eng_all.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 96eng_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
97eng_all.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_all.c eng_int.h 97eng_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
98eng_all.o: ../cryptlib.h eng_all.c eng_int.h
98eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h 99eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h
99eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 100eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
100eng_cnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h 101eng_cnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
101eng_cnf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 102eng_cnf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
102eng_cnf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 103eng_cnf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
103eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h 104eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h
104eng_cnf.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 105eng_cnf.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
105eng_cnf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 106eng_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
106eng_cnf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 107eng_cnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
107eng_cnf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 108eng_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
108eng_cnf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 109eng_cnf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
109eng_cnf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 110eng_cnf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
110eng_cnf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 111eng_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
111eng_cnf.o: ../cryptlib.h eng_cnf.c eng_int.h 112eng_cnf.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_cnf.c eng_int.h
112eng_cryptodev.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 113eng_cryptodev.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
113eng_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h 114eng_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
114eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 115eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
115eng_cryptodev.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 116eng_cryptodev.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
116eng_cryptodev.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 117eng_cryptodev.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
117eng_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 118eng_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
118eng_cryptodev.o: ../../include/openssl/obj_mac.h 119eng_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
119eng_cryptodev.o: ../../include/openssl/objects.h 120eng_cryptodev.o: ../../include/openssl/objects.h
120eng_cryptodev.o: ../../include/openssl/opensslconf.h 121eng_cryptodev.o: ../../include/openssl/opensslconf.h
121eng_cryptodev.o: ../../include/openssl/opensslv.h 122eng_cryptodev.o: ../../include/openssl/opensslv.h
@@ -130,8 +131,9 @@ eng_ctrl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
130eng_ctrl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 131eng_ctrl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
131eng_ctrl.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 132eng_ctrl.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
132eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/evp.h 133eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
133eng_ctrl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 134eng_ctrl.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
134eng_ctrl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 135eng_ctrl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
136eng_ctrl.o: ../../include/openssl/opensslconf.h
135eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 137eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
136eng_ctrl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 138eng_ctrl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
137eng_ctrl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 139eng_ctrl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -143,49 +145,50 @@ eng_dyn.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h
143eng_dyn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 145eng_dyn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
144eng_dyn.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 146eng_dyn.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
145eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h 147eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h
146eng_dyn.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 148eng_dyn.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
147eng_dyn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 149eng_dyn.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
148eng_dyn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 150eng_dyn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
149eng_dyn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 151eng_dyn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
150eng_dyn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 152eng_dyn.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
151eng_dyn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 153eng_dyn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
152eng_dyn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 154eng_dyn.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
153eng_dyn.o: ../cryptlib.h eng_dyn.c eng_int.h 155eng_dyn.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_dyn.c eng_int.h
154eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 156eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
155eng_err.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 157eng_err.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
156eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 158eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
157eng_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 159eng_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
158eng_err.o: ../../include/openssl/engine.h ../../include/openssl/err.h 160eng_err.o: ../../include/openssl/engine.h ../../include/openssl/err.h
159eng_err.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 161eng_err.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
160eng_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 162eng_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
161eng_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 163eng_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
162eng_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 164eng_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
163eng_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 165eng_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
164eng_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 166eng_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
165eng_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 167eng_err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
166eng_err.o: eng_err.c 168eng_err.o: ../../include/openssl/x509_vfy.h eng_err.c
167eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h 169eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h
168eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 170eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
169eng_fat.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h 171eng_fat.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
170eng_fat.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 172eng_fat.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
171eng_fat.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 173eng_fat.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
172eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h 174eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h
173eng_fat.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 175eng_fat.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
174eng_fat.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 176eng_fat.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
175eng_fat.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 177eng_fat.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
176eng_fat.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 178eng_fat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
177eng_fat.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 179eng_fat.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
178eng_fat.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 180eng_fat.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
179eng_fat.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 181eng_fat.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
180eng_fat.o: ../cryptlib.h eng_fat.c eng_int.h 182eng_fat.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_fat.c eng_int.h
181eng_init.o: ../../e_os.h ../../include/openssl/asn1.h 183eng_init.o: ../../e_os.h ../../include/openssl/asn1.h
182eng_init.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 184eng_init.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
183eng_init.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 185eng_init.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
184eng_init.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 186eng_init.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
185eng_init.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 187eng_init.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
186eng_init.o: ../../include/openssl/err.h ../../include/openssl/evp.h 188eng_init.o: ../../include/openssl/err.h ../../include/openssl/evp.h
187eng_init.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 189eng_init.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
188eng_init.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 190eng_init.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
191eng_init.o: ../../include/openssl/opensslconf.h
189eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 192eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
190eng_init.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 193eng_init.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
191eng_init.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 194eng_init.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -197,22 +200,23 @@ eng_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
197eng_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 200eng_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
198eng_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 201eng_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
199eng_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h 202eng_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
200eng_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 203eng_lib.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
201eng_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 204eng_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
202eng_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 205eng_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
203eng_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 206eng_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
204eng_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 207eng_lib.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
205eng_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 208eng_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
206eng_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 209eng_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
207eng_lib.o: ../cryptlib.h eng_int.h eng_lib.c 210eng_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h eng_lib.c
208eng_list.o: ../../e_os.h ../../include/openssl/asn1.h 211eng_list.o: ../../e_os.h ../../include/openssl/asn1.h
209eng_list.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 212eng_list.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
210eng_list.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 213eng_list.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
211eng_list.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 214eng_list.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
212eng_list.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 215eng_list.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
213eng_list.o: ../../include/openssl/err.h ../../include/openssl/evp.h 216eng_list.o: ../../include/openssl/err.h ../../include/openssl/evp.h
214eng_list.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 217eng_list.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
215eng_list.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 218eng_list.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
219eng_list.o: ../../include/openssl/opensslconf.h
216eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 220eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
217eng_list.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 221eng_list.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
218eng_list.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 222eng_list.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -225,8 +229,9 @@ eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
225eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 229eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
226eng_openssl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 230eng_openssl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
227eng_openssl.o: ../../include/openssl/engine.h ../../include/openssl/err.h 231eng_openssl.o: ../../include/openssl/engine.h ../../include/openssl/err.h
228eng_openssl.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 232eng_openssl.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
229eng_openssl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 233eng_openssl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
234eng_openssl.o: ../../include/openssl/objects.h
230eng_openssl.o: ../../include/openssl/opensslconf.h 235eng_openssl.o: ../../include/openssl/opensslconf.h
231eng_openssl.o: ../../include/openssl/opensslv.h 236eng_openssl.o: ../../include/openssl/opensslv.h
232eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h 237eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
@@ -242,8 +247,9 @@ eng_padlock.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h
242eng_padlock.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 247eng_padlock.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
243eng_padlock.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 248eng_padlock.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
244eng_padlock.o: ../../include/openssl/engine.h ../../include/openssl/err.h 249eng_padlock.o: ../../include/openssl/engine.h ../../include/openssl/err.h
245eng_padlock.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 250eng_padlock.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
246eng_padlock.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 251eng_padlock.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
252eng_padlock.o: ../../include/openssl/objects.h
247eng_padlock.o: ../../include/openssl/opensslconf.h 253eng_padlock.o: ../../include/openssl/opensslconf.h
248eng_padlock.o: ../../include/openssl/opensslv.h 254eng_padlock.o: ../../include/openssl/opensslv.h
249eng_padlock.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 255eng_padlock.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
@@ -257,8 +263,9 @@ eng_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
257eng_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 263eng_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
258eng_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 264eng_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
259eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h 265eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
260eng_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 266eng_pkey.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
261eng_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 267eng_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
268eng_pkey.o: ../../include/openssl/opensslconf.h
262eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 269eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
263eng_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 270eng_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
264eng_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 271eng_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -270,8 +277,8 @@ eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
270eng_table.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 277eng_table.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
271eng_table.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 278eng_table.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
272eng_table.o: ../../include/openssl/err.h ../../include/openssl/evp.h 279eng_table.o: ../../include/openssl/err.h ../../include/openssl/evp.h
273eng_table.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 280eng_table.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
274eng_table.o: ../../include/openssl/objects.h 281eng_table.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
275eng_table.o: ../../include/openssl/opensslconf.h 282eng_table.o: ../../include/openssl/opensslconf.h
276eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 283eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
277eng_table.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 284eng_table.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
@@ -285,8 +292,8 @@ tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
285tb_cipher.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 292tb_cipher.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
286tb_cipher.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 293tb_cipher.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
287tb_cipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h 294tb_cipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h
288tb_cipher.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 295tb_cipher.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
289tb_cipher.o: ../../include/openssl/objects.h 296tb_cipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
290tb_cipher.o: ../../include/openssl/opensslconf.h 297tb_cipher.o: ../../include/openssl/opensslconf.h
291tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 298tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
292tb_cipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 299tb_cipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
@@ -299,22 +306,22 @@ tb_dh.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
299tb_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 306tb_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
300tb_dh.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 307tb_dh.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
301tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h 308tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h
302tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 309tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
303tb_dh.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 310tb_dh.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
304tb_dh.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 311tb_dh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
305tb_dh.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 312tb_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
306tb_dh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 313tb_dh.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
307tb_dh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 314tb_dh.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
308tb_dh.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 315tb_dh.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
309tb_dh.o: ../cryptlib.h eng_int.h tb_dh.c 316tb_dh.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_dh.c
310tb_digest.o: ../../e_os.h ../../include/openssl/asn1.h 317tb_digest.o: ../../e_os.h ../../include/openssl/asn1.h
311tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 318tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
312tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 319tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
313tb_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 320tb_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
314tb_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 321tb_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
315tb_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h 322tb_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
316tb_digest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 323tb_digest.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
317tb_digest.o: ../../include/openssl/objects.h 324tb_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
318tb_digest.o: ../../include/openssl/opensslconf.h 325tb_digest.o: ../../include/openssl/opensslconf.h
319tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 326tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
320tb_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 327tb_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
@@ -327,35 +334,37 @@ tb_dsa.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
327tb_dsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 334tb_dsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
328tb_dsa.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 335tb_dsa.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
329tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h 336tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
330tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 337tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
331tb_dsa.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 338tb_dsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
332tb_dsa.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 339tb_dsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
333tb_dsa.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 340tb_dsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
334tb_dsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 341tb_dsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
335tb_dsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 342tb_dsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
336tb_dsa.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 343tb_dsa.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
337tb_dsa.o: ../cryptlib.h eng_int.h tb_dsa.c 344tb_dsa.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_dsa.c
338tb_ecdh.o: ../../e_os.h ../../include/openssl/asn1.h 345tb_ecdh.o: ../../e_os.h ../../include/openssl/asn1.h
339tb_ecdh.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 346tb_ecdh.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
340tb_ecdh.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 347tb_ecdh.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
341tb_ecdh.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 348tb_ecdh.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
342tb_ecdh.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 349tb_ecdh.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
343tb_ecdh.o: ../../include/openssl/err.h ../../include/openssl/evp.h 350tb_ecdh.o: ../../include/openssl/err.h ../../include/openssl/evp.h
344tb_ecdh.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 351tb_ecdh.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
345tb_ecdh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 352tb_ecdh.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
346tb_ecdh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 353tb_ecdh.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
347tb_ecdh.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 354tb_ecdh.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
348tb_ecdh.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 355tb_ecdh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
349tb_ecdh.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 356tb_ecdh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
350tb_ecdh.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_ecdh.c 357tb_ecdh.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
358tb_ecdh.o: ../cryptlib.h eng_int.h tb_ecdh.c
351tb_ecdsa.o: ../../e_os.h ../../include/openssl/asn1.h 359tb_ecdsa.o: ../../e_os.h ../../include/openssl/asn1.h
352tb_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 360tb_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
353tb_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 361tb_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
354tb_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 362tb_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
355tb_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 363tb_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
356tb_ecdsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h 364tb_ecdsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h
357tb_ecdsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 365tb_ecdsa.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
358tb_ecdsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 366tb_ecdsa.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
367tb_ecdsa.o: ../../include/openssl/opensslconf.h
359tb_ecdsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 368tb_ecdsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
360tb_ecdsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 369tb_ecdsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
361tb_ecdsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 370tb_ecdsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -367,34 +376,36 @@ tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
367tb_rand.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 376tb_rand.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
368tb_rand.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 377tb_rand.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
369tb_rand.o: ../../include/openssl/err.h ../../include/openssl/evp.h 378tb_rand.o: ../../include/openssl/err.h ../../include/openssl/evp.h
370tb_rand.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 379tb_rand.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
371tb_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 380tb_rand.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
372tb_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 381tb_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
373tb_rand.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 382tb_rand.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
374tb_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 383tb_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
375tb_rand.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 384tb_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
376tb_rand.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_rand.c 385tb_rand.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
386tb_rand.o: ../cryptlib.h eng_int.h tb_rand.c
377tb_rsa.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 387tb_rsa.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
378tb_rsa.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 388tb_rsa.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
379tb_rsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 389tb_rsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
380tb_rsa.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 390tb_rsa.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
381tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h 391tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
382tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 392tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
383tb_rsa.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 393tb_rsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
384tb_rsa.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 394tb_rsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
385tb_rsa.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 395tb_rsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
386tb_rsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 396tb_rsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
387tb_rsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 397tb_rsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
388tb_rsa.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 398tb_rsa.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
389tb_rsa.o: ../cryptlib.h eng_int.h tb_rsa.c 399tb_rsa.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h tb_rsa.c
390tb_store.o: ../../e_os.h ../../include/openssl/asn1.h 400tb_store.o: ../../e_os.h ../../include/openssl/asn1.h
391tb_store.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 401tb_store.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
392tb_store.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 402tb_store.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
393tb_store.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 403tb_store.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
394tb_store.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 404tb_store.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
395tb_store.o: ../../include/openssl/err.h ../../include/openssl/evp.h 405tb_store.o: ../../include/openssl/err.h ../../include/openssl/evp.h
396tb_store.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 406tb_store.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
397tb_store.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 407tb_store.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
408tb_store.o: ../../include/openssl/opensslconf.h
398tb_store.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 409tb_store.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
399tb_store.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 410tb_store.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
400tb_store.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 411tb_store.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
diff --git a/src/lib/libssl/src/crypto/engine/eng_cnf.c b/src/lib/libssl/src/crypto/engine/eng_cnf.c
index 8417ddaaef..08066cea59 100644
--- a/src/lib/libssl/src/crypto/engine/eng_cnf.c
+++ b/src/lib/libssl/src/crypto/engine/eng_cnf.c
@@ -1,5 +1,5 @@
1/* eng_cnf.c */ 1/* eng_cnf.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -98,7 +98,7 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
98 CONF_VALUE *ecmd; 98 CONF_VALUE *ecmd;
99 char *ctrlname, *ctrlvalue; 99 char *ctrlname, *ctrlvalue;
100 ENGINE *e = NULL; 100 ENGINE *e = NULL;
101 int soft = 0; 101 int soft = 0;
102 102
103 name = skip_dot(name); 103 name = skip_dot(name);
104#ifdef ENGINE_CONF_DEBUG 104#ifdef ENGINE_CONF_DEBUG
@@ -127,8 +127,8 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
127 /* Override engine name to use */ 127 /* Override engine name to use */
128 if (!strcmp(ctrlname, "engine_id")) 128 if (!strcmp(ctrlname, "engine_id"))
129 name = ctrlvalue; 129 name = ctrlvalue;
130 else if (!strcmp(ctrlname, "soft_load")) 130 else if (!strcmp(ctrlname, "soft_load"))
131 soft = 1; 131 soft = 1;
132 /* Load a dynamic ENGINE */ 132 /* Load a dynamic ENGINE */
133 else if (!strcmp(ctrlname, "dynamic_path")) 133 else if (!strcmp(ctrlname, "dynamic_path"))
134 { 134 {
@@ -151,11 +151,11 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
151 if (!e) 151 if (!e)
152 { 152 {
153 e = ENGINE_by_id(name); 153 e = ENGINE_by_id(name);
154 if (!e && soft) 154 if (!e && soft)
155 { 155 {
156 ERR_clear_error(); 156 ERR_clear_error();
157 return 1; 157 return 1;
158 } 158 }
159 if (!e) 159 if (!e)
160 return 0; 160 return 0;
161 } 161 }
diff --git a/src/lib/libssl/src/crypto/engine/enginetest.c b/src/lib/libssl/src/crypto/engine/enginetest.c
index cf82f490db..e3834611db 100644
--- a/src/lib/libssl/src/crypto/engine/enginetest.c
+++ b/src/lib/libssl/src/crypto/engine/enginetest.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <openssl/e_os2.h>
61 62
62#ifdef OPENSSL_NO_ENGINE 63#ifdef OPENSSL_NO_ENGINE
63int main(int argc, char *argv[]) 64int main(int argc, char *argv[])
@@ -66,7 +67,6 @@ int main(int argc, char *argv[])
66 return(0); 67 return(0);
67} 68}
68#else 69#else
69#include <openssl/e_os2.h>
70#include <openssl/buffer.h> 70#include <openssl/buffer.h>
71#include <openssl/crypto.h> 71#include <openssl/crypto.h>
72#include <openssl/engine.h> 72#include <openssl/engine.h>
diff --git a/src/lib/libssl/src/crypto/err/err.c b/src/lib/libssl/src/crypto/err/err.c
index 7952e70ab0..292404a2fb 100644
--- a/src/lib/libssl/src/crypto/err/err.c
+++ b/src/lib/libssl/src/crypto/err/err.c
@@ -119,480 +119,9 @@
119#include <openssl/bio.h> 119#include <openssl/bio.h>
120#include <openssl/err.h> 120#include <openssl/err.h>
121 121
122static void err_load_strings(int lib, ERR_STRING_DATA *str); 122static unsigned long get_error_values(int inc,int top,
123 123 const char **file,int *line,
124static void ERR_STATE_free(ERR_STATE *s); 124 const char **data,int *flags);
125#ifndef OPENSSL_NO_ERR
126static ERR_STRING_DATA ERR_str_libraries[]=
127 {
128{ERR_PACK(ERR_LIB_NONE,0,0) ,"unknown library"},
129{ERR_PACK(ERR_LIB_SYS,0,0) ,"system library"},
130{ERR_PACK(ERR_LIB_BN,0,0) ,"bignum routines"},
131{ERR_PACK(ERR_LIB_RSA,0,0) ,"rsa routines"},
132{ERR_PACK(ERR_LIB_DH,0,0) ,"Diffie-Hellman routines"},
133{ERR_PACK(ERR_LIB_EVP,0,0) ,"digital envelope routines"},
134{ERR_PACK(ERR_LIB_BUF,0,0) ,"memory buffer routines"},
135{ERR_PACK(ERR_LIB_OBJ,0,0) ,"object identifier routines"},
136{ERR_PACK(ERR_LIB_PEM,0,0) ,"PEM routines"},
137{ERR_PACK(ERR_LIB_DSA,0,0) ,"dsa routines"},
138{ERR_PACK(ERR_LIB_X509,0,0) ,"x509 certificate routines"},
139{ERR_PACK(ERR_LIB_ASN1,0,0) ,"asn1 encoding routines"},
140{ERR_PACK(ERR_LIB_CONF,0,0) ,"configuration file routines"},
141{ERR_PACK(ERR_LIB_CRYPTO,0,0) ,"common libcrypto routines"},
142{ERR_PACK(ERR_LIB_EC,0,0) ,"elliptic curve routines"},
143{ERR_PACK(ERR_LIB_SSL,0,0) ,"SSL routines"},
144{ERR_PACK(ERR_LIB_BIO,0,0) ,"BIO routines"},
145{ERR_PACK(ERR_LIB_PKCS7,0,0) ,"PKCS7 routines"},
146{ERR_PACK(ERR_LIB_X509V3,0,0) ,"X509 V3 routines"},
147{ERR_PACK(ERR_LIB_PKCS12,0,0) ,"PKCS12 routines"},
148{ERR_PACK(ERR_LIB_RAND,0,0) ,"random number generator"},
149{ERR_PACK(ERR_LIB_DSO,0,0) ,"DSO support routines"},
150{ERR_PACK(ERR_LIB_ENGINE,0,0) ,"engine routines"},
151{ERR_PACK(ERR_LIB_OCSP,0,0) ,"OCSP routines"},
152{ERR_PACK(ERR_LIB_FIPS,0,0) ,"FIPS routines"},
153{ERR_PACK(ERR_LIB_CMS,0,0) ,"CMS routines"},
154{0,NULL},
155 };
156
157static ERR_STRING_DATA ERR_str_functs[]=
158 {
159 {ERR_PACK(0,SYS_F_FOPEN,0), "fopen"},
160 {ERR_PACK(0,SYS_F_CONNECT,0), "connect"},
161 {ERR_PACK(0,SYS_F_GETSERVBYNAME,0), "getservbyname"},
162 {ERR_PACK(0,SYS_F_SOCKET,0), "socket"},
163 {ERR_PACK(0,SYS_F_IOCTLSOCKET,0), "ioctlsocket"},
164 {ERR_PACK(0,SYS_F_BIND,0), "bind"},
165 {ERR_PACK(0,SYS_F_LISTEN,0), "listen"},
166 {ERR_PACK(0,SYS_F_ACCEPT,0), "accept"},
167#ifdef OPENSSL_SYS_WINDOWS
168 {ERR_PACK(0,SYS_F_WSASTARTUP,0), "WSAstartup"},
169#endif
170 {ERR_PACK(0,SYS_F_OPENDIR,0), "opendir"},
171 {ERR_PACK(0,SYS_F_FREAD,0), "fread"},
172 {0,NULL},
173 };
174
175static ERR_STRING_DATA ERR_str_reasons[]=
176 {
177{ERR_R_SYS_LIB ,"system lib"},
178{ERR_R_BN_LIB ,"BN lib"},
179{ERR_R_RSA_LIB ,"RSA lib"},
180{ERR_R_DH_LIB ,"DH lib"},
181{ERR_R_EVP_LIB ,"EVP lib"},
182{ERR_R_BUF_LIB ,"BUF lib"},
183{ERR_R_OBJ_LIB ,"OBJ lib"},
184{ERR_R_PEM_LIB ,"PEM lib"},
185{ERR_R_DSA_LIB ,"DSA lib"},
186{ERR_R_X509_LIB ,"X509 lib"},
187{ERR_R_ASN1_LIB ,"ASN1 lib"},
188{ERR_R_CONF_LIB ,"CONF lib"},
189{ERR_R_CRYPTO_LIB ,"CRYPTO lib"},
190{ERR_R_EC_LIB ,"EC lib"},
191{ERR_R_SSL_LIB ,"SSL lib"},
192{ERR_R_BIO_LIB ,"BIO lib"},
193{ERR_R_PKCS7_LIB ,"PKCS7 lib"},
194{ERR_R_X509V3_LIB ,"X509V3 lib"},
195{ERR_R_PKCS12_LIB ,"PKCS12 lib"},
196{ERR_R_RAND_LIB ,"RAND lib"},
197{ERR_R_DSO_LIB ,"DSO lib"},
198{ERR_R_ENGINE_LIB ,"ENGINE lib"},
199{ERR_R_OCSP_LIB ,"OCSP lib"},
200
201{ERR_R_NESTED_ASN1_ERROR ,"nested asn1 error"},
202{ERR_R_BAD_ASN1_OBJECT_HEADER ,"bad asn1 object header"},
203{ERR_R_BAD_GET_ASN1_OBJECT_CALL ,"bad get asn1 object call"},
204{ERR_R_EXPECTING_AN_ASN1_SEQUENCE ,"expecting an asn1 sequence"},
205{ERR_R_ASN1_LENGTH_MISMATCH ,"asn1 length mismatch"},
206{ERR_R_MISSING_ASN1_EOS ,"missing asn1 eos"},
207
208{ERR_R_FATAL ,"fatal"},
209{ERR_R_MALLOC_FAILURE ,"malloc failure"},
210{ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED ,"called a function you should not call"},
211{ERR_R_PASSED_NULL_PARAMETER ,"passed a null parameter"},
212{ERR_R_INTERNAL_ERROR ,"internal error"},
213{ERR_R_DISABLED ,"called a function that was disabled at compile-time"},
214
215{0,NULL},
216 };
217#endif
218
219
220/* Define the predeclared (but externally opaque) "ERR_FNS" type */
221struct st_ERR_FNS
222 {
223 /* Works on the "error_hash" string table */
224 LHASH *(*cb_err_get)(int create);
225 void (*cb_err_del)(void);
226 ERR_STRING_DATA *(*cb_err_get_item)(const ERR_STRING_DATA *);
227 ERR_STRING_DATA *(*cb_err_set_item)(ERR_STRING_DATA *);
228 ERR_STRING_DATA *(*cb_err_del_item)(ERR_STRING_DATA *);
229 /* Works on the "thread_hash" error-state table */
230 LHASH *(*cb_thread_get)(int create);
231 void (*cb_thread_release)(LHASH **hash);
232 ERR_STATE *(*cb_thread_get_item)(const ERR_STATE *);
233 ERR_STATE *(*cb_thread_set_item)(ERR_STATE *);
234 void (*cb_thread_del_item)(const ERR_STATE *);
235 /* Returns the next available error "library" numbers */
236 int (*cb_get_next_lib)(void);
237 };
238
239/* Predeclarations of the "err_defaults" functions */
240static LHASH *int_err_get(int create);
241static void int_err_del(void);
242static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *);
243static ERR_STRING_DATA *int_err_set_item(ERR_STRING_DATA *);
244static ERR_STRING_DATA *int_err_del_item(ERR_STRING_DATA *);
245static LHASH *int_thread_get(int create);
246static void int_thread_release(LHASH **hash);
247static ERR_STATE *int_thread_get_item(const ERR_STATE *);
248static ERR_STATE *int_thread_set_item(ERR_STATE *);
249static void int_thread_del_item(const ERR_STATE *);
250static int int_err_get_next_lib(void);
251/* The static ERR_FNS table using these defaults functions */
252static const ERR_FNS err_defaults =
253 {
254 int_err_get,
255 int_err_del,
256 int_err_get_item,
257 int_err_set_item,
258 int_err_del_item,
259 int_thread_get,
260 int_thread_release,
261 int_thread_get_item,
262 int_thread_set_item,
263 int_thread_del_item,
264 int_err_get_next_lib
265 };
266
267/* The replacable table of ERR_FNS functions we use at run-time */
268static const ERR_FNS *err_fns = NULL;
269
270/* Eg. rather than using "err_get()", use "ERRFN(err_get)()". */
271#define ERRFN(a) err_fns->cb_##a
272
273/* The internal state used by "err_defaults" - as such, the setting, reading,
274 * creating, and deleting of this data should only be permitted via the
275 * "err_defaults" functions. This way, a linked module can completely defer all
276 * ERR state operation (together with requisite locking) to the implementations
277 * and state in the loading application. */
278static LHASH *int_error_hash = NULL;
279static LHASH *int_thread_hash = NULL;
280static int int_thread_hash_references = 0;
281static int int_err_library_number= ERR_LIB_USER;
282
283/* Internal function that checks whether "err_fns" is set and if not, sets it to
284 * the defaults. */
285static void err_fns_check(void)
286 {
287 if (err_fns) return;
288
289 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
290 if (!err_fns)
291 err_fns = &err_defaults;
292 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
293 }
294
295/* API functions to get or set the underlying ERR functions. */
296
297const ERR_FNS *ERR_get_implementation(void)
298 {
299 err_fns_check();
300 return err_fns;
301 }
302
303int ERR_set_implementation(const ERR_FNS *fns)
304 {
305 int ret = 0;
306
307 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
308 /* It's too late if 'err_fns' is non-NULL. BTW: not much point setting
309 * an error is there?! */
310 if (!err_fns)
311 {
312 err_fns = fns;
313 ret = 1;
314 }
315 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
316 return ret;
317 }
318
319/* These are the callbacks provided to "lh_new()" when creating the LHASH tables
320 * internal to the "err_defaults" implementation. */
321
322/* static unsigned long err_hash(ERR_STRING_DATA *a); */
323static unsigned long err_hash(const void *a_void);
324/* static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b); */
325static int err_cmp(const void *a_void, const void *b_void);
326/* static unsigned long pid_hash(ERR_STATE *pid); */
327static unsigned long pid_hash(const void *pid_void);
328/* static int pid_cmp(ERR_STATE *a,ERR_STATE *pid); */
329static int pid_cmp(const void *a_void,const void *pid_void);
330static unsigned long get_error_values(int inc,int top,const char **file,int *line,
331 const char **data,int *flags);
332
333/* The internal functions used in the "err_defaults" implementation */
334
335static LHASH *int_err_get(int create)
336 {
337 LHASH *ret = NULL;
338
339 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
340 if (!int_error_hash && create)
341 {
342 CRYPTO_push_info("int_err_get (err.c)");
343 int_error_hash = lh_new(err_hash, err_cmp);
344 CRYPTO_pop_info();
345 }
346 if (int_error_hash)
347 ret = int_error_hash;
348 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
349
350 return ret;
351 }
352
353static void int_err_del(void)
354 {
355 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
356 if (int_error_hash)
357 {
358 lh_free(int_error_hash);
359 int_error_hash = NULL;
360 }
361 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
362 }
363
364static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *d)
365 {
366 ERR_STRING_DATA *p;
367 LHASH *hash;
368
369 err_fns_check();
370 hash = ERRFN(err_get)(0);
371 if (!hash)
372 return NULL;
373
374 CRYPTO_r_lock(CRYPTO_LOCK_ERR);
375 p = (ERR_STRING_DATA *)lh_retrieve(hash, d);
376 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
377
378 return p;
379 }
380
381static ERR_STRING_DATA *int_err_set_item(ERR_STRING_DATA *d)
382 {
383 ERR_STRING_DATA *p;
384 LHASH *hash;
385
386 err_fns_check();
387 hash = ERRFN(err_get)(1);
388 if (!hash)
389 return NULL;
390
391 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
392 p = (ERR_STRING_DATA *)lh_insert(hash, d);
393 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
394
395 return p;
396 }
397
398static ERR_STRING_DATA *int_err_del_item(ERR_STRING_DATA *d)
399 {
400 ERR_STRING_DATA *p;
401 LHASH *hash;
402
403 err_fns_check();
404 hash = ERRFN(err_get)(0);
405 if (!hash)
406 return NULL;
407
408 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
409 p = (ERR_STRING_DATA *)lh_delete(hash, d);
410 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
411
412 return p;
413 }
414
415static LHASH *int_thread_get(int create)
416 {
417 LHASH *ret = NULL;
418
419 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
420 if (!int_thread_hash && create)
421 {
422 CRYPTO_push_info("int_thread_get (err.c)");
423 int_thread_hash = lh_new(pid_hash, pid_cmp);
424 CRYPTO_pop_info();
425 }
426 if (int_thread_hash)
427 {
428 int_thread_hash_references++;
429 ret = int_thread_hash;
430 }
431 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
432 return ret;
433 }
434
435static void int_thread_release(LHASH **hash)
436 {
437 int i;
438
439 if (hash == NULL || *hash == NULL)
440 return;
441
442 i = CRYPTO_add(&int_thread_hash_references, -1, CRYPTO_LOCK_ERR);
443
444#ifdef REF_PRINT
445 fprintf(stderr,"%4d:%s\n",int_thread_hash_references,"ERR");
446#endif
447 if (i > 0) return;
448#ifdef REF_CHECK
449 if (i < 0)
450 {
451 fprintf(stderr,"int_thread_release, bad reference count\n");
452 abort(); /* ok */
453 }
454#endif
455 *hash = NULL;
456 }
457
458static ERR_STATE *int_thread_get_item(const ERR_STATE *d)
459 {
460 ERR_STATE *p;
461 LHASH *hash;
462
463 err_fns_check();
464 hash = ERRFN(thread_get)(0);
465 if (!hash)
466 return NULL;
467
468 CRYPTO_r_lock(CRYPTO_LOCK_ERR);
469 p = (ERR_STATE *)lh_retrieve(hash, d);
470 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
471
472 ERRFN(thread_release)(&hash);
473 return p;
474 }
475
476static ERR_STATE *int_thread_set_item(ERR_STATE *d)
477 {
478 ERR_STATE *p;
479 LHASH *hash;
480
481 err_fns_check();
482 hash = ERRFN(thread_get)(1);
483 if (!hash)
484 return NULL;
485
486 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
487 p = (ERR_STATE *)lh_insert(hash, d);
488 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
489
490 ERRFN(thread_release)(&hash);
491 return p;
492 }
493
494static void int_thread_del_item(const ERR_STATE *d)
495 {
496 ERR_STATE *p;
497 LHASH *hash;
498
499 err_fns_check();
500 hash = ERRFN(thread_get)(0);
501 if (!hash)
502 return;
503
504 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
505 p = (ERR_STATE *)lh_delete(hash, d);
506 /* make sure we don't leak memory */
507 if (int_thread_hash_references == 1
508 && int_thread_hash && (lh_num_items(int_thread_hash) == 0))
509 {
510 lh_free(int_thread_hash);
511 int_thread_hash = NULL;
512 }
513 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
514
515 ERRFN(thread_release)(&hash);
516 if (p)
517 ERR_STATE_free(p);
518 }
519
520static int int_err_get_next_lib(void)
521 {
522 int ret;
523
524 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
525 ret = int_err_library_number++;
526 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
527
528 return ret;
529 }
530
531
532#ifndef OPENSSL_NO_ERR
533#define NUM_SYS_STR_REASONS 127
534#define LEN_SYS_STR_REASON 32
535
536static ERR_STRING_DATA SYS_str_reasons[NUM_SYS_STR_REASONS + 1];
537/* SYS_str_reasons is filled with copies of strerror() results at
538 * initialization.
539 * 'errno' values up to 127 should cover all usual errors,
540 * others will be displayed numerically by ERR_error_string.
541 * It is crucial that we have something for each reason code
542 * that occurs in ERR_str_reasons, or bogus reason strings
543 * will be returned for SYSerr(), which always gets an errno
544 * value and never one of those 'standard' reason codes. */
545
546static void build_SYS_str_reasons(void)
547 {
548 /* OPENSSL_malloc cannot be used here, use static storage instead */
549 static char strerror_tab[NUM_SYS_STR_REASONS][LEN_SYS_STR_REASON];
550 int i;
551 static int init = 1;
552
553 CRYPTO_r_lock(CRYPTO_LOCK_ERR);
554 if (!init)
555 {
556 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
557 return;
558 }
559
560 CRYPTO_r_unlock(CRYPTO_LOCK_ERR);
561 CRYPTO_w_lock(CRYPTO_LOCK_ERR);
562 if (!init)
563 {
564 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
565 return;
566 }
567
568 for (i = 1; i <= NUM_SYS_STR_REASONS; i++)
569 {
570 ERR_STRING_DATA *str = &SYS_str_reasons[i - 1];
571
572 str->error = (unsigned long)i;
573 if (str->string == NULL)
574 {
575 char (*dest)[LEN_SYS_STR_REASON] = &(strerror_tab[i - 1]);
576 char *src = strerror(i);
577 if (src != NULL)
578 {
579 strncpy(*dest, src, sizeof *dest);
580 (*dest)[sizeof *dest - 1] = '\0';
581 str->string = *dest;
582 }
583 }
584 if (str->string == NULL)
585 str->string = "unknown";
586 }
587
588 /* Now we still have SYS_str_reasons[NUM_SYS_STR_REASONS] = {0, NULL},
589 * as required by ERR_load_strings. */
590
591 init = 0;
592
593 CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
594 }
595#endif
596 125
597#define err_clear_data(p,i) \ 126#define err_clear_data(p,i) \
598 do { \ 127 do { \
@@ -614,68 +143,6 @@ static void build_SYS_str_reasons(void)
614 (p)->err_line[i]= -1; \ 143 (p)->err_line[i]= -1; \
615 } while(0) 144 } while(0)
616 145
617static void ERR_STATE_free(ERR_STATE *s)
618 {
619 int i;
620
621 if (s == NULL)
622 return;
623
624 for (i=0; i<ERR_NUM_ERRORS; i++)
625 {
626 err_clear_data(s,i);
627 }
628 OPENSSL_free(s);
629 }
630
631void ERR_load_ERR_strings(void)
632 {
633 err_fns_check();
634#ifndef OPENSSL_NO_ERR
635 err_load_strings(0,ERR_str_libraries);
636 err_load_strings(0,ERR_str_reasons);
637 err_load_strings(ERR_LIB_SYS,ERR_str_functs);
638 build_SYS_str_reasons();
639 err_load_strings(ERR_LIB_SYS,SYS_str_reasons);
640#endif
641 }
642
643static void err_load_strings(int lib, ERR_STRING_DATA *str)
644 {
645 while (str->error)
646 {
647 if (lib)
648 str->error|=ERR_PACK(lib,0,0);
649 ERRFN(err_set_item)(str);
650 str++;
651 }
652 }
653
654void ERR_load_strings(int lib, ERR_STRING_DATA *str)
655 {
656 ERR_load_ERR_strings();
657 err_load_strings(lib, str);
658 }
659
660void ERR_unload_strings(int lib, ERR_STRING_DATA *str)
661 {
662 while (str->error)
663 {
664 if (lib)
665 str->error|=ERR_PACK(lib,0,0);
666 ERRFN(err_del_item)(str);
667 str++;
668 }
669 }
670
671void ERR_free_strings(void)
672 {
673 err_fns_check();
674 ERRFN(err_del)();
675 }
676
677/********************************************************/
678
679void ERR_put_error(int lib, int func, int reason, const char *file, 146void ERR_put_error(int lib, int func, int reason, const char *file,
680 int line) 147 int line)
681 { 148 {
@@ -830,218 +297,6 @@ static unsigned long get_error_values(int inc, int top, const char **file, int *
830 return ret; 297 return ret;
831 } 298 }
832 299
833void ERR_error_string_n(unsigned long e, char *buf, size_t len)
834 {
835 char lsbuf[64], fsbuf[64], rsbuf[64];
836 const char *ls,*fs,*rs;
837 unsigned long l,f,r;
838
839 l=ERR_GET_LIB(e);
840 f=ERR_GET_FUNC(e);
841 r=ERR_GET_REASON(e);
842
843 ls=ERR_lib_error_string(e);
844 fs=ERR_func_error_string(e);
845 rs=ERR_reason_error_string(e);
846
847 if (ls == NULL)
848 BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
849 if (fs == NULL)
850 BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
851 if (rs == NULL)
852 BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
853
854 BIO_snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf,
855 fs?fs:fsbuf, rs?rs:rsbuf);
856 if (strlen(buf) == len-1)
857 {
858 /* output may be truncated; make sure we always have 5
859 * colon-separated fields, i.e. 4 colons ... */
860#define NUM_COLONS 4
861 if (len > NUM_COLONS) /* ... if possible */
862 {
863 int i;
864 char *s = buf;
865
866 for (i = 0; i < NUM_COLONS; i++)
867 {
868 char *colon = strchr(s, ':');
869 if (colon == NULL || colon > &buf[len-1] - NUM_COLONS + i)
870 {
871 /* set colon no. i at last possible position
872 * (buf[len-1] is the terminating 0)*/
873 colon = &buf[len-1] - NUM_COLONS + i;
874 *colon = ':';
875 }
876 s = colon + 1;
877 }
878 }
879 }
880 }
881
882/* BAD for multi-threading: uses a local buffer if ret == NULL */
883/* ERR_error_string_n should be used instead for ret != NULL
884 * as ERR_error_string cannot know how large the buffer is */
885char *ERR_error_string(unsigned long e, char *ret)
886 {
887 static char buf[256];
888
889 if (ret == NULL) ret=buf;
890 ERR_error_string_n(e, ret, 256);
891
892 return ret;
893 }
894
895LHASH *ERR_get_string_table(void)
896 {
897 err_fns_check();
898 return ERRFN(err_get)(0);
899 }
900
901LHASH *ERR_get_err_state_table(void)
902 {
903 err_fns_check();
904 return ERRFN(thread_get)(0);
905 }
906
907void ERR_release_err_state_table(LHASH **hash)
908 {
909 err_fns_check();
910 ERRFN(thread_release)(hash);
911 }
912
913const char *ERR_lib_error_string(unsigned long e)
914 {
915 ERR_STRING_DATA d,*p;
916 unsigned long l;
917
918 err_fns_check();
919 l=ERR_GET_LIB(e);
920 d.error=ERR_PACK(l,0,0);
921 p=ERRFN(err_get_item)(&d);
922 return((p == NULL)?NULL:p->string);
923 }
924
925const char *ERR_func_error_string(unsigned long e)
926 {
927 ERR_STRING_DATA d,*p;
928 unsigned long l,f;
929
930 err_fns_check();
931 l=ERR_GET_LIB(e);
932 f=ERR_GET_FUNC(e);
933 d.error=ERR_PACK(l,f,0);
934 p=ERRFN(err_get_item)(&d);
935 return((p == NULL)?NULL:p->string);
936 }
937
938const char *ERR_reason_error_string(unsigned long e)
939 {
940 ERR_STRING_DATA d,*p=NULL;
941 unsigned long l,r;
942
943 err_fns_check();
944 l=ERR_GET_LIB(e);
945 r=ERR_GET_REASON(e);
946 d.error=ERR_PACK(l,0,r);
947 p=ERRFN(err_get_item)(&d);
948 if (!p)
949 {
950 d.error=ERR_PACK(0,0,r);
951 p=ERRFN(err_get_item)(&d);
952 }
953 return((p == NULL)?NULL:p->string);
954 }
955
956/* static unsigned long err_hash(ERR_STRING_DATA *a) */
957static unsigned long err_hash(const void *a_void)
958 {
959 unsigned long ret,l;
960
961 l=((const ERR_STRING_DATA *)a_void)->error;
962 ret=l^ERR_GET_LIB(l)^ERR_GET_FUNC(l);
963 return(ret^ret%19*13);
964 }
965
966/* static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b) */
967static int err_cmp(const void *a_void, const void *b_void)
968 {
969 return((int)(((const ERR_STRING_DATA *)a_void)->error -
970 ((const ERR_STRING_DATA *)b_void)->error));
971 }
972
973/* static unsigned long pid_hash(ERR_STATE *a) */
974static unsigned long pid_hash(const void *a_void)
975 {
976 return(((const ERR_STATE *)a_void)->pid*13);
977 }
978
979/* static int pid_cmp(ERR_STATE *a, ERR_STATE *b) */
980static int pid_cmp(const void *a_void, const void *b_void)
981 {
982 return((int)((long)((const ERR_STATE *)a_void)->pid -
983 (long)((const ERR_STATE *)b_void)->pid));
984 }
985
986void ERR_remove_state(unsigned long pid)
987 {
988 ERR_STATE tmp;
989
990 err_fns_check();
991 if (pid == 0)
992 pid=(unsigned long)CRYPTO_thread_id();
993 tmp.pid=pid;
994 /* thread_del_item automatically destroys the LHASH if the number of
995 * items reaches zero. */
996 ERRFN(thread_del_item)(&tmp);
997 }
998
999ERR_STATE *ERR_get_state(void)
1000 {
1001 static ERR_STATE fallback;
1002 ERR_STATE *ret,tmp,*tmpp=NULL;
1003 int i;
1004 unsigned long pid;
1005
1006 err_fns_check();
1007 pid=(unsigned long)CRYPTO_thread_id();
1008 tmp.pid=pid;
1009 ret=ERRFN(thread_get_item)(&tmp);
1010
1011 /* ret == the error state, if NULL, make a new one */
1012 if (ret == NULL)
1013 {
1014 ret=(ERR_STATE *)OPENSSL_malloc(sizeof(ERR_STATE));
1015 if (ret == NULL) return(&fallback);
1016 ret->pid=pid;
1017 ret->top=0;
1018 ret->bottom=0;
1019 for (i=0; i<ERR_NUM_ERRORS; i++)
1020 {
1021 ret->err_data[i]=NULL;
1022 ret->err_data_flags[i]=0;
1023 }
1024 tmpp = ERRFN(thread_set_item)(ret);
1025 /* To check if insertion failed, do a get. */
1026 if (ERRFN(thread_get_item)(ret) != ret)
1027 {
1028 ERR_STATE_free(ret); /* could not insert it */
1029 return(&fallback);
1030 }
1031 /* If a race occured in this function and we came second, tmpp
1032 * is the first one that we just replaced. */
1033 if (tmpp)
1034 ERR_STATE_free(tmpp);
1035 }
1036 return ret;
1037 }
1038
1039int ERR_get_next_error_library(void)
1040 {
1041 err_fns_check();
1042 return ERRFN(get_next_lib)();
1043 }
1044
1045void ERR_set_error_data(char *data, int flags) 300void ERR_set_error_data(char *data, int flags)
1046 { 301 {
1047 ERR_STATE *es; 302 ERR_STATE *es;
@@ -1128,3 +383,34 @@ int ERR_pop_to_mark(void)
1128 es->err_flags[es->top]&=~ERR_FLAG_MARK; 383 es->err_flags[es->top]&=~ERR_FLAG_MARK;
1129 return 1; 384 return 1;
1130 } 385 }
386
387#ifdef OPENSSL_FIPS
388
389static ERR_STATE *fget_state(void)
390 {
391 static ERR_STATE fstate;
392 return &fstate;
393 }
394
395ERR_STATE *(*get_state_func)(void) = fget_state;
396void (*remove_state_func)(unsigned long pid);
397
398ERR_STATE *ERR_get_state(void)
399 {
400 return get_state_func();
401 }
402
403void int_ERR_set_state_func(ERR_STATE *(*get_func)(void),
404 void (*remove_func)(unsigned long pid))
405 {
406 get_state_func = get_func;
407 remove_state_func = remove_func;
408 }
409
410void ERR_remove_state(unsigned long pid)
411 {
412 if (remove_state_func)
413 remove_state_func(pid);
414 }
415
416#endif
diff --git a/src/lib/libssl/src/crypto/err/err.h b/src/lib/libssl/src/crypto/err/err.h
index 8d9f0da172..dcac415231 100644
--- a/src/lib/libssl/src/crypto/err/err.h
+++ b/src/lib/libssl/src/crypto/err/err.h
@@ -142,6 +142,7 @@ typedef struct err_state_st
142#define ERR_LIB_STORE 44 142#define ERR_LIB_STORE 44
143#define ERR_LIB_FIPS 45 143#define ERR_LIB_FIPS 45
144#define ERR_LIB_CMS 46 144#define ERR_LIB_CMS 46
145#define ERR_LIB_JPAKE 47
145 146
146#define ERR_LIB_USER 128 147#define ERR_LIB_USER 128
147 148
@@ -175,6 +176,7 @@ typedef struct err_state_st
175#define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__) 176#define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__)
176#define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__) 177#define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__)
177#define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__) 178#define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__)
179#define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__)
178 180
179/* Borland C seems too stupid to be able to shift and do longs in 181/* Borland C seems too stupid to be able to shift and do longs in
180 * the pre-processor :-( */ 182 * the pre-processor :-( */
@@ -306,6 +308,12 @@ int ERR_get_next_error_library(void);
306int ERR_set_mark(void); 308int ERR_set_mark(void);
307int ERR_pop_to_mark(void); 309int ERR_pop_to_mark(void);
308 310
311#ifdef OPENSSL_FIPS
312void int_ERR_set_state_func(ERR_STATE *(*get_func)(void),
313 void (*remove_func)(unsigned long pid));
314void int_ERR_lib_init(void);
315#endif
316
309/* Already defined in ossl_typ.h */ 317/* Already defined in ossl_typ.h */
310/* typedef struct st_ERR_FNS ERR_FNS; */ 318/* typedef struct st_ERR_FNS ERR_FNS; */
311/* An application can use this function and provide the return value to loaded 319/* An application can use this function and provide the return value to loaded
diff --git a/src/lib/libssl/src/crypto/err/err_all.c b/src/lib/libssl/src/crypto/err/err_all.c
index 5813060ce2..f21a5276ed 100644
--- a/src/lib/libssl/src/crypto/err/err_all.c
+++ b/src/lib/libssl/src/crypto/err/err_all.c
@@ -94,9 +94,16 @@
94#include <openssl/ui.h> 94#include <openssl/ui.h>
95#include <openssl/ocsp.h> 95#include <openssl/ocsp.h>
96#include <openssl/err.h> 96#include <openssl/err.h>
97#ifdef OPENSSL_FIPS
98#include <openssl/fips.h>
99#endif
100
97#ifndef OPENSSL_NO_CMS 101#ifndef OPENSSL_NO_CMS
98#include <openssl/cms.h> 102#include <openssl/cms.h>
99#endif 103#endif
104#ifndef OPENSSL_NO_JPAKE
105#include <openssl/jpake.h>
106#endif
100 107
101void ERR_load_crypto_strings(void) 108void ERR_load_crypto_strings(void)
102 { 109 {
@@ -141,8 +148,14 @@ void ERR_load_crypto_strings(void)
141#endif 148#endif
142 ERR_load_OCSP_strings(); 149 ERR_load_OCSP_strings();
143 ERR_load_UI_strings(); 150 ERR_load_UI_strings();
151#ifdef OPENSSL_FIPS
152 ERR_load_FIPS_strings();
153#endif
144#ifndef OPENSSL_NO_CMS 154#ifndef OPENSSL_NO_CMS
145 ERR_load_CMS_strings(); 155 ERR_load_CMS_strings();
146#endif 156#endif
157#ifndef OPENSSL_NO_JPAKE
158 ERR_load_JPAKE_strings();
159#endif
147#endif 160#endif
148 } 161 }
diff --git a/src/lib/libssl/src/crypto/err/err_prn.c b/src/lib/libssl/src/crypto/err/err_prn.c
index 2224a901e5..4cdf342fa6 100644
--- a/src/lib/libssl/src/crypto/err/err_prn.c
+++ b/src/lib/libssl/src/crypto/err/err_prn.c
@@ -86,12 +86,7 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
86#ifndef OPENSSL_NO_FP_API 86#ifndef OPENSSL_NO_FP_API
87static int print_fp(const char *str, size_t len, void *fp) 87static int print_fp(const char *str, size_t len, void *fp)
88 { 88 {
89 BIO bio; 89 return fwrite(str, 1, len, fp);
90
91 BIO_set(&bio,BIO_s_file());
92 BIO_set_fp(&bio,fp,BIO_NOCLOSE);
93
94 return BIO_printf(&bio, "%s", str);
95 } 90 }
96void ERR_print_errors_fp(FILE *fp) 91void ERR_print_errors_fp(FILE *fp)
97 { 92 {
@@ -99,13 +94,64 @@ void ERR_print_errors_fp(FILE *fp)
99 } 94 }
100#endif 95#endif
101 96
102static int print_bio(const char *str, size_t len, void *bp) 97void ERR_error_string_n(unsigned long e, char *buf, size_t len)
103 { 98 {
104 return BIO_write((BIO *)bp, str, len); 99 char lsbuf[64], fsbuf[64], rsbuf[64];
100 const char *ls,*fs,*rs;
101 unsigned long l,f,r;
102
103 l=ERR_GET_LIB(e);
104 f=ERR_GET_FUNC(e);
105 r=ERR_GET_REASON(e);
106
107 ls=ERR_lib_error_string(e);
108 fs=ERR_func_error_string(e);
109 rs=ERR_reason_error_string(e);
110
111 if (ls == NULL)
112 BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
113 if (fs == NULL)
114 BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
115 if (rs == NULL)
116 BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
117
118 BIO_snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf,
119 fs?fs:fsbuf, rs?rs:rsbuf);
120 if (strlen(buf) == len-1)
121 {
122 /* output may be truncated; make sure we always have 5
123 * colon-separated fields, i.e. 4 colons ... */
124#define NUM_COLONS 4
125 if (len > NUM_COLONS) /* ... if possible */
126 {
127 int i;
128 char *s = buf;
129
130 for (i = 0; i < NUM_COLONS; i++)
131 {
132 char *colon = strchr(s, ':');
133 if (colon == NULL || colon > &buf[len-1] - NUM_COLONS + i)
134 {
135 /* set colon no. i at last possible position
136 * (buf[len-1] is the terminating 0)*/
137 colon = &buf[len-1] - NUM_COLONS + i;
138 *colon = ':';
139 }
140 s = colon + 1;
141 }
142 }
143 }
105 } 144 }
106void ERR_print_errors(BIO *bp) 145
146/* BAD for multi-threading: uses a local buffer if ret == NULL */
147/* ERR_error_string_n should be used instead for ret != NULL
148 * as ERR_error_string cannot know how large the buffer is */
149char *ERR_error_string(unsigned long e, char *ret)
107 { 150 {
108 ERR_print_errors_cb(print_bio, bp); 151 static char buf[256];
109 } 152
153 if (ret == NULL) ret=buf;
154 ERR_error_string_n(e, ret, 256);
110 155
111 156 return ret;
157 }
diff --git a/src/lib/libssl/src/crypto/err/openssl.ec b/src/lib/libssl/src/crypto/err/openssl.ec
index 1938f081ac..868826624d 100644
--- a/src/lib/libssl/src/crypto/err/openssl.ec
+++ b/src/lib/libssl/src/crypto/err/openssl.ec
@@ -31,7 +31,9 @@ L COMP crypto/comp/comp.h crypto/comp/comp_err.c
31L ECDSA crypto/ecdsa/ecdsa.h crypto/ecdsa/ecs_err.c 31L ECDSA crypto/ecdsa/ecdsa.h crypto/ecdsa/ecs_err.c
32L ECDH crypto/ecdh/ecdh.h crypto/ecdh/ech_err.c 32L ECDH crypto/ecdh/ecdh.h crypto/ecdh/ech_err.c
33L STORE crypto/store/store.h crypto/store/str_err.c 33L STORE crypto/store/store.h crypto/store/str_err.c
34L FIPS fips/fips.h crypto/fips_err.h
34L CMS crypto/cms/cms.h crypto/cms/cms_err.c 35L CMS crypto/cms/cms.h crypto/cms/cms_err.c
36L JPAKE crypto/jpake/jpake.h crypto/jpake/jpake_err.c
35 37
36# additional header files to be scanned for function names 38# additional header files to be scanned for function names
37L NONE crypto/x509/x509_vfy.h NONE 39L 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
index 9de56dc03d..c204f84c1d 100644
--- a/src/lib/libssl/src/crypto/evp/Makefile
+++ b/src/lib/libssl/src/crypto/evp/Makefile
@@ -18,10 +18,10 @@ TESTDATA=evptests.txt
18APPS= 18APPS=
19 19
20LIB=$(TOP)/libcrypto.a 20LIB=$(TOP)/libcrypto.a
21LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \ 21LIBSRC= encode.c digest.c dig_eng.c evp_enc.c evp_key.c evp_acnf.c evp_cnf.c \
22 e_des.c e_bf.c e_idea.c e_des3.c e_camellia.c\ 22 e_des.c e_bf.c e_idea.c e_des3.c e_camellia.c\
23 e_rc4.c e_aes.c names.c e_seed.c \ 23 e_rc4.c e_aes.c names.c e_seed.c \
24 e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \ 24 e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c enc_min.c \
25 m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \ 25 m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \
26 m_dss.c m_dss1.c m_mdc2.c m_ripemd.c m_ecdsa.c\ 26 m_dss.c m_dss1.c m_mdc2.c m_ripemd.c m_ecdsa.c\
27 p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ 27 p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \
@@ -30,10 +30,10 @@ LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \
30 evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \ 30 evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \
31 e_old.c 31 e_old.c
32 32
33LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \ 33LIBOBJ= encode.o digest.o dig_eng.o evp_enc.o evp_key.o evp_acnf.o evp_cnf.o \
34 e_des.o e_bf.o e_idea.o e_des3.o e_camellia.o\ 34 e_des.o e_bf.o e_idea.o e_des3.o e_camellia.o\
35 e_rc4.o e_aes.o names.o e_seed.o \ 35 e_rc4.o e_aes.o names.o e_seed.o \
36 e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \ 36 e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o enc_min.o \
37 m_null.o m_md2.o m_md4.o m_md5.o m_sha.o m_sha1.o \ 37 m_null.o m_md2.o m_md4.o m_md5.o m_sha.o m_sha1.o \
38 m_dss.o m_dss1.o m_mdc2.o m_ripemd.o m_ecdsa.o\ 38 m_dss.o m_dss1.o m_mdc2.o m_ripemd.o m_ecdsa.o\
39 p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \ 39 p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \
@@ -55,7 +55,7 @@ top:
55all: lib 55all: lib
56 56
57lib: $(LIBOBJ) 57lib: $(LIBOBJ)
58 $(AR) $(LIB) $(LIBOBJ) 58 $(ARX) $(LIB) $(LIBOBJ)
59 $(RANLIB) $(LIB) || echo Never mind. 59 $(RANLIB) $(LIB) || echo Never mind.
60 @touch lib 60 @touch lib
61 61
@@ -101,177 +101,201 @@ bio_b64.o: ../../e_os.h ../../include/openssl/asn1.h
101bio_b64.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 101bio_b64.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
102bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 102bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
103bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h 103bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h
104bio_b64.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 104bio_b64.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
105bio_b64.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 105bio_b64.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
106bio_b64.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 106bio_b64.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
107bio_b64.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 107bio_b64.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
108bio_b64.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_b64.c 108bio_b64.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
109bio_b64.o: ../cryptlib.h bio_b64.c
109bio_enc.o: ../../e_os.h ../../include/openssl/asn1.h 110bio_enc.o: ../../e_os.h ../../include/openssl/asn1.h
110bio_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 111bio_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
111bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 112bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
112bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 113bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
113bio_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 114bio_enc.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
114bio_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 115bio_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
115bio_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 116bio_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
116bio_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 117bio_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
117bio_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_enc.c 118bio_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
119bio_enc.o: ../cryptlib.h bio_enc.c
118bio_md.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 120bio_md.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
119bio_md.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 121bio_md.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
120bio_md.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 122bio_md.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
121bio_md.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 123bio_md.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
122bio_md.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 124bio_md.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
123bio_md.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 125bio_md.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
124bio_md.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 126bio_md.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
125bio_md.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 127bio_md.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
126bio_md.o: ../cryptlib.h bio_md.c 128bio_md.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_md.c
127bio_ok.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 129bio_ok.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
128bio_ok.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 130bio_ok.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
129bio_ok.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 131bio_ok.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
130bio_ok.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 132bio_ok.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
131bio_ok.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 133bio_ok.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
132bio_ok.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 134bio_ok.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
133bio_ok.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 135bio_ok.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
134bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 136bio_ok.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
135bio_ok.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_ok.c 137bio_ok.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
138bio_ok.o: ../cryptlib.h bio_ok.c
136c_all.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 139c_all.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
137c_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 140c_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
138c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 141c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
139c_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 142c_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
140c_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h 143c_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h
141c_all.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 144c_all.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
142c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 145c_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
143c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 146c_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
144c_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 147c_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
145c_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 148c_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
146c_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 149c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
147c_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 150c_all.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
148c_all.o: ../cryptlib.h c_all.c 151c_all.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_all.c
149c_allc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 152c_allc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
150c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 153c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
151c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 154c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
152c_allc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 155c_allc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
153c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 156c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
154c_allc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 157c_allc.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
155c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 158c_allc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
156c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 159c_allc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
157c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h 160c_allc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
158c_allc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 161c_allc.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
159c_allc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 162c_allc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
160c_allc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 163c_allc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
161c_allc.o: ../cryptlib.h c_allc.c 164c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_allc.c
162c_alld.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 165c_alld.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
163c_alld.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 166c_alld.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
164c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 167c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
165c_alld.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 168c_alld.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
166c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h 169c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h
167c_alld.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 170c_alld.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
168c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 171c_alld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
169c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 172c_alld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
170c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h 173c_alld.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
171c_alld.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 174c_alld.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
172c_alld.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 175c_alld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
173c_alld.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 176c_alld.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
174c_alld.o: ../cryptlib.h c_alld.c 177c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_alld.c
178dig_eng.o: ../../e_os.h ../../include/openssl/asn1.h
179dig_eng.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
180dig_eng.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
181dig_eng.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
182dig_eng.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
183dig_eng.o: ../../include/openssl/err.h ../../include/openssl/evp.h
184dig_eng.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
185dig_eng.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
186dig_eng.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
187dig_eng.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
188dig_eng.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
189dig_eng.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
190dig_eng.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
191dig_eng.o: ../cryptlib.h dig_eng.c evp_locl.h
175digest.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 192digest.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
176digest.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 193digest.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
177digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 194digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
178digest.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 195digest.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
179digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h 196digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h
180digest.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 197digest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
181digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 198digest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
182digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 199digest.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
183digest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 200digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
184digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 201digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
185digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 202digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
186digest.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 203digest.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
187digest.o: ../cryptlib.h digest.c 204digest.o: ../../include/openssl/x509_vfy.h ../cryptlib.h digest.c evp_locl.h
188e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h 205e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
189e_aes.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h 206e_aes.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
190e_aes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 207e_aes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
191e_aes.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 208e_aes.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
192e_aes.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 209e_aes.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
193e_aes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 210e_aes.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
194e_aes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 211e_aes.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
195e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h e_aes.c 212e_aes.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
196e_aes.o: evp_locl.h 213e_aes.o: ../../include/openssl/symhacks.h e_aes.c evp_locl.h
197e_bf.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 214e_bf.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
198e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/buffer.h 215e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/buffer.h
199e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 216e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
200e_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h 217e_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
201e_bf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 218e_bf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
202e_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 219e_bf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
203e_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 220e_bf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
204e_bf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 221e_bf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
205e_bf.o: ../../include/openssl/symhacks.h ../cryptlib.h e_bf.c evp_locl.h 222e_bf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
223e_bf.o: ../cryptlib.h e_bf.c evp_locl.h
206e_camellia.o: ../../include/openssl/opensslconf.h e_camellia.c 224e_camellia.o: ../../include/openssl/opensslconf.h e_camellia.c
207e_cast.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 225e_cast.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
208e_cast.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 226e_cast.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
209e_cast.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 227e_cast.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
210e_cast.o: ../../include/openssl/err.h ../../include/openssl/evp.h 228e_cast.o: ../../include/openssl/err.h ../../include/openssl/evp.h
211e_cast.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 229e_cast.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
212e_cast.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 230e_cast.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
213e_cast.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 231e_cast.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
214e_cast.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 232e_cast.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
215e_cast.o: ../../include/openssl/symhacks.h ../cryptlib.h e_cast.c evp_locl.h 233e_cast.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
234e_cast.o: ../cryptlib.h e_cast.c evp_locl.h
216e_des.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 235e_des.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
217e_des.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 236e_des.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
218e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h 237e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
219e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 238e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
220e_des.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 239e_des.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
221e_des.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 240e_des.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
222e_des.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 241e_des.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
223e_des.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 242e_des.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
224e_des.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 243e_des.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
225e_des.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h 244e_des.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
226e_des.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des.c evp_locl.h 245e_des.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
246e_des.o: ../cryptlib.h e_des.c evp_locl.h
227e_des3.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 247e_des3.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
228e_des3.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 248e_des3.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
229e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h 249e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
230e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 250e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
231e_des3.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 251e_des3.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
232e_des3.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 252e_des3.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
233e_des3.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 253e_des3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
234e_des3.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 254e_des3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
235e_des3.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 255e_des3.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
236e_des3.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h 256e_des3.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
237e_des3.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des3.c evp_locl.h 257e_des3.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
258e_des3.o: ../cryptlib.h e_des3.c evp_locl.h
238e_idea.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 259e_idea.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
239e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 260e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
240e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 261e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
241e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h 262e_idea.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
242e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 263e_idea.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
243e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 264e_idea.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
244e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 265e_idea.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
245e_idea.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 266e_idea.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
246e_idea.o: ../../include/openssl/symhacks.h ../cryptlib.h e_idea.c evp_locl.h 267e_idea.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
268e_idea.o: ../cryptlib.h e_idea.c evp_locl.h
247e_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 269e_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
248e_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 270e_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
249e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 271e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
250e_null.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 272e_null.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
251e_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 273e_null.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
252e_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 274e_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
253e_null.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 275e_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
254e_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 276e_null.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
255e_null.o: ../cryptlib.h e_null.c 277e_null.o: ../../include/openssl/symhacks.h ../cryptlib.h e_null.c
256e_old.o: e_old.c 278e_old.o: e_old.c
257e_rc2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 279e_rc2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
258e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 280e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
259e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 281e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
260e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 282e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
261e_rc2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 283e_rc2.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
262e_rc2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 284e_rc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
263e_rc2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h 285e_rc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
264e_rc2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 286e_rc2.o: ../../include/openssl/rc2.h ../../include/openssl/safestack.h
265e_rc2.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc2.c evp_locl.h 287e_rc2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
288e_rc2.o: ../cryptlib.h e_rc2.c evp_locl.h
266e_rc4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 289e_rc4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
267e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 290e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
268e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 291e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
269e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 292e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
270e_rc4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 293e_rc4.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
271e_rc4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 294e_rc4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
272e_rc4.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc4.h 295e_rc4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
273e_rc4.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 296e_rc4.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
274e_rc4.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc4.c 297e_rc4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
298e_rc4.o: ../cryptlib.h e_rc4.c evp_locl.h
275e_rc5.o: ../../e_os.h ../../include/openssl/bio.h 299e_rc5.o: ../../e_os.h ../../include/openssl/bio.h
276e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 300e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
277e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 301e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
@@ -282,107 +306,141 @@ e_rc5.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc5.c
282e_seed.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 306e_seed.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
283e_seed.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 307e_seed.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
284e_seed.o: ../../include/openssl/err.h ../../include/openssl/evp.h 308e_seed.o: ../../include/openssl/err.h ../../include/openssl/evp.h
285e_seed.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 309e_seed.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
286e_seed.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 310e_seed.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
287e_seed.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 311e_seed.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
288e_seed.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 312e_seed.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
289e_seed.o: ../../include/openssl/symhacks.h e_seed.c 313e_seed.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
314e_seed.o: e_seed.c
290e_xcbc_d.o: ../../e_os.h ../../include/openssl/asn1.h 315e_xcbc_d.o: ../../e_os.h ../../include/openssl/asn1.h
291e_xcbc_d.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 316e_xcbc_d.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
292e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h 317e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
293e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h 318e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
294e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h 319e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
295e_xcbc_d.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 320e_xcbc_d.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
296e_xcbc_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 321e_xcbc_d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
322e_xcbc_d.o: ../../include/openssl/opensslconf.h
297e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 323e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
298e_xcbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 324e_xcbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
299e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h 325e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
300e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c 326e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c
327enc_min.o: ../../e_os.h ../../include/openssl/asn1.h
328enc_min.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
329enc_min.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
330enc_min.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
331enc_min.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
332enc_min.o: ../../include/openssl/err.h ../../include/openssl/evp.h
333enc_min.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
334enc_min.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
335enc_min.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
336enc_min.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
337enc_min.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
338enc_min.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
339enc_min.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
340enc_min.o: ../../include/openssl/x509_vfy.h ../cryptlib.h enc_min.c evp_locl.h
301encode.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 341encode.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
302encode.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 342encode.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
303encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 343encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
304encode.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 344encode.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
305encode.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 345encode.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
306encode.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 346encode.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
307encode.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 347encode.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
308encode.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 348encode.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
309encode.o: ../cryptlib.h encode.c 349encode.o: ../../include/openssl/symhacks.h ../cryptlib.h encode.c
310evp_acnf.o: ../../e_os.h ../../include/openssl/asn1.h 350evp_acnf.o: ../../e_os.h ../../include/openssl/asn1.h
311evp_acnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 351evp_acnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
312evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h 352evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
313evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 353evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
314evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 354evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
315evp_acnf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 355evp_acnf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
316evp_acnf.o: ../../include/openssl/opensslconf.h 356evp_acnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
317evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 357evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
318evp_acnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 358evp_acnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
319evp_acnf.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_acnf.c 359evp_acnf.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_acnf.c
360evp_cnf.o: ../../e_os.h ../../include/openssl/asn1.h
361evp_cnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
362evp_cnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
363evp_cnf.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
364evp_cnf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
365evp_cnf.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
366evp_cnf.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
367evp_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
368evp_cnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
369evp_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
370evp_cnf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
371evp_cnf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
372evp_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
373evp_cnf.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
374evp_cnf.o: ../cryptlib.h evp_cnf.c
320evp_enc.o: ../../e_os.h ../../include/openssl/asn1.h 375evp_enc.o: ../../e_os.h ../../include/openssl/asn1.h
321evp_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 376evp_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
322evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 377evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
323evp_enc.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 378evp_enc.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
324evp_enc.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 379evp_enc.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
325evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 380evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
326evp_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 381evp_enc.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
327evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 382evp_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
328evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 383evp_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
329evp_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 384evp_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
330evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 385evp_enc.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
331evp_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 386evp_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
332evp_enc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 387evp_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
333evp_enc.o: ../cryptlib.h evp_enc.c evp_locl.h 388evp_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_enc.c evp_locl.h
334evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 389evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
335evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 390evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
336evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h 391evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h
337evp_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 392evp_err.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
338evp_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 393evp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
339evp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 394evp_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
340evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 395evp_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
341evp_err.o: ../../include/openssl/symhacks.h evp_err.c 396evp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
397evp_err.o: evp_err.c
342evp_key.o: ../../e_os.h ../../include/openssl/asn1.h 398evp_key.o: ../../e_os.h ../../include/openssl/asn1.h
343evp_key.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 399evp_key.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
344evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 400evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
345evp_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 401evp_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
346evp_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 402evp_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
347evp_key.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 403evp_key.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
348evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 404evp_key.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
349evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 405evp_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
350evp_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 406evp_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
351evp_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 407evp_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
352evp_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 408evp_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
353evp_key.o: ../../include/openssl/ui.h ../../include/openssl/x509.h 409evp_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
354evp_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_key.c 410evp_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
411evp_key.o: ../cryptlib.h evp_key.c
355evp_lib.o: ../../e_os.h ../../include/openssl/asn1.h 412evp_lib.o: ../../e_os.h ../../include/openssl/asn1.h
356evp_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 413evp_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
357evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 414evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
358evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h 415evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
359evp_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 416evp_lib.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
360evp_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 417evp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
361evp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 418evp_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
362evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 419evp_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
363evp_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_lib.c 420evp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
421evp_lib.o: ../cryptlib.h evp_lib.c
364evp_pbe.o: ../../e_os.h ../../include/openssl/asn1.h 422evp_pbe.o: ../../e_os.h ../../include/openssl/asn1.h
365evp_pbe.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 423evp_pbe.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
366evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 424evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
367evp_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 425evp_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
368evp_pbe.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 426evp_pbe.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
369evp_pbe.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 427evp_pbe.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
370evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 428evp_pbe.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
371evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 429evp_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
372evp_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 430evp_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
373evp_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 431evp_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
374evp_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 432evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
375evp_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 433evp_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
376evp_pbe.o: ../cryptlib.h evp_pbe.c 434evp_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pbe.c
377evp_pkey.o: ../../e_os.h ../../include/openssl/asn1.h 435evp_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
378evp_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 436evp_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
379evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 437evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
380evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 438evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
381evp_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 439evp_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
382evp_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 440evp_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
383evp_pkey.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 441evp_pkey.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
384evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 442evp_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
385evp_pkey.o: ../../include/openssl/opensslconf.h 443evp_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
386evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 444evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
387evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 445evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
388evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 446evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
@@ -394,106 +452,110 @@ m_dss.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
394m_dss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 452m_dss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
395m_dss.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 453m_dss.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
396m_dss.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 454m_dss.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
397m_dss.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 455m_dss.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
398m_dss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 456m_dss.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
399m_dss.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 457m_dss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
400m_dss.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 458m_dss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
401m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 459m_dss.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
402m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 460m_dss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
403m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 461m_dss.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
404m_dss.o: ../cryptlib.h m_dss.c 462m_dss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_dss.c
405m_dss1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 463m_dss1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
406m_dss1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 464m_dss1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
407m_dss1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 465m_dss1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
408m_dss1.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 466m_dss1.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
409m_dss1.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 467m_dss1.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
410m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 468m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
411m_dss1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 469m_dss1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
412m_dss1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 470m_dss1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
413m_dss1.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 471m_dss1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
414m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 472m_dss1.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
415m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 473m_dss1.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
416m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 474m_dss1.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
417m_dss1.o: ../cryptlib.h m_dss1.c 475m_dss1.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_dss1.c
418m_ecdsa.o: ../../e_os.h ../../include/openssl/asn1.h 476m_ecdsa.o: ../../e_os.h ../../include/openssl/asn1.h
419m_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 477m_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
420m_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 478m_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
421m_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 479m_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
422m_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 480m_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
423m_ecdsa.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 481m_ecdsa.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
424m_ecdsa.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 482m_ecdsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
425m_ecdsa.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 483m_ecdsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
426m_ecdsa.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 484m_ecdsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
427m_ecdsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 485m_ecdsa.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
428m_ecdsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 486m_ecdsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
429m_ecdsa.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 487m_ecdsa.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
430m_ecdsa.o: ../cryptlib.h m_ecdsa.c 488m_ecdsa.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_ecdsa.c
431m_md2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 489m_md2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
432m_md2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 490m_md2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
433m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 491m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
434m_md2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 492m_md2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
435m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h 493m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
436m_md2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h 494m_md2.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
437m_md2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 495m_md2.o: ../../include/openssl/md2.h ../../include/openssl/obj_mac.h
438m_md2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 496m_md2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
439m_md2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 497m_md2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
440m_md2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 498m_md2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
441m_md2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 499m_md2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
442m_md2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 500m_md2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
443m_md2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md2.c 501m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
502m_md2.o: ../cryptlib.h evp_locl.h m_md2.c
444m_md4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 503m_md4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
445m_md4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 504m_md4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
446m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 505m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
447m_md4.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 506m_md4.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
448m_md4.o: ../../include/openssl/err.h ../../include/openssl/evp.h 507m_md4.o: ../../include/openssl/err.h ../../include/openssl/evp.h
449m_md4.o: ../../include/openssl/lhash.h ../../include/openssl/md4.h 508m_md4.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
450m_md4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 509m_md4.o: ../../include/openssl/md4.h ../../include/openssl/obj_mac.h
451m_md4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 510m_md4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
452m_md4.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 511m_md4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
453m_md4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 512m_md4.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
454m_md4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 513m_md4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
455m_md4.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 514m_md4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
456m_md4.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md4.c 515m_md4.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
516m_md4.o: ../cryptlib.h evp_locl.h m_md4.c
457m_md5.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 517m_md5.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
458m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 518m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
459m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 519m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
460m_md5.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 520m_md5.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
461m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h 521m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
462m_md5.o: ../../include/openssl/lhash.h ../../include/openssl/md5.h 522m_md5.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
463m_md5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 523m_md5.o: ../../include/openssl/md5.h ../../include/openssl/obj_mac.h
464m_md5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 524m_md5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
465m_md5.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 525m_md5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
466m_md5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 526m_md5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
467m_md5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 527m_md5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
468m_md5.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 528m_md5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
469m_md5.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md5.c 529m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
530m_md5.o: ../cryptlib.h evp_locl.h m_md5.c
470m_mdc2.o: ../../e_os.h ../../include/openssl/bio.h 531m_mdc2.o: ../../e_os.h ../../include/openssl/bio.h
471m_mdc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 532m_mdc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
472m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 533m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
473m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 534m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
474m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 535m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
475m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 536m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
476m_mdc2.o: ../../include/openssl/symhacks.h ../cryptlib.h m_mdc2.c 537m_mdc2.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h m_mdc2.c
477m_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 538m_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
478m_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 539m_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
479m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 540m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
480m_null.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 541m_null.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
481m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h 542m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h
482m_null.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 543m_null.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
483m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 544m_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
484m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 545m_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
485m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 546m_null.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
486m_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 547m_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
487m_null.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 548m_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
488m_null.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_null.c 549m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
550m_null.o: ../cryptlib.h m_null.c
489m_ripemd.o: ../../e_os.h ../../include/openssl/asn1.h 551m_ripemd.o: ../../e_os.h ../../include/openssl/asn1.h
490m_ripemd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 552m_ripemd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
491m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 553m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
492m_ripemd.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 554m_ripemd.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
493m_ripemd.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 555m_ripemd.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
494m_ripemd.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 556m_ripemd.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
495m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 557m_ripemd.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
496m_ripemd.o: ../../include/openssl/opensslconf.h 558m_ripemd.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
497m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 559m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
498m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/ripemd.h 560m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/ripemd.h
499m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 561m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
@@ -505,60 +567,62 @@ m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
505m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 567m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
506m_sha.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 568m_sha.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
507m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h 569m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h
508m_sha.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 570m_sha.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
509m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 571m_sha.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
510m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 572m_sha.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
511m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 573m_sha.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
512m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 574m_sha.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
513m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 575m_sha.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
514m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 576m_sha.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
515m_sha.o: ../cryptlib.h m_sha.c 577m_sha.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_locl.h m_sha.c
516m_sha1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 578m_sha1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
517m_sha1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 579m_sha1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
518m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 580m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
519m_sha1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 581m_sha1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
520m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h 582m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h
521m_sha1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 583m_sha1.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
522m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 584m_sha1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
523m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 585m_sha1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
524m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 586m_sha1.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
525m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 587m_sha1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
526m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 588m_sha1.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
527m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 589m_sha1.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
528m_sha1.o: ../cryptlib.h m_sha1.c 590m_sha1.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_sha1.c
529names.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 591names.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
530names.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 592names.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
531names.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 593names.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
532names.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 594names.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
533names.o: ../../include/openssl/err.h ../../include/openssl/evp.h 595names.o: ../../include/openssl/err.h ../../include/openssl/evp.h
534names.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 596names.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
535names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 597names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
536names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 598names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
537names.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 599names.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
538names.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 600names.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
539names.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 601names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
540names.o: ../../include/openssl/x509_vfy.h ../cryptlib.h names.c 602names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
603names.o: ../cryptlib.h names.c
541p5_crpt.o: ../../e_os.h ../../include/openssl/asn1.h 604p5_crpt.o: ../../e_os.h ../../include/openssl/asn1.h
542p5_crpt.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 605p5_crpt.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
543p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 606p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
544p5_crpt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 607p5_crpt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
545p5_crpt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 608p5_crpt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
546p5_crpt.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 609p5_crpt.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
547p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 610p5_crpt.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
548p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 611p5_crpt.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
549p5_crpt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 612p5_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
550p5_crpt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 613p5_crpt.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
551p5_crpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 614p5_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
552p5_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 615p5_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
553p5_crpt.o: ../cryptlib.h p5_crpt.c 616p5_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_crpt.c
554p5_crpt2.o: ../../e_os.h ../../include/openssl/asn1.h 617p5_crpt2.o: ../../e_os.h ../../include/openssl/asn1.h
555p5_crpt2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 618p5_crpt2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
556p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 619p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
557p5_crpt2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 620p5_crpt2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
558p5_crpt2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 621p5_crpt2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
559p5_crpt2.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h 622p5_crpt2.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
560p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 623p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/lhash.h
561p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 624p5_crpt2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
625p5_crpt2.o: ../../include/openssl/opensslconf.h
562p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 626p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
563p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 627p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
564p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 628p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -569,27 +633,29 @@ p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
569p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 633p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
570p_dec.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 634p_dec.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
571p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h 635p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h
572p_dec.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 636p_dec.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
573p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 637p_dec.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
574p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 638p_dec.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
575p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 639p_dec.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
576p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 640p_dec.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
577p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 641p_dec.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
578p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 642p_dec.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
579p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_dec.c 643p_dec.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
644p_dec.o: ../cryptlib.h p_dec.c
580p_enc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 645p_enc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
581p_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 646p_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
582p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 647p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
583p_enc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 648p_enc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
584p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 649p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
585p_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 650p_enc.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
586p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 651p_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
587p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 652p_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
588p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 653p_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
589p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 654p_enc.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
590p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 655p_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
591p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 656p_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
592p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_enc.c 657p_enc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
658p_enc.o: ../cryptlib.h p_enc.c
593p_lib.o: ../../e_os.h ../../include/openssl/asn1.h 659p_lib.o: ../../e_os.h ../../include/openssl/asn1.h
594p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h 660p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
595p_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h 661p_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
@@ -597,60 +663,63 @@ p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
597p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 663p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
598p_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 664p_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
599p_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 665p_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
600p_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 666p_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
601p_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 667p_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
602p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 668p_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
603p_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 669p_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
604p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 670p_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
605p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 671p_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
606p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 672p_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
607p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_lib.c 673p_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
674p_lib.o: ../cryptlib.h p_lib.c
608p_open.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 675p_open.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
609p_open.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 676p_open.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
610p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 677p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
611p_open.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 678p_open.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
612p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h 679p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h
613p_open.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 680p_open.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
614p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 681p_open.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
615p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 682p_open.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
616p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 683p_open.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
617p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 684p_open.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
618p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 685p_open.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
619p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 686p_open.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
620p_open.o: ../cryptlib.h p_open.c 687p_open.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_open.c
621p_seal.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 688p_seal.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
622p_seal.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 689p_seal.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
623p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 690p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
624p_seal.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 691p_seal.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
625p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h 692p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h
626p_seal.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 693p_seal.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
627p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 694p_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
628p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 695p_seal.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
629p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 696p_seal.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
630p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 697p_seal.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
631p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 698p_seal.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
632p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 699p_seal.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
633p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_seal.c 700p_seal.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
701p_seal.o: ../cryptlib.h p_seal.c
634p_sign.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 702p_sign.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
635p_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 703p_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
636p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 704p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
637p_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 705p_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
638p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h 706p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
639p_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 707p_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
640p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 708p_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
641p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 709p_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
642p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 710p_sign.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
643p_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 711p_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
644p_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 712p_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
645p_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_sign.c 713p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
714p_sign.o: ../cryptlib.h p_sign.c
646p_verify.o: ../../e_os.h ../../include/openssl/asn1.h 715p_verify.o: ../../e_os.h ../../include/openssl/asn1.h
647p_verify.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 716p_verify.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
648p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 717p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
649p_verify.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 718p_verify.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
650p_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 719p_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
651p_verify.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 720p_verify.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
652p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 721p_verify.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
653p_verify.o: ../../include/openssl/opensslconf.h 722p_verify.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
654p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 723p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
655p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 724p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
656p_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 725p_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
diff --git a/src/lib/libssl/src/crypto/evp/bio_md.c b/src/lib/libssl/src/crypto/evp/bio_md.c
index d648ac6da6..ed5c1135fd 100644
--- a/src/lib/libssl/src/crypto/evp/bio_md.c
+++ b/src/lib/libssl/src/crypto/evp/bio_md.c
@@ -192,13 +192,8 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
192 ret=0; 192 ret=0;
193 break; 193 break;
194 case BIO_C_GET_MD_CTX: 194 case BIO_C_GET_MD_CTX:
195 if (b->init) 195 pctx=ptr;
196 { 196 *pctx=ctx;
197 pctx=ptr;
198 *pctx=ctx;
199 }
200 else
201 ret=0;
202 break; 197 break;
203 case BIO_C_SET_MD_CTX: 198 case BIO_C_SET_MD_CTX:
204 if (b->init) 199 if (b->init)
diff --git a/src/lib/libssl/src/crypto/evp/digest.c b/src/lib/libssl/src/crypto/evp/digest.c
index 762e6d3450..3bc2d1295c 100644
--- a/src/lib/libssl/src/crypto/evp/digest.c
+++ b/src/lib/libssl/src/crypto/evp/digest.c
@@ -116,6 +116,7 @@
116#ifndef OPENSSL_NO_ENGINE 116#ifndef OPENSSL_NO_ENGINE
117#include <openssl/engine.h> 117#include <openssl/engine.h>
118#endif 118#endif
119#include "evp_locl.h"
119 120
120void EVP_MD_CTX_init(EVP_MD_CTX *ctx) 121void EVP_MD_CTX_init(EVP_MD_CTX *ctx)
121 { 122 {
@@ -137,18 +138,77 @@ int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type)
137 return EVP_DigestInit_ex(ctx, type, NULL); 138 return EVP_DigestInit_ex(ctx, type, NULL);
138 } 139 }
139 140
140int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) 141#ifdef OPENSSL_FIPS
142
143/* The purpose of these is to trap programs that attempt to use non FIPS
144 * algorithms in FIPS mode and ignore the errors.
145 */
146
147static int bad_init(EVP_MD_CTX *ctx)
148 { FIPS_ERROR_IGNORED("Digest init"); return 0;}
149
150static int bad_update(EVP_MD_CTX *ctx,const void *data,size_t count)
151 { FIPS_ERROR_IGNORED("Digest update"); return 0;}
152
153static int bad_final(EVP_MD_CTX *ctx,unsigned char *md)
154 { FIPS_ERROR_IGNORED("Digest Final"); return 0;}
155
156static const EVP_MD bad_md =
141 { 157 {
142 EVP_MD_CTX_clear_flags(ctx,EVP_MD_CTX_FLAG_CLEANED); 158 0,
159 0,
160 0,
161 0,
162 bad_init,
163 bad_update,
164 bad_final,
165 NULL,
166 NULL,
167 NULL,
168 0,
169 {0,0,0,0},
170 };
171
172#endif
173
143#ifndef OPENSSL_NO_ENGINE 174#ifndef OPENSSL_NO_ENGINE
144 /* Whether it's nice or not, "Inits" can be used on "Final"'d contexts 175
145 * so this context may already have an ENGINE! Try to avoid releasing 176#ifdef OPENSSL_FIPS
146 * the previous handle, re-querying for an ENGINE, and having a 177
147 * reinitialisation, when it may all be unecessary. */ 178static int do_engine_null(ENGINE *impl) { return 0;}
148 if (ctx->engine && ctx->digest && (!type || 179static int do_evp_md_engine_null(EVP_MD_CTX *ctx,
149 (type && (type->type == ctx->digest->type)))) 180 const EVP_MD **ptype, ENGINE *impl)
150 goto skip_to_init; 181 { return 1; }
151 if (type) 182
183static int (*do_engine_init)(ENGINE *impl)
184 = do_engine_null;
185
186static int (*do_engine_finish)(ENGINE *impl)
187 = do_engine_null;
188
189static int (*do_evp_md_engine)
190 (EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl)
191 = do_evp_md_engine_null;
192
193void int_EVP_MD_set_engine_callbacks(
194 int (*eng_md_init)(ENGINE *impl),
195 int (*eng_md_fin)(ENGINE *impl),
196 int (*eng_md_evp)
197 (EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl))
198 {
199 do_engine_init = eng_md_init;
200 do_engine_finish = eng_md_fin;
201 do_evp_md_engine = eng_md_evp;
202 }
203
204#else
205
206#define do_engine_init ENGINE_init
207#define do_engine_finish ENGINE_finish
208
209static int do_evp_md_engine(EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl)
210 {
211 if (*ptype)
152 { 212 {
153 /* Ensure an ENGINE left lying around from last time is cleared 213 /* Ensure an ENGINE left lying around from last time is cleared
154 * (the previous check attempted to avoid this if the same 214 * (the previous check attempted to avoid this if the same
@@ -159,25 +219,25 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
159 { 219 {
160 if (!ENGINE_init(impl)) 220 if (!ENGINE_init(impl))
161 { 221 {
162 EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR); 222 EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_INITIALIZATION_ERROR);
163 return 0; 223 return 0;
164 } 224 }
165 } 225 }
166 else 226 else
167 /* Ask if an ENGINE is reserved for this job */ 227 /* Ask if an ENGINE is reserved for this job */
168 impl = ENGINE_get_digest_engine(type->type); 228 impl = ENGINE_get_digest_engine((*ptype)->type);
169 if(impl) 229 if(impl)
170 { 230 {
171 /* There's an ENGINE for this job ... (apparently) */ 231 /* There's an ENGINE for this job ... (apparently) */
172 const EVP_MD *d = ENGINE_get_digest(impl, type->type); 232 const EVP_MD *d = ENGINE_get_digest(impl, (*ptype)->type);
173 if(!d) 233 if(!d)
174 { 234 {
175 /* Same comment from evp_enc.c */ 235 /* Same comment from evp_enc.c */
176 EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR); 236 EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_INITIALIZATION_ERROR);
177 return 0; 237 return 0;
178 } 238 }
179 /* We'll use the ENGINE's private digest definition */ 239 /* We'll use the ENGINE's private digest definition */
180 type = d; 240 *ptype = d;
181 /* Store the ENGINE functional reference so we know 241 /* Store the ENGINE functional reference so we know
182 * 'type' came from an ENGINE and we need to release 242 * 'type' came from an ENGINE and we need to release
183 * it when done. */ 243 * it when done. */
@@ -189,12 +249,52 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
189 else 249 else
190 if(!ctx->digest) 250 if(!ctx->digest)
191 { 251 {
192 EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_NO_DIGEST_SET); 252 EVPerr(EVP_F_DO_EVP_MD_ENGINE,EVP_R_NO_DIGEST_SET);
193 return 0; 253 return 0;
194 } 254 }
255 return 1;
256 }
257
258#endif
259
260#endif
261
262int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
263 {
264 M_EVP_MD_CTX_clear_flags(ctx,EVP_MD_CTX_FLAG_CLEANED);
265#ifdef OPENSSL_FIPS
266 if(FIPS_selftest_failed())
267 {
268 FIPSerr(FIPS_F_EVP_DIGESTINIT_EX,FIPS_R_FIPS_SELFTEST_FAILED);
269 ctx->digest = &bad_md;
270 return 0;
271 }
272#endif
273#ifndef OPENSSL_NO_ENGINE
274 /* Whether it's nice or not, "Inits" can be used on "Final"'d contexts
275 * so this context may already have an ENGINE! Try to avoid releasing
276 * the previous handle, re-querying for an ENGINE, and having a
277 * reinitialisation, when it may all be unecessary. */
278 if (ctx->engine && ctx->digest && (!type ||
279 (type && (type->type == ctx->digest->type))))
280 goto skip_to_init;
281 if (!do_evp_md_engine(ctx, &type, impl))
282 return 0;
195#endif 283#endif
196 if (ctx->digest != type) 284 if (ctx->digest != type)
197 { 285 {
286#ifdef OPENSSL_FIPS
287 if (FIPS_mode())
288 {
289 if (!(type->flags & EVP_MD_FLAG_FIPS)
290 && !(ctx->flags & EVP_MD_CTX_FLAG_NON_FIPS_ALLOW))
291 {
292 EVPerr(EVP_F_EVP_DIGESTINIT_EX, EVP_R_DISABLED_FOR_FIPS);
293 ctx->digest = &bad_md;
294 return 0;
295 }
296 }
297#endif
198 if (ctx->digest && ctx->digest->ctx_size) 298 if (ctx->digest && ctx->digest->ctx_size)
199 OPENSSL_free(ctx->md_data); 299 OPENSSL_free(ctx->md_data);
200 ctx->digest=type; 300 ctx->digest=type;
@@ -202,7 +302,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
202 ctx->md_data=OPENSSL_malloc(type->ctx_size); 302 ctx->md_data=OPENSSL_malloc(type->ctx_size);
203 } 303 }
204#ifndef OPENSSL_NO_ENGINE 304#ifndef OPENSSL_NO_ENGINE
205skip_to_init: 305 skip_to_init:
206#endif 306#endif
207 return ctx->digest->init(ctx); 307 return ctx->digest->init(ctx);
208 } 308 }
@@ -210,6 +310,9 @@ skip_to_init:
210int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, 310int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data,
211 size_t count) 311 size_t count)
212 { 312 {
313#ifdef OPENSSL_FIPS
314 FIPS_selftest_check();
315#endif
213 return ctx->digest->update(ctx,data,count); 316 return ctx->digest->update(ctx,data,count);
214 } 317 }
215 318
@@ -226,6 +329,9 @@ int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
226int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) 329int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
227 { 330 {
228 int ret; 331 int ret;
332#ifdef OPENSSL_FIPS
333 FIPS_selftest_check();
334#endif
229 335
230 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE); 336 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE);
231 ret=ctx->digest->final(ctx,md); 337 ret=ctx->digest->final(ctx,md);
@@ -234,7 +340,7 @@ int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
234 if (ctx->digest->cleanup) 340 if (ctx->digest->cleanup)
235 { 341 {
236 ctx->digest->cleanup(ctx); 342 ctx->digest->cleanup(ctx);
237 EVP_MD_CTX_set_flags(ctx,EVP_MD_CTX_FLAG_CLEANED); 343 M_EVP_MD_CTX_set_flags(ctx,EVP_MD_CTX_FLAG_CLEANED);
238 } 344 }
239 memset(ctx->md_data,0,ctx->digest->ctx_size); 345 memset(ctx->md_data,0,ctx->digest->ctx_size);
240 return ret; 346 return ret;
@@ -256,7 +362,7 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
256 } 362 }
257#ifndef OPENSSL_NO_ENGINE 363#ifndef OPENSSL_NO_ENGINE
258 /* Make sure it's safe to copy a digest context using an ENGINE */ 364 /* Make sure it's safe to copy a digest context using an ENGINE */
259 if (in->engine && !ENGINE_init(in->engine)) 365 if (in->engine && !do_engine_init(in->engine))
260 { 366 {
261 EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,ERR_R_ENGINE_LIB); 367 EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,ERR_R_ENGINE_LIB);
262 return 0; 368 return 0;
@@ -266,7 +372,7 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
266 if (out->digest == in->digest) 372 if (out->digest == in->digest)
267 { 373 {
268 tmp_buf = out->md_data; 374 tmp_buf = out->md_data;
269 EVP_MD_CTX_set_flags(out,EVP_MD_CTX_FLAG_REUSE); 375 M_EVP_MD_CTX_set_flags(out,EVP_MD_CTX_FLAG_REUSE);
270 } 376 }
271 else tmp_buf = NULL; 377 else tmp_buf = NULL;
272 EVP_MD_CTX_cleanup(out); 378 EVP_MD_CTX_cleanup(out);
@@ -292,7 +398,7 @@ int EVP_Digest(const void *data, size_t count,
292 int ret; 398 int ret;
293 399
294 EVP_MD_CTX_init(&ctx); 400 EVP_MD_CTX_init(&ctx);
295 EVP_MD_CTX_set_flags(&ctx,EVP_MD_CTX_FLAG_ONESHOT); 401 M_EVP_MD_CTX_set_flags(&ctx,EVP_MD_CTX_FLAG_ONESHOT);
296 ret=EVP_DigestInit_ex(&ctx, type, impl) 402 ret=EVP_DigestInit_ex(&ctx, type, impl)
297 && EVP_DigestUpdate(&ctx, data, count) 403 && EVP_DigestUpdate(&ctx, data, count)
298 && EVP_DigestFinal_ex(&ctx, md, size); 404 && EVP_DigestFinal_ex(&ctx, md, size);
@@ -314,10 +420,10 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
314 * because sometimes only copies of the context are ever finalised. 420 * because sometimes only copies of the context are ever finalised.
315 */ 421 */
316 if (ctx->digest && ctx->digest->cleanup 422 if (ctx->digest && ctx->digest->cleanup
317 && !EVP_MD_CTX_test_flags(ctx,EVP_MD_CTX_FLAG_CLEANED)) 423 && !M_EVP_MD_CTX_test_flags(ctx,EVP_MD_CTX_FLAG_CLEANED))
318 ctx->digest->cleanup(ctx); 424 ctx->digest->cleanup(ctx);
319 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data 425 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data
320 && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)) 426 && !M_EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE))
321 { 427 {
322 OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size); 428 OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size);
323 OPENSSL_free(ctx->md_data); 429 OPENSSL_free(ctx->md_data);
@@ -326,7 +432,7 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
326 if(ctx->engine) 432 if(ctx->engine)
327 /* The EVP_MD we used belongs to an ENGINE, release the 433 /* The EVP_MD we used belongs to an ENGINE, release the
328 * functional reference we held for this reason. */ 434 * functional reference we held for this reason. */
329 ENGINE_finish(ctx->engine); 435 do_engine_finish(ctx->engine);
330#endif 436#endif
331 memset(ctx,'\0',sizeof *ctx); 437 memset(ctx,'\0',sizeof *ctx);
332 438
diff --git a/src/lib/libssl/src/crypto/evp/e_aes.c b/src/lib/libssl/src/crypto/evp/e_aes.c
index bd6c0a3a62..c9a5ee8d75 100644
--- a/src/lib/libssl/src/crypto/evp/e_aes.c
+++ b/src/lib/libssl/src/crypto/evp/e_aes.c
@@ -69,32 +69,29 @@ typedef struct
69 69
70IMPLEMENT_BLOCK_CIPHER(aes_128, ks, AES, EVP_AES_KEY, 70IMPLEMENT_BLOCK_CIPHER(aes_128, ks, AES, EVP_AES_KEY,
71 NID_aes_128, 16, 16, 16, 128, 71 NID_aes_128, 16, 16, 16, 128,
72 0, aes_init_key, NULL, 72 EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
73 EVP_CIPHER_set_asn1_iv, 73 aes_init_key,
74 EVP_CIPHER_get_asn1_iv, 74 NULL, NULL, NULL, NULL)
75 NULL)
76IMPLEMENT_BLOCK_CIPHER(aes_192, ks, AES, EVP_AES_KEY, 75IMPLEMENT_BLOCK_CIPHER(aes_192, ks, AES, EVP_AES_KEY,
77 NID_aes_192, 16, 24, 16, 128, 76 NID_aes_192, 16, 24, 16, 128,
78 0, aes_init_key, NULL, 77 EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
79 EVP_CIPHER_set_asn1_iv, 78 aes_init_key,
80 EVP_CIPHER_get_asn1_iv, 79 NULL, NULL, NULL, NULL)
81 NULL)
82IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY, 80IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY,
83 NID_aes_256, 16, 32, 16, 128, 81 NID_aes_256, 16, 32, 16, 128,
84 0, aes_init_key, NULL, 82 EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
85 EVP_CIPHER_set_asn1_iv, 83 aes_init_key,
86 EVP_CIPHER_get_asn1_iv, 84 NULL, NULL, NULL, NULL)
87 NULL)
88 85
89#define IMPLEMENT_AES_CFBR(ksize,cbits) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16) 86#define IMPLEMENT_AES_CFBR(ksize,cbits,flags) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16,flags)
90 87
91IMPLEMENT_AES_CFBR(128,1) 88IMPLEMENT_AES_CFBR(128,1,EVP_CIPH_FLAG_FIPS)
92IMPLEMENT_AES_CFBR(192,1) 89IMPLEMENT_AES_CFBR(192,1,EVP_CIPH_FLAG_FIPS)
93IMPLEMENT_AES_CFBR(256,1) 90IMPLEMENT_AES_CFBR(256,1,EVP_CIPH_FLAG_FIPS)
94 91
95IMPLEMENT_AES_CFBR(128,8) 92IMPLEMENT_AES_CFBR(128,8,EVP_CIPH_FLAG_FIPS)
96IMPLEMENT_AES_CFBR(192,8) 93IMPLEMENT_AES_CFBR(192,8,EVP_CIPH_FLAG_FIPS)
97IMPLEMENT_AES_CFBR(256,8) 94IMPLEMENT_AES_CFBR(256,8,EVP_CIPH_FLAG_FIPS)
98 95
99static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 96static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
100 const unsigned char *iv, int enc) 97 const unsigned char *iv, int enc)
diff --git a/src/lib/libssl/src/crypto/evp/e_des.c b/src/lib/libssl/src/crypto/evp/e_des.c
index 856323648c..04376df232 100644
--- a/src/lib/libssl/src/crypto/evp/e_des.c
+++ b/src/lib/libssl/src/crypto/evp/e_des.c
@@ -129,18 +129,21 @@ static int des_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
129 } 129 }
130 130
131BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64, 131BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64,
132 EVP_CIPH_RAND_KEY, des_init_key, NULL, 132 EVP_CIPH_RAND_KEY,
133 des_init_key, NULL,
133 EVP_CIPHER_set_asn1_iv, 134 EVP_CIPHER_set_asn1_iv,
134 EVP_CIPHER_get_asn1_iv, 135 EVP_CIPHER_get_asn1_iv,
135 des_ctrl) 136 des_ctrl)
136 137
137BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,1, 138BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,1,
138 EVP_CIPH_RAND_KEY, des_init_key,NULL, 139 EVP_CIPH_RAND_KEY,
140 des_init_key, NULL,
139 EVP_CIPHER_set_asn1_iv, 141 EVP_CIPHER_set_asn1_iv,
140 EVP_CIPHER_get_asn1_iv,des_ctrl) 142 EVP_CIPHER_get_asn1_iv,des_ctrl)
141 143
142BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,8, 144BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,8,
143 EVP_CIPH_RAND_KEY,des_init_key,NULL, 145 EVP_CIPH_RAND_KEY,
146 des_init_key,NULL,
144 EVP_CIPHER_set_asn1_iv, 147 EVP_CIPHER_set_asn1_iv,
145 EVP_CIPHER_get_asn1_iv,des_ctrl) 148 EVP_CIPHER_get_asn1_iv,des_ctrl)
146 149
diff --git a/src/lib/libssl/src/crypto/evp/e_des3.c b/src/lib/libssl/src/crypto/evp/e_des3.c
index ac148efab2..f910af19b1 100644
--- a/src/lib/libssl/src/crypto/evp/e_des3.c
+++ b/src/lib/libssl/src/crypto/evp/e_des3.c
@@ -111,8 +111,7 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
111#ifdef KSSL_DEBUG 111#ifdef KSSL_DEBUG
112 { 112 {
113 int i; 113 int i;
114 char *cp; 114 printf("des_ede_cbc_cipher(ctx=%lx, buflen=%d)\n", (unsigned long)ctx, ctx->buf_len);
115 printf("des_ede_cbc_cipher(ctx=%lx, buflen=%d)\n", ctx, ctx->buf_len);
116 printf("\t iv= "); 115 printf("\t iv= ");
117 for(i=0;i<8;i++) 116 for(i=0;i<8;i++)
118 printf("%02X",ctx->iv[i]); 117 printf("%02X",ctx->iv[i]);
@@ -164,9 +163,9 @@ static int des_ede3_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
164 } 163 }
165 164
166BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64, 165BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
167 EVP_CIPH_RAND_KEY, des_ede_init_key, NULL, 166 EVP_CIPH_RAND_KEY|EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
168 EVP_CIPHER_set_asn1_iv, 167 des_ede_init_key,
169 EVP_CIPHER_get_asn1_iv, 168 NULL, NULL, NULL,
170 des3_ctrl) 169 des3_ctrl)
171 170
172#define des_ede3_cfb64_cipher des_ede_cfb64_cipher 171#define des_ede3_cfb64_cipher des_ede_cfb64_cipher
@@ -175,21 +174,21 @@ BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
175#define des_ede3_ecb_cipher des_ede_ecb_cipher 174#define des_ede3_ecb_cipher des_ede_ecb_cipher
176 175
177BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64, 176BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64,
178 EVP_CIPH_RAND_KEY, des_ede3_init_key, NULL, 177 EVP_CIPH_RAND_KEY|EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
179 EVP_CIPHER_set_asn1_iv, 178 des_ede3_init_key,
180 EVP_CIPHER_get_asn1_iv, 179 NULL, NULL, NULL,
181 des3_ctrl) 180 des3_ctrl)
182 181
183BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,1, 182BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,1,
184 EVP_CIPH_RAND_KEY, des_ede3_init_key,NULL, 183 EVP_CIPH_RAND_KEY|EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
185 EVP_CIPHER_set_asn1_iv, 184 des_ede3_init_key,
186 EVP_CIPHER_get_asn1_iv, 185 NULL, NULL, NULL,
187 des3_ctrl) 186 des3_ctrl)
188 187
189BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,8, 188BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,8,
190 EVP_CIPH_RAND_KEY, des_ede3_init_key,NULL, 189 EVP_CIPH_RAND_KEY|EVP_CIPH_FLAG_FIPS|EVP_CIPH_FLAG_DEFAULT_ASN1,
191 EVP_CIPHER_set_asn1_iv, 190 des_ede3_init_key,
192 EVP_CIPHER_get_asn1_iv, 191 NULL, NULL, NULL,
193 des3_ctrl) 192 des3_ctrl)
194 193
195static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, 194static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
@@ -216,7 +215,7 @@ static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
216#ifdef KSSL_DEBUG 215#ifdef KSSL_DEBUG
217 { 216 {
218 int i; 217 int i;
219 printf("des_ede3_init_key(ctx=%lx)\n", ctx); 218 printf("des_ede3_init_key(ctx=%lx)\n", (unsigned long)ctx);
220 printf("\tKEY= "); 219 printf("\tKEY= ");
221 for(i=0;i<24;i++) printf("%02X",key[i]); printf("\n"); 220 for(i=0;i<24;i++) printf("%02X",key[i]); printf("\n");
222 printf("\t IV= "); 221 printf("\t IV= ");
diff --git a/src/lib/libssl/src/crypto/evp/e_null.c b/src/lib/libssl/src/crypto/evp/e_null.c
index 5205259f18..0872d733e4 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=
69 { 69 {
70 NID_undef, 70 NID_undef,
71 1,0,0, 71 1,0,0,
72 0, 72 EVP_CIPH_FLAG_FIPS,
73 null_init_key, 73 null_init_key,
74 null_cipher, 74 null_cipher,
75 NULL, 75 NULL,
diff --git a/src/lib/libssl/src/crypto/evp/e_rc4.c b/src/lib/libssl/src/crypto/evp/e_rc4.c
index 67af850bea..55baad7446 100644
--- a/src/lib/libssl/src/crypto/evp/e_rc4.c
+++ b/src/lib/libssl/src/crypto/evp/e_rc4.c
@@ -64,6 +64,7 @@
64#include <openssl/evp.h> 64#include <openssl/evp.h>
65#include <openssl/objects.h> 65#include <openssl/objects.h>
66#include <openssl/rc4.h> 66#include <openssl/rc4.h>
67#include "evp_locl.h"
67 68
68/* FIXME: surely this is available elsewhere? */ 69/* FIXME: surely this is available elsewhere? */
69#define EVP_RC4_KEY_SIZE 16 70#define EVP_RC4_KEY_SIZE 16
diff --git a/src/lib/libssl/src/crypto/evp/evp.h b/src/lib/libssl/src/crypto/evp/evp.h
index 1aa2d6fb35..51011f2b14 100644
--- a/src/lib/libssl/src/crypto/evp/evp.h
+++ b/src/lib/libssl/src/crypto/evp/evp.h
@@ -75,6 +75,10 @@
75#include <openssl/bio.h> 75#include <openssl/bio.h>
76#endif 76#endif
77 77
78#ifdef OPENSSL_FIPS
79#include <openssl/fips.h>
80#endif
81
78/* 82/*
79#define EVP_RC2_KEY_SIZE 16 83#define EVP_RC2_KEY_SIZE 16
80#define EVP_RC4_KEY_SIZE 16 84#define EVP_RC4_KEY_SIZE 16
@@ -250,9 +254,19 @@ typedef int evp_verify_method(int type,const unsigned char *m,
250 unsigned int m_length,const unsigned char *sigbuf, 254 unsigned int m_length,const unsigned char *sigbuf,
251 unsigned int siglen, void *key); 255 unsigned int siglen, void *key);
252 256
257typedef struct
258 {
259 EVP_MD_CTX *mctx;
260 void *key;
261 } EVP_MD_SVCTX;
262
253#define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single 263#define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single
254 * block */ 264 * block */
255 265
266#define EVP_MD_FLAG_FIPS 0x0400 /* Note if suitable for use in FIPS mode */
267
268#define EVP_MD_FLAG_SVCTX 0x0800 /* pass EVP_MD_SVCTX to sign/verify */
269
256#define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0} 270#define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0}
257 271
258#ifndef OPENSSL_NO_DSA 272#ifndef OPENSSL_NO_DSA
@@ -306,6 +320,15 @@ struct env_md_ctx_st
306#define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008 /* Allow use of non FIPS digest 320#define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008 /* Allow use of non FIPS digest
307 * in FIPS mode */ 321 * in FIPS mode */
308 322
323#define EVP_MD_CTX_FLAG_PAD_MASK 0xF0 /* RSA mode to use */
324#define EVP_MD_CTX_FLAG_PAD_PKCS1 0x00 /* PKCS#1 v1.5 mode */
325#define EVP_MD_CTX_FLAG_PAD_X931 0x10 /* X9.31 mode */
326#define EVP_MD_CTX_FLAG_PAD_PSS 0x20 /* PSS mode */
327#define M_EVP_MD_CTX_FLAG_PSS_SALT(ctx) \
328 ((ctx->flags>>16) &0xFFFF) /* seed length */
329#define EVP_MD_CTX_FLAG_PSS_MDLEN 0xFFFF /* salt len same as digest */
330#define EVP_MD_CTX_FLAG_PSS_MREC 0xFFFE /* salt max or auto recovered */
331
309struct evp_cipher_st 332struct evp_cipher_st
310 { 333 {
311 int nid; 334 int nid;
@@ -349,6 +372,14 @@ struct evp_cipher_st
349#define EVP_CIPH_NO_PADDING 0x100 372#define EVP_CIPH_NO_PADDING 0x100
350/* cipher handles random key generation */ 373/* cipher handles random key generation */
351#define EVP_CIPH_RAND_KEY 0x200 374#define EVP_CIPH_RAND_KEY 0x200
375/* Note if suitable for use in FIPS mode */
376#define EVP_CIPH_FLAG_FIPS 0x400
377/* Allow non FIPS cipher in FIPS mode */
378#define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0x800
379/* Allow use default ASN1 get/set iv */
380#define EVP_CIPH_FLAG_DEFAULT_ASN1 0x1000
381/* Buffer length in bits not bytes: CFB1 mode only */
382#define EVP_CIPH_FLAG_LENGTH_BITS 0x2000
352 383
353/* ctrl() values */ 384/* ctrl() values */
354 385
@@ -432,6 +463,18 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
432#define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) 463#define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a))
433#define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) 464#define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a))
434 465
466/* Macros to reduce FIPS dependencies: do NOT use in applications */
467#define M_EVP_MD_size(e) ((e)->md_size)
468#define M_EVP_MD_block_size(e) ((e)->block_size)
469#define M_EVP_MD_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs))
470#define M_EVP_MD_CTX_clear_flags(ctx,flgs) ((ctx)->flags&=~(flgs))
471#define M_EVP_MD_CTX_test_flags(ctx,flgs) ((ctx)->flags&(flgs))
472#define M_EVP_MD_type(e) ((e)->type)
473#define M_EVP_MD_CTX_type(e) M_EVP_MD_type(M_EVP_MD_CTX_md(e))
474#define M_EVP_MD_CTX_md(e) ((e)->digest)
475
476#define M_EVP_CIPHER_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs))
477
435int EVP_MD_type(const EVP_MD *md); 478int EVP_MD_type(const EVP_MD *md);
436#define EVP_MD_nid(e) EVP_MD_type(e) 479#define EVP_MD_nid(e) EVP_MD_type(e)
437#define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e)) 480#define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e))
@@ -527,6 +570,10 @@ int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md,
527 const unsigned char *salt, const unsigned char *data, 570 const unsigned char *salt, const unsigned char *data,
528 int datal, int count, unsigned char *key,unsigned char *iv); 571 int datal, int count, unsigned char *key,unsigned char *iv);
529 572
573void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
574void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
575int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx,int flags);
576
530int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, 577int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher,
531 const unsigned char *key, const unsigned char *iv); 578 const unsigned char *key, const unsigned char *iv);
532int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl, 579int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
@@ -885,6 +932,24 @@ int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
885 EVP_PBE_KEYGEN *keygen); 932 EVP_PBE_KEYGEN *keygen);
886void EVP_PBE_cleanup(void); 933void EVP_PBE_cleanup(void);
887 934
935#ifdef OPENSSL_FIPS
936#ifndef OPENSSL_NO_ENGINE
937void int_EVP_MD_set_engine_callbacks(
938 int (*eng_md_init)(ENGINE *impl),
939 int (*eng_md_fin)(ENGINE *impl),
940 int (*eng_md_evp)
941 (EVP_MD_CTX *ctx, const EVP_MD **ptype, ENGINE *impl));
942void int_EVP_MD_init_engine_callbacks(void);
943void int_EVP_CIPHER_set_engine_callbacks(
944 int (*eng_ciph_fin)(ENGINE *impl),
945 int (*eng_ciph_evp)
946 (EVP_CIPHER_CTX *ctx, const EVP_CIPHER **pciph, ENGINE *impl));
947void int_EVP_CIPHER_init_engine_callbacks(void);
948#endif
949#endif
950
951void EVP_add_alg_module(void);
952
888/* BEGIN ERROR CODES */ 953/* BEGIN ERROR CODES */
889/* The following lines are auto generated by the script mkerr.pl. Any changes 954/* The following lines are auto generated by the script mkerr.pl. Any changes
890 * made after this point may be overwritten when the script is next run. 955 * made after this point may be overwritten when the script is next run.
@@ -895,16 +960,23 @@ void ERR_load_EVP_strings(void);
895 960
896/* Function codes. */ 961/* Function codes. */
897#define EVP_F_AES_INIT_KEY 133 962#define EVP_F_AES_INIT_KEY 133
963#define EVP_F_ALG_MODULE_INIT 138
898#define EVP_F_CAMELLIA_INIT_KEY 159 964#define EVP_F_CAMELLIA_INIT_KEY 159
899#define EVP_F_D2I_PKEY 100 965#define EVP_F_D2I_PKEY 100
966#define EVP_F_DO_EVP_ENC_ENGINE 140
967#define EVP_F_DO_EVP_ENC_ENGINE_FULL 141
968#define EVP_F_DO_EVP_MD_ENGINE 139
969#define EVP_F_DO_EVP_MD_ENGINE_FULL 142
900#define EVP_F_DSAPKEY2PKCS8 134 970#define EVP_F_DSAPKEY2PKCS8 134
901#define EVP_F_DSA_PKEY2PKCS8 135 971#define EVP_F_DSA_PKEY2PKCS8 135
902#define EVP_F_ECDSA_PKEY2PKCS8 129 972#define EVP_F_ECDSA_PKEY2PKCS8 129
903#define EVP_F_ECKEY_PKEY2PKCS8 132 973#define EVP_F_ECKEY_PKEY2PKCS8 132
974#define EVP_F_EVP_CIPHERINIT 137
904#define EVP_F_EVP_CIPHERINIT_EX 123 975#define EVP_F_EVP_CIPHERINIT_EX 123
905#define EVP_F_EVP_CIPHER_CTX_CTRL 124 976#define EVP_F_EVP_CIPHER_CTX_CTRL 124
906#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 977#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122
907#define EVP_F_EVP_DECRYPTFINAL_EX 101 978#define EVP_F_EVP_DECRYPTFINAL_EX 101
979#define EVP_F_EVP_DIGESTINIT 136
908#define EVP_F_EVP_DIGESTINIT_EX 128 980#define EVP_F_EVP_DIGESTINIT_EX 128
909#define EVP_F_EVP_ENCRYPTFINAL_EX 127 981#define EVP_F_EVP_ENCRYPTFINAL_EX 127
910#define EVP_F_EVP_MD_CTX_COPY_EX 110 982#define EVP_F_EVP_MD_CTX_COPY_EX 110
@@ -946,15 +1018,20 @@ void ERR_load_EVP_strings(void);
946#define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 1018#define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138
947#define EVP_R_DECODE_ERROR 114 1019#define EVP_R_DECODE_ERROR 114
948#define EVP_R_DIFFERENT_KEY_TYPES 101 1020#define EVP_R_DIFFERENT_KEY_TYPES 101
1021#define EVP_R_DISABLED_FOR_FIPS 144
949#define EVP_R_ENCODE_ERROR 115 1022#define EVP_R_ENCODE_ERROR 115
1023#define EVP_R_ERROR_LOADING_SECTION 145
1024#define EVP_R_ERROR_SETTING_FIPS_MODE 146
950#define EVP_R_EVP_PBE_CIPHERINIT_ERROR 119 1025#define EVP_R_EVP_PBE_CIPHERINIT_ERROR 119
951#define EVP_R_EXPECTING_AN_RSA_KEY 127 1026#define EVP_R_EXPECTING_AN_RSA_KEY 127
952#define EVP_R_EXPECTING_A_DH_KEY 128 1027#define EVP_R_EXPECTING_A_DH_KEY 128
953#define EVP_R_EXPECTING_A_DSA_KEY 129 1028#define EVP_R_EXPECTING_A_DSA_KEY 129
954#define EVP_R_EXPECTING_A_ECDSA_KEY 141 1029#define EVP_R_EXPECTING_A_ECDSA_KEY 141
955#define EVP_R_EXPECTING_A_EC_KEY 142 1030#define EVP_R_EXPECTING_A_EC_KEY 142
1031#define EVP_R_FIPS_MODE_NOT_SUPPORTED 147
956#define EVP_R_INITIALIZATION_ERROR 134 1032#define EVP_R_INITIALIZATION_ERROR 134
957#define EVP_R_INPUT_NOT_INITIALIZED 111 1033#define EVP_R_INPUT_NOT_INITIALIZED 111
1034#define EVP_R_INVALID_FIPS_MODE 148
958#define EVP_R_INVALID_KEY_LENGTH 130 1035#define EVP_R_INVALID_KEY_LENGTH 130
959#define EVP_R_IV_TOO_LARGE 102 1036#define EVP_R_IV_TOO_LARGE 102
960#define EVP_R_KEYGEN_FAILURE 120 1037#define EVP_R_KEYGEN_FAILURE 120
@@ -966,6 +1043,7 @@ void ERR_load_EVP_strings(void);
966#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 1043#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105
967#define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117 1044#define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117
968#define EVP_R_PUBLIC_KEY_NOT_RSA 106 1045#define EVP_R_PUBLIC_KEY_NOT_RSA 106
1046#define EVP_R_UNKNOWN_OPTION 149
969#define EVP_R_UNKNOWN_PBE_ALGORITHM 121 1047#define EVP_R_UNKNOWN_PBE_ALGORITHM 121
970#define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS 135 1048#define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS 135
971#define EVP_R_UNSUPPORTED_CIPHER 107 1049#define EVP_R_UNSUPPORTED_CIPHER 107
diff --git a/src/lib/libssl/src/crypto/evp/evp_acnf.c b/src/lib/libssl/src/crypto/evp/evp_acnf.c
index ff3e311cc5..643a1864e8 100644
--- a/src/lib/libssl/src/crypto/evp/evp_acnf.c
+++ b/src/lib/libssl/src/crypto/evp/evp_acnf.c
@@ -1,5 +1,5 @@
1/* evp_acnf.c */ 1/* evp_acnf.c */
2/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/evp/evp_enc.c b/src/lib/libssl/src/crypto/evp/evp_enc.c
index 6e582c458d..30e0ca4d9f 100644
--- a/src/lib/libssl/src/crypto/evp/evp_enc.c
+++ b/src/lib/libssl/src/crypto/evp/evp_enc.c
@@ -66,13 +66,15 @@
66#endif 66#endif
67#include "evp_locl.h" 67#include "evp_locl.h"
68 68
69const char EVP_version[]="EVP" OPENSSL_VERSION_PTEXT; 69#ifdef OPENSSL_FIPS
70 #define M_do_cipher(ctx, out, in, inl) \
71 EVP_Cipher(ctx,out,in,inl)
72#else
73 #define M_do_cipher(ctx, out, in, inl) \
74 ctx->cipher->do_cipher(ctx,out,in,inl)
75#endif
70 76
71void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) 77const char EVP_version[]="EVP" OPENSSL_VERSION_PTEXT;
72 {
73 memset(ctx,0,sizeof(EVP_CIPHER_CTX));
74 /* ctx->cipher=NULL; */
75 }
76 78
77EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) 79EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void)
78 { 80 {
@@ -90,144 +92,6 @@ int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
90 return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc); 92 return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc);
91 } 93 }
92 94
93int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,
94 const unsigned char *key, const unsigned char *iv, int enc)
95 {
96 if (enc == -1)
97 enc = ctx->encrypt;
98 else
99 {
100 if (enc)
101 enc = 1;
102 ctx->encrypt = enc;
103 }
104#ifndef OPENSSL_NO_ENGINE
105 /* Whether it's nice or not, "Inits" can be used on "Final"'d contexts
106 * so this context may already have an ENGINE! Try to avoid releasing
107 * the previous handle, re-querying for an ENGINE, and having a
108 * reinitialisation, when it may all be unecessary. */
109 if (ctx->engine && ctx->cipher && (!cipher ||
110 (cipher && (cipher->nid == ctx->cipher->nid))))
111 goto skip_to_init;
112#endif
113 if (cipher)
114 {
115 /* Ensure a context left lying around from last time is cleared
116 * (the previous check attempted to avoid this if the same
117 * ENGINE and EVP_CIPHER could be used). */
118 EVP_CIPHER_CTX_cleanup(ctx);
119
120 /* Restore encrypt field: it is zeroed by cleanup */
121 ctx->encrypt = enc;
122#ifndef OPENSSL_NO_ENGINE
123 if(impl)
124 {
125 if (!ENGINE_init(impl))
126 {
127 EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
128 return 0;
129 }
130 }
131 else
132 /* Ask if an ENGINE is reserved for this job */
133 impl = ENGINE_get_cipher_engine(cipher->nid);
134 if(impl)
135 {
136 /* There's an ENGINE for this job ... (apparently) */
137 const EVP_CIPHER *c = ENGINE_get_cipher(impl, cipher->nid);
138 if(!c)
139 {
140 /* One positive side-effect of US's export
141 * control history, is that we should at least
142 * be able to avoid using US mispellings of
143 * "initialisation"? */
144 EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
145 return 0;
146 }
147 /* We'll use the ENGINE's private cipher definition */
148 cipher = c;
149 /* Store the ENGINE functional reference so we know
150 * 'cipher' came from an ENGINE and we need to release
151 * it when done. */
152 ctx->engine = impl;
153 }
154 else
155 ctx->engine = NULL;
156#endif
157
158 ctx->cipher=cipher;
159 if (ctx->cipher->ctx_size)
160 {
161 ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
162 if (!ctx->cipher_data)
163 {
164 EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE);
165 return 0;
166 }
167 }
168 else
169 {
170 ctx->cipher_data = NULL;
171 }
172 ctx->key_len = cipher->key_len;
173 ctx->flags = 0;
174 if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT)
175 {
176 if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL))
177 {
178 EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
179 return 0;
180 }
181 }
182 }
183 else if(!ctx->cipher)
184 {
185 EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_NO_CIPHER_SET);
186 return 0;
187 }
188#ifndef OPENSSL_NO_ENGINE
189skip_to_init:
190#endif
191 /* we assume block size is a power of 2 in *cryptUpdate */
192 OPENSSL_assert(ctx->cipher->block_size == 1
193 || ctx->cipher->block_size == 8
194 || ctx->cipher->block_size == 16);
195
196 if(!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_CUSTOM_IV)) {
197 switch(EVP_CIPHER_CTX_mode(ctx)) {
198
199 case EVP_CIPH_STREAM_CIPHER:
200 case EVP_CIPH_ECB_MODE:
201 break;
202
203 case EVP_CIPH_CFB_MODE:
204 case EVP_CIPH_OFB_MODE:
205
206 ctx->num = 0;
207
208 case EVP_CIPH_CBC_MODE:
209
210 OPENSSL_assert(EVP_CIPHER_CTX_iv_length(ctx) <=
211 (int)sizeof(ctx->iv));
212 if(iv) memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx));
213 memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));
214 break;
215
216 default:
217 return 0;
218 break;
219 }
220 }
221
222 if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {
223 if(!ctx->cipher->init(ctx,key,iv,enc)) return 0;
224 }
225 ctx->buf_len=0;
226 ctx->final_used=0;
227 ctx->block_mask=ctx->cipher->block_size-1;
228 return 1;
229 }
230
231int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, 95int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
232 const unsigned char *in, int inl) 96 const unsigned char *in, int inl)
233 { 97 {
@@ -287,7 +151,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
287 151
288 if(ctx->buf_len == 0 && (inl&(ctx->block_mask)) == 0) 152 if(ctx->buf_len == 0 && (inl&(ctx->block_mask)) == 0)
289 { 153 {
290 if(ctx->cipher->do_cipher(ctx,out,in,inl)) 154 if(M_do_cipher(ctx,out,in,inl))
291 { 155 {
292 *outl=inl; 156 *outl=inl;
293 return 1; 157 return 1;
@@ -314,7 +178,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
314 { 178 {
315 j=bl-i; 179 j=bl-i;
316 memcpy(&(ctx->buf[i]),in,j); 180 memcpy(&(ctx->buf[i]),in,j);
317 if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,bl)) return 0; 181 if(!M_do_cipher(ctx,out,ctx->buf,bl)) return 0;
318 inl-=j; 182 inl-=j;
319 in+=j; 183 in+=j;
320 out+=bl; 184 out+=bl;
@@ -327,7 +191,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
327 inl-=i; 191 inl-=i;
328 if (inl > 0) 192 if (inl > 0)
329 { 193 {
330 if(!ctx->cipher->do_cipher(ctx,out,in,inl)) return 0; 194 if(!M_do_cipher(ctx,out,in,inl)) return 0;
331 *outl+=inl; 195 *outl+=inl;
332 } 196 }
333 197
@@ -371,7 +235,7 @@ int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
371 n=b-bl; 235 n=b-bl;
372 for (i=bl; i<b; i++) 236 for (i=bl; i<b; i++)
373 ctx->buf[i]=n; 237 ctx->buf[i]=n;
374 ret=ctx->cipher->do_cipher(ctx,out,ctx->buf,b); 238 ret=M_do_cipher(ctx,out,ctx->buf,b);
375 239
376 240
377 if(ret) 241 if(ret)
@@ -493,28 +357,6 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
493 } 357 }
494 } 358 }
495 359
496int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c)
497 {
498 if (c->cipher != NULL)
499 {
500 if(c->cipher->cleanup && !c->cipher->cleanup(c))
501 return 0;
502 /* Cleanse cipher context data */
503 if (c->cipher_data)
504 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size);
505 }
506 if (c->cipher_data)
507 OPENSSL_free(c->cipher_data);
508#ifndef OPENSSL_NO_ENGINE
509 if (c->engine)
510 /* The EVP_CIPHER we used belongs to an ENGINE, release the
511 * functional reference we held for this reason. */
512 ENGINE_finish(c->engine);
513#endif
514 memset(c,0,sizeof(EVP_CIPHER_CTX));
515 return 1;
516 }
517
518int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen) 360int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen)
519 { 361 {
520 if(c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH) 362 if(c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH)
@@ -536,27 +378,6 @@ int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad)
536 return 1; 378 return 1;
537 } 379 }
538 380
539int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr)
540{
541 int ret;
542 if(!ctx->cipher) {
543 EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_NO_CIPHER_SET);
544 return 0;
545 }
546
547 if(!ctx->cipher->ctrl) {
548 EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_CTRL_NOT_IMPLEMENTED);
549 return 0;
550 }
551
552 ret = ctx->cipher->ctrl(ctx, type, arg, ptr);
553 if(ret == -1) {
554 EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED);
555 return 0;
556 }
557 return ret;
558}
559
560int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) 381int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key)
561 { 382 {
562 if (ctx->cipher->flags & EVP_CIPH_RAND_KEY) 383 if (ctx->cipher->flags & EVP_CIPH_RAND_KEY)
@@ -566,3 +387,54 @@ int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key)
566 return 1; 387 return 1;
567 } 388 }
568 389
390#ifndef OPENSSL_NO_ENGINE
391
392#ifdef OPENSSL_FIPS
393
394static int do_evp_enc_engine_full(EVP_CIPHER_CTX *ctx, const EVP_CIPHER **pcipher, ENGINE *impl)
395 {
396 if(impl)
397 {
398 if (!ENGINE_init(impl))
399 {
400 EVPerr(EVP_F_DO_EVP_ENC_ENGINE_FULL, EVP_R_INITIALIZATION_ERROR);
401 return 0;
402 }
403 }
404 else
405 /* Ask if an ENGINE is reserved for this job */
406 impl = ENGINE_get_cipher_engine((*pcipher)->nid);
407 if(impl)
408 {
409 /* There's an ENGINE for this job ... (apparently) */
410 const EVP_CIPHER *c = ENGINE_get_cipher(impl, (*pcipher)->nid);
411 if(!c)
412 {
413 /* One positive side-effect of US's export
414 * control history, is that we should at least
415 * be able to avoid using US mispellings of
416 * "initialisation"? */
417 EVPerr(EVP_F_DO_EVP_ENC_ENGINE_FULL, EVP_R_INITIALIZATION_ERROR);
418 return 0;
419 }
420 /* We'll use the ENGINE's private cipher definition */
421 *pcipher = c;
422 /* Store the ENGINE functional reference so we know
423 * 'cipher' came from an ENGINE and we need to release
424 * it when done. */
425 ctx->engine = impl;
426 }
427 else
428 ctx->engine = NULL;
429 return 1;
430 }
431
432void int_EVP_CIPHER_init_engine_callbacks(void)
433 {
434 int_EVP_CIPHER_set_engine_callbacks(
435 ENGINE_finish, do_evp_enc_engine_full);
436 }
437
438#endif
439
440#endif
diff --git a/src/lib/libssl/src/crypto/evp/evp_err.c b/src/lib/libssl/src/crypto/evp/evp_err.c
index e8c9e8de9c..b5b900d4fe 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 @@
1/* crypto/evp/evp_err.c */ 1/* crypto/evp/evp_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -71,16 +71,23 @@
71static ERR_STRING_DATA EVP_str_functs[]= 71static ERR_STRING_DATA EVP_str_functs[]=
72 { 72 {
73{ERR_FUNC(EVP_F_AES_INIT_KEY), "AES_INIT_KEY"}, 73{ERR_FUNC(EVP_F_AES_INIT_KEY), "AES_INIT_KEY"},
74{ERR_FUNC(EVP_F_ALG_MODULE_INIT), "ALG_MODULE_INIT"},
74{ERR_FUNC(EVP_F_CAMELLIA_INIT_KEY), "CAMELLIA_INIT_KEY"}, 75{ERR_FUNC(EVP_F_CAMELLIA_INIT_KEY), "CAMELLIA_INIT_KEY"},
75{ERR_FUNC(EVP_F_D2I_PKEY), "D2I_PKEY"}, 76{ERR_FUNC(EVP_F_D2I_PKEY), "D2I_PKEY"},
77{ERR_FUNC(EVP_F_DO_EVP_ENC_ENGINE), "DO_EVP_ENC_ENGINE"},
78{ERR_FUNC(EVP_F_DO_EVP_ENC_ENGINE_FULL), "DO_EVP_ENC_ENGINE_FULL"},
79{ERR_FUNC(EVP_F_DO_EVP_MD_ENGINE), "DO_EVP_MD_ENGINE"},
80{ERR_FUNC(EVP_F_DO_EVP_MD_ENGINE_FULL), "DO_EVP_MD_ENGINE_FULL"},
76{ERR_FUNC(EVP_F_DSAPKEY2PKCS8), "DSAPKEY2PKCS8"}, 81{ERR_FUNC(EVP_F_DSAPKEY2PKCS8), "DSAPKEY2PKCS8"},
77{ERR_FUNC(EVP_F_DSA_PKEY2PKCS8), "DSA_PKEY2PKCS8"}, 82{ERR_FUNC(EVP_F_DSA_PKEY2PKCS8), "DSA_PKEY2PKCS8"},
78{ERR_FUNC(EVP_F_ECDSA_PKEY2PKCS8), "ECDSA_PKEY2PKCS8"}, 83{ERR_FUNC(EVP_F_ECDSA_PKEY2PKCS8), "ECDSA_PKEY2PKCS8"},
79{ERR_FUNC(EVP_F_ECKEY_PKEY2PKCS8), "ECKEY_PKEY2PKCS8"}, 84{ERR_FUNC(EVP_F_ECKEY_PKEY2PKCS8), "ECKEY_PKEY2PKCS8"},
85{ERR_FUNC(EVP_F_EVP_CIPHERINIT), "EVP_CipherInit"},
80{ERR_FUNC(EVP_F_EVP_CIPHERINIT_EX), "EVP_CipherInit_ex"}, 86{ERR_FUNC(EVP_F_EVP_CIPHERINIT_EX), "EVP_CipherInit_ex"},
81{ERR_FUNC(EVP_F_EVP_CIPHER_CTX_CTRL), "EVP_CIPHER_CTX_ctrl"}, 87{ERR_FUNC(EVP_F_EVP_CIPHER_CTX_CTRL), "EVP_CIPHER_CTX_ctrl"},
82{ERR_FUNC(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH), "EVP_CIPHER_CTX_set_key_length"}, 88{ERR_FUNC(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH), "EVP_CIPHER_CTX_set_key_length"},
83{ERR_FUNC(EVP_F_EVP_DECRYPTFINAL_EX), "EVP_DecryptFinal_ex"}, 89{ERR_FUNC(EVP_F_EVP_DECRYPTFINAL_EX), "EVP_DecryptFinal_ex"},
90{ERR_FUNC(EVP_F_EVP_DIGESTINIT), "EVP_DigestInit"},
84{ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX), "EVP_DigestInit_ex"}, 91{ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX), "EVP_DigestInit_ex"},
85{ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX), "EVP_EncryptFinal_ex"}, 92{ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX), "EVP_EncryptFinal_ex"},
86{ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX), "EVP_MD_CTX_copy_ex"}, 93{ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX), "EVP_MD_CTX_copy_ex"},
@@ -125,15 +132,20 @@ static ERR_STRING_DATA EVP_str_reasons[]=
125{ERR_REASON(EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH),"data not multiple of block length"}, 132{ERR_REASON(EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH),"data not multiple of block length"},
126{ERR_REASON(EVP_R_DECODE_ERROR) ,"decode error"}, 133{ERR_REASON(EVP_R_DECODE_ERROR) ,"decode error"},
127{ERR_REASON(EVP_R_DIFFERENT_KEY_TYPES) ,"different key types"}, 134{ERR_REASON(EVP_R_DIFFERENT_KEY_TYPES) ,"different key types"},
135{ERR_REASON(EVP_R_DISABLED_FOR_FIPS) ,"disabled for fips"},
128{ERR_REASON(EVP_R_ENCODE_ERROR) ,"encode error"}, 136{ERR_REASON(EVP_R_ENCODE_ERROR) ,"encode error"},
137{ERR_REASON(EVP_R_ERROR_LOADING_SECTION) ,"error loading section"},
138{ERR_REASON(EVP_R_ERROR_SETTING_FIPS_MODE),"error setting fips mode"},
129{ERR_REASON(EVP_R_EVP_PBE_CIPHERINIT_ERROR),"evp pbe cipherinit error"}, 139{ERR_REASON(EVP_R_EVP_PBE_CIPHERINIT_ERROR),"evp pbe cipherinit error"},
130{ERR_REASON(EVP_R_EXPECTING_AN_RSA_KEY) ,"expecting an rsa key"}, 140{ERR_REASON(EVP_R_EXPECTING_AN_RSA_KEY) ,"expecting an rsa key"},
131{ERR_REASON(EVP_R_EXPECTING_A_DH_KEY) ,"expecting a dh key"}, 141{ERR_REASON(EVP_R_EXPECTING_A_DH_KEY) ,"expecting a dh key"},
132{ERR_REASON(EVP_R_EXPECTING_A_DSA_KEY) ,"expecting a dsa key"}, 142{ERR_REASON(EVP_R_EXPECTING_A_DSA_KEY) ,"expecting a dsa key"},
133{ERR_REASON(EVP_R_EXPECTING_A_ECDSA_KEY) ,"expecting a ecdsa key"}, 143{ERR_REASON(EVP_R_EXPECTING_A_ECDSA_KEY) ,"expecting a ecdsa key"},
134{ERR_REASON(EVP_R_EXPECTING_A_EC_KEY) ,"expecting a ec key"}, 144{ERR_REASON(EVP_R_EXPECTING_A_EC_KEY) ,"expecting a ec key"},
145{ERR_REASON(EVP_R_FIPS_MODE_NOT_SUPPORTED),"fips mode not supported"},
135{ERR_REASON(EVP_R_INITIALIZATION_ERROR) ,"initialization error"}, 146{ERR_REASON(EVP_R_INITIALIZATION_ERROR) ,"initialization error"},
136{ERR_REASON(EVP_R_INPUT_NOT_INITIALIZED) ,"input not initialized"}, 147{ERR_REASON(EVP_R_INPUT_NOT_INITIALIZED) ,"input not initialized"},
148{ERR_REASON(EVP_R_INVALID_FIPS_MODE) ,"invalid fips mode"},
137{ERR_REASON(EVP_R_INVALID_KEY_LENGTH) ,"invalid key length"}, 149{ERR_REASON(EVP_R_INVALID_KEY_LENGTH) ,"invalid key length"},
138{ERR_REASON(EVP_R_IV_TOO_LARGE) ,"iv too large"}, 150{ERR_REASON(EVP_R_IV_TOO_LARGE) ,"iv too large"},
139{ERR_REASON(EVP_R_KEYGEN_FAILURE) ,"keygen failure"}, 151{ERR_REASON(EVP_R_KEYGEN_FAILURE) ,"keygen failure"},
@@ -145,6 +157,8 @@ static ERR_STRING_DATA EVP_str_reasons[]=
145{ERR_REASON(EVP_R_NO_VERIFY_FUNCTION_CONFIGURED),"no verify function configured"}, 157{ERR_REASON(EVP_R_NO_VERIFY_FUNCTION_CONFIGURED),"no verify function configured"},
146{ERR_REASON(EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE),"pkcs8 unknown broken type"}, 158{ERR_REASON(EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE),"pkcs8 unknown broken type"},
147{ERR_REASON(EVP_R_PUBLIC_KEY_NOT_RSA) ,"public key not rsa"}, 159{ERR_REASON(EVP_R_PUBLIC_KEY_NOT_RSA) ,"public key not rsa"},
160{ERR_REASON(EVP_R_SEED_KEY_SETUP_FAILED) ,"seed key setup failed"},
161{ERR_REASON(EVP_R_UNKNOWN_OPTION) ,"unknown option"},
148{ERR_REASON(EVP_R_UNKNOWN_PBE_ALGORITHM) ,"unknown pbe algorithm"}, 162{ERR_REASON(EVP_R_UNKNOWN_PBE_ALGORITHM) ,"unknown pbe algorithm"},
149{ERR_REASON(EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS),"unsuported number of rounds"}, 163{ERR_REASON(EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS),"unsuported number of rounds"},
150{ERR_REASON(EVP_R_UNSUPPORTED_CIPHER) ,"unsupported cipher"}, 164{ERR_REASON(EVP_R_UNSUPPORTED_CIPHER) ,"unsupported cipher"},
diff --git a/src/lib/libssl/src/crypto/evp/evp_lib.c b/src/lib/libssl/src/crypto/evp/evp_lib.c
index edb28ef38e..174cf6c594 100644
--- a/src/lib/libssl/src/crypto/evp/evp_lib.c
+++ b/src/lib/libssl/src/crypto/evp/evp_lib.c
@@ -67,6 +67,8 @@ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
67 67
68 if (c->cipher->set_asn1_parameters != NULL) 68 if (c->cipher->set_asn1_parameters != NULL)
69 ret=c->cipher->set_asn1_parameters(c,type); 69 ret=c->cipher->set_asn1_parameters(c,type);
70 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1)
71 ret=EVP_CIPHER_set_asn1_iv(c, type);
70 else 72 else
71 ret=-1; 73 ret=-1;
72 return(ret); 74 return(ret);
@@ -78,6 +80,8 @@ int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
78 80
79 if (c->cipher->get_asn1_parameters != NULL) 81 if (c->cipher->get_asn1_parameters != NULL)
80 ret=c->cipher->get_asn1_parameters(c,type); 82 ret=c->cipher->get_asn1_parameters(c,type);
83 else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1)
84 ret=EVP_CIPHER_get_asn1_iv(c, type);
81 else 85 else
82 ret=-1; 86 ret=-1;
83 return(ret); 87 return(ret);
@@ -178,11 +182,6 @@ int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx)
178 return ctx->cipher->block_size; 182 return ctx->cipher->block_size;
179 } 183 }
180 184
181int EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl)
182 {
183 return ctx->cipher->do_cipher(ctx,out,in,inl);
184 }
185
186const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx) 185const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx)
187 { 186 {
188 return ctx->cipher; 187 return ctx->cipher;
@@ -193,11 +192,6 @@ unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher)
193 return cipher->flags; 192 return cipher->flags;
194 } 193 }
195 194
196unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx)
197 {
198 return ctx->cipher->flags;
199 }
200
201void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx) 195void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx)
202 { 196 {
203 return ctx->app_data; 197 return ctx->app_data;
@@ -213,11 +207,6 @@ int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher)
213 return cipher->iv_len; 207 return cipher->iv_len;
214 } 208 }
215 209
216int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx)
217 {
218 return ctx->cipher->iv_len;
219 }
220
221int EVP_CIPHER_key_length(const EVP_CIPHER *cipher) 210int EVP_CIPHER_key_length(const EVP_CIPHER *cipher)
222 { 211 {
223 return cipher->key_len; 212 return cipher->key_len;
@@ -228,11 +217,6 @@ int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx)
228 return ctx->key_len; 217 return ctx->key_len;
229 } 218 }
230 219
231int EVP_CIPHER_nid(const EVP_CIPHER *cipher)
232 {
233 return cipher->nid;
234 }
235
236int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx) 220int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx)
237 { 221 {
238 return ctx->cipher->nid; 222 return ctx->cipher->nid;
@@ -277,3 +261,18 @@ int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags)
277 { 261 {
278 return (ctx->flags & flags); 262 return (ctx->flags & flags);
279 } 263 }
264
265void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags)
266 {
267 ctx->flags |= flags;
268 }
269
270void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags)
271 {
272 ctx->flags &= ~flags;
273 }
274
275int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags)
276 {
277 return (ctx->flags & flags);
278 }
diff --git a/src/lib/libssl/src/crypto/evp/evp_locl.h b/src/lib/libssl/src/crypto/evp/evp_locl.h
index 073b0adcff..eabcc96f30 100644
--- a/src/lib/libssl/src/crypto/evp/evp_locl.h
+++ b/src/lib/libssl/src/crypto/evp/evp_locl.h
@@ -1,5 +1,5 @@
1/* evp_locl.h */ 1/* evp_locl.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -92,7 +92,7 @@ static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns
92#define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \ 92#define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \
93static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ 93static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
94{\ 94{\
95 cprefix##_cfb##cbits##_encrypt(in, out, (long)(cbits==1?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\ 95 cprefix##_cfb##cbits##_encrypt(in, out, (long)((cbits==1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
96 return 1;\ 96 return 1;\
97} 97}
98 98
@@ -226,11 +226,27 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; }
226 226
227#define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data) 227#define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data)
228 228
229#define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len) \ 229#define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len,fl) \
230 BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \ 230 BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \
231 BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \ 231 BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \
232 NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \ 232 NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \
233 0, cipher##_init_key, NULL, \ 233 (fl)|EVP_CIPH_FLAG_DEFAULT_ASN1, \
234 EVP_CIPHER_set_asn1_iv, \ 234 cipher##_init_key, NULL, NULL, NULL, NULL)
235 EVP_CIPHER_get_asn1_iv, \ 235
236 NULL) 236#ifdef OPENSSL_FIPS
237#define RC2_set_key private_RC2_set_key
238#define RC4_set_key private_RC4_set_key
239#define CAST_set_key private_CAST_set_key
240#define RC5_32_set_key private_RC5_32_set_key
241#define BF_set_key private_BF_set_key
242#define Camellia_set_key private_Camellia_set_key
243#define idea_set_encrypt_key private_idea_set_encrypt_key
244
245#define MD5_Init private_MD5_Init
246#define MD4_Init private_MD4_Init
247#define MD2_Init private_MD2_Init
248#define MDC2_Init private_MDC2_Init
249#define SHA_Init private_SHA_Init
250
251#endif
252
diff --git a/src/lib/libssl/src/crypto/evp/evp_pbe.c b/src/lib/libssl/src/crypto/evp/evp_pbe.c
index c26d2de0f3..5e830be65f 100644
--- a/src/lib/libssl/src/crypto/evp/evp_pbe.c
+++ b/src/lib/libssl/src/crypto/evp/evp_pbe.c
@@ -1,5 +1,5 @@
1/* evp_pbe.c */ 1/* evp_pbe.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/evp/evp_pkey.c b/src/lib/libssl/src/crypto/evp/evp_pkey.c
index 0147f3e02a..10d9e9e772 100644
--- a/src/lib/libssl/src/crypto/evp/evp_pkey.c
+++ b/src/lib/libssl/src/crypto/evp/evp_pkey.c
@@ -1,5 +1,5 @@
1/* evp_pkey.c */ 1/* evp_pkey.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/evp/m_dss.c b/src/lib/libssl/src/crypto/evp/m_dss.c
index a948c77fa4..6b0c0aa7a3 100644
--- a/src/lib/libssl/src/crypto/evp/m_dss.c
+++ b/src/lib/libssl/src/crypto/evp/m_dss.c
@@ -81,7 +81,7 @@ static const EVP_MD dsa_md=
81 NID_dsaWithSHA, 81 NID_dsaWithSHA,
82 NID_dsaWithSHA, 82 NID_dsaWithSHA,
83 SHA_DIGEST_LENGTH, 83 SHA_DIGEST_LENGTH,
84 0, 84 EVP_MD_FLAG_FIPS,
85 init, 85 init,
86 update, 86 update,
87 final, 87 final,
diff --git a/src/lib/libssl/src/crypto/evp/m_dss1.c b/src/lib/libssl/src/crypto/evp/m_dss1.c
index c12e13972b..da8babc147 100644
--- a/src/lib/libssl/src/crypto/evp/m_dss1.c
+++ b/src/lib/libssl/src/crypto/evp/m_dss1.c
@@ -68,6 +68,8 @@
68#include <openssl/dsa.h> 68#include <openssl/dsa.h>
69#endif 69#endif
70 70
71#ifndef OPENSSL_FIPS
72
71static int init(EVP_MD_CTX *ctx) 73static int init(EVP_MD_CTX *ctx)
72 { return SHA1_Init(ctx->md_data); } 74 { return SHA1_Init(ctx->md_data); }
73 75
@@ -98,3 +100,4 @@ const EVP_MD *EVP_dss1(void)
98 return(&dss1_md); 100 return(&dss1_md);
99 } 101 }
100#endif 102#endif
103#endif
diff --git a/src/lib/libssl/src/crypto/evp/m_md2.c b/src/lib/libssl/src/crypto/evp/m_md2.c
index 5ce849f161..8eee6236ba 100644
--- a/src/lib/libssl/src/crypto/evp/m_md2.c
+++ b/src/lib/libssl/src/crypto/evp/m_md2.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include "evp_locl.h"
61 62
62#ifndef OPENSSL_NO_MD2 63#ifndef OPENSSL_NO_MD2
63 64
diff --git a/src/lib/libssl/src/crypto/evp/m_md4.c b/src/lib/libssl/src/crypto/evp/m_md4.c
index 1e0b7c5b42..5cd2ab5ade 100644
--- a/src/lib/libssl/src/crypto/evp/m_md4.c
+++ b/src/lib/libssl/src/crypto/evp/m_md4.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include "evp_locl.h"
61 62
62#ifndef OPENSSL_NO_MD4 63#ifndef OPENSSL_NO_MD4
63 64
diff --git a/src/lib/libssl/src/crypto/evp/m_md5.c b/src/lib/libssl/src/crypto/evp/m_md5.c
index 63c142119e..6455829671 100644
--- a/src/lib/libssl/src/crypto/evp/m_md5.c
+++ b/src/lib/libssl/src/crypto/evp/m_md5.c
@@ -62,6 +62,7 @@
62#ifndef OPENSSL_NO_MD5 62#ifndef OPENSSL_NO_MD5
63 63
64#include <openssl/evp.h> 64#include <openssl/evp.h>
65#include "evp_locl.h"
65#include <openssl/objects.h> 66#include <openssl/objects.h>
66#include <openssl/x509.h> 67#include <openssl/x509.h>
67#include <openssl/md5.h> 68#include <openssl/md5.h>
diff --git a/src/lib/libssl/src/crypto/evp/m_mdc2.c b/src/lib/libssl/src/crypto/evp/m_mdc2.c
index 36c4e9b134..9f9bcf06ed 100644
--- a/src/lib/libssl/src/crypto/evp/m_mdc2.c
+++ b/src/lib/libssl/src/crypto/evp/m_mdc2.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include "evp_locl.h"
61 62
62#ifndef OPENSSL_NO_MDC2 63#ifndef OPENSSL_NO_MDC2
63 64
diff --git a/src/lib/libssl/src/crypto/evp/m_sha.c b/src/lib/libssl/src/crypto/evp/m_sha.c
index acccc8f92d..3f30dfc579 100644
--- a/src/lib/libssl/src/crypto/evp/m_sha.c
+++ b/src/lib/libssl/src/crypto/evp/m_sha.c
@@ -58,6 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include "evp_locl.h"
61 62
62#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) 63#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0)
63 64
diff --git a/src/lib/libssl/src/crypto/evp/m_sha1.c b/src/lib/libssl/src/crypto/evp/m_sha1.c
index 4679b1c463..471ec30be0 100644
--- a/src/lib/libssl/src/crypto/evp/m_sha1.c
+++ b/src/lib/libssl/src/crypto/evp/m_sha1.c
@@ -68,6 +68,8 @@
68#include <openssl/rsa.h> 68#include <openssl/rsa.h>
69#endif 69#endif
70 70
71#ifndef OPENSSL_FIPS
72
71static int init(EVP_MD_CTX *ctx) 73static int init(EVP_MD_CTX *ctx)
72 { return SHA1_Init(ctx->md_data); } 74 { return SHA1_Init(ctx->md_data); }
73 75
@@ -97,7 +99,6 @@ const EVP_MD *EVP_sha1(void)
97 { 99 {
98 return(&sha1_md); 100 return(&sha1_md);
99 } 101 }
100#endif
101 102
102#ifndef OPENSSL_NO_SHA256 103#ifndef OPENSSL_NO_SHA256
103static int init224(EVP_MD_CTX *ctx) 104static int init224(EVP_MD_CTX *ctx)
@@ -202,3 +203,7 @@ static const EVP_MD sha512_md=
202const EVP_MD *EVP_sha512(void) 203const EVP_MD *EVP_sha512(void)
203 { return(&sha512_md); } 204 { return(&sha512_md); }
204#endif /* ifndef OPENSSL_NO_SHA512 */ 205#endif /* ifndef OPENSSL_NO_SHA512 */
206
207#endif
208
209#endif
diff --git a/src/lib/libssl/src/crypto/evp/names.c b/src/lib/libssl/src/crypto/evp/names.c
index 88c1e780dd..e2e04c3570 100644
--- a/src/lib/libssl/src/crypto/evp/names.c
+++ b/src/lib/libssl/src/crypto/evp/names.c
@@ -66,6 +66,10 @@ int EVP_add_cipher(const EVP_CIPHER *c)
66 { 66 {
67 int r; 67 int r;
68 68
69#ifdef OPENSSL_FIPS
70 OPENSSL_init();
71#endif
72
69 r=OBJ_NAME_add(OBJ_nid2sn(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c); 73 r=OBJ_NAME_add(OBJ_nid2sn(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c);
70 if (r == 0) return(0); 74 if (r == 0) return(0);
71 r=OBJ_NAME_add(OBJ_nid2ln(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c); 75 r=OBJ_NAME_add(OBJ_nid2ln(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c);
@@ -77,6 +81,9 @@ int EVP_add_digest(const EVP_MD *md)
77 int r; 81 int r;
78 const char *name; 82 const char *name;
79 83
84#ifdef OPENSSL_FIPS
85 OPENSSL_init();
86#endif
80 name=OBJ_nid2sn(md->type); 87 name=OBJ_nid2sn(md->type);
81 r=OBJ_NAME_add(name,OBJ_NAME_TYPE_MD_METH,(const char *)md); 88 r=OBJ_NAME_add(name,OBJ_NAME_TYPE_MD_METH,(const char *)md);
82 if (r == 0) return(0); 89 if (r == 0) return(0);
diff --git a/src/lib/libssl/src/crypto/evp/p5_crpt.c b/src/lib/libssl/src/crypto/evp/p5_crpt.c
index 48d50014a0..2a265fdee2 100644
--- a/src/lib/libssl/src/crypto/evp/p5_crpt.c
+++ b/src/lib/libssl/src/crypto/evp/p5_crpt.c
@@ -1,5 +1,5 @@
1/* p5_crpt.c */ 1/* p5_crpt.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/evp/p5_crpt2.c b/src/lib/libssl/src/crypto/evp/p5_crpt2.c
index c969d5a206..6bec77baf9 100644
--- a/src/lib/libssl/src/crypto/evp/p5_crpt2.c
+++ b/src/lib/libssl/src/crypto/evp/p5_crpt2.c
@@ -1,5 +1,5 @@
1/* p5_crpt2.c */ 1/* p5_crpt2.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/evp/p_sign.c b/src/lib/libssl/src/crypto/evp/p_sign.c
index e4ae5906f5..bf41a0db68 100644
--- a/src/lib/libssl/src/crypto/evp/p_sign.c
+++ b/src/lib/libssl/src/crypto/evp/p_sign.c
@@ -84,10 +84,6 @@ int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
84 MS_STATIC EVP_MD_CTX tmp_ctx; 84 MS_STATIC EVP_MD_CTX tmp_ctx;
85 85
86 *siglen=0; 86 *siglen=0;
87 EVP_MD_CTX_init(&tmp_ctx);
88 EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
89 EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
90 EVP_MD_CTX_cleanup(&tmp_ctx);
91 for (i=0; i<4; i++) 87 for (i=0; i<4; i++)
92 { 88 {
93 v=ctx->digest->required_pkey_type[i]; 89 v=ctx->digest->required_pkey_type[i];
@@ -108,7 +104,23 @@ int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
108 EVPerr(EVP_F_EVP_SIGNFINAL,EVP_R_NO_SIGN_FUNCTION_CONFIGURED); 104 EVPerr(EVP_F_EVP_SIGNFINAL,EVP_R_NO_SIGN_FUNCTION_CONFIGURED);
109 return(0); 105 return(0);
110 } 106 }
111 return(ctx->digest->sign(ctx->digest->type,m,m_len,sigret,siglen, 107 EVP_MD_CTX_init(&tmp_ctx);
112 pkey->pkey.ptr)); 108 EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
109 if (ctx->digest->flags & EVP_MD_FLAG_SVCTX)
110 {
111 EVP_MD_SVCTX sctmp;
112 sctmp.mctx = &tmp_ctx;
113 sctmp.key = pkey->pkey.ptr;
114 i = ctx->digest->sign(ctx->digest->type,
115 NULL, -1, sigret, siglen, &sctmp);
116 }
117 else
118 {
119 EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
120 i = ctx->digest->sign(ctx->digest->type,m,m_len,sigret,siglen,
121 pkey->pkey.ptr);
122 }
123 EVP_MD_CTX_cleanup(&tmp_ctx);
124 return i;
113 } 125 }
114 126
diff --git a/src/lib/libssl/src/crypto/evp/p_verify.c b/src/lib/libssl/src/crypto/evp/p_verify.c
index 21a40a375e..2d46dffe7e 100644
--- a/src/lib/libssl/src/crypto/evp/p_verify.c
+++ b/src/lib/libssl/src/crypto/evp/p_verify.c
@@ -85,17 +85,29 @@ int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
85 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_WRONG_PUBLIC_KEY_TYPE); 85 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_WRONG_PUBLIC_KEY_TYPE);
86 return(-1); 86 return(-1);
87 } 87 }
88 EVP_MD_CTX_init(&tmp_ctx); 88 if (ctx->digest->verify == NULL)
89 EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
90 EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
91 EVP_MD_CTX_cleanup(&tmp_ctx);
92 if (ctx->digest->verify == NULL)
93 { 89 {
94 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_NO_VERIFY_FUNCTION_CONFIGURED); 90 EVPerr(EVP_F_EVP_VERIFYFINAL,EVP_R_NO_VERIFY_FUNCTION_CONFIGURED);
95 return(0); 91 return(0);
96 } 92 }
97 93
98 return(ctx->digest->verify(ctx->digest->type,m,m_len, 94 EVP_MD_CTX_init(&tmp_ctx);
99 sigbuf,siglen,pkey->pkey.ptr)); 95 EVP_MD_CTX_copy_ex(&tmp_ctx,ctx);
96 if (ctx->digest->flags & EVP_MD_FLAG_SVCTX)
97 {
98 EVP_MD_SVCTX sctmp;
99 sctmp.mctx = &tmp_ctx;
100 sctmp.key = pkey->pkey.ptr;
101 i = ctx->digest->verify(ctx->digest->type,
102 NULL, -1, sigbuf, siglen, &sctmp);
103 }
104 else
105 {
106 EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len);
107 i = ctx->digest->verify(ctx->digest->type,m,m_len,
108 sigbuf,siglen,pkey->pkey.ptr);
109 }
110 EVP_MD_CTX_cleanup(&tmp_ctx);
111 return i;
100 } 112 }
101 113
diff --git a/src/lib/libssl/src/crypto/hmac/hmac.c b/src/lib/libssl/src/crypto/hmac/hmac.c
index 1d140f7adb..cbc1c76a57 100644
--- a/src/lib/libssl/src/crypto/hmac/hmac.c
+++ b/src/lib/libssl/src/crypto/hmac/hmac.c
@@ -61,6 +61,8 @@
61#include "cryptlib.h" 61#include "cryptlib.h"
62#include <openssl/hmac.h> 62#include <openssl/hmac.h>
63 63
64#ifndef OPENSSL_FIPS
65
64void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 66void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
65 const EVP_MD *md, ENGINE *impl) 67 const EVP_MD *md, ENGINE *impl)
66 { 68 {
@@ -178,3 +180,4 @@ void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags)
178 EVP_MD_CTX_set_flags(&ctx->md_ctx, flags); 180 EVP_MD_CTX_set_flags(&ctx->md_ctx, flags);
179 } 181 }
180 182
183#endif
diff --git a/src/lib/libssl/src/crypto/idea/idea.h b/src/lib/libssl/src/crypto/idea/idea.h
index bf97a37e39..a137d4cbce 100644
--- a/src/lib/libssl/src/crypto/idea/idea.h
+++ b/src/lib/libssl/src/crypto/idea/idea.h
@@ -83,6 +83,9 @@ typedef struct idea_key_st
83const char *idea_options(void); 83const char *idea_options(void);
84void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, 84void idea_ecb_encrypt(const unsigned char *in, unsigned char *out,
85 IDEA_KEY_SCHEDULE *ks); 85 IDEA_KEY_SCHEDULE *ks);
86#ifdef OPENSSL_FIPS
87void private_idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks);
88#endif
86void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 89void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks);
87void idea_set_decrypt_key(const IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 90void idea_set_decrypt_key(const IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk);
88void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, 91void idea_cbc_encrypt(const unsigned char *in, unsigned char *out,
diff --git a/src/lib/libssl/src/crypto/install.com b/src/lib/libssl/src/crypto/install.com
index 58a4fecdaa..ffad1f97a7 100644
--- a/src/lib/libssl/src/crypto/install.com
+++ b/src/lib/libssl/src/crypto/install.com
@@ -35,12 +35,12 @@ $
35$ SDIRS := ,- 35$ SDIRS := ,-
36 OBJECTS,- 36 OBJECTS,-
37 MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,- 37 MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,-
38 DES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,- 38 DES,AES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,-
39 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,- 39 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,-
40 BUFFER,BIO,STACK,LHASH,RAND,ERR,- 40 BUFFER,BIO,STACK,LHASH,RAND,ERR,-
41 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,- 41 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,-
42 UI,KRB5,- 42 UI,KRB5,-
43 STORE,CMS,PQUEUE 43 STORE,PQUEUE,JPAKE
44$ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,- 44$ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,-
45 symhacks.h,ossl_typ.h 45 symhacks.h,ossl_typ.h
46$ EXHEADER_OBJECTS := objects.h,obj_mac.h 46$ EXHEADER_OBJECTS := objects.h,obj_mac.h
@@ -52,6 +52,7 @@ $ EXHEADER_MDC2 := mdc2.h
52$ EXHEADER_HMAC := hmac.h 52$ EXHEADER_HMAC := hmac.h
53$ EXHEADER_RIPEMD := ripemd.h 53$ EXHEADER_RIPEMD := ripemd.h
54$ EXHEADER_DES := des.h,des_old.h 54$ EXHEADER_DES := des.h,des_old.h
55$ EXHEADER_AES := aes.h
55$ EXHEADER_RC2 := rc2.h 56$ EXHEADER_RC2 := rc2.h
56$ EXHEADER_RC4 := rc4.h 57$ EXHEADER_RC4 := rc4.h
57$ EXHEADER_RC5 := rc5.h 58$ EXHEADER_RC5 := rc5.h
@@ -69,7 +70,6 @@ $ EXHEADER_DH := dh.h
69$ EXHEADER_ECDH := ecdh.h 70$ EXHEADER_ECDH := ecdh.h
70$ EXHEADER_DSO := dso.h 71$ EXHEADER_DSO := dso.h
71$ EXHEADER_ENGINE := engine.h 72$ EXHEADER_ENGINE := engine.h
72$ EXHEADER_AES := aes.h
73$ EXHEADER_BUFFER := buffer.h 73$ EXHEADER_BUFFER := buffer.h
74$ EXHEADER_BIO := bio.h 74$ EXHEADER_BIO := bio.h
75$ EXHEADER_STACK := stack.h,safestack.h 75$ EXHEADER_STACK := stack.h,safestack.h
@@ -92,7 +92,7 @@ $ EXHEADER_KRB5 := krb5_asn.h
92$! EXHEADER_STORE := store.h,str_compat.h 92$! EXHEADER_STORE := store.h,str_compat.h
93$ EXHEADER_STORE := store.h 93$ EXHEADER_STORE := store.h
94$ EXHEADER_PQUEUE := pqueue.h,pq_compat.h 94$ EXHEADER_PQUEUE := pqueue.h,pq_compat.h
95$ EXHEADER_CMS := cms.h 95$ EXHEADER_JPAKE := jpake.h
96$ LIBS := LIBCRYPTO 96$ LIBS := LIBCRYPTO
97$ 97$
98$ VEXE_DIR := [-.VAX.EXE.CRYPTO] 98$ VEXE_DIR := [-.VAX.EXE.CRYPTO]
diff --git a/src/lib/libssl/src/crypto/md2/md2.h b/src/lib/libssl/src/crypto/md2/md2.h
index a46120e7d4..d59c9f2593 100644
--- a/src/lib/libssl/src/crypto/md2/md2.h
+++ b/src/lib/libssl/src/crypto/md2/md2.h
@@ -81,6 +81,9 @@ typedef struct MD2state_st
81 } MD2_CTX; 81 } MD2_CTX;
82 82
83const char *MD2_options(void); 83const char *MD2_options(void);
84#ifdef OPENSSL_FIPS
85int private_MD2_Init(MD2_CTX *c);
86#endif
84int MD2_Init(MD2_CTX *c); 87int MD2_Init(MD2_CTX *c);
85int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); 88int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len);
86int MD2_Final(unsigned char *md, MD2_CTX *c); 89int 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 6f68b25c6a..cc4eeaf7a7 100644
--- a/src/lib/libssl/src/crypto/md2/md2_dgst.c
+++ b/src/lib/libssl/src/crypto/md2/md2_dgst.c
@@ -62,6 +62,11 @@
62#include <openssl/md2.h> 62#include <openssl/md2.h>
63#include <openssl/opensslv.h> 63#include <openssl/opensslv.h>
64#include <openssl/crypto.h> 64#include <openssl/crypto.h>
65#ifdef OPENSSL_FIPS
66#include <openssl/fips.h>
67#endif
68
69#include <openssl/err.h>
65 70
66const char MD2_version[]="MD2" OPENSSL_VERSION_PTEXT; 71const char MD2_version[]="MD2" OPENSSL_VERSION_PTEXT;
67 72
@@ -116,7 +121,7 @@ const char *MD2_options(void)
116 return("md2(int)"); 121 return("md2(int)");
117 } 122 }
118 123
119int MD2_Init(MD2_CTX *c) 124FIPS_NON_FIPS_MD_Init(MD2)
120 { 125 {
121 c->num=0; 126 c->num=0;
122 memset(c->state,0,sizeof c->state); 127 memset(c->state,0,sizeof c->state);
diff --git a/src/lib/libssl/src/crypto/md4/md4.h b/src/lib/libssl/src/crypto/md4/md4.h
index 5598c93a4f..ba1fe4a6ee 100644
--- a/src/lib/libssl/src/crypto/md4/md4.h
+++ b/src/lib/libssl/src/crypto/md4/md4.h
@@ -105,6 +105,9 @@ typedef struct MD4state_st
105 unsigned int num; 105 unsigned int num;
106 } MD4_CTX; 106 } MD4_CTX;
107 107
108#ifdef OPENSSL_FIPS
109int private_MD4_Init(MD4_CTX *c);
110#endif
108int MD4_Init(MD4_CTX *c); 111int MD4_Init(MD4_CTX *c);
109int MD4_Update(MD4_CTX *c, const void *data, size_t len); 112int MD4_Update(MD4_CTX *c, const void *data, size_t len);
110int MD4_Final(unsigned char *md, MD4_CTX *c); 113int 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 cfef94af39..0f5448601d 100644
--- a/src/lib/libssl/src/crypto/md4/md4_dgst.c
+++ b/src/lib/libssl/src/crypto/md4/md4_dgst.c
@@ -59,6 +59,11 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "md4_locl.h" 60#include "md4_locl.h"
61#include <openssl/opensslv.h> 61#include <openssl/opensslv.h>
62#include <openssl/err.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62 67
63const char MD4_version[]="MD4" OPENSSL_VERSION_PTEXT; 68const char MD4_version[]="MD4" OPENSSL_VERSION_PTEXT;
64 69
@@ -70,7 +75,7 @@ const char MD4_version[]="MD4" OPENSSL_VERSION_PTEXT;
70#define INIT_DATA_C (unsigned long)0x98badcfeL 75#define INIT_DATA_C (unsigned long)0x98badcfeL
71#define INIT_DATA_D (unsigned long)0x10325476L 76#define INIT_DATA_D (unsigned long)0x10325476L
72 77
73int MD4_Init(MD4_CTX *c) 78FIPS_NON_FIPS_MD_Init(MD4)
74 { 79 {
75 c->A=INIT_DATA_A; 80 c->A=INIT_DATA_A;
76 c->B=INIT_DATA_B; 81 c->B=INIT_DATA_B;
diff --git a/src/lib/libssl/src/crypto/md5/md5.h b/src/lib/libssl/src/crypto/md5/md5.h
index dbdc0e1abc..0761f84a27 100644
--- a/src/lib/libssl/src/crypto/md5/md5.h
+++ b/src/lib/libssl/src/crypto/md5/md5.h
@@ -105,6 +105,9 @@ typedef struct MD5state_st
105 unsigned int num; 105 unsigned int num;
106 } MD5_CTX; 106 } MD5_CTX;
107 107
108#ifdef OPENSSL_FIPS
109int private_MD5_Init(MD5_CTX *c);
110#endif
108int MD5_Init(MD5_CTX *c); 111int MD5_Init(MD5_CTX *c);
109int MD5_Update(MD5_CTX *c, const void *data, size_t len); 112int MD5_Update(MD5_CTX *c, const void *data, size_t len);
110int MD5_Final(unsigned char *md, MD5_CTX *c); 113int 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 b96e332ba4..47bb9020ee 100644
--- a/src/lib/libssl/src/crypto/md5/md5_dgst.c
+++ b/src/lib/libssl/src/crypto/md5/md5_dgst.c
@@ -59,6 +59,11 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "md5_locl.h" 60#include "md5_locl.h"
61#include <openssl/opensslv.h> 61#include <openssl/opensslv.h>
62#include <openssl/err.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62 67
63const char MD5_version[]="MD5" OPENSSL_VERSION_PTEXT; 68const char MD5_version[]="MD5" OPENSSL_VERSION_PTEXT;
64 69
@@ -70,7 +75,7 @@ const char MD5_version[]="MD5" OPENSSL_VERSION_PTEXT;
70#define INIT_DATA_C (unsigned long)0x98badcfeL 75#define INIT_DATA_C (unsigned long)0x98badcfeL
71#define INIT_DATA_D (unsigned long)0x10325476L 76#define INIT_DATA_D (unsigned long)0x10325476L
72 77
73int MD5_Init(MD5_CTX *c) 78FIPS_NON_FIPS_MD_Init(MD5)
74 { 79 {
75 c->A=INIT_DATA_A; 80 c->A=INIT_DATA_A;
76 c->B=INIT_DATA_B; 81 c->B=INIT_DATA_B;
diff --git a/src/lib/libssl/src/crypto/mdc2/Makefile b/src/lib/libssl/src/crypto/mdc2/Makefile
index 1d064f17a6..ea25688d88 100644
--- a/src/lib/libssl/src/crypto/mdc2/Makefile
+++ b/src/lib/libssl/src/crypto/mdc2/Makefile
@@ -33,7 +33,7 @@ top:
33all: lib 33all: lib
34 34
35lib: $(LIBOBJ) 35lib: $(LIBOBJ)
36 $(AR) $(LIB) $(LIBOBJ) 36 $(ARX) $(LIB) $(LIBOBJ)
37 $(RANLIB) $(LIB) || echo Never mind. 37 $(RANLIB) $(LIB) || echo Never mind.
38 @touch lib 38 @touch lib
39 39
diff --git a/src/lib/libssl/src/crypto/mdc2/mdc2.h b/src/lib/libssl/src/crypto/mdc2/mdc2.h
index 72778a5212..7e1354116a 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
80 int pad_type; /* either 1 or 2, default 1 */ 80 int pad_type; /* either 1 or 2, default 1 */
81 } MDC2_CTX; 81 } MDC2_CTX;
82 82
83 83#ifdef OPENSSL_FIPS
84int private_MDC2_Init(MDC2_CTX *c);
85#endif
84int MDC2_Init(MDC2_CTX *c); 86int MDC2_Init(MDC2_CTX *c);
85int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); 87int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len);
86int MDC2_Final(unsigned char *md, MDC2_CTX *c); 88int MDC2_Final(unsigned char *md, MDC2_CTX *c);
diff --git a/src/lib/libssl/src/crypto/mem.c b/src/lib/libssl/src/crypto/mem.c
index 6635167228..00ebaf0b9b 100644
--- a/src/lib/libssl/src/crypto/mem.c
+++ b/src/lib/libssl/src/crypto/mem.c
@@ -101,7 +101,7 @@ static void (*free_locked_func)(void *) = free;
101 101
102/* may be changed as long as 'allow_customize_debug' is set */ 102/* may be changed as long as 'allow_customize_debug' is set */
103/* XXX use correct function pointer types */ 103/* XXX use correct function pointer types */
104#ifdef CRYPTO_MDEBUG 104#if defined(CRYPTO_MDEBUG) && !defined(OPENSSL_FIPS)
105/* use default functions from mem_dbg.c */ 105/* use default functions from mem_dbg.c */
106static void (*malloc_debug_func)(void *,int,const char *,int,int) 106static void (*malloc_debug_func)(void *,int,const char *,int,int)
107 = CRYPTO_dbg_malloc; 107 = CRYPTO_dbg_malloc;
@@ -110,6 +110,14 @@ static void (*realloc_debug_func)(void *,void *,int,const char *,int,int)
110static void (*free_debug_func)(void *,int) = CRYPTO_dbg_free; 110static void (*free_debug_func)(void *,int) = CRYPTO_dbg_free;
111static void (*set_debug_options_func)(long) = CRYPTO_dbg_set_options; 111static void (*set_debug_options_func)(long) = CRYPTO_dbg_set_options;
112static long (*get_debug_options_func)(void) = CRYPTO_dbg_get_options; 112static long (*get_debug_options_func)(void) = CRYPTO_dbg_get_options;
113
114static int (*push_info_func)(const char *info, const char *file, int line)
115 = CRYPTO_dbg_push_info;
116static int (*pop_info_func)(void)
117 = CRYPTO_dbg_pop_info;
118static int (*remove_all_info_func)(void)
119 = CRYPTO_dbg_remove_all_info;
120
113#else 121#else
114/* applications can use CRYPTO_malloc_debug_init() to select above case 122/* applications can use CRYPTO_malloc_debug_init() to select above case
115 * at run-time */ 123 * at run-time */
@@ -119,6 +127,13 @@ static void (*realloc_debug_func)(void *,void *,int,const char *,int,int)
119static void (*free_debug_func)(void *,int) = NULL; 127static void (*free_debug_func)(void *,int) = NULL;
120static void (*set_debug_options_func)(long) = NULL; 128static void (*set_debug_options_func)(long) = NULL;
121static long (*get_debug_options_func)(void) = NULL; 129static long (*get_debug_options_func)(void) = NULL;
130
131
132static int (*push_info_func)(const char *info, const char *file, int line)
133 = NULL;
134static int (*pop_info_func)(void) = NULL;
135static int (*remove_all_info_func)(void) = NULL;
136
122#endif 137#endif
123 138
124 139
@@ -194,6 +209,15 @@ int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
194 return 1; 209 return 1;
195 } 210 }
196 211
212void CRYPTO_set_mem_info_functions(
213 int (*push_info_fn)(const char *info, const char *file, int line),
214 int (*pop_info_fn)(void),
215 int (*remove_all_info_fn)(void))
216 {
217 push_info_func = push_info_fn;
218 pop_info_func = pop_info_fn;
219 remove_all_info_func = remove_all_info_fn;
220 }
197 221
198void CRYPTO_get_mem_functions(void *(**m)(size_t), void *(**r)(void *, size_t), 222void CRYPTO_get_mem_functions(void *(**m)(size_t), void *(**r)(void *, size_t),
199 void (**f)(void *)) 223 void (**f)(void *))
@@ -399,3 +423,24 @@ long CRYPTO_get_mem_debug_options(void)
399 return get_debug_options_func(); 423 return get_debug_options_func();
400 return 0; 424 return 0;
401 } 425 }
426
427int CRYPTO_push_info_(const char *info, const char *file, int line)
428 {
429 if (push_info_func)
430 return push_info_func(info, file, line);
431 return 1;
432 }
433
434int CRYPTO_pop_info(void)
435 {
436 if (pop_info_func)
437 return pop_info_func();
438 return 1;
439 }
440
441int CRYPTO_remove_all_info(void)
442 {
443 if (remove_all_info_func)
444 return remove_all_info_func();
445 return 1;
446 }
diff --git a/src/lib/libssl/src/crypto/mem_dbg.c b/src/lib/libssl/src/crypto/mem_dbg.c
index 8316485217..dfeb084799 100644
--- a/src/lib/libssl/src/crypto/mem_dbg.c
+++ b/src/lib/libssl/src/crypto/mem_dbg.c
@@ -330,7 +330,7 @@ static APP_INFO *pop_info(void)
330 return(ret); 330 return(ret);
331 } 331 }
332 332
333int CRYPTO_push_info_(const char *info, const char *file, int line) 333int CRYPTO_dbg_push_info(const char *info, const char *file, int line)
334 { 334 {
335 APP_INFO *ami, *amim; 335 APP_INFO *ami, *amim;
336 int ret=0; 336 int ret=0;
@@ -380,7 +380,7 @@ int CRYPTO_push_info_(const char *info, const char *file, int line)
380 return(ret); 380 return(ret);
381 } 381 }
382 382
383int CRYPTO_pop_info(void) 383int CRYPTO_dbg_pop_info(void)
384 { 384 {
385 int ret=0; 385 int ret=0;
386 386
@@ -395,7 +395,7 @@ int CRYPTO_pop_info(void)
395 return(ret); 395 return(ret);
396 } 396 }
397 397
398int CRYPTO_remove_all_info(void) 398int CRYPTO_dbg_remove_all_info(void)
399 { 399 {
400 int ret=0; 400 int ret=0;
401 401
@@ -793,3 +793,25 @@ void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb)
793 lh_doall_arg(mh, LHASH_DOALL_ARG_FN(cb_leak), &cb); 793 lh_doall_arg(mh, LHASH_DOALL_ARG_FN(cb_leak), &cb);
794 CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC2); 794 CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC2);
795 } 795 }
796
797void CRYPTO_malloc_debug_init(void)
798 {
799 CRYPTO_set_mem_debug_functions(
800 CRYPTO_dbg_malloc,
801 CRYPTO_dbg_realloc,
802 CRYPTO_dbg_free,
803 CRYPTO_dbg_set_options,
804 CRYPTO_dbg_get_options);
805 CRYPTO_set_mem_info_functions(
806 CRYPTO_dbg_push_info,
807 CRYPTO_dbg_pop_info,
808 CRYPTO_dbg_remove_all_info);
809 }
810
811char *CRYPTO_strdup(const char *str, const char *file, int line)
812 {
813 char *ret = CRYPTO_malloc(strlen(str)+1, file, line);
814
815 strcpy(ret, str);
816 return ret;
817 }
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.pl b/src/lib/libssl/src/crypto/objects/obj_dat.pl
index 8a09a46ee6..7de2f77afd 100644
--- a/src/lib/libssl/src/crypto/objects/obj_dat.pl
+++ b/src/lib/libssl/src/crypto/objects/obj_dat.pl
@@ -2,7 +2,9 @@
2 2
3# fixes bug in floating point emulation on sparc64 when 3# fixes bug in floating point emulation on sparc64 when
4# this script produces off-by-one output on sparc64 4# this script produces off-by-one output on sparc64
5use integer; 5eval 'use integer;';
6
7print STDERR "Warning: perl module integer not found.\n" if ($@);
6 8
7sub obj_cmp 9sub obj_cmp
8 { 10 {
diff --git a/src/lib/libssl/src/crypto/objects/obj_mac.num b/src/lib/libssl/src/crypto/objects/obj_mac.num
index 53c9cb0d6a..e3f56bc52c 100644
--- a/src/lib/libssl/src/crypto/objects/obj_mac.num
+++ b/src/lib/libssl/src/crypto/objects/obj_mac.num
@@ -854,3 +854,5 @@ id_GostR3411_94_with_GostR3410_2001_cc 853
854id_GostR3410_2001_ParamSet_cc 854 854id_GostR3410_2001_ParamSet_cc 854
855hmac 855 855hmac 855
856LocalKeySet 856 856LocalKeySet 856
857freshest_crl 857
858id_on_permanentIdentifier 858
diff --git a/src/lib/libssl/src/crypto/objects/objects.txt b/src/lib/libssl/src/crypto/objects/objects.txt
index e009702e55..a6a811b8e7 100644
--- a/src/lib/libssl/src/crypto/objects/objects.txt
+++ b/src/lib/libssl/src/crypto/objects/objects.txt
@@ -557,6 +557,7 @@ id-cmc 24 : id-cmc-confirmCertAcceptance
557 557
558# other names 558# other names
559id-on 1 : id-on-personalData 559id-on 1 : id-on-personalData
560id-on 3 : id-on-permanentIdentifier : Permanent Identifier
560 561
561# personal data attributes 562# personal data attributes
562id-pda 1 : id-pda-dateOfBirth 563id-pda 1 : id-pda-dateOfBirth
@@ -726,6 +727,8 @@ id-ce 35 : authorityKeyIdentifier : X509v3 Authority Key Identifier
726id-ce 36 : policyConstraints : X509v3 Policy Constraints 727id-ce 36 : policyConstraints : X509v3 Policy Constraints
727!Cname ext-key-usage 728!Cname ext-key-usage
728id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage 729id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage
730!Cname freshest-crl
731id-ce 46 : freshestCRL : X509v3 Freshest CRL
729!Cname inhibit-any-policy 732!Cname inhibit-any-policy
730id-ce 54 : inhibitAnyPolicy : X509v3 Inhibit Any Policy 733id-ce 54 : inhibitAnyPolicy : X509v3 Inhibit Any Policy
731!Cname target-information 734!Cname target-information
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_asn.c b/src/lib/libssl/src/crypto/ocsp/ocsp_asn.c
index 39b7a1c568..bfe892ac70 100644
--- a/src/lib/libssl/src/crypto/ocsp/ocsp_asn.c
+++ b/src/lib/libssl/src/crypto/ocsp/ocsp_asn.c
@@ -1,5 +1,5 @@
1/* ocsp_asn.c */ 1/* ocsp_asn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_ht.c b/src/lib/libssl/src/crypto/ocsp/ocsp_ht.c
index a8e569b74a..6abb30b2c0 100644
--- a/src/lib/libssl/src/crypto/ocsp/ocsp_ht.c
+++ b/src/lib/libssl/src/crypto/ocsp/ocsp_ht.c
@@ -1,5 +1,5 @@
1/* ocsp_ht.c */ 1/* ocsp_ht.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -56,11 +56,12 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/asn1.h>
60#include <stdio.h> 59#include <stdio.h>
61#include <stdlib.h> 60#include <stdlib.h>
62#include <ctype.h> 61#include <ctype.h>
63#include <string.h> 62#include <string.h>
63#include "e_os.h"
64#include <openssl/asn1.h>
64#include <openssl/ocsp.h> 65#include <openssl/ocsp.h>
65#include <openssl/err.h> 66#include <openssl/err.h>
66#include <openssl/buffer.h> 67#include <openssl/buffer.h>
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_srv.c b/src/lib/libssl/src/crypto/ocsp/ocsp_srv.c
index fffa134e75..1c606dd0b6 100644
--- a/src/lib/libssl/src/crypto/ocsp/ocsp_srv.c
+++ b/src/lib/libssl/src/crypto/ocsp/ocsp_srv.c
@@ -1,5 +1,5 @@
1/* ocsp_srv.c */ 1/* ocsp_srv.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c b/src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c
index 23ea41c847..4a0c3870d8 100644
--- a/src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c
+++ b/src/lib/libssl/src/crypto/ocsp/ocsp_vfy.c
@@ -1,5 +1,5 @@
1/* ocsp_vfy.c */ 1/* ocsp_vfy.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/opensslconf.h.in b/src/lib/libssl/src/crypto/opensslconf.h.in
index cee83acf98..1c77f03c3d 100644
--- a/src/lib/libssl/src/crypto/opensslconf.h.in
+++ b/src/lib/libssl/src/crypto/opensslconf.h.in
@@ -1,5 +1,20 @@
1/* crypto/opensslconf.h.in */ 1/* crypto/opensslconf.h.in */
2 2
3#ifdef OPENSSL_DOING_MAKEDEPEND
4
5/* Include any symbols here that have to be explicitly set to enable a feature
6 * that should be visible to makedepend.
7 *
8 * [Our "make depend" doesn't actually look at this, we use actual build settings
9 * instead; we want to make it easy to remove subdirectories with disabled algorithms.]
10 */
11
12#ifndef OPENSSL_FIPS
13#define OPENSSL_FIPS
14#endif
15
16#endif
17
3/* Generate 80386 code? */ 18/* Generate 80386 code? */
4#undef I386_ONLY 19#undef I386_ONLY
5 20
diff --git a/src/lib/libssl/src/crypto/opensslv.h b/src/lib/libssl/src/crypto/opensslv.h
index 5bdd370ac9..09687b5136 100644
--- a/src/lib/libssl/src/crypto/opensslv.h
+++ b/src/lib/libssl/src/crypto/opensslv.h
@@ -25,11 +25,11 @@
25 * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for 25 * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
26 * major minor fix final patch/beta) 26 * major minor fix final patch/beta)
27 */ 27 */
28#define OPENSSL_VERSION_NUMBER 0x0090809fL 28#define OPENSSL_VERSION_NUMBER 0x009080afL
29#ifdef OPENSSL_FIPS 29#ifdef OPENSSL_FIPS
30#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8i-fips 15 Sep 2008" 30#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8j-fips 07 Jan 2009"
31#else 31#else
32#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8i 15 Sep 2008" 32#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8j 07 Jan 2009"
33#endif 33#endif
34#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT 34#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
35 35
diff --git a/src/lib/libssl/src/crypto/ossl_typ.h b/src/lib/libssl/src/crypto/ossl_typ.h
index 734200428f..0e7a380880 100644
--- a/src/lib/libssl/src/crypto/ossl_typ.h
+++ b/src/lib/libssl/src/crypto/ossl_typ.h
@@ -100,6 +100,8 @@ typedef int ASN1_NULL;
100#undef X509_EXTENSIONS 100#undef X509_EXTENSIONS
101#undef X509_CERT_PAIR 101#undef X509_CERT_PAIR
102#undef PKCS7_ISSUER_AND_SERIAL 102#undef PKCS7_ISSUER_AND_SERIAL
103#undef OCSP_REQUEST
104#undef OCSP_RESPONSE
103#endif 105#endif
104 106
105#ifdef BIGNUM 107#ifdef BIGNUM
diff --git a/src/lib/libssl/src/crypto/pem/pem.h b/src/lib/libssl/src/crypto/pem/pem.h
index 670afa670b..6f8e01544b 100644
--- a/src/lib/libssl/src/crypto/pem/pem.h
+++ b/src/lib/libssl/src/crypto/pem/pem.h
@@ -125,6 +125,7 @@ extern "C" {
125#define PEM_STRING_DSA "DSA PRIVATE KEY" 125#define PEM_STRING_DSA "DSA PRIVATE KEY"
126#define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY" 126#define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY"
127#define PEM_STRING_PKCS7 "PKCS7" 127#define PEM_STRING_PKCS7 "PKCS7"
128#define PEM_STRING_PKCS7_SIGNED "PKCS #7 SIGNED DATA"
128#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY" 129#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY"
129#define PEM_STRING_PKCS8INF "PRIVATE KEY" 130#define PEM_STRING_PKCS8INF "PRIVATE KEY"
130#define PEM_STRING_DHPARAMS "DH PARAMETERS" 131#define PEM_STRING_DHPARAMS "DH PARAMETERS"
diff --git a/src/lib/libssl/src/crypto/pem/pem_all.c b/src/lib/libssl/src/crypto/pem/pem_all.c
index 66cbc7eb82..69dd19bf2e 100644
--- a/src/lib/libssl/src/crypto/pem/pem_all.c
+++ b/src/lib/libssl/src/crypto/pem/pem_all.c
@@ -194,7 +194,49 @@ RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb,
194 194
195#endif 195#endif
196 196
197#ifdef OPENSSL_FIPS
198
199int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc,
200 unsigned char *kstr, int klen,
201 pem_password_cb *cb, void *u)
202{
203 EVP_PKEY *k;
204 int ret;
205 k = EVP_PKEY_new();
206 if (!k)
207 return 0;
208 EVP_PKEY_set1_RSA(k, x);
209
210 ret = PEM_write_bio_PrivateKey(bp, k, enc, kstr, klen, cb, u);
211 EVP_PKEY_free(k);
212 return ret;
213}
214
215#ifndef OPENSSL_NO_FP_API
216int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc,
217 unsigned char *kstr, int klen,
218 pem_password_cb *cb, void *u)
219{
220 EVP_PKEY *k;
221 int ret;
222 k = EVP_PKEY_new();
223 if (!k)
224 return 0;
225
226 EVP_PKEY_set1_RSA(k, x);
227
228 ret = PEM_write_PrivateKey(fp, k, enc, kstr, klen, cb, u);
229 EVP_PKEY_free(k);
230 return ret;
231}
232#endif
233
234#else
235
197IMPLEMENT_PEM_write_cb_const(RSAPrivateKey, RSA, PEM_STRING_RSA, RSAPrivateKey) 236IMPLEMENT_PEM_write_cb_const(RSAPrivateKey, RSA, PEM_STRING_RSA, RSAPrivateKey)
237
238#endif
239
198IMPLEMENT_PEM_rw_const(RSAPublicKey, RSA, PEM_STRING_RSA_PUBLIC, RSAPublicKey) 240IMPLEMENT_PEM_rw_const(RSAPublicKey, RSA, PEM_STRING_RSA_PUBLIC, RSAPublicKey)
199IMPLEMENT_PEM_rw(RSA_PUBKEY, RSA, PEM_STRING_PUBLIC, RSA_PUBKEY) 241IMPLEMENT_PEM_rw(RSA_PUBKEY, RSA, PEM_STRING_PUBLIC, RSA_PUBKEY)
200 242
@@ -224,7 +266,47 @@ DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb,
224 return pkey_get_dsa(pktmp, dsa); 266 return pkey_get_dsa(pktmp, dsa);
225} 267}
226 268
269#ifdef OPENSSL_FIPS
270
271int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, const EVP_CIPHER *enc,
272 unsigned char *kstr, int klen,
273 pem_password_cb *cb, void *u)
274{
275 EVP_PKEY *k;
276 int ret;
277 k = EVP_PKEY_new();
278 if (!k)
279 return 0;
280 EVP_PKEY_set1_DSA(k, x);
281
282 ret = PEM_write_bio_PrivateKey(bp, k, enc, kstr, klen, cb, u);
283 EVP_PKEY_free(k);
284 return ret;
285}
286
287#ifndef OPENSSL_NO_FP_API
288int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc,
289 unsigned char *kstr, int klen,
290 pem_password_cb *cb, void *u)
291{
292 EVP_PKEY *k;
293 int ret;
294 k = EVP_PKEY_new();
295 if (!k)
296 return 0;
297 EVP_PKEY_set1_DSA(k, x);
298 ret = PEM_write_PrivateKey(fp, k, enc, kstr, klen, cb, u);
299 EVP_PKEY_free(k);
300 return ret;
301}
302#endif
303
304#else
305
227IMPLEMENT_PEM_write_cb_const(DSAPrivateKey, DSA, PEM_STRING_DSA, DSAPrivateKey) 306IMPLEMENT_PEM_write_cb_const(DSAPrivateKey, DSA, PEM_STRING_DSA, DSAPrivateKey)
307
308#endif
309
228IMPLEMENT_PEM_rw(DSA_PUBKEY, DSA, PEM_STRING_PUBLIC, DSA_PUBKEY) 310IMPLEMENT_PEM_rw(DSA_PUBKEY, DSA, PEM_STRING_PUBLIC, DSA_PUBKEY)
229 311
230#ifndef OPENSSL_NO_FP_API 312#ifndef OPENSSL_NO_FP_API
@@ -270,8 +352,49 @@ EC_KEY *PEM_read_bio_ECPrivateKey(BIO *bp, EC_KEY **key, pem_password_cb *cb,
270 352
271IMPLEMENT_PEM_rw_const(ECPKParameters, EC_GROUP, PEM_STRING_ECPARAMETERS, ECPKParameters) 353IMPLEMENT_PEM_rw_const(ECPKParameters, EC_GROUP, PEM_STRING_ECPARAMETERS, ECPKParameters)
272 354
355
356
357#ifdef OPENSSL_FIPS
358
359int PEM_write_bio_ECPrivateKey(BIO *bp, EC_KEY *x, const EVP_CIPHER *enc,
360 unsigned char *kstr, int klen,
361 pem_password_cb *cb, void *u)
362{
363 EVP_PKEY *k;
364 int ret;
365 k = EVP_PKEY_new();
366 if (!k)
367 return 0;
368 EVP_PKEY_set1_EC_KEY(k, x);
369
370 ret = PEM_write_bio_PrivateKey(bp, k, enc, kstr, klen, cb, u);
371 EVP_PKEY_free(k);
372 return ret;
373}
374
375#ifndef OPENSSL_NO_FP_API
376int PEM_write_ECPrivateKey(FILE *fp, EC_KEY *x, const EVP_CIPHER *enc,
377 unsigned char *kstr, int klen,
378 pem_password_cb *cb, void *u)
379{
380 EVP_PKEY *k;
381 int ret;
382 k = EVP_PKEY_new();
383 if (!k)
384 return 0;
385 EVP_PKEY_set1_EC_KEY(k, x);
386 ret = PEM_write_PrivateKey(fp, k, enc, kstr, klen, cb, u);
387 EVP_PKEY_free(k);
388 return ret;
389}
390#endif
391
392#else
393
273IMPLEMENT_PEM_write_cb(ECPrivateKey, EC_KEY, PEM_STRING_ECPRIVATEKEY, ECPrivateKey) 394IMPLEMENT_PEM_write_cb(ECPrivateKey, EC_KEY, PEM_STRING_ECPRIVATEKEY, ECPrivateKey)
274 395
396#endif
397
275IMPLEMENT_PEM_rw(EC_PUBKEY, EC_KEY, PEM_STRING_PUBLIC, EC_PUBKEY) 398IMPLEMENT_PEM_rw(EC_PUBKEY, EC_KEY, PEM_STRING_PUBLIC, EC_PUBKEY)
276 399
277#ifndef OPENSSL_NO_FP_API 400#ifndef OPENSSL_NO_FP_API
@@ -301,8 +424,59 @@ IMPLEMENT_PEM_rw_const(DHparams, DH, PEM_STRING_DHPARAMS, DHparams)
301 * (When reading, parameter PEM_STRING_EVP_PKEY is a wildcard for anything 424 * (When reading, parameter PEM_STRING_EVP_PKEY is a wildcard for anything
302 * appropriate.) 425 * appropriate.)
303 */ 426 */
427
428#ifdef OPENSSL_FIPS
429
430static const char *pkey_str(EVP_PKEY *x)
431 {
432 switch (x->type)
433 {
434 case EVP_PKEY_RSA:
435 return PEM_STRING_RSA;
436
437 case EVP_PKEY_DSA:
438 return PEM_STRING_DSA;
439
440 case EVP_PKEY_EC:
441 return PEM_STRING_ECPRIVATEKEY;
442
443 default:
444 return NULL;
445 }
446 }
447
448
449int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
450 unsigned char *kstr, int klen,
451 pem_password_cb *cb, void *u)
452 {
453 if (FIPS_mode())
454 return PEM_write_bio_PKCS8PrivateKey(bp, x, enc,
455 (char *)kstr, klen, cb, u);
456 else
457 return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey,
458 pkey_str(x), bp,(char *)x,enc,kstr,klen,cb,u);
459 }
460
461#ifndef OPENSSL_NO_FP_API
462int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
463 unsigned char *kstr, int klen,
464 pem_password_cb *cb, void *u)
465 {
466 if (FIPS_mode())
467 return PEM_write_PKCS8PrivateKey(fp, x, enc,
468 (char *)kstr, klen, cb, u);
469 else
470 return PEM_ASN1_write((i2d_of_void *)i2d_PrivateKey,
471 pkey_str(x), fp,(char *)x,enc,kstr,klen,cb,u);
472 }
473#endif
474
475#else
304IMPLEMENT_PEM_write_cb(PrivateKey, EVP_PKEY, ((x->type == EVP_PKEY_DSA)?PEM_STRING_DSA:\ 476IMPLEMENT_PEM_write_cb(PrivateKey, EVP_PKEY, ((x->type == EVP_PKEY_DSA)?PEM_STRING_DSA:\
305 (x->type == EVP_PKEY_RSA)?PEM_STRING_RSA:PEM_STRING_ECPRIVATEKEY), PrivateKey) 477 (x->type == EVP_PKEY_RSA)?PEM_STRING_RSA:PEM_STRING_ECPRIVATEKEY), PrivateKey)
306 478
479#endif
480
307IMPLEMENT_PEM_rw(PUBKEY, EVP_PKEY, PEM_STRING_PUBLIC, PUBKEY) 481IMPLEMENT_PEM_rw(PUBKEY, EVP_PKEY, PEM_STRING_PUBLIC, PUBKEY)
308 482
diff --git a/src/lib/libssl/src/crypto/pem/pem_lib.c b/src/lib/libssl/src/crypto/pem/pem_lib.c
index 9bae4c8850..cbafefe416 100644
--- a/src/lib/libssl/src/crypto/pem/pem_lib.c
+++ b/src/lib/libssl/src/crypto/pem/pem_lib.c
@@ -216,6 +216,9 @@ static int check_pem(const char *nm, const char *name)
216 if(!strcmp(nm, PEM_STRING_X509) && 216 if(!strcmp(nm, PEM_STRING_X509) &&
217 !strcmp(name, PEM_STRING_PKCS7)) return 1; 217 !strcmp(name, PEM_STRING_PKCS7)) return 1;
218 218
219 if(!strcmp(nm, PEM_STRING_PKCS7_SIGNED) &&
220 !strcmp(name, PEM_STRING_PKCS7)) return 1;
221
219 return 0; 222 return 0;
220} 223}
221 224
diff --git a/src/lib/libssl/src/crypto/pem/pem_x509.c b/src/lib/libssl/src/crypto/pem/pem_x509.c
index 19f88d8d3a..3f709f13e6 100644
--- a/src/lib/libssl/src/crypto/pem/pem_x509.c
+++ b/src/lib/libssl/src/crypto/pem/pem_x509.c
@@ -1,5 +1,5 @@
1/* pem_x509.c */ 1/* pem_x509.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pem/pem_xaux.c b/src/lib/libssl/src/crypto/pem/pem_xaux.c
index 63ce660cf1..7cc7491009 100644
--- a/src/lib/libssl/src/crypto/pem/pem_xaux.c
+++ b/src/lib/libssl/src/crypto/pem/pem_xaux.c
@@ -1,5 +1,5 @@
1/* pem_xaux.c */ 1/* pem_xaux.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_add.c b/src/lib/libssl/src/crypto/pkcs12/p12_add.c
index 41bdc00551..1f3e378f5c 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_add.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_add.c
@@ -1,5 +1,5 @@
1/* p12_add.c */ 1/* p12_add.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_asn.c b/src/lib/libssl/src/crypto/pkcs12/p12_asn.c
index a3739fee1a..6e27633817 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_asn.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_asn.c
@@ -1,5 +1,5 @@
1/* p12_asn.c */ 1/* p12_asn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_attr.c b/src/lib/libssl/src/crypto/pkcs12/p12_attr.c
index 026cf3826a..68d6c5ad15 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_attr.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_attr.c
@@ -1,5 +1,5 @@
1/* p12_attr.c */ 1/* p12_attr.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_crpt.c b/src/lib/libssl/src/crypto/pkcs12/p12_crpt.c
index 3ad33c49d8..f8b952e27e 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_crpt.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_crpt.c
@@ -1,5 +1,5 @@
1/* p12_crpt.c */ 1/* p12_crpt.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_crt.c b/src/lib/libssl/src/crypto/pkcs12/p12_crt.c
index 9748256b6f..e863de52ce 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_crt.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_crt.c
@@ -1,5 +1,5 @@
1/* p12_crt.c */ 1/* p12_crt.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -59,6 +59,10 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include <openssl/pkcs12.h> 61#include <openssl/pkcs12.h>
62#ifdef OPENSSL_FIPS
63#include <openssl/fips.h>
64#endif
65
62 66
63 67
64static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags, PKCS12_SAFEBAG *bag); 68static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags, PKCS12_SAFEBAG *bag);
@@ -90,7 +94,14 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
90 94
91 /* Set defaults */ 95 /* Set defaults */
92 if (!nid_cert) 96 if (!nid_cert)
97 {
98#ifdef OPENSSL_FIPS
99 if (FIPS_mode())
100 nid_cert = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
101 else
102#endif
93 nid_cert = NID_pbe_WithSHA1And40BitRC2_CBC; 103 nid_cert = NID_pbe_WithSHA1And40BitRC2_CBC;
104 }
94 if (!nid_key) 105 if (!nid_key)
95 nid_key = NID_pbe_WithSHA1And3_Key_TripleDES_CBC; 106 nid_key = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
96 if (!iter) 107 if (!iter)
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_decr.c b/src/lib/libssl/src/crypto/pkcs12/p12_decr.c
index 74c961a92b..ba77dbbe32 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_decr.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_decr.c
@@ -1,5 +1,5 @@
1/* p12_decr.c */ 1/* p12_decr.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_init.c b/src/lib/libssl/src/crypto/pkcs12/p12_init.c
index 6bdc132631..d4d84b056a 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_init.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_init.c
@@ -1,5 +1,5 @@
1/* p12_init.c */ 1/* p12_init.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_key.c b/src/lib/libssl/src/crypto/pkcs12/p12_key.c
index 18e72d0a1b..9e57eee4a4 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_key.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_key.c
@@ -1,5 +1,5 @@
1/* p12_key.c */ 1/* p12_key.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c b/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c
index c2ee2cc6f3..5c4c6ec988 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_kiss.c
@@ -1,5 +1,5 @@
1/* p12_kiss.c */ 1/* p12_kiss.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c b/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c
index c408cc8ab8..70bfef6e5d 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c
@@ -1,5 +1,5 @@
1/* p12_mutl.c */ 1/* p12_mutl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_npas.c b/src/lib/libssl/src/crypto/pkcs12/p12_npas.c
index 48eacc5c49..47e5e9c377 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_npas.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_npas.c
@@ -1,5 +1,5 @@
1/* p12_npas.c */ 1/* p12_npas.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_p8d.c b/src/lib/libssl/src/crypto/pkcs12/p12_p8d.c
index 3c6f377933..deba81e4a9 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_p8d.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_p8d.c
@@ -1,5 +1,5 @@
1/* p12_p8d.c */ 1/* p12_p8d.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_p8e.c b/src/lib/libssl/src/crypto/pkcs12/p12_p8e.c
index 3d47956652..bf20a77b4c 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_p8e.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_p8e.c
@@ -1,5 +1,5 @@
1/* p12_p8e.c */ 1/* p12_p8e.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_utl.c b/src/lib/libssl/src/crypto/pkcs12/p12_utl.c
index 243ec76be9..ca30ac4f6d 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_utl.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_utl.c
@@ -1,5 +1,5 @@
1/* p12_utl.c */ 1/* p12_utl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs12/pkcs12.h b/src/lib/libssl/src/crypto/pkcs12/pkcs12.h
index a2d7e359a0..4bee605dc0 100644
--- a/src/lib/libssl/src/crypto/pkcs12/pkcs12.h
+++ b/src/lib/libssl/src/crypto/pkcs12/pkcs12.h
@@ -1,5 +1,5 @@
1/* pkcs12.h */ 1/* pkcs12.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_asn1.c b/src/lib/libssl/src/crypto/pkcs7/pk7_asn1.c
index 77931feeb4..1f70d31386 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pk7_asn1.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pk7_asn1.c
@@ -1,5 +1,5 @@
1/* pk7_asn.c */ 1/* pk7_asn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c b/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c
index 735c8800e1..d549717169 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pk7_attr.c
@@ -1,5 +1,5 @@
1/* pk7_attr.c */ 1/* pk7_attr.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c b/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c
index 17b68992f7..bf190360d7 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pk7_mime.c
@@ -1,5 +1,5 @@
1/* pk7_mime.c */ 1/* pk7_mime.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c b/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c
index 5c6b0fe24b..c34db1d6fe 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pk7_smime.c
@@ -1,5 +1,5 @@
1/* pk7_smime.c */ 1/* pk7_smime.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -282,6 +282,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
282 PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_MALLOC_FAILURE); 282 PKCS7err(PKCS7_F_PKCS7_VERIFY,ERR_R_MALLOC_FAILURE);
283 goto err; 283 goto err;
284 } 284 }
285 BIO_set_mem_eof_return(tmpout, 0);
285 } else tmpout = out; 286 } else tmpout = out;
286 287
287 /* We now have to 'read' from p7bio to calculate digests etc. */ 288 /* We now have to 'read' from p7bio to calculate digests etc. */
diff --git a/src/lib/libssl/src/crypto/rand/Makefile b/src/lib/libssl/src/crypto/rand/Makefile
index 27694aa664..30794305cb 100644
--- a/src/lib/libssl/src/crypto/rand/Makefile
+++ b/src/lib/libssl/src/crypto/rand/Makefile
@@ -17,9 +17,9 @@ TEST= randtest.c
17APPS= 17APPS=
18 18
19LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
20LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \ 20LIBSRC=md_rand.c randfile.c rand_lib.c rand_eng.c rand_err.c rand_egd.c \
21 rand_win.c rand_unix.c rand_os2.c rand_nw.c 21 rand_win.c rand_unix.c rand_os2.c rand_nw.c
22LIBOBJ=md_rand.o randfile.o rand_lib.o rand_err.o rand_egd.o \ 22LIBOBJ=md_rand.o randfile.o rand_lib.o rand_eng.o rand_err.o rand_egd.o \
23 rand_win.o rand_unix.o rand_os2.o rand_nw.o 23 rand_win.o rand_unix.o rand_os2.o rand_nw.o
24 24
25SRC= $(LIBSRC) 25SRC= $(LIBSRC)
@@ -35,7 +35,7 @@ top:
35all: lib 35all: lib
36 36
37lib: $(LIBOBJ) 37lib: $(LIBOBJ)
38 $(AR) $(LIB) $(LIBOBJ) 38 $(ARX) $(LIB) $(LIBOBJ)
39 $(RANLIB) $(LIB) || echo Never mind. 39 $(RANLIB) $(LIB) || echo Never mind.
40 @touch lib 40 @touch lib
41 41
@@ -79,17 +79,34 @@ clean:
79md_rand.o: ../../e_os.h ../../include/openssl/asn1.h 79md_rand.o: ../../e_os.h ../../include/openssl/asn1.h
80md_rand.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h 80md_rand.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
81md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 81md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
82md_rand.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 82md_rand.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
83md_rand.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 83md_rand.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
84md_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 84md_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
85md_rand.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 85md_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
86md_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 86md_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
87md_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 87md_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
88md_rand.o: md_rand.c rand_lcl.h 88md_rand.o: ../../include/openssl/symhacks.h md_rand.c rand_lcl.h
89rand_egd.o: ../../include/openssl/buffer.h ../../include/openssl/e_os2.h 89rand_egd.o: ../../include/openssl/buffer.h ../../include/openssl/e_os2.h
90rand_egd.o: ../../include/openssl/opensslconf.h 90rand_egd.o: ../../include/openssl/opensslconf.h
91rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 91rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
92rand_egd.o: rand_egd.c 92rand_egd.o: rand_egd.c
93rand_eng.o: ../../e_os.h ../../include/openssl/asn1.h
94rand_eng.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
95rand_eng.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
96rand_eng.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
97rand_eng.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
98rand_eng.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
99rand_eng.o: ../../include/openssl/err.h ../../include/openssl/evp.h
100rand_eng.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h
101rand_eng.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
102rand_eng.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
103rand_eng.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
104rand_eng.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
105rand_eng.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
106rand_eng.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
107rand_eng.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
108rand_eng.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
109rand_eng.o: ../cryptlib.h rand_eng.c rand_lcl.h
93rand_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h 110rand_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
94rand_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 111rand_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
95rand_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 112rand_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
@@ -99,34 +116,39 @@ rand_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
99rand_err.o: rand_err.c 116rand_err.o: rand_err.c
100rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h 117rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h
101rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 118rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
102rand_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 119rand_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
120rand_lib.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
103rand_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 121rand_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
104rand_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h 122rand_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
105rand_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h 123rand_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
124rand_lib.o: ../../include/openssl/fips.h ../../include/openssl/fips_rand.h
106rand_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 125rand_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
107rand_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 126rand_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
108rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 127rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
109rand_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h 128rand_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
110rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 129rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
111rand_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 130rand_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
131rand_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
112rand_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 132rand_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
113rand_lib.o: ../cryptlib.h rand_lib.c 133rand_lib.o: ../cryptlib.h rand_lcl.h rand_lib.c
114rand_nw.o: ../../e_os.h ../../include/openssl/asn1.h 134rand_nw.o: ../../e_os.h ../../include/openssl/asn1.h
115rand_nw.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 135rand_nw.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
116rand_nw.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 136rand_nw.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
117rand_nw.o: ../../include/openssl/err.h ../../include/openssl/evp.h 137rand_nw.o: ../../include/openssl/err.h ../../include/openssl/evp.h
118rand_nw.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 138rand_nw.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
119rand_nw.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 139rand_nw.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
120rand_nw.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 140rand_nw.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
121rand_nw.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 141rand_nw.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
122rand_nw.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 142rand_nw.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
123rand_nw.o: ../../include/openssl/symhacks.h ../cryptlib.h rand_lcl.h rand_nw.c 143rand_nw.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
144rand_nw.o: ../cryptlib.h rand_lcl.h rand_nw.c
124rand_os2.o: ../../e_os.h ../../include/openssl/asn1.h 145rand_os2.o: ../../e_os.h ../../include/openssl/asn1.h
125rand_os2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 146rand_os2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
126rand_os2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 147rand_os2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
127rand_os2.o: ../../include/openssl/err.h ../../include/openssl/evp.h 148rand_os2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
128rand_os2.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 149rand_os2.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
129rand_os2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 150rand_os2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
151rand_os2.o: ../../include/openssl/opensslconf.h
130rand_os2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 152rand_os2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
131rand_os2.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 153rand_os2.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
132rand_os2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 154rand_os2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
@@ -136,8 +158,8 @@ rand_unix.o: ../../e_os.h ../../include/openssl/asn1.h
136rand_unix.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 158rand_unix.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
137rand_unix.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 159rand_unix.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
138rand_unix.o: ../../include/openssl/err.h ../../include/openssl/evp.h 160rand_unix.o: ../../include/openssl/err.h ../../include/openssl/evp.h
139rand_unix.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 161rand_unix.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
140rand_unix.o: ../../include/openssl/objects.h 162rand_unix.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
141rand_unix.o: ../../include/openssl/opensslconf.h 163rand_unix.o: ../../include/openssl/opensslconf.h
142rand_unix.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 164rand_unix.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
143rand_unix.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 165rand_unix.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
@@ -148,8 +170,9 @@ rand_win.o: ../../e_os.h ../../include/openssl/asn1.h
148rand_win.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 170rand_win.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
149rand_win.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 171rand_win.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
150rand_win.o: ../../include/openssl/err.h ../../include/openssl/evp.h 172rand_win.o: ../../include/openssl/err.h ../../include/openssl/evp.h
151rand_win.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 173rand_win.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
152rand_win.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 174rand_win.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
175rand_win.o: ../../include/openssl/opensslconf.h
153rand_win.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 176rand_win.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
154rand_win.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h 177rand_win.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
155rand_win.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 178rand_win.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
diff --git a/src/lib/libssl/src/crypto/rand/md_rand.c b/src/lib/libssl/src/crypto/rand/md_rand.c
index 9783d0c23e..0f8dd3e00f 100644
--- a/src/lib/libssl/src/crypto/rand/md_rand.c
+++ b/src/lib/libssl/src/crypto/rand/md_rand.c
@@ -126,6 +126,10 @@
126 126
127#include <openssl/crypto.h> 127#include <openssl/crypto.h>
128#include <openssl/err.h> 128#include <openssl/err.h>
129#ifdef OPENSSL_FIPS
130#include <openssl/fips.h>
131#endif
132
129 133
130#ifdef BN_DEBUG 134#ifdef BN_DEBUG
131# define PREDICT 135# define PREDICT
@@ -332,6 +336,14 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
332#endif 336#endif
333 int do_stir_pool = 0; 337 int do_stir_pool = 0;
334 338
339#ifdef OPENSSL_FIPS
340 if(FIPS_mode())
341 {
342 FIPSerr(FIPS_F_SSLEAY_RAND_BYTES,FIPS_R_NON_FIPS_METHOD);
343 return 0;
344 }
345#endif
346
335#ifdef PREDICT 347#ifdef PREDICT
336 if (rand_predictable) 348 if (rand_predictable)
337 { 349 {
diff --git a/src/lib/libssl/src/crypto/rand/rand.h b/src/lib/libssl/src/crypto/rand/rand.h
index ac6c021763..ea89153cba 100644
--- a/src/lib/libssl/src/crypto/rand/rand.h
+++ b/src/lib/libssl/src/crypto/rand/rand.h
@@ -72,7 +72,7 @@ extern "C" {
72#endif 72#endif
73 73
74#if defined(OPENSSL_FIPS) 74#if defined(OPENSSL_FIPS)
75#define FIPS_RAND_SIZE_T size_t 75#define FIPS_RAND_SIZE_T int
76#endif 76#endif
77 77
78/* Already defined in ossl_typ.h */ 78/* Already defined in ossl_typ.h */
@@ -111,6 +111,15 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes);
111int RAND_egd(const char *path); 111int RAND_egd(const char *path);
112int RAND_egd_bytes(const char *path,int bytes); 112int RAND_egd_bytes(const char *path,int bytes);
113int RAND_poll(void); 113int RAND_poll(void);
114#ifndef OPENSSL_NO_ENGINE
115#ifdef OPENSSL_FIPS
116void int_RAND_init_engine_callbacks(void);
117void int_RAND_set_callbacks(
118 int (*set_rand_func)(const RAND_METHOD *meth,
119 const RAND_METHOD **pmeth),
120 const RAND_METHOD *(*get_rand_func)(const RAND_METHOD **pmeth));
121#endif
122#endif
114 123
115#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) 124#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
116 125
@@ -128,11 +137,29 @@ void ERR_load_RAND_strings(void);
128/* Error codes for the RAND functions. */ 137/* Error codes for the RAND functions. */
129 138
130/* Function codes. */ 139/* Function codes. */
140#define RAND_F_ENG_RAND_GET_RAND_METHOD 108
141#define RAND_F_FIPS_RAND 103
142#define RAND_F_FIPS_RAND_BYTES 102
143#define RAND_F_FIPS_RAND_GET_RAND_METHOD 109
144#define RAND_F_FIPS_RAND_SET_DT 106
145#define RAND_F_FIPS_SET_DT 104
146#define RAND_F_FIPS_SET_PRNG_SEED 107
147#define RAND_F_FIPS_SET_TEST_MODE 105
131#define RAND_F_RAND_GET_RAND_METHOD 101 148#define RAND_F_RAND_GET_RAND_METHOD 101
132#define RAND_F_SSLEAY_RAND_BYTES 100 149#define RAND_F_SSLEAY_RAND_BYTES 100
133 150
134/* Reason codes. */ 151/* Reason codes. */
152#define RAND_R_NON_FIPS_METHOD 105
153#define RAND_R_NOT_IN_TEST_MODE 106
154#define RAND_R_NO_KEY_SET 107
155#define RAND_R_PRNG_ASKING_FOR_TOO_MUCH 101
156#define RAND_R_PRNG_ERROR 108
157#define RAND_R_PRNG_KEYED 109
158#define RAND_R_PRNG_NOT_REKEYED 102
159#define RAND_R_PRNG_NOT_RESEEDED 103
135#define RAND_R_PRNG_NOT_SEEDED 100 160#define RAND_R_PRNG_NOT_SEEDED 100
161#define RAND_R_PRNG_SEED_MUST_NOT_MATCH_KEY 110
162#define RAND_R_PRNG_STUCK 104
136 163
137#ifdef __cplusplus 164#ifdef __cplusplus
138} 165}
diff --git a/src/lib/libssl/src/crypto/rand/rand_err.c b/src/lib/libssl/src/crypto/rand/rand_err.c
index 386934dcd1..829fb44d77 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 @@
1/* crypto/rand/rand_err.c */ 1/* crypto/rand/rand_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -70,6 +70,14 @@
70 70
71static ERR_STRING_DATA RAND_str_functs[]= 71static ERR_STRING_DATA RAND_str_functs[]=
72 { 72 {
73{ERR_FUNC(RAND_F_ENG_RAND_GET_RAND_METHOD), "ENG_RAND_GET_RAND_METHOD"},
74{ERR_FUNC(RAND_F_FIPS_RAND), "FIPS_RAND"},
75{ERR_FUNC(RAND_F_FIPS_RAND_BYTES), "FIPS_RAND_BYTES"},
76{ERR_FUNC(RAND_F_FIPS_RAND_GET_RAND_METHOD), "FIPS_RAND_GET_RAND_METHOD"},
77{ERR_FUNC(RAND_F_FIPS_RAND_SET_DT), "FIPS_RAND_SET_DT"},
78{ERR_FUNC(RAND_F_FIPS_SET_DT), "FIPS_SET_DT"},
79{ERR_FUNC(RAND_F_FIPS_SET_PRNG_SEED), "FIPS_SET_PRNG_SEED"},
80{ERR_FUNC(RAND_F_FIPS_SET_TEST_MODE), "FIPS_SET_TEST_MODE"},
73{ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"}, 81{ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"},
74{ERR_FUNC(RAND_F_SSLEAY_RAND_BYTES), "SSLEAY_RAND_BYTES"}, 82{ERR_FUNC(RAND_F_SSLEAY_RAND_BYTES), "SSLEAY_RAND_BYTES"},
75{0,NULL} 83{0,NULL}
@@ -77,7 +85,17 @@ static ERR_STRING_DATA RAND_str_functs[]=
77 85
78static ERR_STRING_DATA RAND_str_reasons[]= 86static ERR_STRING_DATA RAND_str_reasons[]=
79 { 87 {
88{ERR_REASON(RAND_R_NON_FIPS_METHOD) ,"non fips method"},
89{ERR_REASON(RAND_R_NOT_IN_TEST_MODE) ,"not in test mode"},
90{ERR_REASON(RAND_R_NO_KEY_SET) ,"no key set"},
91{ERR_REASON(RAND_R_PRNG_ASKING_FOR_TOO_MUCH),"prng asking for too much"},
92{ERR_REASON(RAND_R_PRNG_ERROR) ,"prng error"},
93{ERR_REASON(RAND_R_PRNG_KEYED) ,"prng keyed"},
94{ERR_REASON(RAND_R_PRNG_NOT_REKEYED) ,"prng not rekeyed"},
95{ERR_REASON(RAND_R_PRNG_NOT_RESEEDED) ,"prng not reseeded"},
80{ERR_REASON(RAND_R_PRNG_NOT_SEEDED) ,"PRNG not seeded"}, 96{ERR_REASON(RAND_R_PRNG_NOT_SEEDED) ,"PRNG not seeded"},
97{ERR_REASON(RAND_R_PRNG_SEED_MUST_NOT_MATCH_KEY),"prng seed must not match key"},
98{ERR_REASON(RAND_R_PRNG_STUCK) ,"prng stuck"},
81{0,NULL} 99{0,NULL}
82 }; 100 };
83 101
diff --git a/src/lib/libssl/src/crypto/rand/rand_lcl.h b/src/lib/libssl/src/crypto/rand/rand_lcl.h
index 618a8ec899..18cc9b1e4a 100644
--- a/src/lib/libssl/src/crypto/rand/rand_lcl.h
+++ b/src/lib/libssl/src/crypto/rand/rand_lcl.h
@@ -154,5 +154,16 @@
154#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md2(), NULL) 154#define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md2(), NULL)
155#endif 155#endif
156 156
157#ifndef OPENSSL_NO_ENGINE
158void int_RAND_set_callbacks(
159 int (*set_rand_func)(const RAND_METHOD *meth,
160 const RAND_METHOD **pmeth),
161 const RAND_METHOD *(*get_rand_func)
162 (const RAND_METHOD **pmeth));
163int eng_RAND_set_rand_method(const RAND_METHOD *meth,
164 const RAND_METHOD **pmeth);
165const RAND_METHOD *eng_RAND_get_rand_method(const RAND_METHOD **pmeth);
166#endif
167
157 168
158#endif 169#endif
diff --git a/src/lib/libssl/src/crypto/rand/rand_lib.c b/src/lib/libssl/src/crypto/rand/rand_lib.c
index 513e338985..da6b4e0e86 100644
--- a/src/lib/libssl/src/crypto/rand/rand_lib.c
+++ b/src/lib/libssl/src/crypto/rand/rand_lib.c
@@ -60,15 +60,82 @@
60#include <time.h> 60#include <time.h>
61#include "cryptlib.h" 61#include "cryptlib.h"
62#include <openssl/rand.h> 62#include <openssl/rand.h>
63#include "rand_lcl.h"
64#ifdef OPENSSL_FIPS
65#include <openssl/fips.h>
66#include <openssl/fips_rand.h>
67#endif
68
63#ifndef OPENSSL_NO_ENGINE 69#ifndef OPENSSL_NO_ENGINE
64#include <openssl/engine.h> 70#include <openssl/engine.h>
65#endif 71#endif
66 72
73static const RAND_METHOD *default_RAND_meth = NULL;
74
75#ifdef OPENSSL_FIPS
76
77static int fips_RAND_set_rand_method(const RAND_METHOD *meth,
78 const RAND_METHOD **pmeth)
79 {
80 *pmeth = meth;
81 return 1;
82 }
83
84static const RAND_METHOD *fips_RAND_get_rand_method(const RAND_METHOD **pmeth)
85 {
86 if (!*pmeth)
87 {
88 if(FIPS_mode())
89 *pmeth=FIPS_rand_method();
90 else
91 *pmeth = RAND_SSLeay();
92 }
93
94 if(FIPS_mode()
95 && *pmeth != FIPS_rand_check())
96 {
97 RANDerr(RAND_F_FIPS_RAND_GET_RAND_METHOD,RAND_R_NON_FIPS_METHOD);
98 return 0;
99 }
100
101 return *pmeth;
102 }
103
104static int (*RAND_set_rand_method_func)(const RAND_METHOD *meth,
105 const RAND_METHOD **pmeth)
106 = fips_RAND_set_rand_method;
107static const RAND_METHOD *(*RAND_get_rand_method_func)
108 (const RAND_METHOD **pmeth)
109 = fips_RAND_get_rand_method;
110
111#ifndef OPENSSL_NO_ENGINE
112void int_RAND_set_callbacks(
113 int (*set_rand_func)(const RAND_METHOD *meth,
114 const RAND_METHOD **pmeth),
115 const RAND_METHOD *(*get_rand_func)
116 (const RAND_METHOD **pmeth))
117 {
118 RAND_set_rand_method_func = set_rand_func;
119 RAND_get_rand_method_func = get_rand_func;
120 }
121#endif
122
123int RAND_set_rand_method(const RAND_METHOD *meth)
124 {
125 return RAND_set_rand_method_func(meth, &default_RAND_meth);
126 }
127
128const RAND_METHOD *RAND_get_rand_method(void)
129 {
130 return RAND_get_rand_method_func(&default_RAND_meth);
131 }
132
133#else
134
67#ifndef OPENSSL_NO_ENGINE 135#ifndef OPENSSL_NO_ENGINE
68/* non-NULL if default_RAND_meth is ENGINE-provided */ 136/* non-NULL if default_RAND_meth is ENGINE-provided */
69static ENGINE *funct_ref =NULL; 137static ENGINE *funct_ref =NULL;
70#endif 138#endif
71static const RAND_METHOD *default_RAND_meth = NULL;
72 139
73int RAND_set_rand_method(const RAND_METHOD *meth) 140int RAND_set_rand_method(const RAND_METHOD *meth)
74 { 141 {
@@ -129,6 +196,8 @@ int RAND_set_rand_engine(ENGINE *engine)
129 } 196 }
130#endif 197#endif
131 198
199#endif
200
132void RAND_cleanup(void) 201void RAND_cleanup(void)
133 { 202 {
134 const RAND_METHOD *meth = RAND_get_rand_method(); 203 const RAND_METHOD *meth = RAND_get_rand_method();
diff --git a/src/lib/libssl/src/crypto/rand/randfile.c b/src/lib/libssl/src/crypto/rand/randfile.c
index 005cb38cb0..f63fbc1731 100644
--- a/src/lib/libssl/src/crypto/rand/randfile.c
+++ b/src/lib/libssl/src/crypto/rand/randfile.c
@@ -81,10 +81,25 @@
81# include <sys/stat.h> 81# include <sys/stat.h>
82#endif 82#endif
83 83
84#ifdef _WIN32
85#define stat _stat
86#define chmod _chmod
87#define open _open
88#define fdopen _fdopen
89#endif
90
84#undef BUFSIZE 91#undef BUFSIZE
85#define BUFSIZE 1024 92#define BUFSIZE 1024
86#define RAND_DATA 1024 93#define RAND_DATA 1024
87 94
95#ifdef OPENSSL_SYS_VMS
96/* This declaration is a nasty hack to get around vms' extension to fopen
97 * for passing in sharing options being disabled by our /STANDARD=ANSI89 */
98static FILE *(*const vms_fopen)(const char *, const char *, ...) =
99 (FILE *(*)(const char *, const char *, ...))fopen;
100#define VMS_OPEN_ATTRS "shr=get,put,upd,del","ctx=bin,stm","rfm=stm","rat=none","mrs=0"
101#endif
102
88/* #define RFILE ".rnd" - defined in ../../e_os.h */ 103/* #define RFILE ".rnd" - defined in ../../e_os.h */
89 104
90/* Note that these functions are intended for seed files only. 105/* Note that these functions are intended for seed files only.
@@ -106,7 +121,11 @@ int RAND_load_file(const char *file, long bytes)
106 RAND_add(&sb,sizeof(sb),0.0); 121 RAND_add(&sb,sizeof(sb),0.0);
107 if (bytes == 0) return(ret); 122 if (bytes == 0) return(ret);
108 123
124#ifdef OPENSSL_SYS_VMS
125 in=vms_fopen(file,"rb",VMS_OPEN_ATTRS);
126#else
109 in=fopen(file,"rb"); 127 in=fopen(file,"rb");
128#endif
110 if (in == NULL) goto err; 129 if (in == NULL) goto err;
111#if defined(S_IFBLK) && defined(S_IFCHR) 130#if defined(S_IFBLK) && defined(S_IFCHR)
112 if (sb.st_mode & (S_IFBLK | S_IFCHR)) { 131 if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
@@ -167,7 +186,7 @@ int RAND_write_file(const char *file)
167#endif 186#endif
168 } 187 }
169 188
170#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32) 189#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_VMS)
171 { 190 {
172 /* For some reason Win32 can't write to files created this way */ 191 /* For some reason Win32 can't write to files created this way */
173 192
@@ -178,8 +197,34 @@ int RAND_write_file(const char *file)
178 out = fdopen(fd, "wb"); 197 out = fdopen(fd, "wb");
179 } 198 }
180#endif 199#endif
200
201#ifdef OPENSSL_SYS_VMS
202 /* VMS NOTE: Prior versions of this routine created a _new_
203 * version of the rand file for each call into this routine, then
204 * deleted all existing versions named ;-1, and finally renamed
205 * the current version as ';1'. Under concurrent usage, this
206 * resulted in an RMS race condition in rename() which could
207 * orphan files (see vms message help for RMS$_REENT). With the
208 * fopen() calls below, openssl/VMS now shares the top-level
209 * version of the rand file. Note that there may still be
210 * conditions where the top-level rand file is locked. If so, this
211 * code will then create a new version of the rand file. Without
212 * the delete and rename code, this can result in ascending file
213 * versions that stop at version 32767, and this routine will then
214 * return an error. The remedy for this is to recode the calling
215 * application to avoid concurrent use of the rand file, or
216 * synchronize usage at the application level. Also consider
217 * whether or not you NEED a persistent rand file in a concurrent
218 * use situation.
219 */
220
221 out = vms_fopen(file,"rb+",VMS_OPEN_ATTRS);
222 if (out == NULL)
223 out = vms_fopen(file,"wb",VMS_OPEN_ATTRS);
224#else
181 if (out == NULL) 225 if (out == NULL)
182 out = fopen(file,"wb"); 226 out = fopen(file,"wb");
227#endif
183 if (out == NULL) goto err; 228 if (out == NULL) goto err;
184 229
185#ifndef NO_CHMOD 230#ifndef NO_CHMOD
@@ -201,25 +246,6 @@ int RAND_write_file(const char *file)
201 ret+=i; 246 ret+=i;
202 if (n <= 0) break; 247 if (n <= 0) break;
203 } 248 }
204#ifdef OPENSSL_SYS_VMS
205 /* Try to delete older versions of the file, until there aren't
206 any */
207 {
208 char *tmpf;
209
210 tmpf = OPENSSL_malloc(strlen(file) + 4); /* to add ";-1" and a nul */
211 if (tmpf)
212 {
213 strcpy(tmpf, file);
214 strcat(tmpf, ";-1");
215 while(delete(tmpf) == 0)
216 ;
217 rename(file,";1"); /* Make sure it's version 1, or we
218 will reach the limit (32767) at
219 some point... */
220 }
221 }
222#endif /* OPENSSL_SYS_VMS */
223 249
224 fclose(out); 250 fclose(out);
225 OPENSSL_cleanse(buf,BUFSIZE); 251 OPENSSL_cleanse(buf,BUFSIZE);
diff --git a/src/lib/libssl/src/crypto/rc2/rc2.h b/src/lib/libssl/src/crypto/rc2/rc2.h
index 34c8362317..e542ec94ff 100644
--- a/src/lib/libssl/src/crypto/rc2/rc2.h
+++ b/src/lib/libssl/src/crypto/rc2/rc2.h
@@ -79,7 +79,9 @@ typedef struct rc2_key_st
79 RC2_INT data[64]; 79 RC2_INT data[64];
80 } RC2_KEY; 80 } RC2_KEY;
81 81
82 82#ifdef OPENSSL_FIPS
83void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits);
84#endif
83void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); 85void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits);
84void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, 86void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key,
85 int enc); 87 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 4953642056..4e000e5b99 100644
--- a/src/lib/libssl/src/crypto/rc2/rc2_skey.c
+++ b/src/lib/libssl/src/crypto/rc2/rc2_skey.c
@@ -57,6 +57,11 @@
57 */ 57 */
58 58
59#include <openssl/rc2.h> 59#include <openssl/rc2.h>
60#include <openssl/crypto.h>
61#ifdef OPENSSL_FIPS
62#include <openssl/fips.h>
63#endif
64
60#include "rc2_locl.h" 65#include "rc2_locl.h"
61 66
62static unsigned char key_table[256]={ 67static unsigned char key_table[256]={
@@ -94,8 +99,20 @@ static unsigned char key_table[256]={
94 * BSAFE uses the 'retarded' version. What I previously shipped is 99 * BSAFE uses the 'retarded' version. What I previously shipped is
95 * the same as specifying 1024 for the 'bits' parameter. Bsafe uses 100 * the same as specifying 1024 for the 'bits' parameter. Bsafe uses
96 * a version where the bits parameter is the same as len*8 */ 101 * a version where the bits parameter is the same as len*8 */
102
103#ifdef OPENSSL_FIPS
97void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) 104void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits)
98 { 105 {
106 if (FIPS_mode())
107 FIPS_BAD_ABORT(RC2)
108 private_RC2_set_key(key, len, data, bits);
109 }
110void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,
111 int bits)
112#else
113void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits)
114#endif
115 {
99 int i,j; 116 int i,j;
100 unsigned char *k; 117 unsigned char *k;
101 RC2_INT *ki; 118 RC2_INT *ki;
diff --git a/src/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl b/src/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl
index 92c52f3433..3a54623495 100755
--- a/src/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl
+++ b/src/lib/libssl/src/crypto/rc4/asm/rc4-x86_64.pl
@@ -358,6 +358,8 @@ ___
358 358
359$code =~ s/#([bwd])/$1/gm; 359$code =~ s/#([bwd])/$1/gm;
360 360
361$code =~ s/RC4_set_key/private_RC4_set_key/g if ($ENV{FIPSCANLIB} ne "");
362
361print $code; 363print $code;
362 364
363close STDOUT; 365close STDOUT;
diff --git a/src/lib/libssl/src/crypto/rc4/rc4.h b/src/lib/libssl/src/crypto/rc4/rc4.h
index 7aec04fe93..2d8620d33b 100644
--- a/src/lib/libssl/src/crypto/rc4/rc4.h
+++ b/src/lib/libssl/src/crypto/rc4/rc4.h
@@ -76,6 +76,9 @@ typedef struct rc4_key_st
76 76
77 77
78const char *RC4_options(void); 78const char *RC4_options(void);
79#ifdef OPENSSL_FIPS
80void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
81#endif
79void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 82void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
80void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, 83void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
81 unsigned char *outdata); 84 unsigned char *outdata);
diff --git a/src/lib/libssl/src/crypto/rc4/rc4_skey.c b/src/lib/libssl/src/crypto/rc4/rc4_skey.c
index 46b77ec321..4478d1a4b3 100644
--- a/src/lib/libssl/src/crypto/rc4/rc4_skey.c
+++ b/src/lib/libssl/src/crypto/rc4/rc4_skey.c
@@ -59,6 +59,11 @@
59#include <openssl/rc4.h> 59#include <openssl/rc4.h>
60#include "rc4_locl.h" 60#include "rc4_locl.h"
61#include <openssl/opensslv.h> 61#include <openssl/opensslv.h>
62#include <openssl/crypto.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62 67
63const char RC4_version[]="RC4" OPENSSL_VERSION_PTEXT; 68const char RC4_version[]="RC4" OPENSSL_VERSION_PTEXT;
64 69
@@ -85,7 +90,11 @@ const char *RC4_options(void)
85 * Date: Wed, 14 Sep 1994 06:35:31 GMT 90 * Date: Wed, 14 Sep 1994 06:35:31 GMT
86 */ 91 */
87 92
93#ifdef OPENSSL_FIPS
94void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
95#else
88void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data) 96void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
97#endif
89 { 98 {
90 register RC4_INT tmp; 99 register RC4_INT tmp;
91 register int id1,id2; 100 register int id1,id2;
@@ -127,7 +136,12 @@ void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
127 * 136 *
128 * <appro@fy.chalmers.se> 137 * <appro@fy.chalmers.se>
129 */ 138 */
130 if (OPENSSL_ia32cap_P & (1<<20)) { 139#ifdef OPENSSL_FIPS
140 unsigned long *ia32cap_ptr = OPENSSL_ia32cap_loc();
141 if (ia32cap_ptr && (*ia32cap_ptr & (1<<28))) {
142#else
143 if (OPENSSL_ia32cap_P & (1<<28)) {
144#endif
131 unsigned char *cp=(unsigned char *)d; 145 unsigned char *cp=(unsigned char *)d;
132 146
133 for (i=0;i<256;i++) cp[i]=i; 147 for (i=0;i<256;i++) cp[i]=i;
diff --git a/src/lib/libssl/src/crypto/rc5/rc5.h b/src/lib/libssl/src/crypto/rc5/rc5.h
index 4b3c153b50..f73a2a02a4 100644
--- a/src/lib/libssl/src/crypto/rc5/rc5.h
+++ b/src/lib/libssl/src/crypto/rc5/rc5.h
@@ -94,7 +94,10 @@ typedef struct rc5_key_st
94 RC5_32_INT data[2*(RC5_16_ROUNDS+1)]; 94 RC5_32_INT data[2*(RC5_16_ROUNDS+1)];
95 } RC5_32_KEY; 95 } RC5_32_KEY;
96 96
97 97#ifdef OPENSSL_FIPS
98void private_RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
99 int rounds);
100#endif
98void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, 101void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
99 int rounds); 102 int rounds);
100void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key, 103void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key,
diff --git a/src/lib/libssl/src/crypto/ripemd/ripemd.h b/src/lib/libssl/src/crypto/ripemd/ripemd.h
index 033a5965b5..3b6d04386d 100644
--- a/src/lib/libssl/src/crypto/ripemd/ripemd.h
+++ b/src/lib/libssl/src/crypto/ripemd/ripemd.h
@@ -90,7 +90,9 @@ typedef struct RIPEMD160state_st
90 RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 90 RIPEMD160_LONG data[RIPEMD160_LBLOCK];
91 unsigned int num; 91 unsigned int num;
92 } RIPEMD160_CTX; 92 } RIPEMD160_CTX;
93 93#ifdef OPENSSL_FIPS
94int private_RIPEMD160_Init(RIPEMD160_CTX *c);
95#endif
94int RIPEMD160_Init(RIPEMD160_CTX *c); 96int RIPEMD160_Init(RIPEMD160_CTX *c);
95int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 97int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len);
96int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 98int 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 1f2401aa7e..a845e17ed8 100644
--- a/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c
+++ b/src/lib/libssl/src/crypto/ripemd/rmd_dgst.c
@@ -59,6 +59,11 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "rmd_locl.h" 60#include "rmd_locl.h"
61#include <openssl/opensslv.h> 61#include <openssl/opensslv.h>
62#include <openssl/err.h>
63#ifdef OPENSSL_FIPS
64#include <openssl/fips.h>
65#endif
66
62 67
63const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT; 68const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT;
64 69
@@ -69,7 +74,7 @@ const char RMD160_version[]="RIPE-MD160" OPENSSL_VERSION_PTEXT;
69 void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,size_t num); 74 void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,size_t num);
70# endif 75# endif
71 76
72int RIPEMD160_Init(RIPEMD160_CTX *c) 77FIPS_NON_FIPS_MD_Init(RIPEMD160)
73 { 78 {
74 c->A=RIPEMD160_A; 79 c->A=RIPEMD160_A;
75 c->B=RIPEMD160_B; 80 c->B=RIPEMD160_B;
diff --git a/src/lib/libssl/src/crypto/ripemd/rmd_locl.h b/src/lib/libssl/src/crypto/ripemd/rmd_locl.h
index f14b346e66..ce12a8000e 100644
--- a/src/lib/libssl/src/crypto/ripemd/rmd_locl.h
+++ b/src/lib/libssl/src/crypto/ripemd/rmd_locl.h
@@ -72,7 +72,7 @@
72 */ 72 */
73#ifdef RMD160_ASM 73#ifdef RMD160_ASM
74# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) 74# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
75# define ripemd160_block_data_order ripemd160_block_asm_data_order 75# define ripemd160_block_host_order ripemd160_block_asm_data_order
76# endif 76# endif
77#endif 77#endif
78 78
diff --git a/src/lib/libssl/src/crypto/rsa/Makefile b/src/lib/libssl/src/crypto/rsa/Makefile
index 8f1c611800..7b1fd6428c 100644
--- a/src/lib/libssl/src/crypto/rsa/Makefile
+++ b/src/lib/libssl/src/crypto/rsa/Makefile
@@ -19,10 +19,10 @@ APPS=
19LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
20LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \ 20LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \
21 rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \ 21 rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \
22 rsa_pss.c rsa_x931.c rsa_asn1.c rsa_depr.c 22 rsa_pss.c rsa_x931.c rsa_x931g.c rsa_asn1.c rsa_depr.c rsa_eng.c
23LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \ 23LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \
24 rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \ 24 rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \
25 rsa_pss.o rsa_x931.o rsa_asn1.o rsa_depr.o 25 rsa_pss.o rsa_x931.o rsa_x931g.o rsa_asn1.o rsa_depr.o rsa_eng.o
26 26
27SRC= $(LIBSRC) 27SRC= $(LIBSRC)
28 28
@@ -37,7 +37,7 @@ top:
37all: lib 37all: lib
38 38
39lib: $(LIBOBJ) 39lib: $(LIBOBJ)
40 $(AR) $(LIB) $(LIBOBJ) 40 $(ARX) $(LIB) $(LIBOBJ)
41 $(RANLIB) $(LIB) || echo Never mind. 41 $(RANLIB) $(LIB) || echo Never mind.
42 @touch lib 42 @touch lib
43 43
@@ -114,6 +114,21 @@ rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
114rsa_eay.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h 114rsa_eay.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
115rsa_eay.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 115rsa_eay.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
116rsa_eay.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_eay.c 116rsa_eay.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_eay.c
117rsa_eng.o: ../../e_os.h ../../include/openssl/asn1.h
118rsa_eng.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
119rsa_eng.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
120rsa_eng.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
121rsa_eng.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
122rsa_eng.o: ../../include/openssl/engine.h ../../include/openssl/err.h
123rsa_eng.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
124rsa_eng.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
125rsa_eng.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
126rsa_eng.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
127rsa_eng.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
128rsa_eng.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
129rsa_eng.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
130rsa_eng.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
131rsa_eng.o: ../../include/openssl/x509_vfy.h ../cryptlib.h rsa_eng.c
117rsa_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 132rsa_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
118rsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 133rsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
119rsa_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h 134rsa_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
@@ -136,15 +151,15 @@ rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
136rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 151rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
137rsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 152rsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
138rsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h 153rsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
139rsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 154rsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
140rsa_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 155rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
141rsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 156rsa_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
142rsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h 157rsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
143rsa_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h 158rsa_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
144rsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 159rsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
145rsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 160rsa_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
146rsa_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 161rsa_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
147rsa_lib.o: ../cryptlib.h rsa_lib.c 162rsa_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h rsa_lib.c
148rsa_none.o: ../../e_os.h ../../include/openssl/asn1.h 163rsa_none.o: ../../e_os.h ../../include/openssl/asn1.h
149rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 164rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
150rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 165rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -167,9 +182,9 @@ rsa_oaep.o: ../../e_os.h ../../include/openssl/asn1.h
167rsa_oaep.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 182rsa_oaep.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
168rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 183rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
169rsa_oaep.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 184rsa_oaep.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
170rsa_oaep.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 185rsa_oaep.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
171rsa_oaep.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 186rsa_oaep.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
172rsa_oaep.o: ../../include/openssl/opensslconf.h 187rsa_oaep.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
173rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 188rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
174rsa_oaep.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h 189rsa_oaep.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
175rsa_oaep.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 190rsa_oaep.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
@@ -188,21 +203,23 @@ rsa_pss.o: ../../e_os.h ../../include/openssl/asn1.h
188rsa_pss.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 203rsa_pss.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
189rsa_pss.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 204rsa_pss.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
190rsa_pss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 205rsa_pss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
191rsa_pss.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 206rsa_pss.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
192rsa_pss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 207rsa_pss.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
193rsa_pss.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 208rsa_pss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
194rsa_pss.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h 209rsa_pss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
195rsa_pss.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 210rsa_pss.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
196rsa_pss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 211rsa_pss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
197rsa_pss.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pss.c 212rsa_pss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
213rsa_pss.o: ../cryptlib.h rsa_pss.c
198rsa_saos.o: ../../e_os.h ../../include/openssl/asn1.h 214rsa_saos.o: ../../e_os.h ../../include/openssl/asn1.h
199rsa_saos.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 215rsa_saos.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
200rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 216rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
201rsa_saos.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 217rsa_saos.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
202rsa_saos.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 218rsa_saos.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
203rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h 219rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h
204rsa_saos.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 220rsa_saos.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
205rsa_saos.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 221rsa_saos.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
222rsa_saos.o: ../../include/openssl/opensslconf.h
206rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 223rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
207rsa_saos.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 224rsa_saos.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
208rsa_saos.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 225rsa_saos.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
@@ -215,8 +232,9 @@ rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
215rsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 232rsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
216rsa_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h 233rsa_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
217rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h 234rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
218rsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h 235rsa_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
219rsa_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 236rsa_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
237rsa_sign.o: ../../include/openssl/opensslconf.h
220rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 238rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
221rsa_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 239rsa_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
222rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 240rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
@@ -242,3 +260,11 @@ rsa_x931.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
242rsa_x931.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h 260rsa_x931.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
243rsa_x931.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 261rsa_x931.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
244rsa_x931.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_x931.c 262rsa_x931.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_x931.c
263rsa_x931g.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
264rsa_x931g.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
265rsa_x931g.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
266rsa_x931g.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
267rsa_x931g.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
268rsa_x931g.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
269rsa_x931g.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
270rsa_x931g.o: rsa_x931g.c
diff --git a/src/lib/libssl/src/crypto/rsa/rsa.h b/src/lib/libssl/src/crypto/rsa/rsa.h
index 3699afaaaf..5bb932ae15 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa.h
+++ b/src/lib/libssl/src/crypto/rsa/rsa.h
@@ -74,6 +74,25 @@
74#error RSA is disabled. 74#error RSA is disabled.
75#endif 75#endif
76 76
77/* If this flag is set the RSA method is FIPS compliant and can be used
78 * in FIPS mode. This is set in the validated module method. If an
79 * application sets this flag in its own methods it is its reposibility
80 * to ensure the result is compliant.
81 */
82
83#define RSA_FLAG_FIPS_METHOD 0x0400
84
85/* If this flag is set the operations normally disabled in FIPS mode are
86 * permitted it is then the applications responsibility to ensure that the
87 * usage is compliant.
88 */
89
90#define RSA_FLAG_NON_FIPS_ALLOW 0x0400
91
92#ifdef OPENSSL_FIPS
93#define FIPS_RSA_SIZE_T int
94#endif
95
77#ifdef __cplusplus 96#ifdef __cplusplus
78extern "C" { 97extern "C" {
79#endif 98#endif
@@ -163,6 +182,8 @@ struct rsa_st
163# define OPENSSL_RSA_MAX_MODULUS_BITS 16384 182# define OPENSSL_RSA_MAX_MODULUS_BITS 16384
164#endif 183#endif
165 184
185#define OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 1024
186
166#ifndef OPENSSL_RSA_SMALL_MODULUS_BITS 187#ifndef OPENSSL_RSA_SMALL_MODULUS_BITS
167# define OPENSSL_RSA_SMALL_MODULUS_BITS 3072 188# define OPENSSL_RSA_SMALL_MODULUS_BITS 3072
168#endif 189#endif
@@ -240,6 +261,11 @@ RSA * RSA_generate_key(int bits, unsigned long e,void
240 261
241/* New version */ 262/* New version */
242int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); 263int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
264int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2,
265 const BIGNUM *Xp1, const BIGNUM *Xp2, const BIGNUM *Xp,
266 const BIGNUM *Xq1, const BIGNUM *Xq2, const BIGNUM *Xq,
267 const BIGNUM *e, BN_GENCB *cb);
268int RSA_X931_generate_key_ex(RSA *rsa, int bits, const BIGNUM *e, BN_GENCB *cb);
243 269
244int RSA_check_key(const RSA *); 270int RSA_check_key(const RSA *);
245 /* next 4 return -1 on error */ 271 /* next 4 return -1 on error */
@@ -257,6 +283,11 @@ int RSA_up_ref(RSA *r);
257 283
258int RSA_flags(const RSA *r); 284int RSA_flags(const RSA *r);
259 285
286#ifdef OPENSSL_FIPS
287RSA *FIPS_rsa_new(void);
288void FIPS_rsa_free(RSA *r);
289#endif
290
260void RSA_set_default_method(const RSA_METHOD *meth); 291void RSA_set_default_method(const RSA_METHOD *meth);
261const RSA_METHOD *RSA_get_default_method(void); 292const RSA_METHOD *RSA_get_default_method(void);
262const RSA_METHOD *RSA_get_method(const RSA *rsa); 293const RSA_METHOD *RSA_get_method(const RSA *rsa);
@@ -370,6 +401,8 @@ void ERR_load_RSA_strings(void);
370/* Error codes for the RSA functions. */ 401/* Error codes for the RSA functions. */
371 402
372/* Function codes. */ 403/* Function codes. */
404#define RSA_F_FIPS_RSA_SIGN 140
405#define RSA_F_FIPS_RSA_VERIFY 141
373#define RSA_F_MEMORY_LOCK 100 406#define RSA_F_MEMORY_LOCK 100
374#define RSA_F_RSA_BUILTIN_KEYGEN 129 407#define RSA_F_RSA_BUILTIN_KEYGEN 129
375#define RSA_F_RSA_CHECK_KEY 123 408#define RSA_F_RSA_CHECK_KEY 123
@@ -401,7 +434,11 @@ void ERR_load_RSA_strings(void);
401#define RSA_F_RSA_PADDING_CHECK_X931 128 434#define RSA_F_RSA_PADDING_CHECK_X931 128
402#define RSA_F_RSA_PRINT 115 435#define RSA_F_RSA_PRINT 115
403#define RSA_F_RSA_PRINT_FP 116 436#define RSA_F_RSA_PRINT_FP 116
437#define RSA_F_RSA_PRIVATE_ENCRYPT 137
438#define RSA_F_RSA_PUBLIC_DECRYPT 138
404#define RSA_F_RSA_SETUP_BLINDING 136 439#define RSA_F_RSA_SETUP_BLINDING 136
440#define RSA_F_RSA_SET_DEFAULT_METHOD 139
441#define RSA_F_RSA_SET_METHOD 142
405#define RSA_F_RSA_SIGN 117 442#define RSA_F_RSA_SIGN 117
406#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118 443#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118
407#define RSA_F_RSA_VERIFY 119 444#define RSA_F_RSA_VERIFY 119
@@ -435,10 +472,12 @@ void ERR_load_RSA_strings(void);
435#define RSA_R_KEY_SIZE_TOO_SMALL 120 472#define RSA_R_KEY_SIZE_TOO_SMALL 120
436#define RSA_R_LAST_OCTET_INVALID 134 473#define RSA_R_LAST_OCTET_INVALID 134
437#define RSA_R_MODULUS_TOO_LARGE 105 474#define RSA_R_MODULUS_TOO_LARGE 105
475#define RSA_R_NON_FIPS_METHOD 141
438#define RSA_R_NO_PUBLIC_EXPONENT 140 476#define RSA_R_NO_PUBLIC_EXPONENT 140
439#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113 477#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113
440#define RSA_R_N_DOES_NOT_EQUAL_P_Q 127 478#define RSA_R_N_DOES_NOT_EQUAL_P_Q 127
441#define RSA_R_OAEP_DECODING_ERROR 121 479#define RSA_R_OAEP_DECODING_ERROR 121
480#define RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE 142
442#define RSA_R_PADDING_CHECK_FAILED 114 481#define RSA_R_PADDING_CHECK_FAILED 114
443#define RSA_R_P_NOT_PRIME 128 482#define RSA_R_P_NOT_PRIME 128
444#define RSA_R_Q_NOT_PRIME 129 483#define RSA_R_Q_NOT_PRIME 129
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_asn1.c b/src/lib/libssl/src/crypto/rsa/rsa_asn1.c
index bbbf26d50e..6e8a803e81 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_asn1.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_asn1.c
@@ -1,5 +1,5 @@
1/* rsa_asn1.c */ 1/* rsa_asn1.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_eay.c b/src/lib/libssl/src/crypto/rsa/rsa_eay.c
index 5a6eda7961..04ec789ee9 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_eay.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_eay.c
@@ -115,7 +115,7 @@
115#include <openssl/rsa.h> 115#include <openssl/rsa.h>
116#include <openssl/rand.h> 116#include <openssl/rand.h>
117 117
118#ifndef RSA_NULL 118#if !defined(RSA_NULL) && !defined(OPENSSL_FIPS)
119 119
120static int RSA_eay_public_encrypt(int flen, const unsigned char *from, 120static int RSA_eay_public_encrypt(int flen, const unsigned char *from,
121 unsigned char *to, RSA *rsa,int padding); 121 unsigned char *to, RSA *rsa,int padding);
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_err.c b/src/lib/libssl/src/crypto/rsa/rsa_err.c
index fe3ba1b44b..501f5ea389 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_err.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_err.c
@@ -1,6 +1,6 @@
1/* crypto/rsa/rsa_err.c */ 1/* crypto/rsa/rsa_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -70,6 +70,8 @@
70 70
71static ERR_STRING_DATA RSA_str_functs[]= 71static ERR_STRING_DATA RSA_str_functs[]=
72 { 72 {
73{ERR_FUNC(RSA_F_FIPS_RSA_SIGN), "FIPS_RSA_SIGN"},
74{ERR_FUNC(RSA_F_FIPS_RSA_VERIFY), "FIPS_RSA_VERIFY"},
73{ERR_FUNC(RSA_F_MEMORY_LOCK), "MEMORY_LOCK"}, 75{ERR_FUNC(RSA_F_MEMORY_LOCK), "MEMORY_LOCK"},
74{ERR_FUNC(RSA_F_RSA_BUILTIN_KEYGEN), "RSA_BUILTIN_KEYGEN"}, 76{ERR_FUNC(RSA_F_RSA_BUILTIN_KEYGEN), "RSA_BUILTIN_KEYGEN"},
75{ERR_FUNC(RSA_F_RSA_CHECK_KEY), "RSA_check_key"}, 77{ERR_FUNC(RSA_F_RSA_CHECK_KEY), "RSA_check_key"},
@@ -101,7 +103,11 @@ static ERR_STRING_DATA RSA_str_functs[]=
101{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_X931), "RSA_padding_check_X931"}, 103{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_X931), "RSA_padding_check_X931"},
102{ERR_FUNC(RSA_F_RSA_PRINT), "RSA_print"}, 104{ERR_FUNC(RSA_F_RSA_PRINT), "RSA_print"},
103{ERR_FUNC(RSA_F_RSA_PRINT_FP), "RSA_print_fp"}, 105{ERR_FUNC(RSA_F_RSA_PRINT_FP), "RSA_print_fp"},
106{ERR_FUNC(RSA_F_RSA_PRIVATE_ENCRYPT), "RSA_private_encrypt"},
107{ERR_FUNC(RSA_F_RSA_PUBLIC_DECRYPT), "RSA_public_decrypt"},
104{ERR_FUNC(RSA_F_RSA_SETUP_BLINDING), "RSA_setup_blinding"}, 108{ERR_FUNC(RSA_F_RSA_SETUP_BLINDING), "RSA_setup_blinding"},
109{ERR_FUNC(RSA_F_RSA_SET_DEFAULT_METHOD), "RSA_set_default_method"},
110{ERR_FUNC(RSA_F_RSA_SET_METHOD), "RSA_set_method"},
105{ERR_FUNC(RSA_F_RSA_SIGN), "RSA_sign"}, 111{ERR_FUNC(RSA_F_RSA_SIGN), "RSA_sign"},
106{ERR_FUNC(RSA_F_RSA_SIGN_ASN1_OCTET_STRING), "RSA_sign_ASN1_OCTET_STRING"}, 112{ERR_FUNC(RSA_F_RSA_SIGN_ASN1_OCTET_STRING), "RSA_sign_ASN1_OCTET_STRING"},
107{ERR_FUNC(RSA_F_RSA_VERIFY), "RSA_verify"}, 113{ERR_FUNC(RSA_F_RSA_VERIFY), "RSA_verify"},
@@ -138,10 +144,12 @@ static ERR_STRING_DATA RSA_str_reasons[]=
138{ERR_REASON(RSA_R_KEY_SIZE_TOO_SMALL) ,"key size too small"}, 144{ERR_REASON(RSA_R_KEY_SIZE_TOO_SMALL) ,"key size too small"},
139{ERR_REASON(RSA_R_LAST_OCTET_INVALID) ,"last octet invalid"}, 145{ERR_REASON(RSA_R_LAST_OCTET_INVALID) ,"last octet invalid"},
140{ERR_REASON(RSA_R_MODULUS_TOO_LARGE) ,"modulus too large"}, 146{ERR_REASON(RSA_R_MODULUS_TOO_LARGE) ,"modulus too large"},
147{ERR_REASON(RSA_R_NON_FIPS_METHOD) ,"non fips method"},
141{ERR_REASON(RSA_R_NO_PUBLIC_EXPONENT) ,"no public exponent"}, 148{ERR_REASON(RSA_R_NO_PUBLIC_EXPONENT) ,"no public exponent"},
142{ERR_REASON(RSA_R_NULL_BEFORE_BLOCK_MISSING),"null before block missing"}, 149{ERR_REASON(RSA_R_NULL_BEFORE_BLOCK_MISSING),"null before block missing"},
143{ERR_REASON(RSA_R_N_DOES_NOT_EQUAL_P_Q) ,"n does not equal p q"}, 150{ERR_REASON(RSA_R_N_DOES_NOT_EQUAL_P_Q) ,"n does not equal p q"},
144{ERR_REASON(RSA_R_OAEP_DECODING_ERROR) ,"oaep decoding error"}, 151{ERR_REASON(RSA_R_OAEP_DECODING_ERROR) ,"oaep decoding error"},
152{ERR_REASON(RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE),"operation not allowed in fips mode"},
145{ERR_REASON(RSA_R_PADDING_CHECK_FAILED) ,"padding check failed"}, 153{ERR_REASON(RSA_R_PADDING_CHECK_FAILED) ,"padding check failed"},
146{ERR_REASON(RSA_R_P_NOT_PRIME) ,"p not prime"}, 154{ERR_REASON(RSA_R_P_NOT_PRIME) ,"p not prime"},
147{ERR_REASON(RSA_R_Q_NOT_PRIME) ,"q not prime"}, 155{ERR_REASON(RSA_R_Q_NOT_PRIME) ,"q not prime"},
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_gen.c b/src/lib/libssl/src/crypto/rsa/rsa_gen.c
index 767f7ab682..41278f83c6 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_gen.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_gen.c
@@ -68,6 +68,8 @@
68#include <openssl/bn.h> 68#include <openssl/bn.h>
69#include <openssl/rsa.h> 69#include <openssl/rsa.h>
70 70
71#ifndef OPENSSL_FIPS
72
71static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb); 73static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb);
72 74
73/* NB: this wrapper would normally be placed in rsa_lib.c and the static 75/* NB: this wrapper would normally be placed in rsa_lib.c and the static
@@ -217,3 +219,4 @@ err:
217 return ok; 219 return ok;
218 } 220 }
219 221
222#endif
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_lib.c b/src/lib/libssl/src/crypto/rsa/rsa_lib.c
index 104aa4c1f2..5714841f4c 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_lib.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_lib.c
@@ -67,215 +67,6 @@
67#include <openssl/engine.h> 67#include <openssl/engine.h>
68#endif 68#endif
69 69
70const char RSA_version[]="RSA" OPENSSL_VERSION_PTEXT;
71
72static const RSA_METHOD *default_RSA_meth=NULL;
73
74RSA *RSA_new(void)
75 {
76 RSA *r=RSA_new_method(NULL);
77
78 return r;
79 }
80
81void RSA_set_default_method(const RSA_METHOD *meth)
82 {
83 default_RSA_meth = meth;
84 }
85
86const RSA_METHOD *RSA_get_default_method(void)
87 {
88 if (default_RSA_meth == NULL)
89 {
90#ifdef RSA_NULL
91 default_RSA_meth=RSA_null_method();
92#else
93#if 0 /* was: #ifdef RSAref */
94 default_RSA_meth=RSA_PKCS1_RSAref();
95#else
96 default_RSA_meth=RSA_PKCS1_SSLeay();
97#endif
98#endif
99 }
100
101 return default_RSA_meth;
102 }
103
104const RSA_METHOD *RSA_get_method(const RSA *rsa)
105 {
106 return rsa->meth;
107 }
108
109int RSA_set_method(RSA *rsa, const RSA_METHOD *meth)
110 {
111 /* NB: The caller is specifically setting a method, so it's not up to us
112 * to deal with which ENGINE it comes from. */
113 const RSA_METHOD *mtmp;
114 mtmp = rsa->meth;
115 if (mtmp->finish) mtmp->finish(rsa);
116#ifndef OPENSSL_NO_ENGINE
117 if (rsa->engine)
118 {
119 ENGINE_finish(rsa->engine);
120 rsa->engine = NULL;
121 }
122#endif
123 rsa->meth = meth;
124 if (meth->init) meth->init(rsa);
125 return 1;
126 }
127
128RSA *RSA_new_method(ENGINE *engine)
129 {
130 RSA *ret;
131
132 ret=(RSA *)OPENSSL_malloc(sizeof(RSA));
133 if (ret == NULL)
134 {
135 RSAerr(RSA_F_RSA_NEW_METHOD,ERR_R_MALLOC_FAILURE);
136 return NULL;
137 }
138
139 ret->meth = RSA_get_default_method();
140#ifndef OPENSSL_NO_ENGINE
141 if (engine)
142 {
143 if (!ENGINE_init(engine))
144 {
145 RSAerr(RSA_F_RSA_NEW_METHOD, ERR_R_ENGINE_LIB);
146 OPENSSL_free(ret);
147 return NULL;
148 }
149 ret->engine = engine;
150 }
151 else
152 ret->engine = ENGINE_get_default_RSA();
153 if(ret->engine)
154 {
155 ret->meth = ENGINE_get_RSA(ret->engine);
156 if(!ret->meth)
157 {
158 RSAerr(RSA_F_RSA_NEW_METHOD,
159 ERR_R_ENGINE_LIB);
160 ENGINE_finish(ret->engine);
161 OPENSSL_free(ret);
162 return NULL;
163 }
164 }
165#endif
166
167 ret->pad=0;
168 ret->version=0;
169 ret->n=NULL;
170 ret->e=NULL;
171 ret->d=NULL;
172 ret->p=NULL;
173 ret->q=NULL;
174 ret->dmp1=NULL;
175 ret->dmq1=NULL;
176 ret->iqmp=NULL;
177 ret->references=1;
178 ret->_method_mod_n=NULL;
179 ret->_method_mod_p=NULL;
180 ret->_method_mod_q=NULL;
181 ret->blinding=NULL;
182 ret->mt_blinding=NULL;
183 ret->bignum_data=NULL;
184 ret->flags=ret->meth->flags;
185 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data);
186 if ((ret->meth->init != NULL) && !ret->meth->init(ret))
187 {
188#ifndef OPENSSL_NO_ENGINE
189 if (ret->engine)
190 ENGINE_finish(ret->engine);
191#endif
192 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data);
193 OPENSSL_free(ret);
194 ret=NULL;
195 }
196 return(ret);
197 }
198
199void RSA_free(RSA *r)
200 {
201 int i;
202
203 if (r == NULL) return;
204
205 i=CRYPTO_add(&r->references,-1,CRYPTO_LOCK_RSA);
206#ifdef REF_PRINT
207 REF_PRINT("RSA",r);
208#endif
209 if (i > 0) return;
210#ifdef REF_CHECK
211 if (i < 0)
212 {
213 fprintf(stderr,"RSA_free, bad reference count\n");
214 abort();
215 }
216#endif
217
218 if (r->meth->finish)
219 r->meth->finish(r);
220#ifndef OPENSSL_NO_ENGINE
221 if (r->engine)
222 ENGINE_finish(r->engine);
223#endif
224
225 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, r, &r->ex_data);
226
227 if (r->n != NULL) BN_clear_free(r->n);
228 if (r->e != NULL) BN_clear_free(r->e);
229 if (r->d != NULL) BN_clear_free(r->d);
230 if (r->p != NULL) BN_clear_free(r->p);
231 if (r->q != NULL) BN_clear_free(r->q);
232 if (r->dmp1 != NULL) BN_clear_free(r->dmp1);
233 if (r->dmq1 != NULL) BN_clear_free(r->dmq1);
234 if (r->iqmp != NULL) BN_clear_free(r->iqmp);
235 if (r->blinding != NULL) BN_BLINDING_free(r->blinding);
236 if (r->mt_blinding != NULL) BN_BLINDING_free(r->mt_blinding);
237 if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data);
238 OPENSSL_free(r);
239 }
240
241int RSA_up_ref(RSA *r)
242 {
243 int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA);
244#ifdef REF_PRINT
245 REF_PRINT("RSA",r);
246#endif
247#ifdef REF_CHECK
248 if (i < 2)
249 {
250 fprintf(stderr, "RSA_up_ref, bad reference count\n");
251 abort();
252 }
253#endif
254 return ((i > 1) ? 1 : 0);
255 }
256
257int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
258 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
259 {
260 return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, argl, argp,
261 new_func, dup_func, free_func);
262 }
263
264int RSA_set_ex_data(RSA *r, int idx, void *arg)
265 {
266 return(CRYPTO_set_ex_data(&r->ex_data,idx,arg));
267 }
268
269void *RSA_get_ex_data(const RSA *r, int idx)
270 {
271 return(CRYPTO_get_ex_data(&r->ex_data,idx));
272 }
273
274int RSA_size(const RSA *r)
275 {
276 return(BN_num_bytes(r->n));
277 }
278
279int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, 70int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
280 RSA *rsa, int padding) 71 RSA *rsa, int padding)
281 { 72 {
@@ -285,6 +76,13 @@ int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
285int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, 76int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
286 RSA *rsa, int padding) 77 RSA *rsa, int padding)
287 { 78 {
79#ifdef OPENSSL_FIPS
80 if(FIPS_mode() && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW))
81 {
82 RSAerr(RSA_F_RSA_PRIVATE_ENCRYPT, RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
83 return 0;
84 }
85#endif
288 return(rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding)); 86 return(rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding));
289 } 87 }
290 88
@@ -297,12 +95,19 @@ int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
297int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, 95int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
298 RSA *rsa, int padding) 96 RSA *rsa, int padding)
299 { 97 {
98#ifdef OPENSSL_FIPS
99 if(FIPS_mode() && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW))
100 {
101 RSAerr(RSA_F_RSA_PUBLIC_DECRYPT, RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
102 return 0;
103 }
104#endif
300 return(rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding)); 105 return(rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding));
301 } 106 }
302 107
303int RSA_flags(const RSA *r) 108int RSA_size(const RSA *r)
304 { 109 {
305 return((r == NULL)?0:r->meth->flags); 110 return(BN_num_bytes(r->n));
306 } 111 }
307 112
308void RSA_blinding_off(RSA *rsa) 113void RSA_blinding_off(RSA *rsa)
@@ -427,48 +232,3 @@ err:
427 232
428 return ret; 233 return ret;
429} 234}
430
431int RSA_memory_lock(RSA *r)
432 {
433 int i,j,k,off;
434 char *p;
435 BIGNUM *bn,**t[6],*b;
436 BN_ULONG *ul;
437
438 if (r->d == NULL) return(1);
439 t[0]= &r->d;
440 t[1]= &r->p;
441 t[2]= &r->q;
442 t[3]= &r->dmp1;
443 t[4]= &r->dmq1;
444 t[5]= &r->iqmp;
445 k=sizeof(BIGNUM)*6;
446 off=k/sizeof(BN_ULONG)+1;
447 j=1;
448 for (i=0; i<6; i++)
449 j+= (*t[i])->top;
450 if ((p=OPENSSL_malloc_locked((off+j)*sizeof(BN_ULONG))) == NULL)
451 {
452 RSAerr(RSA_F_RSA_MEMORY_LOCK,ERR_R_MALLOC_FAILURE);
453 return(0);
454 }
455 bn=(BIGNUM *)p;
456 ul=(BN_ULONG *)&(p[off]);
457 for (i=0; i<6; i++)
458 {
459 b= *(t[i]);
460 *(t[i])= &(bn[i]);
461 memcpy((char *)&(bn[i]),(char *)b,sizeof(BIGNUM));
462 bn[i].flags=BN_FLG_STATIC_DATA;
463 bn[i].d=ul;
464 memcpy((char *)ul,b->d,sizeof(BN_ULONG)*b->top);
465 ul+=b->top;
466 BN_clear_free(b);
467 }
468
469 /* I should fix this so it can still be done */
470 r->flags&= ~(RSA_FLAG_CACHE_PRIVATE|RSA_FLAG_CACHE_PUBLIC);
471
472 r->bignum_data=p;
473 return(1);
474 }
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_null.c b/src/lib/libssl/src/crypto/rsa/rsa_null.c
index 491572c82b..2f2202f142 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_null.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_null.c
@@ -1,5 +1,5 @@
1/* rsa_null.c */ 1/* rsa_null.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c
index 3652677a99..4d30c9d2d3 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c
@@ -187,7 +187,7 @@ int PKCS1_MGF1(unsigned char *mask, long len,
187 int mdlen; 187 int mdlen;
188 188
189 EVP_MD_CTX_init(&c); 189 EVP_MD_CTX_init(&c);
190 mdlen = EVP_MD_size(dgst); 190 mdlen = M_EVP_MD_size(dgst);
191 for (i = 0; outlen < len; i++) 191 for (i = 0; outlen < len; i++)
192 { 192 {
193 cnt[0] = (unsigned char)((i >> 24) & 255); 193 cnt[0] = (unsigned char)((i >> 24) & 255);
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_sign.c b/src/lib/libssl/src/crypto/rsa/rsa_sign.c
index 71aabeea1b..5488c06f6d 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_sign.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_sign.c
@@ -90,6 +90,14 @@ int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
90 i = SSL_SIG_LENGTH; 90 i = SSL_SIG_LENGTH;
91 s = m; 91 s = m;
92 } else { 92 } else {
93 /* NB: in FIPS mode block anything that isn't a TLS signature */
94#ifdef OPENSSL_FIPS
95 if(FIPS_mode() && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW))
96 {
97 RSAerr(RSA_F_RSA_SIGN, RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
98 return 0;
99 }
100#endif
93 sig.algor= &algor; 101 sig.algor= &algor;
94 sig.algor->algorithm=OBJ_nid2obj(type); 102 sig.algor->algorithm=OBJ_nid2obj(type);
95 if (sig.algor->algorithm == NULL) 103 if (sig.algor->algorithm == NULL)
@@ -167,10 +175,22 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len,
167 RSAerr(RSA_F_RSA_VERIFY,ERR_R_MALLOC_FAILURE); 175 RSAerr(RSA_F_RSA_VERIFY,ERR_R_MALLOC_FAILURE);
168 goto err; 176 goto err;
169 } 177 }
170 if((dtype == NID_md5_sha1) && (m_len != SSL_SIG_LENGTH) ) { 178 if(dtype == NID_md5_sha1)
179 {
180 if (m_len != SSL_SIG_LENGTH)
181 {
171 RSAerr(RSA_F_RSA_VERIFY,RSA_R_INVALID_MESSAGE_LENGTH); 182 RSAerr(RSA_F_RSA_VERIFY,RSA_R_INVALID_MESSAGE_LENGTH);
172 goto err; 183 goto err;
173 } 184 }
185 }
186 /* NB: in FIPS mode block anything that isn't a TLS signature */
187#ifdef OPENSSL_FIPS
188 else if(FIPS_mode() && !(rsa->flags & RSA_FLAG_NON_FIPS_ALLOW))
189 {
190 RSAerr(RSA_F_RSA_VERIFY, RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE);
191 return 0;
192 }
193#endif
174 i=RSA_public_decrypt((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING); 194 i=RSA_public_decrypt((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING);
175 195
176 if (i <= 0) goto err; 196 if (i <= 0) goto err;
diff --git a/src/lib/libssl/src/crypto/sha/sha.h b/src/lib/libssl/src/crypto/sha/sha.h
index eed44d7f94..47a2c29f66 100644
--- a/src/lib/libssl/src/crypto/sha/sha.h
+++ b/src/lib/libssl/src/crypto/sha/sha.h
@@ -106,6 +106,9 @@ typedef struct SHAstate_st
106 } SHA_CTX; 106 } SHA_CTX;
107 107
108#ifndef OPENSSL_NO_SHA0 108#ifndef OPENSSL_NO_SHA0
109#ifdef OPENSSL_FIPS
110int private_SHA_Init(SHA_CTX *c);
111#endif
109int SHA_Init(SHA_CTX *c); 112int SHA_Init(SHA_CTX *c);
110int SHA_Update(SHA_CTX *c, const void *data, size_t len); 113int SHA_Update(SHA_CTX *c, const void *data, size_t len);
111int SHA_Final(unsigned char *md, SHA_CTX *c); 114int SHA_Final(unsigned char *md, SHA_CTX *c);
diff --git a/src/lib/libssl/src/crypto/sha/sha1_one.c b/src/lib/libssl/src/crypto/sha/sha1_one.c
index 7c65b60276..4831174198 100644
--- a/src/lib/libssl/src/crypto/sha/sha1_one.c
+++ b/src/lib/libssl/src/crypto/sha/sha1_one.c
@@ -61,7 +61,7 @@
61#include <openssl/sha.h> 61#include <openssl/sha.h>
62#include <openssl/crypto.h> 62#include <openssl/crypto.h>
63 63
64#ifndef OPENSSL_NO_SHA1 64#if !defined(OPENSSL_NO_SHA1)
65unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) 65unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md)
66 { 66 {
67 SHA_CTX c; 67 SHA_CTX c;
diff --git a/src/lib/libssl/src/crypto/sha/sha1dgst.c b/src/lib/libssl/src/crypto/sha/sha1dgst.c
index 50d1925cde..d31f0781a0 100644
--- a/src/lib/libssl/src/crypto/sha/sha1dgst.c
+++ b/src/lib/libssl/src/crypto/sha/sha1dgst.c
@@ -63,6 +63,10 @@
63#define SHA_1 63#define SHA_1
64 64
65#include <openssl/opensslv.h> 65#include <openssl/opensslv.h>
66#ifdef OPENSSL_FIPS
67#include <openssl/fips.h>
68#endif
69
66 70
67const char SHA1_version[]="SHA1" OPENSSL_VERSION_PTEXT; 71const char SHA1_version[]="SHA1" OPENSSL_VERSION_PTEXT;
68 72
diff --git a/src/lib/libssl/src/crypto/sha/sha_dgst.c b/src/lib/libssl/src/crypto/sha/sha_dgst.c
index 70eb56032c..598f4d721a 100644
--- a/src/lib/libssl/src/crypto/sha/sha_dgst.c
+++ b/src/lib/libssl/src/crypto/sha/sha_dgst.c
@@ -57,6 +57,12 @@
57 */ 57 */
58 58
59#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60#include <openssl/crypto.h>
61#ifdef OPENSSL_FIPS
62#include <openssl/fips.h>
63#endif
64
65#include <openssl/err.h>
60#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA) 66#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA)
61 67
62#undef SHA_1 68#undef SHA_1
diff --git a/src/lib/libssl/src/crypto/sha/sha_locl.h b/src/lib/libssl/src/crypto/sha/sha_locl.h
index e37e5726e3..da46ddfe79 100644
--- a/src/lib/libssl/src/crypto/sha/sha_locl.h
+++ b/src/lib/libssl/src/crypto/sha/sha_locl.h
@@ -122,8 +122,15 @@ void sha1_block_data_order (SHA_CTX *c, const void *p,size_t num);
122#define INIT_DATA_h3 0x10325476UL 122#define INIT_DATA_h3 0x10325476UL
123#define INIT_DATA_h4 0xc3d2e1f0UL 123#define INIT_DATA_h4 0xc3d2e1f0UL
124 124
125#if defined(SHA_0) && defined(OPENSSL_FIPS)
126FIPS_NON_FIPS_MD_Init(SHA)
127#else
125int HASH_INIT (SHA_CTX *c) 128int HASH_INIT (SHA_CTX *c)
129#endif
126 { 130 {
131#if defined(SHA_1) && defined(OPENSSL_FIPS)
132 FIPS_selftest_check();
133#endif
127 c->h0=INIT_DATA_h0; 134 c->h0=INIT_DATA_h0;
128 c->h1=INIT_DATA_h1; 135 c->h1=INIT_DATA_h1;
129 c->h2=INIT_DATA_h2; 136 c->h2=INIT_DATA_h2;
diff --git a/src/lib/libssl/src/crypto/symhacks.h b/src/lib/libssl/src/crypto/symhacks.h
index 64528ad5c2..6cfb5fe479 100644
--- a/src/lib/libssl/src/crypto/symhacks.h
+++ b/src/lib/libssl/src/crypto/symhacks.h
@@ -179,6 +179,11 @@
179#define ENGINE_set_load_privkey_function ENGINE_set_load_privkey_fn 179#define ENGINE_set_load_privkey_function ENGINE_set_load_privkey_fn
180#undef ENGINE_get_load_privkey_function 180#undef ENGINE_get_load_privkey_function
181#define ENGINE_get_load_privkey_function ENGINE_get_load_privkey_fn 181#define ENGINE_get_load_privkey_function ENGINE_get_load_privkey_fn
182#undef ENGINE_set_load_ssl_client_cert_function
183#define ENGINE_set_load_ssl_client_cert_function \
184 ENGINE_set_ld_ssl_clnt_cert_fn
185#undef ENGINE_get_ssl_client_cert_function
186#define ENGINE_get_ssl_client_cert_function ENGINE_get_ssl_client_cert_fn
182 187
183/* Hack some long OCSP names */ 188/* Hack some long OCSP names */
184#undef OCSP_REQUEST_get_ext_by_critical 189#undef OCSP_REQUEST_get_ext_by_critical
diff --git a/src/lib/libssl/src/crypto/ui/ui_openssl.c b/src/lib/libssl/src/crypto/ui/ui_openssl.c
index 8446673ed4..5fbedf6ff8 100644
--- a/src/lib/libssl/src/crypto/ui/ui_openssl.c
+++ b/src/lib/libssl/src/crypto/ui/ui_openssl.c
@@ -678,6 +678,8 @@ static int noecho_fgets(char *buf, int size, FILE *tty)
678 size--; 678 size--;
679#ifdef WIN16TTY 679#ifdef WIN16TTY
680 i=_inchar(); 680 i=_inchar();
681#elif defined(_WIN32)
682 i=_getch();
681#else 683#else
682 i=getch(); 684 i=getch();
683#endif 685#endif
diff --git a/src/lib/libssl/src/crypto/x509/by_dir.c b/src/lib/libssl/src/crypto/x509/by_dir.c
index 37f9a48206..341e0ba6a4 100644
--- a/src/lib/libssl/src/crypto/x509/by_dir.c
+++ b/src/lib/libssl/src/crypto/x509/by_dir.c
@@ -74,6 +74,10 @@
74#include <openssl/lhash.h> 74#include <openssl/lhash.h>
75#include <openssl/x509.h> 75#include <openssl/x509.h>
76 76
77#ifdef _WIN32
78#define stat _stat
79#endif
80
77typedef struct lookup_dir_st 81typedef struct lookup_dir_st
78 { 82 {
79 BUF_MEM *buffer; 83 BUF_MEM *buffer;
diff --git a/src/lib/libssl/src/crypto/x509/x509_cmp.c b/src/lib/libssl/src/crypto/x509/x509_cmp.c
index 0d6bc653b2..e4c682fc44 100644
--- a/src/lib/libssl/src/crypto/x509/x509_cmp.c
+++ b/src/lib/libssl/src/crypto/x509/x509_cmp.c
@@ -322,10 +322,16 @@ unsigned long X509_NAME_hash(X509_NAME *x)
322 { 322 {
323 unsigned long ret=0; 323 unsigned long ret=0;
324 unsigned char md[16]; 324 unsigned char md[16];
325 EVP_MD_CTX md_ctx;
325 326
326 /* Make sure X509_NAME structure contains valid cached encoding */ 327 /* Make sure X509_NAME structure contains valid cached encoding */
327 i2d_X509_NAME(x,NULL); 328 i2d_X509_NAME(x,NULL);
328 EVP_Digest(x->bytes->data, x->bytes->length, md, NULL, EVP_md5(), NULL); 329 EVP_MD_CTX_init(&md_ctx);
330 EVP_MD_CTX_set_flags(&md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
331 EVP_DigestInit_ex(&md_ctx, EVP_md5(), NULL);
332 EVP_DigestUpdate(&md_ctx, x->bytes->data, x->bytes->length);
333 EVP_DigestFinal_ex(&md_ctx,md,NULL);
334 EVP_MD_CTX_cleanup(&md_ctx);
329 335
330 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| 336 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)|
331 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) 337 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L)
diff --git a/src/lib/libssl/src/crypto/x509/x509_trs.c b/src/lib/libssl/src/crypto/x509/x509_trs.c
index 9c84a59d52..ed18700585 100644
--- a/src/lib/libssl/src/crypto/x509/x509_trs.c
+++ b/src/lib/libssl/src/crypto/x509/x509_trs.c
@@ -1,5 +1,5 @@
1/* x509_trs.c */ 1/* x509_trs.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509/x509cset.c b/src/lib/libssl/src/crypto/x509/x509cset.c
index 9d1646d5c8..7f4004b291 100644
--- a/src/lib/libssl/src/crypto/x509/x509cset.c
+++ b/src/lib/libssl/src/crypto/x509/x509cset.c
@@ -1,5 +1,5 @@
1/* crypto/x509/x509cset.c */ 1/* crypto/x509/x509cset.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509/x509spki.c b/src/lib/libssl/src/crypto/x509/x509spki.c
index ed868b838e..02a203d72c 100644
--- a/src/lib/libssl/src/crypto/x509/x509spki.c
+++ b/src/lib/libssl/src/crypto/x509/x509spki.c
@@ -1,5 +1,5 @@
1/* x509spki.c */ 1/* x509spki.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/ext_dat.h b/src/lib/libssl/src/crypto/x509v3/ext_dat.h
index 5c063ac65d..3eaec46f8a 100644
--- a/src/lib/libssl/src/crypto/x509v3/ext_dat.h
+++ b/src/lib/libssl/src/crypto/x509v3/ext_dat.h
@@ -1,5 +1,5 @@
1/* ext_dat.h */ 1/* ext_dat.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/pcy_data.c b/src/lib/libssl/src/crypto/x509v3/pcy_data.c
index 4711b1ee92..fb392b901f 100644
--- a/src/lib/libssl/src/crypto/x509v3/pcy_data.c
+++ b/src/lib/libssl/src/crypto/x509v3/pcy_data.c
@@ -1,5 +1,5 @@
1/* pcy_data.c */ 1/* pcy_data.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2004. 3 * project 2004.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/pcy_tree.c b/src/lib/libssl/src/crypto/x509v3/pcy_tree.c
index b1ce77b9af..6c87a7f506 100644
--- a/src/lib/libssl/src/crypto/x509v3/pcy_tree.c
+++ b/src/lib/libssl/src/crypto/x509v3/pcy_tree.c
@@ -1,5 +1,5 @@
1/* pcy_tree.c */ 1/* pcy_tree.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2004. 3 * project 2004.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/tabtest.c b/src/lib/libssl/src/crypto/x509v3/tabtest.c
index dad0d38dd5..5ed6eb6891 100644
--- a/src/lib/libssl/src/crypto/x509v3/tabtest.c
+++ b/src/lib/libssl/src/crypto/x509v3/tabtest.c
@@ -1,5 +1,5 @@
1/* tabtest.c */ 1/* tabtest.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_addr.c b/src/lib/libssl/src/crypto/x509v3/v3_addr.c
index c6730ab3fd..a37f844d3c 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_addr.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_addr.c
@@ -878,6 +878,7 @@ int v3_addr_canonize(IPAddrBlocks *addr)
878 v3_addr_get_afi(f))) 878 v3_addr_get_afi(f)))
879 return 0; 879 return 0;
880 } 880 }
881 (void)sk_IPAddressFamily_set_cmp_func(addr, IPAddressFamily_cmp);
881 sk_IPAddressFamily_sort(addr); 882 sk_IPAddressFamily_sort(addr);
882 assert(v3_addr_is_canonical(addr)); 883 assert(v3_addr_is_canonical(addr));
883 return 1; 884 return 1;
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_akey.c b/src/lib/libssl/src/crypto/x509v3/v3_akey.c
index ac0548b775..c6b68ee221 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_akey.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_akey.c
@@ -1,5 +1,5 @@
1/* v3_akey.c */ 1/* v3_akey.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_akeya.c b/src/lib/libssl/src/crypto/x509v3/v3_akeya.c
index 2aafa26ba7..2c50f7360e 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_akeya.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_akeya.c
@@ -1,5 +1,5 @@
1/* v3_akey_asn1.c */ 1/* v3_akey_asn1.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_alt.c b/src/lib/libssl/src/crypto/x509v3/v3_alt.c
index ac3139d1e6..75fda7f268 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_alt.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_alt.c
@@ -1,5 +1,5 @@
1/* v3_alt.c */ 1/* v3_alt.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -527,7 +527,8 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
527 return gen; 527 return gen;
528 528
529 err: 529 err:
530 GENERAL_NAME_free(gen); 530 if (!out)
531 GENERAL_NAME_free(gen);
531 return NULL; 532 return NULL;
532 } 533 }
533 534
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_bcons.c b/src/lib/libssl/src/crypto/x509v3/v3_bcons.c
index 74b1233071..82aa488f75 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_bcons.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_bcons.c
@@ -1,5 +1,5 @@
1/* v3_bcons.c */ 1/* v3_bcons.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_bitst.c b/src/lib/libssl/src/crypto/x509v3/v3_bitst.c
index cf31f0816e..058d0d4dce 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_bitst.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_bitst.c
@@ -1,5 +1,5 @@
1/* v3_bitst.c */ 1/* v3_bitst.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_conf.c b/src/lib/libssl/src/crypto/x509v3/v3_conf.c
index 2b867305fb..11eb6b7fd5 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_conf.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_conf.c
@@ -1,5 +1,5 @@
1/* v3_conf.c */ 1/* v3_conf.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_cpols.c b/src/lib/libssl/src/crypto/x509v3/v3_cpols.c
index a40f490aa9..95596055ab 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_cpols.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_cpols.c
@@ -1,5 +1,5 @@
1/* v3_cpols.c */ 1/* v3_cpols.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_crld.c b/src/lib/libssl/src/crypto/x509v3/v3_crld.c
index c6e3ebae7b..181a8977b1 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_crld.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_crld.c
@@ -1,5 +1,5 @@
1/* v3_crld.c */ 1/* v3_crld.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_enum.c b/src/lib/libssl/src/crypto/x509v3/v3_enum.c
index a236cb22e1..36576eaa4d 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_enum.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_enum.c
@@ -1,5 +1,5 @@
1/* v3_enum.c */ 1/* v3_enum.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_extku.c b/src/lib/libssl/src/crypto/x509v3/v3_extku.c
index a4efe0031e..c0d14500ed 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_extku.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_extku.c
@@ -1,5 +1,5 @@
1/* v3_extku.c */ 1/* v3_extku.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_genn.c b/src/lib/libssl/src/crypto/x509v3/v3_genn.c
index 650b510980..84b4b1c881 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_genn.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_genn.c
@@ -1,5 +1,5 @@
1/* v3_genn.c */ 1/* v3_genn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_ia5.c b/src/lib/libssl/src/crypto/x509v3/v3_ia5.c
index b739ccd036..4ff12b52b5 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_ia5.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_ia5.c
@@ -1,5 +1,5 @@
1/* v3_ia5.c */ 1/* v3_ia5.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_info.c b/src/lib/libssl/src/crypto/x509v3/v3_info.c
index e0ef69de42..e1b8699f92 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_info.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_info.c
@@ -1,5 +1,5 @@
1/* v3_info.c */ 1/* v3_info.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_int.c b/src/lib/libssl/src/crypto/x509v3/v3_int.c
index 9a48dc1508..4bfd14cf46 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_int.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_int.c
@@ -1,5 +1,5 @@
1/* v3_int.c */ 1/* v3_int.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_lib.c b/src/lib/libssl/src/crypto/x509v3/v3_lib.c
index f3015ea610..df3a48f43e 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_lib.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_lib.c
@@ -1,5 +1,5 @@
1/* v3_lib.c */ 1/* v3_lib.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c b/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c
index 62aac06335..e426ea930c 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c
@@ -1,5 +1,5 @@
1/* v3_ocsp.c */ 1/* v3_ocsp.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_pku.c b/src/lib/libssl/src/crypto/x509v3/v3_pku.c
index 5c4626e89b..076f3ff48e 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_pku.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_pku.c
@@ -1,5 +1,5 @@
1/* v3_pku.c */ 1/* v3_pku.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_prn.c b/src/lib/libssl/src/crypto/x509v3/v3_prn.c
index 20bd9bda19..c1bb17f105 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_prn.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_prn.c
@@ -1,5 +1,5 @@
1/* v3_prn.c */ 1/* v3_prn.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_purp.c b/src/lib/libssl/src/crypto/x509v3/v3_purp.c
index c54e7887c7..e18751e01c 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_purp.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_purp.c
@@ -1,5 +1,5 @@
1/* v3_purp.c */ 1/* v3_purp.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_skey.c b/src/lib/libssl/src/crypto/x509v3/v3_skey.c
index da0a3558f6..202c9e4896 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_skey.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_skey.c
@@ -1,5 +1,5 @@
1/* v3_skey.c */ 1/* v3_skey.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_sxnet.c b/src/lib/libssl/src/crypto/x509v3/v3_sxnet.c
index eaea9ea01b..2a6bf11b65 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_sxnet.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_sxnet.c
@@ -1,5 +1,5 @@
1/* v3_sxnet.c */ 1/* v3_sxnet.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_utl.c b/src/lib/libssl/src/crypto/x509v3/v3_utl.c
index 57be441399..2cb53008e3 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_utl.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_utl.c
@@ -1,5 +1,5 @@
1/* v3_utl.c */ 1/* v3_utl.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
@@ -736,17 +736,20 @@ static int ipv6_from_asc(unsigned char *v6, const char *in)
736 736
737 /* Format result */ 737 /* Format result */
738 738
739 /* Copy initial part */ 739 if (v6stat.zero_pos >= 0)
740 if (v6stat.zero_pos > 0) 740 {
741 /* Copy initial part */
741 memcpy(v6, v6stat.tmp, v6stat.zero_pos); 742 memcpy(v6, v6stat.tmp, v6stat.zero_pos);
742 /* Zero middle */ 743 /* Zero middle */
743 if (v6stat.total != 16)
744 memset(v6 + v6stat.zero_pos, 0, 16 - v6stat.total); 744 memset(v6 + v6stat.zero_pos, 0, 16 - v6stat.total);
745 /* Copy final part */ 745 /* Copy final part */
746 if (v6stat.total != v6stat.zero_pos) 746 if (v6stat.total != v6stat.zero_pos)
747 memcpy(v6 + v6stat.zero_pos + 16 - v6stat.total, 747 memcpy(v6 + v6stat.zero_pos + 16 - v6stat.total,
748 v6stat.tmp + v6stat.zero_pos, 748 v6stat.tmp + v6stat.zero_pos,
749 v6stat.total - v6stat.zero_pos); 749 v6stat.total - v6stat.zero_pos);
750 }
751 else
752 memcpy(v6, v6stat.tmp, 16);
750 753
751 return 1; 754 return 1;
752 } 755 }
diff --git a/src/lib/libssl/src/crypto/x509v3/v3conf.c b/src/lib/libssl/src/crypto/x509v3/v3conf.c
index 00cf5b4a5b..a9e6ca3542 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3conf.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3conf.c
@@ -1,5 +1,5 @@
1/* v3conf.c */ 1/* v3conf.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/v3prin.c b/src/lib/libssl/src/crypto/x509v3/v3prin.c
index b529814319..d5ff268296 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3prin.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3prin.c
@@ -1,5 +1,5 @@
1/* v3prin.c */ 1/* v3prin.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/crypto/x509v3/x509v3.h b/src/lib/libssl/src/crypto/x509v3/x509v3.h
index 5ba59f71c9..9ef83da755 100644
--- a/src/lib/libssl/src/crypto/x509v3/x509v3.h
+++ b/src/lib/libssl/src/crypto/x509v3/x509v3.h
@@ -1,5 +1,5 @@
1/* x509v3.h */ 1/* x509v3.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/demos/asn1/ocsp.c b/src/lib/libssl/src/demos/asn1/ocsp.c
index 0199fe1004..e89f1f72a6 100644
--- a/src/lib/libssl/src/demos/asn1/ocsp.c
+++ b/src/lib/libssl/src/demos/asn1/ocsp.c
@@ -1,5 +1,5 @@
1/* ocsp.c */ 1/* ocsp.c */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
5/* ==================================================================== 5/* ====================================================================
diff --git a/src/lib/libssl/src/doc/crypto/RAND_egd.pod b/src/lib/libssl/src/doc/crypto/RAND_egd.pod
index 079838ea2e..8b8c61d161 100644
--- a/src/lib/libssl/src/doc/crypto/RAND_egd.pod
+++ b/src/lib/libssl/src/doc/crypto/RAND_egd.pod
@@ -45,8 +45,11 @@ EGD is available from http://www.lothar.com/tech/crypto/ (C<perl
45Makefile.PL; make; make install> to install). It is run as B<egd> 45Makefile.PL; make; make install> to install). It is run as B<egd>
46I<path>, where I<path> is an absolute path designating a socket. When 46I<path>, where I<path> is an absolute path designating a socket. When
47RAND_egd() is called with that path as an argument, it tries to read 47RAND_egd() is called with that path as an argument, it tries to read
48random bytes that EGD has collected. The read is performed in 48random bytes that EGD has collected. RAND_egd() retrieves entropy from the
49non-blocking mode. 49daemon using the daemon's "non-blocking read" command which shall
50be answered immediately by the daemon without waiting for additional
51entropy to be collected. The write and read socket operations in the
52communication are blocking.
50 53
51Alternatively, the EGD-interface compatible daemon PRNGD can be used. It is 54Alternatively, the EGD-interface compatible daemon PRNGD can be used. It is
52available from 55available from
diff --git a/src/lib/libssl/src/e_os.h b/src/lib/libssl/src/e_os.h
index acc6a15eb7..9c5c6fdb92 100644
--- a/src/lib/libssl/src/e_os.h
+++ b/src/lib/libssl/src/e_os.h
@@ -269,6 +269,7 @@ extern "C" {
269# define _WIN32_WINNT 0x0400 269# define _WIN32_WINNT 0x0400
270# endif 270# endif
271# include <windows.h> 271# include <windows.h>
272# include <stdio.h>
272# include <stddef.h> 273# include <stddef.h>
273# include <errno.h> 274# include <errno.h>
274# include <string.h> 275# include <string.h>
@@ -284,13 +285,38 @@ static unsigned int _strlen31(const char *str)
284# endif 285# endif
285# include <malloc.h> 286# include <malloc.h>
286# if defined(_MSC_VER) && _MSC_VER<=1200 && defined(_MT) && defined(isspace) 287# if defined(_MSC_VER) && _MSC_VER<=1200 && defined(_MT) && defined(isspace)
287 /* compensate for bug is VC6 ctype.h */ 288 /* compensate for bug in VC6 ctype.h */
288# undef isspace 289# undef isspace
289# undef isdigit 290# undef isdigit
290# undef isalnum 291# undef isalnum
291# undef isupper 292# undef isupper
292# undef isxdigit 293# undef isxdigit
293# endif 294# endif
295# if defined(_MSC_VER) && !defined(_DLL) && defined(stdin)
296# if _MSC_VER>=1300
297# undef stdin
298# undef stdout
299# undef stderr
300 FILE *__iob_func();
301# define stdin (&__iob_func()[0])
302# define stdout (&__iob_func()[1])
303# define stderr (&__iob_func()[2])
304# elif defined(I_CAN_LIVE_WITH_LNK4049)
305# undef stdin
306# undef stdout
307# undef stderr
308 /* pre-1300 has __p__iob(), but it's available only in msvcrt.lib,
309 * or in other words with /MD. Declaring implicit import, i.e.
310 * with _imp_ prefix, works correctly with all compiler options,
311 * but without /MD results in LINK warning LNK4049:
312 * 'locally defined symbol "__iob" imported'.
313 */
314 extern FILE *_imp___iob;
315# define stdin (&_imp___iob[0])
316# define stdout (&_imp___iob[1])
317# define stderr (&_imp___iob[2])
318# endif
319# endif
294# endif 320# endif
295# include <io.h> 321# include <io.h>
296# include <fcntl.h> 322# include <fcntl.h>
diff --git a/src/lib/libssl/src/engines/Makefile b/src/lib/libssl/src/engines/Makefile
index dbf1bd7251..002d40c964 100644
--- a/src/lib/libssl/src/engines/Makefile
+++ b/src/lib/libssl/src/engines/Makefile
@@ -146,16 +146,16 @@ e_4758cca.o: ../include/openssl/crypto.h ../include/openssl/dso.h
146e_4758cca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 146e_4758cca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
147e_4758cca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 147e_4758cca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
148e_4758cca.o: ../include/openssl/engine.h ../include/openssl/err.h 148e_4758cca.o: ../include/openssl/engine.h ../include/openssl/err.h
149e_4758cca.o: ../include/openssl/evp.h ../include/openssl/lhash.h 149e_4758cca.o: ../include/openssl/evp.h ../include/openssl/fips.h
150e_4758cca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 150e_4758cca.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
151e_4758cca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 151e_4758cca.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
152e_4758cca.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 152e_4758cca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
153e_4758cca.o: ../include/openssl/rand.h ../include/openssl/rsa.h 153e_4758cca.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
154e_4758cca.o: ../include/openssl/safestack.h ../include/openssl/sha.h 154e_4758cca.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
155e_4758cca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 155e_4758cca.o: ../include/openssl/sha.h ../include/openssl/stack.h
156e_4758cca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 156e_4758cca.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
157e_4758cca.o: e_4758cca.c e_4758cca_err.c e_4758cca_err.h 157e_4758cca.o: ../include/openssl/x509_vfy.h e_4758cca.c e_4758cca_err.c
158e_4758cca.o: vendor_defns/hw_4758_cca.h 158e_4758cca.o: e_4758cca_err.h vendor_defns/hw_4758_cca.h
159e_aep.o: ../include/openssl/asn1.h ../include/openssl/bio.h 159e_aep.o: ../include/openssl/asn1.h ../include/openssl/bio.h
160e_aep.o: ../include/openssl/bn.h ../include/openssl/buffer.h 160e_aep.o: ../include/openssl/bn.h ../include/openssl/buffer.h
161e_aep.o: ../include/openssl/crypto.h ../include/openssl/dh.h 161e_aep.o: ../include/openssl/crypto.h ../include/openssl/dh.h
@@ -163,15 +163,15 @@ e_aep.o: ../include/openssl/dsa.h ../include/openssl/dso.h
163e_aep.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 163e_aep.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
164e_aep.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 164e_aep.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
165e_aep.o: ../include/openssl/engine.h ../include/openssl/err.h 165e_aep.o: ../include/openssl/engine.h ../include/openssl/err.h
166e_aep.o: ../include/openssl/evp.h ../include/openssl/lhash.h 166e_aep.o: ../include/openssl/evp.h ../include/openssl/fips.h
167e_aep.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 167e_aep.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
168e_aep.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 168e_aep.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
169e_aep.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 169e_aep.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
170e_aep.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 170e_aep.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
171e_aep.o: ../include/openssl/sha.h ../include/openssl/stack.h 171e_aep.o: ../include/openssl/safestack.h ../include/openssl/sha.h
172e_aep.o: ../include/openssl/symhacks.h ../include/openssl/x509.h 172e_aep.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
173e_aep.o: ../include/openssl/x509_vfy.h e_aep.c e_aep_err.c e_aep_err.h 173e_aep.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_aep.c
174e_aep.o: vendor_defns/aep.h 174e_aep.o: e_aep_err.c e_aep_err.h vendor_defns/aep.h
175e_atalla.o: ../include/openssl/asn1.h ../include/openssl/bio.h 175e_atalla.o: ../include/openssl/asn1.h ../include/openssl/bio.h
176e_atalla.o: ../include/openssl/bn.h ../include/openssl/buffer.h 176e_atalla.o: ../include/openssl/bn.h ../include/openssl/buffer.h
177e_atalla.o: ../include/openssl/crypto.h ../include/openssl/dh.h 177e_atalla.o: ../include/openssl/crypto.h ../include/openssl/dh.h
@@ -179,28 +179,28 @@ e_atalla.o: ../include/openssl/dsa.h ../include/openssl/dso.h
179e_atalla.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 179e_atalla.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
180e_atalla.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 180e_atalla.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
181e_atalla.o: ../include/openssl/engine.h ../include/openssl/err.h 181e_atalla.o: ../include/openssl/engine.h ../include/openssl/err.h
182e_atalla.o: ../include/openssl/evp.h ../include/openssl/lhash.h 182e_atalla.o: ../include/openssl/evp.h ../include/openssl/fips.h
183e_atalla.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 183e_atalla.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
184e_atalla.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 184e_atalla.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
185e_atalla.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 185e_atalla.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
186e_atalla.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 186e_atalla.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
187e_atalla.o: ../include/openssl/sha.h ../include/openssl/stack.h 187e_atalla.o: ../include/openssl/safestack.h ../include/openssl/sha.h
188e_atalla.o: ../include/openssl/symhacks.h ../include/openssl/x509.h 188e_atalla.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
189e_atalla.o: ../include/openssl/x509_vfy.h e_atalla.c e_atalla_err.c 189e_atalla.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_atalla.c
190e_atalla.o: e_atalla_err.h vendor_defns/atalla.h 190e_atalla.o: e_atalla_err.c e_atalla_err.h vendor_defns/atalla.h
191e_capi.o: ../include/openssl/asn1.h ../include/openssl/bio.h 191e_capi.o: ../include/openssl/asn1.h ../include/openssl/bio.h
192e_capi.o: ../include/openssl/bn.h ../include/openssl/buffer.h 192e_capi.o: ../include/openssl/bn.h ../include/openssl/buffer.h
193e_capi.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 193e_capi.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
194e_capi.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 194e_capi.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
195e_capi.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 195e_capi.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
196e_capi.o: ../include/openssl/evp.h ../include/openssl/lhash.h 196e_capi.o: ../include/openssl/evp.h ../include/openssl/fips.h
197e_capi.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 197e_capi.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
198e_capi.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 198e_capi.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
199e_capi.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 199e_capi.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
200e_capi.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 200e_capi.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
201e_capi.o: ../include/openssl/sha.h ../include/openssl/stack.h 201e_capi.o: ../include/openssl/safestack.h ../include/openssl/sha.h
202e_capi.o: ../include/openssl/symhacks.h ../include/openssl/x509.h 202e_capi.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
203e_capi.o: ../include/openssl/x509_vfy.h e_capi.c 203e_capi.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_capi.c
204e_chil.o: ../include/openssl/asn1.h ../include/openssl/bio.h 204e_chil.o: ../include/openssl/asn1.h ../include/openssl/bio.h
205e_chil.o: ../include/openssl/bn.h ../include/openssl/buffer.h 205e_chil.o: ../include/openssl/bn.h ../include/openssl/buffer.h
206e_chil.o: ../include/openssl/crypto.h ../include/openssl/dh.h 206e_chil.o: ../include/openssl/crypto.h ../include/openssl/dh.h
@@ -208,16 +208,17 @@ e_chil.o: ../include/openssl/dso.h ../include/openssl/e_os2.h
208e_chil.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 208e_chil.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
209e_chil.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 209e_chil.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
210e_chil.o: ../include/openssl/err.h ../include/openssl/evp.h 210e_chil.o: ../include/openssl/err.h ../include/openssl/evp.h
211e_chil.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 211e_chil.o: ../include/openssl/fips.h ../include/openssl/lhash.h
212e_chil.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 212e_chil.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
213e_chil.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 213e_chil.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
214e_chil.o: ../include/openssl/pem.h ../include/openssl/pem2.h 214e_chil.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
215e_chil.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 215e_chil.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
216e_chil.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 216e_chil.o: ../include/openssl/rand.h ../include/openssl/rsa.h
217e_chil.o: ../include/openssl/sha.h ../include/openssl/stack.h 217e_chil.o: ../include/openssl/safestack.h ../include/openssl/sha.h
218e_chil.o: ../include/openssl/symhacks.h ../include/openssl/ui.h 218e_chil.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
219e_chil.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_chil.c 219e_chil.o: ../include/openssl/ui.h ../include/openssl/x509.h
220e_chil.o: e_chil_err.c e_chil_err.h vendor_defns/hwcryptohook.h 220e_chil.o: ../include/openssl/x509_vfy.h e_chil.c e_chil_err.c e_chil_err.h
221e_chil.o: vendor_defns/hwcryptohook.h
221e_cswift.o: ../include/openssl/asn1.h ../include/openssl/bio.h 222e_cswift.o: ../include/openssl/asn1.h ../include/openssl/bio.h
222e_cswift.o: ../include/openssl/bn.h ../include/openssl/buffer.h 223e_cswift.o: ../include/openssl/bn.h ../include/openssl/buffer.h
223e_cswift.o: ../include/openssl/crypto.h ../include/openssl/dh.h 224e_cswift.o: ../include/openssl/crypto.h ../include/openssl/dh.h
@@ -225,28 +226,29 @@ e_cswift.o: ../include/openssl/dsa.h ../include/openssl/dso.h
225e_cswift.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 226e_cswift.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
226e_cswift.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 227e_cswift.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
227e_cswift.o: ../include/openssl/engine.h ../include/openssl/err.h 228e_cswift.o: ../include/openssl/engine.h ../include/openssl/err.h
228e_cswift.o: ../include/openssl/evp.h ../include/openssl/lhash.h 229e_cswift.o: ../include/openssl/evp.h ../include/openssl/fips.h
229e_cswift.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 230e_cswift.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
230e_cswift.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 231e_cswift.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
231e_cswift.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 232e_cswift.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
232e_cswift.o: ../include/openssl/rand.h ../include/openssl/rsa.h 233e_cswift.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
233e_cswift.o: ../include/openssl/safestack.h ../include/openssl/sha.h 234e_cswift.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
234e_cswift.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 235e_cswift.o: ../include/openssl/sha.h ../include/openssl/stack.h
235e_cswift.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_cswift.c 236e_cswift.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
236e_cswift.o: e_cswift_err.c e_cswift_err.h vendor_defns/cswift.h 237e_cswift.o: ../include/openssl/x509_vfy.h e_cswift.c e_cswift_err.c
238e_cswift.o: e_cswift_err.h vendor_defns/cswift.h
237e_gmp.o: ../include/openssl/asn1.h ../include/openssl/bio.h 239e_gmp.o: ../include/openssl/asn1.h ../include/openssl/bio.h
238e_gmp.o: ../include/openssl/bn.h ../include/openssl/buffer.h 240e_gmp.o: ../include/openssl/bn.h ../include/openssl/buffer.h
239e_gmp.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 241e_gmp.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
240e_gmp.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 242e_gmp.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
241e_gmp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 243e_gmp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
242e_gmp.o: ../include/openssl/evp.h ../include/openssl/lhash.h 244e_gmp.o: ../include/openssl/evp.h ../include/openssl/fips.h
243e_gmp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 245e_gmp.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
244e_gmp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 246e_gmp.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
245e_gmp.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 247e_gmp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
246e_gmp.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 248e_gmp.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
247e_gmp.o: ../include/openssl/sha.h ../include/openssl/stack.h 249e_gmp.o: ../include/openssl/safestack.h ../include/openssl/sha.h
248e_gmp.o: ../include/openssl/symhacks.h ../include/openssl/x509.h 250e_gmp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
249e_gmp.o: ../include/openssl/x509_vfy.h e_gmp.c 251e_gmp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_gmp.c
250e_nuron.o: ../include/openssl/asn1.h ../include/openssl/bio.h 252e_nuron.o: ../include/openssl/asn1.h ../include/openssl/bio.h
251e_nuron.o: ../include/openssl/bn.h ../include/openssl/buffer.h 253e_nuron.o: ../include/openssl/bn.h ../include/openssl/buffer.h
252e_nuron.o: ../include/openssl/crypto.h ../include/openssl/dh.h 254e_nuron.o: ../include/openssl/crypto.h ../include/openssl/dh.h
@@ -254,14 +256,15 @@ e_nuron.o: ../include/openssl/dsa.h ../include/openssl/dso.h
254e_nuron.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 256e_nuron.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
255e_nuron.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 257e_nuron.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
256e_nuron.o: ../include/openssl/engine.h ../include/openssl/err.h 258e_nuron.o: ../include/openssl/engine.h ../include/openssl/err.h
257e_nuron.o: ../include/openssl/evp.h ../include/openssl/lhash.h 259e_nuron.o: ../include/openssl/evp.h ../include/openssl/fips.h
258e_nuron.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 260e_nuron.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
259e_nuron.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 261e_nuron.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
260e_nuron.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 262e_nuron.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
261e_nuron.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 263e_nuron.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
262e_nuron.o: ../include/openssl/sha.h ../include/openssl/stack.h 264e_nuron.o: ../include/openssl/safestack.h ../include/openssl/sha.h
263e_nuron.o: ../include/openssl/symhacks.h ../include/openssl/x509.h 265e_nuron.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
264e_nuron.o: ../include/openssl/x509_vfy.h e_nuron.c e_nuron_err.c e_nuron_err.h 266e_nuron.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_nuron.c
267e_nuron.o: e_nuron_err.c e_nuron_err.h
265e_sureware.o: ../include/openssl/asn1.h ../include/openssl/bio.h 268e_sureware.o: ../include/openssl/asn1.h ../include/openssl/bio.h
266e_sureware.o: ../include/openssl/bn.h ../include/openssl/buffer.h 269e_sureware.o: ../include/openssl/bn.h ../include/openssl/buffer.h
267e_sureware.o: ../include/openssl/crypto.h ../include/openssl/dh.h 270e_sureware.o: ../include/openssl/crypto.h ../include/openssl/dh.h
@@ -269,17 +272,17 @@ e_sureware.o: ../include/openssl/dsa.h ../include/openssl/dso.h
269e_sureware.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 272e_sureware.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
270e_sureware.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 273e_sureware.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
271e_sureware.o: ../include/openssl/engine.h ../include/openssl/err.h 274e_sureware.o: ../include/openssl/engine.h ../include/openssl/err.h
272e_sureware.o: ../include/openssl/evp.h ../include/openssl/lhash.h 275e_sureware.o: ../include/openssl/evp.h ../include/openssl/fips.h
273e_sureware.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 276e_sureware.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
274e_sureware.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 277e_sureware.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
275e_sureware.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 278e_sureware.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
276e_sureware.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 279e_sureware.o: ../include/openssl/pem.h ../include/openssl/pem2.h
277e_sureware.o: ../include/openssl/rand.h ../include/openssl/rsa.h 280e_sureware.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
278e_sureware.o: ../include/openssl/safestack.h ../include/openssl/sha.h 281e_sureware.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
279e_sureware.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 282e_sureware.o: ../include/openssl/sha.h ../include/openssl/stack.h
280e_sureware.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 283e_sureware.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
281e_sureware.o: e_sureware.c e_sureware_err.c e_sureware_err.h 284e_sureware.o: ../include/openssl/x509_vfy.h e_sureware.c e_sureware_err.c
282e_sureware.o: vendor_defns/sureware.h 285e_sureware.o: e_sureware_err.h vendor_defns/sureware.h
283e_ubsec.o: ../include/openssl/asn1.h ../include/openssl/bio.h 286e_ubsec.o: ../include/openssl/asn1.h ../include/openssl/bio.h
284e_ubsec.o: ../include/openssl/bn.h ../include/openssl/buffer.h 287e_ubsec.o: ../include/openssl/bn.h ../include/openssl/buffer.h
285e_ubsec.o: ../include/openssl/crypto.h ../include/openssl/dh.h 288e_ubsec.o: ../include/openssl/crypto.h ../include/openssl/dh.h
@@ -287,12 +290,12 @@ e_ubsec.o: ../include/openssl/dsa.h ../include/openssl/dso.h
287e_ubsec.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 290e_ubsec.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
288e_ubsec.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 291e_ubsec.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
289e_ubsec.o: ../include/openssl/engine.h ../include/openssl/err.h 292e_ubsec.o: ../include/openssl/engine.h ../include/openssl/err.h
290e_ubsec.o: ../include/openssl/evp.h ../include/openssl/lhash.h 293e_ubsec.o: ../include/openssl/evp.h ../include/openssl/fips.h
291e_ubsec.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 294e_ubsec.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
292e_ubsec.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 295e_ubsec.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
293e_ubsec.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 296e_ubsec.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
294e_ubsec.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 297e_ubsec.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
295e_ubsec.o: ../include/openssl/sha.h ../include/openssl/stack.h 298e_ubsec.o: ../include/openssl/safestack.h ../include/openssl/sha.h
296e_ubsec.o: ../include/openssl/symhacks.h ../include/openssl/x509.h 299e_ubsec.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
297e_ubsec.o: ../include/openssl/x509_vfy.h e_ubsec.c e_ubsec_err.c e_ubsec_err.h 300e_ubsec.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_ubsec.c
298e_ubsec.o: vendor_defns/hw_ubsec.h 301e_ubsec.o: e_ubsec_err.c e_ubsec_err.h vendor_defns/hw_ubsec.h
diff --git a/src/lib/libssl/src/makevms.com b/src/lib/libssl/src/makevms.com
index 4f70308082..e0b856d1bb 100644
--- a/src/lib/libssl/src/makevms.com
+++ b/src/lib/libssl/src/makevms.com
@@ -429,11 +429,11 @@ $!
429$ SDIRS := ,- 429$ SDIRS := ,-
430 OBJECTS,- 430 OBJECTS,-
431 MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,- 431 MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,-
432 DES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,- 432 DES,AES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,-
433 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,- 433 BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,-
434 BUFFER,BIO,STACK,LHASH,RAND,ERR,- 434 BUFFER,BIO,STACK,LHASH,RAND,ERR,-
435 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,- 435 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,-
436 STORE,CMS,PQUEUE 436 STORE,CMS,PQUEUE,JPAKE
437$ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h,- 437$ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h,-
438 ossl_typ.h 438 ossl_typ.h
439$ EXHEADER_OBJECTS := objects.h,obj_mac.h 439$ EXHEADER_OBJECTS := objects.h,obj_mac.h
@@ -445,6 +445,7 @@ $ EXHEADER_MDC2 := mdc2.h
445$ EXHEADER_HMAC := hmac.h 445$ EXHEADER_HMAC := hmac.h
446$ EXHEADER_RIPEMD := ripemd.h 446$ EXHEADER_RIPEMD := ripemd.h
447$ EXHEADER_DES := des.h,des_old.h 447$ EXHEADER_DES := des.h,des_old.h
448$ EXHEADER_AES := aes.h
448$ EXHEADER_RC2 := rc2.h 449$ EXHEADER_RC2 := rc2.h
449$ EXHEADER_RC4 := rc4.h 450$ EXHEADER_RC4 := rc4.h
450$ EXHEADER_RC5 := rc5.h 451$ EXHEADER_RC5 := rc5.h
@@ -462,7 +463,6 @@ $ EXHEADER_DH := dh.h
462$ EXHEADER_ECDH := ecdh.h 463$ EXHEADER_ECDH := ecdh.h
463$ EXHEADER_DSO := dso.h 464$ EXHEADER_DSO := dso.h
464$ EXHEADER_ENGINE := engine.h 465$ EXHEADER_ENGINE := engine.h
465$ EXHEADER_AES := aes.h
466$ EXHEADER_BUFFER := buffer.h 466$ EXHEADER_BUFFER := buffer.h
467$ EXHEADER_BIO := bio.h 467$ EXHEADER_BIO := bio.h
468$ EXHEADER_STACK := stack.h,safestack.h 468$ EXHEADER_STACK := stack.h,safestack.h
@@ -486,6 +486,7 @@ $!EXHEADER_STORE := store.h,str_compat.h
486$ EXHEADER_STORE := store.h 486$ EXHEADER_STORE := store.h
487$ EXHEADER_CMS := cms.h 487$ EXHEADER_CMS := cms.h
488$ EXHEADER_PQUEUE := pqueue.h,pq_compat.h 488$ EXHEADER_PQUEUE := pqueue.h,pq_compat.h
489$ EXHEADER_JPAKE := jpake.h
489$ 490$
490$ I = 0 491$ I = 0
491$ LOOP_SDIRS: 492$ LOOP_SDIRS:
diff --git a/src/lib/libssl/src/ms/do_masm.bat b/src/lib/libssl/src/ms/do_masm.bat
index 6ea1c98716..8c22256b32 100644
--- a/src/lib/libssl/src/ms/do_masm.bat
+++ b/src/lib/libssl/src/ms/do_masm.bat
@@ -7,6 +7,7 @@ echo Bignum
7cd crypto\bn\asm 7cd crypto\bn\asm
8perl bn-586.pl win32 %ASMOPTS% > bn_win32.asm 8perl bn-586.pl win32 %ASMOPTS% > bn_win32.asm
9perl co-586.pl win32 %ASMOPTS% > co_win32.asm 9perl co-586.pl win32 %ASMOPTS% > co_win32.asm
10perl mo-586.pl win32 %ASMOPTS% > mt_win32.asm
10cd ..\..\.. 11cd ..\..\..
11 12
12echo AES 13echo AES
diff --git a/src/lib/libssl/src/ms/do_nasm.bat b/src/lib/libssl/src/ms/do_nasm.bat
index 7a2fa45663..7656c498df 100644
--- a/src/lib/libssl/src/ms/do_nasm.bat
+++ b/src/lib/libssl/src/ms/do_nasm.bat
@@ -8,6 +8,7 @@ echo Bignum
8cd crypto\bn\asm 8cd crypto\bn\asm
9perl bn-586.pl win32n %ASMOPTS% > bn_win32.asm 9perl bn-586.pl win32n %ASMOPTS% > bn_win32.asm
10perl co-586.pl win32n %ASMOPTS% > co_win32.asm 10perl co-586.pl win32n %ASMOPTS% > co_win32.asm
11perl mo-586.pl win32n %ASMOPTS% > mt_win32.asm
11cd ..\..\.. 12cd ..\..\..
12 13
13echo AES 14echo AES
diff --git a/src/lib/libssl/src/ms/test.bat b/src/lib/libssl/src/ms/test.bat
index 5085670b99..f729261782 100644
--- a/src/lib/libssl/src/ms/test.bat
+++ b/src/lib/libssl/src/ms/test.bat
@@ -1,195 +1,190 @@
1@echo off 1@echo off
2 2
3set test=..\ms 3set test=..\ms
4set opath=%PATH% 4set opath=%PATH%
5PATH=..\ms;%PATH% 5PATH=..\ms;%PATH%
6set OPENSSL_CONF=..\apps\openssl.cnf 6set OPENSSL_CONF=..\apps\openssl.cnf
7 7
8rem run this from inside the bin directory 8rem run this from inside the bin directory
9 9
10echo rsa_test 10echo rsa_test
11rsa_test 11rsa_test
12if errorlevel 1 goto done 12if errorlevel 1 goto done
13 13
14echo destest 14echo destest
15destest 15destest
16if errorlevel 1 goto done 16if errorlevel 1 goto done
17 17
18echo ideatest 18echo ideatest
19ideatest 19ideatest
20if errorlevel 1 goto done 20if errorlevel 1 goto done
21 21
22echo bftest 22echo bftest
23bftest 23bftest
24if errorlevel 1 goto done 24if errorlevel 1 goto done
25 25
26echo shatest 26echo shatest
27shatest 27shatest
28if errorlevel 1 goto done 28if errorlevel 1 goto done
29 29
30echo sha1test 30echo sha1test
31sha1test 31sha1test
32if errorlevel 1 goto done 32if errorlevel 1 goto done
33 33
34echo md5test 34echo md5test
35md5test 35md5test
36if errorlevel 1 goto done 36if errorlevel 1 goto done
37 37
38echo md2test 38echo md2test
39md2test 39md2test
40if errorlevel 1 goto done 40if errorlevel 1 goto done
41 41
42echo rc2test 42echo rc2test
43rc2test 43rc2test
44if errorlevel 1 goto done 44if errorlevel 1 goto done
45 45
46echo rc4test 46echo rc4test
47rc4test 47rc4test
48if errorlevel 1 goto done 48if errorlevel 1 goto done
49 49
50echo randtest 50echo randtest
51randtest 51randtest
52if errorlevel 1 goto done 52if errorlevel 1 goto done
53 53
54echo dhtest 54echo dhtest
55dhtest 55dhtest
56if errorlevel 1 goto done 56if errorlevel 1 goto done
57 57
58echo exptest 58echo exptest
59exptest 59exptest
60if errorlevel 1 goto done 60if errorlevel 1 goto done
61 61
62echo dsatest 62echo dsatest
63dsatest 63dsatest
64if errorlevel 1 goto done 64if errorlevel 1 goto done
65 65
66echo ectest 66echo ectest
67ectest 67ectest
68if errorlevel 1 goto done 68if errorlevel 1 goto done
69 69
70echo testenc 70echo testenc
71call %test%\testenc openssl 71call %test%\testenc openssl
72if errorlevel 1 goto done 72if errorlevel 1 goto done
73 73
74echo testpem 74echo testpem
75call %test%\testpem openssl 75call %test%\testpem openssl
76if errorlevel 1 goto done 76if errorlevel 1 goto done
77 77
78echo verify 78echo testss
79copy ..\certs\*.pem cert.tmp >nul 79call %test%\testss openssl
80openssl verify -CAfile cert.tmp ..\certs\*.pem 80if errorlevel 1 goto done
81 81
82echo testss 82set SSL_TEST=ssltest -key keyU.ss -cert certU.ss -c_key keyU.ss -c_cert certU.ss -CAfile certCA.ss
83call %test%\testss openssl 83
84if errorlevel 1 goto done 84echo test sslv2
85 85ssltest -ssl2
86set SSL_TEST=ssltest -key keyU.ss -cert certU.ss -c_key keyU.ss -c_cert certU.ss -CAfile certCA.ss 86if errorlevel 1 goto done
87 87
88echo test sslv2 88echo test sslv2 with server authentication
89ssltest -ssl2 89%SSL_TEST% -ssl2 -server_auth
90if errorlevel 1 goto done 90if errorlevel 1 goto done
91 91
92echo test sslv2 with server authentication 92echo test sslv2 with client authentication
93%SSL_TEST% -ssl2 -server_auth 93%SSL_TEST% -ssl2 -client_auth
94if errorlevel 1 goto done 94if errorlevel 1 goto done
95 95
96echo test sslv2 with client authentication 96echo test sslv2 with both client and server authentication
97%SSL_TEST% -ssl2 -client_auth 97%SSL_TEST% -ssl2 -server_auth -client_auth
98if errorlevel 1 goto done 98if errorlevel 1 goto done
99 99
100echo test sslv2 with both client and server authentication 100echo test sslv3
101%SSL_TEST% -ssl2 -server_auth -client_auth 101ssltest -ssl3
102if errorlevel 1 goto done 102if errorlevel 1 goto done
103 103
104echo test sslv3 104echo test sslv3 with server authentication
105ssltest -ssl3 105%SSL_TEST% -ssl3 -server_auth
106if errorlevel 1 goto done 106if errorlevel 1 goto done
107 107
108echo test sslv3 with server authentication 108echo test sslv3 with client authentication
109%SSL_TEST% -ssl3 -server_auth 109%SSL_TEST% -ssl3 -client_auth
110if errorlevel 1 goto done 110if errorlevel 1 goto done
111 111
112echo test sslv3 with client authentication 112echo test sslv3 with both client and server authentication
113%SSL_TEST% -ssl3 -client_auth 113%SSL_TEST% -ssl3 -server_auth -client_auth
114if errorlevel 1 goto done 114if errorlevel 1 goto done
115 115
116echo test sslv3 with both client and server authentication 116echo test sslv2/sslv3
117%SSL_TEST% -ssl3 -server_auth -client_auth 117ssltest
118if errorlevel 1 goto done 118if errorlevel 1 goto done
119 119
120echo test sslv2/sslv3 120echo test sslv2/sslv3 with server authentication
121ssltest 121%SSL_TEST% -server_auth
122if errorlevel 1 goto done 122if errorlevel 1 goto done
123 123
124echo test sslv2/sslv3 with server authentication 124echo test sslv2/sslv3 with client authentication
125%SSL_TEST% -server_auth 125%SSL_TEST% -client_auth
126if errorlevel 1 goto done 126if errorlevel 1 goto done
127 127
128echo test sslv2/sslv3 with client authentication 128echo test sslv2/sslv3 with both client and server authentication
129%SSL_TEST% -client_auth 129%SSL_TEST% -server_auth -client_auth
130if errorlevel 1 goto done 130if errorlevel 1 goto done
131 131
132echo test sslv2/sslv3 with both client and server authentication 132echo test sslv2 via BIO pair
133%SSL_TEST% -server_auth -client_auth 133ssltest -bio_pair -ssl2
134if errorlevel 1 goto done 134if errorlevel 1 goto done
135 135
136echo test sslv2 via BIO pair 136echo test sslv2/sslv3 with 1024 bit DHE via BIO pair
137ssltest -bio_pair -ssl2 137ssltest -bio_pair -dhe1024dsa -v
138if errorlevel 1 goto done 138if errorlevel 1 goto done
139 139
140echo test sslv2/sslv3 with 1024 bit DHE via BIO pair 140echo test sslv2 with server authentication via BIO pair
141ssltest -bio_pair -dhe1024dsa -v 141%SSL_TEST% -bio_pair -ssl2 -server_auth
142if errorlevel 1 goto done 142if errorlevel 1 goto done
143 143
144echo test sslv2 with server authentication via BIO pair 144echo test sslv2 with client authentication via BIO pair
145%SSL_TEST% -bio_pair -ssl2 -server_auth 145%SSL_TEST% -bio_pair -ssl2 -client_auth
146if errorlevel 1 goto done 146if errorlevel 1 goto done
147 147
148echo test sslv2 with client authentication via BIO pair 148echo test sslv2 with both client and server authentication via BIO pair
149%SSL_TEST% -bio_pair -ssl2 -client_auth 149%SSL_TEST% -bio_pair -ssl2 -server_auth -client_auth
150if errorlevel 1 goto done 150if errorlevel 1 goto done
151 151
152echo test sslv2 with both client and server authentication via BIO pair 152echo test sslv3 via BIO pair
153%SSL_TEST% -bio_pair -ssl2 -server_auth -client_auth 153ssltest -bio_pair -ssl3
154if errorlevel 1 goto done 154if errorlevel 1 goto done
155 155
156echo test sslv3 via BIO pair 156echo test sslv3 with server authentication via BIO pair
157ssltest -bio_pair -ssl3 157%SSL_TEST% -bio_pair -ssl3 -server_auth
158if errorlevel 1 goto done 158if errorlevel 1 goto done
159 159
160echo test sslv3 with server authentication via BIO pair 160echo test sslv3 with client authentication via BIO pair
161%SSL_TEST% -bio_pair -ssl3 -server_auth 161%SSL_TEST% -bio_pair -ssl3 -client_auth
162if errorlevel 1 goto done 162if errorlevel 1 goto done
163 163
164echo test sslv3 with client authentication via BIO pair 164echo test sslv3 with both client and server authentication via BIO pair
165%SSL_TEST% -bio_pair -ssl3 -client_auth 165%SSL_TEST% -bio_pair -ssl3 -server_auth -client_auth
166if errorlevel 1 goto done 166if errorlevel 1 goto done
167 167
168echo test sslv3 with both client and server authentication via BIO pair 168echo test sslv2/sslv3 via BIO pair
169%SSL_TEST% -bio_pair -ssl3 -server_auth -client_auth 169ssltest -bio_pair
170if errorlevel 1 goto done 170if errorlevel 1 goto done
171 171
172echo test sslv2/sslv3 via BIO pair 172echo test sslv2/sslv3 with server authentication
173ssltest -bio_pair 173%SSL_TEST% -bio_pair -server_auth
174if errorlevel 1 goto done 174if errorlevel 1 goto done
175 175
176echo test sslv2/sslv3 with server authentication 176echo test sslv2/sslv3 with client authentication via BIO pair
177%SSL_TEST% -bio_pair -server_auth 177%SSL_TEST% -bio_pair -client_auth
178if errorlevel 1 goto done 178if errorlevel 1 goto done
179 179
180echo test sslv2/sslv3 with client authentication via BIO pair 180echo test sslv2/sslv3 with both client and server authentication via BIO pair
181%SSL_TEST% -bio_pair -client_auth 181%SSL_TEST% -bio_pair -server_auth -client_auth
182if errorlevel 1 goto done 182if errorlevel 1 goto done
183 183
184echo test sslv2/sslv3 with both client and server authentication via BIO pair 184
185%SSL_TEST% -bio_pair -server_auth -client_auth 185echo passed all tests
186if errorlevel 1 goto done 186goto end
187 187:done
188del cert.tmp 188echo problems.....
189 189:end
190echo passed all tests 190PATH=%opath%
191goto end
192:done
193echo problems.....
194:end
195PATH=%opath%
diff --git a/src/lib/libssl/src/openssl.spec b/src/lib/libssl/src/openssl.spec
index a1fa198423..6008c3c9c8 100644
--- a/src/lib/libssl/src/openssl.spec
+++ b/src/lib/libssl/src/openssl.spec
@@ -1,7 +1,7 @@
1%define libmaj 0 1%define libmaj 0
2%define libmin 9 2%define libmin 9
3%define librel 8 3%define librel 8
4%define librev i 4%define librev j
5Release: 1 5Release: 1
6 6
7%define openssldir /var/ssl 7%define openssldir /var/ssl
diff --git a/src/lib/libssl/src/ssl/Makefile b/src/lib/libssl/src/ssl/Makefile
index cb4267f5de..46c06597fa 100644
--- a/src/lib/libssl/src/ssl/Makefile
+++ b/src/lib/libssl/src/ssl/Makefile
@@ -53,7 +53,7 @@ ALL= $(GENERAL) $(SRC) $(HEADER)
53top: 53top:
54 (cd ..; $(MAKE) DIRS=$(DIR) all) 54 (cd ..; $(MAKE) DIRS=$(DIR) all)
55 55
56all: shared 56all: lib
57 57
58lib: $(LIBOBJ) 58lib: $(LIBOBJ)
59 $(AR) $(LIB) $(LIBOBJ) 59 $(AR) $(LIB) $(LIBOBJ)
@@ -111,19 +111,19 @@ bio_ssl.o: ../include/openssl/comp.h ../include/openssl/crypto.h
111bio_ssl.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 111bio_ssl.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
112bio_ssl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 112bio_ssl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
113bio_ssl.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 113bio_ssl.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
114bio_ssl.o: ../include/openssl/evp.h ../include/openssl/hmac.h 114bio_ssl.o: ../include/openssl/evp.h ../include/openssl/fips.h
115bio_ssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 115bio_ssl.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
116bio_ssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 116bio_ssl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
117bio_ssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 117bio_ssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
118bio_ssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 118bio_ssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
119bio_ssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 119bio_ssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
120bio_ssl.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 120bio_ssl.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
121bio_ssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h 121bio_ssl.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
122bio_ssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 122bio_ssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h
123bio_ssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 123bio_ssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
124bio_ssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 124bio_ssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
125bio_ssl.o: ../include/openssl/tls1.h ../include/openssl/x509.h 125bio_ssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
126bio_ssl.o: ../include/openssl/x509_vfy.h bio_ssl.c 126bio_ssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h bio_ssl.c
127d1_both.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 127d1_both.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
128d1_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h 128d1_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h
129d1_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h 129d1_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -131,20 +131,20 @@ d1_both.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
131d1_both.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 131d1_both.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
132d1_both.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 132d1_both.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
133d1_both.o: ../include/openssl/err.h ../include/openssl/evp.h 133d1_both.o: ../include/openssl/err.h ../include/openssl/evp.h
134d1_both.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 134d1_both.o: ../include/openssl/fips.h ../include/openssl/hmac.h
135d1_both.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 135d1_both.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
136d1_both.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 136d1_both.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
137d1_both.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 137d1_both.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
138d1_both.o: ../include/openssl/pem.h ../include/openssl/pem2.h 138d1_both.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
139d1_both.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 139d1_both.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
140d1_both.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 140d1_both.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
141d1_both.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 141d1_both.o: ../include/openssl/rand.h ../include/openssl/rsa.h
142d1_both.o: ../include/openssl/sha.h ../include/openssl/ssl.h 142d1_both.o: ../include/openssl/safestack.h ../include/openssl/sha.h
143d1_both.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 143d1_both.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
144d1_both.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 144d1_both.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
145d1_both.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 145d1_both.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
146d1_both.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_both.c 146d1_both.o: ../include/openssl/tls1.h ../include/openssl/x509.h
147d1_both.o: ssl_locl.h 147d1_both.o: ../include/openssl/x509_vfy.h d1_both.c ssl_locl.h
148d1_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 148d1_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
149d1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 149d1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
150d1_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 150d1_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -152,21 +152,21 @@ d1_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h
152d1_clnt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 152d1_clnt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
153d1_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 153d1_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
154d1_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 154d1_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
155d1_clnt.o: ../include/openssl/evp.h ../include/openssl/hmac.h 155d1_clnt.o: ../include/openssl/evp.h ../include/openssl/fips.h
156d1_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 156d1_clnt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
157d1_clnt.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h 157d1_clnt.o: ../include/openssl/lhash.h ../include/openssl/md5.h
158d1_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 158d1_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
159d1_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 159d1_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
160d1_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h 160d1_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
161d1_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 161d1_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
162d1_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 162d1_clnt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
163d1_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 163d1_clnt.o: ../include/openssl/rand.h ../include/openssl/rsa.h
164d1_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h 164d1_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
165d1_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 165d1_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
166d1_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 166d1_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
167d1_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 167d1_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
168d1_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_clnt.c 168d1_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
169d1_clnt.o: kssl_lcl.h ssl_locl.h 169d1_clnt.o: ../include/openssl/x509_vfy.h d1_clnt.c kssl_lcl.h ssl_locl.h
170d1_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 170d1_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
171d1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h 171d1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
172d1_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h 172d1_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -174,20 +174,21 @@ d1_enc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
174d1_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 174d1_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
175d1_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 175d1_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
176d1_enc.o: ../include/openssl/err.h ../include/openssl/evp.h 176d1_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
177d1_enc.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 177d1_enc.o: ../include/openssl/fips.h ../include/openssl/hmac.h
178d1_enc.o: ../include/openssl/lhash.h ../include/openssl/md5.h 178d1_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
179d1_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 179d1_enc.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
180d1_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 180d1_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
181d1_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 181d1_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
182d1_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 182d1_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
183d1_enc.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 183d1_enc.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
184d1_enc.o: ../include/openssl/rand.h ../include/openssl/rsa.h 184d1_enc.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
185d1_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h 185d1_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
186d1_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 186d1_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h
187d1_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 187d1_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
188d1_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 188d1_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
189d1_enc.o: ../include/openssl/tls1.h ../include/openssl/x509.h 189d1_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
190d1_enc.o: ../include/openssl/x509_vfy.h d1_enc.c ssl_locl.h 190d1_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_enc.c
191d1_enc.o: ssl_locl.h
191d1_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 192d1_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
192d1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h 193d1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
193d1_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h 194d1_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -195,19 +196,20 @@ d1_lib.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
195d1_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 196d1_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
196d1_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 197d1_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
197d1_lib.o: ../include/openssl/err.h ../include/openssl/evp.h 198d1_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
198d1_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 199d1_lib.o: ../include/openssl/fips.h ../include/openssl/hmac.h
199d1_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 200d1_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
200d1_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 201d1_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
201d1_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 202d1_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
202d1_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h 203d1_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
203d1_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 204d1_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
204d1_lib.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 205d1_lib.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
205d1_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h 206d1_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
206d1_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 207d1_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h
207d1_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 208d1_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
208d1_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 209d1_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
209d1_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h 210d1_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
210d1_lib.o: ../include/openssl/x509_vfy.h d1_lib.c ssl_locl.h 211d1_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_lib.c
212d1_lib.o: ssl_locl.h
211d1_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 213d1_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
212d1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h 214d1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
213d1_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h 215d1_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -215,19 +217,20 @@ d1_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
215d1_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 217d1_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
216d1_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 218d1_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
217d1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h 219d1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
218d1_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 220d1_meth.o: ../include/openssl/fips.h ../include/openssl/hmac.h
219d1_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 221d1_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
220d1_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 222d1_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
221d1_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 223d1_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
222d1_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h 224d1_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
223d1_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 225d1_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
224d1_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 226d1_meth.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
225d1_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h 227d1_meth.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
226d1_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 228d1_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h
227d1_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 229d1_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
228d1_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 230d1_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
229d1_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h 231d1_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
230d1_meth.o: ../include/openssl/x509_vfy.h d1_meth.c ssl_locl.h 232d1_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_meth.c
233d1_meth.o: ssl_locl.h
231d1_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 234d1_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
232d1_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 235d1_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
233d1_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 236d1_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -235,20 +238,20 @@ d1_pkt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
235d1_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 238d1_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
236d1_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 239d1_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
237d1_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h 240d1_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
238d1_pkt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 241d1_pkt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
239d1_pkt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 242d1_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
240d1_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 243d1_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
241d1_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 244d1_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
242d1_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h 245d1_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
243d1_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 246d1_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
244d1_pkt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 247d1_pkt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
245d1_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 248d1_pkt.o: ../include/openssl/rand.h ../include/openssl/rsa.h
246d1_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h 249d1_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
247d1_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 250d1_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
248d1_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 251d1_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
249d1_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 252d1_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
250d1_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_pkt.c 253d1_pkt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
251d1_pkt.o: ssl_locl.h 254d1_pkt.o: ../include/openssl/x509_vfy.h d1_pkt.c ssl_locl.h
252d1_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 255d1_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
253d1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h 256d1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
254d1_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h 257d1_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -256,40 +259,40 @@ d1_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
256d1_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 259d1_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
257d1_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 260d1_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
258d1_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 261d1_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
259d1_srvr.o: ../include/openssl/evp.h ../include/openssl/hmac.h 262d1_srvr.o: ../include/openssl/evp.h ../include/openssl/fips.h
260d1_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 263d1_srvr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
261d1_srvr.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h 264d1_srvr.o: ../include/openssl/lhash.h ../include/openssl/md5.h
262d1_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 265d1_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
263d1_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 266d1_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
264d1_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h 267d1_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
265d1_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 268d1_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
266d1_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 269d1_srvr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
267d1_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 270d1_srvr.o: ../include/openssl/rand.h ../include/openssl/rsa.h
268d1_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h 271d1_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
269d1_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 272d1_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
270d1_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 273d1_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
271d1_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 274d1_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
272d1_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h d1_srvr.c 275d1_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
273d1_srvr.o: ssl_locl.h 276d1_srvr.o: ../include/openssl/x509_vfy.h d1_srvr.c ssl_locl.h
274kssl.o: ../include/openssl/asn1.h ../include/openssl/bio.h 277kssl.o: ../include/openssl/asn1.h ../include/openssl/bio.h
275kssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h 278kssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
276kssl.o: ../include/openssl/comp.h ../include/openssl/crypto.h 279kssl.o: ../include/openssl/comp.h ../include/openssl/crypto.h
277kssl.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 280kssl.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
278kssl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 281kssl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
279kssl.o: ../include/openssl/ecdsa.h ../include/openssl/evp.h 282kssl.o: ../include/openssl/ecdsa.h ../include/openssl/evp.h
280kssl.o: ../include/openssl/hmac.h ../include/openssl/krb5_asn.h 283kssl.o: ../include/openssl/fips.h ../include/openssl/hmac.h
281kssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 284kssl.o: ../include/openssl/krb5_asn.h ../include/openssl/kssl.h
282kssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 285kssl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
283kssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 286kssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
284kssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 287kssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
285kssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 288kssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
286kssl.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 289kssl.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
287kssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h 290kssl.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
288kssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 291kssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h
289kssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 292kssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
290kssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 293kssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
291kssl.o: ../include/openssl/tls1.h ../include/openssl/x509.h 294kssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
292kssl.o: ../include/openssl/x509_vfy.h kssl.c 295kssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl.c
293s23_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 296s23_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
294s23_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 297s23_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
295s23_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 298s23_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -297,20 +300,20 @@ s23_clnt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
297s23_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 300s23_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
298s23_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 301s23_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
299s23_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h 302s23_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
300s23_clnt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 303s23_clnt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
301s23_clnt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 304s23_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
302s23_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 305s23_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
303s23_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 306s23_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
304s23_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h 307s23_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
305s23_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 308s23_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
306s23_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 309s23_clnt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
307s23_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 310s23_clnt.o: ../include/openssl/rand.h ../include/openssl/rsa.h
308s23_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h 311s23_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
309s23_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 312s23_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
310s23_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 313s23_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
311s23_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 314s23_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
312s23_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_clnt.c 315s23_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
313s23_clnt.o: ssl_locl.h 316s23_clnt.o: ../include/openssl/x509_vfy.h s23_clnt.c ssl_locl.h
314s23_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 317s23_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
315s23_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h 318s23_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
316s23_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h 319s23_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -318,19 +321,20 @@ s23_lib.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
318s23_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 321s23_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
319s23_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 322s23_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
320s23_lib.o: ../include/openssl/err.h ../include/openssl/evp.h 323s23_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
321s23_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 324s23_lib.o: ../include/openssl/fips.h ../include/openssl/hmac.h
322s23_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 325s23_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
323s23_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 326s23_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
324s23_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 327s23_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
325s23_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h 328s23_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
326s23_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 329s23_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
327s23_lib.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 330s23_lib.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
328s23_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h 331s23_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
329s23_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 332s23_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h
330s23_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 333s23_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
331s23_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 334s23_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
332s23_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h 335s23_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
333s23_lib.o: ../include/openssl/x509_vfy.h s23_lib.c ssl_locl.h 336s23_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_lib.c
337s23_lib.o: ssl_locl.h
334s23_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 338s23_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
335s23_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h 339s23_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
336s23_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h 340s23_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -338,19 +342,20 @@ s23_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
338s23_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 342s23_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
339s23_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 343s23_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
340s23_meth.o: ../include/openssl/err.h ../include/openssl/evp.h 344s23_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
341s23_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 345s23_meth.o: ../include/openssl/fips.h ../include/openssl/hmac.h
342s23_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 346s23_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
343s23_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 347s23_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
344s23_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 348s23_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
345s23_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h 349s23_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
346s23_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 350s23_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
347s23_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 351s23_meth.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
348s23_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h 352s23_meth.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
349s23_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 353s23_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h
350s23_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 354s23_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
351s23_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 355s23_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
352s23_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h 356s23_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
353s23_meth.o: ../include/openssl/x509_vfy.h s23_meth.c ssl_locl.h 357s23_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_meth.c
358s23_meth.o: ssl_locl.h
354s23_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 359s23_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
355s23_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 360s23_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
356s23_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 361s23_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -358,19 +363,20 @@ s23_pkt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
358s23_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 363s23_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
359s23_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 364s23_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
360s23_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h 365s23_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
361s23_pkt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 366s23_pkt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
362s23_pkt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 367s23_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
363s23_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 368s23_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
364s23_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 369s23_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
365s23_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h 370s23_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
366s23_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 371s23_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
367s23_pkt.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 372s23_pkt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
368s23_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h 373s23_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
369s23_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 374s23_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
370s23_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 375s23_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
371s23_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 376s23_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
372s23_pkt.o: ../include/openssl/tls1.h ../include/openssl/x509.h 377s23_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
373s23_pkt.o: ../include/openssl/x509_vfy.h s23_pkt.c ssl_locl.h 378s23_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_pkt.c
379s23_pkt.o: ssl_locl.h
374s23_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 380s23_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
375s23_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h 381s23_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
376s23_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h 382s23_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -378,20 +384,20 @@ s23_srvr.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
378s23_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 384s23_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
379s23_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 385s23_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
380s23_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h 386s23_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
381s23_srvr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 387s23_srvr.o: ../include/openssl/fips.h ../include/openssl/hmac.h
382s23_srvr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 388s23_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
383s23_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 389s23_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
384s23_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 390s23_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
385s23_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h 391s23_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
386s23_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 392s23_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
387s23_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 393s23_srvr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
388s23_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 394s23_srvr.o: ../include/openssl/rand.h ../include/openssl/rsa.h
389s23_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h 395s23_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
390s23_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 396s23_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
391s23_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 397s23_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
392s23_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 398s23_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
393s23_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_srvr.c 399s23_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
394s23_srvr.o: ssl_locl.h 400s23_srvr.o: ../include/openssl/x509_vfy.h s23_srvr.c ssl_locl.h
395s2_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 401s2_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
396s2_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 402s2_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
397s2_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 403s2_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -399,20 +405,20 @@ s2_clnt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
399s2_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 405s2_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
400s2_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 406s2_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
401s2_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h 407s2_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
402s2_clnt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 408s2_clnt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
403s2_clnt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 409s2_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
404s2_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 410s2_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
405s2_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 411s2_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
406s2_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h 412s2_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
407s2_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 413s2_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
408s2_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 414s2_clnt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
409s2_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 415s2_clnt.o: ../include/openssl/rand.h ../include/openssl/rsa.h
410s2_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h 416s2_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
411s2_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 417s2_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
412s2_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 418s2_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
413s2_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 419s2_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
414s2_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_clnt.c 420s2_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
415s2_clnt.o: ssl_locl.h 421s2_clnt.o: ../include/openssl/x509_vfy.h s2_clnt.c ssl_locl.h
416s2_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 422s2_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
417s2_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h 423s2_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
418s2_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h 424s2_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -420,19 +426,20 @@ s2_enc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
420s2_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 426s2_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
421s2_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 427s2_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
422s2_enc.o: ../include/openssl/err.h ../include/openssl/evp.h 428s2_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
423s2_enc.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 429s2_enc.o: ../include/openssl/fips.h ../include/openssl/hmac.h
424s2_enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 430s2_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
425s2_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 431s2_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
426s2_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 432s2_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
427s2_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h 433s2_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
428s2_enc.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 434s2_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
429s2_enc.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 435s2_enc.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
430s2_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h 436s2_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
431s2_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 437s2_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h
432s2_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 438s2_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
433s2_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 439s2_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
434s2_enc.o: ../include/openssl/tls1.h ../include/openssl/x509.h 440s2_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
435s2_enc.o: ../include/openssl/x509_vfy.h s2_enc.c ssl_locl.h 441s2_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_enc.c
442s2_enc.o: ssl_locl.h
436s2_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 443s2_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
437s2_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h 444s2_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
438s2_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h 445s2_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -440,20 +447,20 @@ s2_lib.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
440s2_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 447s2_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
441s2_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 448s2_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
442s2_lib.o: ../include/openssl/err.h ../include/openssl/evp.h 449s2_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
443s2_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 450s2_lib.o: ../include/openssl/fips.h ../include/openssl/hmac.h
444s2_lib.o: ../include/openssl/lhash.h ../include/openssl/md5.h 451s2_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
445s2_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 452s2_lib.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
446s2_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 453s2_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
447s2_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 454s2_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
448s2_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 455s2_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
449s2_lib.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 456s2_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
450s2_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 457s2_lib.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
451s2_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h 458s2_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
452s2_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 459s2_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
453s2_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 460s2_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
454s2_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 461s2_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
455s2_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_lib.c 462s2_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h
456s2_lib.o: ssl_locl.h 463s2_lib.o: ../include/openssl/x509_vfy.h s2_lib.c ssl_locl.h
457s2_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 464s2_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
458s2_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h 465s2_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
459s2_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h 466s2_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -461,19 +468,20 @@ s2_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
461s2_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 468s2_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
462s2_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 469s2_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
463s2_meth.o: ../include/openssl/err.h ../include/openssl/evp.h 470s2_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
464s2_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 471s2_meth.o: ../include/openssl/fips.h ../include/openssl/hmac.h
465s2_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 472s2_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
466s2_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 473s2_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
467s2_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 474s2_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
468s2_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h 475s2_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
469s2_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 476s2_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
470s2_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 477s2_meth.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
471s2_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h 478s2_meth.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
472s2_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 479s2_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h
473s2_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 480s2_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
474s2_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 481s2_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
475s2_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h 482s2_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
476s2_meth.o: ../include/openssl/x509_vfy.h s2_meth.c ssl_locl.h 483s2_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_meth.c
484s2_meth.o: ssl_locl.h
477s2_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 485s2_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
478s2_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 486s2_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
479s2_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 487s2_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -481,19 +489,20 @@ s2_pkt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
481s2_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 489s2_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
482s2_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 490s2_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
483s2_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h 491s2_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
484s2_pkt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 492s2_pkt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
485s2_pkt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 493s2_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
486s2_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 494s2_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
487s2_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 495s2_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
488s2_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h 496s2_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
489s2_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 497s2_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
490s2_pkt.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 498s2_pkt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
491s2_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h 499s2_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
492s2_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 500s2_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
493s2_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 501s2_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
494s2_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 502s2_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
495s2_pkt.o: ../include/openssl/tls1.h ../include/openssl/x509.h 503s2_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
496s2_pkt.o: ../include/openssl/x509_vfy.h s2_pkt.c ssl_locl.h 504s2_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_pkt.c
505s2_pkt.o: ssl_locl.h
497s2_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 506s2_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
498s2_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h 507s2_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
499s2_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h 508s2_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -501,20 +510,20 @@ s2_srvr.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
501s2_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 510s2_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
502s2_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 511s2_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
503s2_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h 512s2_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
504s2_srvr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 513s2_srvr.o: ../include/openssl/fips.h ../include/openssl/hmac.h
505s2_srvr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 514s2_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
506s2_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 515s2_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
507s2_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 516s2_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
508s2_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h 517s2_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
509s2_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 518s2_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
510s2_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 519s2_srvr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
511s2_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 520s2_srvr.o: ../include/openssl/rand.h ../include/openssl/rsa.h
512s2_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h 521s2_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
513s2_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 522s2_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
514s2_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 523s2_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
515s2_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 524s2_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
516s2_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_srvr.c 525s2_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
517s2_srvr.o: ssl_locl.h 526s2_srvr.o: ../include/openssl/x509_vfy.h s2_srvr.c ssl_locl.h
518s3_both.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 527s3_both.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
519s3_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h 528s3_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h
520s3_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h 529s3_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -522,20 +531,20 @@ s3_both.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
522s3_both.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 531s3_both.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
523s3_both.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 532s3_both.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
524s3_both.o: ../include/openssl/err.h ../include/openssl/evp.h 533s3_both.o: ../include/openssl/err.h ../include/openssl/evp.h
525s3_both.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 534s3_both.o: ../include/openssl/fips.h ../include/openssl/hmac.h
526s3_both.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 535s3_both.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
527s3_both.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 536s3_both.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
528s3_both.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 537s3_both.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
529s3_both.o: ../include/openssl/pem.h ../include/openssl/pem2.h 538s3_both.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
530s3_both.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 539s3_both.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
531s3_both.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 540s3_both.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
532s3_both.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 541s3_both.o: ../include/openssl/rand.h ../include/openssl/rsa.h
533s3_both.o: ../include/openssl/sha.h ../include/openssl/ssl.h 542s3_both.o: ../include/openssl/safestack.h ../include/openssl/sha.h
534s3_both.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 543s3_both.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
535s3_both.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 544s3_both.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
536s3_both.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 545s3_both.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
537s3_both.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_both.c 546s3_both.o: ../include/openssl/tls1.h ../include/openssl/x509.h
538s3_both.o: ssl_locl.h 547s3_both.o: ../include/openssl/x509_vfy.h s3_both.c ssl_locl.h
539s3_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 548s3_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
540s3_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 549s3_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
541s3_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 550s3_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -544,20 +553,21 @@ s3_clnt.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
544s3_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 553s3_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
545s3_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 554s3_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
546s3_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h 555s3_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
547s3_clnt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 556s3_clnt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
548s3_clnt.o: ../include/openssl/lhash.h ../include/openssl/md5.h 557s3_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
549s3_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 558s3_clnt.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
550s3_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 559s3_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
551s3_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 560s3_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
552s3_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 561s3_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
553s3_clnt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 562s3_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
554s3_clnt.o: ../include/openssl/rand.h ../include/openssl/rsa.h 563s3_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
555s3_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h 564s3_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
556s3_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 565s3_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
557s3_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 566s3_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
558s3_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 567s3_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
559s3_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h 568s3_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
560s3_clnt.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_clnt.c ssl_locl.h 569s3_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h
570s3_clnt.o: s3_clnt.c ssl_locl.h
561s3_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 571s3_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
562s3_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h 572s3_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
563s3_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h 573s3_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -565,20 +575,20 @@ s3_enc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
565s3_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 575s3_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
566s3_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 576s3_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
567s3_enc.o: ../include/openssl/err.h ../include/openssl/evp.h 577s3_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
568s3_enc.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 578s3_enc.o: ../include/openssl/fips.h ../include/openssl/hmac.h
569s3_enc.o: ../include/openssl/lhash.h ../include/openssl/md5.h 579s3_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
570s3_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 580s3_enc.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
571s3_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 581s3_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
572s3_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 582s3_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
573s3_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 583s3_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
574s3_enc.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 584s3_enc.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
575s3_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 585s3_enc.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
576s3_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h 586s3_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
577s3_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 587s3_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
578s3_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 588s3_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
579s3_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 589s3_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
580s3_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_enc.c 590s3_enc.o: ../include/openssl/tls1.h ../include/openssl/x509.h
581s3_enc.o: ssl_locl.h 591s3_enc.o: ../include/openssl/x509_vfy.h s3_enc.c ssl_locl.h
582s3_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 592s3_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
583s3_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h 593s3_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
584s3_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h 594s3_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -586,20 +596,21 @@ s3_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h
586s3_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 596s3_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
587s3_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 597s3_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
588s3_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 598s3_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
589s3_lib.o: ../include/openssl/evp.h ../include/openssl/hmac.h 599s3_lib.o: ../include/openssl/evp.h ../include/openssl/fips.h
590s3_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 600s3_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
591s3_lib.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h 601s3_lib.o: ../include/openssl/lhash.h ../include/openssl/md5.h
592s3_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 602s3_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
593s3_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 603s3_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
594s3_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h 604s3_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
595s3_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 605s3_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
596s3_lib.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 606s3_lib.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
597s3_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h 607s3_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
598s3_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 608s3_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h
599s3_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 609s3_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
600s3_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 610s3_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
601s3_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h 611s3_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
602s3_lib.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_lib.c ssl_locl.h 612s3_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h
613s3_lib.o: s3_lib.c ssl_locl.h
603s3_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 614s3_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
604s3_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h 615s3_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
605s3_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h 616s3_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -607,19 +618,20 @@ s3_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
607s3_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 618s3_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
608s3_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 619s3_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
609s3_meth.o: ../include/openssl/err.h ../include/openssl/evp.h 620s3_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
610s3_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 621s3_meth.o: ../include/openssl/fips.h ../include/openssl/hmac.h
611s3_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 622s3_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
612s3_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 623s3_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
613s3_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 624s3_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
614s3_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h 625s3_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
615s3_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 626s3_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
616s3_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 627s3_meth.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
617s3_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h 628s3_meth.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
618s3_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 629s3_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h
619s3_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 630s3_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
620s3_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 631s3_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
621s3_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h 632s3_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
622s3_meth.o: ../include/openssl/x509_vfy.h s3_meth.c ssl_locl.h 633s3_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_meth.c
634s3_meth.o: ssl_locl.h
623s3_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 635s3_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
624s3_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 636s3_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
625s3_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 637s3_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -627,19 +639,20 @@ s3_pkt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
627s3_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 639s3_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
628s3_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 640s3_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
629s3_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h 641s3_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
630s3_pkt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 642s3_pkt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
631s3_pkt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 643s3_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
632s3_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 644s3_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
633s3_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 645s3_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
634s3_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h 646s3_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
635s3_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 647s3_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
636s3_pkt.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 648s3_pkt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
637s3_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h 649s3_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
638s3_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 650s3_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
639s3_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 651s3_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
640s3_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 652s3_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
641s3_pkt.o: ../include/openssl/tls1.h ../include/openssl/x509.h 653s3_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
642s3_pkt.o: ../include/openssl/x509_vfy.h s3_pkt.c ssl_locl.h 654s3_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_pkt.c
655s3_pkt.o: ssl_locl.h
643s3_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 656s3_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
644s3_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h 657s3_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
645s3_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h 658s3_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -647,21 +660,22 @@ s3_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
647s3_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 660s3_srvr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
648s3_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 661s3_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
649s3_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 662s3_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
650s3_srvr.o: ../include/openssl/evp.h ../include/openssl/hmac.h 663s3_srvr.o: ../include/openssl/evp.h ../include/openssl/fips.h
651s3_srvr.o: ../include/openssl/krb5_asn.h ../include/openssl/kssl.h 664s3_srvr.o: ../include/openssl/hmac.h ../include/openssl/krb5_asn.h
652s3_srvr.o: ../include/openssl/lhash.h ../include/openssl/md5.h 665s3_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
653s3_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 666s3_srvr.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
654s3_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 667s3_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
655s3_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 668s3_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
656s3_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 669s3_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
657s3_srvr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 670s3_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
658s3_srvr.o: ../include/openssl/rand.h ../include/openssl/rsa.h 671s3_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
659s3_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h 672s3_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
660s3_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 673s3_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
661s3_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 674s3_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
662s3_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 675s3_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
663s3_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h 676s3_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
664s3_srvr.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_srvr.c ssl_locl.h 677s3_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h
678s3_srvr.o: s3_srvr.c ssl_locl.h
665ssl_algs.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 679ssl_algs.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
666ssl_algs.o: ../include/openssl/bn.h ../include/openssl/buffer.h 680ssl_algs.o: ../include/openssl/bn.h ../include/openssl/buffer.h
667ssl_algs.o: ../include/openssl/comp.h ../include/openssl/crypto.h 681ssl_algs.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -669,19 +683,20 @@ ssl_algs.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
669ssl_algs.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 683ssl_algs.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
670ssl_algs.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 684ssl_algs.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
671ssl_algs.o: ../include/openssl/err.h ../include/openssl/evp.h 685ssl_algs.o: ../include/openssl/err.h ../include/openssl/evp.h
672ssl_algs.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 686ssl_algs.o: ../include/openssl/fips.h ../include/openssl/hmac.h
673ssl_algs.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 687ssl_algs.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
674ssl_algs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 688ssl_algs.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
675ssl_algs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 689ssl_algs.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
676ssl_algs.o: ../include/openssl/pem.h ../include/openssl/pem2.h 690ssl_algs.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
677ssl_algs.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 691ssl_algs.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
678ssl_algs.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 692ssl_algs.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
679ssl_algs.o: ../include/openssl/safestack.h ../include/openssl/sha.h 693ssl_algs.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
680ssl_algs.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 694ssl_algs.o: ../include/openssl/sha.h ../include/openssl/ssl.h
681ssl_algs.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 695ssl_algs.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
682ssl_algs.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 696ssl_algs.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
683ssl_algs.o: ../include/openssl/tls1.h ../include/openssl/x509.h 697ssl_algs.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
684ssl_algs.o: ../include/openssl/x509_vfy.h ssl_algs.c ssl_locl.h 698ssl_algs.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_algs.c
699ssl_algs.o: ssl_locl.h
685ssl_asn1.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1_mac.h 700ssl_asn1.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1_mac.h
686ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/bn.h 701ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/bn.h
687ssl_asn1.o: ../include/openssl/buffer.h ../include/openssl/comp.h 702ssl_asn1.o: ../include/openssl/buffer.h ../include/openssl/comp.h
@@ -689,20 +704,20 @@ ssl_asn1.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
689ssl_asn1.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 704ssl_asn1.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
690ssl_asn1.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 705ssl_asn1.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
691ssl_asn1.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 706ssl_asn1.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
692ssl_asn1.o: ../include/openssl/evp.h ../include/openssl/hmac.h 707ssl_asn1.o: ../include/openssl/evp.h ../include/openssl/fips.h
693ssl_asn1.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 708ssl_asn1.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
694ssl_asn1.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 709ssl_asn1.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
695ssl_asn1.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 710ssl_asn1.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
696ssl_asn1.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 711ssl_asn1.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
697ssl_asn1.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 712ssl_asn1.o: ../include/openssl/pem.h ../include/openssl/pem2.h
698ssl_asn1.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 713ssl_asn1.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
699ssl_asn1.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 714ssl_asn1.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
700ssl_asn1.o: ../include/openssl/sha.h ../include/openssl/ssl.h 715ssl_asn1.o: ../include/openssl/safestack.h ../include/openssl/sha.h
701ssl_asn1.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 716ssl_asn1.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
702ssl_asn1.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 717ssl_asn1.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
703ssl_asn1.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 718ssl_asn1.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
704ssl_asn1.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_asn1.c 719ssl_asn1.o: ../include/openssl/tls1.h ../include/openssl/x509.h
705ssl_asn1.o: ssl_locl.h 720ssl_asn1.o: ../include/openssl/x509_vfy.h ssl_asn1.c ssl_locl.h
706ssl_cert.o: ../crypto/o_dir.h ../e_os.h ../include/openssl/asn1.h 721ssl_cert.o: ../crypto/o_dir.h ../e_os.h ../include/openssl/asn1.h
707ssl_cert.o: ../include/openssl/bio.h ../include/openssl/bn.h 722ssl_cert.o: ../include/openssl/bio.h ../include/openssl/bn.h
708ssl_cert.o: ../include/openssl/buffer.h ../include/openssl/comp.h 723ssl_cert.o: ../include/openssl/buffer.h ../include/openssl/comp.h
@@ -711,20 +726,21 @@ ssl_cert.o: ../include/openssl/dh.h ../include/openssl/dsa.h
711ssl_cert.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 726ssl_cert.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
712ssl_cert.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 727ssl_cert.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
713ssl_cert.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 728ssl_cert.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
714ssl_cert.o: ../include/openssl/evp.h ../include/openssl/hmac.h 729ssl_cert.o: ../include/openssl/evp.h ../include/openssl/fips.h
715ssl_cert.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 730ssl_cert.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
716ssl_cert.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 731ssl_cert.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
717ssl_cert.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 732ssl_cert.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
718ssl_cert.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 733ssl_cert.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
719ssl_cert.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 734ssl_cert.o: ../include/openssl/pem.h ../include/openssl/pem2.h
720ssl_cert.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 735ssl_cert.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
721ssl_cert.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 736ssl_cert.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
722ssl_cert.o: ../include/openssl/sha.h ../include/openssl/ssl.h 737ssl_cert.o: ../include/openssl/safestack.h ../include/openssl/sha.h
723ssl_cert.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 738ssl_cert.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
724ssl_cert.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 739ssl_cert.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
725ssl_cert.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 740ssl_cert.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
726ssl_cert.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 741ssl_cert.o: ../include/openssl/tls1.h ../include/openssl/x509.h
727ssl_cert.o: ../include/openssl/x509v3.h ssl_cert.c ssl_locl.h 742ssl_cert.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
743ssl_cert.o: ssl_cert.c ssl_locl.h
728ssl_ciph.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 744ssl_ciph.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
729ssl_ciph.o: ../include/openssl/bn.h ../include/openssl/buffer.h 745ssl_ciph.o: ../include/openssl/bn.h ../include/openssl/buffer.h
730ssl_ciph.o: ../include/openssl/comp.h ../include/openssl/crypto.h 746ssl_ciph.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -732,57 +748,58 @@ ssl_ciph.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
732ssl_ciph.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 748ssl_ciph.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
733ssl_ciph.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 749ssl_ciph.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
734ssl_ciph.o: ../include/openssl/err.h ../include/openssl/evp.h 750ssl_ciph.o: ../include/openssl/err.h ../include/openssl/evp.h
735ssl_ciph.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 751ssl_ciph.o: ../include/openssl/fips.h ../include/openssl/hmac.h
736ssl_ciph.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 752ssl_ciph.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
737ssl_ciph.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 753ssl_ciph.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
738ssl_ciph.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 754ssl_ciph.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
739ssl_ciph.o: ../include/openssl/pem.h ../include/openssl/pem2.h 755ssl_ciph.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
740ssl_ciph.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 756ssl_ciph.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
741ssl_ciph.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 757ssl_ciph.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
742ssl_ciph.o: ../include/openssl/safestack.h ../include/openssl/sha.h 758ssl_ciph.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
743ssl_ciph.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 759ssl_ciph.o: ../include/openssl/sha.h ../include/openssl/ssl.h
744ssl_ciph.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 760ssl_ciph.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
745ssl_ciph.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 761ssl_ciph.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
746ssl_ciph.o: ../include/openssl/tls1.h ../include/openssl/x509.h 762ssl_ciph.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
747ssl_ciph.o: ../include/openssl/x509_vfy.h ssl_ciph.c ssl_locl.h 763ssl_ciph.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_ciph.c
764ssl_ciph.o: ssl_locl.h
748ssl_err.o: ../include/openssl/asn1.h ../include/openssl/bio.h 765ssl_err.o: ../include/openssl/asn1.h ../include/openssl/bio.h
749ssl_err.o: ../include/openssl/bn.h ../include/openssl/buffer.h 766ssl_err.o: ../include/openssl/bn.h ../include/openssl/buffer.h
750ssl_err.o: ../include/openssl/comp.h ../include/openssl/crypto.h 767ssl_err.o: ../include/openssl/comp.h ../include/openssl/crypto.h
751ssl_err.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 768ssl_err.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
752ssl_err.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 769ssl_err.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
753ssl_err.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 770ssl_err.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
754ssl_err.o: ../include/openssl/evp.h ../include/openssl/hmac.h 771ssl_err.o: ../include/openssl/evp.h ../include/openssl/fips.h
755ssl_err.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 772ssl_err.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
756ssl_err.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 773ssl_err.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
757ssl_err.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 774ssl_err.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
758ssl_err.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 775ssl_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
759ssl_err.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 776ssl_err.o: ../include/openssl/pem.h ../include/openssl/pem2.h
760ssl_err.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 777ssl_err.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
761ssl_err.o: ../include/openssl/safestack.h ../include/openssl/sha.h 778ssl_err.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
762ssl_err.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 779ssl_err.o: ../include/openssl/sha.h ../include/openssl/ssl.h
763ssl_err.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 780ssl_err.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
764ssl_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 781ssl_err.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
765ssl_err.o: ../include/openssl/tls1.h ../include/openssl/x509.h 782ssl_err.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
766ssl_err.o: ../include/openssl/x509_vfy.h ssl_err.c 783ssl_err.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_err.c
767ssl_err2.o: ../include/openssl/asn1.h ../include/openssl/bio.h 784ssl_err2.o: ../include/openssl/asn1.h ../include/openssl/bio.h
768ssl_err2.o: ../include/openssl/bn.h ../include/openssl/buffer.h 785ssl_err2.o: ../include/openssl/bn.h ../include/openssl/buffer.h
769ssl_err2.o: ../include/openssl/comp.h ../include/openssl/crypto.h 786ssl_err2.o: ../include/openssl/comp.h ../include/openssl/crypto.h
770ssl_err2.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 787ssl_err2.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
771ssl_err2.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 788ssl_err2.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
772ssl_err2.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 789ssl_err2.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
773ssl_err2.o: ../include/openssl/evp.h ../include/openssl/hmac.h 790ssl_err2.o: ../include/openssl/evp.h ../include/openssl/fips.h
774ssl_err2.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 791ssl_err2.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
775ssl_err2.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 792ssl_err2.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
776ssl_err2.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 793ssl_err2.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
777ssl_err2.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 794ssl_err2.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
778ssl_err2.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 795ssl_err2.o: ../include/openssl/pem.h ../include/openssl/pem2.h
779ssl_err2.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 796ssl_err2.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
780ssl_err2.o: ../include/openssl/safestack.h ../include/openssl/sha.h 797ssl_err2.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
781ssl_err2.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 798ssl_err2.o: ../include/openssl/sha.h ../include/openssl/ssl.h
782ssl_err2.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 799ssl_err2.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
783ssl_err2.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 800ssl_err2.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
784ssl_err2.o: ../include/openssl/tls1.h ../include/openssl/x509.h 801ssl_err2.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
785ssl_err2.o: ../include/openssl/x509_vfy.h ssl_err2.c 802ssl_err2.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_err2.c
786ssl_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 803ssl_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
787ssl_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h 804ssl_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
788ssl_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h 805ssl_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -791,21 +808,22 @@ ssl_lib.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
791ssl_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 808ssl_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
792ssl_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 809ssl_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
793ssl_lib.o: ../include/openssl/engine.h ../include/openssl/err.h 810ssl_lib.o: ../include/openssl/engine.h ../include/openssl/err.h
794ssl_lib.o: ../include/openssl/evp.h ../include/openssl/hmac.h 811ssl_lib.o: ../include/openssl/evp.h ../include/openssl/fips.h
795ssl_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 812ssl_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
796ssl_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 813ssl_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
797ssl_lib.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 814ssl_lib.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
798ssl_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 815ssl_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
799ssl_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h 816ssl_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
800ssl_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 817ssl_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
801ssl_lib.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 818ssl_lib.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
802ssl_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 819ssl_lib.o: ../include/openssl/rand.h ../include/openssl/rsa.h
803ssl_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h 820ssl_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
804ssl_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 821ssl_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
805ssl_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 822ssl_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
806ssl_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 823ssl_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
807ssl_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 824ssl_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h
808ssl_lib.o: ../include/openssl/x509v3.h kssl_lcl.h ssl_lib.c ssl_locl.h 825ssl_lib.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h kssl_lcl.h
826ssl_lib.o: ssl_lib.c ssl_locl.h
809ssl_rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 827ssl_rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
810ssl_rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h 828ssl_rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
811ssl_rsa.o: ../include/openssl/comp.h ../include/openssl/crypto.h 829ssl_rsa.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -813,19 +831,20 @@ ssl_rsa.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
813ssl_rsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 831ssl_rsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
814ssl_rsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 832ssl_rsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
815ssl_rsa.o: ../include/openssl/err.h ../include/openssl/evp.h 833ssl_rsa.o: ../include/openssl/err.h ../include/openssl/evp.h
816ssl_rsa.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 834ssl_rsa.o: ../include/openssl/fips.h ../include/openssl/hmac.h
817ssl_rsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 835ssl_rsa.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
818ssl_rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 836ssl_rsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
819ssl_rsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 837ssl_rsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
820ssl_rsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h 838ssl_rsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
821ssl_rsa.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 839ssl_rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
822ssl_rsa.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 840ssl_rsa.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
823ssl_rsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h 841ssl_rsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
824ssl_rsa.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 842ssl_rsa.o: ../include/openssl/sha.h ../include/openssl/ssl.h
825ssl_rsa.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 843ssl_rsa.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
826ssl_rsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 844ssl_rsa.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
827ssl_rsa.o: ../include/openssl/tls1.h ../include/openssl/x509.h 845ssl_rsa.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
828ssl_rsa.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_rsa.c 846ssl_rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
847ssl_rsa.o: ssl_rsa.c
829ssl_sess.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 848ssl_sess.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
830ssl_sess.o: ../include/openssl/bn.h ../include/openssl/buffer.h 849ssl_sess.o: ../include/openssl/bn.h ../include/openssl/buffer.h
831ssl_sess.o: ../include/openssl/comp.h ../include/openssl/crypto.h 850ssl_sess.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -833,20 +852,21 @@ ssl_sess.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
833ssl_sess.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 852ssl_sess.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
834ssl_sess.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 853ssl_sess.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
835ssl_sess.o: ../include/openssl/engine.h ../include/openssl/err.h 854ssl_sess.o: ../include/openssl/engine.h ../include/openssl/err.h
836ssl_sess.o: ../include/openssl/evp.h ../include/openssl/hmac.h 855ssl_sess.o: ../include/openssl/evp.h ../include/openssl/fips.h
837ssl_sess.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 856ssl_sess.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
838ssl_sess.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 857ssl_sess.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
839ssl_sess.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 858ssl_sess.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
840ssl_sess.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 859ssl_sess.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
841ssl_sess.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 860ssl_sess.o: ../include/openssl/pem.h ../include/openssl/pem2.h
842ssl_sess.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 861ssl_sess.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
843ssl_sess.o: ../include/openssl/rand.h ../include/openssl/rsa.h 862ssl_sess.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
844ssl_sess.o: ../include/openssl/safestack.h ../include/openssl/sha.h 863ssl_sess.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
845ssl_sess.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 864ssl_sess.o: ../include/openssl/sha.h ../include/openssl/ssl.h
846ssl_sess.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 865ssl_sess.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
847ssl_sess.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 866ssl_sess.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
848ssl_sess.o: ../include/openssl/tls1.h ../include/openssl/x509.h 867ssl_sess.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
849ssl_sess.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_sess.c 868ssl_sess.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
869ssl_sess.o: ssl_sess.c
850ssl_stat.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 870ssl_stat.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
851ssl_stat.o: ../include/openssl/bn.h ../include/openssl/buffer.h 871ssl_stat.o: ../include/openssl/bn.h ../include/openssl/buffer.h
852ssl_stat.o: ../include/openssl/comp.h ../include/openssl/crypto.h 872ssl_stat.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -854,19 +874,20 @@ ssl_stat.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
854ssl_stat.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 874ssl_stat.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
855ssl_stat.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 875ssl_stat.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
856ssl_stat.o: ../include/openssl/err.h ../include/openssl/evp.h 876ssl_stat.o: ../include/openssl/err.h ../include/openssl/evp.h
857ssl_stat.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 877ssl_stat.o: ../include/openssl/fips.h ../include/openssl/hmac.h
858ssl_stat.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 878ssl_stat.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
859ssl_stat.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 879ssl_stat.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
860ssl_stat.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 880ssl_stat.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
861ssl_stat.o: ../include/openssl/pem.h ../include/openssl/pem2.h 881ssl_stat.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
862ssl_stat.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 882ssl_stat.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
863ssl_stat.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 883ssl_stat.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
864ssl_stat.o: ../include/openssl/safestack.h ../include/openssl/sha.h 884ssl_stat.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
865ssl_stat.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 885ssl_stat.o: ../include/openssl/sha.h ../include/openssl/ssl.h
866ssl_stat.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 886ssl_stat.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
867ssl_stat.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 887ssl_stat.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
868ssl_stat.o: ../include/openssl/tls1.h ../include/openssl/x509.h 888ssl_stat.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
869ssl_stat.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_stat.c 889ssl_stat.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
890ssl_stat.o: ssl_stat.c
870ssl_txt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 891ssl_txt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
871ssl_txt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 892ssl_txt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
872ssl_txt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 893ssl_txt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -874,19 +895,20 @@ ssl_txt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
874ssl_txt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 895ssl_txt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
875ssl_txt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 896ssl_txt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
876ssl_txt.o: ../include/openssl/err.h ../include/openssl/evp.h 897ssl_txt.o: ../include/openssl/err.h ../include/openssl/evp.h
877ssl_txt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 898ssl_txt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
878ssl_txt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 899ssl_txt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
879ssl_txt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 900ssl_txt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
880ssl_txt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 901ssl_txt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
881ssl_txt.o: ../include/openssl/pem.h ../include/openssl/pem2.h 902ssl_txt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
882ssl_txt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 903ssl_txt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
883ssl_txt.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 904ssl_txt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
884ssl_txt.o: ../include/openssl/safestack.h ../include/openssl/sha.h 905ssl_txt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
885ssl_txt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 906ssl_txt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
886ssl_txt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 907ssl_txt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
887ssl_txt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 908ssl_txt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
888ssl_txt.o: ../include/openssl/tls1.h ../include/openssl/x509.h 909ssl_txt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
889ssl_txt.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_txt.c 910ssl_txt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
911ssl_txt.o: ssl_txt.c
890t1_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 912t1_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
891t1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h 913t1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
892t1_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h 914t1_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -894,20 +916,20 @@ t1_clnt.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
894t1_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 916t1_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
895t1_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 917t1_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
896t1_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h 918t1_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
897t1_clnt.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 919t1_clnt.o: ../include/openssl/fips.h ../include/openssl/hmac.h
898t1_clnt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 920t1_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
899t1_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 921t1_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
900t1_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 922t1_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
901t1_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h 923t1_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
902t1_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 924t1_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
903t1_clnt.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 925t1_clnt.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
904t1_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 926t1_clnt.o: ../include/openssl/rand.h ../include/openssl/rsa.h
905t1_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h 927t1_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
906t1_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 928t1_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
907t1_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 929t1_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
908t1_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 930t1_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
909t1_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h 931t1_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
910t1_clnt.o: t1_clnt.c 932t1_clnt.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_clnt.c
911t1_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 933t1_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
912t1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h 934t1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
913t1_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h 935t1_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -915,20 +937,20 @@ t1_enc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
915t1_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 937t1_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
916t1_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 938t1_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
917t1_enc.o: ../include/openssl/err.h ../include/openssl/evp.h 939t1_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
918t1_enc.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 940t1_enc.o: ../include/openssl/fips.h ../include/openssl/hmac.h
919t1_enc.o: ../include/openssl/lhash.h ../include/openssl/md5.h 941t1_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
920t1_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 942t1_enc.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
921t1_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 943t1_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
922t1_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 944t1_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
923t1_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 945t1_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
924t1_enc.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 946t1_enc.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
925t1_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 947t1_enc.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
926t1_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h 948t1_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
927t1_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 949t1_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
928t1_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 950t1_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
929t1_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 951t1_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
930t1_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h 952t1_enc.o: ../include/openssl/tls1.h ../include/openssl/x509.h
931t1_enc.o: t1_enc.c 953t1_enc.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_enc.c
932t1_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 954t1_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
933t1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h 955t1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
934t1_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h 956t1_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -936,21 +958,21 @@ t1_lib.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
936t1_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h 958t1_lib.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
937t1_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 959t1_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
938t1_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 960t1_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
939t1_lib.o: ../include/openssl/evp.h ../include/openssl/hmac.h 961t1_lib.o: ../include/openssl/evp.h ../include/openssl/fips.h
940t1_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 962t1_lib.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
941t1_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 963t1_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
942t1_lib.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h 964t1_lib.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
943t1_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 965t1_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
944t1_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h 966t1_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
945t1_lib.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 967t1_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
946t1_lib.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 968t1_lib.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
947t1_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h 969t1_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
948t1_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 970t1_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h
949t1_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 971t1_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
950t1_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 972t1_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
951t1_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h 973t1_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
952t1_lib.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h ssl_locl.h 974t1_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
953t1_lib.o: t1_lib.c 975t1_lib.o: ../include/openssl/x509v3.h ssl_locl.h t1_lib.c
954t1_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 976t1_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
955t1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h 977t1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
956t1_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h 978t1_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -958,19 +980,20 @@ t1_meth.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
958t1_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 980t1_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
959t1_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 981t1_meth.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
960t1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h 982t1_meth.o: ../include/openssl/err.h ../include/openssl/evp.h
961t1_meth.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 983t1_meth.o: ../include/openssl/fips.h ../include/openssl/hmac.h
962t1_meth.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 984t1_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
963t1_meth.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 985t1_meth.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
964t1_meth.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 986t1_meth.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
965t1_meth.o: ../include/openssl/pem.h ../include/openssl/pem2.h 987t1_meth.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
966t1_meth.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 988t1_meth.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
967t1_meth.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h 989t1_meth.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
968t1_meth.o: ../include/openssl/safestack.h ../include/openssl/sha.h 990t1_meth.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
969t1_meth.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 991t1_meth.o: ../include/openssl/sha.h ../include/openssl/ssl.h
970t1_meth.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 992t1_meth.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
971t1_meth.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 993t1_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
972t1_meth.o: ../include/openssl/tls1.h ../include/openssl/x509.h 994t1_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
973t1_meth.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_meth.c 995t1_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
996t1_meth.o: t1_meth.c
974t1_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 997t1_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
975t1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h 998t1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
976t1_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h 999t1_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
@@ -978,17 +1001,17 @@ t1_srvr.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
978t1_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 1001t1_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
979t1_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 1002t1_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
980t1_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h 1003t1_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
981t1_srvr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h 1004t1_srvr.o: ../include/openssl/fips.h ../include/openssl/hmac.h
982t1_srvr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 1005t1_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
983t1_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 1006t1_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
984t1_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 1007t1_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
985t1_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h 1008t1_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
986t1_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h 1009t1_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
987t1_srvr.o: ../include/openssl/pqueue.h ../include/openssl/rand.h 1010t1_srvr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
988t1_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h 1011t1_srvr.o: ../include/openssl/rand.h ../include/openssl/rsa.h
989t1_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h 1012t1_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
990t1_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h 1013t1_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
991t1_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h 1014t1_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
992t1_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h 1015t1_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
993t1_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h 1016t1_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
994t1_srvr.o: t1_srvr.c 1017t1_srvr.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_srvr.c
diff --git a/src/lib/libssl/src/ssl/d1_pkt.c b/src/lib/libssl/src/ssl/d1_pkt.c
index b2765ba801..eb56cf987b 100644
--- a/src/lib/libssl/src/ssl/d1_pkt.c
+++ b/src/lib/libssl/src/ssl/d1_pkt.c
@@ -597,6 +597,7 @@ again:
597 /* check whether this is a repeat, or aged record */ 597 /* check whether this is a repeat, or aged record */
598 if ( ! dtls1_record_replay_check(s, bitmap, &(rr->seq_num))) 598 if ( ! dtls1_record_replay_check(s, bitmap, &(rr->seq_num)))
599 { 599 {
600 rr->length = 0;
600 s->packet_length=0; /* dump this record */ 601 s->packet_length=0; /* dump this record */
601 goto again; /* get another record */ 602 goto again; /* get another record */
602 } 603 }
diff --git a/src/lib/libssl/src/ssl/s2_clnt.c b/src/lib/libssl/src/ssl/s2_clnt.c
index e2a90a3ca2..782129cd5d 100644
--- a/src/lib/libssl/src/ssl/s2_clnt.c
+++ b/src/lib/libssl/src/ssl/s2_clnt.c
@@ -1044,7 +1044,7 @@ int ssl2_set_certificate(SSL *s, int type, int len, const unsigned char *data)
1044 1044
1045 i=ssl_verify_cert_chain(s,sk); 1045 i=ssl_verify_cert_chain(s,sk);
1046 1046
1047 if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) 1047 if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0))
1048 { 1048 {
1049 SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); 1049 SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED);
1050 goto err; 1050 goto err;
diff --git a/src/lib/libssl/src/ssl/s2_srvr.c b/src/lib/libssl/src/ssl/s2_srvr.c
index 0daf2b129d..50d55e6bf1 100644
--- a/src/lib/libssl/src/ssl/s2_srvr.c
+++ b/src/lib/libssl/src/ssl/s2_srvr.c
@@ -1054,7 +1054,7 @@ static int request_certificate(SSL *s)
1054 1054
1055 i=ssl_verify_cert_chain(s,sk); 1055 i=ssl_verify_cert_chain(s,sk);
1056 1056
1057 if (i) /* we like the packet, now check the chksum */ 1057 if (i > 0) /* we like the packet, now check the chksum */
1058 { 1058 {
1059 EVP_MD_CTX ctx; 1059 EVP_MD_CTX ctx;
1060 EVP_PKEY *pkey=NULL; 1060 EVP_PKEY *pkey=NULL;
@@ -1083,7 +1083,7 @@ static int request_certificate(SSL *s)
1083 EVP_PKEY_free(pkey); 1083 EVP_PKEY_free(pkey);
1084 EVP_MD_CTX_cleanup(&ctx); 1084 EVP_MD_CTX_cleanup(&ctx);
1085 1085
1086 if (i) 1086 if (i > 0)
1087 { 1087 {
1088 if (s->session->peer != NULL) 1088 if (s->session->peer != NULL)
1089 X509_free(s->session->peer); 1089 X509_free(s->session->peer);
diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c
index 9b823fddbd..50308487aa 100644
--- a/src/lib/libssl/src/ssl/s3_clnt.c
+++ b/src/lib/libssl/src/ssl/s3_clnt.c
@@ -972,7 +972,7 @@ int ssl3_get_server_certificate(SSL *s)
972 } 972 }
973 973
974 i=ssl_verify_cert_chain(s,sk); 974 i=ssl_verify_cert_chain(s,sk);
975 if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) 975 if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)
976#ifndef OPENSSL_NO_KRB5 976#ifndef OPENSSL_NO_KRB5
977 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) 977 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK))
978 != (SSL_aKRB5|SSL_kKRB5) 978 != (SSL_aKRB5|SSL_kKRB5)
@@ -1006,7 +1006,7 @@ int ssl3_get_server_certificate(SSL *s)
1006 == (SSL_aKRB5|SSL_kKRB5))? 0: 1; 1006 == (SSL_aKRB5|SSL_kKRB5))? 0: 1;
1007 1007
1008#ifdef KSSL_DEBUG 1008#ifdef KSSL_DEBUG
1009 printf("pkey,x = %p, %p\n", pkey,x); 1009 printf("pkey,x = %p, %p\n", (void *)pkey,(void *)x);
1010 printf("ssl_cert_type(x,pkey) = %d\n", ssl_cert_type(x,pkey)); 1010 printf("ssl_cert_type(x,pkey) = %d\n", ssl_cert_type(x,pkey));
1011 printf("cipher, alg, nc = %s, %lx, %d\n", s->s3->tmp.new_cipher->name, 1011 printf("cipher, alg, nc = %s, %lx, %d\n", s->s3->tmp.new_cipher->name,
1012 s->s3->tmp.new_cipher->algorithms, need_cert); 1012 s->s3->tmp.new_cipher->algorithms, need_cert);
@@ -1459,7 +1459,7 @@ int ssl3_get_key_exchange(SSL *s)
1459 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); 1459 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
1460 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); 1460 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
1461 EVP_VerifyUpdate(&md_ctx,param,param_len); 1461 EVP_VerifyUpdate(&md_ctx,param,param_len);
1462 if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) 1462 if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0)
1463 { 1463 {
1464 /* bad signature */ 1464 /* bad signature */
1465 al=SSL_AD_DECRYPT_ERROR; 1465 al=SSL_AD_DECRYPT_ERROR;
@@ -1477,7 +1477,7 @@ int ssl3_get_key_exchange(SSL *s)
1477 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); 1477 EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
1478 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); 1478 EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
1479 EVP_VerifyUpdate(&md_ctx,param,param_len); 1479 EVP_VerifyUpdate(&md_ctx,param,param_len);
1480 if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) 1480 if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0)
1481 { 1481 {
1482 /* bad signature */ 1482 /* bad signature */
1483 al=SSL_AD_DECRYPT_ERROR; 1483 al=SSL_AD_DECRYPT_ERROR;
@@ -1777,7 +1777,7 @@ int ssl3_get_cert_status(SSL *s)
1777 goto f_err; 1777 goto f_err;
1778 } 1778 }
1779 n2l3(p, resplen); 1779 n2l3(p, resplen);
1780 if (resplen + 4 != n) 1780 if (resplen + 4 != (unsigned long)n)
1781 { 1781 {
1782 al = SSL_AD_DECODE_ERROR; 1782 al = SSL_AD_DECODE_ERROR;
1783 SSLerr(SSL_F_SSL3_GET_CERT_STATUS,SSL_R_LENGTH_MISMATCH); 1783 SSLerr(SSL_F_SSL3_GET_CERT_STATUS,SSL_R_LENGTH_MISMATCH);
diff --git a/src/lib/libssl/src/ssl/s3_pkt.c b/src/lib/libssl/src/ssl/s3_pkt.c
index 72853a2e72..9476dcddf6 100644
--- a/src/lib/libssl/src/ssl/s3_pkt.c
+++ b/src/lib/libssl/src/ssl/s3_pkt.c
@@ -753,8 +753,15 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
753 s->rwstate=SSL_NOTHING; 753 s->rwstate=SSL_NOTHING;
754 return(s->s3->wpend_ret); 754 return(s->s3->wpend_ret);
755 } 755 }
756 else if (i <= 0) 756 else if (i <= 0) {
757 if (s->version == DTLS1_VERSION ||
758 s->version == DTLS1_BAD_VER) {
759 /* For DTLS, just drop it. That's kind of the whole
760 point in using a datagram service */
761 s->s3->wbuf.left = 0;
762 }
757 return(i); 763 return(i);
764 }
758 s->s3->wbuf.offset+=i; 765 s->s3->wbuf.offset+=i;
759 s->s3->wbuf.left-=i; 766 s->s3->wbuf.left-=i;
760 } 767 }
diff --git a/src/lib/libssl/src/ssl/s3_srvr.c b/src/lib/libssl/src/ssl/s3_srvr.c
index 398ce469d6..80b45eb86f 100644
--- a/src/lib/libssl/src/ssl/s3_srvr.c
+++ b/src/lib/libssl/src/ssl/s3_srvr.c
@@ -902,22 +902,28 @@ int ssl3_get_client_hello(SSL *s)
902 break; 902 break;
903 } 903 }
904 } 904 }
905 if (j == 0) 905 if (j == 0 && (s->options & SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG) && (sk_SSL_CIPHER_num(ciphers) == 1))
906 { 906 {
907 if ((s->options & SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG) && (sk_SSL_CIPHER_num(ciphers) == 1)) 907 /* Special case as client bug workaround: the previously used cipher may
908 { 908 * not be in the current list, the client instead might be trying to
909 /* Very bad for multi-threading.... */ 909 * continue using a cipher that before wasn't chosen due to server
910 s->session->cipher=sk_SSL_CIPHER_value(ciphers, 0); 910 * preferences. We'll have to reject the connection if the cipher is not
911 } 911 * enabled, though. */
912 else 912 c = sk_SSL_CIPHER_value(ciphers, 0);
913 if (sk_SSL_CIPHER_find(SSL_get_ciphers(s), c) >= 0)
913 { 914 {
914 /* we need to have the cipher in the cipher 915 s->session->cipher = c;
915 * list if we are asked to reuse it */ 916 j = 1;
916 al=SSL_AD_ILLEGAL_PARAMETER;
917 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_REQUIRED_CIPHER_MISSING);
918 goto f_err;
919 } 917 }
920 } 918 }
919 if (j == 0)
920 {
921 /* we need to have the cipher in the cipher
922 * list if we are asked to reuse it */
923 al=SSL_AD_ILLEGAL_PARAMETER;
924 SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_REQUIRED_CIPHER_MISSING);
925 goto f_err;
926 }
921 } 927 }
922 928
923 /* compression */ 929 /* compression */
@@ -2560,7 +2566,7 @@ int ssl3_get_client_certificate(SSL *s)
2560 else 2566 else
2561 { 2567 {
2562 i=ssl_verify_cert_chain(s,sk); 2568 i=ssl_verify_cert_chain(s,sk);
2563 if (!i) 2569 if (i <= 0)
2564 { 2570 {
2565 al=ssl_verify_alarm_type(s->verify_result); 2571 al=ssl_verify_alarm_type(s->verify_result);
2566 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); 2572 SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED);
diff --git a/src/lib/libssl/src/ssl/ssl_ciph.c b/src/lib/libssl/src/ssl/ssl_ciph.c
index 514292a03e..4116fd12f1 100644
--- a/src/lib/libssl/src/ssl/ssl_ciph.c
+++ b/src/lib/libssl/src/ssl/ssl_ciph.c
@@ -115,7 +115,10 @@
115 */ 115 */
116#include <stdio.h> 116#include <stdio.h>
117#include <openssl/objects.h> 117#include <openssl/objects.h>
118#ifndef OPENSSL_NO_COMP
118#include <openssl/comp.h> 119#include <openssl/comp.h>
120#endif
121
119#include "ssl_locl.h" 122#include "ssl_locl.h"
120 123
121#define SSL_ENC_DES_IDX 0 124#define SSL_ENC_DES_IDX 0
diff --git a/src/lib/libssl/src/ssl/ssl_locl.h b/src/lib/libssl/src/ssl/ssl_locl.h
index 735db39713..ed4ddbbae6 100644
--- a/src/lib/libssl/src/ssl/ssl_locl.h
+++ b/src/lib/libssl/src/ssl/ssl_locl.h
@@ -124,7 +124,9 @@
124#include "e_os.h" 124#include "e_os.h"
125 125
126#include <openssl/buffer.h> 126#include <openssl/buffer.h>
127#ifndef OPENSSL_NO_COMP
127#include <openssl/comp.h> 128#include <openssl/comp.h>
129#endif
128#include <openssl/bio.h> 130#include <openssl/bio.h>
129#include <openssl/stack.h> 131#include <openssl/stack.h>
130#ifndef OPENSSL_NO_RSA 132#ifndef OPENSSL_NO_RSA
@@ -500,6 +502,7 @@ typedef struct ssl3_enc_method
500 int (*alert_value)(int); 502 int (*alert_value)(int);
501 } SSL3_ENC_METHOD; 503 } SSL3_ENC_METHOD;
502 504
505#ifndef OPENSSL_NO_COMP
503/* Used for holding the relevant compression methods loaded into SSL_CTX */ 506/* Used for holding the relevant compression methods loaded into SSL_CTX */
504typedef struct ssl3_comp_st 507typedef struct ssl3_comp_st
505 { 508 {
@@ -507,6 +510,7 @@ typedef struct ssl3_comp_st
507 char *name; /* Text name used for the compression type */ 510 char *name; /* Text name used for the compression type */
508 COMP_METHOD *method; /* The method :-) */ 511 COMP_METHOD *method; /* The method :-) */
509 } SSL3_COMP; 512 } SSL3_COMP;
513#endif
510 514
511extern SSL3_ENC_METHOD ssl3_undef_enc_method; 515extern SSL3_ENC_METHOD ssl3_undef_enc_method;
512OPENSSL_EXTERN SSL_CIPHER ssl2_ciphers[]; 516OPENSSL_EXTERN SSL_CIPHER ssl2_ciphers[];
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c
index f409f3dc76..5e666aedea 100644
--- a/src/lib/libssl/src/ssl/ssltest.c
+++ b/src/lib/libssl/src/ssl/ssltest.c
@@ -2095,7 +2095,7 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg)
2095 2095
2096 if (cb_arg->proxy_auth) 2096 if (cb_arg->proxy_auth)
2097 { 2097 {
2098 if (ok) 2098 if (ok > 0)
2099 { 2099 {
2100 const char *cond_end = NULL; 2100 const char *cond_end = NULL;
2101 2101
diff --git a/src/lib/libssl/src/ssl/t1_enc.c b/src/lib/libssl/src/ssl/t1_enc.c
index 3c4dec76d7..7cb3e29a41 100644
--- a/src/lib/libssl/src/ssl/t1_enc.c
+++ b/src/lib/libssl/src/ssl/t1_enc.c
@@ -111,10 +111,15 @@
111 111
112#include <stdio.h> 112#include <stdio.h>
113#include "ssl_locl.h" 113#include "ssl_locl.h"
114#ifndef OPENSSL_NO_COMP
114#include <openssl/comp.h> 115#include <openssl/comp.h>
116#endif
115#include <openssl/evp.h> 117#include <openssl/evp.h>
116#include <openssl/hmac.h> 118#include <openssl/hmac.h>
117#include <openssl/md5.h> 119#include <openssl/md5.h>
120#ifdef KSSL_DEBUG
121#include <openssl/des.h>
122#endif
118 123
119static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec, 124static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
120 int sec_len, unsigned char *seed, int seed_len, 125 int sec_len, unsigned char *seed, int seed_len,
@@ -251,15 +256,15 @@ int tls1_change_cipher_state(SSL *s, int which)
251#ifdef KSSL_DEBUG 256#ifdef KSSL_DEBUG
252 printf("tls1_change_cipher_state(which= %d) w/\n", which); 257 printf("tls1_change_cipher_state(which= %d) w/\n", which);
253 printf("\talg= %ld, comp= %p\n", s->s3->tmp.new_cipher->algorithms, 258 printf("\talg= %ld, comp= %p\n", s->s3->tmp.new_cipher->algorithms,
254 comp); 259 (void *)comp);
255 printf("\tevp_cipher == %p ==? &d_cbc_ede_cipher3\n", c); 260 printf("\tevp_cipher == %p ==? &d_cbc_ede_cipher3\n", (void *)c);
256 printf("\tevp_cipher: nid, blksz= %d, %d, keylen=%d, ivlen=%d\n", 261 printf("\tevp_cipher: nid, blksz= %d, %d, keylen=%d, ivlen=%d\n",
257 c->nid,c->block_size,c->key_len,c->iv_len); 262 c->nid,c->block_size,c->key_len,c->iv_len);
258 printf("\tkey_block: len= %d, data= ", s->s3->tmp.key_block_length); 263 printf("\tkey_block: len= %d, data= ", s->s3->tmp.key_block_length);
259 { 264 {
260 int i; 265 int ki;
261 for (i=0; i<s->s3->tmp.key_block_length; i++) 266 for (ki=0; ki<s->s3->tmp.key_block_length; ki++)
262 printf("%02x", key_block[i]); printf("\n"); 267 printf("%02x", key_block[ki]); printf("\n");
263 } 268 }
264#endif /* KSSL_DEBUG */ 269#endif /* KSSL_DEBUG */
265 270
@@ -415,11 +420,13 @@ printf("which = %04X\nmac key=",which);
415 s->session->key_arg_length=0; 420 s->session->key_arg_length=0;
416#ifdef KSSL_DEBUG 421#ifdef KSSL_DEBUG
417 { 422 {
418 int i; 423 int ki;
419 printf("EVP_CipherInit_ex(dd,c,key=,iv=,which)\n"); 424 printf("EVP_CipherInit_ex(dd,c,key=,iv=,which)\n");
420 printf("\tkey= "); for (i=0; i<c->key_len; i++) printf("%02x", key[i]); 425 printf("\tkey= ");
426 for (ki=0; ki<c->key_len; ki++) printf("%02x", key[ki]);
421 printf("\n"); 427 printf("\n");
422 printf("\t iv= "); for (i=0; i<c->iv_len; i++) printf("%02x", iv[i]); 428 printf("\t iv= ");
429 for (ki=0; ki<c->iv_len; ki++) printf("%02x", iv[ki]);
423 printf("\n"); 430 printf("\n");
424 } 431 }
425#endif /* KSSL_DEBUG */ 432#endif /* KSSL_DEBUG */
@@ -592,10 +599,11 @@ int tls1_enc(SSL *s, int send)
592 { 599 {
593 unsigned long ui; 600 unsigned long ui;
594 printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n", 601 printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n",
595 ds,rec->data,rec->input,l); 602 (void *)ds,rec->data,rec->input,l);
596 printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%d %d], %d iv_len\n", 603 printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%ld %ld], %d iv_len\n",
597 ds->buf_len, ds->cipher->key_len, 604 ds->buf_len, ds->cipher->key_len,
598 DES_KEY_SZ, DES_SCHEDULE_SZ, 605 (unsigned long)DES_KEY_SZ,
606 (unsigned long)DES_SCHEDULE_SZ,
599 ds->cipher->iv_len); 607 ds->cipher->iv_len);
600 printf("\t\tIV: "); 608 printf("\t\tIV: ");
601 for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]); 609 for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]);
@@ -620,10 +628,10 @@ int tls1_enc(SSL *s, int send)
620 628
621#ifdef KSSL_DEBUG 629#ifdef KSSL_DEBUG
622 { 630 {
623 unsigned long i; 631 unsigned long ki;
624 printf("\trec->data="); 632 printf("\trec->data=");
625 for (i=0; i<l; i++) 633 for (ki=0; ki<l; i++)
626 printf(" %02x", rec->data[i]); printf("\n"); 634 printf(" %02x", rec->data[ki]); printf("\n");
627 } 635 }
628#endif /* KSSL_DEBUG */ 636#endif /* KSSL_DEBUG */
629 637
@@ -807,7 +815,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
807 unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH]; 815 unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH];
808 816
809#ifdef KSSL_DEBUG 817#ifdef KSSL_DEBUG
810 printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", s,out, p,len); 818 printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", (void *)s,out, p,len);
811#endif /* KSSL_DEBUG */ 819#endif /* KSSL_DEBUG */
812 820
813 /* Setup the stuff to munge */ 821 /* Setup the stuff to munge */
diff --git a/src/lib/libssl/src/test/Makefile b/src/lib/libssl/src/test/Makefile
index 3e58351cb9..73d64440b1 100644
--- a/src/lib/libssl/src/test/Makefile
+++ b/src/lib/libssl/src/test/Makefile
@@ -5,7 +5,7 @@
5DIR= test 5DIR= test
6TOP= .. 6TOP= ..
7CC= cc 7CC= cc
8INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES) 8INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES) -I$(TOP)/fips
9CFLAG= -g 9CFLAG= -g
10MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) 10MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
11PERL= perl 11PERL= perl
@@ -27,6 +27,7 @@ DLIBCRYPTO= ../libcrypto.a
27DLIBSSL= ../libssl.a 27DLIBSSL= ../libssl.a
28LIBCRYPTO= -L.. -lcrypto 28LIBCRYPTO= -L.. -lcrypto
29LIBSSL= -L.. -lssl 29LIBSSL= -L.. -lssl
30LIBFIPS= -L.. -lfips
30 31
31BNTEST= bntest 32BNTEST= bntest
32ECTEST= ectest 33ECTEST= ectest
@@ -59,6 +60,18 @@ RSATEST= rsa_test
59ENGINETEST= enginetest 60ENGINETEST= enginetest
60EVPTEST= evp_test 61EVPTEST= evp_test
61IGETEST= igetest 62IGETEST= igetest
63FIPS_SHATEST= fips_shatest
64FIPS_DESTEST= fips_desmovs
65FIPS_RANDTEST= fips_randtest
66FIPS_AESTEST= fips_aesavs
67FIPS_HMACTEST= fips_hmactest
68FIPS_RSAVTEST= fips_rsavtest
69FIPS_RSASTEST= fips_rsastest
70FIPS_RSAGTEST= fips_rsagtest
71FIPS_DSATEST= fips_dsatest
72FIPS_DSSVS= fips_dssvs
73FIPS_RNGVS= fips_rngvs
74FIPS_TEST_SUITE=fips_test_suite
62 75
63TESTS= alltests 76TESTS= alltests
64 77
@@ -69,7 +82,13 @@ EXE= $(BNTEST)$(EXE_EXT) $(ECTEST)$(EXE_EXT) $(ECDSATEST)$(EXE_EXT) $(ECDHTEST)
69 $(MDC2TEST)$(EXE_EXT) $(RMDTEST)$(EXE_EXT) \ 82 $(MDC2TEST)$(EXE_EXT) $(RMDTEST)$(EXE_EXT) \
70 $(RANDTEST)$(EXE_EXT) $(DHTEST)$(EXE_EXT) $(ENGINETEST)$(EXE_EXT) \ 83 $(RANDTEST)$(EXE_EXT) $(DHTEST)$(EXE_EXT) $(ENGINETEST)$(EXE_EXT) \
71 $(BFTEST)$(EXE_EXT) $(CASTTEST)$(EXE_EXT) $(SSLTEST)$(EXE_EXT) $(EXPTEST)$(EXE_EXT) $(DSATEST)$(EXE_EXT) $(RSATEST)$(EXE_EXT) \ 84 $(BFTEST)$(EXE_EXT) $(CASTTEST)$(EXE_EXT) $(SSLTEST)$(EXE_EXT) $(EXPTEST)$(EXE_EXT) $(DSATEST)$(EXE_EXT) $(RSATEST)$(EXE_EXT) \
72 $(EVPTEST)$(EXE_EXT) $(IGETEST)$(EXE_EXT) 85 $(EVPTEST)$(EXE_EXT) $(IGETEST)$(EXE_EXT) \
86 $(FIPS_SHATEST)$(EXE_EXT) $(FIPS_DESTEST)$(EXE_EXT) \
87 $(FIPS_RANDTEST)$(EXE_EXT) $(FIPS_AESTEST)$(EXE_EXT) \
88 $(FIPS_HMACTEST)$(EXE_EXT) $(FIPS_RSAVTEST)$(EXE_EXT) \
89 $(FIPS_RSASTEST)$(EXE_EXT) $(FIPS_RSAGTEST)$(EXE_EXT) \
90 $(FIPS_DSSVS)$(EXE_EXT) $(FIPS_DSATEST)$(EXE_EXT) \
91 $(FIPS_RNGVS)$(EXE_EXT) $(FIPS_TEST_SUITE)$(EXE_EXT) jpaketest$(EXE_EXT)
73 92
74# $(METHTEST)$(EXE_EXT) 93# $(METHTEST)$(EXE_EXT)
75 94
@@ -81,7 +100,13 @@ OBJ= $(BNTEST).o $(ECTEST).o $(ECDSATEST).o $(ECDHTEST).o $(IDEATEST).o \
81 $(MDC2TEST).o $(RMDTEST).o \ 100 $(MDC2TEST).o $(RMDTEST).o \
82 $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \ 101 $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \
83 $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o \ 102 $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o \
84 $(EVPTEST).o $(IGETEST).o 103 $(EVPTEST).o $(IGETEST).o \
104 $(FIPS_SHATEST).o $(FIPS_DESTEST).o $(FIPS_RANDTEST).o \
105 $(FIPS_AESTEST).o $(FIPS_HMACTEST).o $(FIPS_RSAVTEST).o \
106 $(FIPS_RSASTEST).o $(FIPS_RSAGTEST).o \
107 $(FIPS_DSSVS).o $(FIPS_DSATEST).o $(FIPS_RNGVS).o $(FIPS_TEST_SUITE).o \
108 jpaketest.o
109
85SRC= $(BNTEST).c $(ECTEST).c $(ECDSATEST).c $(ECDHTEST).c $(IDEATEST).c \ 110SRC= $(BNTEST).c $(ECTEST).c $(ECDSATEST).c $(ECDHTEST).c $(IDEATEST).c \
86 $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ 111 $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \
87 $(HMACTEST).c \ 112 $(HMACTEST).c \
@@ -89,7 +114,12 @@ SRC= $(BNTEST).c $(ECTEST).c $(ECDSATEST).c $(ECDHTEST).c $(IDEATEST).c \
89 $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ 114 $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \
90 $(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \ 115 $(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \
91 $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c \ 116 $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c \
92 $(EVPTEST).c $(IGETEST).c 117 $(EVPTEST).c $(IGETEST).c \
118 $(FIPS_SHATEST).c $(FIPS_DESTEST).c $(FIPS_RANDTEST).c \
119 $(FIPS_AESTEST).c $(FIPS_HMACTEST).c $(FIPS_RSAVTEST).c \
120 $(FIPS_RSASTEST).c $(FIPS_RSAGTEST).c \
121 $(FIPS_DSSVS).c $(FIPS_DSATEST).c $(FIPS_RNGVS).c $(FIPS_TEST_SUITE).c \
122 jpaketest.c
93 123
94EXHEADER= 124EXHEADER=
95HEADER= $(EXHEADER) 125HEADER= $(EXHEADER)
@@ -131,7 +161,7 @@ alltests: \
131 test_rand test_bn test_ec test_ecdsa test_ecdh \ 161 test_rand test_bn test_ec test_ecdsa test_ecdh \
132 test_enc test_x509 test_rsa test_crl test_sid \ 162 test_enc test_x509 test_rsa test_crl test_sid \
133 test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ 163 test_gen test_req test_pkcs7 test_verify test_dh test_dsa \
134 test_ss test_ca test_engine test_evp test_ssl test_ige 164 test_ss test_ca test_engine test_evp test_ssl test_ige test_jpake
135 165
136test_evp: 166test_evp:
137 ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt 167 ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
@@ -147,6 +177,9 @@ test_sha:
147 ../util/shlib_wrap.sh ./$(SHA1TEST) 177 ../util/shlib_wrap.sh ./$(SHA1TEST)
148 ../util/shlib_wrap.sh ./$(SHA256TEST) 178 ../util/shlib_wrap.sh ./$(SHA256TEST)
149 ../util/shlib_wrap.sh ./$(SHA512TEST) 179 ../util/shlib_wrap.sh ./$(SHA512TEST)
180 if [ -n "$(FIPSCANLIB)" ]; then \
181 ../util/shlib_wrap.sh ./$(FIPS_SHATEST) < SHAmix.r | diff -w SHAmix.x - ; \
182 fi
150 183
151test_mdc2: 184test_mdc2:
152 ../util/shlib_wrap.sh ./$(MDC2TEST) 185 ../util/shlib_wrap.sh ./$(MDC2TEST)
@@ -183,6 +216,9 @@ test_rc5:
183 216
184test_rand: 217test_rand:
185 ../util/shlib_wrap.sh ./$(RANDTEST) 218 ../util/shlib_wrap.sh ./$(RANDTEST)
219 if [ -n "$(FIPSCANLIB)" ]; then \
220 ../util/shlib_wrap.sh ./$(FIPS_RANDTEST); \
221 fi
186 222
187test_enc: 223test_enc:
188 sh ./testenc 224 sh ./testenc
@@ -247,6 +283,9 @@ test_dsa:
247 @echo "Generate a set of DSA parameters" 283 @echo "Generate a set of DSA parameters"
248 ../util/shlib_wrap.sh ./$(DSATEST) 284 ../util/shlib_wrap.sh ./$(DSATEST)
249 ../util/shlib_wrap.sh ./$(DSATEST) -app2_1 285 ../util/shlib_wrap.sh ./$(DSATEST) -app2_1
286 if [ -n "$(FIPSCANLIB)" ]; then \
287 ../util/shlib_wrap.sh ./$(FIPS_DSATEST); \
288 fi
250 289
251test_gen: 290test_gen:
252 @echo "Generate and verify a certificate request" 291 @echo "Generate and verify a certificate request"
@@ -266,6 +305,9 @@ test_engine:
266test_ssl: keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \ 305test_ssl: keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \
267 intP1.ss intP2.ss 306 intP1.ss intP2.ss
268 @echo "test SSL protocol" 307 @echo "test SSL protocol"
308 @if [ -n "$(FIPSCANLIB)" ]; then \
309 sh ./testfipsssl keyU.ss certU.ss certCA.ss; \
310 fi
269 ../util/shlib_wrap.sh ./$(SSLTEST) -test_cipherlist 311 ../util/shlib_wrap.sh ./$(SSLTEST) -test_cipherlist
270 @sh ./testssl keyU.ss certU.ss certCA.ss 312 @sh ./testssl keyU.ss certU.ss certCA.ss
271 @sh ./testsslproxy keyP1.ss certP1.ss intP1.ss 313 @sh ./testsslproxy keyP1.ss certP1.ss intP1.ss
@@ -287,6 +329,10 @@ test_ige: $(IGETEST)$(EXE_EXT)
287 @echo "Test IGE mode" 329 @echo "Test IGE mode"
288 ../util/shlib_wrap.sh ./$(IGETEST) 330 ../util/shlib_wrap.sh ./$(IGETEST)
289 331
332test_jpake: jpaketest$(EXE_EXT)
333 @echo "Test JPAKE"
334 ../util/shlib_wrap.sh ./jpaketest
335
290lint: 336lint:
291 lint -DLINT $(INCLUDES) $(SRC)>fluff 337 lint -DLINT $(INCLUDES) $(SRC)>fluff
292 338
@@ -302,7 +348,7 @@ dclean:
302 mv -f Makefile.new $(MAKEFILE) 348 mv -f Makefile.new $(MAKEFILE)
303 349
304clean: 350clean:
305 rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss *.srl log 351 rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss *.srl log dummytest
306 352
307$(DLIBSSL): 353$(DLIBSSL):
308 (cd ..; $(MAKE) DIRS=ssl all) 354 (cd ..; $(MAKE) DIRS=ssl all)
@@ -314,6 +360,7 @@ BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
314 shlib_target="$(SHLIB_TARGET)"; \ 360 shlib_target="$(SHLIB_TARGET)"; \
315 fi; \ 361 fi; \
316 LIBRARIES="$(LIBSSL) $(LIBCRYPTO) $(LIBKRB5)"; \ 362 LIBRARIES="$(LIBSSL) $(LIBCRYPTO) $(LIBKRB5)"; \
363 [ "$(FIPSCANLIB)" = "libfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
317 $(MAKE) -f $(TOP)/Makefile.shared -e \ 364 $(MAKE) -f $(TOP)/Makefile.shared -e \
318 APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \ 365 APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
319 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \ 366 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
@@ -349,6 +396,69 @@ $(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
349$(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO) 396$(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
350 @target=$(SHA512TEST); $(BUILD_CMD) 397 @target=$(SHA512TEST); $(BUILD_CMD)
351 398
399FIPS_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
400 shlib_target="$(SHLIB_TARGET)"; \
401 fi; \
402 if [ "$(FIPSCANLIB)" = "libfips" ]; then \
403 LIBRARIES="-L$(TOP) -lfips"; \
404 elif [ -n "$(FIPSCANLIB)" ]; then \
405 FIPSLD_CC=$(CC); CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
406 LIBRARIES="$${FIPSLIBDIR:-$(TOP)/fips/}fipscanister.o"; \
407 fi; \
408 $(MAKE) -f $(TOP)/Makefile.shared -e \
409 CC=$${CC} APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
410 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
411 link_app.$${shlib_target}
412
413FIPS_CRYPTO_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
414 shlib_target="$(SHLIB_TARGET)"; \
415 fi; \
416 LIBRARIES="$(LIBSSL) $(LIBCRYPTO) $(LIBKRB5)"; \
417 if [ -z "$(SHARED_LIBS)" -a -n "$(FIPSCANLIB)" ] ; then \
418 FIPSLD_CC=$(CC); CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
419 fi; \
420 [ "$(FIPSCANLIB)" = "libfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
421 $(MAKE) -f $(TOP)/Makefile.shared -e \
422 CC=$${CC} APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
423 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
424 link_app.$${shlib_target}
425
426$(FIPS_SHATEST)$(EXE_EXT): $(FIPS_SHATEST).o $(DLIBCRYPTO)
427 @target=$(FIPS_SHATEST); $(FIPS_BUILD_CMD)
428
429$(FIPS_AESTEST)$(EXE_EXT): $(FIPS_AESTEST).o $(DLIBCRYPTO)
430 @target=$(FIPS_AESTEST); $(FIPS_BUILD_CMD)
431
432$(FIPS_DESTEST)$(EXE_EXT): $(FIPS_DESTEST).o $(DLIBCRYPTO)
433 @target=$(FIPS_DESTEST); $(FIPS_BUILD_CMD)
434
435$(FIPS_HMACTEST)$(EXE_EXT): $(FIPS_HMACTEST).o $(DLIBCRYPTO)
436 @target=$(FIPS_HMACTEST); $(FIPS_BUILD_CMD)
437
438$(FIPS_RANDTEST)$(EXE_EXT): $(FIPS_RANDTEST).o $(DLIBCRYPTO)
439 @target=$(FIPS_RANDTEST); $(FIPS_BUILD_CMD)
440
441$(FIPS_RSAVTEST)$(EXE_EXT): $(FIPS_RSAVTEST).o $(DLIBCRYPTO)
442 @target=$(FIPS_RSAVTEST); $(FIPS_BUILD_CMD)
443
444$(FIPS_RSASTEST)$(EXE_EXT): $(FIPS_RSASTEST).o $(DLIBCRYPTO)
445 @target=$(FIPS_RSASTEST); $(FIPS_BUILD_CMD)
446
447$(FIPS_RSAGTEST)$(EXE_EXT): $(FIPS_RSAGTEST).o $(DLIBCRYPTO)
448 @target=$(FIPS_RSAGTEST); $(FIPS_BUILD_CMD)
449
450$(FIPS_DSATEST)$(EXE_EXT): $(FIPS_DSATEST).o $(DLIBCRYPTO)
451 @target=$(FIPS_DSATEST); $(FIPS_BUILD_CMD)
452
453$(FIPS_DSSVS)$(EXE_EXT): $(FIPS_DSSVS).o $(DLIBCRYPTO)
454 @target=$(FIPS_DSSVS); $(FIPS_BUILD_CMD)
455
456$(FIPS_RNGVS)$(EXE_EXT): $(FIPS_RNGVS).o $(DLIBCRYPTO)
457 @target=$(FIPS_RNGVS); $(FIPS_BUILD_CMD)
458
459$(FIPS_TEST_SUITE)$(EXE_EXT): $(FIPS_TEST_SUITE).o $(DLIBCRYPTO)
460 @target=$(FIPS_TEST_SUITE); $(FIPS_BUILD_CMD)
461
352$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO) 462$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
353 @target=$(RMDTEST); $(BUILD_CMD) 463 @target=$(RMDTEST); $(BUILD_CMD)
354 464
@@ -395,7 +505,7 @@ $(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO)
395 @target=$(METHTEST); $(BUILD_CMD) 505 @target=$(METHTEST); $(BUILD_CMD)
396 506
397$(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) 507$(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
398 @target=$(SSLTEST); $(BUILD_CMD) 508 @target=$(SSLTEST); $(FIPS_CRYPTO_BUILD_CMD)
399 509
400$(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO) 510$(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO)
401 @target=$(ENGINETEST); $(BUILD_CMD) 511 @target=$(ENGINETEST); $(BUILD_CMD)
@@ -412,6 +522,9 @@ $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
412$(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO) 522$(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO)
413 @target=$(IGETEST); $(BUILD_CMD) 523 @target=$(IGETEST); $(BUILD_CMD)
414 524
525jpaketest$(EXE_EXT): jpaketest.o $(DLIBCRYPTO)
526 @target=jpaketest; $(BUILD_CMD)
527
415#$(AESTEST).o: $(AESTEST).c 528#$(AESTEST).o: $(AESTEST).c
416# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c 529# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
417 530
@@ -435,14 +548,15 @@ bntest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
435bntest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h 548bntest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
436bntest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 549bntest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
437bntest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 550bntest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
438bntest.o: ../include/openssl/evp.h ../include/openssl/lhash.h 551bntest.o: ../include/openssl/evp.h ../include/openssl/fips.h
439bntest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 552bntest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
440bntest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 553bntest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
441bntest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 554bntest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
442bntest.o: ../include/openssl/rand.h ../include/openssl/rsa.h 555bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
443bntest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 556bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
444bntest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 557bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h
445bntest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h bntest.c 558bntest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
559bntest.o: ../include/openssl/x509_vfy.h bntest.c
446casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h 560casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h
447casttest.o: ../include/openssl/opensslconf.h casttest.c 561casttest.o: ../include/openssl/opensslconf.h casttest.c
448destest.o: ../include/openssl/des.h ../include/openssl/des_old.h 562destest.o: ../include/openssl/des.h ../include/openssl/des_old.h
@@ -481,53 +595,54 @@ ecdsatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
481ecdsatest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 595ecdsatest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
482ecdsatest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 596ecdsatest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
483ecdsatest.o: ../include/openssl/err.h ../include/openssl/evp.h 597ecdsatest.o: ../include/openssl/err.h ../include/openssl/evp.h
484ecdsatest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 598ecdsatest.o: ../include/openssl/fips.h ../include/openssl/lhash.h
485ecdsatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 599ecdsatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
486ecdsatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 600ecdsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
487ecdsatest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 601ecdsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
488ecdsatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 602ecdsatest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
489ecdsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 603ecdsatest.o: ../include/openssl/sha.h ../include/openssl/stack.h
490ecdsatest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 604ecdsatest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
491ecdsatest.o: ecdsatest.c 605ecdsatest.o: ../include/openssl/x509_vfy.h ecdsatest.c
492ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 606ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
493ectest.o: ../include/openssl/bn.h ../include/openssl/buffer.h 607ectest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
494ectest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 608ectest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
495ectest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 609ectest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
496ectest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 610ectest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
497ectest.o: ../include/openssl/err.h ../include/openssl/evp.h 611ectest.o: ../include/openssl/err.h ../include/openssl/evp.h
498ectest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 612ectest.o: ../include/openssl/fips.h ../include/openssl/lhash.h
499ectest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 613ectest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
500ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 614ectest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
501ectest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 615ectest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
502ectest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 616ectest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
503ectest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 617ectest.o: ../include/openssl/sha.h ../include/openssl/stack.h
504ectest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ectest.c 618ectest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
619ectest.o: ../include/openssl/x509_vfy.h ectest.c
505enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h 620enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
506enginetest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h 621enginetest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
507enginetest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 622enginetest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
508enginetest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 623enginetest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
509enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h 624enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h
510enginetest.o: ../include/openssl/evp.h ../include/openssl/lhash.h 625enginetest.o: ../include/openssl/evp.h ../include/openssl/fips.h
511enginetest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 626enginetest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
512enginetest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 627enginetest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
513enginetest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 628enginetest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
514enginetest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 629enginetest.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
515enginetest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 630enginetest.o: ../include/openssl/sha.h ../include/openssl/stack.h
516enginetest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 631enginetest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
517enginetest.o: enginetest.c 632enginetest.o: ../include/openssl/x509_vfy.h enginetest.c
518evp_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 633evp_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
519evp_test.o: ../include/openssl/buffer.h ../include/openssl/conf.h 634evp_test.o: ../include/openssl/buffer.h ../include/openssl/conf.h
520evp_test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 635evp_test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
521evp_test.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 636evp_test.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
522evp_test.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 637evp_test.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
523evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h 638evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h
524evp_test.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 639evp_test.o: ../include/openssl/fips.h ../include/openssl/lhash.h
525evp_test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 640evp_test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
526evp_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 641evp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
527evp_test.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h 642evp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
528evp_test.o: ../include/openssl/sha.h ../include/openssl/stack.h 643evp_test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
529evp_test.o: ../include/openssl/symhacks.h ../include/openssl/x509.h 644evp_test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
530evp_test.o: ../include/openssl/x509_vfy.h evp_test.c 645evp_test.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h evp_test.c
531exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h 646exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
532exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 647exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
533exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h 648exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h
@@ -535,40 +650,220 @@ exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
535exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h 650exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
536exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h 651exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
537exptest.o: ../include/openssl/symhacks.h exptest.c 652exptest.o: ../include/openssl/symhacks.h exptest.c
653fips_aesavs.o: ../e_os.h ../fips/fips_utl.h ../include/openssl/aes.h
654fips_aesavs.o: ../include/openssl/asn1.h ../include/openssl/bio.h
655fips_aesavs.o: ../include/openssl/bn.h ../include/openssl/crypto.h
656fips_aesavs.o: ../include/openssl/e_os2.h ../include/openssl/err.h
657fips_aesavs.o: ../include/openssl/evp.h ../include/openssl/fips.h
658fips_aesavs.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
659fips_aesavs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
660fips_aesavs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
661fips_aesavs.o: ../include/openssl/safestack.h ../include/openssl/stack.h
662fips_aesavs.o: ../include/openssl/symhacks.h fips_aesavs.c
663fips_desmovs.o: ../e_os.h ../fips/fips_utl.h ../include/openssl/asn1.h
664fips_desmovs.o: ../include/openssl/bio.h ../include/openssl/bn.h
665fips_desmovs.o: ../include/openssl/crypto.h ../include/openssl/des.h
666fips_desmovs.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
667fips_desmovs.o: ../include/openssl/err.h ../include/openssl/evp.h
668fips_desmovs.o: ../include/openssl/fips.h ../include/openssl/lhash.h
669fips_desmovs.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
670fips_desmovs.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
671fips_desmovs.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
672fips_desmovs.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
673fips_desmovs.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
674fips_desmovs.o: fips_desmovs.c
675fips_dsatest.o: ../e_os.h ../fips/fips_utl.h ../include/openssl/asn1.h
676fips_dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h
677fips_dsatest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
678fips_dsatest.o: ../include/openssl/des.h ../include/openssl/des_old.h
679fips_dsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
680fips_dsatest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
681fips_dsatest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
682fips_dsatest.o: ../include/openssl/err.h ../include/openssl/evp.h
683fips_dsatest.o: ../include/openssl/fips.h ../include/openssl/fips_rand.h
684fips_dsatest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
685fips_dsatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
686fips_dsatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
687fips_dsatest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
688fips_dsatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
689fips_dsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
690fips_dsatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
691fips_dsatest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
692fips_dsatest.o: fips_dsatest.c
693fips_dssvs.o: ../fips/fips_utl.h ../include/openssl/asn1.h
694fips_dssvs.o: ../include/openssl/bio.h ../include/openssl/bn.h
695fips_dssvs.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
696fips_dssvs.o: ../include/openssl/e_os2.h ../include/openssl/err.h
697fips_dssvs.o: ../include/openssl/evp.h ../include/openssl/fips.h
698fips_dssvs.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
699fips_dssvs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
700fips_dssvs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
701fips_dssvs.o: ../include/openssl/safestack.h ../include/openssl/stack.h
702fips_dssvs.o: ../include/openssl/symhacks.h fips_dssvs.c
703fips_hmactest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
704fips_hmactest.o: ../include/openssl/bio.h ../include/openssl/bn.h
705fips_hmactest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
706fips_hmactest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
707fips_hmactest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
708fips_hmactest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
709fips_hmactest.o: ../include/openssl/evp.h ../include/openssl/fips.h
710fips_hmactest.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
711fips_hmactest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
712fips_hmactest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
713fips_hmactest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
714fips_hmactest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
715fips_hmactest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
716fips_hmactest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
717fips_hmactest.o: ../include/openssl/x509v3.h fips_hmactest.c
718fips_randtest.o: ../e_os.h ../fips/fips_utl.h ../include/openssl/bio.h
719fips_randtest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
720fips_randtest.o: ../include/openssl/des.h ../include/openssl/des_old.h
721fips_randtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
722fips_randtest.o: ../include/openssl/fips_rand.h ../include/openssl/lhash.h
723fips_randtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
724fips_randtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
725fips_randtest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
726fips_randtest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
727fips_randtest.o: ../include/openssl/ui_compat.h fips_randtest.c
728fips_rngvs.o: ../fips/fips_utl.h ../include/openssl/asn1.h
729fips_rngvs.o: ../include/openssl/bio.h ../include/openssl/bn.h
730fips_rngvs.o: ../include/openssl/buffer.h ../include/openssl/conf.h
731fips_rngvs.o: ../include/openssl/crypto.h ../include/openssl/des.h
732fips_rngvs.o: ../include/openssl/des_old.h ../include/openssl/dsa.h
733fips_rngvs.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
734fips_rngvs.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
735fips_rngvs.o: ../include/openssl/err.h ../include/openssl/evp.h
736fips_rngvs.o: ../include/openssl/fips.h ../include/openssl/fips_rand.h
737fips_rngvs.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
738fips_rngvs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
739fips_rngvs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
740fips_rngvs.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
741fips_rngvs.o: ../include/openssl/safestack.h ../include/openssl/sha.h
742fips_rngvs.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
743fips_rngvs.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
744fips_rngvs.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
745fips_rngvs.o: ../include/openssl/x509v3.h fips_rngvs.c
746fips_rsagtest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
747fips_rsagtest.o: ../include/openssl/bio.h ../include/openssl/bn.h
748fips_rsagtest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
749fips_rsagtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
750fips_rsagtest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
751fips_rsagtest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
752fips_rsagtest.o: ../include/openssl/evp.h ../include/openssl/fips.h
753fips_rsagtest.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
754fips_rsagtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
755fips_rsagtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
756fips_rsagtest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
757fips_rsagtest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
758fips_rsagtest.o: ../include/openssl/sha.h ../include/openssl/stack.h
759fips_rsagtest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
760fips_rsagtest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
761fips_rsagtest.o: fips_rsagtest.c
762fips_rsastest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
763fips_rsastest.o: ../include/openssl/bio.h ../include/openssl/bn.h
764fips_rsastest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
765fips_rsastest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
766fips_rsastest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
767fips_rsastest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
768fips_rsastest.o: ../include/openssl/evp.h ../include/openssl/fips.h
769fips_rsastest.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
770fips_rsastest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
771fips_rsastest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
772fips_rsastest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
773fips_rsastest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
774fips_rsastest.o: ../include/openssl/sha.h ../include/openssl/stack.h
775fips_rsastest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
776fips_rsastest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
777fips_rsastest.o: fips_rsastest.c
778fips_rsavtest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
779fips_rsavtest.o: ../include/openssl/bio.h ../include/openssl/bn.h
780fips_rsavtest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
781fips_rsavtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
782fips_rsavtest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
783fips_rsavtest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
784fips_rsavtest.o: ../include/openssl/evp.h ../include/openssl/fips.h
785fips_rsavtest.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
786fips_rsavtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
787fips_rsavtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
788fips_rsavtest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
789fips_rsavtest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
790fips_rsavtest.o: ../include/openssl/sha.h ../include/openssl/stack.h
791fips_rsavtest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
792fips_rsavtest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
793fips_rsavtest.o: fips_rsavtest.c
794fips_shatest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
795fips_shatest.o: ../include/openssl/bio.h ../include/openssl/bn.h
796fips_shatest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
797fips_shatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
798fips_shatest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
799fips_shatest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
800fips_shatest.o: ../include/openssl/evp.h ../include/openssl/fips.h
801fips_shatest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
802fips_shatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
803fips_shatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
804fips_shatest.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
805fips_shatest.o: ../include/openssl/sha.h ../include/openssl/stack.h
806fips_shatest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
807fips_shatest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
808fips_shatest.o: fips_shatest.c
809fips_test_suite.o: ../fips/fips_utl.h ../include/openssl/aes.h
810fips_test_suite.o: ../include/openssl/asn1.h ../include/openssl/bio.h
811fips_test_suite.o: ../include/openssl/bn.h ../include/openssl/crypto.h
812fips_test_suite.o: ../include/openssl/des.h ../include/openssl/des_old.h
813fips_test_suite.o: ../include/openssl/dh.h ../include/openssl/dsa.h
814fips_test_suite.o: ../include/openssl/e_os2.h ../include/openssl/err.h
815fips_test_suite.o: ../include/openssl/evp.h ../include/openssl/fips.h
816fips_test_suite.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
817fips_test_suite.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
818fips_test_suite.o: ../include/openssl/opensslconf.h
819fips_test_suite.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
820fips_test_suite.o: ../include/openssl/rand.h ../include/openssl/rsa.h
821fips_test_suite.o: ../include/openssl/safestack.h ../include/openssl/sha.h
822fips_test_suite.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
823fips_test_suite.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
824fips_test_suite.o: fips_test_suite.c
538hmactest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 825hmactest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
539hmactest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 826hmactest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
540hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h 827hmactest.o: ../include/openssl/evp.h ../include/openssl/fips.h
541hmactest.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h 828hmactest.o: ../include/openssl/hmac.h ../include/openssl/md5.h
542hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 829hmactest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
543hmactest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 830hmactest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
544hmactest.o: ../include/openssl/safestack.h ../include/openssl/stack.h 831hmactest.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
545hmactest.o: ../include/openssl/symhacks.h hmactest.c 832hmactest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h hmactest.c
546ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h 833ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h
547ideatest.o: ../include/openssl/opensslconf.h ideatest.c 834ideatest.o: ../include/openssl/opensslconf.h ideatest.c
548igetest.o: ../include/openssl/aes.h ../include/openssl/e_os2.h 835igetest.o: ../include/openssl/aes.h ../include/openssl/e_os2.h
549igetest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h 836igetest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h
550igetest.o: ../include/openssl/rand.h igetest.c 837igetest.o: ../include/openssl/rand.h igetest.c
838jpaketest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
839jpaketest.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
840jpaketest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
841jpaketest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
842jpaketest.o: ../include/openssl/symhacks.h jpaketest.c
551md2test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 843md2test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
552md2test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 844md2test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
553md2test.o: ../include/openssl/evp.h ../include/openssl/md2.h 845md2test.o: ../include/openssl/evp.h ../include/openssl/fips.h
554md2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 846md2test.o: ../include/openssl/md2.h ../include/openssl/obj_mac.h
555md2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 847md2test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
556md2test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 848md2test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
557md2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h md2test.c 849md2test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
850md2test.o: ../include/openssl/symhacks.h md2test.c
558md4test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 851md4test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
559md4test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 852md4test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
560md4test.o: ../include/openssl/evp.h ../include/openssl/md4.h 853md4test.o: ../include/openssl/evp.h ../include/openssl/fips.h
561md4test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 854md4test.o: ../include/openssl/md4.h ../include/openssl/obj_mac.h
562md4test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 855md4test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
563md4test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 856md4test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
564md4test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h md4test.c 857md4test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
858md4test.o: ../include/openssl/symhacks.h md4test.c
565md5test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 859md5test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
566md5test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 860md5test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
567md5test.o: ../include/openssl/evp.h ../include/openssl/md5.h 861md5test.o: ../include/openssl/evp.h ../include/openssl/fips.h
568md5test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 862md5test.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
569md5test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 863md5test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
570md5test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 864md5test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
571md5test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h md5test.c 865md5test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
866md5test.o: ../include/openssl/symhacks.h md5test.c
572mdc2test.o: ../include/openssl/buffer.h ../include/openssl/crypto.h 867mdc2test.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
573mdc2test.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h 868mdc2test.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
574mdc2test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 869mdc2test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
@@ -589,11 +884,12 @@ rc5test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
589rc5test.o: ../include/openssl/symhacks.h rc5test.c 884rc5test.o: ../include/openssl/symhacks.h rc5test.c
590rmdtest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 885rmdtest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
591rmdtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 886rmdtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
592rmdtest.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h 887rmdtest.o: ../include/openssl/evp.h ../include/openssl/fips.h
593rmdtest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 888rmdtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
594rmdtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 889rmdtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
595rmdtest.o: ../include/openssl/ripemd.h ../include/openssl/safestack.h 890rmdtest.o: ../include/openssl/ossl_typ.h ../include/openssl/ripemd.h
596rmdtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h rmdtest.c 891rmdtest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
892rmdtest.o: ../include/openssl/symhacks.h rmdtest.c
597rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 893rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
598rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h 894rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
599rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h 895rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h
@@ -604,18 +900,20 @@ rsa_test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
604rsa_test.o: ../include/openssl/symhacks.h rsa_test.c 900rsa_test.o: ../include/openssl/symhacks.h rsa_test.c
605sha1test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 901sha1test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
606sha1test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 902sha1test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
607sha1test.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h 903sha1test.o: ../include/openssl/evp.h ../include/openssl/fips.h
608sha1test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 904sha1test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
609sha1test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 905sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
610sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h 906sha1test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
611sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h sha1test.c 907sha1test.o: ../include/openssl/sha.h ../include/openssl/stack.h
908sha1test.o: ../include/openssl/symhacks.h sha1test.c
612shatest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 909shatest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
613shatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 910shatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
614shatest.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h 911shatest.o: ../include/openssl/evp.h ../include/openssl/fips.h
615shatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 912shatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
616shatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 913shatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
617shatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 914shatest.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
618shatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h shatest.c 915shatest.o: ../include/openssl/sha.h ../include/openssl/stack.h
916shatest.o: ../include/openssl/symhacks.h shatest.c
619ssltest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 917ssltest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
620ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h 918ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
621ssltest.o: ../include/openssl/comp.h ../include/openssl/conf.h 919ssltest.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -624,17 +922,18 @@ ssltest.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
624ssltest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 922ssltest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
625ssltest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 923ssltest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
626ssltest.o: ../include/openssl/engine.h ../include/openssl/err.h 924ssltest.o: ../include/openssl/engine.h ../include/openssl/err.h
627ssltest.o: ../include/openssl/evp.h ../include/openssl/hmac.h 925ssltest.o: ../include/openssl/evp.h ../include/openssl/fips.h
628ssltest.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 926ssltest.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
629ssltest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 927ssltest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
630ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 928ssltest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
631ssltest.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 929ssltest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
632ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 930ssltest.o: ../include/openssl/pem.h ../include/openssl/pem2.h
633ssltest.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 931ssltest.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
634ssltest.o: ../include/openssl/rand.h ../include/openssl/rsa.h 932ssltest.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
635ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 933ssltest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
636ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 934ssltest.o: ../include/openssl/sha.h ../include/openssl/ssl.h
637ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 935ssltest.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
638ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 936ssltest.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
639ssltest.o: ../include/openssl/tls1.h ../include/openssl/x509.h 937ssltest.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
640ssltest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h ssltest.c 938ssltest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
939ssltest.o: ../include/openssl/x509v3.h ssltest.c
diff --git a/src/lib/libssl/src/test/tests.com b/src/lib/libssl/src/test/tests.com
index 056082e7fe..88a33d0531 100644
--- a/src/lib/libssl/src/test/tests.com
+++ b/src/lib/libssl/src/test/tests.com
@@ -25,7 +25,7 @@ $ tests := -
25 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,- 25 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,-
26 test_enc,test_x509,test_rsa,test_crl,test_sid,- 26 test_enc,test_x509,test_rsa,test_crl,test_sid,-
27 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- 27 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
28 test_ss,test_ca,test_engine,test_evp,test_ssl 28 test_ss,test_ca,test_engine,test_evp,test_ssl,test_ige,test_jpake
29$ endif 29$ endif
30$ tests = f$edit(tests,"COLLAPSE") 30$ tests = f$edit(tests,"COLLAPSE")
31$ 31$
@@ -57,6 +57,8 @@ $ SSLTEST := ssltest
57$ RSATEST := rsa_test 57$ RSATEST := rsa_test
58$ ENGINETEST := enginetest 58$ ENGINETEST := enginetest
59$ EVPTEST := evp_test 59$ EVPTEST := evp_test
60$ IGETEST := igetest
61$ JPAKETEST := jpaketest
60$ 62$
61$ tests_i = 0 63$ tests_i = 0
62$ loop_tests: 64$ loop_tests:
@@ -250,6 +252,14 @@ $ test_rd:
250$ write sys$output "test Rijndael" 252$ write sys$output "test Rijndael"
251$ !mcr 'texe_dir''rdtest' 253$ !mcr 'texe_dir''rdtest'
252$ return 254$ return
255$ test_ige:
256$ write sys$output "Test IGE mode"
257$ mcr 'texe_dir''igetest'
258$ return
259$ test_jpake:
260$ write sys$output "Test JPAKE"
261$ mcr 'texe_dir''jpaketest'
262$ return
253$ 263$
254$ 264$
255$ exit: 265$ exit:
diff --git a/src/lib/libssl/src/util/libeay.num b/src/lib/libssl/src/util/libeay.num
index 62664f3c37..0eb54ddc89 100644
--- a/src/lib/libssl/src/util/libeay.num
+++ b/src/lib/libssl/src/util/libeay.num
@@ -2804,12 +2804,12 @@ OPENSSL_cleanse 3245 EXIST::FUNCTION:
2804ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE 2804ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE
2805ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH 2805ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH
2806EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES 2806EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES
2807FIPS_corrupt_rsa 3249 NOEXIST::FUNCTION: 2807FIPS_corrupt_rsa 3249 EXIST:OPENSSL_FIPS:FUNCTION:
2808FIPS_selftest_des 3250 NOEXIST::FUNCTION: 2808FIPS_selftest_des 3250 EXIST:OPENSSL_FIPS:FUNCTION:
2809EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES 2809EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES
2810EVP_aes_192_cfb8 3252 EXIST::FUNCTION:AES 2810EVP_aes_192_cfb8 3252 EXIST::FUNCTION:AES
2811FIPS_mode_set 3253 NOEXIST::FUNCTION: 2811FIPS_mode_set 3253 EXIST:OPENSSL_FIPS:FUNCTION:
2812FIPS_selftest_dsa 3254 NOEXIST::FUNCTION: 2812FIPS_selftest_dsa 3254 EXIST:OPENSSL_FIPS:FUNCTION:
2813EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES 2813EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES
2814FIPS_allow_md5 3256 NOEXIST::FUNCTION: 2814FIPS_allow_md5 3256 NOEXIST::FUNCTION:
2815DES_ede3_cfb_encrypt 3257 EXIST::FUNCTION:DES 2815DES_ede3_cfb_encrypt 3257 EXIST::FUNCTION:DES
@@ -2817,44 +2817,44 @@ EVP_des_ede3_cfb8 3258 EXIST::FUNCTION:DES
2817FIPS_rand_seeded 3259 NOEXIST::FUNCTION: 2817FIPS_rand_seeded 3259 NOEXIST::FUNCTION:
2818AES_cfbr_encrypt_block 3260 EXIST::FUNCTION:AES 2818AES_cfbr_encrypt_block 3260 EXIST::FUNCTION:AES
2819AES_cfb8_encrypt 3261 EXIST::FUNCTION:AES 2819AES_cfb8_encrypt 3261 EXIST::FUNCTION:AES
2820FIPS_rand_seed 3262 NOEXIST::FUNCTION: 2820FIPS_rand_seed 3262 EXIST:OPENSSL_FIPS:FUNCTION:
2821FIPS_corrupt_des 3263 NOEXIST::FUNCTION: 2821FIPS_corrupt_des 3263 EXIST:OPENSSL_FIPS:FUNCTION:
2822EVP_aes_192_cfb1 3264 EXIST::FUNCTION:AES 2822EVP_aes_192_cfb1 3264 EXIST::FUNCTION:AES
2823FIPS_selftest_aes 3265 NOEXIST::FUNCTION: 2823FIPS_selftest_aes 3265 EXIST:OPENSSL_FIPS:FUNCTION:
2824FIPS_set_prng_key 3266 NOEXIST::FUNCTION: 2824FIPS_set_prng_key 3266 NOEXIST::FUNCTION:
2825EVP_des_cfb8 3267 EXIST::FUNCTION:DES 2825EVP_des_cfb8 3267 EXIST::FUNCTION:DES
2826FIPS_corrupt_dsa 3268 NOEXIST::FUNCTION: 2826FIPS_corrupt_dsa 3268 EXIST:OPENSSL_FIPS:FUNCTION:
2827FIPS_test_mode 3269 NOEXIST::FUNCTION: 2827FIPS_test_mode 3269 NOEXIST::FUNCTION:
2828FIPS_rand_method 3270 NOEXIST::FUNCTION: 2828FIPS_rand_method 3270 EXIST:OPENSSL_FIPS:FUNCTION:
2829EVP_aes_256_cfb1 3271 EXIST::FUNCTION:AES 2829EVP_aes_256_cfb1 3271 EXIST::FUNCTION:AES
2830ERR_load_FIPS_strings 3272 NOEXIST::FUNCTION: 2830ERR_load_FIPS_strings 3272 EXIST:OPENSSL_FIPS:FUNCTION:
2831FIPS_corrupt_aes 3273 NOEXIST::FUNCTION: 2831FIPS_corrupt_aes 3273 EXIST:OPENSSL_FIPS:FUNCTION:
2832FIPS_selftest_sha1 3274 NOEXIST::FUNCTION: 2832FIPS_selftest_sha1 3274 EXIST:OPENSSL_FIPS:FUNCTION:
2833FIPS_selftest_rsa 3275 NOEXIST::FUNCTION: 2833FIPS_selftest_rsa 3275 EXIST:OPENSSL_FIPS:FUNCTION:
2834FIPS_corrupt_sha1 3276 NOEXIST::FUNCTION: 2834FIPS_corrupt_sha1 3276 EXIST:OPENSSL_FIPS:FUNCTION:
2835EVP_des_cfb1 3277 EXIST::FUNCTION:DES 2835EVP_des_cfb1 3277 EXIST::FUNCTION:DES
2836FIPS_dsa_check 3278 NOEXIST::FUNCTION: 2836FIPS_dsa_check 3278 NOEXIST::FUNCTION:
2837AES_cfb1_encrypt 3279 EXIST::FUNCTION:AES 2837AES_cfb1_encrypt 3279 EXIST::FUNCTION:AES
2838EVP_des_ede3_cfb1 3280 EXIST::FUNCTION:DES 2838EVP_des_ede3_cfb1 3280 EXIST::FUNCTION:DES
2839FIPS_rand_check 3281 NOEXIST::FUNCTION: 2839FIPS_rand_check 3281 EXIST:OPENSSL_FIPS:FUNCTION:
2840FIPS_md5_allowed 3282 NOEXIST::FUNCTION: 2840FIPS_md5_allowed 3282 NOEXIST::FUNCTION:
2841FIPS_mode 3283 NOEXIST::FUNCTION: 2841FIPS_mode 3283 EXIST:OPENSSL_FIPS:FUNCTION:
2842FIPS_selftest_failed 3284 NOEXIST::FUNCTION: 2842FIPS_selftest_failed 3284 EXIST:OPENSSL_FIPS:FUNCTION:
2843sk_is_sorted 3285 EXIST::FUNCTION: 2843sk_is_sorted 3285 EXIST::FUNCTION:
2844X509_check_ca 3286 EXIST::FUNCTION: 2844X509_check_ca 3286 EXIST::FUNCTION:
2845private_idea_set_encrypt_key 3287 NOEXIST::FUNCTION: 2845private_idea_set_encrypt_key 3287 EXIST:OPENSSL_FIPS:FUNCTION:IDEA
2846HMAC_CTX_set_flags 3288 EXIST::FUNCTION:HMAC 2846HMAC_CTX_set_flags 3288 EXIST::FUNCTION:HMAC
2847private_SHA_Init 3289 NOEXIST::FUNCTION: 2847private_SHA_Init 3289 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA0
2848private_CAST_set_key 3290 NOEXIST::FUNCTION: 2848private_CAST_set_key 3290 EXIST:OPENSSL_FIPS:FUNCTION:CAST
2849private_RIPEMD160_Init 3291 NOEXIST::FUNCTION: 2849private_RIPEMD160_Init 3291 EXIST:OPENSSL_FIPS:FUNCTION:RIPEMD
2850private_RC5_32_set_key 3292 NOEXIST::FUNCTION: 2850private_RC5_32_set_key 3292 EXIST:OPENSSL_FIPS:FUNCTION:RC5
2851private_MD5_Init 3293 NOEXIST::FUNCTION: 2851private_MD5_Init 3293 EXIST:OPENSSL_FIPS:FUNCTION:MD5
2852private_RC4_set_key 3294 NOEXIST::FUNCTION: 2852private_RC4_set_key 3294 EXIST:OPENSSL_FIPS:FUNCTION:RC4
2853private_MDC2_Init 3295 NOEXIST::FUNCTION: 2853private_MDC2_Init 3295 EXIST:OPENSSL_FIPS:FUNCTION:MDC2
2854private_RC2_set_key 3296 NOEXIST::FUNCTION: 2854private_RC2_set_key 3296 EXIST:OPENSSL_FIPS:FUNCTION:RC2
2855private_MD4_Init 3297 NOEXIST::FUNCTION: 2855private_MD4_Init 3297 EXIST:OPENSSL_FIPS:FUNCTION:MD4
2856private_BF_set_key 3298 NOEXIST::FUNCTION: 2856private_BF_set_key 3298 EXIST:OPENSSL_FIPS:FUNCTION:BF
2857private_MD2_Init 3299 NOEXIST::FUNCTION: 2857private_MD2_Init 3299 EXIST:OPENSSL_FIPS:FUNCTION:MD2
2858d2i_PROXY_CERT_INFO_EXTENSION 3300 EXIST::FUNCTION: 2858d2i_PROXY_CERT_INFO_EXTENSION 3300 EXIST::FUNCTION:
2859PROXY_POLICY_it 3301 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: 2859PROXY_POLICY_it 3301 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
2860PROXY_POLICY_it 3301 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: 2860PROXY_POLICY_it 3301 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
@@ -2868,13 +2868,13 @@ PROXY_CERT_INFO_EXTENSION_it 3307 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTI
2868PROXY_POLICY_free 3308 EXIST::FUNCTION: 2868PROXY_POLICY_free 3308 EXIST::FUNCTION:
2869PROXY_POLICY_new 3309 EXIST::FUNCTION: 2869PROXY_POLICY_new 3309 EXIST::FUNCTION:
2870BN_MONT_CTX_set_locked 3310 EXIST::FUNCTION: 2870BN_MONT_CTX_set_locked 3310 EXIST::FUNCTION:
2871FIPS_selftest_rng 3311 NOEXIST::FUNCTION: 2871FIPS_selftest_rng 3311 EXIST:OPENSSL_FIPS:FUNCTION:
2872EVP_sha384 3312 EXIST::FUNCTION:SHA,SHA512 2872EVP_sha384 3312 EXIST::FUNCTION:SHA,SHA512
2873EVP_sha512 3313 EXIST::FUNCTION:SHA,SHA512 2873EVP_sha512 3313 EXIST::FUNCTION:SHA,SHA512
2874EVP_sha224 3314 EXIST::FUNCTION:SHA,SHA256 2874EVP_sha224 3314 EXIST::FUNCTION:SHA,SHA256
2875EVP_sha256 3315 EXIST::FUNCTION:SHA,SHA256 2875EVP_sha256 3315 EXIST::FUNCTION:SHA,SHA256
2876FIPS_selftest_hmac 3316 NOEXIST::FUNCTION: 2876FIPS_selftest_hmac 3316 EXIST:OPENSSL_FIPS:FUNCTION:
2877FIPS_corrupt_rng 3317 NOEXIST::FUNCTION: 2877FIPS_corrupt_rng 3317 EXIST:OPENSSL_FIPS:FUNCTION:
2878BN_mod_exp_mont_consttime 3318 EXIST::FUNCTION: 2878BN_mod_exp_mont_consttime 3318 EXIST::FUNCTION:
2879RSA_X931_hash_id 3319 EXIST::FUNCTION:RSA 2879RSA_X931_hash_id 3319 EXIST::FUNCTION:RSA
2880RSA_padding_check_X931 3320 EXIST::FUNCTION:RSA 2880RSA_padding_check_X931 3320 EXIST::FUNCTION:RSA
@@ -2882,7 +2882,7 @@ RSA_verify_PKCS1_PSS 3321 EXIST::FUNCTION:RSA
2882RSA_padding_add_X931 3322 EXIST::FUNCTION:RSA 2882RSA_padding_add_X931 3322 EXIST::FUNCTION:RSA
2883RSA_padding_add_PKCS1_PSS 3323 EXIST::FUNCTION:RSA 2883RSA_padding_add_PKCS1_PSS 3323 EXIST::FUNCTION:RSA
2884PKCS1_MGF1 3324 EXIST::FUNCTION:RSA 2884PKCS1_MGF1 3324 EXIST::FUNCTION:RSA
2885BN_X931_generate_Xpq 3325 NOEXIST::FUNCTION: 2885BN_X931_generate_Xpq 3325 EXIST::FUNCTION:
2886RSA_X931_generate_key 3326 NOEXIST::FUNCTION: 2886RSA_X931_generate_key 3326 NOEXIST::FUNCTION:
2887BN_X931_derive_prime 3327 NOEXIST::FUNCTION: 2887BN_X931_derive_prime 3327 NOEXIST::FUNCTION:
2888BN_X931_generate_prime 3328 NOEXIST::FUNCTION: 2888BN_X931_generate_prime 3328 NOEXIST::FUNCTION:
@@ -3652,51 +3652,75 @@ CMS_set1_eContentType 4040 EXIST::FUNCTION:CMS
3652CMS_ReceiptRequest_create0 4041 EXIST::FUNCTION:CMS 3652CMS_ReceiptRequest_create0 4041 EXIST::FUNCTION:CMS
3653CMS_add1_signer 4042 EXIST::FUNCTION:CMS 3653CMS_add1_signer 4042 EXIST::FUNCTION:CMS
3654CMS_RecipientInfo_set0_pkey 4043 EXIST::FUNCTION:CMS 3654CMS_RecipientInfo_set0_pkey 4043 EXIST::FUNCTION:CMS
3655ENGINE_set_load_ssl_client_cert_function 4044 EXIST::FUNCTION:ENGINE 3655ENGINE_set_load_ssl_client_cert_function 4044 EXIST:!VMS:FUNCTION:ENGINE
3656ENGINE_get_ssl_client_cert_function 4045 EXIST::FUNCTION:ENGINE 3656ENGINE_set_ld_ssl_clnt_cert_fn 4044 EXIST:VMS:FUNCTION:ENGINE
3657ENGINE_get_ssl_client_cert_function 4045 EXIST:!VMS:FUNCTION:ENGINE
3658ENGINE_get_ssl_client_cert_fn 4045 EXIST:VMS:FUNCTION:ENGINE
3657ENGINE_load_ssl_client_cert 4046 EXIST::FUNCTION:ENGINE 3659ENGINE_load_ssl_client_cert 4046 EXIST::FUNCTION:ENGINE
3658ENGINE_load_capi 4047 EXIST::FUNCTION:CAPIENG,ENGINE 3660ENGINE_load_capi 4047 EXIST::FUNCTION:CAPIENG,ENGINE
3659OPENSSL_isservice 4048 EXIST::FUNCTION: 3661OPENSSL_isservice 4048 EXIST::FUNCTION:
3660FIPS_dsa_sig_decode 4049 NOEXIST::FUNCTION: 3662FIPS_dsa_sig_decode 4049 EXIST:OPENSSL_FIPS:FUNCTION:DSA
3661EVP_CIPHER_CTX_clear_flags 4050 NOEXIST::FUNCTION: 3663EVP_CIPHER_CTX_clear_flags 4050 EXIST::FUNCTION:
3662FIPS_rand_status 4051 NOEXIST::FUNCTION: 3664FIPS_rand_status 4051 EXIST:OPENSSL_FIPS:FUNCTION:
3663FIPS_rand_set_key 4052 NOEXIST::FUNCTION: 3665FIPS_rand_set_key 4052 EXIST:OPENSSL_FIPS:FUNCTION:
3664CRYPTO_set_mem_info_functions 4053 NOEXIST::FUNCTION: 3666CRYPTO_set_mem_info_functions 4053 EXIST::FUNCTION:
3665RSA_X931_generate_key_ex 4054 NOEXIST::FUNCTION: 3667RSA_X931_generate_key_ex 4054 EXIST::FUNCTION:RSA
3666int_ERR_set_state_func 4055 NOEXIST::FUNCTION: 3668int_ERR_set_state_func 4055 EXIST:OPENSSL_FIPS:FUNCTION:
3667int_EVP_MD_set_engine_callbacks 4056 NOEXIST::FUNCTION: 3669int_EVP_MD_set_engine_callbacks 4056 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3668int_CRYPTO_set_do_dynlock_callback 4057 NOEXIST::FUNCTION: 3670int_CRYPTO_set_do_dynlock_callback 4057 EXIST::FUNCTION:
3669FIPS_rng_stick 4058 NOEXIST::FUNCTION: 3671FIPS_rng_stick 4058 EXIST:OPENSSL_FIPS:FUNCTION:
3670EVP_CIPHER_CTX_set_flags 4059 NOEXIST::FUNCTION: 3672EVP_CIPHER_CTX_set_flags 4059 EXIST::FUNCTION:
3671BN_X931_generate_prime_ex 4060 NOEXIST::FUNCTION: 3673BN_X931_generate_prime_ex 4060 EXIST::FUNCTION:
3672FIPS_selftest_check 4061 NOEXIST::FUNCTION: 3674FIPS_selftest_check 4061 EXIST:OPENSSL_FIPS:FUNCTION:
3673FIPS_rand_set_dt 4062 NOEXIST::FUNCTION: 3675FIPS_rand_set_dt 4062 EXIST:OPENSSL_FIPS:FUNCTION:
3674CRYPTO_dbg_pop_info 4063 NOEXIST::FUNCTION: 3676CRYPTO_dbg_pop_info 4063 EXIST::FUNCTION:
3675FIPS_dsa_free 4064 NOEXIST::FUNCTION: 3677FIPS_dsa_free 4064 EXIST:OPENSSL_FIPS:FUNCTION:DSA
3676RSA_X931_derive_ex 4065 NOEXIST::FUNCTION: 3678RSA_X931_derive_ex 4065 EXIST::FUNCTION:RSA
3677FIPS_rsa_new 4066 NOEXIST::FUNCTION: 3679FIPS_rsa_new 4066 EXIST:OPENSSL_FIPS:FUNCTION:RSA
3678FIPS_rand_bytes 4067 NOEXIST::FUNCTION: 3680FIPS_rand_bytes 4067 EXIST:OPENSSL_FIPS:FUNCTION:
3679fips_cipher_test 4068 NOEXIST::FUNCTION: 3681fips_cipher_test 4068 EXIST:OPENSSL_FIPS:FUNCTION:
3680EVP_CIPHER_CTX_test_flags 4069 NOEXIST::FUNCTION: 3682EVP_CIPHER_CTX_test_flags 4069 EXIST::FUNCTION:
3681CRYPTO_malloc_debug_init 4070 NOEXIST::FUNCTION: 3683CRYPTO_malloc_debug_init 4070 EXIST::FUNCTION:
3682CRYPTO_dbg_push_info 4071 NOEXIST::FUNCTION: 3684CRYPTO_dbg_push_info 4071 EXIST::FUNCTION:
3683FIPS_corrupt_rsa_keygen 4072 NOEXIST::FUNCTION: 3685FIPS_corrupt_rsa_keygen 4072 EXIST:OPENSSL_FIPS:FUNCTION:
3684FIPS_dh_new 4073 NOEXIST::FUNCTION: 3686FIPS_dh_new 4073 EXIST:OPENSSL_FIPS:FUNCTION:DH
3685FIPS_corrupt_dsa_keygen 4074 NOEXIST::FUNCTION: 3687FIPS_corrupt_dsa_keygen 4074 EXIST:OPENSSL_FIPS:FUNCTION:
3686FIPS_dh_free 4075 NOEXIST::FUNCTION: 3688FIPS_dh_free 4075 EXIST:OPENSSL_FIPS:FUNCTION:DH
3687fips_pkey_signature_test 4076 NOEXIST::FUNCTION: 3689fips_pkey_signature_test 4076 EXIST:OPENSSL_FIPS:FUNCTION:
3688EVP_add_alg_module 4077 NOEXIST::FUNCTION: 3690EVP_add_alg_module 4077 EXIST::FUNCTION:
3689int_RAND_init_engine_callbacks 4078 NOEXIST::FUNCTION: 3691int_RAND_init_engine_callbacks 4078 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3690int_EVP_CIPHER_set_engine_callbacks 4079 NOEXIST::FUNCTION: 3692int_EVP_CIPHER_set_engine_callbacks 4079 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3691int_EVP_MD_init_engine_callbacks 4080 NOEXIST::FUNCTION: 3693int_EVP_MD_init_engine_callbacks 4080 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3692FIPS_rand_test_mode 4081 NOEXIST::FUNCTION: 3694FIPS_rand_test_mode 4081 EXIST:OPENSSL_FIPS:FUNCTION:
3693FIPS_rand_reset 4082 NOEXIST::FUNCTION: 3695FIPS_rand_reset 4082 EXIST:OPENSSL_FIPS:FUNCTION:
3694FIPS_dsa_new 4083 NOEXIST::FUNCTION: 3696FIPS_dsa_new 4083 EXIST:OPENSSL_FIPS:FUNCTION:DSA
3695int_RAND_set_callbacks 4084 NOEXIST::FUNCTION: 3697int_RAND_set_callbacks 4084 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3696BN_X931_derive_prime_ex 4085 NOEXIST::FUNCTION: 3698BN_X931_derive_prime_ex 4085 EXIST::FUNCTION:
3697int_ERR_lib_init 4086 NOEXIST::FUNCTION: 3699int_ERR_lib_init 4086 EXIST:OPENSSL_FIPS:FUNCTION:
3698int_EVP_CIPHER_init_engine_callbacks 4087 NOEXIST::FUNCTION: 3700int_EVP_CIPHER_init_engine_callbacks 4087 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE
3699FIPS_rsa_free 4088 NOEXIST::FUNCTION: 3701FIPS_rsa_free 4088 EXIST:OPENSSL_FIPS:FUNCTION:RSA
3700FIPS_dsa_sig_encode 4089 NOEXIST::FUNCTION: 3702FIPS_dsa_sig_encode 4089 EXIST:OPENSSL_FIPS:FUNCTION:DSA
3701CRYPTO_dbg_remove_all_info 4090 NOEXIST::FUNCTION: 3703CRYPTO_dbg_remove_all_info 4090 EXIST::FUNCTION:
3702OPENSSL_init 4091 NOEXIST::FUNCTION: 3704OPENSSL_init 4091 EXIST::FUNCTION:
3705private_Camellia_set_key 4092 EXIST:OPENSSL_FIPS:FUNCTION:CAMELLIA
3706CRYPTO_strdup 4093 EXIST::FUNCTION:
3707JPAKE_STEP3A_process 4094 EXIST::FUNCTION:JPAKE
3708JPAKE_STEP1_release 4095 EXIST::FUNCTION:JPAKE
3709JPAKE_get_shared_key 4096 EXIST::FUNCTION:JPAKE
3710JPAKE_STEP3B_init 4097 EXIST::FUNCTION:JPAKE
3711JPAKE_STEP1_generate 4098 EXIST::FUNCTION:JPAKE
3712JPAKE_STEP1_init 4099 EXIST::FUNCTION:JPAKE
3713JPAKE_STEP3B_process 4100 EXIST::FUNCTION:JPAKE
3714JPAKE_STEP2_generate 4101 EXIST::FUNCTION:JPAKE
3715JPAKE_CTX_new 4102 EXIST::FUNCTION:JPAKE
3716JPAKE_CTX_free 4103 EXIST::FUNCTION:JPAKE
3717JPAKE_STEP3B_release 4104 EXIST::FUNCTION:JPAKE
3718JPAKE_STEP3A_release 4105 EXIST::FUNCTION:JPAKE
3719JPAKE_STEP2_process 4106 EXIST::FUNCTION:JPAKE
3720JPAKE_STEP3B_generate 4107 EXIST::FUNCTION:JPAKE
3721JPAKE_STEP1_process 4108 EXIST::FUNCTION:JPAKE
3722JPAKE_STEP3A_generate 4109 EXIST::FUNCTION:JPAKE
3723JPAKE_STEP2_release 4110 EXIST::FUNCTION:JPAKE
3724JPAKE_STEP3A_init 4111 EXIST::FUNCTION:JPAKE
3725ERR_load_JPAKE_strings 4112 EXIST::FUNCTION:JPAKE
3726JPAKE_STEP2_init 4113 EXIST::FUNCTION:JPAKE
diff --git a/src/lib/libssl/src/util/mk1mf.pl b/src/lib/libssl/src/util/mk1mf.pl
index 7ba804ce33..4c16f1dc9e 100644
--- a/src/lib/libssl/src/util/mk1mf.pl
+++ b/src/lib/libssl/src/util/mk1mf.pl
@@ -15,6 +15,18 @@ my $engines = "";
15local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic 15local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic
16local $zlib_lib = ""; 16local $zlib_lib = "";
17 17
18local $fips_canister_path = "";
19my $fips_premain_dso_exe_path = "";
20my $fips_premain_c_path = "";
21my $fips_sha1_exe_path = "";
22
23local $fipscanisterbuild = 0;
24local $fipsdso = 0;
25
26my $fipslibdir = "";
27my $baseaddr = "";
28
29my $ex_l_libs = "";
18 30
19open(IN,"<Makefile") || die "unable to open Makefile!\n"; 31open(IN,"<Makefile") || die "unable to open Makefile!\n";
20while(<IN>) { 32while(<IN>) {
@@ -221,6 +233,7 @@ $cflags.=" -DOPENSSL_NO_SSL2" if $no_ssl2;
221$cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3; 233$cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3;
222$cflags.=" -DOPENSSL_NO_TLSEXT" if $no_tlsext; 234$cflags.=" -DOPENSSL_NO_TLSEXT" if $no_tlsext;
223$cflags.=" -DOPENSSL_NO_CMS" if $no_cms; 235$cflags.=" -DOPENSSL_NO_CMS" if $no_cms;
236$cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake;
224$cflags.=" -DOPENSSL_NO_CAPIENG" if $no_capieng; 237$cflags.=" -DOPENSSL_NO_CAPIENG" if $no_capieng;
225$cflags.=" -DOPENSSL_NO_ERR" if $no_err; 238$cflags.=" -DOPENSSL_NO_ERR" if $no_err;
226$cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; 239$cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5;
@@ -229,7 +242,7 @@ $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa;
229$cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh; 242$cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh;
230$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; 243$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine;
231$cflags.=" -DOPENSSL_NO_HW" if $no_hw; 244$cflags.=" -DOPENSSL_NO_HW" if $no_hw;
232 245$cflags.=" -DOPENSSL_FIPS" if $fips;
233$cflags.= " -DZLIB" if $zlib_opt; 246$cflags.= " -DZLIB" if $zlib_opt;
234$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2; 247$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
235 248
@@ -251,9 +264,9 @@ else
251 264
252$ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); 265$ex_libs="$l_flags$ex_libs" if ($l_flags ne "");
253 266
254
255%shlib_ex_cflags=("SSL" => " -DOPENSSL_BUILD_SHLIBSSL", 267%shlib_ex_cflags=("SSL" => " -DOPENSSL_BUILD_SHLIBSSL",
256 "CRYPTO" => " -DOPENSSL_BUILD_SHLIBCRYPTO"); 268 "CRYPTO" => " -DOPENSSL_BUILD_SHLIBCRYPTO",
269 "FIPS" => " -DOPENSSL_BUILD_SHLIBCRYPTO");
257 270
258if ($msdos) 271if ($msdos)
259 { 272 {
@@ -281,11 +294,21 @@ for (;;)
281 { 294 {
282 if ($lib ne "") 295 if ($lib ne "")
283 { 296 {
284 $uc=$lib; 297 if ($fips && $dir =~ /^fips/)
285 $uc =~ s/^lib(.*)\.a/$1/; 298 {
286 $uc =~ tr/a-z/A-Z/; 299 $uc = "FIPS";
287 $lib_nam{$uc}=$uc; 300 }
288 $lib_obj{$uc}.=$libobj." "; 301 else
302 {
303 $uc=$lib;
304 $uc =~ s/^lib(.*)\.a/$1/;
305 $uc =~ tr/a-z/A-Z/;
306 }
307 if (($uc ne "FIPS") || $fipscanisterbuild)
308 {
309 $lib_nam{$uc}=$uc;
310 $lib_obj{$uc}.=$libobj." ";
311 }
289 } 312 }
290 last if ($val eq "FINISHED"); 313 last if ($val eq "FINISHED");
291 $lib=""; 314 $lib="";
@@ -328,11 +351,130 @@ for (;;)
328 if ($key eq "LIBNAMES" && $dir eq "engines" && $no_static_engine) 351 if ($key eq "LIBNAMES" && $dir eq "engines" && $no_static_engine)
329 { $engines.=$val } 352 { $engines.=$val }
330 353
354 if ($key eq "FIPS_EX_OBJ")
355 {
356 $fips_ex_obj=&var_add("crypto",$val,0);
357 }
358
359 if ($key eq "FIPSLIBDIR")
360 {
361 $fipslibdir=$val;
362 $fipslibdir =~ s/\/$//;
363 $fipslibdir =~ s/\//$o/g;
364 }
365
366 if ($key eq "BASEADDR")
367 { $baseaddr=$val;}
368
331 if (!($_=<IN>)) 369 if (!($_=<IN>))
332 { $_="RELATIVE_DIRECTORY=FINISHED\n"; } 370 { $_="RELATIVE_DIRECTORY=FINISHED\n"; }
333 } 371 }
334close(IN); 372close(IN);
335 373
374if ($fips)
375 {
376
377 foreach (split " ", $fips_ex_obj)
378 {
379 $fips_exclude_obj{$1} = 1 if (/\/([^\/]*)$/);
380 }
381
382 $fips_exclude_obj{"cpu_win32"} = 1;
383 $fips_exclude_obj{"bn_asm"} = 1;
384 $fips_exclude_obj{"des_enc"} = 1;
385 $fips_exclude_obj{"fcrypt_b"} = 1;
386 $fips_exclude_obj{"aes_core"} = 1;
387 $fips_exclude_obj{"aes_cbc"} = 1;
388
389 my @ltmp = split " ", $lib_obj{"CRYPTO"};
390
391
392 $lib_obj{"CRYPTO"} = "";
393
394 foreach(@ltmp)
395 {
396 if (/\/([^\/]*)$/ && exists $fips_exclude_obj{$1})
397 {
398 if ($fipscanisterbuild)
399 {
400 $lib_obj{"FIPS"} .= "$_ ";
401 }
402 }
403 else
404 {
405 $lib_obj{"CRYPTO"} .= "$_ ";
406 }
407 }
408
409 }
410
411if ($fipscanisterbuild)
412 {
413 $fips_canister_path = "\$(LIB_D)${o}fipscanister.lib" if $fips_canister_path eq "";
414 $fips_premain_c_path = "\$(LIB_D)${o}fips_premain.c";
415 }
416else
417 {
418 if ($fips_canister_path eq "")
419 {
420 $fips_canister_path = "\$(FIPSLIB_D)${o}fipscanister.lib";
421 }
422
423 if ($fips_premain_c_path eq "")
424 {
425 $fips_premain_c_path = "\$(FIPSLIB_D)${o}fips_premain.c";
426 }
427 }
428
429if ($fips)
430 {
431 if ($fips_sha1_exe_path eq "")
432 {
433 $fips_sha1_exe_path =
434 "\$(BIN_D)${o}fips_standalone_sha1$exep";
435 }
436 }
437 else
438 {
439 $fips_sha1_exe_path = "";
440 }
441
442if ($fips_premain_dso_exe_path eq "")
443 {
444 $fips_premain_dso_exe_path = "\$(BIN_D)${o}fips_premain_dso$exep";
445 }
446
447# $ex_build_targets .= "\$(BIN_D)${o}\$(E_PREMAIN_DSO)$exep" if ($fips);
448
449#$ex_l_libs .= " \$(L_FIPS)" if $fipsdso;
450
451if ($fips)
452 {
453 if (!$shlib)
454 {
455 $ex_build_targets .= " \$(LIB_D)$o$crypto_compat \$(PREMAIN_DSO_EXE)";
456 $ex_l_libs .= " \$(O_FIPSCANISTER)";
457 $ex_libs_dep .= " \$(O_FIPSCANISTER)" if $fipscanisterbuild;
458 }
459 if ($fipscanisterbuild)
460 {
461 $fipslibdir = "\$(LIB_D)";
462 }
463 else
464 {
465 if ($fipslibdir eq "")
466 {
467 open (IN, "util/fipslib_path.txt") || fipslib_error();
468 $fipslibdir = <IN>;
469 chomp $fipslibdir;
470 close IN;
471 }
472 fips_check_files($fipslibdir,
473 "fipscanister.lib", "fipscanister.lib.sha1",
474 "fips_premain.c", "fips_premain.c.sha1");
475 }
476 }
477
336if ($shlib) 478if ($shlib)
337 { 479 {
338 $extra_install= <<"EOF"; 480 $extra_install= <<"EOF";
@@ -398,6 +540,7 @@ SRC_D=$src_dir
398LINK=$link 540LINK=$link
399LFLAGS=$lflags 541LFLAGS=$lflags
400RSC=$rsc 542RSC=$rsc
543FIPSLINK=\$(PERL) util${o}fipslink.pl
401 544
402AES_ASM_OBJ=$aes_asm_obj 545AES_ASM_OBJ=$aes_asm_obj
403AES_ASM_SRC=$aes_asm_src 546AES_ASM_SRC=$aes_asm_src
@@ -441,6 +584,17 @@ MKLIB=$bin_dir$mklib
441MLFLAGS=$mlflags 584MLFLAGS=$mlflags
442ASM=$bin_dir$asm 585ASM=$bin_dir$asm
443 586
587# FIPS validated module and support file locations
588
589E_PREMAIN_DSO=fips_premain_dso
590
591FIPSLIB_D=$fipslibdir
592BASEADDR=$baseaddr
593FIPS_PREMAIN_SRC=$fips_premain_c_path
594O_FIPSCANISTER=$fips_canister_path
595FIPS_SHA1_EXE=$fips_sha1_exe_path
596PREMAIN_DSO_EXE=$fips_premain_dso_exe_path
597
444###################################################### 598######################################################
445# You should not need to touch anything below this point 599# You should not need to touch anything below this point
446###################################################### 600######################################################
@@ -448,6 +602,7 @@ ASM=$bin_dir$asm
448E_EXE=openssl 602E_EXE=openssl
449SSL=$ssl 603SSL=$ssl
450CRYPTO=$crypto 604CRYPTO=$crypto
605LIBFIPS=libosslfips
451 606
452# BIN_D - Binary output directory 607# BIN_D - Binary output directory
453# TEST_D - Binary test file output directory 608# TEST_D - Binary test file output directory
@@ -468,12 +623,14 @@ INCL_D=\$(TMP_D)
468 623
469O_SSL= \$(LIB_D)$o$plib\$(SSL)$shlibp 624O_SSL= \$(LIB_D)$o$plib\$(SSL)$shlibp
470O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp 625O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp
626O_FIPS= \$(LIB_D)$o$plib\$(LIBFIPS)$shlibp
471SO_SSL= $plib\$(SSL)$so_shlibp 627SO_SSL= $plib\$(SSL)$so_shlibp
472SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp 628SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp
473L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp 629L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp
474L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp 630L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp
631L_FIPS= \$(LIB_D)$o$plib\$(LIBFIPS)$libp
475 632
476L_LIBS= \$(L_SSL) \$(L_CRYPTO) 633L_LIBS= \$(L_SSL) \$(L_CRYPTO) $ex_l_libs
477 634
478###################################################### 635######################################################
479# Don't touch anything below this point 636# Don't touch anything below this point
@@ -483,13 +640,13 @@ INC=-I\$(INC_D) -I\$(INCL_D)
483APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG) 640APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG)
484LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) 641LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG)
485SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG) 642SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG)
486LIBS_DEP=\$(O_CRYPTO) \$(O_SSL) 643LIBS_DEP=\$(O_CRYPTO) \$(O_SSL) $ex_libs_dep
487 644
488############################################# 645#############################################
489EOF 646EOF
490 647
491$rules=<<"EOF"; 648$rules=<<"EOF";
492all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers lib exe 649all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers \$(FIPS_SHA1_EXE) lib exe $ex_build_targets
493 650
494banner: 651banner:
495$banner 652$banner
@@ -604,6 +761,26 @@ $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)");
604$defs.=&do_defs("E_OBJ",$e_exe,"\$(OBJ_D)",$obj); 761$defs.=&do_defs("E_OBJ",$e_exe,"\$(OBJ_D)",$obj);
605$rules.=&do_compile_rule("\$(OBJ_D)",$e_exe,'-DMONOLITH $(APP_CFLAGS)'); 762$rules.=&do_compile_rule("\$(OBJ_D)",$e_exe,'-DMONOLITH $(APP_CFLAGS)');
606 763
764# Special case rules for fips_start and fips_end fips_premain_dso
765
766if ($fips)
767 {
768 if ($fipscanisterbuild)
769 {
770 $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_start$obj",
771 "fips${o}fips_canister.c",
772 "-DFIPS_START \$(SHLIB_CFLAGS)");
773 $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_end$obj",
774 "fips${o}fips_canister.c", "\$(SHLIB_CFLAGS)");
775 }
776 $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_standalone_sha1$obj",
777 "fips${o}sha${o}fips_standalone_sha1.c",
778 "\$(SHLIB_CFLAGS)");
779 $rules.=&cc_compile_target("\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj",
780 "fips${o}fips_premain.c",
781 "-DFINGERPRINT_PREMAIN_DSO_LOAD \$(SHLIB_CFLAGS)");
782 }
783
607foreach (values %lib_nam) 784foreach (values %lib_nam)
608 { 785 {
609 $lib_obj=$lib_obj{$_}; 786 $lib_obj=$lib_obj{$_};
@@ -614,27 +791,41 @@ foreach (values %lib_nam)
614 $rules.="\$(O_SSL):\n\n"; 791 $rules.="\$(O_SSL):\n\n";
615 next; 792 next;
616 } 793 }
617 if (($aes_asm_obj ne "") && ($_ eq "CRYPTO")) 794
618 { 795 if ((!$fips && ($_ eq "CRYPTO")) || ($fips && ($_ eq "FIPS")))
619 $lib_obj =~ s/\s(\S*\/aes_core\S*)/ \$(AES_ASM_OBJ)/;
620 $lib_obj =~ s/\s\S*\/aes_cbc\S*//;
621 $rules.=&do_asm_rule($aes_asm_obj,$aes_asm_src);
622 }
623 if (($bn_asm_obj ne "") && ($_ eq "CRYPTO"))
624 {
625 $lib_obj =~ s/\s\S*\/bn_asm\S*/ \$(BN_ASM_OBJ)/;
626 $rules.=&do_asm_rule($bn_asm_obj,$bn_asm_src);
627 }
628 if (($bnco_asm_obj ne "") && ($_ eq "CRYPTO"))
629 {
630 $lib_obj .= "\$(BNCO_ASM_OBJ)";
631 $rules.=&do_asm_rule($bnco_asm_obj,$bnco_asm_src);
632 }
633 if (($des_enc_obj ne "") && ($_ eq "CRYPTO"))
634 { 796 {
635 $lib_obj =~ s/\s\S*des_enc\S*/ \$(DES_ENC_OBJ)/; 797 if ($cpuid_asm_obj ne "")
636 $lib_obj =~ s/\s\S*\/fcrypt_b\S*\s*/ /; 798 {
637 $rules.=&do_asm_rule($des_enc_obj,$des_enc_src); 799 $lib_obj =~ s/(\S*\/cryptlib\S*)/$1 \$(CPUID_ASM_OBJ)/;
800 $rules.=&do_asm_rule($cpuid_asm_obj,$cpuid_asm_src);
801 }
802 if ($aes_asm_obj ne "")
803 {
804 $lib_obj =~ s/\s(\S*\/aes_core\S*)/ \$(AES_ASM_OBJ)/;
805 $lib_obj =~ s/\s\S*\/aes_cbc\S*//;
806 $rules.=&do_asm_rule($aes_asm_obj,$aes_asm_src);
807 }
808 if ($sha1_asm_obj ne "")
809 {
810 $lib_obj =~ s/\s(\S*\/sha1dgst\S*)/ $1 \$(SHA1_ASM_OBJ)/;
811 $rules.=&do_asm_rule($sha1_asm_obj,$sha1_asm_src);
812 }
813 if ($bn_asm_obj ne "")
814 {
815 $lib_obj =~ s/\s\S*\/bn_asm\S*/ \$(BN_ASM_OBJ)/;
816 $rules.=&do_asm_rule($bn_asm_obj,$bn_asm_src);
817 }
818 if ($bnco_asm_obj ne "")
819 {
820 $lib_obj .= "\$(BNCO_ASM_OBJ)";
821 $rules.=&do_asm_rule($bnco_asm_obj,$bnco_asm_src);
822 }
823 if ($des_enc_obj ne "")
824 {
825 $lib_obj =~ s/\s\S*des_enc\S*/ \$(DES_ENC_OBJ)/;
826 $lib_obj =~ s/\s\S*\/fcrypt_b\S*\s*/ /;
827 $rules.=&do_asm_rule($des_enc_obj,$des_enc_src);
828 }
638 } 829 }
639 if (($bf_enc_obj ne "") && ($_ eq "CRYPTO")) 830 if (($bf_enc_obj ne "") && ($_ eq "CRYPTO"))
640 { 831 {
@@ -661,21 +852,11 @@ foreach (values %lib_nam)
661 $lib_obj =~ s/\s(\S*\/md5_dgst\S*)/ $1 \$(MD5_ASM_OBJ)/; 852 $lib_obj =~ s/\s(\S*\/md5_dgst\S*)/ $1 \$(MD5_ASM_OBJ)/;
662 $rules.=&do_asm_rule($md5_asm_obj,$md5_asm_src); 853 $rules.=&do_asm_rule($md5_asm_obj,$md5_asm_src);
663 } 854 }
664 if (($sha1_asm_obj ne "") && ($_ eq "CRYPTO"))
665 {
666 $lib_obj =~ s/\s(\S*\/sha1dgst\S*)/ $1 \$(SHA1_ASM_OBJ)/;
667 $rules.=&do_asm_rule($sha1_asm_obj,$sha1_asm_src);
668 }
669 if (($rmd160_asm_obj ne "") && ($_ eq "CRYPTO")) 855 if (($rmd160_asm_obj ne "") && ($_ eq "CRYPTO"))
670 { 856 {
671 $lib_obj =~ s/\s(\S*\/rmd_dgst\S*)/ $1 \$(RMD160_ASM_OBJ)/; 857 $lib_obj =~ s/\s(\S*\/rmd_dgst\S*)/ $1 \$(RMD160_ASM_OBJ)/;
672 $rules.=&do_asm_rule($rmd160_asm_obj,$rmd160_asm_src); 858 $rules.=&do_asm_rule($rmd160_asm_obj,$rmd160_asm_src);
673 } 859 }
674 if (($cpuid_asm_obj ne "") && ($_ eq "CRYPTO"))
675 {
676 $lib_obj =~ s/\s(\S*\/cversion\S*)/ $1 \$(CPUID_ASM_OBJ)/;
677 $rules.=&do_asm_rule($cpuid_asm_obj,$cpuid_asm_src);
678 }
679 $defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj); 860 $defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj);
680 $lib=($slib)?" \$(SHLIB_CFLAGS)".$shlib_ex_cflags{$_}:" \$(LIB_CFLAGS)"; 861 $lib=($slib)?" \$(SHLIB_CFLAGS)".$shlib_ex_cflags{$_}:" \$(LIB_CFLAGS)";
681 $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib); 862 $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib);
@@ -690,15 +871,43 @@ if (($platform eq "VC-WIN32") || ($platform eq "VC-NT")) {
690\$(OBJ_D)\\\$(SSL).res: ms\\version32.rc 871\$(OBJ_D)\\\$(SSL).res: ms\\version32.rc
691 \$(RSC) /fo"\$(OBJ_D)\\\$(SSL).res" /d SSL ms\\version32.rc 872 \$(RSC) /fo"\$(OBJ_D)\\\$(SSL).res" /d SSL ms\\version32.rc
692 873
874\$(OBJ_D)\\\$(LIBFIPS).res: ms\\version32.rc
875 \$(RSC) /fo"\$(OBJ_D)\\\$(LIBFIPS).res" /d FIPS ms\\version32.rc
876
693EOF 877EOF
694} 878}
695 879
696$defs.=&do_defs("T_EXE",$test,"\$(TEST_D)",$exep); 880$defs.=&do_defs("T_EXE",$test,"\$(TEST_D)",$exep);
697foreach (split(/\s+/,$test)) 881foreach (split(/\s+/,$test))
698 { 882 {
883 my $t_libs;
699 $t=&bname($_); 884 $t=&bname($_);
885 my $ltype;
886 # Check to see if test program is FIPS
887 if ($fips && /fips/)
888 {
889 # If fipsdso link to libosslfips.dll
890 # otherwise perform static link to
891 # $(O_FIPSCANISTER)
892 if ($fipsdso)
893 {
894 $t_libs = "\$(L_FIPS)";
895 $ltype = 0;
896 }
897 else
898 {
899 $t_libs = "\$(O_FIPSCANISTER)";
900 $ltype = 2;
901 }
902 }
903 else
904 {
905 $t_libs = "\$(L_LIBS)";
906 $ltype = 0;
907 }
908
700 $tt="\$(OBJ_D)${o}$t${obj}"; 909 $tt="\$(OBJ_D)${o}$t${obj}";
701 $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); 910 $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","$t_libs \$(EX_LIBS)", $ltype);
702 } 911 }
703 912
704$defs.=&do_defs("E_SHLIB",$engines,"\$(ENG_D)",$shlibp); 913$defs.=&do_defs("E_SHLIB",$engines,"\$(ENG_D)",$shlibp);
@@ -712,9 +921,69 @@ foreach (split(/\s+/,$engines))
712 921
713 922
714$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); 923$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)");
715$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)");
716 924
717$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); 925if ($fips)
926 {
927 if ($shlib)
928 {
929 if ($fipsdso)
930 {
931 $rules.= &do_lib_rule("\$(CRYPTOOBJ)",
932 "\$(O_CRYPTO)", "$crypto",
933 $shlib, "", "");
934 $rules.= &do_lib_rule(
935 "\$(O_FIPSCANISTER)",
936 "\$(O_FIPS)", "\$(LIBFIPS)",
937 $shlib, "\$(SO_CRYPTO)", "\$(BASEADDR)");
938 $rules.= &do_sdef_rule();
939 }
940 else
941 {
942 $rules.= &do_lib_rule(
943 "\$(CRYPTOOBJ) \$(O_FIPSCANISTER)",
944 "\$(O_CRYPTO)", "$crypto",
945 $shlib, "\$(SO_CRYPTO)", "\$(BASEADDR)");
946 }
947 }
948 else
949 {
950 $rules.= &do_lib_rule("\$(CRYPTOOBJ)",
951 "\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)", "");
952 $rules.= &do_lib_rule("\$(CRYPTOOBJ) \$(FIPSOBJ)",
953 "\$(LIB_D)$o$crypto_compat",$crypto,$shlib,"\$(SO_CRYPTO)", "");
954 }
955 }
956 else
957 {
958 $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,
959 "\$(SO_CRYPTO)");
960 }
961
962if ($fips)
963 {
964 if ($fipscanisterbuild)
965 {
966 $rules.= &do_rlink_rule("\$(O_FIPSCANISTER)",
967 "\$(OBJ_D)${o}fips_start$obj",
968 "\$(FIPSOBJ)",
969 "\$(OBJ_D)${o}fips_end$obj",
970 "\$(FIPS_SHA1_EXE)", "");
971 $rules.=&do_link_rule("\$(FIPS_SHA1_EXE)",
972 "\$(OBJ_D)${o}fips_standalone_sha1$obj \$(OBJ_D)${o}sha1dgst$obj \$(SHA1_ASM_OBJ)",
973 "","\$(EX_LIBS)", 1);
974 }
975 else
976 {
977 $rules.=&do_link_rule("\$(FIPS_SHA1_EXE)",
978 "\$(OBJ_D)${o}fips_standalone_sha1$obj \$(O_FIPSCANISTER)",
979 "","", 1);
980
981 }
982 $rules.=&do_link_rule("\$(PREMAIN_DSO_EXE)","\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj \$(CRYPTOOBJ) \$(O_FIPSCANISTER)","","\$(EX_LIBS)", 1);
983
984 }
985
986$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)", ($fips && !$shlib) ? 2 : 0);
718 987
719print $defs; 988print $defs;
720 989
@@ -752,6 +1021,8 @@ sub var_add
752 return("") if $no_dh && $dir =~ /\/dh/; 1021 return("") if $no_dh && $dir =~ /\/dh/;
753 return("") if $no_ec && $dir =~ /\/ec/; 1022 return("") if $no_ec && $dir =~ /\/ec/;
754 return("") if $no_cms && $dir =~ /\/cms/; 1023 return("") if $no_cms && $dir =~ /\/cms/;
1024 return("") if $no_jpake && $dir =~ /\/jpake/;
1025 return("") if !$fips && $dir =~ /^fips/;
755 if ($no_des && $dir =~ /\/des/) 1026 if ($no_des && $dir =~ /\/des/)
756 { 1027 {
757 if ($val =~ /read_pwd/) 1028 if ($val =~ /read_pwd/)
@@ -1011,6 +1282,7 @@ sub read_options
1011 "no-hmac" => \$no_hmac, 1282 "no-hmac" => \$no_hmac,
1012 "no-asm" => \$no_asm, 1283 "no-asm" => \$no_asm,
1013 "nasm" => \$nasm, 1284 "nasm" => \$nasm,
1285 "ml64" => \$ml64,
1014 "nw-nasm" => \$nw_nasm, 1286 "nw-nasm" => \$nw_nasm,
1015 "nw-mwasm" => \$nw_mwasm, 1287 "nw-mwasm" => \$nw_mwasm,
1016 "gaswin" => \$gaswin, 1288 "gaswin" => \$gaswin,
@@ -1018,6 +1290,7 @@ sub read_options
1018 "no-ssl3" => \$no_ssl3, 1290 "no-ssl3" => \$no_ssl3,
1019 "no-tlsext" => \$no_tlsext, 1291 "no-tlsext" => \$no_tlsext,
1020 "no-cms" => \$no_cms, 1292 "no-cms" => \$no_cms,
1293 "no-jpake" => \$no_jpake,
1021 "no-capieng" => \$no_capieng, 1294 "no-capieng" => \$no_capieng,
1022 "no-err" => \$no_err, 1295 "no-err" => \$no_err,
1023 "no-sock" => \$no_sock, 1296 "no-sock" => \$no_sock,
@@ -1045,6 +1318,9 @@ sub read_options
1045 "no-shared" => 0, 1318 "no-shared" => 0,
1046 "no-zlib" => 0, 1319 "no-zlib" => 0,
1047 "no-zlib-dynamic" => 0, 1320 "no-zlib-dynamic" => 0,
1321 "fips" => \$fips,
1322 "fipscanisterbuild" => [\$fips, \$fipscanisterbuild],
1323 "fipsdso" => [\$fips, \$fipscanisterbuild, \$fipsdso],
1048 ); 1324 );
1049 1325
1050 if (exists $valid_options{$_}) 1326 if (exists $valid_options{$_})
@@ -1086,6 +1362,18 @@ sub read_options
1086 {return 1;} 1362 {return 1;}
1087 return 0; 1363 return 0;
1088 } 1364 }
1365 # experimental-xxx is mostly like enable-xxx, but opensslconf.v
1366 # will still set OPENSSL_NO_xxx unless we set OPENSSL_EXPERIMENTAL_xxx.
1367 # (No need to fail if we don't know the algorithm -- this is for adventurous users only.)
1368 elsif (/^experimental-/)
1369 {
1370 my $algo, $ALGO;
1371 ($algo = $_) =~ s/^experimental-//;
1372 ($ALGO = $algo) =~ tr/[a-z]/[A-Z]/;
1373
1374 $xcflags="-DOPENSSL_EXPERIMENTAL_$ALGO $xcflags";
1375
1376 }
1089 elsif (/^--with-krb5-flavor=(.*)$/) 1377 elsif (/^--with-krb5-flavor=(.*)$/)
1090 { 1378 {
1091 my $krb5_flavor = $1; 1379 my $krb5_flavor = $1;
@@ -1109,3 +1397,31 @@ sub read_options
1109 else { return(0); } 1397 else { return(0); }
1110 return(1); 1398 return(1);
1111 } 1399 }
1400
1401sub fipslib_error
1402 {
1403 print STDERR "***FIPS module directory sanity check failed***\n";
1404 print STDERR "FIPS module build failed, or was deleted\n";
1405 print STDERR "Please rebuild FIPS module.\n";
1406 exit 1;
1407 }
1408
1409sub fips_check_files
1410 {
1411 my $dir = shift @_;
1412 my $ret = 1;
1413 if (!-d $dir)
1414 {
1415 print STDERR "FIPS module directory $dir does not exist\n";
1416 fipslib_error();
1417 }
1418 foreach (@_)
1419 {
1420 if (!-f "$dir${o}$_")
1421 {
1422 print STDERR "FIPS module file $_ does not exist!\n";
1423 $ret = 0;
1424 }
1425 }
1426 fipslib_error() if ($ret == 0);
1427 }
diff --git a/src/lib/libssl/src/util/mkdef.pl b/src/lib/libssl/src/util/mkdef.pl
index 8ecfde1848..5ae9ebb619 100644
--- a/src/lib/libssl/src/util/mkdef.pl
+++ b/src/lib/libssl/src/util/mkdef.pl
@@ -79,7 +79,7 @@ my $OS2=0;
79my $safe_stack_def = 0; 79my $safe_stack_def = 0;
80 80
81my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", 81my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
82 "EXPORT_VAR_AS_FUNCTION", "ZLIB" ); 82 "EXPORT_VAR_AS_FUNCTION", "ZLIB", "OPENSSL_FIPS");
83my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); 83my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" );
84my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", 84my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
85 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", 85 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
@@ -102,6 +102,8 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
102 "CMS", 102 "CMS",
103 # CryptoAPI Engine 103 # CryptoAPI Engine
104 "CAPIENG", 104 "CAPIENG",
105 # JPAKE
106 "JPAKE",
105 # Deprecated functions 107 # Deprecated functions
106 "DEPRECATED" ); 108 "DEPRECATED" );
107 109
@@ -122,7 +124,8 @@ my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5;
122my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; my $no_camellia; 124my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; my $no_camellia;
123my $no_seed; 125my $no_seed;
124my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated; 126my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated;
125my $no_rfc3779; my $no_tlsext; my $no_cms; my $no_capieng; 127my $no_rfc3779; my $no_tlsext; my $no_cms; my $no_capieng; my $no_jpake;
128my $fips;
126 129
127 130
128foreach (@ARGV, split(/ /, $options)) 131foreach (@ARGV, split(/ /, $options))
@@ -144,12 +147,13 @@ foreach (@ARGV, split(/ /, $options))
144 } 147 }
145 $VMS=1 if $_ eq "VMS"; 148 $VMS=1 if $_ eq "VMS";
146 $OS2=1 if $_ eq "OS2"; 149 $OS2=1 if $_ eq "OS2";
150 $fips=1 if /^fips/;
151
147 if ($_ eq "zlib" || $_ eq "zlib-dynamic" 152 if ($_ eq "zlib" || $_ eq "zlib-dynamic"
148 || $_ eq "enable-zlib-dynamic") { 153 || $_ eq "enable-zlib-dynamic") {
149 $zlib = 1; 154 $zlib = 1;
150 } 155 }
151 156
152
153 $do_ssl=1 if $_ eq "ssleay"; 157 $do_ssl=1 if $_ eq "ssleay";
154 if ($_ eq "ssl") { 158 if ($_ eq "ssl") {
155 $do_ssl=1; 159 $do_ssl=1;
@@ -209,6 +213,7 @@ foreach (@ARGV, split(/ /, $options))
209 elsif (/^no-tlsext$/) { $no_tlsext=1; } 213 elsif (/^no-tlsext$/) { $no_tlsext=1; }
210 elsif (/^no-cms$/) { $no_cms=1; } 214 elsif (/^no-cms$/) { $no_cms=1; }
211 elsif (/^no-capieng$/) { $no_capieng=1; } 215 elsif (/^no-capieng$/) { $no_capieng=1; }
216 elsif (/^no-jpake$/) { $no_jpake=1; }
212 } 217 }
213 218
214 219
@@ -305,6 +310,8 @@ $crypto.=" crypto/tmdiff.h";
305$crypto.=" crypto/store/store.h"; 310$crypto.=" crypto/store/store.h";
306$crypto.=" crypto/pqueue/pqueue.h"; 311$crypto.=" crypto/pqueue/pqueue.h";
307$crypto.=" crypto/cms/cms.h"; 312$crypto.=" crypto/cms/cms.h";
313$crypto.=" crypto/jpake/jpake.h";
314$crypto.=" fips/fips.h fips/rand/fips_rand.h";
308 315
309my $symhacks="crypto/symhacks.h"; 316my $symhacks="crypto/symhacks.h";
310 317
@@ -1090,6 +1097,9 @@ sub is_valid
1090 if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { 1097 if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) {
1091 return 1; 1098 return 1;
1092 } 1099 }
1100 if ($keyword eq "OPENSSL_FIPS" && $fips) {
1101 return 1;
1102 }
1093 if ($keyword eq "ZLIB" && $zlib) { return 1; } 1103 if ($keyword eq "ZLIB" && $zlib) { return 1; }
1094 return 0; 1104 return 0;
1095 } else { 1105 } else {
@@ -1135,6 +1145,7 @@ sub is_valid
1135 if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } 1145 if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; }
1136 if ($keyword eq "CMS" && $no_cms) { return 0; } 1146 if ($keyword eq "CMS" && $no_cms) { return 0; }
1137 if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } 1147 if ($keyword eq "CAPIENG" && $no_capieng) { return 0; }
1148 if ($keyword eq "JPAKE" && $no_jpake) { return 0; }
1138 if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; } 1149 if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; }
1139 1150
1140 # Nothing recognise as true 1151 # Nothing recognise as true
diff --git a/src/lib/libssl/src/util/mkerr.pl b/src/lib/libssl/src/util/mkerr.pl
index 53e14ab4df..554bebb159 100644
--- a/src/lib/libssl/src/util/mkerr.pl
+++ b/src/lib/libssl/src/util/mkerr.pl
@@ -44,7 +44,8 @@ while (@ARGV) {
44} 44}
45 45
46if($recurse) { 46if($recurse) {
47 @source = (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>); 47 @source = ( <crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>,
48 <fips/*.c>, <fips/*/*.c>);
48} else { 49} else {
49 @source = @ARGV; 50 @source = @ARGV;
50} 51}
diff --git a/src/lib/libssl/src/util/mkfiles.pl b/src/lib/libssl/src/util/mkfiles.pl
index 1282392fea..67fb8694c8 100644
--- a/src/lib/libssl/src/util/mkfiles.pl
+++ b/src/lib/libssl/src/util/mkfiles.pl
@@ -47,6 +47,7 @@ my @dirs = (
47"crypto/x509", 47"crypto/x509",
48"crypto/x509v3", 48"crypto/x509v3",
49"crypto/conf", 49"crypto/conf",
50"crypto/jpake",
50"crypto/txt_db", 51"crypto/txt_db",
51"crypto/pkcs7", 52"crypto/pkcs7",
52"crypto/pkcs12", 53"crypto/pkcs12",
@@ -58,6 +59,15 @@ my @dirs = (
58"crypto/store", 59"crypto/store",
59"crypto/pqueue", 60"crypto/pqueue",
60"crypto/cms", 61"crypto/cms",
62"fips",
63"fips/aes",
64"fips/des",
65"fips/dsa",
66"fips/dh",
67"fips/hmac",
68"fips/rand",
69"fips/rsa",
70"fips/sha",
61"ssl", 71"ssl",
62"apps", 72"apps",
63"engines", 73"engines",
diff --git a/src/lib/libssl/src/util/mklink.pl b/src/lib/libssl/src/util/mklink.pl
index d9bc98aab8..eacc327882 100644
--- a/src/lib/libssl/src/util/mklink.pl
+++ b/src/lib/libssl/src/util/mklink.pl
@@ -15,13 +15,21 @@
15# Apart from this, this script should be able to handle even the most 15# Apart from this, this script should be able to handle even the most
16# pathological cases. 16# pathological cases.
17 17
18use Cwd; 18my $pwd;
19eval 'use Cwd;';
20if ($@)
21 {
22 $pwd = `pwd`;
23 }
24else
25 {
26 $pwd = getcwd();
27 }
19 28
20my $from = shift; 29my $from = shift;
21my @files = @ARGV; 30my @files = @ARGV;
22 31
23my @from_path = split(/[\\\/]/, $from); 32my @from_path = split(/[\\\/]/, $from);
24my $pwd = getcwd();
25chomp($pwd); 33chomp($pwd);
26my @pwd_path = split(/[\\\/]/, $pwd); 34my @pwd_path = split(/[\\\/]/, $pwd);
27 35
diff --git a/src/lib/libssl/src/util/pl/VC-32.pl b/src/lib/libssl/src/util/pl/VC-32.pl
index 1e254119e6..166785db8d 100644
--- a/src/lib/libssl/src/util/pl/VC-32.pl
+++ b/src/lib/libssl/src/util/pl/VC-32.pl
@@ -4,12 +4,26 @@
4# 4#
5 5
6$ssl= "ssleay32"; 6$ssl= "ssleay32";
7$crypto="libeay32"; 7
8if ($fips && !$shlib)
9 {
10 $crypto="libeayfips32";
11 $crypto_compat = "libeaycompat32.lib";
12 }
13else
14 {
15 $crypto="libeay32";
16 }
17
18if ($fipscanisterbuild)
19 {
20 $fips_canister_path = "\$(LIB_D)\\fipscanister.lib";
21 }
8 22
9$o='\\'; 23$o='\\';
10$cp='$(PERL) util/copy.pl'; 24$cp='$(PERL) util/copy.pl';
11$mkdir='$(PERL) util/mkdir-p.pl'; 25$mkdir='$(PERL) util/mkdir-p.pl';
12$rm='del'; 26$rm='del /Q';
13 27
14$zlib_lib="zlib1.lib"; 28$zlib_lib="zlib1.lib";
15 29
@@ -96,7 +110,7 @@ else # Win32
96 $base_cflags=' /W3 /WX /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32'; 110 $base_cflags=' /W3 /WX /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32';
97 $base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE'; # shut up VC8 111 $base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE'; # shut up VC8
98 $base_cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE'; # shut up VC8 112 $base_cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE'; # shut up VC8
99 my $f = $shlib?' /MD':' /MT'; 113 my $f = $shlib || $fips ?' /MD':' /MT';
100 $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib 114 $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
101 $opt_cflags=$f.' /Ox /O2 /Ob2'; 115 $opt_cflags=$f.' /Ox /O2 /Ob2';
102 $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; 116 $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
@@ -165,12 +179,17 @@ if ($nasm) {
165 # pick newest version 179 # pick newest version
166 $asm=($ver gt $vew?"nasm":"nasmw")." -f win32"; 180 $asm=($ver gt $vew?"nasm":"nasmw")." -f win32";
167 $afile='-o '; 181 $afile='-o ';
182} elsif ($ml64) {
183 $asm='ml64 /c /Cp /Cx';
184 $asm.=' /Zi' if $debug;
185 $afile='/Fo';
168} else { 186} else {
169 $asm='ml /Cp /coff /c /Cx'; 187 $asm='ml /Cp /coff /c /Cx';
170 $asm.=" /Zi" if $debug; 188 $asm.=" /Zi" if $debug;
171 $afile='/Fo'; 189 $afile='/Fo';
172} 190}
173 191
192$aes_asm_obj='';
174$bn_asm_obj=''; 193$bn_asm_obj='';
175$bn_asm_src=''; 194$bn_asm_src='';
176$des_enc_obj=''; 195$des_enc_obj='';
@@ -179,11 +198,13 @@ $bf_enc_obj='';
179$bf_enc_src=''; 198$bf_enc_src='';
180 199
181if (!$no_asm) 200if (!$no_asm)
201 {
202 if ($FLAVOR =~ "WIN32")
182 { 203 {
183 $aes_asm_obj='crypto\aes\asm\a_win32.obj'; 204 $aes_asm_obj='crypto\aes\asm\a_win32.obj';
184 $aes_asm_src='crypto\aes\asm\a_win32.asm'; 205 $aes_asm_src='crypto\aes\asm\a_win32.asm';
185 $bn_asm_obj='crypto\bn\asm\bn_win32.obj'; 206 $bn_asm_obj='crypto\bn\asm\bn_win32.obj crypto\bn\asm\mt_win32.obj';
186 $bn_asm_src='crypto\bn\asm\bn_win32.asm'; 207 $bn_asm_src='crypto\bn\asm\bn_win32.asm crypto\bn\asm\mt_win32.asm';
187 $bnco_asm_obj='crypto\bn\asm\co_win32.obj'; 208 $bnco_asm_obj='crypto\bn\asm\co_win32.obj';
188 $bnco_asm_src='crypto\bn\asm\co_win32.asm'; 209 $bnco_asm_src='crypto\bn\asm\co_win32.asm';
189 $des_enc_obj='crypto\des\asm\d_win32.obj crypto\des\asm\y_win32.obj'; 210 $des_enc_obj='crypto\des\asm\d_win32.obj crypto\des\asm\y_win32.obj';
@@ -204,12 +225,26 @@ if (!$no_asm)
204 $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm'; 225 $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm';
205 $cpuid_asm_obj='crypto\cpu_win32.obj'; 226 $cpuid_asm_obj='crypto\cpu_win32.obj';
206 $cpuid_asm_src='crypto\cpu_win32.asm'; 227 $cpuid_asm_src='crypto\cpu_win32.asm';
207 $cflags.=" -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; 228 $cflags.=" -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DMD5_ASM -DSHA1_ASM -DRMD160_ASM";
208 } 229 }
230 elsif ($FLAVOR =~ "WIN64A")
231 {
232 $aes_asm_obj='$(OBJ_D)\aes-x86_64.obj';
233 $aes_asm_src='crypto\aes\asm\aes-x86_64.asm';
234 $bn_asm_obj='$(OBJ_D)\x86_64-mont.obj $(OBJ_D)\bn_asm.obj';
235 $bn_asm_src='crypto\bn\asm\x86_64-mont.asm';
236 $sha1_asm_obj='$(OBJ_D)\sha1-x86_64.obj $(OBJ_D)\sha256-x86_64.obj $(OBJ_D)\sha512-x86_64.obj';
237 $sha1_asm_src='crypto\sha\asm\sha1-x86_64.asm crypto\sha\asm\sha256-x86_64.asm crypto\sha\asm\sha512-x86_64.asm';
238 $cpuid_asm_obj='$(OBJ_D)\cpuid-x86_64.obj';
239 $cpuid_asm_src='crypto\cpuid-x86_64.asm';
240 $cflags.=" -DOPENSSL_CPUID_OBJ -DAES_ASM -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM";
241 }
242 }
209 243
210if ($shlib && $FLAVOR !~ /CE/) 244if ($shlib && $FLAVOR !~ /CE/)
211 { 245 {
212 $mlflags.=" $lflags /dll"; 246 $mlflags.=" $lflags /dll";
247# $cflags =~ s| /MD| /MT|;
213 $lib_cflag=" -D_WINDLL"; 248 $lib_cflag=" -D_WINDLL";
214 $out_def="out32dll"; 249 $out_def="out32dll";
215 $tmp_def="tmp32dll"; 250 $tmp_def="tmp32dll";
@@ -232,8 +267,8 @@ $(INCO_D)\applink.c: ms\applink.c
232EXHEADER= $(EXHEADER) $(INCO_D)\applink.c 267EXHEADER= $(EXHEADER) $(INCO_D)\applink.c
233 268
234LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj 269LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj
235CRYPTOOBJ=$(OBJ_D)\uplink.obj $(CRYPTOOBJ)
236___ 270___
271$banner .= "CRYPTOOBJ=\$(OBJ_D)\\uplink.obj \$(CRYPTOOBJ)\n";
237 $banner.=<<'___' if ($FLAVOR =~ /WIN64/); 272 $banner.=<<'___' if ($FLAVOR =~ /WIN64/);
238CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ) 273CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ)
239___ 274___
@@ -250,26 +285,56 @@ $cflags.=" /Fd$out_def";
250 285
251sub do_lib_rule 286sub do_lib_rule
252 { 287 {
253 local($objs,$target,$name,$shlib)=@_; 288 my($objs,$target,$name,$shlib,$ign,$base_addr) = @_;
254 local($ret); 289 local($ret);
255 290
256 $taget =~ s/\//$o/g if $o ne '/'; 291 $taget =~ s/\//$o/g if $o ne '/';
257 if ($name ne "") 292 my $base_arg;
293 if ($base_addr ne "")
294 {
295 $base_arg= " /base:$base_addr";
296 }
297 else
298 {
299 $base_arg = "";
300 }
301 if ($target =~ /O_CRYPTO/ && $fipsdso)
302 {
303 $name = "/def:ms/libeayfips.def";
304 }
305 elsif ($name ne "")
258 { 306 {
259 $name =~ tr/a-z/A-Z/; 307 $name =~ tr/a-z/A-Z/;
260 $name = "/def:ms/${name}.def"; 308 $name = "/def:ms/${name}.def";
261 } 309 }
262# $target="\$(LIB_D)$o$target"; 310# $target="\$(LIB_D)$o$target";
263 $ret.="$target: $objs\n"; 311# $ret.="$target: $objs\n";
264 if (!$shlib) 312 if (!$shlib)
265 { 313 {
266# $ret.="\t\$(RM) \$(O_$Name)\n"; 314# $ret.="\t\$(RM) \$(O_$Name)\n";
267 $ex =' '; 315 $ex =' ';
316 $ret.="$target: $objs\n";
268 $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs $ex\n<<\n"; 317 $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs $ex\n<<\n";
269 } 318 }
270 else 319 else
271 { 320 {
272 local($ex)=($target =~ /O_CRYPTO/)?'':' $(L_CRYPTO)'; 321 my $ex = "";
322 if ($target =~ /O_SSL/)
323 {
324 $ex .= " \$(L_CRYPTO)";
325 #$ex .= " \$(L_FIPS)" if $fipsdso;
326 }
327 my $fipstarget;
328 if ($fipsdso)
329 {
330 $fipstarget = "O_FIPS";
331 }
332 else
333 {
334 $fipstarget = "O_CRYPTO";
335 }
336
337
273 if ($name eq "") 338 if ($name eq "")
274 { 339 {
275 $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/); 340 $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
@@ -290,7 +355,39 @@ sub do_lib_rule
290 $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/); 355 $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
291 } 356 }
292 $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/; 357 $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/;
293 $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; 358
359 if ($fips && $target =~ /$fipstarget/)
360 {
361 $ex.= $mwex unless $fipscanisterbuild;
362 $ret.="$target: $objs \$(PREMAIN_DSO_EXE)";
363 if ($fipsdso)
364 {
365 $ex.=" \$(OBJ_D)\\\$(LIBFIPS).res";
366 $ret.=" \$(OBJ_D)\\\$(LIBFIPS).res";
367 $ret.=" ms/\$(LIBFIPS).def";
368 }
369 $ret.="\n\tSET FIPS_LINK=\$(LINK)\n";
370 $ret.="\tSET FIPS_CC=\$(CC)\n";
371 $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
372 $ret.="\tSET PREMAIN_DSO_EXE=\$(PREMAIN_DSO_EXE)\n";
373 $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
374 $ret.="\tSET FIPS_TARGET=$target\n";
375 $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
376 $ret.="\t\$(FIPSLINK) \$(MLFLAGS) /map $base_arg $efile$target ";
377 $ret.="$name @<<\n \$(SHLIB_EX_OBJ) $objs ";
378 $ret.="\$(OBJ_D)${o}fips_premain.obj $ex\n<<\n";
379 }
380 else
381 {
382 $ret.="$target: $objs";
383 if ($target =~ /O_CRYPTO/ && $fipsdso)
384 {
385 $ret .= " \$(O_FIPS)";
386 $ex .= " \$(L_FIPS)";
387 }
388 $ret.="\n\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
389 }
390
294 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;2\n\n"; 391 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;2\n\n";
295 } 392 }
296 $ret.="\n"; 393 $ret.="\n";
@@ -299,16 +396,64 @@ sub do_lib_rule
299 396
300sub do_link_rule 397sub do_link_rule
301 { 398 {
302 local($target,$files,$dep_libs,$libs)=@_; 399 my($target,$files,$dep_libs,$libs,$standalone)=@_;
303 local($ret,$_); 400 local($ret,$_);
304
305 $file =~ s/\//$o/g if $o ne '/'; 401 $file =~ s/\//$o/g if $o ne '/';
306 $n=&bname($targer); 402 $n=&bname($targer);
307 $ret.="$target: $files $dep_libs\n"; 403 $ret.="$target: $files $dep_libs\n";
308 $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n"; 404 if ($standalone == 1)
309 $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; 405 {
310 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;1\n\n"; 406 $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n\t";
407 $ret.= "$mwex advapi32.lib " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild);
408 $ret.="$files $libs\n<<\n";
409 }
410 elsif ($standalone == 2)
411 {
412 $ret.="\tSET FIPS_LINK=\$(LINK)\n";
413 $ret.="\tSET FIPS_CC=\$(CC)\n";
414 $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
415 $ret.="\tSET PREMAIN_DSO_EXE=\n";
416 $ret.="\tSET FIPS_TARGET=$target\n";
417 $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
418 $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
419 $ret.="\t\$(FIPSLINK) \$(LFLAGS) /map $efile$target @<<\n";
420 $ret.="\t\$(APP_EX_OBJ) $files \$(OBJ_D)${o}fips_premain.obj $libs\n<<\n";
421 }
422 else
423 {
424 $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n";
425 $ret.="\t\$(APP_EX_OBJ) $files $libs\n<<\n";
426 }
427 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;1\n\n";
311 return($ret); 428 return($ret);
312 } 429 }
313 430
431sub do_rlink_rule
432 {
433 local($target,$rl_start, $rl_mid, $rl_end,$dep_libs,$libs)=@_;
434 local($ret,$_);
435 my $files = "$rl_start $rl_mid $rl_end";
436
437 $file =~ s/\//$o/g if $o ne '/';
438 $n=&bname($targer);
439 $ret.="$target: $files $dep_libs \$(FIPS_SHA1_EXE)\n";
440 $ret.="\t\$(PERL) ms\\segrenam.pl \$\$a $rl_start\n";
441 $ret.="\t\$(PERL) ms\\segrenam.pl \$\$b $rl_mid\n";
442 $ret.="\t\$(PERL) ms\\segrenam.pl \$\$c $rl_end\n";
443 $ret.="\t\$(MKLIB) $lfile$target @<<\n\t$files\n<<\n";
444 $ret.="\t\$(FIPS_SHA1_EXE) $target > ${target}.sha1\n";
445 $ret.="\t\$(PERL) util${o}copy.pl -stripcr fips${o}fips_premain.c \$(LIB_D)${o}fips_premain.c\n";
446 $ret.="\t\$(CP) fips${o}fips_premain.c.sha1 \$(LIB_D)${o}fips_premain.c.sha1\n";
447 $ret.="\n";
448 return($ret);
449 }
450
451sub do_sdef_rule
452 {
453 my $ret = "ms/\$(LIBFIPS).def: \$(O_FIPSCANISTER)\n";
454 $ret.="\t\$(PERL) util/mksdef.pl \$(MLFLAGS) /out:dummy.dll /def:ms/libeay32.def @<<\n \$(O_FIPSCANISTER)\n<<\n";
455 $ret.="\n";
456 return $ret;
457 }
458
3141; 4591;
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c
index 514292a03e..4116fd12f1 100644
--- a/src/lib/libssl/ssl_ciph.c
+++ b/src/lib/libssl/ssl_ciph.c
@@ -115,7 +115,10 @@
115 */ 115 */
116#include <stdio.h> 116#include <stdio.h>
117#include <openssl/objects.h> 117#include <openssl/objects.h>
118#ifndef OPENSSL_NO_COMP
118#include <openssl/comp.h> 119#include <openssl/comp.h>
120#endif
121
119#include "ssl_locl.h" 122#include "ssl_locl.h"
120 123
121#define SSL_ENC_DES_IDX 0 124#define SSL_ENC_DES_IDX 0
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 735db39713..ed4ddbbae6 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -124,7 +124,9 @@
124#include "e_os.h" 124#include "e_os.h"
125 125
126#include <openssl/buffer.h> 126#include <openssl/buffer.h>
127#ifndef OPENSSL_NO_COMP
127#include <openssl/comp.h> 128#include <openssl/comp.h>
129#endif
128#include <openssl/bio.h> 130#include <openssl/bio.h>
129#include <openssl/stack.h> 131#include <openssl/stack.h>
130#ifndef OPENSSL_NO_RSA 132#ifndef OPENSSL_NO_RSA
@@ -500,6 +502,7 @@ typedef struct ssl3_enc_method
500 int (*alert_value)(int); 502 int (*alert_value)(int);
501 } SSL3_ENC_METHOD; 503 } SSL3_ENC_METHOD;
502 504
505#ifndef OPENSSL_NO_COMP
503/* Used for holding the relevant compression methods loaded into SSL_CTX */ 506/* Used for holding the relevant compression methods loaded into SSL_CTX */
504typedef struct ssl3_comp_st 507typedef struct ssl3_comp_st
505 { 508 {
@@ -507,6 +510,7 @@ typedef struct ssl3_comp_st
507 char *name; /* Text name used for the compression type */ 510 char *name; /* Text name used for the compression type */
508 COMP_METHOD *method; /* The method :-) */ 511 COMP_METHOD *method; /* The method :-) */
509 } SSL3_COMP; 512 } SSL3_COMP;
513#endif
510 514
511extern SSL3_ENC_METHOD ssl3_undef_enc_method; 515extern SSL3_ENC_METHOD ssl3_undef_enc_method;
512OPENSSL_EXTERN SSL_CIPHER ssl2_ciphers[]; 516OPENSSL_EXTERN SSL_CIPHER ssl2_ciphers[];
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c
index 3c4dec76d7..7cb3e29a41 100644
--- a/src/lib/libssl/t1_enc.c
+++ b/src/lib/libssl/t1_enc.c
@@ -111,10 +111,15 @@
111 111
112#include <stdio.h> 112#include <stdio.h>
113#include "ssl_locl.h" 113#include "ssl_locl.h"
114#ifndef OPENSSL_NO_COMP
114#include <openssl/comp.h> 115#include <openssl/comp.h>
116#endif
115#include <openssl/evp.h> 117#include <openssl/evp.h>
116#include <openssl/hmac.h> 118#include <openssl/hmac.h>
117#include <openssl/md5.h> 119#include <openssl/md5.h>
120#ifdef KSSL_DEBUG
121#include <openssl/des.h>
122#endif
118 123
119static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec, 124static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
120 int sec_len, unsigned char *seed, int seed_len, 125 int sec_len, unsigned char *seed, int seed_len,
@@ -251,15 +256,15 @@ int tls1_change_cipher_state(SSL *s, int which)
251#ifdef KSSL_DEBUG 256#ifdef KSSL_DEBUG
252 printf("tls1_change_cipher_state(which= %d) w/\n", which); 257 printf("tls1_change_cipher_state(which= %d) w/\n", which);
253 printf("\talg= %ld, comp= %p\n", s->s3->tmp.new_cipher->algorithms, 258 printf("\talg= %ld, comp= %p\n", s->s3->tmp.new_cipher->algorithms,
254 comp); 259 (void *)comp);
255 printf("\tevp_cipher == %p ==? &d_cbc_ede_cipher3\n", c); 260 printf("\tevp_cipher == %p ==? &d_cbc_ede_cipher3\n", (void *)c);
256 printf("\tevp_cipher: nid, blksz= %d, %d, keylen=%d, ivlen=%d\n", 261 printf("\tevp_cipher: nid, blksz= %d, %d, keylen=%d, ivlen=%d\n",
257 c->nid,c->block_size,c->key_len,c->iv_len); 262 c->nid,c->block_size,c->key_len,c->iv_len);
258 printf("\tkey_block: len= %d, data= ", s->s3->tmp.key_block_length); 263 printf("\tkey_block: len= %d, data= ", s->s3->tmp.key_block_length);
259 { 264 {
260 int i; 265 int ki;
261 for (i=0; i<s->s3->tmp.key_block_length; i++) 266 for (ki=0; ki<s->s3->tmp.key_block_length; ki++)
262 printf("%02x", key_block[i]); printf("\n"); 267 printf("%02x", key_block[ki]); printf("\n");
263 } 268 }
264#endif /* KSSL_DEBUG */ 269#endif /* KSSL_DEBUG */
265 270
@@ -415,11 +420,13 @@ printf("which = %04X\nmac key=",which);
415 s->session->key_arg_length=0; 420 s->session->key_arg_length=0;
416#ifdef KSSL_DEBUG 421#ifdef KSSL_DEBUG
417 { 422 {
418 int i; 423 int ki;
419 printf("EVP_CipherInit_ex(dd,c,key=,iv=,which)\n"); 424 printf("EVP_CipherInit_ex(dd,c,key=,iv=,which)\n");
420 printf("\tkey= "); for (i=0; i<c->key_len; i++) printf("%02x", key[i]); 425 printf("\tkey= ");
426 for (ki=0; ki<c->key_len; ki++) printf("%02x", key[ki]);
421 printf("\n"); 427 printf("\n");
422 printf("\t iv= "); for (i=0; i<c->iv_len; i++) printf("%02x", iv[i]); 428 printf("\t iv= ");
429 for (ki=0; ki<c->iv_len; ki++) printf("%02x", iv[ki]);
423 printf("\n"); 430 printf("\n");
424 } 431 }
425#endif /* KSSL_DEBUG */ 432#endif /* KSSL_DEBUG */
@@ -592,10 +599,11 @@ int tls1_enc(SSL *s, int send)
592 { 599 {
593 unsigned long ui; 600 unsigned long ui;
594 printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n", 601 printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n",
595 ds,rec->data,rec->input,l); 602 (void *)ds,rec->data,rec->input,l);
596 printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%d %d], %d iv_len\n", 603 printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%ld %ld], %d iv_len\n",
597 ds->buf_len, ds->cipher->key_len, 604 ds->buf_len, ds->cipher->key_len,
598 DES_KEY_SZ, DES_SCHEDULE_SZ, 605 (unsigned long)DES_KEY_SZ,
606 (unsigned long)DES_SCHEDULE_SZ,
599 ds->cipher->iv_len); 607 ds->cipher->iv_len);
600 printf("\t\tIV: "); 608 printf("\t\tIV: ");
601 for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]); 609 for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]);
@@ -620,10 +628,10 @@ int tls1_enc(SSL *s, int send)
620 628
621#ifdef KSSL_DEBUG 629#ifdef KSSL_DEBUG
622 { 630 {
623 unsigned long i; 631 unsigned long ki;
624 printf("\trec->data="); 632 printf("\trec->data=");
625 for (i=0; i<l; i++) 633 for (ki=0; ki<l; i++)
626 printf(" %02x", rec->data[i]); printf("\n"); 634 printf(" %02x", rec->data[ki]); printf("\n");
627 } 635 }
628#endif /* KSSL_DEBUG */ 636#endif /* KSSL_DEBUG */
629 637
@@ -807,7 +815,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
807 unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH]; 815 unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH];
808 816
809#ifdef KSSL_DEBUG 817#ifdef KSSL_DEBUG
810 printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", s,out, p,len); 818 printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", (void *)s,out, p,len);
811#endif /* KSSL_DEBUG */ 819#endif /* KSSL_DEBUG */
812 820
813 /* Setup the stuff to munge */ 821 /* Setup the stuff to munge */
diff --git a/src/lib/libssl/test/Makefile b/src/lib/libssl/test/Makefile
index 3e58351cb9..73d64440b1 100644
--- a/src/lib/libssl/test/Makefile
+++ b/src/lib/libssl/test/Makefile
@@ -5,7 +5,7 @@
5DIR= test 5DIR= test
6TOP= .. 6TOP= ..
7CC= cc 7CC= cc
8INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES) 8INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES) -I$(TOP)/fips
9CFLAG= -g 9CFLAG= -g
10MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) 10MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
11PERL= perl 11PERL= perl
@@ -27,6 +27,7 @@ DLIBCRYPTO= ../libcrypto.a
27DLIBSSL= ../libssl.a 27DLIBSSL= ../libssl.a
28LIBCRYPTO= -L.. -lcrypto 28LIBCRYPTO= -L.. -lcrypto
29LIBSSL= -L.. -lssl 29LIBSSL= -L.. -lssl
30LIBFIPS= -L.. -lfips
30 31
31BNTEST= bntest 32BNTEST= bntest
32ECTEST= ectest 33ECTEST= ectest
@@ -59,6 +60,18 @@ RSATEST= rsa_test
59ENGINETEST= enginetest 60ENGINETEST= enginetest
60EVPTEST= evp_test 61EVPTEST= evp_test
61IGETEST= igetest 62IGETEST= igetest
63FIPS_SHATEST= fips_shatest
64FIPS_DESTEST= fips_desmovs
65FIPS_RANDTEST= fips_randtest
66FIPS_AESTEST= fips_aesavs
67FIPS_HMACTEST= fips_hmactest
68FIPS_RSAVTEST= fips_rsavtest
69FIPS_RSASTEST= fips_rsastest
70FIPS_RSAGTEST= fips_rsagtest
71FIPS_DSATEST= fips_dsatest
72FIPS_DSSVS= fips_dssvs
73FIPS_RNGVS= fips_rngvs
74FIPS_TEST_SUITE=fips_test_suite
62 75
63TESTS= alltests 76TESTS= alltests
64 77
@@ -69,7 +82,13 @@ EXE= $(BNTEST)$(EXE_EXT) $(ECTEST)$(EXE_EXT) $(ECDSATEST)$(EXE_EXT) $(ECDHTEST)
69 $(MDC2TEST)$(EXE_EXT) $(RMDTEST)$(EXE_EXT) \ 82 $(MDC2TEST)$(EXE_EXT) $(RMDTEST)$(EXE_EXT) \
70 $(RANDTEST)$(EXE_EXT) $(DHTEST)$(EXE_EXT) $(ENGINETEST)$(EXE_EXT) \ 83 $(RANDTEST)$(EXE_EXT) $(DHTEST)$(EXE_EXT) $(ENGINETEST)$(EXE_EXT) \
71 $(BFTEST)$(EXE_EXT) $(CASTTEST)$(EXE_EXT) $(SSLTEST)$(EXE_EXT) $(EXPTEST)$(EXE_EXT) $(DSATEST)$(EXE_EXT) $(RSATEST)$(EXE_EXT) \ 84 $(BFTEST)$(EXE_EXT) $(CASTTEST)$(EXE_EXT) $(SSLTEST)$(EXE_EXT) $(EXPTEST)$(EXE_EXT) $(DSATEST)$(EXE_EXT) $(RSATEST)$(EXE_EXT) \
72 $(EVPTEST)$(EXE_EXT) $(IGETEST)$(EXE_EXT) 85 $(EVPTEST)$(EXE_EXT) $(IGETEST)$(EXE_EXT) \
86 $(FIPS_SHATEST)$(EXE_EXT) $(FIPS_DESTEST)$(EXE_EXT) \
87 $(FIPS_RANDTEST)$(EXE_EXT) $(FIPS_AESTEST)$(EXE_EXT) \
88 $(FIPS_HMACTEST)$(EXE_EXT) $(FIPS_RSAVTEST)$(EXE_EXT) \
89 $(FIPS_RSASTEST)$(EXE_EXT) $(FIPS_RSAGTEST)$(EXE_EXT) \
90 $(FIPS_DSSVS)$(EXE_EXT) $(FIPS_DSATEST)$(EXE_EXT) \
91 $(FIPS_RNGVS)$(EXE_EXT) $(FIPS_TEST_SUITE)$(EXE_EXT) jpaketest$(EXE_EXT)
73 92
74# $(METHTEST)$(EXE_EXT) 93# $(METHTEST)$(EXE_EXT)
75 94
@@ -81,7 +100,13 @@ OBJ= $(BNTEST).o $(ECTEST).o $(ECDSATEST).o $(ECDHTEST).o $(IDEATEST).o \
81 $(MDC2TEST).o $(RMDTEST).o \ 100 $(MDC2TEST).o $(RMDTEST).o \
82 $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \ 101 $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \
83 $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o \ 102 $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o \
84 $(EVPTEST).o $(IGETEST).o 103 $(EVPTEST).o $(IGETEST).o \
104 $(FIPS_SHATEST).o $(FIPS_DESTEST).o $(FIPS_RANDTEST).o \
105 $(FIPS_AESTEST).o $(FIPS_HMACTEST).o $(FIPS_RSAVTEST).o \
106 $(FIPS_RSASTEST).o $(FIPS_RSAGTEST).o \
107 $(FIPS_DSSVS).o $(FIPS_DSATEST).o $(FIPS_RNGVS).o $(FIPS_TEST_SUITE).o \
108 jpaketest.o
109
85SRC= $(BNTEST).c $(ECTEST).c $(ECDSATEST).c $(ECDHTEST).c $(IDEATEST).c \ 110SRC= $(BNTEST).c $(ECTEST).c $(ECDSATEST).c $(ECDHTEST).c $(IDEATEST).c \
86 $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ 111 $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \
87 $(HMACTEST).c \ 112 $(HMACTEST).c \
@@ -89,7 +114,12 @@ SRC= $(BNTEST).c $(ECTEST).c $(ECDSATEST).c $(ECDHTEST).c $(IDEATEST).c \
89 $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ 114 $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \
90 $(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \ 115 $(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \
91 $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c \ 116 $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c \
92 $(EVPTEST).c $(IGETEST).c 117 $(EVPTEST).c $(IGETEST).c \
118 $(FIPS_SHATEST).c $(FIPS_DESTEST).c $(FIPS_RANDTEST).c \
119 $(FIPS_AESTEST).c $(FIPS_HMACTEST).c $(FIPS_RSAVTEST).c \
120 $(FIPS_RSASTEST).c $(FIPS_RSAGTEST).c \
121 $(FIPS_DSSVS).c $(FIPS_DSATEST).c $(FIPS_RNGVS).c $(FIPS_TEST_SUITE).c \
122 jpaketest.c
93 123
94EXHEADER= 124EXHEADER=
95HEADER= $(EXHEADER) 125HEADER= $(EXHEADER)
@@ -131,7 +161,7 @@ alltests: \
131 test_rand test_bn test_ec test_ecdsa test_ecdh \ 161 test_rand test_bn test_ec test_ecdsa test_ecdh \
132 test_enc test_x509 test_rsa test_crl test_sid \ 162 test_enc test_x509 test_rsa test_crl test_sid \
133 test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ 163 test_gen test_req test_pkcs7 test_verify test_dh test_dsa \
134 test_ss test_ca test_engine test_evp test_ssl test_ige 164 test_ss test_ca test_engine test_evp test_ssl test_ige test_jpake
135 165
136test_evp: 166test_evp:
137 ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt 167 ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
@@ -147,6 +177,9 @@ test_sha:
147 ../util/shlib_wrap.sh ./$(SHA1TEST) 177 ../util/shlib_wrap.sh ./$(SHA1TEST)
148 ../util/shlib_wrap.sh ./$(SHA256TEST) 178 ../util/shlib_wrap.sh ./$(SHA256TEST)
149 ../util/shlib_wrap.sh ./$(SHA512TEST) 179 ../util/shlib_wrap.sh ./$(SHA512TEST)
180 if [ -n "$(FIPSCANLIB)" ]; then \
181 ../util/shlib_wrap.sh ./$(FIPS_SHATEST) < SHAmix.r | diff -w SHAmix.x - ; \
182 fi
150 183
151test_mdc2: 184test_mdc2:
152 ../util/shlib_wrap.sh ./$(MDC2TEST) 185 ../util/shlib_wrap.sh ./$(MDC2TEST)
@@ -183,6 +216,9 @@ test_rc5:
183 216
184test_rand: 217test_rand:
185 ../util/shlib_wrap.sh ./$(RANDTEST) 218 ../util/shlib_wrap.sh ./$(RANDTEST)
219 if [ -n "$(FIPSCANLIB)" ]; then \
220 ../util/shlib_wrap.sh ./$(FIPS_RANDTEST); \
221 fi
186 222
187test_enc: 223test_enc:
188 sh ./testenc 224 sh ./testenc
@@ -247,6 +283,9 @@ test_dsa:
247 @echo "Generate a set of DSA parameters" 283 @echo "Generate a set of DSA parameters"
248 ../util/shlib_wrap.sh ./$(DSATEST) 284 ../util/shlib_wrap.sh ./$(DSATEST)
249 ../util/shlib_wrap.sh ./$(DSATEST) -app2_1 285 ../util/shlib_wrap.sh ./$(DSATEST) -app2_1
286 if [ -n "$(FIPSCANLIB)" ]; then \
287 ../util/shlib_wrap.sh ./$(FIPS_DSATEST); \
288 fi
250 289
251test_gen: 290test_gen:
252 @echo "Generate and verify a certificate request" 291 @echo "Generate and verify a certificate request"
@@ -266,6 +305,9 @@ test_engine:
266test_ssl: keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \ 305test_ssl: keyU.ss certU.ss certCA.ss certP1.ss keyP1.ss certP2.ss keyP2.ss \
267 intP1.ss intP2.ss 306 intP1.ss intP2.ss
268 @echo "test SSL protocol" 307 @echo "test SSL protocol"
308 @if [ -n "$(FIPSCANLIB)" ]; then \
309 sh ./testfipsssl keyU.ss certU.ss certCA.ss; \
310 fi
269 ../util/shlib_wrap.sh ./$(SSLTEST) -test_cipherlist 311 ../util/shlib_wrap.sh ./$(SSLTEST) -test_cipherlist
270 @sh ./testssl keyU.ss certU.ss certCA.ss 312 @sh ./testssl keyU.ss certU.ss certCA.ss
271 @sh ./testsslproxy keyP1.ss certP1.ss intP1.ss 313 @sh ./testsslproxy keyP1.ss certP1.ss intP1.ss
@@ -287,6 +329,10 @@ test_ige: $(IGETEST)$(EXE_EXT)
287 @echo "Test IGE mode" 329 @echo "Test IGE mode"
288 ../util/shlib_wrap.sh ./$(IGETEST) 330 ../util/shlib_wrap.sh ./$(IGETEST)
289 331
332test_jpake: jpaketest$(EXE_EXT)
333 @echo "Test JPAKE"
334 ../util/shlib_wrap.sh ./jpaketest
335
290lint: 336lint:
291 lint -DLINT $(INCLUDES) $(SRC)>fluff 337 lint -DLINT $(INCLUDES) $(SRC)>fluff
292 338
@@ -302,7 +348,7 @@ dclean:
302 mv -f Makefile.new $(MAKEFILE) 348 mv -f Makefile.new $(MAKEFILE)
303 349
304clean: 350clean:
305 rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss *.srl log 351 rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss *.srl log dummytest
306 352
307$(DLIBSSL): 353$(DLIBSSL):
308 (cd ..; $(MAKE) DIRS=ssl all) 354 (cd ..; $(MAKE) DIRS=ssl all)
@@ -314,6 +360,7 @@ BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
314 shlib_target="$(SHLIB_TARGET)"; \ 360 shlib_target="$(SHLIB_TARGET)"; \
315 fi; \ 361 fi; \
316 LIBRARIES="$(LIBSSL) $(LIBCRYPTO) $(LIBKRB5)"; \ 362 LIBRARIES="$(LIBSSL) $(LIBCRYPTO) $(LIBKRB5)"; \
363 [ "$(FIPSCANLIB)" = "libfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
317 $(MAKE) -f $(TOP)/Makefile.shared -e \ 364 $(MAKE) -f $(TOP)/Makefile.shared -e \
318 APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \ 365 APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
319 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \ 366 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
@@ -349,6 +396,69 @@ $(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
349$(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO) 396$(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
350 @target=$(SHA512TEST); $(BUILD_CMD) 397 @target=$(SHA512TEST); $(BUILD_CMD)
351 398
399FIPS_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
400 shlib_target="$(SHLIB_TARGET)"; \
401 fi; \
402 if [ "$(FIPSCANLIB)" = "libfips" ]; then \
403 LIBRARIES="-L$(TOP) -lfips"; \
404 elif [ -n "$(FIPSCANLIB)" ]; then \
405 FIPSLD_CC=$(CC); CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
406 LIBRARIES="$${FIPSLIBDIR:-$(TOP)/fips/}fipscanister.o"; \
407 fi; \
408 $(MAKE) -f $(TOP)/Makefile.shared -e \
409 CC=$${CC} APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
410 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
411 link_app.$${shlib_target}
412
413FIPS_CRYPTO_BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
414 shlib_target="$(SHLIB_TARGET)"; \
415 fi; \
416 LIBRARIES="$(LIBSSL) $(LIBCRYPTO) $(LIBKRB5)"; \
417 if [ -z "$(SHARED_LIBS)" -a -n "$(FIPSCANLIB)" ] ; then \
418 FIPSLD_CC=$(CC); CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
419 fi; \
420 [ "$(FIPSCANLIB)" = "libfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
421 $(MAKE) -f $(TOP)/Makefile.shared -e \
422 CC=$${CC} APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
423 LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
424 link_app.$${shlib_target}
425
426$(FIPS_SHATEST)$(EXE_EXT): $(FIPS_SHATEST).o $(DLIBCRYPTO)
427 @target=$(FIPS_SHATEST); $(FIPS_BUILD_CMD)
428
429$(FIPS_AESTEST)$(EXE_EXT): $(FIPS_AESTEST).o $(DLIBCRYPTO)
430 @target=$(FIPS_AESTEST); $(FIPS_BUILD_CMD)
431
432$(FIPS_DESTEST)$(EXE_EXT): $(FIPS_DESTEST).o $(DLIBCRYPTO)
433 @target=$(FIPS_DESTEST); $(FIPS_BUILD_CMD)
434
435$(FIPS_HMACTEST)$(EXE_EXT): $(FIPS_HMACTEST).o $(DLIBCRYPTO)
436 @target=$(FIPS_HMACTEST); $(FIPS_BUILD_CMD)
437
438$(FIPS_RANDTEST)$(EXE_EXT): $(FIPS_RANDTEST).o $(DLIBCRYPTO)
439 @target=$(FIPS_RANDTEST); $(FIPS_BUILD_CMD)
440
441$(FIPS_RSAVTEST)$(EXE_EXT): $(FIPS_RSAVTEST).o $(DLIBCRYPTO)
442 @target=$(FIPS_RSAVTEST); $(FIPS_BUILD_CMD)
443
444$(FIPS_RSASTEST)$(EXE_EXT): $(FIPS_RSASTEST).o $(DLIBCRYPTO)
445 @target=$(FIPS_RSASTEST); $(FIPS_BUILD_CMD)
446
447$(FIPS_RSAGTEST)$(EXE_EXT): $(FIPS_RSAGTEST).o $(DLIBCRYPTO)
448 @target=$(FIPS_RSAGTEST); $(FIPS_BUILD_CMD)
449
450$(FIPS_DSATEST)$(EXE_EXT): $(FIPS_DSATEST).o $(DLIBCRYPTO)
451 @target=$(FIPS_DSATEST); $(FIPS_BUILD_CMD)
452
453$(FIPS_DSSVS)$(EXE_EXT): $(FIPS_DSSVS).o $(DLIBCRYPTO)
454 @target=$(FIPS_DSSVS); $(FIPS_BUILD_CMD)
455
456$(FIPS_RNGVS)$(EXE_EXT): $(FIPS_RNGVS).o $(DLIBCRYPTO)
457 @target=$(FIPS_RNGVS); $(FIPS_BUILD_CMD)
458
459$(FIPS_TEST_SUITE)$(EXE_EXT): $(FIPS_TEST_SUITE).o $(DLIBCRYPTO)
460 @target=$(FIPS_TEST_SUITE); $(FIPS_BUILD_CMD)
461
352$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO) 462$(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
353 @target=$(RMDTEST); $(BUILD_CMD) 463 @target=$(RMDTEST); $(BUILD_CMD)
354 464
@@ -395,7 +505,7 @@ $(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO)
395 @target=$(METHTEST); $(BUILD_CMD) 505 @target=$(METHTEST); $(BUILD_CMD)
396 506
397$(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) 507$(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
398 @target=$(SSLTEST); $(BUILD_CMD) 508 @target=$(SSLTEST); $(FIPS_CRYPTO_BUILD_CMD)
399 509
400$(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO) 510$(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO)
401 @target=$(ENGINETEST); $(BUILD_CMD) 511 @target=$(ENGINETEST); $(BUILD_CMD)
@@ -412,6 +522,9 @@ $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
412$(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO) 522$(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO)
413 @target=$(IGETEST); $(BUILD_CMD) 523 @target=$(IGETEST); $(BUILD_CMD)
414 524
525jpaketest$(EXE_EXT): jpaketest.o $(DLIBCRYPTO)
526 @target=jpaketest; $(BUILD_CMD)
527
415#$(AESTEST).o: $(AESTEST).c 528#$(AESTEST).o: $(AESTEST).c
416# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c 529# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
417 530
@@ -435,14 +548,15 @@ bntest.o: ../include/openssl/crypto.h ../include/openssl/dh.h
435bntest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h 548bntest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
436bntest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 549bntest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
437bntest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h 550bntest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
438bntest.o: ../include/openssl/evp.h ../include/openssl/lhash.h 551bntest.o: ../include/openssl/evp.h ../include/openssl/fips.h
439bntest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 552bntest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
440bntest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 553bntest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
441bntest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 554bntest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
442bntest.o: ../include/openssl/rand.h ../include/openssl/rsa.h 555bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
443bntest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 556bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
444bntest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 557bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h
445bntest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h bntest.c 558bntest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
559bntest.o: ../include/openssl/x509_vfy.h bntest.c
446casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h 560casttest.o: ../e_os.h ../include/openssl/cast.h ../include/openssl/e_os2.h
447casttest.o: ../include/openssl/opensslconf.h casttest.c 561casttest.o: ../include/openssl/opensslconf.h casttest.c
448destest.o: ../include/openssl/des.h ../include/openssl/des_old.h 562destest.o: ../include/openssl/des.h ../include/openssl/des_old.h
@@ -481,53 +595,54 @@ ecdsatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
481ecdsatest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 595ecdsatest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
482ecdsatest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 596ecdsatest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
483ecdsatest.o: ../include/openssl/err.h ../include/openssl/evp.h 597ecdsatest.o: ../include/openssl/err.h ../include/openssl/evp.h
484ecdsatest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 598ecdsatest.o: ../include/openssl/fips.h ../include/openssl/lhash.h
485ecdsatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 599ecdsatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
486ecdsatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 600ecdsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
487ecdsatest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 601ecdsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
488ecdsatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 602ecdsatest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
489ecdsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 603ecdsatest.o: ../include/openssl/sha.h ../include/openssl/stack.h
490ecdsatest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 604ecdsatest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
491ecdsatest.o: ecdsatest.c 605ecdsatest.o: ../include/openssl/x509_vfy.h ecdsatest.c
492ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 606ectest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
493ectest.o: ../include/openssl/bn.h ../include/openssl/buffer.h 607ectest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
494ectest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 608ectest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
495ectest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 609ectest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
496ectest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 610ectest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
497ectest.o: ../include/openssl/err.h ../include/openssl/evp.h 611ectest.o: ../include/openssl/err.h ../include/openssl/evp.h
498ectest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 612ectest.o: ../include/openssl/fips.h ../include/openssl/lhash.h
499ectest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 613ectest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
500ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 614ectest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
501ectest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h 615ectest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
502ectest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 616ectest.o: ../include/openssl/rand.h ../include/openssl/safestack.h
503ectest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 617ectest.o: ../include/openssl/sha.h ../include/openssl/stack.h
504ectest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ectest.c 618ectest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
619ectest.o: ../include/openssl/x509_vfy.h ectest.c
505enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h 620enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h
506enginetest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h 621enginetest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
507enginetest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 622enginetest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
508enginetest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 623enginetest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
509enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h 624enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h
510enginetest.o: ../include/openssl/evp.h ../include/openssl/lhash.h 625enginetest.o: ../include/openssl/evp.h ../include/openssl/fips.h
511enginetest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 626enginetest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
512enginetest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 627enginetest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
513enginetest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h 628enginetest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
514enginetest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 629enginetest.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
515enginetest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 630enginetest.o: ../include/openssl/sha.h ../include/openssl/stack.h
516enginetest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h 631enginetest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
517enginetest.o: enginetest.c 632enginetest.o: ../include/openssl/x509_vfy.h enginetest.c
518evp_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 633evp_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
519evp_test.o: ../include/openssl/buffer.h ../include/openssl/conf.h 634evp_test.o: ../include/openssl/buffer.h ../include/openssl/conf.h
520evp_test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 635evp_test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
521evp_test.o: ../include/openssl/ec.h ../include/openssl/ecdh.h 636evp_test.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
522evp_test.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h 637evp_test.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
523evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h 638evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h
524evp_test.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h 639evp_test.o: ../include/openssl/fips.h ../include/openssl/lhash.h
525evp_test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 640evp_test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
526evp_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 641evp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
527evp_test.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h 642evp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
528evp_test.o: ../include/openssl/sha.h ../include/openssl/stack.h 643evp_test.o: ../include/openssl/safestack.h ../include/openssl/sha.h
529evp_test.o: ../include/openssl/symhacks.h ../include/openssl/x509.h 644evp_test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
530evp_test.o: ../include/openssl/x509_vfy.h evp_test.c 645evp_test.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h evp_test.c
531exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h 646exptest.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/bn.h
532exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 647exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
533exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h 648exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h
@@ -535,40 +650,220 @@ exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
535exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h 650exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
536exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h 651exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
537exptest.o: ../include/openssl/symhacks.h exptest.c 652exptest.o: ../include/openssl/symhacks.h exptest.c
653fips_aesavs.o: ../e_os.h ../fips/fips_utl.h ../include/openssl/aes.h
654fips_aesavs.o: ../include/openssl/asn1.h ../include/openssl/bio.h
655fips_aesavs.o: ../include/openssl/bn.h ../include/openssl/crypto.h
656fips_aesavs.o: ../include/openssl/e_os2.h ../include/openssl/err.h
657fips_aesavs.o: ../include/openssl/evp.h ../include/openssl/fips.h
658fips_aesavs.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
659fips_aesavs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
660fips_aesavs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
661fips_aesavs.o: ../include/openssl/safestack.h ../include/openssl/stack.h
662fips_aesavs.o: ../include/openssl/symhacks.h fips_aesavs.c
663fips_desmovs.o: ../e_os.h ../fips/fips_utl.h ../include/openssl/asn1.h
664fips_desmovs.o: ../include/openssl/bio.h ../include/openssl/bn.h
665fips_desmovs.o: ../include/openssl/crypto.h ../include/openssl/des.h
666fips_desmovs.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h
667fips_desmovs.o: ../include/openssl/err.h ../include/openssl/evp.h
668fips_desmovs.o: ../include/openssl/fips.h ../include/openssl/lhash.h
669fips_desmovs.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
670fips_desmovs.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
671fips_desmovs.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
672fips_desmovs.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
673fips_desmovs.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
674fips_desmovs.o: fips_desmovs.c
675fips_dsatest.o: ../e_os.h ../fips/fips_utl.h ../include/openssl/asn1.h
676fips_dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h
677fips_dsatest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
678fips_dsatest.o: ../include/openssl/des.h ../include/openssl/des_old.h
679fips_dsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
680fips_dsatest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
681fips_dsatest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
682fips_dsatest.o: ../include/openssl/err.h ../include/openssl/evp.h
683fips_dsatest.o: ../include/openssl/fips.h ../include/openssl/fips_rand.h
684fips_dsatest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
685fips_dsatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
686fips_dsatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
687fips_dsatest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
688fips_dsatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
689fips_dsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
690fips_dsatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
691fips_dsatest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
692fips_dsatest.o: fips_dsatest.c
693fips_dssvs.o: ../fips/fips_utl.h ../include/openssl/asn1.h
694fips_dssvs.o: ../include/openssl/bio.h ../include/openssl/bn.h
695fips_dssvs.o: ../include/openssl/crypto.h ../include/openssl/dsa.h
696fips_dssvs.o: ../include/openssl/e_os2.h ../include/openssl/err.h
697fips_dssvs.o: ../include/openssl/evp.h ../include/openssl/fips.h
698fips_dssvs.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
699fips_dssvs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
700fips_dssvs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
701fips_dssvs.o: ../include/openssl/safestack.h ../include/openssl/stack.h
702fips_dssvs.o: ../include/openssl/symhacks.h fips_dssvs.c
703fips_hmactest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
704fips_hmactest.o: ../include/openssl/bio.h ../include/openssl/bn.h
705fips_hmactest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
706fips_hmactest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
707fips_hmactest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
708fips_hmactest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
709fips_hmactest.o: ../include/openssl/evp.h ../include/openssl/fips.h
710fips_hmactest.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
711fips_hmactest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
712fips_hmactest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
713fips_hmactest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
714fips_hmactest.o: ../include/openssl/safestack.h ../include/openssl/sha.h
715fips_hmactest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
716fips_hmactest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
717fips_hmactest.o: ../include/openssl/x509v3.h fips_hmactest.c
718fips_randtest.o: ../e_os.h ../fips/fips_utl.h ../include/openssl/bio.h
719fips_randtest.o: ../include/openssl/bn.h ../include/openssl/crypto.h
720fips_randtest.o: ../include/openssl/des.h ../include/openssl/des_old.h
721fips_randtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h
722fips_randtest.o: ../include/openssl/fips_rand.h ../include/openssl/lhash.h
723fips_randtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
724fips_randtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h
725fips_randtest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
726fips_randtest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
727fips_randtest.o: ../include/openssl/ui_compat.h fips_randtest.c
728fips_rngvs.o: ../fips/fips_utl.h ../include/openssl/asn1.h
729fips_rngvs.o: ../include/openssl/bio.h ../include/openssl/bn.h
730fips_rngvs.o: ../include/openssl/buffer.h ../include/openssl/conf.h
731fips_rngvs.o: ../include/openssl/crypto.h ../include/openssl/des.h
732fips_rngvs.o: ../include/openssl/des_old.h ../include/openssl/dsa.h
733fips_rngvs.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
734fips_rngvs.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
735fips_rngvs.o: ../include/openssl/err.h ../include/openssl/evp.h
736fips_rngvs.o: ../include/openssl/fips.h ../include/openssl/fips_rand.h
737fips_rngvs.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
738fips_rngvs.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
739fips_rngvs.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
740fips_rngvs.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
741fips_rngvs.o: ../include/openssl/safestack.h ../include/openssl/sha.h
742fips_rngvs.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
743fips_rngvs.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
744fips_rngvs.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
745fips_rngvs.o: ../include/openssl/x509v3.h fips_rngvs.c
746fips_rsagtest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
747fips_rsagtest.o: ../include/openssl/bio.h ../include/openssl/bn.h
748fips_rsagtest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
749fips_rsagtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
750fips_rsagtest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
751fips_rsagtest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
752fips_rsagtest.o: ../include/openssl/evp.h ../include/openssl/fips.h
753fips_rsagtest.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
754fips_rsagtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
755fips_rsagtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
756fips_rsagtest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
757fips_rsagtest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
758fips_rsagtest.o: ../include/openssl/sha.h ../include/openssl/stack.h
759fips_rsagtest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
760fips_rsagtest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
761fips_rsagtest.o: fips_rsagtest.c
762fips_rsastest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
763fips_rsastest.o: ../include/openssl/bio.h ../include/openssl/bn.h
764fips_rsastest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
765fips_rsastest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
766fips_rsastest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
767fips_rsastest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
768fips_rsastest.o: ../include/openssl/evp.h ../include/openssl/fips.h
769fips_rsastest.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
770fips_rsastest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
771fips_rsastest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
772fips_rsastest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
773fips_rsastest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
774fips_rsastest.o: ../include/openssl/sha.h ../include/openssl/stack.h
775fips_rsastest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
776fips_rsastest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
777fips_rsastest.o: fips_rsastest.c
778fips_rsavtest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
779fips_rsavtest.o: ../include/openssl/bio.h ../include/openssl/bn.h
780fips_rsavtest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
781fips_rsavtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
782fips_rsavtest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
783fips_rsavtest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
784fips_rsavtest.o: ../include/openssl/evp.h ../include/openssl/fips.h
785fips_rsavtest.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
786fips_rsavtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
787fips_rsavtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
788fips_rsavtest.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
789fips_rsavtest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
790fips_rsavtest.o: ../include/openssl/sha.h ../include/openssl/stack.h
791fips_rsavtest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
792fips_rsavtest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
793fips_rsavtest.o: fips_rsavtest.c
794fips_shatest.o: ../fips/fips_utl.h ../include/openssl/asn1.h
795fips_shatest.o: ../include/openssl/bio.h ../include/openssl/bn.h
796fips_shatest.o: ../include/openssl/buffer.h ../include/openssl/conf.h
797fips_shatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
798fips_shatest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
799fips_shatest.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
800fips_shatest.o: ../include/openssl/evp.h ../include/openssl/fips.h
801fips_shatest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
802fips_shatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
803fips_shatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
804fips_shatest.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
805fips_shatest.o: ../include/openssl/sha.h ../include/openssl/stack.h
806fips_shatest.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
807fips_shatest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h
808fips_shatest.o: fips_shatest.c
809fips_test_suite.o: ../fips/fips_utl.h ../include/openssl/aes.h
810fips_test_suite.o: ../include/openssl/asn1.h ../include/openssl/bio.h
811fips_test_suite.o: ../include/openssl/bn.h ../include/openssl/crypto.h
812fips_test_suite.o: ../include/openssl/des.h ../include/openssl/des_old.h
813fips_test_suite.o: ../include/openssl/dh.h ../include/openssl/dsa.h
814fips_test_suite.o: ../include/openssl/e_os2.h ../include/openssl/err.h
815fips_test_suite.o: ../include/openssl/evp.h ../include/openssl/fips.h
816fips_test_suite.o: ../include/openssl/hmac.h ../include/openssl/lhash.h
817fips_test_suite.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
818fips_test_suite.o: ../include/openssl/opensslconf.h
819fips_test_suite.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
820fips_test_suite.o: ../include/openssl/rand.h ../include/openssl/rsa.h
821fips_test_suite.o: ../include/openssl/safestack.h ../include/openssl/sha.h
822fips_test_suite.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
823fips_test_suite.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
824fips_test_suite.o: fips_test_suite.c
538hmactest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 825hmactest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
539hmactest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 826hmactest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
540hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h 827hmactest.o: ../include/openssl/evp.h ../include/openssl/fips.h
541hmactest.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h 828hmactest.o: ../include/openssl/hmac.h ../include/openssl/md5.h
542hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 829hmactest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
543hmactest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 830hmactest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
544hmactest.o: ../include/openssl/safestack.h ../include/openssl/stack.h 831hmactest.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
545hmactest.o: ../include/openssl/symhacks.h hmactest.c 832hmactest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h hmactest.c
546ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h 833ideatest.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/idea.h
547ideatest.o: ../include/openssl/opensslconf.h ideatest.c 834ideatest.o: ../include/openssl/opensslconf.h ideatest.c
548igetest.o: ../include/openssl/aes.h ../include/openssl/e_os2.h 835igetest.o: ../include/openssl/aes.h ../include/openssl/e_os2.h
549igetest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h 836igetest.o: ../include/openssl/opensslconf.h ../include/openssl/ossl_typ.h
550igetest.o: ../include/openssl/rand.h igetest.c 837igetest.o: ../include/openssl/rand.h igetest.c
838jpaketest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
839jpaketest.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
840jpaketest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
841jpaketest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
842jpaketest.o: ../include/openssl/symhacks.h jpaketest.c
551md2test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 843md2test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
552md2test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 844md2test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
553md2test.o: ../include/openssl/evp.h ../include/openssl/md2.h 845md2test.o: ../include/openssl/evp.h ../include/openssl/fips.h
554md2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 846md2test.o: ../include/openssl/md2.h ../include/openssl/obj_mac.h
555md2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 847md2test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
556md2test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 848md2test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
557md2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h md2test.c 849md2test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
850md2test.o: ../include/openssl/symhacks.h md2test.c
558md4test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 851md4test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
559md4test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 852md4test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
560md4test.o: ../include/openssl/evp.h ../include/openssl/md4.h 853md4test.o: ../include/openssl/evp.h ../include/openssl/fips.h
561md4test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 854md4test.o: ../include/openssl/md4.h ../include/openssl/obj_mac.h
562md4test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 855md4test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
563md4test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 856md4test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
564md4test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h md4test.c 857md4test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
858md4test.o: ../include/openssl/symhacks.h md4test.c
565md5test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 859md5test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
566md5test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 860md5test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
567md5test.o: ../include/openssl/evp.h ../include/openssl/md5.h 861md5test.o: ../include/openssl/evp.h ../include/openssl/fips.h
568md5test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 862md5test.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
569md5test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 863md5test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
570md5test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 864md5test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
571md5test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h md5test.c 865md5test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
866md5test.o: ../include/openssl/symhacks.h md5test.c
572mdc2test.o: ../include/openssl/buffer.h ../include/openssl/crypto.h 867mdc2test.o: ../include/openssl/buffer.h ../include/openssl/crypto.h
573mdc2test.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h 868mdc2test.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
574mdc2test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 869mdc2test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
@@ -589,11 +884,12 @@ rc5test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
589rc5test.o: ../include/openssl/symhacks.h rc5test.c 884rc5test.o: ../include/openssl/symhacks.h rc5test.c
590rmdtest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 885rmdtest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
591rmdtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 886rmdtest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
592rmdtest.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h 887rmdtest.o: ../include/openssl/evp.h ../include/openssl/fips.h
593rmdtest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 888rmdtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
594rmdtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 889rmdtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
595rmdtest.o: ../include/openssl/ripemd.h ../include/openssl/safestack.h 890rmdtest.o: ../include/openssl/ossl_typ.h ../include/openssl/ripemd.h
596rmdtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h rmdtest.c 891rmdtest.o: ../include/openssl/safestack.h ../include/openssl/stack.h
892rmdtest.o: ../include/openssl/symhacks.h rmdtest.c
597rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 893rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
598rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h 894rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h
599rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h 895rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/err.h
@@ -604,18 +900,20 @@ rsa_test.o: ../include/openssl/safestack.h ../include/openssl/stack.h
604rsa_test.o: ../include/openssl/symhacks.h rsa_test.c 900rsa_test.o: ../include/openssl/symhacks.h rsa_test.c
605sha1test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 901sha1test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
606sha1test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 902sha1test.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
607sha1test.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h 903sha1test.o: ../include/openssl/evp.h ../include/openssl/fips.h
608sha1test.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 904sha1test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
609sha1test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 905sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
610sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h 906sha1test.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
611sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h sha1test.c 907sha1test.o: ../include/openssl/sha.h ../include/openssl/stack.h
908sha1test.o: ../include/openssl/symhacks.h sha1test.c
612shatest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 909shatest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
613shatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 910shatest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
614shatest.o: ../include/openssl/evp.h ../include/openssl/obj_mac.h 911shatest.o: ../include/openssl/evp.h ../include/openssl/fips.h
615shatest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h 912shatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
616shatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h 913shatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
617shatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 914shatest.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
618shatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h shatest.c 915shatest.o: ../include/openssl/sha.h ../include/openssl/stack.h
916shatest.o: ../include/openssl/symhacks.h shatest.c
619ssltest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h 917ssltest.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
620ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h 918ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h
621ssltest.o: ../include/openssl/comp.h ../include/openssl/conf.h 919ssltest.o: ../include/openssl/comp.h ../include/openssl/conf.h
@@ -624,17 +922,18 @@ ssltest.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
624ssltest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h 922ssltest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
625ssltest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h 923ssltest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
626ssltest.o: ../include/openssl/engine.h ../include/openssl/err.h 924ssltest.o: ../include/openssl/engine.h ../include/openssl/err.h
627ssltest.o: ../include/openssl/evp.h ../include/openssl/hmac.h 925ssltest.o: ../include/openssl/evp.h ../include/openssl/fips.h
628ssltest.o: ../include/openssl/kssl.h ../include/openssl/lhash.h 926ssltest.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
629ssltest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h 927ssltest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
630ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h 928ssltest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
631ssltest.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h 929ssltest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
632ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h 930ssltest.o: ../include/openssl/pem.h ../include/openssl/pem2.h
633ssltest.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h 931ssltest.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
634ssltest.o: ../include/openssl/rand.h ../include/openssl/rsa.h 932ssltest.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
635ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h 933ssltest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
636ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h 934ssltest.o: ../include/openssl/sha.h ../include/openssl/ssl.h
637ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h 935ssltest.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
638ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h 936ssltest.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
639ssltest.o: ../include/openssl/tls1.h ../include/openssl/x509.h 937ssltest.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
640ssltest.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h ssltest.c 938ssltest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
939ssltest.o: ../include/openssl/x509v3.h ssltest.c
diff --git a/src/lib/libssl/test/tests.com b/src/lib/libssl/test/tests.com
index 056082e7fe..88a33d0531 100644
--- a/src/lib/libssl/test/tests.com
+++ b/src/lib/libssl/test/tests.com
@@ -25,7 +25,7 @@ $ tests := -
25 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,- 25 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,-
26 test_enc,test_x509,test_rsa,test_crl,test_sid,- 26 test_enc,test_x509,test_rsa,test_crl,test_sid,-
27 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- 27 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
28 test_ss,test_ca,test_engine,test_evp,test_ssl 28 test_ss,test_ca,test_engine,test_evp,test_ssl,test_ige,test_jpake
29$ endif 29$ endif
30$ tests = f$edit(tests,"COLLAPSE") 30$ tests = f$edit(tests,"COLLAPSE")
31$ 31$
@@ -57,6 +57,8 @@ $ SSLTEST := ssltest
57$ RSATEST := rsa_test 57$ RSATEST := rsa_test
58$ ENGINETEST := enginetest 58$ ENGINETEST := enginetest
59$ EVPTEST := evp_test 59$ EVPTEST := evp_test
60$ IGETEST := igetest
61$ JPAKETEST := jpaketest
60$ 62$
61$ tests_i = 0 63$ tests_i = 0
62$ loop_tests: 64$ loop_tests:
@@ -250,6 +252,14 @@ $ test_rd:
250$ write sys$output "test Rijndael" 252$ write sys$output "test Rijndael"
251$ !mcr 'texe_dir''rdtest' 253$ !mcr 'texe_dir''rdtest'
252$ return 254$ return
255$ test_ige:
256$ write sys$output "Test IGE mode"
257$ mcr 'texe_dir''igetest'
258$ return
259$ test_jpake:
260$ write sys$output "Test JPAKE"
261$ mcr 'texe_dir''jpaketest'
262$ return
253$ 263$
254$ 264$
255$ exit: 265$ exit: