summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2014-07-10 22:45:58 +0000
committerjsing <>2014-07-10 22:45:58 +0000
commitc8e58b52150f7c13e3281d122ed2c3ff38b6a1d5 (patch)
tree9101caa8789c6a2612e96fe7996efbe84f28f5a9
parent81b6b7632b2207a2dbd7b6d803912ee3779176aa (diff)
downloadopenbsd-c8e58b52150f7c13e3281d122ed2c3ff38b6a1d5.tar.gz
openbsd-c8e58b52150f7c13e3281d122ed2c3ff38b6a1d5.tar.bz2
openbsd-c8e58b52150f7c13e3281d122ed2c3ff38b6a1d5.zip
Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers.
-rw-r--r--src/lib/libcrypto/asn1/ameth_lib.c4
-rw-r--r--src/lib/libcrypto/asn1/asn1_err.c5
-rw-r--r--src/lib/libcrypto/asn1/d2i_pr.c5
-rw-r--r--src/lib/libcrypto/asn1/d2i_pu.c5
-rw-r--r--src/lib/libcrypto/asn1/i2d_pu.c5
-rw-r--r--src/lib/libcrypto/asn1/n_pkey.c4
-rw-r--r--src/lib/libcrypto/asn1/t_req.c5
-rw-r--r--src/lib/libcrypto/asn1/t_spki.c5
-rw-r--r--src/lib/libcrypto/asn1/t_x509.c5
-rw-r--r--src/lib/libcrypto/asn1/x_crl.c5
-rw-r--r--src/lib/libcrypto/asn1/x_pubkey.c5
-rw-r--r--src/lib/libcrypto/asn1/x_x509.c5
-rw-r--r--src/lib/libcrypto/bio/bio_err.c5
-rw-r--r--src/lib/libcrypto/bio/bss_dgram.c4
-rw-r--r--src/lib/libcrypto/bio/bss_fd.c4
-rw-r--r--src/lib/libcrypto/bn/bn_asm.c7
-rw-r--r--src/lib/libcrypto/bn/bn_blind.c5
-rw-r--r--src/lib/libcrypto/bn/bn_ctx.c4
-rw-r--r--src/lib/libcrypto/bn/bn_depr.c5
-rw-r--r--src/lib/libcrypto/bn/bn_div.c5
-rw-r--r--src/lib/libcrypto/bn/bn_err.c5
-rw-r--r--src/lib/libcrypto/bn/bn_gf2m.c5
-rw-r--r--src/lib/libcrypto/bn/bn_lcl.h4
-rw-r--r--src/lib/libcrypto/bn/bn_lib.c4
-rw-r--r--src/lib/libcrypto/bn/bn_mul.c4
-rw-r--r--src/lib/libcrypto/bn/bn_print.c10
-rw-r--r--src/lib/libcrypto/buffer/buf_err.c5
-rw-r--r--src/lib/libcrypto/camellia/camellia.c8
-rw-r--r--src/lib/libcrypto/cast/cast.h6
-rw-r--r--src/lib/libcrypto/cms/cms.h6
-rw-r--r--src/lib/libcrypto/cms/cms_cd.c4
-rw-r--r--src/lib/libcrypto/cms/cms_err.c7
-rw-r--r--src/lib/libcrypto/comp/comp_err.c7
-rw-r--r--src/lib/libcrypto/conf/conf_err.c7
-rw-r--r--src/lib/libcrypto/conf/conf_mall.c5
-rw-r--r--src/lib/libcrypto/conf/conf_sap.c5
-rw-r--r--src/lib/libcrypto/cpt_err.c5
-rw-r--r--src/lib/libcrypto/cryptlib.c4
-rw-r--r--src/lib/libcrypto/crypto.h9
-rw-r--r--src/lib/libcrypto/des/des_locl.h5
-rw-r--r--src/lib/libcrypto/des/enc_read.c5
-rw-r--r--src/lib/libcrypto/des/enc_writ.c7
-rw-r--r--src/lib/libcrypto/dh/dh_depr.c6
-rw-r--r--src/lib/libcrypto/dh/dh_err.c5
-rw-r--r--src/lib/libcrypto/dh/dh_lib.c5
-rw-r--r--src/lib/libcrypto/dsa/dsa_ameth.c5
-rw-r--r--src/lib/libcrypto/dsa/dsa_depr.c9
-rw-r--r--src/lib/libcrypto/dsa/dsa_err.c5
-rw-r--r--src/lib/libcrypto/dsa/dsa_key.c5
-rw-r--r--src/lib/libcrypto/dsa/dsa_lib.c5
-rw-r--r--src/lib/libcrypto/dso/dso_err.c5
-rw-r--r--src/lib/libcrypto/ec/ec2_mult.c4
-rw-r--r--src/lib/libcrypto/ec/ec2_oct.c4
-rw-r--r--src/lib/libcrypto/ec/ec2_smpl.c4
-rw-r--r--src/lib/libcrypto/ec/ec_ameth.c5
-rw-r--r--src/lib/libcrypto/ec/ec_asn1.c6
-rw-r--r--src/lib/libcrypto/ec/ec_curve.c5
-rw-r--r--src/lib/libcrypto/ec/ec_cvt.c5
-rw-r--r--src/lib/libcrypto/ec/ec_err.c5
-rw-r--r--src/lib/libcrypto/ec/ec_key.c5
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c4
-rw-r--r--src/lib/libcrypto/ec/ec_oct.c4
-rw-r--r--src/lib/libcrypto/ec/eck_prn.c4
-rw-r--r--src/lib/libcrypto/ec/ecp_nistp224.c9
-rw-r--r--src/lib/libcrypto/ec/ecp_nistp256.c9
-rw-r--r--src/lib/libcrypto/ec/ecp_nistp521.c9
-rw-r--r--src/lib/libcrypto/ec/ecp_nistputil.c6
-rw-r--r--src/lib/libcrypto/ecdh/ech_err.c5
-rw-r--r--src/lib/libcrypto/ecdh/ech_lib.c7
-rw-r--r--src/lib/libcrypto/ecdh/ech_ossl.c7
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_err.c5
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_lib.c5
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_ossl.c4
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_sign.c4
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_vrf.c4
-rw-r--r--src/lib/libcrypto/engine/eng_aesni.c6
-rw-r--r--src/lib/libcrypto/engine/eng_all.c4
-rw-r--r--src/lib/libcrypto/engine/eng_err.c5
-rw-r--r--src/lib/libcrypto/engine/eng_fat.c4
-rw-r--r--src/lib/libcrypto/engine/eng_int.h3
-rw-r--r--src/lib/libcrypto/engine/eng_list.c4
-rw-r--r--src/lib/libcrypto/engine/eng_openssl.c4
-rw-r--r--src/lib/libcrypto/engine/eng_padlock.c4
-rw-r--r--src/lib/libcrypto/engine/eng_rsax.c5
-rw-r--r--src/lib/libcrypto/err/err.c7
-rw-r--r--src/lib/libcrypto/err/err_all.c5
-rw-r--r--src/lib/libcrypto/evp/c_all.c4
-rw-r--r--src/lib/libcrypto/evp/c_allc.c5
-rw-r--r--src/lib/libcrypto/evp/c_alld.c5
-rw-r--r--src/lib/libcrypto/evp/digest.c4
-rw-r--r--src/lib/libcrypto/evp/e_aes.c15
-rw-r--r--src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c6
-rw-r--r--src/lib/libcrypto/evp/e_bf.c5
-rw-r--r--src/lib/libcrypto/evp/e_camellia.c8
-rw-r--r--src/lib/libcrypto/evp/e_cast.c5
-rw-r--r--src/lib/libcrypto/evp/e_chacha.c4
-rw-r--r--src/lib/libcrypto/evp/e_chacha20poly1305.c8
-rw-r--r--src/lib/libcrypto/evp/e_des.c5
-rw-r--r--src/lib/libcrypto/evp/e_des3.c4
-rw-r--r--src/lib/libcrypto/evp/e_idea.c5
-rw-r--r--src/lib/libcrypto/evp/e_old.c4
-rw-r--r--src/lib/libcrypto/evp/e_rc2.c5
-rw-r--r--src/lib/libcrypto/evp/e_rc4.c5
-rw-r--r--src/lib/libcrypto/evp/e_rc4_hmac_md5.c6
-rw-r--r--src/lib/libcrypto/evp/e_rc5.c5
-rw-r--r--src/lib/libcrypto/evp/e_xcbc_d.c4
-rw-r--r--src/lib/libcrypto/evp/evp_enc.c4
-rw-r--r--src/lib/libcrypto/evp/evp_err.c5
-rw-r--r--src/lib/libcrypto/evp/evp_pbe.c4
-rw-r--r--src/lib/libcrypto/evp/m_dss.c5
-rw-r--r--src/lib/libcrypto/evp/m_dss1.c5
-rw-r--r--src/lib/libcrypto/evp/m_ecdsa.c5
-rw-r--r--src/lib/libcrypto/evp/m_md4.c5
-rw-r--r--src/lib/libcrypto/evp/m_md5.c5
-rw-r--r--src/lib/libcrypto/evp/m_mdc2.c5
-rw-r--r--src/lib/libcrypto/evp/m_ripemd.c5
-rw-r--r--src/lib/libcrypto/evp/m_sha.c5
-rw-r--r--src/lib/libcrypto/evp/m_sha1.c5
-rw-r--r--src/lib/libcrypto/evp/m_wp.c5
-rw-r--r--src/lib/libcrypto/evp/p5_crpt2.c4
-rw-r--r--src/lib/libcrypto/evp/p_dec.c5
-rw-r--r--src/lib/libcrypto/evp/p_enc.c5
-rw-r--r--src/lib/libcrypto/evp/p_lib.c5
-rw-r--r--src/lib/libcrypto/evp/p_open.c5
-rw-r--r--src/lib/libcrypto/evp/p_seal.c5
-rw-r--r--src/lib/libcrypto/evp/pmeth_lib.c4
-rw-r--r--src/lib/libcrypto/lhash/lh_stats.c5
-rw-r--r--src/lib/libcrypto/lhash/lhash.c5
-rw-r--r--src/lib/libcrypto/md32_common.h4
-rw-r--r--src/lib/libcrypto/md4/md4.h6
-rw-r--r--src/lib/libcrypto/md5/md5.h6
-rw-r--r--src/lib/libcrypto/mdc2/mdc2.h4
-rw-r--r--src/lib/libcrypto/modes/modes_lcl.h6
-rw-r--r--src/lib/libcrypto/objects/obj_dat.c4
-rw-r--r--src/lib/libcrypto/objects/obj_err.c5
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_err.c5
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_lib.c4
-rw-r--r--src/lib/libcrypto/pem/pem_all.c5
-rw-r--r--src/lib/libcrypto/pem/pem_err.c5
-rw-r--r--src/lib/libcrypto/pem/pem_info.c4
-rw-r--r--src/lib/libcrypto/pem/pem_lib.c4
-rw-r--r--src/lib/libcrypto/pem/pem_pkey.c4
-rw-r--r--src/lib/libcrypto/pem/pem_seal.c3
-rw-r--r--src/lib/libcrypto/pem/pvkfmt.c4
-rw-r--r--src/lib/libcrypto/pkcs12/p12_mutl.c4
-rw-r--r--src/lib/libcrypto/pkcs12/pk12err.c5
-rw-r--r--src/lib/libcrypto/pkcs7/pkcs7err.c5
-rw-r--r--src/lib/libcrypto/rand/rand.h6
-rw-r--r--src/lib/libcrypto/rand/rand_err.c5
-rw-r--r--src/lib/libcrypto/rand/rand_lib.c5
-rw-r--r--src/lib/libcrypto/rc2/rc2.h3
-rw-r--r--src/lib/libcrypto/rc4/rc4.h3
-rw-r--r--src/lib/libcrypto/rc5/rc5_locl.h4
-rw-r--r--src/lib/libcrypto/ripemd/ripemd.h6
-rw-r--r--src/lib/libcrypto/rsa/rsa.h4
-rw-r--r--src/lib/libcrypto/rsa/rsa_ameth.c5
-rw-r--r--src/lib/libcrypto/rsa/rsa_crpt.c5
-rw-r--r--src/lib/libcrypto/rsa/rsa_depr.c5
-rw-r--r--src/lib/libcrypto/rsa/rsa_eay.c5
-rw-r--r--src/lib/libcrypto/rsa/rsa_err.c5
-rw-r--r--src/lib/libcrypto/rsa/rsa_lib.c5
-rw-r--r--src/lib/libcrypto/rsa/rsa_oaep.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_pmeth.c4
-rw-r--r--src/lib/libcrypto/sha/sha.h6
-rw-r--r--src/lib/libcrypto/sha/sha1_one.c5
-rw-r--r--src/lib/libcrypto/sha/sha1dgst.c6
-rw-r--r--src/lib/libcrypto/sha/sha256.c7
-rw-r--r--src/lib/libcrypto/sha/sha512.c12
-rw-r--r--src/lib/libcrypto/sha/sha_dgst.c7
-rw-r--r--src/lib/libcrypto/sha/sha_one.c7
-rw-r--r--src/lib/libcrypto/srp/srp.h4
-rw-r--r--src/lib/libcrypto/srp/srp_lib.c5
-rw-r--r--src/lib/libcrypto/srp/srp_vfy.c5
-rw-r--r--src/lib/libcrypto/store/str_err.c5
-rw-r--r--src/lib/libcrypto/store/str_lib.c5
-rw-r--r--src/lib/libcrypto/ts/ts.h3
-rw-r--r--src/lib/libcrypto/ts/ts_asn1.c4
-rw-r--r--src/lib/libcrypto/ts/ts_conf.c4
-rw-r--r--src/lib/libcrypto/ts/ts_err.c5
-rw-r--r--src/lib/libcrypto/txt_db/txt_db.h3
-rw-r--r--src/lib/libcrypto/ui/ui.h4
-rw-r--r--src/lib/libcrypto/ui/ui_err.c5
-rw-r--r--src/lib/libcrypto/whrlpool/whrlpool.h6
-rw-r--r--src/lib/libcrypto/x509/by_dir.c8
-rw-r--r--src/lib/libcrypto/x509/x509_cmp.c4
-rw-r--r--src/lib/libcrypto/x509/x509_err.c5
-rw-r--r--src/lib/libcrypto/x509/x509_req.c5
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.c4
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.h3
-rw-r--r--src/lib/libcrypto/x509/x_all.c5
-rw-r--r--src/lib/libcrypto/x509v3/ext_dat.h5
-rw-r--r--src/lib/libcrypto/x509v3/v3_addr.c4
-rw-r--r--src/lib/libcrypto/x509v3/v3_asid.c5
-rw-r--r--src/lib/libcrypto/x509v3/v3_ocsp.c4
-rw-r--r--src/lib/libcrypto/x509v3/v3_purp.c4
-rw-r--r--src/lib/libcrypto/x509v3/v3err.c5
-rw-r--r--src/lib/libcrypto/x509v3/x509v3.h4
-rw-r--r--src/lib/libssl/src/crypto/asn1/ameth_lib.c4
-rw-r--r--src/lib/libssl/src/crypto/asn1/asn1_err.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/d2i_pr.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/d2i_pu.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/i2d_pu.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/n_pkey.c4
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_req.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_spki.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/t_x509.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_crl.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_pubkey.c5
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_x509.c5
-rw-r--r--src/lib/libssl/src/crypto/bio/bio_err.c5
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_dgram.c4
-rw-r--r--src/lib/libssl/src/crypto/bio/bss_fd.c4
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_asm.c7
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_blind.c5
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_ctx.c4
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_depr.c5
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_div.c5
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_err.c5
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_gf2m.c5
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_lcl.h4
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_lib.c4
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_mul.c4
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_print.c10
-rw-r--r--src/lib/libssl/src/crypto/buffer/buf_err.c5
-rw-r--r--src/lib/libssl/src/crypto/camellia/camellia.c8
-rw-r--r--src/lib/libssl/src/crypto/cast/cast.h6
-rw-r--r--src/lib/libssl/src/crypto/cms/cms.h6
-rw-r--r--src/lib/libssl/src/crypto/cms/cms_cd.c4
-rw-r--r--src/lib/libssl/src/crypto/cms/cms_err.c7
-rw-r--r--src/lib/libssl/src/crypto/comp/comp_err.c7
-rw-r--r--src/lib/libssl/src/crypto/conf/conf_err.c7
-rw-r--r--src/lib/libssl/src/crypto/conf/conf_mall.c5
-rw-r--r--src/lib/libssl/src/crypto/conf/conf_sap.c5
-rw-r--r--src/lib/libssl/src/crypto/cpt_err.c5
-rw-r--r--src/lib/libssl/src/crypto/cryptlib.c4
-rw-r--r--src/lib/libssl/src/crypto/crypto.h9
-rw-r--r--src/lib/libssl/src/crypto/des/des_locl.h5
-rw-r--r--src/lib/libssl/src/crypto/des/enc_read.c5
-rw-r--r--src/lib/libssl/src/crypto/des/enc_writ.c7
-rw-r--r--src/lib/libssl/src/crypto/dh/dh_depr.c6
-rw-r--r--src/lib/libssl/src/crypto/dh/dh_err.c5
-rw-r--r--src/lib/libssl/src/crypto/dh/dh_lib.c5
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_ameth.c5
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_depr.c9
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_err.c5
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_key.c5
-rw-r--r--src/lib/libssl/src/crypto/dsa/dsa_lib.c5
-rw-r--r--src/lib/libssl/src/crypto/dso/dso_err.c5
-rw-r--r--src/lib/libssl/src/crypto/ec/ec2_mult.c4
-rw-r--r--src/lib/libssl/src/crypto/ec/ec2_oct.c4
-rw-r--r--src/lib/libssl/src/crypto/ec/ec2_smpl.c4
-rw-r--r--src/lib/libssl/src/crypto/ec/ec_ameth.c5
-rw-r--r--src/lib/libssl/src/crypto/ec/ec_asn1.c6
-rw-r--r--src/lib/libssl/src/crypto/ec/ec_curve.c5
-rw-r--r--src/lib/libssl/src/crypto/ec/ec_cvt.c5
-rw-r--r--src/lib/libssl/src/crypto/ec/ec_err.c5
-rw-r--r--src/lib/libssl/src/crypto/ec/ec_key.c5
-rw-r--r--src/lib/libssl/src/crypto/ec/ec_lib.c4
-rw-r--r--src/lib/libssl/src/crypto/ec/ec_oct.c4
-rw-r--r--src/lib/libssl/src/crypto/ec/eck_prn.c4
-rw-r--r--src/lib/libssl/src/crypto/ec/ecp_nistp224.c9
-rw-r--r--src/lib/libssl/src/crypto/ec/ecp_nistp256.c9
-rw-r--r--src/lib/libssl/src/crypto/ec/ecp_nistp521.c9
-rw-r--r--src/lib/libssl/src/crypto/ec/ecp_nistputil.c6
-rw-r--r--src/lib/libssl/src/crypto/ecdh/ech_err.c5
-rw-r--r--src/lib/libssl/src/crypto/ecdh/ech_lib.c7
-rw-r--r--src/lib/libssl/src/crypto/ecdh/ech_ossl.c7
-rw-r--r--src/lib/libssl/src/crypto/ecdsa/ecs_err.c5
-rw-r--r--src/lib/libssl/src/crypto/ecdsa/ecs_lib.c5
-rw-r--r--src/lib/libssl/src/crypto/ecdsa/ecs_ossl.c4
-rw-r--r--src/lib/libssl/src/crypto/ecdsa/ecs_sign.c4
-rw-r--r--src/lib/libssl/src/crypto/ecdsa/ecs_vrf.c4
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_aesni.c6
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_all.c4
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_err.c5
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_fat.c4
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_int.h3
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_list.c4
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_openssl.c4
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_padlock.c4
-rw-r--r--src/lib/libssl/src/crypto/engine/eng_rsax.c5
-rw-r--r--src/lib/libssl/src/crypto/err/err.c7
-rw-r--r--src/lib/libssl/src/crypto/err/err_all.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/c_all.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/c_allc.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/c_alld.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/digest.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/e_aes.c15
-rw-r--r--src/lib/libssl/src/crypto/evp/e_aes_cbc_hmac_sha1.c6
-rw-r--r--src/lib/libssl/src/crypto/evp/e_bf.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/e_camellia.c8
-rw-r--r--src/lib/libssl/src/crypto/evp/e_cast.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/e_chacha.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/e_chacha20poly1305.c8
-rw-r--r--src/lib/libssl/src/crypto/evp/e_des.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/e_des3.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/e_idea.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/e_old.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/e_rc2.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/e_rc4.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/e_rc4_hmac_md5.c6
-rw-r--r--src/lib/libssl/src/crypto/evp/e_rc5.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/e_xcbc_d.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_enc.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_err.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_pbe.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/m_dss.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/m_dss1.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/m_ecdsa.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/m_md4.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/m_md5.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/m_mdc2.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/m_ripemd.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/m_sha.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/m_sha1.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/m_wp.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/p5_crpt2.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/p_dec.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/p_enc.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/p_lib.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/p_open.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/p_seal.c5
-rw-r--r--src/lib/libssl/src/crypto/evp/pmeth_lib.c4
-rw-r--r--src/lib/libssl/src/crypto/lhash/lh_stats.c5
-rw-r--r--src/lib/libssl/src/crypto/lhash/lhash.c5
-rw-r--r--src/lib/libssl/src/crypto/md32_common.h4
-rw-r--r--src/lib/libssl/src/crypto/md4/md4.h6
-rw-r--r--src/lib/libssl/src/crypto/md5/md5.h6
-rw-r--r--src/lib/libssl/src/crypto/mdc2/mdc2.h4
-rw-r--r--src/lib/libssl/src/crypto/modes/modes_lcl.h6
-rw-r--r--src/lib/libssl/src/crypto/objects/obj_dat.c4
-rw-r--r--src/lib/libssl/src/crypto/objects/obj_err.c5
-rw-r--r--src/lib/libssl/src/crypto/ocsp/ocsp_err.c5
-rw-r--r--src/lib/libssl/src/crypto/ocsp/ocsp_lib.c4
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_all.c5
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_err.c5
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_info.c4
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_lib.c4
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_pkey.c4
-rw-r--r--src/lib/libssl/src/crypto/pem/pem_seal.c3
-rw-r--r--src/lib/libssl/src/crypto/pem/pvkfmt.c4
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/p12_mutl.c4
-rw-r--r--src/lib/libssl/src/crypto/pkcs12/pk12err.c5
-rw-r--r--src/lib/libssl/src/crypto/pkcs7/pkcs7err.c5
-rw-r--r--src/lib/libssl/src/crypto/rand/rand.h6
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_err.c5
-rw-r--r--src/lib/libssl/src/crypto/rand/rand_lib.c5
-rw-r--r--src/lib/libssl/src/crypto/rc2/rc2.h3
-rw-r--r--src/lib/libssl/src/crypto/rc4/rc4.h3
-rw-r--r--src/lib/libssl/src/crypto/rc5/rc5_locl.h4
-rw-r--r--src/lib/libssl/src/crypto/ripemd/ripemd.h6
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa.h4
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_ameth.c5
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_crpt.c5
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_depr.c5
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_eay.c5
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_err.c5
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_lib.c5
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_oaep.c4
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_pmeth.c4
-rw-r--r--src/lib/libssl/src/crypto/sha/sha.h6
-rw-r--r--src/lib/libssl/src/crypto/sha/sha1_one.c5
-rw-r--r--src/lib/libssl/src/crypto/sha/sha1dgst.c6
-rw-r--r--src/lib/libssl/src/crypto/sha/sha256.c7
-rw-r--r--src/lib/libssl/src/crypto/sha/sha512.c12
-rw-r--r--src/lib/libssl/src/crypto/sha/sha_dgst.c7
-rw-r--r--src/lib/libssl/src/crypto/sha/sha_one.c7
-rw-r--r--src/lib/libssl/src/crypto/srp/srp.h4
-rw-r--r--src/lib/libssl/src/crypto/srp/srp_lib.c5
-rw-r--r--src/lib/libssl/src/crypto/srp/srp_vfy.c5
-rw-r--r--src/lib/libssl/src/crypto/store/str_err.c5
-rw-r--r--src/lib/libssl/src/crypto/store/str_lib.c5
-rw-r--r--src/lib/libssl/src/crypto/ts/ts.h3
-rw-r--r--src/lib/libssl/src/crypto/ts/ts_asn1.c4
-rw-r--r--src/lib/libssl/src/crypto/ts/ts_conf.c4
-rw-r--r--src/lib/libssl/src/crypto/ts/ts_err.c5
-rw-r--r--src/lib/libssl/src/crypto/txt_db/txt_db.h3
-rw-r--r--src/lib/libssl/src/crypto/ui/ui.h4
-rw-r--r--src/lib/libssl/src/crypto/ui/ui_err.c5
-rw-r--r--src/lib/libssl/src/crypto/whrlpool/whrlpool.h6
-rw-r--r--src/lib/libssl/src/crypto/x509/by_dir.c8
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_cmp.c4
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_err.c5
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_req.c5
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_vfy.c4
-rw-r--r--src/lib/libssl/src/crypto/x509/x509_vfy.h3
-rw-r--r--src/lib/libssl/src/crypto/x509/x_all.c5
-rw-r--r--src/lib/libssl/src/crypto/x509v3/ext_dat.h5
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_addr.c4
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_asid.c5
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_ocsp.c4
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_purp.c4
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3err.c5
-rw-r--r--src/lib/libssl/src/crypto/x509v3/x509v3.h4
394 files changed, 1462 insertions, 550 deletions
diff --git a/src/lib/libcrypto/asn1/ameth_lib.c b/src/lib/libcrypto/asn1/ameth_lib.c
index 0c5edd5c62..43981277c4 100644
--- a/src/lib/libcrypto/asn1/ameth_lib.c
+++ b/src/lib/libcrypto/asn1/ameth_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ameth_lib.c,v 1.10 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: ameth_lib.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/asn1t.h> 65#include <openssl/asn1t.h>
64#include <openssl/x509.h> 66#include <openssl/x509.h>
diff --git a/src/lib/libcrypto/asn1/asn1_err.c b/src/lib/libcrypto/asn1/asn1_err.c
index 7afe894e7d..40b1ad8579 100644
--- a/src/lib/libcrypto/asn1/asn1_err.c
+++ b/src/lib/libcrypto/asn1/asn1_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_err.c,v 1.17 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: asn1_err.c,v 1.18 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/asn1.h> 66#include <openssl/asn1.h>
64 67
diff --git a/src/lib/libcrypto/asn1/d2i_pr.c b/src/lib/libcrypto/asn1/d2i_pr.c
index 0633b60d06..3e140c05f5 100644
--- a/src/lib/libcrypto/asn1/d2i_pr.c
+++ b/src/lib/libcrypto/asn1/d2i_pr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d2i_pr.c,v 1.10 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: d2i_pr.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/asn1/d2i_pu.c b/src/lib/libcrypto/asn1/d2i_pu.c
index 7f0ad0e1a4..4a9475b68e 100644
--- a/src/lib/libcrypto/asn1/d2i_pu.c
+++ b/src/lib/libcrypto/asn1/d2i_pu.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d2i_pu.c,v 1.10 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: d2i_pu.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/asn1/i2d_pu.c b/src/lib/libcrypto/asn1/i2d_pu.c
index 5b3e96ec96..0f0369f3a5 100644
--- a/src/lib/libcrypto/asn1/i2d_pu.c
+++ b/src/lib/libcrypto/asn1/i2d_pu.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: i2d_pu.c,v 1.8 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: i2d_pu.c,v 1.9 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c
index c9a507ca41..b2047bd586 100644
--- a/src/lib/libcrypto/asn1/n_pkey.c
+++ b/src/lib/libcrypto/asn1/n_pkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: n_pkey.c,v 1.19 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: n_pkey.c,v 1.20 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
64#include <openssl/rsa.h> 66#include <openssl/rsa.h>
diff --git a/src/lib/libcrypto/asn1/t_req.c b/src/lib/libcrypto/asn1/t_req.c
index e84d53399a..689df1e203 100644
--- a/src/lib/libcrypto/asn1/t_req.c
+++ b/src/lib/libcrypto/asn1/t_req.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_req.c,v 1.15 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: t_req.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/buffer.h> 64#include <openssl/buffer.h>
62#include <openssl/bn.h> 65#include <openssl/bn.h>
diff --git a/src/lib/libcrypto/asn1/t_spki.c b/src/lib/libcrypto/asn1/t_spki.c
index d6f86d1e2f..91d275ffc2 100644
--- a/src/lib/libcrypto/asn1/t_spki.c
+++ b/src/lib/libcrypto/asn1/t_spki.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_spki.c,v 1.9 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: t_spki.c,v 1.10 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/x509.h> 64#include <openssl/x509.h>
62#include <openssl/asn1.h> 65#include <openssl/asn1.h>
diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c
index b294ffc637..690015b1c1 100644
--- a/src/lib/libcrypto/asn1/t_x509.c
+++ b/src/lib/libcrypto/asn1/t_x509.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_x509.c,v 1.22 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: t_x509.c,v 1.23 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/buffer.h> 64#include <openssl/buffer.h>
62#include <openssl/bn.h> 65#include <openssl/bn.h>
diff --git a/src/lib/libcrypto/asn1/x_crl.c b/src/lib/libcrypto/asn1/x_crl.c
index eda938f626..13402a66c2 100644
--- a/src/lib/libcrypto/asn1/x_crl.c
+++ b/src/lib/libcrypto/asn1/x_crl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_crl.c,v 1.15 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: x_crl.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include "asn1_locl.h" 64#include "asn1_locl.h"
62#include <openssl/asn1t.h> 65#include <openssl/asn1t.h>
diff --git a/src/lib/libcrypto/asn1/x_pubkey.c b/src/lib/libcrypto/asn1/x_pubkey.c
index b308b3d445..f702bdbe97 100644
--- a/src/lib/libcrypto/asn1/x_pubkey.c
+++ b/src/lib/libcrypto/asn1/x_pubkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_pubkey.c,v 1.19 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: x_pubkey.c,v 1.20 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/asn1t.h> 64#include <openssl/asn1t.h>
62#include <openssl/x509.h> 65#include <openssl/x509.h>
diff --git a/src/lib/libcrypto/asn1/x_x509.c b/src/lib/libcrypto/asn1/x_x509.c
index 28f51f6873..43772f9ac1 100644
--- a/src/lib/libcrypto/asn1/x_x509.c
+++ b/src/lib/libcrypto/asn1/x_x509.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_x509.c,v 1.15 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: x_x509.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/evp.h> 64#include <openssl/evp.h>
62#include <openssl/asn1t.h> 65#include <openssl/asn1t.h>
diff --git a/src/lib/libcrypto/bio/bio_err.c b/src/lib/libcrypto/bio/bio_err.c
index 8307c1099f..80788585ba 100644
--- a/src/lib/libcrypto/bio/bio_err.c
+++ b/src/lib/libcrypto/bio/bio_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_err.c,v 1.15 2014/06/22 14:41:10 jsing Exp $ */ 1/* $OpenBSD: bio_err.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/bio.h> 66#include <openssl/bio.h>
64 67
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c
index d06406aebd..d56b71ba27 100644
--- a/src/lib/libcrypto/bio/bss_dgram.c
+++ b/src/lib/libcrypto/bio/bss_dgram.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_dgram.c,v 1.29 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bss_dgram.c,v 1.30 2014/07/10 22:45:56 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -67,6 +67,8 @@
67#include <string.h> 67#include <string.h>
68#include <unistd.h> 68#include <unistd.h>
69 69
70#include <openssl/opensslconf.h>
71
70#include "cryptlib.h" 72#include "cryptlib.h"
71#include <openssl/bio.h> 73#include <openssl/bio.h>
72 74
diff --git a/src/lib/libcrypto/bio/bss_fd.c b/src/lib/libcrypto/bio/bss_fd.c
index 60efde91c9..6e8e8d0815 100644
--- a/src/lib/libcrypto/bio/bss_fd.c
+++ b/src/lib/libcrypto/bio/bss_fd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_fd.c,v 1.15 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bss_fd.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -61,6 +61,8 @@
61#include <string.h> 61#include <string.h>
62#include <unistd.h> 62#include <unistd.h>
63 63
64#include <openssl/opensslconf.h>
65
64#include "cryptlib.h" 66#include "cryptlib.h"
65 67
66#if defined(OPENSSL_NO_POSIX_IO) 68#if defined(OPENSSL_NO_POSIX_IO)
diff --git a/src/lib/libcrypto/bn/bn_asm.c b/src/lib/libcrypto/bn/bn_asm.c
index d33919f0aa..01e03cc81f 100644
--- a/src/lib/libcrypto/bn/bn_asm.c
+++ b/src/lib/libcrypto/bn/bn_asm.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_asm.c,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_asm.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -61,8 +61,11 @@
61# define NDEBUG 61# define NDEBUG
62#endif 62#endif
63 63
64#include <stdio.h>
65#include <assert.h> 64#include <assert.h>
65#include <stdio.h>
66
67#include <openssl/opensslconf.h>
68
66#include "cryptlib.h" 69#include "cryptlib.h"
67#include "bn_lcl.h" 70#include "bn_lcl.h"
68 71
diff --git a/src/lib/libcrypto/bn/bn_blind.c b/src/lib/libcrypto/bn/bn_blind.c
index 6bcd8d0eca..2170181aae 100644
--- a/src/lib/libcrypto/bn/bn_blind.c
+++ b/src/lib/libcrypto/bn/bn_blind.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_blind.c,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_blind.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -110,6 +110,9 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113
114#include <openssl/opensslconf.h>
115
113#include "cryptlib.h" 116#include "cryptlib.h"
114#include "bn_lcl.h" 117#include "bn_lcl.h"
115 118
diff --git a/src/lib/libcrypto/bn/bn_ctx.c b/src/lib/libcrypto/bn/bn_ctx.c
index 95871258d9..d3384a0385 100644
--- a/src/lib/libcrypto/bn/bn_ctx.c
+++ b/src/lib/libcrypto/bn/bn_ctx.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_ctx.c,v 1.11 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bn_ctx.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Ulf Moeller for the OpenSSL project. */ 2/* Written by Ulf Moeller for the OpenSSL project. */
3/* ==================================================================== 3/* ====================================================================
4 * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved. 4 * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved.
@@ -64,6 +64,8 @@
64#include <stdio.h> 64#include <stdio.h>
65#include <string.h> 65#include <string.h>
66 66
67#include <openssl/opensslconf.h>
68
67#include "cryptlib.h" 69#include "cryptlib.h"
68#include "bn_lcl.h" 70#include "bn_lcl.h"
69 71
diff --git a/src/lib/libcrypto/bn/bn_depr.c b/src/lib/libcrypto/bn/bn_depr.c
index 83297f4a49..93af852aa5 100644
--- a/src/lib/libcrypto/bn/bn_depr.c
+++ b/src/lib/libcrypto/bn/bn_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_depr.c,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_depr.c,v 1.5 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <time.h> 60#include <time.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include "bn_lcl.h" 65#include "bn_lcl.h"
63#include <openssl/rand.h> 66#include <openssl/rand.h>
diff --git a/src/lib/libcrypto/bn/bn_div.c b/src/lib/libcrypto/bn/bn_div.c
index 2f45a412b4..40a3c1551d 100644
--- a/src/lib/libcrypto/bn/bn_div.c
+++ b/src/lib/libcrypto/bn/bn_div.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_div.c,v 1.20 2014/06/27 22:02:07 miod Exp $ */ 1/* $OpenBSD: bn_div.c,v 1.21 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <openssl/bn.h> 60#include <openssl/bn.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include "bn_lcl.h" 65#include "bn_lcl.h"
63 66
diff --git a/src/lib/libcrypto/bn/bn_err.c b/src/lib/libcrypto/bn/bn_err.c
index 032786b4e8..5a0f359d86 100644
--- a/src/lib/libcrypto/bn/bn_err.c
+++ b/src/lib/libcrypto/bn/bn_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_err.c,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_err.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/bn.h> 66#include <openssl/bn.h>
64 67
diff --git a/src/lib/libcrypto/bn/bn_gf2m.c b/src/lib/libcrypto/bn/bn_gf2m.c
index 7aa306c345..09d4bcc544 100644
--- a/src/lib/libcrypto/bn/bn_gf2m.c
+++ b/src/lib/libcrypto/bn/bn_gf2m.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_gf2m.c,v 1.13 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_gf2m.c,v 1.14 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -91,6 +91,9 @@
91#include <assert.h> 91#include <assert.h>
92#include <limits.h> 92#include <limits.h>
93#include <stdio.h> 93#include <stdio.h>
94
95#include <openssl/opensslconf.h>
96
94#include "cryptlib.h" 97#include "cryptlib.h"
95#include "bn_lcl.h" 98#include "bn_lcl.h"
96 99
diff --git a/src/lib/libcrypto/bn/bn_lcl.h b/src/lib/libcrypto/bn/bn_lcl.h
index f90402fb5b..2dab445a51 100644
--- a/src/lib/libcrypto/bn/bn_lcl.h
+++ b/src/lib/libcrypto/bn/bn_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_lcl.h,v 1.19 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_lcl.h,v 1.20 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -112,6 +112,8 @@
112#ifndef HEADER_BN_LCL_H 112#ifndef HEADER_BN_LCL_H
113#define HEADER_BN_LCL_H 113#define HEADER_BN_LCL_H
114 114
115#include <openssl/opensslconf.h>
116
115#include <openssl/bn.h> 117#include <openssl/bn.h>
116 118
117#ifdef __cplusplus 119#ifdef __cplusplus
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c
index a33cf99ddb..747cbb68a5 100644
--- a/src/lib/libcrypto/bn/bn_lib.c
+++ b/src/lib/libcrypto/bn/bn_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_lib.c,v 1.30 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bn_lib.c,v 1.31 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -66,6 +66,8 @@
66#include <stdio.h> 66#include <stdio.h>
67#include <string.h> 67#include <string.h>
68 68
69#include <openssl/opensslconf.h>
70
69#include "cryptlib.h" 71#include "cryptlib.h"
70#include "bn_lcl.h" 72#include "bn_lcl.h"
71 73
diff --git a/src/lib/libcrypto/bn/bn_mul.c b/src/lib/libcrypto/bn/bn_mul.c
index 721fac19b1..71bfe2d9ec 100644
--- a/src/lib/libcrypto/bn/bn_mul.c
+++ b/src/lib/libcrypto/bn/bn_mul.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mul.c,v 1.17 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bn_mul.c,v 1.18 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -65,6 +65,8 @@
65#include <stdio.h> 65#include <stdio.h>
66#include <string.h> 66#include <string.h>
67 67
68#include <openssl/opensslconf.h>
69
68#include "cryptlib.h" 70#include "cryptlib.h"
69#include "bn_lcl.h" 71#include "bn_lcl.h"
70 72
diff --git a/src/lib/libcrypto/bn/bn_print.c b/src/lib/libcrypto/bn/bn_print.c
index 6893d9af8b..db51887fbe 100644
--- a/src/lib/libcrypto/bn/bn_print.c
+++ b/src/lib/libcrypto/bn/bn_print.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_print.c,v 1.20 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_print.c,v 1.21 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,10 +56,14 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdio.h>
60#include <ctype.h> 59#include <ctype.h>
61#include "cryptlib.h" 60#include <stdio.h>
61
62#include <openssl/opensslconf.h>
63
62#include <openssl/buffer.h> 64#include <openssl/buffer.h>
65
66#include "cryptlib.h"
63#include "bn_lcl.h" 67#include "bn_lcl.h"
64 68
65static const char Hex[]="0123456789ABCDEF"; 69static const char Hex[]="0123456789ABCDEF";
diff --git a/src/lib/libcrypto/buffer/buf_err.c b/src/lib/libcrypto/buffer/buf_err.c
index c311588dca..8256e89843 100644
--- a/src/lib/libcrypto/buffer/buf_err.c
+++ b/src/lib/libcrypto/buffer/buf_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: buf_err.c,v 1.9 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: buf_err.c,v 1.10 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/buffer.h> 66#include <openssl/buffer.h>
64 67
diff --git a/src/lib/libcrypto/camellia/camellia.c b/src/lib/libcrypto/camellia/camellia.c
index 27ce0fbc87..f400bc9ff7 100644
--- a/src/lib/libcrypto/camellia/camellia.c
+++ b/src/lib/libcrypto/camellia/camellia.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: camellia.c,v 1.6 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: camellia.c,v 1.7 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . 3 * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) .
4 * ALL RIGHTS RESERVED. 4 * ALL RIGHTS RESERVED.
@@ -81,10 +81,12 @@
81 * words reasonable performance even with not so modern compilers. 81 * words reasonable performance even with not so modern compilers.
82 */ 82 */
83 83
84#include <stdlib.h>
85#include <string.h>
86#include <openssl/opensslconf.h>
87
84#include "camellia.h" 88#include "camellia.h"
85#include "cmll_locl.h" 89#include "cmll_locl.h"
86#include <string.h>
87#include <stdlib.h>
88 90
89/* 32-bit rotations */ 91/* 32-bit rotations */
90#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) 92#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
diff --git a/src/lib/libcrypto/cast/cast.h b/src/lib/libcrypto/cast/cast.h
index 4759d4c782..1043c7f24f 100644
--- a/src/lib/libcrypto/cast/cast.h
+++ b/src/lib/libcrypto/cast/cast.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cast.h,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cast.h,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,12 +59,12 @@
59#ifndef HEADER_CAST_H 59#ifndef HEADER_CAST_H
60#define HEADER_CAST_H 60#define HEADER_CAST_H
61 61
62#include <openssl/opensslconf.h>
63
62#ifdef __cplusplus 64#ifdef __cplusplus
63extern "C" { 65extern "C" {
64#endif 66#endif
65 67
66#include <openssl/opensslconf.h>
67
68#ifdef OPENSSL_NO_CAST 68#ifdef OPENSSL_NO_CAST
69#error CAST is disabled. 69#error CAST is disabled.
70#endif 70#endif
diff --git a/src/lib/libcrypto/cms/cms.h b/src/lib/libcrypto/cms/cms.h
index bacba68792..0e4aa6f9fc 100644
--- a/src/lib/libcrypto/cms/cms.h
+++ b/src/lib/libcrypto/cms/cms.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms.h,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cms.h,v 1.5 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -51,10 +51,11 @@
51 * ==================================================================== 51 * ====================================================================
52 */ 52 */
53 53
54
55#ifndef HEADER_CMS_H 54#ifndef HEADER_CMS_H
56#define HEADER_CMS_H 55#define HEADER_CMS_H
57 56
57#include <openssl/opensslconf.h>
58
58#include <openssl/x509.h> 59#include <openssl/x509.h>
59 60
60#ifdef OPENSSL_NO_CMS 61#ifdef OPENSSL_NO_CMS
@@ -65,7 +66,6 @@
65extern "C" { 66extern "C" {
66#endif 67#endif
67 68
68
69typedef struct CMS_ContentInfo_st CMS_ContentInfo; 69typedef struct CMS_ContentInfo_st CMS_ContentInfo;
70typedef struct CMS_SignerInfo_st CMS_SignerInfo; 70typedef struct CMS_SignerInfo_st CMS_SignerInfo;
71typedef struct CMS_CertificateChoices CMS_CertificateChoices; 71typedef struct CMS_CertificateChoices CMS_CertificateChoices;
diff --git a/src/lib/libcrypto/cms/cms_cd.c b/src/lib/libcrypto/cms/cms_cd.c
index 59c7224c05..2a67c5df30 100644
--- a/src/lib/libcrypto/cms/cms_cd.c
+++ b/src/lib/libcrypto/cms/cms_cd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_cd.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cms_cd.c,v 1.4 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -51,6 +51,8 @@
51 * ==================================================================== 51 * ====================================================================
52 */ 52 */
53 53
54#include <openssl/opensslconf.h>
55
54#include "cryptlib.h" 56#include "cryptlib.h"
55#include <openssl/asn1t.h> 57#include <openssl/asn1t.h>
56#include <openssl/pem.h> 58#include <openssl/pem.h>
diff --git a/src/lib/libcrypto/cms/cms_err.c b/src/lib/libcrypto/cms/cms_err.c
index 9d3fd8803f..4eb9188fd2 100644
--- a/src/lib/libcrypto/cms/cms_err.c
+++ b/src/lib/libcrypto/cms/cms_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_err.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cms_err.c,v 1.4 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2009 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2009 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,8 +59,11 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <openssl/err.h> 62
63#include <openssl/opensslconf.h>
64
63#include <openssl/cms.h> 65#include <openssl/cms.h>
66#include <openssl/err.h>
64 67
65/* BEGIN ERROR CODES */ 68/* BEGIN ERROR CODES */
66#ifndef OPENSSL_NO_ERR 69#ifndef OPENSSL_NO_ERR
diff --git a/src/lib/libcrypto/comp/comp_err.c b/src/lib/libcrypto/comp/comp_err.c
index ced13233e1..1174df430f 100644
--- a/src/lib/libcrypto/comp/comp_err.c
+++ b/src/lib/libcrypto/comp/comp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: comp_err.c,v 1.7 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: comp_err.c,v 1.8 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,8 +59,11 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <openssl/err.h> 62
63#include <openssl/opensslconf.h>
64
63#include <openssl/comp.h> 65#include <openssl/comp.h>
66#include <openssl/err.h>
64 67
65/* BEGIN ERROR CODES */ 68/* BEGIN ERROR CODES */
66#ifndef OPENSSL_NO_ERR 69#ifndef OPENSSL_NO_ERR
diff --git a/src/lib/libcrypto/conf/conf_err.c b/src/lib/libcrypto/conf/conf_err.c
index 5694103a79..a1a7cbe42e 100644
--- a/src/lib/libcrypto/conf/conf_err.c
+++ b/src/lib/libcrypto/conf/conf_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_err.c,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: conf_err.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,8 +59,11 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <openssl/err.h> 62
63#include <openssl/opensslconf.h>
64
63#include <openssl/conf.h> 65#include <openssl/conf.h>
66#include <openssl/err.h>
64 67
65/* BEGIN ERROR CODES */ 68/* BEGIN ERROR CODES */
66#ifndef OPENSSL_NO_ERR 69#ifndef OPENSSL_NO_ERR
diff --git a/src/lib/libcrypto/conf/conf_mall.c b/src/lib/libcrypto/conf/conf_mall.c
index e964b84df0..5eef7a7d18 100644
--- a/src/lib/libcrypto/conf/conf_mall.c
+++ b/src/lib/libcrypto/conf/conf_mall.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_mall.c,v 1.7 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: conf_mall.c,v 1.8 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/crypto.h> 63#include <openssl/crypto.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/conf.h> 65#include <openssl/conf.h>
diff --git a/src/lib/libcrypto/conf/conf_sap.c b/src/lib/libcrypto/conf/conf_sap.c
index 7c46b2476f..332b48ba5a 100644
--- a/src/lib/libcrypto/conf/conf_sap.c
+++ b/src/lib/libcrypto/conf/conf_sap.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_sap.c,v 1.8 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: conf_sap.c,v 1.9 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/crypto.h> 63#include <openssl/crypto.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/conf.h> 65#include <openssl/conf.h>
diff --git a/src/lib/libcrypto/cpt_err.c b/src/lib/libcrypto/cpt_err.c
index 6bc8ec1642..4ac32a28ec 100644
--- a/src/lib/libcrypto/cpt_err.c
+++ b/src/lib/libcrypto/cpt_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cpt_err.c,v 1.12 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: cpt_err.c,v 1.13 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/crypto.h> 66#include <openssl/crypto.h>
64 67
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c
index 75d66d4ee9..30023af332 100644
--- a/src/lib/libcrypto/cryptlib.c
+++ b/src/lib/libcrypto/cryptlib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cryptlib.c,v 1.30 2014/07/10 22:13:39 jsing Exp $ */ 1/* $OpenBSD: cryptlib.c,v 1.31 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -117,6 +117,8 @@
117#include <string.h> 117#include <string.h>
118#include <unistd.h> 118#include <unistd.h>
119 119
120#include <openssl/opensslconf.h>
121
120#include "cryptlib.h" 122#include "cryptlib.h"
121#include <openssl/safestack.h> 123#include <openssl/safestack.h>
122 124
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index 5bf87c9e2e..5cb1dda021 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto.h,v 1.31 2014/06/24 19:33:10 miod Exp $ */ 1/* $OpenBSD: crypto.h,v 1.32 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -114,15 +114,14 @@
114 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. 114 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
115 */ 115 */
116 116
117#include <stdio.h>
118#include <stdlib.h>
119
117#ifndef HEADER_CRYPTO_H 120#ifndef HEADER_CRYPTO_H
118#define HEADER_CRYPTO_H 121#define HEADER_CRYPTO_H
119 122
120#include <stdlib.h>
121
122#include <openssl/opensslconf.h> 123#include <openssl/opensslconf.h>
123 124
124#include <stdio.h>
125
126#include <openssl/stack.h> 125#include <openssl/stack.h>
127#include <openssl/safestack.h> 126#include <openssl/safestack.h>
128#include <openssl/opensslv.h> 127#include <openssl/opensslv.h>
diff --git a/src/lib/libcrypto/des/des_locl.h b/src/lib/libcrypto/des/des_locl.h
index 7b086ff01d..477aeb60d9 100644
--- a/src/lib/libcrypto/des/des_locl.h
+++ b/src/lib/libcrypto/des/des_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: des_locl.h,v 1.15 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: des_locl.h,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,12 +59,11 @@
59#ifndef HEADER_DES_LOCL_H 59#ifndef HEADER_DES_LOCL_H
60#define HEADER_DES_LOCL_H 60#define HEADER_DES_LOCL_H
61 61
62#include <math.h>
62#include <stdio.h> 63#include <stdio.h>
63#include <stdlib.h> 64#include <stdlib.h>
64#include <string.h> 65#include <string.h>
65
66#include <unistd.h> 66#include <unistd.h>
67#include <math.h>
68 67
69#include <openssl/opensslconf.h> 68#include <openssl/opensslconf.h>
70 69
diff --git a/src/lib/libcrypto/des/enc_read.c b/src/lib/libcrypto/des/enc_read.c
index b4e9fe9383..b358fadd48 100644
--- a/src/lib/libcrypto/des/enc_read.c
+++ b/src/lib/libcrypto/des/enc_read.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: enc_read.c,v 1.12 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: enc_read.c,v 1.13 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <errno.h> 60#include <errno.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include "des_locl.h" 65#include "des_locl.h"
63 66
diff --git a/src/lib/libcrypto/des/enc_writ.c b/src/lib/libcrypto/des/enc_writ.c
index d93756bd35..0e3a2d856a 100644
--- a/src/lib/libcrypto/des/enc_writ.c
+++ b/src/lib/libcrypto/des/enc_writ.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: enc_writ.c,v 1.10 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: enc_writ.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,8 +57,11 @@
57 */ 57 */
58 58
59#include <errno.h> 59#include <errno.h>
60#include <time.h>
61#include <stdio.h> 60#include <stdio.h>
61#include <time.h>
62
63#include <openssl/opensslconf.h>
64
62#include "cryptlib.h" 65#include "cryptlib.h"
63#include "des_locl.h" 66#include "des_locl.h"
64#include <openssl/rand.h> 67#include <openssl/rand.h>
diff --git a/src/lib/libcrypto/dh/dh_depr.c b/src/lib/libcrypto/dh/dh_depr.c
index bc7ba16f2b..13f2029a59 100644
--- a/src/lib/libcrypto/dh/dh_depr.c
+++ b/src/lib/libcrypto/dh/dh_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_depr.c,v 1.4 2014/07/09 13:26:47 miod Exp $ */ 1/* $OpenBSD: dh_depr.c,v 1.5 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,10 +53,12 @@
53 * 53 *
54 */ 54 */
55 55
56
57/* This file contains deprecated functions as wrappers to the new ones */ 56/* This file contains deprecated functions as wrappers to the new ones */
58 57
59#include <stdio.h> 58#include <stdio.h>
59
60#include <openssl/opensslconf.h>
61
60#include "cryptlib.h" 62#include "cryptlib.h"
61#include <openssl/bn.h> 63#include <openssl/bn.h>
62#include <openssl/dh.h> 64#include <openssl/dh.h>
diff --git a/src/lib/libcrypto/dh/dh_err.c b/src/lib/libcrypto/dh/dh_err.c
index 989459fbdf..3774ba3c45 100644
--- a/src/lib/libcrypto/dh/dh_err.c
+++ b/src/lib/libcrypto/dh/dh_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_err.c,v 1.14 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: dh_err.c,v 1.15 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/dh.h> 66#include <openssl/dh.h>
64 67
diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c
index 094a78041d..1cf14061c9 100644
--- a/src/lib/libcrypto/dh/dh_lib.c
+++ b/src/lib/libcrypto/dh/dh_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_lib.c,v 1.17 2014/07/09 13:26:47 miod Exp $ */ 1/* $OpenBSD: dh_lib.c,v 1.18 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/dh.h> 65#include <openssl/dh.h>
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c
index 06b804b19d..1f08585e5f 100644
--- a/src/lib/libcrypto/dsa/dsa_ameth.c
+++ b/src/lib/libcrypto/dsa/dsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_ameth.c,v 1.10 2014/07/09 22:55:17 tedu Exp $ */ 1/* $OpenBSD: dsa_ameth.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/x509.h> 64#include <openssl/x509.h>
62#include <openssl/asn1.h> 65#include <openssl/asn1.h>
diff --git a/src/lib/libcrypto/dsa/dsa_depr.c b/src/lib/libcrypto/dsa/dsa_depr.c
index 50169ac9b2..d8ac6f9d92 100644
--- a/src/lib/libcrypto/dsa/dsa_depr.c
+++ b/src/lib/libcrypto/dsa/dsa_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_depr.c,v 1.4 2014/07/09 10:16:24 miod Exp $ */ 1/* $OpenBSD: dsa_depr.c,v 1.5 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -56,10 +56,13 @@
56/* This file contains deprecated function(s) that are now wrappers to the new 56/* This file contains deprecated function(s) that are now wrappers to the new
57 * version(s). */ 57 * version(s). */
58 58
59#ifndef OPENSSL_NO_SHA
60
61#include <stdio.h> 59#include <stdio.h>
62#include <time.h> 60#include <time.h>
61
62#include <openssl/opensslconf.h>
63
64#ifndef OPENSSL_NO_SHA
65
63#include "cryptlib.h" 66#include "cryptlib.h"
64#include <openssl/evp.h> 67#include <openssl/evp.h>
65#include <openssl/bn.h> 68#include <openssl/bn.h>
diff --git a/src/lib/libcrypto/dsa/dsa_err.c b/src/lib/libcrypto/dsa/dsa_err.c
index b01e59344b..b116b643c3 100644
--- a/src/lib/libcrypto/dsa/dsa_err.c
+++ b/src/lib/libcrypto/dsa/dsa_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_err.c,v 1.13 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: dsa_err.c,v 1.14 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/dsa.h> 66#include <openssl/dsa.h>
64 67
diff --git a/src/lib/libcrypto/dsa/dsa_key.c b/src/lib/libcrypto/dsa/dsa_key.c
index 2d11f59107..723e1888df 100644
--- a/src/lib/libcrypto/dsa/dsa_key.c
+++ b/src/lib/libcrypto/dsa/dsa_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_key.c,v 1.16 2014/07/09 10:16:24 miod Exp $ */ 1/* $OpenBSD: dsa_key.c,v 1.17 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <time.h> 60#include <time.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#ifndef OPENSSL_NO_SHA 65#ifndef OPENSSL_NO_SHA
63#include <openssl/bn.h> 66#include <openssl/bn.h>
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c
index 19f80687f8..3bf8427d4c 100644
--- a/src/lib/libcrypto/dsa/dsa_lib.c
+++ b/src/lib/libcrypto/dsa/dsa_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_lib.c,v 1.18 2014/07/09 11:10:50 bcook Exp $ */ 1/* $OpenBSD: dsa_lib.c,v 1.19 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ 59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include "cryptlib.h" 65#include "cryptlib.h"
63#include <openssl/bn.h> 66#include <openssl/bn.h>
64#include <openssl/dsa.h> 67#include <openssl/dsa.h>
diff --git a/src/lib/libcrypto/dso/dso_err.c b/src/lib/libcrypto/dso/dso_err.c
index 7cf6e7aa9e..b8514a4aef 100644
--- a/src/lib/libcrypto/dso/dso_err.c
+++ b/src/lib/libcrypto/dso/dso_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dso_err.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: dso_err.c,v 1.8 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/dso.h> 66#include <openssl/dso.h>
64 67
diff --git a/src/lib/libcrypto/ec/ec2_mult.c b/src/lib/libcrypto/ec/ec2_mult.c
index 6df193d0d4..6c3a759dc8 100644
--- a/src/lib/libcrypto/ec/ec2_mult.c
+++ b/src/lib/libcrypto/ec/ec2_mult.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec2_mult.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec2_mult.c,v 1.4 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,6 +67,8 @@
67 * 67 *
68 */ 68 */
69 69
70#include <openssl/opensslconf.h>
71
70#include <openssl/err.h> 72#include <openssl/err.h>
71 73
72#include "ec_lcl.h" 74#include "ec_lcl.h"
diff --git a/src/lib/libcrypto/ec/ec2_oct.c b/src/lib/libcrypto/ec/ec2_oct.c
index 15066beae4..5150423b99 100644
--- a/src/lib/libcrypto/ec/ec2_oct.c
+++ b/src/lib/libcrypto/ec/ec2_oct.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec2_oct.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec2_oct.c,v 1.4 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,6 +67,8 @@
67 * 67 *
68 */ 68 */
69 69
70#include <openssl/opensslconf.h>
71
70#include <openssl/err.h> 72#include <openssl/err.h>
71 73
72#include "ec_lcl.h" 74#include "ec_lcl.h"
diff --git a/src/lib/libcrypto/ec/ec2_smpl.c b/src/lib/libcrypto/ec/ec2_smpl.c
index fc2e4ca7bc..001ffcc077 100644
--- a/src/lib/libcrypto/ec/ec2_smpl.c
+++ b/src/lib/libcrypto/ec/ec2_smpl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec2_smpl.c,v 1.10 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec2_smpl.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,6 +67,8 @@
67 * 67 *
68 */ 68 */
69 69
70#include <openssl/opensslconf.h>
71
70#include <openssl/err.h> 72#include <openssl/err.h>
71 73
72#include "ec_lcl.h" 74#include "ec_lcl.h"
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c
index 31ea95f103..6935972de5 100644
--- a/src/lib/libcrypto/ec/ec_ameth.c
+++ b/src/lib/libcrypto/ec/ec_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_ameth.c,v 1.9 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_ameth.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/x509.h> 64#include <openssl/x509.h>
62#include <openssl/ec.h> 65#include <openssl/ec.h>
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c
index 9478e5260a..ef87b599f2 100644
--- a/src/lib/libcrypto/ec/ec_asn1.c
+++ b/src/lib/libcrypto/ec/ec_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_asn1.c,v 1.8 2014/07/01 21:26:27 miod Exp $ */ 1/* $OpenBSD: ec_asn1.c,v 1.9 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -57,12 +57,14 @@
57 */ 57 */
58 58
59#include <string.h> 59#include <string.h>
60
61#include <openssl/opensslconf.h>
62
60#include "ec_lcl.h" 63#include "ec_lcl.h"
61#include <openssl/err.h> 64#include <openssl/err.h>
62#include <openssl/asn1t.h> 65#include <openssl/asn1t.h>
63#include <openssl/objects.h> 66#include <openssl/objects.h>
64 67
65
66int 68int
67EC_GROUP_get_basis_type(const EC_GROUP * group) 69EC_GROUP_get_basis_type(const EC_GROUP * group)
68{ 70{
diff --git a/src/lib/libcrypto/ec/ec_curve.c b/src/lib/libcrypto/ec/ec_curve.c
index 32a7301bf9..baac8c7156 100644
--- a/src/lib/libcrypto/ec/ec_curve.c
+++ b/src/lib/libcrypto/ec/ec_curve.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_curve.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_curve.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -69,10 +69,11 @@
69 * 69 *
70 */ 70 */
71 71
72#include <openssl/opensslconf.h>
73
72#include "ec_lcl.h" 74#include "ec_lcl.h"
73#include <openssl/err.h> 75#include <openssl/err.h>
74#include <openssl/obj_mac.h> 76#include <openssl/obj_mac.h>
75#include <openssl/opensslconf.h>
76 77
77typedef struct { 78typedef struct {
78 int field_type, /* either NID_X9_62_prime_field or 79 int field_type, /* either NID_X9_62_prime_field or
diff --git a/src/lib/libcrypto/ec/ec_cvt.c b/src/lib/libcrypto/ec/ec_cvt.c
index 7b70cf7968..a0982064b8 100644
--- a/src/lib/libcrypto/ec/ec_cvt.c
+++ b/src/lib/libcrypto/ec/ec_cvt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_cvt.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_cvt.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -69,10 +69,11 @@
69 * 69 *
70 */ 70 */
71 71
72#include <openssl/opensslconf.h>
73
72#include <openssl/err.h> 74#include <openssl/err.h>
73#include "ec_lcl.h" 75#include "ec_lcl.h"
74 76
75
76EC_GROUP * 77EC_GROUP *
77EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, 78EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b,
78 BN_CTX *ctx) 79 BN_CTX *ctx)
diff --git a/src/lib/libcrypto/ec/ec_err.c b/src/lib/libcrypto/ec/ec_err.c
index 7620a05d84..0ba510adae 100644
--- a/src/lib/libcrypto/ec/ec_err.c
+++ b/src/lib/libcrypto/ec/ec_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_err.c,v 1.8 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_err.c,v 1.9 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ec.h> 66#include <openssl/ec.h>
64 67
diff --git a/src/lib/libcrypto/ec/ec_key.c b/src/lib/libcrypto/ec/ec_key.c
index 939176095f..7067a949da 100644
--- a/src/lib/libcrypto/ec/ec_key.c
+++ b/src/lib/libcrypto/ec/ec_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_key.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_key.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -62,6 +62,9 @@
62 */ 62 */
63 63
64#include <string.h> 64#include <string.h>
65
66#include <openssl/opensslconf.h>
67
65#include "ec_lcl.h" 68#include "ec_lcl.h"
66#include <openssl/err.h> 69#include <openssl/err.h>
67 70
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c
index f2a4fb8053..3d8b96eb1f 100644
--- a/src/lib/libcrypto/ec/ec_lib.c
+++ b/src/lib/libcrypto/ec/ec_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_lib.c,v 1.13 2014/07/09 11:10:50 bcook Exp $ */ 1/* $OpenBSD: ec_lib.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -63,6 +63,8 @@
63 63
64#include <string.h> 64#include <string.h>
65 65
66#include <openssl/opensslconf.h>
67
66#include <openssl/err.h> 68#include <openssl/err.h>
67#include <openssl/opensslv.h> 69#include <openssl/opensslv.h>
68 70
diff --git a/src/lib/libcrypto/ec/ec_oct.c b/src/lib/libcrypto/ec/ec_oct.c
index cd07890c74..82124a8f80 100644
--- a/src/lib/libcrypto/ec/ec_oct.c
+++ b/src/lib/libcrypto/ec/ec_oct.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_oct.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_oct.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -63,6 +63,8 @@
63 63
64#include <string.h> 64#include <string.h>
65 65
66#include <openssl/opensslconf.h>
67
66#include <openssl/err.h> 68#include <openssl/err.h>
67#include <openssl/opensslv.h> 69#include <openssl/opensslv.h>
68 70
diff --git a/src/lib/libcrypto/ec/eck_prn.c b/src/lib/libcrypto/ec/eck_prn.c
index eba10245d8..fb5ee7f52b 100644
--- a/src/lib/libcrypto/ec/eck_prn.c
+++ b/src/lib/libcrypto/ec/eck_prn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eck_prn.c,v 1.7 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: eck_prn.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -64,6 +64,8 @@
64#include <stdio.h> 64#include <stdio.h>
65#include <string.h> 65#include <string.h>
66 66
67#include <openssl/opensslconf.h>
68
67#include "cryptlib.h" 69#include "cryptlib.h"
68#include <openssl/evp.h> 70#include <openssl/evp.h>
69#include <openssl/ec.h> 71#include <openssl/ec.h>
diff --git a/src/lib/libcrypto/ec/ecp_nistp224.c b/src/lib/libcrypto/ec/ecp_nistp224.c
index 473d75a72b..c466d2db83 100644
--- a/src/lib/libcrypto/ec/ecp_nistp224.c
+++ b/src/lib/libcrypto/ec/ecp_nistp224.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistp224.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecp_nistp224.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Emilia Kasper (Google) for the OpenSSL project. 3 * Written by Emilia Kasper (Google) for the OpenSSL project.
4 */ 4 */
@@ -25,12 +25,13 @@
25 * and Adam Langley's public domain 64-bit C implementation of curve25519 25 * and Adam Langley's public domain 64-bit C implementation of curve25519
26 */ 26 */
27 27
28#include <stdint.h>
29#include <string.h>
30
28#include <openssl/opensslconf.h> 31#include <openssl/opensslconf.h>
29#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
30 32
31#include <stdint.h> 33#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
32 34
33#include <string.h>
34#include <openssl/err.h> 35#include <openssl/err.h>
35#include "ec_lcl.h" 36#include "ec_lcl.h"
36 37
diff --git a/src/lib/libcrypto/ec/ecp_nistp256.c b/src/lib/libcrypto/ec/ecp_nistp256.c
index a72b1163ff..7b122e6307 100644
--- a/src/lib/libcrypto/ec/ecp_nistp256.c
+++ b/src/lib/libcrypto/ec/ecp_nistp256.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistp256.c,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecp_nistp256.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Adam Langley (Google) for the OpenSSL project 3 * Written by Adam Langley (Google) for the OpenSSL project
4 */ 4 */
@@ -26,12 +26,13 @@
26 * work which got its smarts from Daniel J. Bernstein's work on the same. 26 * work which got its smarts from Daniel J. Bernstein's work on the same.
27 */ 27 */
28 28
29#include <stdint.h>
30#include <string.h>
31
29#include <openssl/opensslconf.h> 32#include <openssl/opensslconf.h>
30#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
31 33
32#include <stdint.h> 34#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
33 35
34#include <string.h>
35#include <openssl/err.h> 36#include <openssl/err.h>
36#include "ec_lcl.h" 37#include "ec_lcl.h"
37 38
diff --git a/src/lib/libcrypto/ec/ecp_nistp521.c b/src/lib/libcrypto/ec/ecp_nistp521.c
index 1ff3837411..cec0a3b470 100644
--- a/src/lib/libcrypto/ec/ecp_nistp521.c
+++ b/src/lib/libcrypto/ec/ecp_nistp521.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistp521.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecp_nistp521.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Adam Langley (Google) for the OpenSSL project 3 * Written by Adam Langley (Google) for the OpenSSL project
4 */ 4 */
@@ -26,12 +26,13 @@
26 * work which got its smarts from Daniel J. Bernstein's work on the same. 26 * work which got its smarts from Daniel J. Bernstein's work on the same.
27 */ 27 */
28 28
29#include <stdint.h>
30#include <string.h>
31
29#include <openssl/opensslconf.h> 32#include <openssl/opensslconf.h>
30#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
31 33
32#include <stdint.h> 34#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
33 35
34#include <string.h>
35#include <openssl/err.h> 36#include <openssl/err.h>
36#include "ec_lcl.h" 37#include "ec_lcl.h"
37 38
diff --git a/src/lib/libcrypto/ec/ecp_nistputil.c b/src/lib/libcrypto/ec/ecp_nistputil.c
index 87aa979252..ca55b49ba2 100644
--- a/src/lib/libcrypto/ec/ecp_nistputil.c
+++ b/src/lib/libcrypto/ec/ecp_nistputil.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistputil.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecp_nistputil.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Bodo Moeller for the OpenSSL project. 3 * Written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -18,14 +18,16 @@
18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 */ 19 */
20 20
21#include <stddef.h>
22
21#include <openssl/opensslconf.h> 23#include <openssl/opensslconf.h>
24
22#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 25#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
23 26
24/* 27/*
25 * Common utility functions for ecp_nistp224.c, ecp_nistp256.c, ecp_nistp521.c. 28 * Common utility functions for ecp_nistp224.c, ecp_nistp256.c, ecp_nistp521.c.
26 */ 29 */
27 30
28#include <stddef.h>
29#include "ec_lcl.h" 31#include "ec_lcl.h"
30 32
31/* Convert an array of points into affine coordinates. 33/* Convert an array of points into affine coordinates.
diff --git a/src/lib/libcrypto/ecdh/ech_err.c b/src/lib/libcrypto/ecdh/ech_err.c
index c44f364a51..6b417a255d 100644
--- a/src/lib/libcrypto/ecdh/ech_err.c
+++ b/src/lib/libcrypto/ecdh/ech_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_err.c,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ech_err.c,v 1.3 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ecdh.h> 66#include <openssl/ecdh.h>
64 67
diff --git a/src/lib/libcrypto/ecdh/ech_lib.c b/src/lib/libcrypto/ecdh/ech_lib.c
index 99390c2373..e9fae9428b 100644
--- a/src/lib/libcrypto/ecdh/ech_lib.c
+++ b/src/lib/libcrypto/ecdh/ech_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_lib.c,v 1.6 2014/07/09 11:10:50 bcook Exp $ */ 1/* $OpenBSD: ech_lib.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,8 +67,11 @@
67 * 67 *
68 */ 68 */
69 69
70#include "ech_locl.h"
71#include <string.h> 70#include <string.h>
71
72#include <openssl/opensslconf.h>
73
74#include "ech_locl.h"
72#ifndef OPENSSL_NO_ENGINE 75#ifndef OPENSSL_NO_ENGINE
73#include <openssl/engine.h> 76#include <openssl/engine.h>
74#endif 77#endif
diff --git a/src/lib/libcrypto/ecdh/ech_ossl.c b/src/lib/libcrypto/ecdh/ech_ossl.c
index dc99eec79e..aa22ccafa2 100644
--- a/src/lib/libcrypto/ecdh/ech_ossl.c
+++ b/src/lib/libcrypto/ecdh/ech_ossl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_ossl.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ech_ossl.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,9 +67,10 @@
67 * 67 *
68 */ 68 */
69 69
70
71#include <string.h>
72#include <limits.h> 70#include <limits.h>
71#include <string.h>
72
73#include <openssl/opensslconf.h>
73 74
74#include "cryptlib.h" 75#include "cryptlib.h"
75 76
diff --git a/src/lib/libcrypto/ecdsa/ecs_err.c b/src/lib/libcrypto/ecdsa/ecs_err.c
index b6297c2fbe..721b53c3f4 100644
--- a/src/lib/libcrypto/ecdsa/ecs_err.c
+++ b/src/lib/libcrypto/ecdsa/ecs_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_err.c,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecs_err.c,v 1.3 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ecdsa.h> 66#include <openssl/ecdsa.h>
64 67
diff --git a/src/lib/libcrypto/ecdsa/ecs_lib.c b/src/lib/libcrypto/ecdsa/ecs_lib.c
index a1c05d1a41..a92d6117c9 100644
--- a/src/lib/libcrypto/ecdsa/ecs_lib.c
+++ b/src/lib/libcrypto/ecdsa/ecs_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_lib.c,v 1.6 2014/07/09 11:10:50 bcook Exp $ */ 1/* $OpenBSD: ecs_lib.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -54,6 +54,9 @@
54 */ 54 */
55 55
56#include <string.h> 56#include <string.h>
57
58#include <openssl/opensslconf.h>
59
57#include "ecs_locl.h" 60#include "ecs_locl.h"
58#ifndef OPENSSL_NO_ENGINE 61#ifndef OPENSSL_NO_ENGINE
59#include <openssl/engine.h> 62#include <openssl/engine.h>
diff --git a/src/lib/libcrypto/ecdsa/ecs_ossl.c b/src/lib/libcrypto/ecdsa/ecs_ossl.c
index e44b435f2a..e2c4b1d6d1 100644
--- a/src/lib/libcrypto/ecdsa/ecs_ossl.c
+++ b/src/lib/libcrypto/ecdsa/ecs_ossl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_ossl.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecs_ossl.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project 3 * Written by Nils Larsch for the OpenSSL project
4 */ 4 */
@@ -56,6 +56,8 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>
60
59#include "ecs_locl.h" 61#include "ecs_locl.h"
60#include <openssl/err.h> 62#include <openssl/err.h>
61#include <openssl/obj_mac.h> 63#include <openssl/obj_mac.h>
diff --git a/src/lib/libcrypto/ecdsa/ecs_sign.c b/src/lib/libcrypto/ecdsa/ecs_sign.c
index 3444dd1703..39bcf5fe5c 100644
--- a/src/lib/libcrypto/ecdsa/ecs_sign.c
+++ b/src/lib/libcrypto/ecdsa/ecs_sign.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_sign.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecs_sign.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,6 +53,8 @@
53 * 53 *
54 */ 54 */
55 55
56#include <openssl/opensslconf.h>
57
56#include "ecs_locl.h" 58#include "ecs_locl.h"
57#ifndef OPENSSL_NO_ENGINE 59#ifndef OPENSSL_NO_ENGINE
58#include <openssl/engine.h> 60#include <openssl/engine.h>
diff --git a/src/lib/libcrypto/ecdsa/ecs_vrf.c b/src/lib/libcrypto/ecdsa/ecs_vrf.c
index 9ff8e374a7..40a677c46a 100644
--- a/src/lib/libcrypto/ecdsa/ecs_vrf.c
+++ b/src/lib/libcrypto/ecdsa/ecs_vrf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_vrf.c,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecs_vrf.c,v 1.3 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project 3 * Written by Nils Larsch for the OpenSSL project
4 */ 4 */
@@ -56,6 +56,8 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>
60
59#include "ecs_locl.h" 61#include "ecs_locl.h"
60#ifndef OPENSSL_NO_ENGINE 62#ifndef OPENSSL_NO_ENGINE
61#include <openssl/engine.h> 63#include <openssl/engine.h>
diff --git a/src/lib/libcrypto/engine/eng_aesni.c b/src/lib/libcrypto/engine/eng_aesni.c
index d1b2d613b9..0bb558c1fd 100644
--- a/src/lib/libcrypto/engine/eng_aesni.c
+++ b/src/lib/libcrypto/engine/eng_aesni.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_aesni.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: eng_aesni.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Support for Intel AES-NI intruction set 3 * Support for Intel AES-NI intruction set
4 * Author: Huang Ying <ying.huang@intel.com> 4 * Author: Huang Ying <ying.huang@intel.com>
@@ -73,13 +73,13 @@
73 * 73 *
74 */ 74 */
75 75
76#include <assert.h>
77#include <stdio.h>
76 78
77#include <openssl/opensslconf.h> 79#include <openssl/opensslconf.h>
78 80
79#if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_AES_NI) && !defined(OPENSSL_NO_AES) 81#if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_AES_NI) && !defined(OPENSSL_NO_AES)
80 82
81#include <stdio.h>
82#include <assert.h>
83#include "cryptlib.h" 83#include "cryptlib.h"
84#include <openssl/dso.h> 84#include <openssl/dso.h>
85#include <openssl/engine.h> 85#include <openssl/engine.h>
diff --git a/src/lib/libcrypto/engine/eng_all.c b/src/lib/libcrypto/engine/eng_all.c
index 086c903675..21b76266c7 100644
--- a/src/lib/libcrypto/engine/eng_all.c
+++ b/src/lib/libcrypto/engine/eng_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_all.c,v 1.25 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: eng_all.c,v 1.26 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Richard Levitte <richard@levitte.org> for the OpenSSL 2/* Written by Richard Levitte <richard@levitte.org> for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -56,6 +56,8 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>
60
59#include "cryptlib.h" 61#include "cryptlib.h"
60#include "eng_int.h" 62#include "eng_int.h"
61 63
diff --git a/src/lib/libcrypto/engine/eng_err.c b/src/lib/libcrypto/engine/eng_err.c
index 298c33f485..d65efde991 100644
--- a/src/lib/libcrypto/engine/eng_err.c
+++ b/src/lib/libcrypto/engine/eng_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_err.c,v 1.9 2014/06/22 11:33:47 jsing Exp $ */ 1/* $OpenBSD: eng_err.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2010 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2010 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/engine.h> 66#include <openssl/engine.h>
64 67
diff --git a/src/lib/libcrypto/engine/eng_fat.c b/src/lib/libcrypto/engine/eng_fat.c
index d995104a7c..9805729922 100644
--- a/src/lib/libcrypto/engine/eng_fat.c
+++ b/src/lib/libcrypto/engine/eng_fat.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_fat.c,v 1.13 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: eng_fat.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -60,6 +60,8 @@
60 60
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "eng_int.h" 65#include "eng_int.h"
64#include <openssl/conf.h> 66#include <openssl/conf.h>
65 67
diff --git a/src/lib/libcrypto/engine/eng_int.h b/src/lib/libcrypto/engine/eng_int.h
index 22049fd7fd..aa3751f267 100644
--- a/src/lib/libcrypto/engine/eng_int.h
+++ b/src/lib/libcrypto/engine/eng_int.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_int.h,v 1.6 2014/06/22 12:16:28 jsing Exp $ */ 1/* $OpenBSD: eng_int.h,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -65,6 +65,7 @@
65#define HEADER_ENGINE_INT_H 65#define HEADER_ENGINE_INT_H
66 66
67#include "cryptlib.h" 67#include "cryptlib.h"
68
68/* Take public definitions from engine.h */ 69/* Take public definitions from engine.h */
69#include <openssl/engine.h> 70#include <openssl/engine.h>
70 71
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c
index d7aef43999..35b45158e9 100644
--- a/src/lib/libcrypto/engine/eng_list.c
+++ b/src/lib/libcrypto/engine/eng_list.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_list.c,v 1.13 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: eng_list.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -64,6 +64,8 @@
64#include <string.h> 64#include <string.h>
65#include <unistd.h> 65#include <unistd.h>
66 66
67#include <openssl/opensslconf.h>
68
67#include "eng_int.h" 69#include "eng_int.h"
68 70
69/* The linked-list of pointers to engine types. engine_list_head 71/* The linked-list of pointers to engine types. engine_list_head
diff --git a/src/lib/libcrypto/engine/eng_openssl.c b/src/lib/libcrypto/engine/eng_openssl.c
index 882af0341f..ecc560eb26 100644
--- a/src/lib/libcrypto/engine/eng_openssl.c
+++ b/src/lib/libcrypto/engine/eng_openssl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_openssl.c,v 1.7 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: eng_openssl.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -64,6 +64,8 @@
64#include <stdio.h> 64#include <stdio.h>
65#include <string.h> 65#include <string.h>
66 66
67#include <openssl/opensslconf.h>
68
67#include <openssl/crypto.h> 69#include <openssl/crypto.h>
68#include "cryptlib.h" 70#include "cryptlib.h"
69#include <openssl/engine.h> 71#include <openssl/engine.h>
diff --git a/src/lib/libcrypto/engine/eng_padlock.c b/src/lib/libcrypto/engine/eng_padlock.c
index 936a440b1a..ca3c958033 100644
--- a/src/lib/libcrypto/engine/eng_padlock.c
+++ b/src/lib/libcrypto/engine/eng_padlock.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_padlock.c,v 1.11 2014/06/22 12:05:09 jsing Exp $ */ 1/* $OpenBSD: eng_padlock.c,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Support for VIA PadLock Advanced Cryptography Engine (ACE) 3 * Support for VIA PadLock Advanced Cryptography Engine (ACE)
4 * Written by Michal Ludvig <michal@logix.cz> 4 * Written by Michal Ludvig <michal@logix.cz>
@@ -63,11 +63,11 @@
63 * 63 *
64 */ 64 */
65 65
66
67#include <stdio.h> 66#include <stdio.h>
68#include <string.h> 67#include <string.h>
69 68
70#include <openssl/opensslconf.h> 69#include <openssl/opensslconf.h>
70
71#include <openssl/crypto.h> 71#include <openssl/crypto.h>
72#include <openssl/dso.h> 72#include <openssl/dso.h>
73#include <openssl/engine.h> 73#include <openssl/engine.h>
diff --git a/src/lib/libcrypto/engine/eng_rsax.c b/src/lib/libcrypto/engine/eng_rsax.c
index 090ff3dfda..daeb7e6ebb 100644
--- a/src/lib/libcrypto/engine/eng_rsax.c
+++ b/src/lib/libcrypto/engine/eng_rsax.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_rsax.c,v 1.8 2014/06/22 12:18:33 jsing Exp $ */ 1/* $OpenBSD: eng_rsax.c,v 1.9 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (c) 2010-2010 Intel Corp. 2/* Copyright (c) 2010-2010 Intel Corp.
3 * Author: Vinodh.Gopal@intel.com 3 * Author: Vinodh.Gopal@intel.com
4 * Jim Guilford 4 * Jim Guilford
@@ -66,6 +66,9 @@
66 66
67#include <stdio.h> 67#include <stdio.h>
68#include <string.h> 68#include <string.h>
69
70#include <openssl/opensslconf.h>
71
69#include <openssl/crypto.h> 72#include <openssl/crypto.h>
70#include <openssl/buffer.h> 73#include <openssl/buffer.h>
71#include <openssl/engine.h> 74#include <openssl/engine.h>
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c
index ee6d91f465..cc9d78cb07 100644
--- a/src/lib/libcrypto/err/err.c
+++ b/src/lib/libcrypto/err/err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err.c,v 1.36 2014/06/27 07:01:21 deraadt Exp $ */ 1/* $OpenBSD: err.c,v 1.37 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -109,9 +109,12 @@
109 * 109 *
110 */ 110 */
111 111
112#include <stdio.h>
113#include <stdarg.h> 112#include <stdarg.h>
113#include <stdio.h>
114#include <string.h> 114#include <string.h>
115
116#include <openssl/opensslconf.h>
117
115#include "cryptlib.h" 118#include "cryptlib.h"
116#include <openssl/lhash.h> 119#include <openssl/lhash.h>
117#include <openssl/crypto.h> 120#include <openssl/crypto.h>
diff --git a/src/lib/libcrypto/err/err_all.c b/src/lib/libcrypto/err/err_all.c
index 0de1ced6fd..d950aad3b4 100644
--- a/src/lib/libcrypto/err/err_all.c
+++ b/src/lib/libcrypto/err/err_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err_all.c,v 1.15 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: err_all.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/asn1.h> 63#include <openssl/asn1.h>
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#ifndef OPENSSL_NO_EC 65#ifndef OPENSSL_NO_EC
diff --git a/src/lib/libcrypto/evp/c_all.c b/src/lib/libcrypto/evp/c_all.c
index cbbca62195..d5afe8e94d 100644
--- a/src/lib/libcrypto/evp/c_all.c
+++ b/src/lib/libcrypto/evp/c_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_all.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: c_all.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,8 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60 60
61#include <openssl/opensslconf.h>
62
61#include <openssl/conf.h> 63#include <openssl/conf.h>
62#include <openssl/evp.h> 64#include <openssl/evp.h>
63 65
diff --git a/src/lib/libcrypto/evp/c_allc.c b/src/lib/libcrypto/evp/c_allc.c
index 804bd6950f..a4c796b6d5 100644
--- a/src/lib/libcrypto/evp/c_allc.c
+++ b/src/lib/libcrypto/evp/c_allc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_allc.c,v 1.11 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: c_allc.c,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/evp.h> 64#include <openssl/evp.h>
62#include <openssl/pkcs12.h> 65#include <openssl/pkcs12.h>
diff --git a/src/lib/libcrypto/evp/c_alld.c b/src/lib/libcrypto/evp/c_alld.c
index 9b589ae7ec..16726b6caa 100644
--- a/src/lib/libcrypto/evp/c_alld.c
+++ b/src/lib/libcrypto/evp/c_alld.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_alld.c,v 1.9 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: c_alld.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/evp.h> 64#include <openssl/evp.h>
62#include <openssl/pkcs12.h> 65#include <openssl/pkcs12.h>
diff --git a/src/lib/libcrypto/evp/digest.c b/src/lib/libcrypto/evp/digest.c
index 5d5799a49f..e1ce7dd3a3 100644
--- a/src/lib/libcrypto/evp/digest.c
+++ b/src/lib/libcrypto/evp/digest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: digest.c,v 1.19 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: digest.c,v 1.20 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -112,6 +112,8 @@
112#include <stdio.h> 112#include <stdio.h>
113#include <string.h> 113#include <string.h>
114 114
115#include <openssl/opensslconf.h>
116
115#include "cryptlib.h" 117#include "cryptlib.h"
116#include <openssl/objects.h> 118#include <openssl/objects.h>
117#include <openssl/evp.h> 119#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c
index f40bcf8bd3..fb767d9619 100644
--- a/src/lib/libcrypto/evp/e_aes.c
+++ b/src/lib/libcrypto/evp/e_aes.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_aes.c,v 1.22 2014/06/15 22:53:21 tedu Exp $ */ 1/* $OpenBSD: e_aes.c,v 1.23 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -49,16 +49,19 @@
49 * 49 *
50 */ 50 */
51 51
52#include <assert.h>
53#include <string.h>
54
52#include <openssl/opensslconf.h> 55#include <openssl/opensslconf.h>
56
53#ifndef OPENSSL_NO_AES 57#ifndef OPENSSL_NO_AES
54#include <openssl/evp.h>
55#include <openssl/err.h>
56#include <string.h>
57#include <assert.h>
58#include <openssl/aes.h> 58#include <openssl/aes.h>
59#include <openssl/err.h>
60#include <openssl/evp.h>
61#include <openssl/rand.h>
62
59#include "evp_locl.h" 63#include "evp_locl.h"
60#include "modes_lcl.h" 64#include "modes_lcl.h"
61#include <openssl/rand.h>
62 65
63typedef struct { 66typedef struct {
64 AES_KEY ks; 67 AES_KEY ks;
diff --git a/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c b/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c
index c38ab11280..a9a5cf1ca5 100644
--- a/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c
+++ b/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_aes_cbc_hmac_sha1.c,v 1.6 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_aes_cbc_hmac_sha1.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2011-2013 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2011-2013 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -48,11 +48,11 @@
48 * ==================================================================== 48 * ====================================================================
49 */ 49 */
50 50
51#include <openssl/opensslconf.h>
52
53#include <stdio.h> 51#include <stdio.h>
54#include <string.h> 52#include <string.h>
55 53
54#include <openssl/opensslconf.h>
55
56#if !defined(OPENSSL_NO_AES) && !defined(OPENSSL_NO_SHA1) 56#if !defined(OPENSSL_NO_AES) && !defined(OPENSSL_NO_SHA1)
57 57
58#include <openssl/evp.h> 58#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/evp/e_bf.c b/src/lib/libcrypto/evp/e_bf.c
index 06c734783e..fe133fb8ea 100644
--- a/src/lib/libcrypto/evp/e_bf.c
+++ b/src/lib/libcrypto/evp/e_bf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_bf.c,v 1.6 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_bf.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#ifndef OPENSSL_NO_BF 64#ifndef OPENSSL_NO_BF
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/evp/e_camellia.c b/src/lib/libcrypto/evp/e_camellia.c
index 871bada59e..4868c98c5d 100644
--- a/src/lib/libcrypto/evp/e_camellia.c
+++ b/src/lib/libcrypto/evp/e_camellia.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_camellia.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_camellia.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,12 +53,14 @@
53 * 53 *
54 */ 54 */
55 55
56#include <assert.h>
57#include <string.h>
58
56#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
57#ifndef OPENSSL_NO_CAMELLIA 61#ifndef OPENSSL_NO_CAMELLIA
58#include <openssl/evp.h> 62#include <openssl/evp.h>
59#include <openssl/err.h> 63#include <openssl/err.h>
60#include <string.h>
61#include <assert.h>
62#include <openssl/camellia.h> 64#include <openssl/camellia.h>
63#include "evp_locl.h" 65#include "evp_locl.h"
64 66
diff --git a/src/lib/libcrypto/evp/e_cast.c b/src/lib/libcrypto/evp/e_cast.c
index ee97f49c2e..2476bf2799 100644
--- a/src/lib/libcrypto/evp/e_cast.c
+++ b/src/lib/libcrypto/evp/e_cast.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_cast.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_cast.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_CAST 65#ifndef OPENSSL_NO_CAST
diff --git a/src/lib/libcrypto/evp/e_chacha.c b/src/lib/libcrypto/evp/e_chacha.c
index d1a1c59ae6..0a5ab98cdb 100644
--- a/src/lib/libcrypto/evp/e_chacha.c
+++ b/src/lib/libcrypto/evp/e_chacha.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_chacha.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_chacha.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -15,6 +15,8 @@
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */ 16 */
17 17
18#include <openssl/opensslconf.h>
19
18#ifndef OPENSSL_NO_CHACHA 20#ifndef OPENSSL_NO_CHACHA
19 21
20#include <openssl/chacha.h> 22#include <openssl/chacha.h>
diff --git a/src/lib/libcrypto/evp/e_chacha20poly1305.c b/src/lib/libcrypto/evp/e_chacha20poly1305.c
index 90d8a9c7b8..da1e036668 100644
--- a/src/lib/libcrypto/evp/e_chacha20poly1305.c
+++ b/src/lib/libcrypto/evp/e_chacha20poly1305.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_chacha20poly1305.c,v 1.7 2014/06/21 15:30:36 jsing Exp $ */ 1/* $OpenBSD: e_chacha20poly1305.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014, Google Inc. 3 * Copyright (c) 2014, Google Inc.
4 * 4 *
@@ -17,14 +17,16 @@
17 17
18#include <stdint.h> 18#include <stdint.h>
19#include <string.h> 19#include <string.h>
20
20#include <openssl/opensslconf.h> 21#include <openssl/opensslconf.h>
21 22
22#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) 23#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
23 24
25#include <openssl/err.h>
26#include <openssl/evp.h>
24#include <openssl/chacha.h> 27#include <openssl/chacha.h>
25#include <openssl/poly1305.h> 28#include <openssl/poly1305.h>
26#include <openssl/evp.h> 29
27#include <openssl/err.h>
28#include "evp_locl.h" 30#include "evp_locl.h"
29 31
30#define POLY1305_TAG_LEN 16 32#define POLY1305_TAG_LEN 16
diff --git a/src/lib/libcrypto/evp/e_des.c b/src/lib/libcrypto/evp/e_des.c
index 45a6e84cb5..1f0de7cbfd 100644
--- a/src/lib/libcrypto/evp/e_des.c
+++ b/src/lib/libcrypto/evp/e_des.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_des.c,v 1.9 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_des.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#ifndef OPENSSL_NO_DES 64#ifndef OPENSSL_NO_DES
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/evp/e_des3.c b/src/lib/libcrypto/evp/e_des3.c
index 41fa09a2d9..f4264d8ca4 100644
--- a/src/lib/libcrypto/evp/e_des3.c
+++ b/src/lib/libcrypto/evp/e_des3.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_des3.c,v 1.14 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: e_des3.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#ifndef OPENSSL_NO_DES 65#ifndef OPENSSL_NO_DES
64#include <openssl/evp.h> 66#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/evp/e_idea.c b/src/lib/libcrypto/evp/e_idea.c
index 8f4e06161b..7dd385e04e 100644
--- a/src/lib/libcrypto/evp/e_idea.c
+++ b/src/lib/libcrypto/evp/e_idea.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_idea.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_idea.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_IDEA 65#ifndef OPENSSL_NO_IDEA
diff --git a/src/lib/libcrypto/evp/e_old.c b/src/lib/libcrypto/evp/e_old.c
index bfd45d2c88..235ebe242b 100644
--- a/src/lib/libcrypto/evp/e_old.c
+++ b/src/lib/libcrypto/evp/e_old.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_old.c,v 1.6 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_old.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2004. 3 * project 2004.
4 */ 4 */
@@ -56,6 +56,8 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>
60
59#ifndef OPENSSL_NO_DEPRECATED 61#ifndef OPENSSL_NO_DEPRECATED
60 62
61#include <openssl/evp.h> 63#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/evp/e_rc2.c b/src/lib/libcrypto/evp/e_rc2.c
index ad8e2f6c63..c164ab10f7 100644
--- a/src/lib/libcrypto/evp/e_rc2.c
+++ b/src/lib/libcrypto/evp/e_rc2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_rc2.c,v 1.8 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_rc2.c,v 1.9 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RC2 65#ifndef OPENSSL_NO_RC2
diff --git a/src/lib/libcrypto/evp/e_rc4.c b/src/lib/libcrypto/evp/e_rc4.c
index d272c03ee1..f8e4149a62 100644
--- a/src/lib/libcrypto/evp/e_rc4.c
+++ b/src/lib/libcrypto/evp/e_rc4.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_rc4.c,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_rc4.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RC4 65#ifndef OPENSSL_NO_RC4
diff --git a/src/lib/libcrypto/evp/e_rc4_hmac_md5.c b/src/lib/libcrypto/evp/e_rc4_hmac_md5.c
index edbc4de539..05c79ff09d 100644
--- a/src/lib/libcrypto/evp/e_rc4_hmac_md5.c
+++ b/src/lib/libcrypto/evp/e_rc4_hmac_md5.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_rc4_hmac_md5.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_rc4_hmac_md5.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -48,11 +48,11 @@
48 * ==================================================================== 48 * ====================================================================
49 */ 49 */
50 50
51#include <openssl/opensslconf.h>
52
53#include <stdio.h> 51#include <stdio.h>
54#include <string.h> 52#include <string.h>
55 53
54#include <openssl/opensslconf.h>
55
56#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_MD5) 56#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_MD5)
57 57
58#include <openssl/evp.h> 58#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/evp/e_rc5.c b/src/lib/libcrypto/evp/e_rc5.c
index f2c976319b..00e1251818 100644
--- a/src/lib/libcrypto/evp/e_rc5.c
+++ b/src/lib/libcrypto/evp/e_rc5.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_rc5.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_rc5.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RC5 65#ifndef OPENSSL_NO_RC5
diff --git a/src/lib/libcrypto/evp/e_xcbc_d.c b/src/lib/libcrypto/evp/e_xcbc_d.c
index 401fb2b766..496850b315 100644
--- a/src/lib/libcrypto/evp/e_xcbc_d.c
+++ b/src/lib/libcrypto/evp/e_xcbc_d.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_xcbc_d.c,v 1.10 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: e_xcbc_d.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63 65
64#ifndef OPENSSL_NO_DES 66#ifndef OPENSSL_NO_DES
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c
index 36e39a4668..798ac442f9 100644
--- a/src/lib/libcrypto/evp/evp_enc.c
+++ b/src/lib/libcrypto/evp/evp_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_enc.c,v 1.22 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: evp_enc.c,v 1.23 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/evp.h> 65#include <openssl/evp.h>
64#include <openssl/err.h> 66#include <openssl/err.h>
diff --git a/src/lib/libcrypto/evp/evp_err.c b/src/lib/libcrypto/evp/evp_err.c
index 6391a81422..2eddd79a3f 100644
--- a/src/lib/libcrypto/evp/evp_err.c
+++ b/src/lib/libcrypto/evp/evp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_err.c,v 1.19 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: evp_err.c,v 1.20 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/evp.h> 66#include <openssl/evp.h>
64 67
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c
index e53a681d5f..63e71c0bc9 100644
--- a/src/lib/libcrypto/evp/evp_pbe.c
+++ b/src/lib/libcrypto/evp/evp_pbe.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_pbe.c,v 1.18 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: evp_pbe.c,v 1.19 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/evp.h> 65#include <openssl/evp.h>
64#include <openssl/pkcs12.h> 66#include <openssl/pkcs12.h>
diff --git a/src/lib/libcrypto/evp/m_dss.c b/src/lib/libcrypto/evp/m_dss.c
index d49946d803..81e3dd1511 100644
--- a/src/lib/libcrypto/evp/m_dss.c
+++ b/src/lib/libcrypto/evp/m_dss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_dss.c,v 1.14 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_dss.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/evp.h> 64#include <openssl/evp.h>
62#include <openssl/objects.h> 65#include <openssl/objects.h>
diff --git a/src/lib/libcrypto/evp/m_dss1.c b/src/lib/libcrypto/evp/m_dss1.c
index e7261aeb66..efa91230dc 100644
--- a/src/lib/libcrypto/evp/m_dss1.c
+++ b/src/lib/libcrypto/evp/m_dss1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_dss1.c,v 1.14 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_dss1.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_SHA 65#ifndef OPENSSL_NO_SHA
diff --git a/src/lib/libcrypto/evp/m_ecdsa.c b/src/lib/libcrypto/evp/m_ecdsa.c
index 20a605292d..d4872dcf29 100644
--- a/src/lib/libcrypto/evp/m_ecdsa.c
+++ b/src/lib/libcrypto/evp/m_ecdsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_ecdsa.c,v 1.6 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_ecdsa.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -110,6 +110,9 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113
114#include <openssl/opensslconf.h>
115
113#include "cryptlib.h" 116#include "cryptlib.h"
114#include <openssl/evp.h> 117#include <openssl/evp.h>
115#include <openssl/objects.h> 118#include <openssl/objects.h>
diff --git a/src/lib/libcrypto/evp/m_md4.c b/src/lib/libcrypto/evp/m_md4.c
index 8535db9418..e24d0ad66f 100644
--- a/src/lib/libcrypto/evp/m_md4.c
+++ b/src/lib/libcrypto/evp/m_md4.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_md4.c,v 1.11 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_md4.c,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_MD4 65#ifndef OPENSSL_NO_MD4
diff --git a/src/lib/libcrypto/evp/m_md5.c b/src/lib/libcrypto/evp/m_md5.c
index 93b8672e5a..445b2b4381 100644
--- a/src/lib/libcrypto/evp/m_md5.c
+++ b/src/lib/libcrypto/evp/m_md5.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_md5.c,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_md5.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_MD5 65#ifndef OPENSSL_NO_MD5
diff --git a/src/lib/libcrypto/evp/m_mdc2.c b/src/lib/libcrypto/evp/m_mdc2.c
index a59cc5da66..c360c986d5 100644
--- a/src/lib/libcrypto/evp/m_mdc2.c
+++ b/src/lib/libcrypto/evp/m_mdc2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_mdc2.c,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_mdc2.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_MDC2 65#ifndef OPENSSL_NO_MDC2
diff --git a/src/lib/libcrypto/evp/m_ripemd.c b/src/lib/libcrypto/evp/m_ripemd.c
index 60498bfe8a..c496a205d6 100644
--- a/src/lib/libcrypto/evp/m_ripemd.c
+++ b/src/lib/libcrypto/evp/m_ripemd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_ripemd.c,v 1.9 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_ripemd.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RIPEMD 65#ifndef OPENSSL_NO_RIPEMD
diff --git a/src/lib/libcrypto/evp/m_sha.c b/src/lib/libcrypto/evp/m_sha.c
index 3865e8441f..ed22c1aec5 100644
--- a/src/lib/libcrypto/evp/m_sha.c
+++ b/src/lib/libcrypto/evp/m_sha.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_sha.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_sha.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) 65#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0)
diff --git a/src/lib/libcrypto/evp/m_sha1.c b/src/lib/libcrypto/evp/m_sha1.c
index 9c0a81b4ed..0441f632d3 100644
--- a/src/lib/libcrypto/evp/m_sha1.c
+++ b/src/lib/libcrypto/evp/m_sha1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_sha1.c,v 1.15 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_sha1.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_SHA 65#ifndef OPENSSL_NO_SHA
diff --git a/src/lib/libcrypto/evp/m_wp.c b/src/lib/libcrypto/evp/m_wp.c
index 0ddb7b9f95..c6b246a3c5 100644
--- a/src/lib/libcrypto/evp/m_wp.c
+++ b/src/lib/libcrypto/evp/m_wp.c
@@ -1,6 +1,9 @@
1/* $OpenBSD: m_wp.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_wp.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2 2
3#include <stdio.h> 3#include <stdio.h>
4
5#include <openssl/opensslconf.h>
6
4#include "cryptlib.h" 7#include "cryptlib.h"
5 8
6#ifndef OPENSSL_NO_WHIRLPOOL 9#ifndef OPENSSL_NO_WHIRLPOOL
diff --git a/src/lib/libcrypto/evp/p5_crpt2.c b/src/lib/libcrypto/evp/p5_crpt2.c
index 3a182aabfd..c072376912 100644
--- a/src/lib/libcrypto/evp/p5_crpt2.c
+++ b/src/lib/libcrypto/evp/p5_crpt2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p5_crpt2.c,v 1.15 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: p5_crpt2.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -60,6 +60,8 @@
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#if !defined(OPENSSL_NO_HMAC) && !defined(OPENSSL_NO_SHA) 66#if !defined(OPENSSL_NO_HMAC) && !defined(OPENSSL_NO_SHA)
65#include <openssl/x509.h> 67#include <openssl/x509.h>
diff --git a/src/lib/libcrypto/evp/p_dec.c b/src/lib/libcrypto/evp/p_dec.c
index 5ed2392270..c47408dff0 100644
--- a/src/lib/libcrypto/evp/p_dec.c
+++ b/src/lib/libcrypto/evp/p_dec.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_dec.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_dec.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/rand.h> 64#include <openssl/rand.h>
62#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
diff --git a/src/lib/libcrypto/evp/p_enc.c b/src/lib/libcrypto/evp/p_enc.c
index f6b2e52521..a1fb9d1d2c 100644
--- a/src/lib/libcrypto/evp/p_enc.c
+++ b/src/lib/libcrypto/evp/p_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_enc.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_enc.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/rand.h> 64#include <openssl/rand.h>
62#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c
index 8abaae3bcd..6db5e95cd0 100644
--- a/src/lib/libcrypto/evp/p_lib.c
+++ b/src/lib/libcrypto/evp/p_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_lib.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_lib.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/err.h> 65#include <openssl/err.h>
diff --git a/src/lib/libcrypto/evp/p_open.c b/src/lib/libcrypto/evp/p_open.c
index 2f8a3832f7..aec4d9f3d0 100644
--- a/src/lib/libcrypto/evp/p_open.c
+++ b/src/lib/libcrypto/evp/p_open.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_open.c,v 1.14 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_open.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
diff --git a/src/lib/libcrypto/evp/p_seal.c b/src/lib/libcrypto/evp/p_seal.c
index d590cd7e37..4acb9f8054 100644
--- a/src/lib/libcrypto/evp/p_seal.c
+++ b/src/lib/libcrypto/evp/p_seal.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_seal.c,v 1.11 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_seal.c,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/rand.h> 64#include <openssl/rand.h>
62#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
diff --git a/src/lib/libcrypto/evp/pmeth_lib.c b/src/lib/libcrypto/evp/pmeth_lib.c
index 6f8515c670..f23524b8a9 100644
--- a/src/lib/libcrypto/evp/pmeth_lib.c
+++ b/src/lib/libcrypto/evp/pmeth_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pmeth_lib.c,v 1.6 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: pmeth_lib.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -60,6 +60,8 @@
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/objects.h> 66#include <openssl/objects.h>
65#include <openssl/evp.h> 67#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/lhash/lh_stats.c b/src/lib/libcrypto/lhash/lh_stats.c
index 1c7de61978..b4202efb2e 100644
--- a/src/lib/libcrypto/lhash/lh_stats.c
+++ b/src/lib/libcrypto/lhash/lh_stats.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: lh_stats.c,v 1.10 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: lh_stats.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <stdlib.h> 61#include <stdlib.h>
62
63#include <openssl/opensslconf.h>
64
62/* If you wish to build this outside of SSLeay, remove the following lines 65/* If you wish to build this outside of SSLeay, remove the following lines
63 * and things should work as expected */ 66 * and things should work as expected */
64#include "cryptlib.h" 67#include "cryptlib.h"
diff --git a/src/lib/libcrypto/lhash/lhash.c b/src/lib/libcrypto/lhash/lhash.c
index bfac94a0f7..f4994f7471 100644
--- a/src/lib/libcrypto/lhash/lhash.c
+++ b/src/lib/libcrypto/lhash/lhash.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: lhash.c,v 1.16 2014/07/09 11:10:51 bcook Exp $ */ 1/* $OpenBSD: lhash.c,v 1.17 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -97,6 +97,9 @@
97#include <stdio.h> 97#include <stdio.h>
98#include <string.h> 98#include <string.h>
99#include <stdlib.h> 99#include <stdlib.h>
100
101#include <openssl/opensslconf.h>
102
100#include <openssl/crypto.h> 103#include <openssl/crypto.h>
101#include <openssl/lhash.h> 104#include <openssl/lhash.h>
102 105
diff --git a/src/lib/libcrypto/md32_common.h b/src/lib/libcrypto/md32_common.h
index 0a78a5e86a..af753099f5 100644
--- a/src/lib/libcrypto/md32_common.h
+++ b/src/lib/libcrypto/md32_common.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: md32_common.h,v 1.15 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: md32_common.h,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -109,6 +109,8 @@
109 * <appro@fy.chalmers.se> 109 * <appro@fy.chalmers.se>
110 */ 110 */
111 111
112#include <openssl/opensslconf.h>
113
112#if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN) 114#if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN)
113#error "DATA_ORDER must be defined!" 115#error "DATA_ORDER must be defined!"
114#endif 116#endif
diff --git a/src/lib/libcrypto/md4/md4.h b/src/lib/libcrypto/md4/md4.h
index bbdac701f6..39ee8f5841 100644
--- a/src/lib/libcrypto/md4/md4.h
+++ b/src/lib/libcrypto/md4/md4.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: md4.h,v 1.12 2014/07/10 09:01:04 miod Exp $ */ 1/* $OpenBSD: md4.h,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stddef.h>
60
59#ifndef HEADER_MD4_H 61#ifndef HEADER_MD4_H
60#define HEADER_MD4_H 62#define HEADER_MD4_H
61 63
62#include <stddef.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libcrypto/md5/md5.h b/src/lib/libcrypto/md5/md5.h
index 3f27da8d69..98bdbc7b25 100644
--- a/src/lib/libcrypto/md5/md5.h
+++ b/src/lib/libcrypto/md5/md5.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: md5.h,v 1.16 2014/07/10 09:01:04 miod Exp $ */ 1/* $OpenBSD: md5.h,v 1.17 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stddef.h>
60
59#ifndef HEADER_MD5_H 61#ifndef HEADER_MD5_H
60#define HEADER_MD5_H 62#define HEADER_MD5_H
61 63
62#include <stddef.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libcrypto/mdc2/mdc2.h b/src/lib/libcrypto/mdc2/mdc2.h
index 8ac68a15a9..9128eeb878 100644
--- a/src/lib/libcrypto/mdc2/mdc2.h
+++ b/src/lib/libcrypto/mdc2/mdc2.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: mdc2.h,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: mdc2.h,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#ifndef HEADER_MDC2_H 59#ifndef HEADER_MDC2_H
60#define HEADER_MDC2_H 60#define HEADER_MDC2_H
61 61
62#include <openssl/opensslconf.h>
63
62#include <openssl/des.h> 64#include <openssl/des.h>
63 65
64#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libcrypto/modes/modes_lcl.h b/src/lib/libcrypto/modes/modes_lcl.h
index eacb253e26..8e43e480fc 100644
--- a/src/lib/libcrypto/modes/modes_lcl.h
+++ b/src/lib/libcrypto/modes/modes_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: modes_lcl.h,v 1.7 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: modes_lcl.h,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2010 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2010 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -6,9 +6,11 @@
6 * ==================================================================== 6 * ====================================================================
7 */ 7 */
8 8
9#include <openssl/modes.h>
10#include <machine/endian.h> 9#include <machine/endian.h>
11 10
11#include <openssl/opensslconf.h>
12
13#include <openssl/modes.h>
12 14
13#if defined(_LP64) 15#if defined(_LP64)
14typedef long i64; 16typedef long i64;
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c
index 7221cbc847..4d0307a315 100644
--- a/src/lib/libcrypto/objects/obj_dat.c
+++ b/src/lib/libcrypto/objects/obj_dat.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: obj_dat.c,v 1.28 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: obj_dat.c,v 1.29 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -61,6 +61,8 @@
61#include <stdio.h> 61#include <stdio.h>
62#include <string.h> 62#include <string.h>
63 63
64#include <openssl/opensslconf.h>
65
64#include "cryptlib.h" 66#include "cryptlib.h"
65#include <openssl/lhash.h> 67#include <openssl/lhash.h>
66#include <openssl/asn1.h> 68#include <openssl/asn1.h>
diff --git a/src/lib/libcrypto/objects/obj_err.c b/src/lib/libcrypto/objects/obj_err.c
index 4d07476408..9cea59b785 100644
--- a/src/lib/libcrypto/objects/obj_err.c
+++ b/src/lib/libcrypto/objects/obj_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: obj_err.c,v 1.10 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: obj_err.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/objects.h> 66#include <openssl/objects.h>
64 67
diff --git a/src/lib/libcrypto/ocsp/ocsp_err.c b/src/lib/libcrypto/ocsp/ocsp_err.c
index c4efc1c4e9..af781074b6 100644
--- a/src/lib/libcrypto/ocsp/ocsp_err.c
+++ b/src/lib/libcrypto/ocsp/ocsp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocsp_err.c,v 1.6 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: ocsp_err.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ocsp.h> 66#include <openssl/ocsp.h>
64 67
diff --git a/src/lib/libcrypto/ocsp/ocsp_lib.c b/src/lib/libcrypto/ocsp/ocsp_lib.c
index ce6b0dc65b..eda627f4ed 100644
--- a/src/lib/libcrypto/ocsp/ocsp_lib.c
+++ b/src/lib/libcrypto/ocsp/ocsp_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocsp_lib.c,v 1.12 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: ocsp_lib.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL 2/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL
3 * project. */ 3 * project. */
4 4
@@ -65,6 +65,8 @@
65#include <stdio.h> 65#include <stdio.h>
66#include <string.h> 66#include <string.h>
67 67
68#include <openssl/opensslconf.h>
69
68#include <openssl/objects.h> 70#include <openssl/objects.h>
69#include <openssl/rand.h> 71#include <openssl/rand.h>
70#include <openssl/x509.h> 72#include <openssl/x509.h>
diff --git a/src/lib/libcrypto/pem/pem_all.c b/src/lib/libcrypto/pem/pem_all.c
index a43c81f2c2..e883acdc65 100644
--- a/src/lib/libcrypto/pem/pem_all.c
+++ b/src/lib/libcrypto/pem/pem_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_all.c,v 1.13 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: pem_all.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -110,6 +110,9 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113
114#include <openssl/opensslconf.h>
115
113#include "cryptlib.h" 116#include "cryptlib.h"
114#include <openssl/bio.h> 117#include <openssl/bio.h>
115#include <openssl/evp.h> 118#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/pem/pem_err.c b/src/lib/libcrypto/pem/pem_err.c
index b7453f3f66..c3d0fa3576 100644
--- a/src/lib/libcrypto/pem/pem_err.c
+++ b/src/lib/libcrypto/pem/pem_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_err.c,v 1.10 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: pem_err.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/pem.h> 66#include <openssl/pem.h>
64 67
diff --git a/src/lib/libcrypto/pem/pem_info.c b/src/lib/libcrypto/pem/pem_info.c
index 0c8946550e..eaf70e4267 100644
--- a/src/lib/libcrypto/pem/pem_info.c
+++ b/src/lib/libcrypto/pem/pem_info.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_info.c,v 1.17 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pem_info.c,v 1.18 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/buffer.h> 65#include <openssl/buffer.h>
64#include <openssl/objects.h> 66#include <openssl/objects.h>
diff --git a/src/lib/libcrypto/pem/pem_lib.c b/src/lib/libcrypto/pem/pem_lib.c
index 130a2739a5..70e2aa633d 100644
--- a/src/lib/libcrypto/pem/pem_lib.c
+++ b/src/lib/libcrypto/pem/pem_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_lib.c,v 1.31 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pem_lib.c,v 1.32 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,8 @@
60#include <stdio.h> 60#include <stdio.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/buffer.h> 66#include <openssl/buffer.h>
65#include <openssl/objects.h> 67#include <openssl/objects.h>
diff --git a/src/lib/libcrypto/pem/pem_pkey.c b/src/lib/libcrypto/pem/pem_pkey.c
index cfa3c12752..68d6590f14 100644
--- a/src/lib/libcrypto/pem/pem_pkey.c
+++ b/src/lib/libcrypto/pem/pem_pkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_pkey.c,v 1.15 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pem_pkey.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/buffer.h> 65#include <openssl/buffer.h>
64#include <openssl/objects.h> 66#include <openssl/objects.h>
diff --git a/src/lib/libcrypto/pem/pem_seal.c b/src/lib/libcrypto/pem/pem_seal.c
index 45ea52b24b..08680e45db 100644
--- a/src/lib/libcrypto/pem/pem_seal.c
+++ b/src/lib/libcrypto/pem/pem_seal.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_seal.c,v 1.18 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pem_seal.c,v 1.19 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,7 @@
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h> /* for OPENSSL_NO_RSA */ 62#include <openssl/opensslconf.h> /* for OPENSSL_NO_RSA */
63
63#ifndef OPENSSL_NO_RSA 64#ifndef OPENSSL_NO_RSA
64#include "cryptlib.h" 65#include "cryptlib.h"
65#include <openssl/evp.h> 66#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/pem/pvkfmt.c b/src/lib/libcrypto/pem/pvkfmt.c
index 53c96e088c..8a945b4dd7 100644
--- a/src/lib/libcrypto/pem/pvkfmt.c
+++ b/src/lib/libcrypto/pem/pvkfmt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pvkfmt.c,v 1.7 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pvkfmt.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2005. 3 * project 2005.
4 */ 4 */
@@ -62,6 +62,8 @@
62 62
63#include <string.h> 63#include <string.h>
64 64
65#include <openssl/opensslconf.h>
66
65#include "cryptlib.h" 67#include "cryptlib.h"
66#include <openssl/pem.h> 68#include <openssl/pem.h>
67#include <openssl/rand.h> 69#include <openssl/rand.h>
diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c
index fabc96e858..582d1de23b 100644
--- a/src/lib/libcrypto/pkcs12/p12_mutl.c
+++ b/src/lib/libcrypto/pkcs12/p12_mutl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_mutl.c,v 1.15 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: p12_mutl.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#ifndef OPENSSL_NO_HMAC 64#ifndef OPENSSL_NO_HMAC
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/hmac.h> 66#include <openssl/hmac.h>
diff --git a/src/lib/libcrypto/pkcs12/pk12err.c b/src/lib/libcrypto/pkcs12/pk12err.c
index 12f418eb23..0464a8303c 100644
--- a/src/lib/libcrypto/pkcs12/pk12err.c
+++ b/src/lib/libcrypto/pkcs12/pk12err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pk12err.c,v 1.9 2014/07/08 09:24:53 jsing Exp $ */ 1/* $OpenBSD: pk12err.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/pkcs12.h> 66#include <openssl/pkcs12.h>
64 67
diff --git a/src/lib/libcrypto/pkcs7/pkcs7err.c b/src/lib/libcrypto/pkcs7/pkcs7err.c
index a194e2dadc..8a67bf5221 100644
--- a/src/lib/libcrypto/pkcs7/pkcs7err.c
+++ b/src/lib/libcrypto/pkcs7/pkcs7err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs7err.c,v 1.10 2014/06/29 17:05:36 jsing Exp $ */ 1/* $OpenBSD: pkcs7err.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/pkcs7.h> 66#include <openssl/pkcs7.h>
64 67
diff --git a/src/lib/libcrypto/rand/rand.h b/src/lib/libcrypto/rand/rand.h
index af3d111b13..6ed16b9c41 100644
--- a/src/lib/libcrypto/rand/rand.h
+++ b/src/lib/libcrypto/rand/rand.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rand.h,v 1.20 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rand.h,v 1.21 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdlib.h>
60
59#ifndef HEADER_RAND_H 61#ifndef HEADER_RAND_H
60#define HEADER_RAND_H 62#define HEADER_RAND_H
61 63
62#include <stdlib.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#include <openssl/ossl_typ.h> 66#include <openssl/ossl_typ.h>
diff --git a/src/lib/libcrypto/rand/rand_err.c b/src/lib/libcrypto/rand/rand_err.c
index 35b1d43666..3f91fcb37b 100644
--- a/src/lib/libcrypto/rand/rand_err.c
+++ b/src/lib/libcrypto/rand/rand_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rand_err.c,v 1.13 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rand_err.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/rand.h> 66#include <openssl/rand.h>
64 67
diff --git a/src/lib/libcrypto/rand/rand_lib.c b/src/lib/libcrypto/rand/rand_lib.c
index 200a868d70..38c1569940 100644
--- a/src/lib/libcrypto/rand/rand_lib.c
+++ b/src/lib/libcrypto/rand/rand_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rand_lib.c,v 1.17 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rand_lib.c,v 1.18 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 3 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
4 * 4 *
@@ -14,6 +14,9 @@
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */ 16 */
17
18#include <openssl/opensslconf.h>
19
17#include "cryptlib.h" 20#include "cryptlib.h"
18#include <openssl/rand.h> 21#include <openssl/rand.h>
19 22
diff --git a/src/lib/libcrypto/rc2/rc2.h b/src/lib/libcrypto/rc2/rc2.h
index eeec3c0c9b..21511ff36e 100644
--- a/src/lib/libcrypto/rc2/rc2.h
+++ b/src/lib/libcrypto/rc2/rc2.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rc2.h,v 1.10 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rc2.h,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,7 @@
60#define HEADER_RC2_H 60#define HEADER_RC2_H
61 61
62#include <openssl/opensslconf.h> /* OPENSSL_NO_RC2, RC2_INT */ 62#include <openssl/opensslconf.h> /* OPENSSL_NO_RC2, RC2_INT */
63
63#ifdef OPENSSL_NO_RC2 64#ifdef OPENSSL_NO_RC2
64#error RC2 is disabled. 65#error RC2 is disabled.
65#endif 66#endif
diff --git a/src/lib/libcrypto/rc4/rc4.h b/src/lib/libcrypto/rc4/rc4.h
index 0712fc0a95..5359577402 100644
--- a/src/lib/libcrypto/rc4/rc4.h
+++ b/src/lib/libcrypto/rc4/rc4.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rc4.h,v 1.11 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rc4.h,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,7 @@
60#define HEADER_RC4_H 60#define HEADER_RC4_H
61 61
62#include <openssl/opensslconf.h> /* OPENSSL_NO_RC4, RC4_INT */ 62#include <openssl/opensslconf.h> /* OPENSSL_NO_RC4, RC4_INT */
63
63#ifdef OPENSSL_NO_RC4 64#ifdef OPENSSL_NO_RC4
64#error RC4 is disabled. 65#error RC4 is disabled.
65#endif 66#endif
diff --git a/src/lib/libcrypto/rc5/rc5_locl.h b/src/lib/libcrypto/rc5/rc5_locl.h
index 07e1503981..07671decaa 100644
--- a/src/lib/libcrypto/rc5/rc5_locl.h
+++ b/src/lib/libcrypto/rc5/rc5_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rc5_locl.h,v 1.4 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rc5_locl.h,v 1.5 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,8 @@
58 58
59#include <stdlib.h> 59#include <stdlib.h>
60 60
61#include <openssl/opensslconf.h>
62
61#undef c2l 63#undef c2l
62#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \ 64#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
63 l|=((unsigned long)(*((c)++)))<< 8L, \ 65 l|=((unsigned long)(*((c)++)))<< 8L, \
diff --git a/src/lib/libcrypto/ripemd/ripemd.h b/src/lib/libcrypto/ripemd/ripemd.h
index 820d0a2a69..a5f3a12937 100644
--- a/src/lib/libcrypto/ripemd/ripemd.h
+++ b/src/lib/libcrypto/ripemd/ripemd.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ripemd.h,v 1.13 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: ripemd.h,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stddef.h>
60
59#ifndef HEADER_RIPEMD_H 61#ifndef HEADER_RIPEMD_H
60#define HEADER_RIPEMD_H 62#define HEADER_RIPEMD_H
61 63
62#include <stddef.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h
index b84ab4c6d7..d15d1f1c97 100644
--- a/src/lib/libcrypto/rsa/rsa.h
+++ b/src/lib/libcrypto/rsa/rsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa.h,v 1.24 2014/07/10 12:08:22 jsing Exp $ */ 1/* $OpenBSD: rsa.h,v 1.25 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#ifndef HEADER_RSA_H 59#ifndef HEADER_RSA_H
60#define HEADER_RSA_H 60#define HEADER_RSA_H
61 61
62#include <openssl/opensslconf.h>
63
62#include <openssl/asn1.h> 64#include <openssl/asn1.h>
63 65
64#ifndef OPENSSL_NO_BIO 66#ifndef OPENSSL_NO_BIO
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c
index 679fe7b318..1eeb58ed9b 100644
--- a/src/lib/libcrypto/rsa/rsa_ameth.c
+++ b/src/lib/libcrypto/rsa/rsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_ameth.c,v 1.9 2014/07/09 22:55:17 tedu Exp $ */ 1/* $OpenBSD: rsa_ameth.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/asn1t.h> 64#include <openssl/asn1t.h>
62#include <openssl/x509.h> 65#include <openssl/x509.h>
diff --git a/src/lib/libcrypto/rsa/rsa_crpt.c b/src/lib/libcrypto/rsa/rsa_crpt.c
index 5de69a6fb5..220ce9497a 100644
--- a/src/lib/libcrypto/rsa/rsa_crpt.c
+++ b/src/lib/libcrypto/rsa/rsa_crpt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_crpt.c,v 1.9 2014/07/10 12:36:58 miod Exp $ */ 1/* $OpenBSD: rsa_crpt.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/crypto.h> 63#include <openssl/crypto.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/lhash.h> 65#include <openssl/lhash.h>
diff --git a/src/lib/libcrypto/rsa/rsa_depr.c b/src/lib/libcrypto/rsa/rsa_depr.c
index f66c832b2a..547f9a491e 100644
--- a/src/lib/libcrypto/rsa/rsa_depr.c
+++ b/src/lib/libcrypto/rsa/rsa_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_depr.c,v 1.6 2014/07/10 07:43:11 jsing Exp $ */ 1/* $OpenBSD: rsa_depr.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <time.h> 60#include <time.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/bn.h> 65#include <openssl/bn.h>
63#include <openssl/rsa.h> 66#include <openssl/rsa.h>
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c
index 9b390fb8c0..3cc8f6c5cf 100644
--- a/src/lib/libcrypto/rsa/rsa_eay.c
+++ b/src/lib/libcrypto/rsa/rsa_eay.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_eay.c,v 1.32 2014/07/10 07:43:11 jsing Exp $ */ 1/* $OpenBSD: rsa_eay.c,v 1.33 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -110,6 +110,9 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113
114#include <openssl/opensslconf.h>
115
113#include "cryptlib.h" 116#include "cryptlib.h"
114#include <openssl/bn.h> 117#include <openssl/bn.h>
115#include <openssl/rsa.h> 118#include <openssl/rsa.h>
diff --git a/src/lib/libcrypto/rsa/rsa_err.c b/src/lib/libcrypto/rsa/rsa_err.c
index 893069a892..4c4a3551c5 100644
--- a/src/lib/libcrypto/rsa/rsa_err.c
+++ b/src/lib/libcrypto/rsa/rsa_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_err.c,v 1.14 2014/07/09 19:51:38 jsing Exp $ */ 1/* $OpenBSD: rsa_err.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/rsa.h> 66#include <openssl/rsa.h>
64 67
diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c
index 6f378ba0c0..d7a51c7b05 100644
--- a/src/lib/libcrypto/rsa/rsa_lib.c
+++ b/src/lib/libcrypto/rsa/rsa_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_lib.c,v 1.26 2014/07/10 07:43:11 jsing Exp $ */ 1/* $OpenBSD: rsa_lib.c,v 1.27 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/crypto.h> 63#include <openssl/crypto.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/lhash.h> 65#include <openssl/lhash.h>
diff --git a/src/lib/libcrypto/rsa/rsa_oaep.c b/src/lib/libcrypto/rsa/rsa_oaep.c
index 893fbc04b8..09799818d3 100644
--- a/src/lib/libcrypto/rsa/rsa_oaep.c
+++ b/src/lib/libcrypto/rsa/rsa_oaep.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_oaep.c,v 1.21 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: rsa_oaep.c,v 1.22 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Ulf Moeller. This software is distributed on an "AS IS" 2/* Written by Ulf Moeller. This software is distributed on an "AS IS"
3 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. */ 3 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. */
4 4
@@ -21,6 +21,8 @@
21#include <stdio.h> 21#include <stdio.h>
22#include <string.h> 22#include <string.h>
23 23
24#include <openssl/opensslconf.h>
25
24#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1) 26#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)
25#include "cryptlib.h" 27#include "cryptlib.h"
26#include <openssl/bn.h> 28#include <openssl/bn.h>
diff --git a/src/lib/libcrypto/rsa/rsa_pmeth.c b/src/lib/libcrypto/rsa/rsa_pmeth.c
index f9ebd9baba..0b2d680eed 100644
--- a/src/lib/libcrypto/rsa/rsa_pmeth.c
+++ b/src/lib/libcrypto/rsa/rsa_pmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_pmeth.c,v 1.12 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: rsa_pmeth.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -60,6 +60,8 @@
60#include <stdio.h> 60#include <stdio.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/asn1t.h> 66#include <openssl/asn1t.h>
65#include <openssl/x509.h> 67#include <openssl/x509.h>
diff --git a/src/lib/libcrypto/sha/sha.h b/src/lib/libcrypto/sha/sha.h
index 5baa80e62f..c2e303fcc2 100644
--- a/src/lib/libcrypto/sha/sha.h
+++ b/src/lib/libcrypto/sha/sha.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha.h,v 1.16 2014/07/10 09:01:04 miod Exp $ */ 1/* $OpenBSD: sha.h,v 1.17 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stddef.h>
60
59#ifndef HEADER_SHA_H 61#ifndef HEADER_SHA_H
60#define HEADER_SHA_H 62#define HEADER_SHA_H
61 63
62#include <stddef.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libcrypto/sha/sha1_one.c b/src/lib/libcrypto/sha/sha1_one.c
index b6178c39af..f6b5e4bacf 100644
--- a/src/lib/libcrypto/sha/sha1_one.c
+++ b/src/lib/libcrypto/sha/sha1_one.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha1_one.c,v 1.10 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: sha1_one.c,v 1.11 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61
62#include <openssl/opensslconf.h>
63
61#include <openssl/crypto.h> 64#include <openssl/crypto.h>
62#include <openssl/sha.h> 65#include <openssl/sha.h>
63 66
diff --git a/src/lib/libcrypto/sha/sha1dgst.c b/src/lib/libcrypto/sha/sha1dgst.c
index 94fabddd83..aac27bdd2d 100644
--- a/src/lib/libcrypto/sha/sha1dgst.c
+++ b/src/lib/libcrypto/sha/sha1dgst.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha1dgst.c,v 1.12 2014/07/09 11:10:51 bcook Exp $ */ 1/* $OpenBSD: sha1dgst.c,v 1.13 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,8 +56,10 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <openssl/crypto.h>
60#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
61#include <openssl/crypto.h>
62
61#if !defined(OPENSSL_NO_SHA1) && !defined(OPENSSL_NO_SHA) 63#if !defined(OPENSSL_NO_SHA1) && !defined(OPENSSL_NO_SHA)
62 64
63#undef SHA_0 65#undef SHA_0
diff --git a/src/lib/libcrypto/sha/sha256.c b/src/lib/libcrypto/sha/sha256.c
index 6d7af561fc..a4c259dab7 100644
--- a/src/lib/libcrypto/sha/sha256.c
+++ b/src/lib/libcrypto/sha/sha256.c
@@ -1,15 +1,18 @@
1/* $OpenBSD: sha256.c,v 1.6 2014/07/09 16:06:13 miod Exp $ */ 1/* $OpenBSD: sha256.c,v 1.7 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved 3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved
4 * according to the OpenSSL license [found in ../../LICENSE]. 4 * according to the OpenSSL license [found in ../../LICENSE].
5 * ==================================================================== 5 * ====================================================================
6 */ 6 */
7
7#include <openssl/opensslconf.h> 8#include <openssl/opensslconf.h>
9
8#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256) 10#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256)
9 11
12#include <machine/endian.h>
13
10#include <stdlib.h> 14#include <stdlib.h>
11#include <string.h> 15#include <string.h>
12#include <machine/endian.h>
13 16
14#include <openssl/crypto.h> 17#include <openssl/crypto.h>
15#include <openssl/sha.h> 18#include <openssl/sha.h>
diff --git a/src/lib/libcrypto/sha/sha512.c b/src/lib/libcrypto/sha/sha512.c
index 01ec6a6cde..eb10024e32 100644
--- a/src/lib/libcrypto/sha/sha512.c
+++ b/src/lib/libcrypto/sha/sha512.c
@@ -1,10 +1,17 @@
1/* $OpenBSD: sha512.c,v 1.11 2014/07/09 16:06:13 miod Exp $ */ 1/* $OpenBSD: sha512.c,v 1.12 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved 3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved
4 * according to the OpenSSL license [found in ../../LICENSE]. 4 * according to the OpenSSL license [found in ../../LICENSE].
5 * ==================================================================== 5 * ====================================================================
6 */ 6 */
7
8#include <machine/endian.h>
9
10#include <stdlib.h>
11#include <string.h>
12
7#include <openssl/opensslconf.h> 13#include <openssl/opensslconf.h>
14
8#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA512) 15#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA512)
9/* 16/*
10 * IMPLEMENTATION NOTES. 17 * IMPLEMENTATION NOTES.
@@ -41,9 +48,6 @@
41 * 16-bit platforms. 48 * 16-bit platforms.
42 * <appro@fy.chalmers.se> 49 * <appro@fy.chalmers.se>
43 */ 50 */
44#include <stdlib.h>
45#include <string.h>
46#include <machine/endian.h>
47 51
48#include <openssl/crypto.h> 52#include <openssl/crypto.h>
49#include <openssl/sha.h> 53#include <openssl/sha.h>
diff --git a/src/lib/libcrypto/sha/sha_dgst.c b/src/lib/libcrypto/sha/sha_dgst.c
index a255450977..bb8c0c244f 100644
--- a/src/lib/libcrypto/sha/sha_dgst.c
+++ b/src/lib/libcrypto/sha/sha_dgst.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha_dgst.c,v 1.11 2014/07/09 11:10:51 bcook Exp $ */ 1/* $OpenBSD: sha_dgst.c,v 1.12 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,8 +56,10 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <openssl/crypto.h>
60#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
61#include <openssl/crypto.h>
62
61#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA) 63#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA)
62 64
63#undef SHA_1 65#undef SHA_1
@@ -70,4 +72,3 @@
70#include "sha_locl.h" 72#include "sha_locl.h"
71 73
72#endif 74#endif
73
diff --git a/src/lib/libcrypto/sha/sha_one.c b/src/lib/libcrypto/sha/sha_one.c
index 557d3cab6a..1d3fc35f05 100644
--- a/src/lib/libcrypto/sha/sha_one.c
+++ b/src/lib/libcrypto/sha/sha_one.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha_one.c,v 1.7 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: sha_one.c,v 1.8 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,8 +58,11 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <openssl/sha.h> 61
62#include <openssl/opensslconf.h>
63
62#include <openssl/crypto.h> 64#include <openssl/crypto.h>
65#include <openssl/sha.h>
63 66
64#ifndef OPENSSL_NO_SHA0 67#ifndef OPENSSL_NO_SHA0
65unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md) 68unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md)
diff --git a/src/lib/libcrypto/srp/srp.h b/src/lib/libcrypto/srp/srp.h
index 53e7b8049a..168d9656b3 100644
--- a/src/lib/libcrypto/srp/srp.h
+++ b/src/lib/libcrypto/srp/srp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: srp.h,v 1.2 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: srp.h,v 1.3 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with 2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with
3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr) 3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr)
4 * for the EdelKey project and contributed to the OpenSSL project 2004. 4 * for the EdelKey project and contributed to the OpenSSL project 2004.
@@ -59,6 +59,8 @@
59#ifndef __SRP_H__ 59#ifndef __SRP_H__
60#define __SRP_H__ 60#define __SRP_H__
61 61
62#include <openssl/opensslconf.h>
63
62#ifndef OPENSSL_NO_SRP 64#ifndef OPENSSL_NO_SRP
63 65
64#include <stdio.h> 66#include <stdio.h>
diff --git a/src/lib/libcrypto/srp/srp_lib.c b/src/lib/libcrypto/srp/srp_lib.c
index 19056d4008..078296fa0a 100644
--- a/src/lib/libcrypto/srp/srp_lib.c
+++ b/src/lib/libcrypto/srp/srp_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: srp_lib.c,v 1.7 2014/07/10 20:22:00 miod Exp $ */ 1/* $OpenBSD: srp_lib.c,v 1.8 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with 2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with
3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr) 3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr)
4 * for the EdelKey project and contributed to the OpenSSL project 2004. 4 * for the EdelKey project and contributed to the OpenSSL project 2004.
@@ -56,6 +56,9 @@
56 * Hudson (tjh@cryptsoft.com). 56 * Hudson (tjh@cryptsoft.com).
57 * 57 *
58 */ 58 */
59
60#include <openssl/opensslconf.h>
61
59#ifndef OPENSSL_NO_SRP 62#ifndef OPENSSL_NO_SRP
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include "srp_lcl.h" 64#include "srp_lcl.h"
diff --git a/src/lib/libcrypto/srp/srp_vfy.c b/src/lib/libcrypto/srp/srp_vfy.c
index fb6e0ab806..756744609a 100644
--- a/src/lib/libcrypto/srp/srp_vfy.c
+++ b/src/lib/libcrypto/srp/srp_vfy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: srp_vfy.c,v 1.5 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: srp_vfy.c,v 1.6 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with 2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with
3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr) 3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr)
4 * for the EdelKey project and contributed to the OpenSSL project 2004. 4 * for the EdelKey project and contributed to the OpenSSL project 2004.
@@ -56,6 +56,9 @@
56 * Hudson (tjh@cryptsoft.com). 56 * Hudson (tjh@cryptsoft.com).
57 * 57 *
58 */ 58 */
59
60#include <openssl/opensslconf.h>
61
59#ifndef OPENSSL_NO_SRP 62#ifndef OPENSSL_NO_SRP
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include "srp_lcl.h" 64#include "srp_lcl.h"
diff --git a/src/lib/libcrypto/store/str_err.c b/src/lib/libcrypto/store/str_err.c
index a3f7f2aa46..ff353920ab 100644
--- a/src/lib/libcrypto/store/str_err.c
+++ b/src/lib/libcrypto/store/str_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: str_err.c,v 1.3 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: str_err.c,v 1.4 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/store.h> 66#include <openssl/store.h>
64 67
diff --git a/src/lib/libcrypto/store/str_lib.c b/src/lib/libcrypto/store/str_lib.c
index 2e76b6e728..ff00aa19ce 100644
--- a/src/lib/libcrypto/store/str_lib.c
+++ b/src/lib/libcrypto/store/str_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: str_lib.c,v 1.9 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: str_lib.c,v 1.10 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2003. 3 * project 2003.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <string.h> 59#include <string.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/bn.h> 63#include <openssl/bn.h>
61#include <openssl/err.h> 64#include <openssl/err.h>
62#ifndef OPENSSL_NO_ENGINE 65#ifndef OPENSSL_NO_ENGINE
diff --git a/src/lib/libcrypto/ts/ts.h b/src/lib/libcrypto/ts/ts.h
index a6010fe86a..4457d30dd7 100644
--- a/src/lib/libcrypto/ts/ts.h
+++ b/src/lib/libcrypto/ts/ts.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts.h,v 1.6 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: ts.h,v 1.7 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL
3 * project 2002, 2003, 2004. 3 * project 2002, 2003, 2004.
4 */ 4 */
@@ -60,6 +60,7 @@
60#define HEADER_TS_H 60#define HEADER_TS_H
61 61
62#include <openssl/opensslconf.h> 62#include <openssl/opensslconf.h>
63
63#ifndef OPENSSL_NO_BUFFER 64#ifndef OPENSSL_NO_BUFFER
64#include <openssl/buffer.h> 65#include <openssl/buffer.h>
65#endif 66#endif
diff --git a/src/lib/libcrypto/ts/ts_asn1.c b/src/lib/libcrypto/ts/ts_asn1.c
index 8ee9f08221..bb87aa1d88 100644
--- a/src/lib/libcrypto/ts/ts_asn1.c
+++ b/src/lib/libcrypto/ts/ts_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_asn1.c,v 1.4 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ts_asn1.c,v 1.5 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Nils Larsch for the OpenSSL project 2004. 2/* Written by Nils Larsch for the OpenSSL project 2004.
3 */ 3 */
4/* ==================================================================== 4/* ====================================================================
@@ -55,6 +55,8 @@
55 * 55 *
56 */ 56 */
57 57
58#include <openssl/opensslconf.h>
59
58#include <openssl/ts.h> 60#include <openssl/ts.h>
59#include <openssl/err.h> 61#include <openssl/err.h>
60#include <openssl/asn1t.h> 62#include <openssl/asn1t.h>
diff --git a/src/lib/libcrypto/ts/ts_conf.c b/src/lib/libcrypto/ts/ts_conf.c
index b71caa8df0..685fdc0736 100644
--- a/src/lib/libcrypto/ts/ts_conf.c
+++ b/src/lib/libcrypto/ts/ts_conf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_conf.c,v 1.5 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ts_conf.c,v 1.6 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
3 * project 2002. 3 * project 2002.
4 */ 4 */
@@ -58,6 +58,8 @@
58 58
59#include <string.h> 59#include <string.h>
60 60
61#include <openssl/opensslconf.h>
62
61#include <openssl/crypto.h> 63#include <openssl/crypto.h>
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/pem.h> 65#include <openssl/pem.h>
diff --git a/src/lib/libcrypto/ts/ts_err.c b/src/lib/libcrypto/ts/ts_err.c
index 0fbfddea2f..f71be883f8 100644
--- a/src/lib/libcrypto/ts/ts_err.c
+++ b/src/lib/libcrypto/ts/ts_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_err.c,v 1.3 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ts_err.c,v 1.4 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ts.h> 66#include <openssl/ts.h>
64 67
diff --git a/src/lib/libcrypto/txt_db/txt_db.h b/src/lib/libcrypto/txt_db/txt_db.h
index 4668cfb624..56b6b42482 100644
--- a/src/lib/libcrypto/txt_db/txt_db.h
+++ b/src/lib/libcrypto/txt_db/txt_db.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: txt_db.h,v 1.8 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: txt_db.h,v 1.9 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,7 @@
60#define HEADER_TXT_DB_H 60#define HEADER_TXT_DB_H
61 61
62#include <openssl/opensslconf.h> 62#include <openssl/opensslconf.h>
63
63#ifndef OPENSSL_NO_BIO 64#ifndef OPENSSL_NO_BIO
64#include <openssl/bio.h> 65#include <openssl/bio.h>
65#endif 66#endif
diff --git a/src/lib/libcrypto/ui/ui.h b/src/lib/libcrypto/ui/ui.h
index 5abd5c2d7f..b6b0075e4d 100644
--- a/src/lib/libcrypto/ui/ui.h
+++ b/src/lib/libcrypto/ui/ui.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ui.h,v 1.8 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ui.h,v 1.9 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -59,6 +59,8 @@
59#ifndef HEADER_UI_H 59#ifndef HEADER_UI_H
60#define HEADER_UI_H 60#define HEADER_UI_H
61 61
62#include <openssl/opensslconf.h>
63
62#ifndef OPENSSL_NO_DEPRECATED 64#ifndef OPENSSL_NO_DEPRECATED
63#include <openssl/crypto.h> 65#include <openssl/crypto.h>
64#endif 66#endif
diff --git a/src/lib/libcrypto/ui/ui_err.c b/src/lib/libcrypto/ui/ui_err.c
index 3c204171f3..576f334796 100644
--- a/src/lib/libcrypto/ui/ui_err.c
+++ b/src/lib/libcrypto/ui/ui_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ui_err.c,v 1.7 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ui_err.c,v 1.8 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ui.h> 66#include <openssl/ui.h>
64 67
diff --git a/src/lib/libcrypto/whrlpool/whrlpool.h b/src/lib/libcrypto/whrlpool/whrlpool.h
index e0ff0f872d..875d34f7d3 100644
--- a/src/lib/libcrypto/whrlpool/whrlpool.h
+++ b/src/lib/libcrypto/whrlpool/whrlpool.h
@@ -1,10 +1,10 @@
1/* $OpenBSD: whrlpool.h,v 1.4 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: whrlpool.h,v 1.5 2014/07/10 22:45:58 jsing Exp $ */
2
3#include <stddef.h>
2 4
3#ifndef HEADER_WHRLPOOL_H 5#ifndef HEADER_WHRLPOOL_H
4#define HEADER_WHRLPOOL_H 6#define HEADER_WHRLPOOL_H
5 7
6#include <stddef.h>
7
8#include <openssl/opensslconf.h> 8#include <openssl/opensslconf.h>
9 9
10#ifdef __cplusplus 10#ifdef __cplusplus
diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c
index 2a5fb04373..110c22d6f5 100644
--- a/src/lib/libcrypto/x509/by_dir.c
+++ b/src/lib/libcrypto/x509/by_dir.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: by_dir.c,v 1.30 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: by_dir.c,v 1.31 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,15 +56,18 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <sys/types.h>
60
59#include <errno.h> 61#include <errno.h>
60#include <stdio.h> 62#include <stdio.h>
61#include <string.h> 63#include <string.h>
62#include <time.h> 64#include <time.h>
63#include <unistd.h> 65#include <unistd.h>
64 66
67#include <openssl/opensslconf.h>
68
65#include "cryptlib.h" 69#include "cryptlib.h"
66 70
67#include <sys/types.h>
68#ifndef OPENSSL_NO_POSIX_IO 71#ifndef OPENSSL_NO_POSIX_IO
69# include <sys/stat.h> 72# include <sys/stat.h>
70#endif 73#endif
@@ -72,7 +75,6 @@
72#include <openssl/lhash.h> 75#include <openssl/lhash.h>
73#include <openssl/x509.h> 76#include <openssl/x509.h>
74 77
75
76typedef struct lookup_dir_hashes_st { 78typedef struct lookup_dir_hashes_st {
77 unsigned long hash; 79 unsigned long hash;
78 int suffix; 80 int suffix;
diff --git a/src/lib/libcrypto/x509/x509_cmp.c b/src/lib/libcrypto/x509/x509_cmp.c
index aa85286d8b..20b4ceba27 100644
--- a/src/lib/libcrypto/x509/x509_cmp.c
+++ b/src/lib/libcrypto/x509/x509_cmp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_cmp.c,v 1.20 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: x509_cmp.c,v 1.21 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,8 @@
60#include <stdio.h> 60#include <stdio.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/asn1.h> 66#include <openssl/asn1.h>
65#include <openssl/objects.h> 67#include <openssl/objects.h>
diff --git a/src/lib/libcrypto/x509/x509_err.c b/src/lib/libcrypto/x509/x509_err.c
index 93b8fa7698..6a15ac9fd0 100644
--- a/src/lib/libcrypto/x509/x509_err.c
+++ b/src/lib/libcrypto/x509/x509_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_err.c,v 1.11 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x509_err.c,v 1.12 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/x509.h> 66#include <openssl/x509.h>
64 67
diff --git a/src/lib/libcrypto/x509/x509_req.c b/src/lib/libcrypto/x509/x509_req.c
index b041a154e4..d22fc12a70 100644
--- a/src/lib/libcrypto/x509/x509_req.c
+++ b/src/lib/libcrypto/x509/x509_req.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_req.c,v 1.13 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x509_req.c,v 1.14 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c
index 5150ffa5d2..60067d220f 100644
--- a/src/lib/libcrypto/x509/x509_vfy.c
+++ b/src/lib/libcrypto/x509/x509_vfy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_vfy.c,v 1.31 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: x509_vfy.c,v 1.32 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -62,6 +62,8 @@
62#include <time.h> 62#include <time.h>
63#include <unistd.h> 63#include <unistd.h>
64 64
65#include <openssl/opensslconf.h>
66
65#include "cryptlib.h" 67#include "cryptlib.h"
66#include <openssl/crypto.h> 68#include <openssl/crypto.h>
67#include <openssl/lhash.h> 69#include <openssl/lhash.h>
diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h
index dfc0f700dc..5b411ca678 100644
--- a/src/lib/libcrypto/x509/x509_vfy.h
+++ b/src/lib/libcrypto/x509/x509_vfy.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_vfy.h,v 1.12 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x509_vfy.h,v 1.13 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -66,6 +66,7 @@
66#define HEADER_X509_VFY_H 66#define HEADER_X509_VFY_H
67 67
68#include <openssl/opensslconf.h> 68#include <openssl/opensslconf.h>
69
69#ifndef OPENSSL_NO_LHASH 70#ifndef OPENSSL_NO_LHASH
70#include <openssl/lhash.h> 71#include <openssl/lhash.h>
71#endif 72#endif
diff --git a/src/lib/libcrypto/x509/x_all.c b/src/lib/libcrypto/x509/x_all.c
index 4461c7dda9..f01e47416d 100644
--- a/src/lib/libcrypto/x509/x_all.c
+++ b/src/lib/libcrypto/x509/x_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_all.c,v 1.16 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x_all.c,v 1.17 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/stack.h> 63#include <openssl/stack.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/buffer.h> 65#include <openssl/buffer.h>
diff --git a/src/lib/libcrypto/x509v3/ext_dat.h b/src/lib/libcrypto/x509v3/ext_dat.h
index 36d535d42d..1111af2108 100644
--- a/src/lib/libcrypto/x509v3/ext_dat.h
+++ b/src/lib/libcrypto/x509v3/ext_dat.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ext_dat.h,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ext_dat.h,v 1.11 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -55,6 +55,9 @@
55 * Hudson (tjh@cryptsoft.com). 55 * Hudson (tjh@cryptsoft.com).
56 * 56 *
57 */ 57 */
58
59#include <openssl/opensslconf.h>
60
58/* This file contains a table of "standard" extensions */ 61/* This file contains a table of "standard" extensions */
59 62
60extern X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku; 63extern X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku;
diff --git a/src/lib/libcrypto/x509v3/v3_addr.c b/src/lib/libcrypto/x509v3/v3_addr.c
index 3fb43603c0..9099994dc4 100644
--- a/src/lib/libcrypto/x509v3/v3_addr.c
+++ b/src/lib/libcrypto/x509v3/v3_addr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_addr.c,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: v3_addr.c,v 1.11 2014/07/10 22:45:58 jsing Exp $ */
2/* 2/*
3 * Contributed to the OpenSSL Project by the American Registry for 3 * Contributed to the OpenSSL Project by the American Registry for
4 * Internet Numbers ("ARIN"). 4 * Internet Numbers ("ARIN").
@@ -63,6 +63,8 @@
63#include <stdio.h> 63#include <stdio.h>
64#include <stdlib.h> 64#include <stdlib.h>
65 65
66#include <openssl/opensslconf.h>
67
66#include "cryptlib.h" 68#include "cryptlib.h"
67#include <openssl/conf.h> 69#include <openssl/conf.h>
68#include <openssl/asn1.h> 70#include <openssl/asn1.h>
diff --git a/src/lib/libcrypto/x509v3/v3_asid.c b/src/lib/libcrypto/x509v3/v3_asid.c
index b3245c9fe1..473304c1e5 100644
--- a/src/lib/libcrypto/x509v3/v3_asid.c
+++ b/src/lib/libcrypto/x509v3/v3_asid.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_asid.c,v 1.8 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: v3_asid.c,v 1.9 2014/07/10 22:45:58 jsing Exp $ */
2/* 2/*
3 * Contributed to the OpenSSL Project by the American Registry for 3 * Contributed to the OpenSSL Project by the American Registry for
4 * Internet Numbers ("ARIN"). 4 * Internet Numbers ("ARIN").
@@ -62,6 +62,9 @@
62 62
63#include <stdio.h> 63#include <stdio.h>
64#include <string.h> 64#include <string.h>
65
66#include <openssl/opensslconf.h>
67
65#include "cryptlib.h" 68#include "cryptlib.h"
66#include <openssl/conf.h> 69#include <openssl/conf.h>
67#include <openssl/asn1.h> 70#include <openssl/asn1.h>
diff --git a/src/lib/libcrypto/x509v3/v3_ocsp.c b/src/lib/libcrypto/x509v3/v3_ocsp.c
index ca3fc51c77..0406c83be3 100644
--- a/src/lib/libcrypto/x509v3/v3_ocsp.c
+++ b/src/lib/libcrypto/x509v3/v3_ocsp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_ocsp.c,v 1.8 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: v3_ocsp.c,v 1.9 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#ifndef OPENSSL_NO_OCSP 64#ifndef OPENSSL_NO_OCSP
63 65
64#include "cryptlib.h" 66#include "cryptlib.h"
diff --git a/src/lib/libcrypto/x509v3/v3_purp.c b/src/lib/libcrypto/x509v3/v3_purp.c
index 02538335ae..0d4b9aae64 100644
--- a/src/lib/libcrypto/x509v3/v3_purp.c
+++ b/src/lib/libcrypto/x509v3/v3_purp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_purp.c,v 1.19 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: v3_purp.c,v 1.20 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/x509v3.h> 65#include <openssl/x509v3.h>
64#include <openssl/x509_vfy.h> 66#include <openssl/x509_vfy.h>
diff --git a/src/lib/libcrypto/x509v3/v3err.c b/src/lib/libcrypto/x509v3/v3err.c
index eaa7cdf8d5..a49632a069 100644
--- a/src/lib/libcrypto/x509v3/v3err.c
+++ b/src/lib/libcrypto/x509v3/v3err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3err.c,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: v3err.c,v 1.11 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/x509v3.h> 66#include <openssl/x509v3.h>
64 67
diff --git a/src/lib/libcrypto/x509v3/x509v3.h b/src/lib/libcrypto/x509v3/x509v3.h
index 73ef3ecc57..a88223cd9b 100644
--- a/src/lib/libcrypto/x509v3/x509v3.h
+++ b/src/lib/libcrypto/x509v3/x509v3.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509v3.h,v 1.14 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x509v3.h,v 1.15 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -58,6 +58,8 @@
58#ifndef HEADER_X509V3_H 58#ifndef HEADER_X509V3_H
59#define HEADER_X509V3_H 59#define HEADER_X509V3_H
60 60
61#include <openssl/opensslconf.h>
62
61#include <openssl/bio.h> 63#include <openssl/bio.h>
62#include <openssl/x509.h> 64#include <openssl/x509.h>
63#include <openssl/conf.h> 65#include <openssl/conf.h>
diff --git a/src/lib/libssl/src/crypto/asn1/ameth_lib.c b/src/lib/libssl/src/crypto/asn1/ameth_lib.c
index 0c5edd5c62..43981277c4 100644
--- a/src/lib/libssl/src/crypto/asn1/ameth_lib.c
+++ b/src/lib/libssl/src/crypto/asn1/ameth_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ameth_lib.c,v 1.10 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: ameth_lib.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/asn1t.h> 65#include <openssl/asn1t.h>
64#include <openssl/x509.h> 66#include <openssl/x509.h>
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_err.c b/src/lib/libssl/src/crypto/asn1/asn1_err.c
index 7afe894e7d..40b1ad8579 100644
--- a/src/lib/libssl/src/crypto/asn1/asn1_err.c
+++ b/src/lib/libssl/src/crypto/asn1/asn1_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_err.c,v 1.17 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: asn1_err.c,v 1.18 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/asn1.h> 66#include <openssl/asn1.h>
64 67
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_pr.c b/src/lib/libssl/src/crypto/asn1/d2i_pr.c
index 0633b60d06..3e140c05f5 100644
--- a/src/lib/libssl/src/crypto/asn1/d2i_pr.c
+++ b/src/lib/libssl/src/crypto/asn1/d2i_pr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d2i_pr.c,v 1.10 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: d2i_pr.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_pu.c b/src/lib/libssl/src/crypto/asn1/d2i_pu.c
index 7f0ad0e1a4..4a9475b68e 100644
--- a/src/lib/libssl/src/crypto/asn1/d2i_pu.c
+++ b/src/lib/libssl/src/crypto/asn1/d2i_pu.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d2i_pu.c,v 1.10 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: d2i_pu.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_pu.c b/src/lib/libssl/src/crypto/asn1/i2d_pu.c
index 5b3e96ec96..0f0369f3a5 100644
--- a/src/lib/libssl/src/crypto/asn1/i2d_pu.c
+++ b/src/lib/libssl/src/crypto/asn1/i2d_pu.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: i2d_pu.c,v 1.8 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: i2d_pu.c,v 1.9 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/asn1/n_pkey.c b/src/lib/libssl/src/crypto/asn1/n_pkey.c
index c9a507ca41..b2047bd586 100644
--- a/src/lib/libssl/src/crypto/asn1/n_pkey.c
+++ b/src/lib/libssl/src/crypto/asn1/n_pkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: n_pkey.c,v 1.19 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: n_pkey.c,v 1.20 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
64#include <openssl/rsa.h> 66#include <openssl/rsa.h>
diff --git a/src/lib/libssl/src/crypto/asn1/t_req.c b/src/lib/libssl/src/crypto/asn1/t_req.c
index e84d53399a..689df1e203 100644
--- a/src/lib/libssl/src/crypto/asn1/t_req.c
+++ b/src/lib/libssl/src/crypto/asn1/t_req.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_req.c,v 1.15 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: t_req.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/buffer.h> 64#include <openssl/buffer.h>
62#include <openssl/bn.h> 65#include <openssl/bn.h>
diff --git a/src/lib/libssl/src/crypto/asn1/t_spki.c b/src/lib/libssl/src/crypto/asn1/t_spki.c
index d6f86d1e2f..91d275ffc2 100644
--- a/src/lib/libssl/src/crypto/asn1/t_spki.c
+++ b/src/lib/libssl/src/crypto/asn1/t_spki.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_spki.c,v 1.9 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: t_spki.c,v 1.10 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/x509.h> 64#include <openssl/x509.h>
62#include <openssl/asn1.h> 65#include <openssl/asn1.h>
diff --git a/src/lib/libssl/src/crypto/asn1/t_x509.c b/src/lib/libssl/src/crypto/asn1/t_x509.c
index b294ffc637..690015b1c1 100644
--- a/src/lib/libssl/src/crypto/asn1/t_x509.c
+++ b/src/lib/libssl/src/crypto/asn1/t_x509.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_x509.c,v 1.22 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: t_x509.c,v 1.23 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/buffer.h> 64#include <openssl/buffer.h>
62#include <openssl/bn.h> 65#include <openssl/bn.h>
diff --git a/src/lib/libssl/src/crypto/asn1/x_crl.c b/src/lib/libssl/src/crypto/asn1/x_crl.c
index eda938f626..13402a66c2 100644
--- a/src/lib/libssl/src/crypto/asn1/x_crl.c
+++ b/src/lib/libssl/src/crypto/asn1/x_crl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_crl.c,v 1.15 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: x_crl.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include "asn1_locl.h" 64#include "asn1_locl.h"
62#include <openssl/asn1t.h> 65#include <openssl/asn1t.h>
diff --git a/src/lib/libssl/src/crypto/asn1/x_pubkey.c b/src/lib/libssl/src/crypto/asn1/x_pubkey.c
index b308b3d445..f702bdbe97 100644
--- a/src/lib/libssl/src/crypto/asn1/x_pubkey.c
+++ b/src/lib/libssl/src/crypto/asn1/x_pubkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_pubkey.c,v 1.19 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: x_pubkey.c,v 1.20 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/asn1t.h> 64#include <openssl/asn1t.h>
62#include <openssl/x509.h> 65#include <openssl/x509.h>
diff --git a/src/lib/libssl/src/crypto/asn1/x_x509.c b/src/lib/libssl/src/crypto/asn1/x_x509.c
index 28f51f6873..43772f9ac1 100644
--- a/src/lib/libssl/src/crypto/asn1/x_x509.c
+++ b/src/lib/libssl/src/crypto/asn1/x_x509.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_x509.c,v 1.15 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: x_x509.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/evp.h> 64#include <openssl/evp.h>
62#include <openssl/asn1t.h> 65#include <openssl/asn1t.h>
diff --git a/src/lib/libssl/src/crypto/bio/bio_err.c b/src/lib/libssl/src/crypto/bio/bio_err.c
index 8307c1099f..80788585ba 100644
--- a/src/lib/libssl/src/crypto/bio/bio_err.c
+++ b/src/lib/libssl/src/crypto/bio/bio_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_err.c,v 1.15 2014/06/22 14:41:10 jsing Exp $ */ 1/* $OpenBSD: bio_err.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/bio.h> 66#include <openssl/bio.h>
64 67
diff --git a/src/lib/libssl/src/crypto/bio/bss_dgram.c b/src/lib/libssl/src/crypto/bio/bss_dgram.c
index d06406aebd..d56b71ba27 100644
--- a/src/lib/libssl/src/crypto/bio/bss_dgram.c
+++ b/src/lib/libssl/src/crypto/bio/bss_dgram.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_dgram.c,v 1.29 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bss_dgram.c,v 1.30 2014/07/10 22:45:56 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -67,6 +67,8 @@
67#include <string.h> 67#include <string.h>
68#include <unistd.h> 68#include <unistd.h>
69 69
70#include <openssl/opensslconf.h>
71
70#include "cryptlib.h" 72#include "cryptlib.h"
71#include <openssl/bio.h> 73#include <openssl/bio.h>
72 74
diff --git a/src/lib/libssl/src/crypto/bio/bss_fd.c b/src/lib/libssl/src/crypto/bio/bss_fd.c
index 60efde91c9..6e8e8d0815 100644
--- a/src/lib/libssl/src/crypto/bio/bss_fd.c
+++ b/src/lib/libssl/src/crypto/bio/bss_fd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_fd.c,v 1.15 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bss_fd.c,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -61,6 +61,8 @@
61#include <string.h> 61#include <string.h>
62#include <unistd.h> 62#include <unistd.h>
63 63
64#include <openssl/opensslconf.h>
65
64#include "cryptlib.h" 66#include "cryptlib.h"
65 67
66#if defined(OPENSSL_NO_POSIX_IO) 68#if defined(OPENSSL_NO_POSIX_IO)
diff --git a/src/lib/libssl/src/crypto/bn/bn_asm.c b/src/lib/libssl/src/crypto/bn/bn_asm.c
index d33919f0aa..01e03cc81f 100644
--- a/src/lib/libssl/src/crypto/bn/bn_asm.c
+++ b/src/lib/libssl/src/crypto/bn/bn_asm.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_asm.c,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_asm.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -61,8 +61,11 @@
61# define NDEBUG 61# define NDEBUG
62#endif 62#endif
63 63
64#include <stdio.h>
65#include <assert.h> 64#include <assert.h>
65#include <stdio.h>
66
67#include <openssl/opensslconf.h>
68
66#include "cryptlib.h" 69#include "cryptlib.h"
67#include "bn_lcl.h" 70#include "bn_lcl.h"
68 71
diff --git a/src/lib/libssl/src/crypto/bn/bn_blind.c b/src/lib/libssl/src/crypto/bn/bn_blind.c
index 6bcd8d0eca..2170181aae 100644
--- a/src/lib/libssl/src/crypto/bn/bn_blind.c
+++ b/src/lib/libssl/src/crypto/bn/bn_blind.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_blind.c,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_blind.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -110,6 +110,9 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113
114#include <openssl/opensslconf.h>
115
113#include "cryptlib.h" 116#include "cryptlib.h"
114#include "bn_lcl.h" 117#include "bn_lcl.h"
115 118
diff --git a/src/lib/libssl/src/crypto/bn/bn_ctx.c b/src/lib/libssl/src/crypto/bn/bn_ctx.c
index 95871258d9..d3384a0385 100644
--- a/src/lib/libssl/src/crypto/bn/bn_ctx.c
+++ b/src/lib/libssl/src/crypto/bn/bn_ctx.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_ctx.c,v 1.11 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bn_ctx.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Ulf Moeller for the OpenSSL project. */ 2/* Written by Ulf Moeller for the OpenSSL project. */
3/* ==================================================================== 3/* ====================================================================
4 * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved. 4 * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved.
@@ -64,6 +64,8 @@
64#include <stdio.h> 64#include <stdio.h>
65#include <string.h> 65#include <string.h>
66 66
67#include <openssl/opensslconf.h>
68
67#include "cryptlib.h" 69#include "cryptlib.h"
68#include "bn_lcl.h" 70#include "bn_lcl.h"
69 71
diff --git a/src/lib/libssl/src/crypto/bn/bn_depr.c b/src/lib/libssl/src/crypto/bn/bn_depr.c
index 83297f4a49..93af852aa5 100644
--- a/src/lib/libssl/src/crypto/bn/bn_depr.c
+++ b/src/lib/libssl/src/crypto/bn/bn_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_depr.c,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_depr.c,v 1.5 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <time.h> 60#include <time.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include "bn_lcl.h" 65#include "bn_lcl.h"
63#include <openssl/rand.h> 66#include <openssl/rand.h>
diff --git a/src/lib/libssl/src/crypto/bn/bn_div.c b/src/lib/libssl/src/crypto/bn/bn_div.c
index 2f45a412b4..40a3c1551d 100644
--- a/src/lib/libssl/src/crypto/bn/bn_div.c
+++ b/src/lib/libssl/src/crypto/bn/bn_div.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_div.c,v 1.20 2014/06/27 22:02:07 miod Exp $ */ 1/* $OpenBSD: bn_div.c,v 1.21 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <openssl/bn.h> 60#include <openssl/bn.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include "bn_lcl.h" 65#include "bn_lcl.h"
63 66
diff --git a/src/lib/libssl/src/crypto/bn/bn_err.c b/src/lib/libssl/src/crypto/bn/bn_err.c
index 032786b4e8..5a0f359d86 100644
--- a/src/lib/libssl/src/crypto/bn/bn_err.c
+++ b/src/lib/libssl/src/crypto/bn/bn_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_err.c,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_err.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/bn.h> 66#include <openssl/bn.h>
64 67
diff --git a/src/lib/libssl/src/crypto/bn/bn_gf2m.c b/src/lib/libssl/src/crypto/bn/bn_gf2m.c
index 7aa306c345..09d4bcc544 100644
--- a/src/lib/libssl/src/crypto/bn/bn_gf2m.c
+++ b/src/lib/libssl/src/crypto/bn/bn_gf2m.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_gf2m.c,v 1.13 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_gf2m.c,v 1.14 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -91,6 +91,9 @@
91#include <assert.h> 91#include <assert.h>
92#include <limits.h> 92#include <limits.h>
93#include <stdio.h> 93#include <stdio.h>
94
95#include <openssl/opensslconf.h>
96
94#include "cryptlib.h" 97#include "cryptlib.h"
95#include "bn_lcl.h" 98#include "bn_lcl.h"
96 99
diff --git a/src/lib/libssl/src/crypto/bn/bn_lcl.h b/src/lib/libssl/src/crypto/bn/bn_lcl.h
index f90402fb5b..2dab445a51 100644
--- a/src/lib/libssl/src/crypto/bn/bn_lcl.h
+++ b/src/lib/libssl/src/crypto/bn/bn_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_lcl.h,v 1.19 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_lcl.h,v 1.20 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -112,6 +112,8 @@
112#ifndef HEADER_BN_LCL_H 112#ifndef HEADER_BN_LCL_H
113#define HEADER_BN_LCL_H 113#define HEADER_BN_LCL_H
114 114
115#include <openssl/opensslconf.h>
116
115#include <openssl/bn.h> 117#include <openssl/bn.h>
116 118
117#ifdef __cplusplus 119#ifdef __cplusplus
diff --git a/src/lib/libssl/src/crypto/bn/bn_lib.c b/src/lib/libssl/src/crypto/bn/bn_lib.c
index a33cf99ddb..747cbb68a5 100644
--- a/src/lib/libssl/src/crypto/bn/bn_lib.c
+++ b/src/lib/libssl/src/crypto/bn/bn_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_lib.c,v 1.30 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bn_lib.c,v 1.31 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -66,6 +66,8 @@
66#include <stdio.h> 66#include <stdio.h>
67#include <string.h> 67#include <string.h>
68 68
69#include <openssl/opensslconf.h>
70
69#include "cryptlib.h" 71#include "cryptlib.h"
70#include "bn_lcl.h" 72#include "bn_lcl.h"
71 73
diff --git a/src/lib/libssl/src/crypto/bn/bn_mul.c b/src/lib/libssl/src/crypto/bn/bn_mul.c
index 721fac19b1..71bfe2d9ec 100644
--- a/src/lib/libssl/src/crypto/bn/bn_mul.c
+++ b/src/lib/libssl/src/crypto/bn/bn_mul.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mul.c,v 1.17 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: bn_mul.c,v 1.18 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -65,6 +65,8 @@
65#include <stdio.h> 65#include <stdio.h>
66#include <string.h> 66#include <string.h>
67 67
68#include <openssl/opensslconf.h>
69
68#include "cryptlib.h" 70#include "cryptlib.h"
69#include "bn_lcl.h" 71#include "bn_lcl.h"
70 72
diff --git a/src/lib/libssl/src/crypto/bn/bn_print.c b/src/lib/libssl/src/crypto/bn/bn_print.c
index 6893d9af8b..db51887fbe 100644
--- a/src/lib/libssl/src/crypto/bn/bn_print.c
+++ b/src/lib/libssl/src/crypto/bn/bn_print.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_print.c,v 1.20 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: bn_print.c,v 1.21 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,10 +56,14 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdio.h>
60#include <ctype.h> 59#include <ctype.h>
61#include "cryptlib.h" 60#include <stdio.h>
61
62#include <openssl/opensslconf.h>
63
62#include <openssl/buffer.h> 64#include <openssl/buffer.h>
65
66#include "cryptlib.h"
63#include "bn_lcl.h" 67#include "bn_lcl.h"
64 68
65static const char Hex[]="0123456789ABCDEF"; 69static const char Hex[]="0123456789ABCDEF";
diff --git a/src/lib/libssl/src/crypto/buffer/buf_err.c b/src/lib/libssl/src/crypto/buffer/buf_err.c
index c311588dca..8256e89843 100644
--- a/src/lib/libssl/src/crypto/buffer/buf_err.c
+++ b/src/lib/libssl/src/crypto/buffer/buf_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: buf_err.c,v 1.9 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: buf_err.c,v 1.10 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/buffer.h> 66#include <openssl/buffer.h>
64 67
diff --git a/src/lib/libssl/src/crypto/camellia/camellia.c b/src/lib/libssl/src/crypto/camellia/camellia.c
index 27ce0fbc87..f400bc9ff7 100644
--- a/src/lib/libssl/src/crypto/camellia/camellia.c
+++ b/src/lib/libssl/src/crypto/camellia/camellia.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: camellia.c,v 1.6 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: camellia.c,v 1.7 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . 3 * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) .
4 * ALL RIGHTS RESERVED. 4 * ALL RIGHTS RESERVED.
@@ -81,10 +81,12 @@
81 * words reasonable performance even with not so modern compilers. 81 * words reasonable performance even with not so modern compilers.
82 */ 82 */
83 83
84#include <stdlib.h>
85#include <string.h>
86#include <openssl/opensslconf.h>
87
84#include "camellia.h" 88#include "camellia.h"
85#include "cmll_locl.h" 89#include "cmll_locl.h"
86#include <string.h>
87#include <stdlib.h>
88 90
89/* 32-bit rotations */ 91/* 32-bit rotations */
90#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) 92#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
diff --git a/src/lib/libssl/src/crypto/cast/cast.h b/src/lib/libssl/src/crypto/cast/cast.h
index 4759d4c782..1043c7f24f 100644
--- a/src/lib/libssl/src/crypto/cast/cast.h
+++ b/src/lib/libssl/src/crypto/cast/cast.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cast.h,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cast.h,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,12 +59,12 @@
59#ifndef HEADER_CAST_H 59#ifndef HEADER_CAST_H
60#define HEADER_CAST_H 60#define HEADER_CAST_H
61 61
62#include <openssl/opensslconf.h>
63
62#ifdef __cplusplus 64#ifdef __cplusplus
63extern "C" { 65extern "C" {
64#endif 66#endif
65 67
66#include <openssl/opensslconf.h>
67
68#ifdef OPENSSL_NO_CAST 68#ifdef OPENSSL_NO_CAST
69#error CAST is disabled. 69#error CAST is disabled.
70#endif 70#endif
diff --git a/src/lib/libssl/src/crypto/cms/cms.h b/src/lib/libssl/src/crypto/cms/cms.h
index bacba68792..0e4aa6f9fc 100644
--- a/src/lib/libssl/src/crypto/cms/cms.h
+++ b/src/lib/libssl/src/crypto/cms/cms.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms.h,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cms.h,v 1.5 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -51,10 +51,11 @@
51 * ==================================================================== 51 * ====================================================================
52 */ 52 */
53 53
54
55#ifndef HEADER_CMS_H 54#ifndef HEADER_CMS_H
56#define HEADER_CMS_H 55#define HEADER_CMS_H
57 56
57#include <openssl/opensslconf.h>
58
58#include <openssl/x509.h> 59#include <openssl/x509.h>
59 60
60#ifdef OPENSSL_NO_CMS 61#ifdef OPENSSL_NO_CMS
@@ -65,7 +66,6 @@
65extern "C" { 66extern "C" {
66#endif 67#endif
67 68
68
69typedef struct CMS_ContentInfo_st CMS_ContentInfo; 69typedef struct CMS_ContentInfo_st CMS_ContentInfo;
70typedef struct CMS_SignerInfo_st CMS_SignerInfo; 70typedef struct CMS_SignerInfo_st CMS_SignerInfo;
71typedef struct CMS_CertificateChoices CMS_CertificateChoices; 71typedef struct CMS_CertificateChoices CMS_CertificateChoices;
diff --git a/src/lib/libssl/src/crypto/cms/cms_cd.c b/src/lib/libssl/src/crypto/cms/cms_cd.c
index 59c7224c05..2a67c5df30 100644
--- a/src/lib/libssl/src/crypto/cms/cms_cd.c
+++ b/src/lib/libssl/src/crypto/cms/cms_cd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_cd.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cms_cd.c,v 1.4 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -51,6 +51,8 @@
51 * ==================================================================== 51 * ====================================================================
52 */ 52 */
53 53
54#include <openssl/opensslconf.h>
55
54#include "cryptlib.h" 56#include "cryptlib.h"
55#include <openssl/asn1t.h> 57#include <openssl/asn1t.h>
56#include <openssl/pem.h> 58#include <openssl/pem.h>
diff --git a/src/lib/libssl/src/crypto/cms/cms_err.c b/src/lib/libssl/src/crypto/cms/cms_err.c
index 9d3fd8803f..4eb9188fd2 100644
--- a/src/lib/libssl/src/crypto/cms/cms_err.c
+++ b/src/lib/libssl/src/crypto/cms/cms_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_err.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cms_err.c,v 1.4 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2009 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2009 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,8 +59,11 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <openssl/err.h> 62
63#include <openssl/opensslconf.h>
64
63#include <openssl/cms.h> 65#include <openssl/cms.h>
66#include <openssl/err.h>
64 67
65/* BEGIN ERROR CODES */ 68/* BEGIN ERROR CODES */
66#ifndef OPENSSL_NO_ERR 69#ifndef OPENSSL_NO_ERR
diff --git a/src/lib/libssl/src/crypto/comp/comp_err.c b/src/lib/libssl/src/crypto/comp/comp_err.c
index ced13233e1..1174df430f 100644
--- a/src/lib/libssl/src/crypto/comp/comp_err.c
+++ b/src/lib/libssl/src/crypto/comp/comp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: comp_err.c,v 1.7 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: comp_err.c,v 1.8 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,8 +59,11 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <openssl/err.h> 62
63#include <openssl/opensslconf.h>
64
63#include <openssl/comp.h> 65#include <openssl/comp.h>
66#include <openssl/err.h>
64 67
65/* BEGIN ERROR CODES */ 68/* BEGIN ERROR CODES */
66#ifndef OPENSSL_NO_ERR 69#ifndef OPENSSL_NO_ERR
diff --git a/src/lib/libssl/src/crypto/conf/conf_err.c b/src/lib/libssl/src/crypto/conf/conf_err.c
index 5694103a79..a1a7cbe42e 100644
--- a/src/lib/libssl/src/crypto/conf/conf_err.c
+++ b/src/lib/libssl/src/crypto/conf/conf_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_err.c,v 1.11 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: conf_err.c,v 1.12 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,8 +59,11 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include <openssl/err.h> 62
63#include <openssl/opensslconf.h>
64
63#include <openssl/conf.h> 65#include <openssl/conf.h>
66#include <openssl/err.h>
64 67
65/* BEGIN ERROR CODES */ 68/* BEGIN ERROR CODES */
66#ifndef OPENSSL_NO_ERR 69#ifndef OPENSSL_NO_ERR
diff --git a/src/lib/libssl/src/crypto/conf/conf_mall.c b/src/lib/libssl/src/crypto/conf/conf_mall.c
index e964b84df0..5eef7a7d18 100644
--- a/src/lib/libssl/src/crypto/conf/conf_mall.c
+++ b/src/lib/libssl/src/crypto/conf/conf_mall.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_mall.c,v 1.7 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: conf_mall.c,v 1.8 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/crypto.h> 63#include <openssl/crypto.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/conf.h> 65#include <openssl/conf.h>
diff --git a/src/lib/libssl/src/crypto/conf/conf_sap.c b/src/lib/libssl/src/crypto/conf/conf_sap.c
index 7c46b2476f..332b48ba5a 100644
--- a/src/lib/libssl/src/crypto/conf/conf_sap.c
+++ b/src/lib/libssl/src/crypto/conf/conf_sap.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_sap.c,v 1.8 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: conf_sap.c,v 1.9 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/crypto.h> 63#include <openssl/crypto.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/conf.h> 65#include <openssl/conf.h>
diff --git a/src/lib/libssl/src/crypto/cpt_err.c b/src/lib/libssl/src/crypto/cpt_err.c
index 6bc8ec1642..4ac32a28ec 100644
--- a/src/lib/libssl/src/crypto/cpt_err.c
+++ b/src/lib/libssl/src/crypto/cpt_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cpt_err.c,v 1.12 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: cpt_err.c,v 1.13 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/crypto.h> 66#include <openssl/crypto.h>
64 67
diff --git a/src/lib/libssl/src/crypto/cryptlib.c b/src/lib/libssl/src/crypto/cryptlib.c
index 75d66d4ee9..30023af332 100644
--- a/src/lib/libssl/src/crypto/cryptlib.c
+++ b/src/lib/libssl/src/crypto/cryptlib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cryptlib.c,v 1.30 2014/07/10 22:13:39 jsing Exp $ */ 1/* $OpenBSD: cryptlib.c,v 1.31 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -117,6 +117,8 @@
117#include <string.h> 117#include <string.h>
118#include <unistd.h> 118#include <unistd.h>
119 119
120#include <openssl/opensslconf.h>
121
120#include "cryptlib.h" 122#include "cryptlib.h"
121#include <openssl/safestack.h> 123#include <openssl/safestack.h>
122 124
diff --git a/src/lib/libssl/src/crypto/crypto.h b/src/lib/libssl/src/crypto/crypto.h
index 5bf87c9e2e..5cb1dda021 100644
--- a/src/lib/libssl/src/crypto/crypto.h
+++ b/src/lib/libssl/src/crypto/crypto.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto.h,v 1.31 2014/06/24 19:33:10 miod Exp $ */ 1/* $OpenBSD: crypto.h,v 1.32 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -114,15 +114,14 @@
114 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. 114 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
115 */ 115 */
116 116
117#include <stdio.h>
118#include <stdlib.h>
119
117#ifndef HEADER_CRYPTO_H 120#ifndef HEADER_CRYPTO_H
118#define HEADER_CRYPTO_H 121#define HEADER_CRYPTO_H
119 122
120#include <stdlib.h>
121
122#include <openssl/opensslconf.h> 123#include <openssl/opensslconf.h>
123 124
124#include <stdio.h>
125
126#include <openssl/stack.h> 125#include <openssl/stack.h>
127#include <openssl/safestack.h> 126#include <openssl/safestack.h>
128#include <openssl/opensslv.h> 127#include <openssl/opensslv.h>
diff --git a/src/lib/libssl/src/crypto/des/des_locl.h b/src/lib/libssl/src/crypto/des/des_locl.h
index 7b086ff01d..477aeb60d9 100644
--- a/src/lib/libssl/src/crypto/des/des_locl.h
+++ b/src/lib/libssl/src/crypto/des/des_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: des_locl.h,v 1.15 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: des_locl.h,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,12 +59,11 @@
59#ifndef HEADER_DES_LOCL_H 59#ifndef HEADER_DES_LOCL_H
60#define HEADER_DES_LOCL_H 60#define HEADER_DES_LOCL_H
61 61
62#include <math.h>
62#include <stdio.h> 63#include <stdio.h>
63#include <stdlib.h> 64#include <stdlib.h>
64#include <string.h> 65#include <string.h>
65
66#include <unistd.h> 66#include <unistd.h>
67#include <math.h>
68 67
69#include <openssl/opensslconf.h> 68#include <openssl/opensslconf.h>
70 69
diff --git a/src/lib/libssl/src/crypto/des/enc_read.c b/src/lib/libssl/src/crypto/des/enc_read.c
index b4e9fe9383..b358fadd48 100644
--- a/src/lib/libssl/src/crypto/des/enc_read.c
+++ b/src/lib/libssl/src/crypto/des/enc_read.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: enc_read.c,v 1.12 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: enc_read.c,v 1.13 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <errno.h> 60#include <errno.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include "des_locl.h" 65#include "des_locl.h"
63 66
diff --git a/src/lib/libssl/src/crypto/des/enc_writ.c b/src/lib/libssl/src/crypto/des/enc_writ.c
index d93756bd35..0e3a2d856a 100644
--- a/src/lib/libssl/src/crypto/des/enc_writ.c
+++ b/src/lib/libssl/src/crypto/des/enc_writ.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: enc_writ.c,v 1.10 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: enc_writ.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,8 +57,11 @@
57 */ 57 */
58 58
59#include <errno.h> 59#include <errno.h>
60#include <time.h>
61#include <stdio.h> 60#include <stdio.h>
61#include <time.h>
62
63#include <openssl/opensslconf.h>
64
62#include "cryptlib.h" 65#include "cryptlib.h"
63#include "des_locl.h" 66#include "des_locl.h"
64#include <openssl/rand.h> 67#include <openssl/rand.h>
diff --git a/src/lib/libssl/src/crypto/dh/dh_depr.c b/src/lib/libssl/src/crypto/dh/dh_depr.c
index bc7ba16f2b..13f2029a59 100644
--- a/src/lib/libssl/src/crypto/dh/dh_depr.c
+++ b/src/lib/libssl/src/crypto/dh/dh_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_depr.c,v 1.4 2014/07/09 13:26:47 miod Exp $ */ 1/* $OpenBSD: dh_depr.c,v 1.5 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,10 +53,12 @@
53 * 53 *
54 */ 54 */
55 55
56
57/* This file contains deprecated functions as wrappers to the new ones */ 56/* This file contains deprecated functions as wrappers to the new ones */
58 57
59#include <stdio.h> 58#include <stdio.h>
59
60#include <openssl/opensslconf.h>
61
60#include "cryptlib.h" 62#include "cryptlib.h"
61#include <openssl/bn.h> 63#include <openssl/bn.h>
62#include <openssl/dh.h> 64#include <openssl/dh.h>
diff --git a/src/lib/libssl/src/crypto/dh/dh_err.c b/src/lib/libssl/src/crypto/dh/dh_err.c
index 989459fbdf..3774ba3c45 100644
--- a/src/lib/libssl/src/crypto/dh/dh_err.c
+++ b/src/lib/libssl/src/crypto/dh/dh_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_err.c,v 1.14 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: dh_err.c,v 1.15 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/dh.h> 66#include <openssl/dh.h>
64 67
diff --git a/src/lib/libssl/src/crypto/dh/dh_lib.c b/src/lib/libssl/src/crypto/dh/dh_lib.c
index 094a78041d..1cf14061c9 100644
--- a/src/lib/libssl/src/crypto/dh/dh_lib.c
+++ b/src/lib/libssl/src/crypto/dh/dh_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_lib.c,v 1.17 2014/07/09 13:26:47 miod Exp $ */ 1/* $OpenBSD: dh_lib.c,v 1.18 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/dh.h> 65#include <openssl/dh.h>
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_ameth.c b/src/lib/libssl/src/crypto/dsa/dsa_ameth.c
index 06b804b19d..1f08585e5f 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_ameth.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_ameth.c,v 1.10 2014/07/09 22:55:17 tedu Exp $ */ 1/* $OpenBSD: dsa_ameth.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/x509.h> 64#include <openssl/x509.h>
62#include <openssl/asn1.h> 65#include <openssl/asn1.h>
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_depr.c b/src/lib/libssl/src/crypto/dsa/dsa_depr.c
index 50169ac9b2..d8ac6f9d92 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_depr.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_depr.c,v 1.4 2014/07/09 10:16:24 miod Exp $ */ 1/* $OpenBSD: dsa_depr.c,v 1.5 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -56,10 +56,13 @@
56/* This file contains deprecated function(s) that are now wrappers to the new 56/* This file contains deprecated function(s) that are now wrappers to the new
57 * version(s). */ 57 * version(s). */
58 58
59#ifndef OPENSSL_NO_SHA
60
61#include <stdio.h> 59#include <stdio.h>
62#include <time.h> 60#include <time.h>
61
62#include <openssl/opensslconf.h>
63
64#ifndef OPENSSL_NO_SHA
65
63#include "cryptlib.h" 66#include "cryptlib.h"
64#include <openssl/evp.h> 67#include <openssl/evp.h>
65#include <openssl/bn.h> 68#include <openssl/bn.h>
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_err.c b/src/lib/libssl/src/crypto/dsa/dsa_err.c
index b01e59344b..b116b643c3 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_err.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_err.c,v 1.13 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: dsa_err.c,v 1.14 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/dsa.h> 66#include <openssl/dsa.h>
64 67
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_key.c b/src/lib/libssl/src/crypto/dsa/dsa_key.c
index 2d11f59107..723e1888df 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_key.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_key.c,v 1.16 2014/07/09 10:16:24 miod Exp $ */ 1/* $OpenBSD: dsa_key.c,v 1.17 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <time.h> 60#include <time.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#ifndef OPENSSL_NO_SHA 65#ifndef OPENSSL_NO_SHA
63#include <openssl/bn.h> 66#include <openssl/bn.h>
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_lib.c b/src/lib/libssl/src/crypto/dsa/dsa_lib.c
index 19f80687f8..3bf8427d4c 100644
--- a/src/lib/libssl/src/crypto/dsa/dsa_lib.c
+++ b/src/lib/libssl/src/crypto/dsa/dsa_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_lib.c,v 1.18 2014/07/09 11:10:50 bcook Exp $ */ 1/* $OpenBSD: dsa_lib.c,v 1.19 2014/07/10 22:45:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ 59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include "cryptlib.h" 65#include "cryptlib.h"
63#include <openssl/bn.h> 66#include <openssl/bn.h>
64#include <openssl/dsa.h> 67#include <openssl/dsa.h>
diff --git a/src/lib/libssl/src/crypto/dso/dso_err.c b/src/lib/libssl/src/crypto/dso/dso_err.c
index 7cf6e7aa9e..b8514a4aef 100644
--- a/src/lib/libssl/src/crypto/dso/dso_err.c
+++ b/src/lib/libssl/src/crypto/dso/dso_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dso_err.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: dso_err.c,v 1.8 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/dso.h> 66#include <openssl/dso.h>
64 67
diff --git a/src/lib/libssl/src/crypto/ec/ec2_mult.c b/src/lib/libssl/src/crypto/ec/ec2_mult.c
index 6df193d0d4..6c3a759dc8 100644
--- a/src/lib/libssl/src/crypto/ec/ec2_mult.c
+++ b/src/lib/libssl/src/crypto/ec/ec2_mult.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec2_mult.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec2_mult.c,v 1.4 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,6 +67,8 @@
67 * 67 *
68 */ 68 */
69 69
70#include <openssl/opensslconf.h>
71
70#include <openssl/err.h> 72#include <openssl/err.h>
71 73
72#include "ec_lcl.h" 74#include "ec_lcl.h"
diff --git a/src/lib/libssl/src/crypto/ec/ec2_oct.c b/src/lib/libssl/src/crypto/ec/ec2_oct.c
index 15066beae4..5150423b99 100644
--- a/src/lib/libssl/src/crypto/ec/ec2_oct.c
+++ b/src/lib/libssl/src/crypto/ec/ec2_oct.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec2_oct.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec2_oct.c,v 1.4 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,6 +67,8 @@
67 * 67 *
68 */ 68 */
69 69
70#include <openssl/opensslconf.h>
71
70#include <openssl/err.h> 72#include <openssl/err.h>
71 73
72#include "ec_lcl.h" 74#include "ec_lcl.h"
diff --git a/src/lib/libssl/src/crypto/ec/ec2_smpl.c b/src/lib/libssl/src/crypto/ec/ec2_smpl.c
index fc2e4ca7bc..001ffcc077 100644
--- a/src/lib/libssl/src/crypto/ec/ec2_smpl.c
+++ b/src/lib/libssl/src/crypto/ec/ec2_smpl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec2_smpl.c,v 1.10 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec2_smpl.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,6 +67,8 @@
67 * 67 *
68 */ 68 */
69 69
70#include <openssl/opensslconf.h>
71
70#include <openssl/err.h> 72#include <openssl/err.h>
71 73
72#include "ec_lcl.h" 74#include "ec_lcl.h"
diff --git a/src/lib/libssl/src/crypto/ec/ec_ameth.c b/src/lib/libssl/src/crypto/ec/ec_ameth.c
index 31ea95f103..6935972de5 100644
--- a/src/lib/libssl/src/crypto/ec/ec_ameth.c
+++ b/src/lib/libssl/src/crypto/ec/ec_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_ameth.c,v 1.9 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_ameth.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/x509.h> 64#include <openssl/x509.h>
62#include <openssl/ec.h> 65#include <openssl/ec.h>
diff --git a/src/lib/libssl/src/crypto/ec/ec_asn1.c b/src/lib/libssl/src/crypto/ec/ec_asn1.c
index 9478e5260a..ef87b599f2 100644
--- a/src/lib/libssl/src/crypto/ec/ec_asn1.c
+++ b/src/lib/libssl/src/crypto/ec/ec_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_asn1.c,v 1.8 2014/07/01 21:26:27 miod Exp $ */ 1/* $OpenBSD: ec_asn1.c,v 1.9 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -57,12 +57,14 @@
57 */ 57 */
58 58
59#include <string.h> 59#include <string.h>
60
61#include <openssl/opensslconf.h>
62
60#include "ec_lcl.h" 63#include "ec_lcl.h"
61#include <openssl/err.h> 64#include <openssl/err.h>
62#include <openssl/asn1t.h> 65#include <openssl/asn1t.h>
63#include <openssl/objects.h> 66#include <openssl/objects.h>
64 67
65
66int 68int
67EC_GROUP_get_basis_type(const EC_GROUP * group) 69EC_GROUP_get_basis_type(const EC_GROUP * group)
68{ 70{
diff --git a/src/lib/libssl/src/crypto/ec/ec_curve.c b/src/lib/libssl/src/crypto/ec/ec_curve.c
index 32a7301bf9..baac8c7156 100644
--- a/src/lib/libssl/src/crypto/ec/ec_curve.c
+++ b/src/lib/libssl/src/crypto/ec/ec_curve.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_curve.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_curve.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -69,10 +69,11 @@
69 * 69 *
70 */ 70 */
71 71
72#include <openssl/opensslconf.h>
73
72#include "ec_lcl.h" 74#include "ec_lcl.h"
73#include <openssl/err.h> 75#include <openssl/err.h>
74#include <openssl/obj_mac.h> 76#include <openssl/obj_mac.h>
75#include <openssl/opensslconf.h>
76 77
77typedef struct { 78typedef struct {
78 int field_type, /* either NID_X9_62_prime_field or 79 int field_type, /* either NID_X9_62_prime_field or
diff --git a/src/lib/libssl/src/crypto/ec/ec_cvt.c b/src/lib/libssl/src/crypto/ec/ec_cvt.c
index 7b70cf7968..a0982064b8 100644
--- a/src/lib/libssl/src/crypto/ec/ec_cvt.c
+++ b/src/lib/libssl/src/crypto/ec/ec_cvt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_cvt.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_cvt.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -69,10 +69,11 @@
69 * 69 *
70 */ 70 */
71 71
72#include <openssl/opensslconf.h>
73
72#include <openssl/err.h> 74#include <openssl/err.h>
73#include "ec_lcl.h" 75#include "ec_lcl.h"
74 76
75
76EC_GROUP * 77EC_GROUP *
77EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, 78EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b,
78 BN_CTX *ctx) 79 BN_CTX *ctx)
diff --git a/src/lib/libssl/src/crypto/ec/ec_err.c b/src/lib/libssl/src/crypto/ec/ec_err.c
index 7620a05d84..0ba510adae 100644
--- a/src/lib/libssl/src/crypto/ec/ec_err.c
+++ b/src/lib/libssl/src/crypto/ec/ec_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_err.c,v 1.8 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_err.c,v 1.9 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ec.h> 66#include <openssl/ec.h>
64 67
diff --git a/src/lib/libssl/src/crypto/ec/ec_key.c b/src/lib/libssl/src/crypto/ec/ec_key.c
index 939176095f..7067a949da 100644
--- a/src/lib/libssl/src/crypto/ec/ec_key.c
+++ b/src/lib/libssl/src/crypto/ec/ec_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_key.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_key.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -62,6 +62,9 @@
62 */ 62 */
63 63
64#include <string.h> 64#include <string.h>
65
66#include <openssl/opensslconf.h>
67
65#include "ec_lcl.h" 68#include "ec_lcl.h"
66#include <openssl/err.h> 69#include <openssl/err.h>
67 70
diff --git a/src/lib/libssl/src/crypto/ec/ec_lib.c b/src/lib/libssl/src/crypto/ec/ec_lib.c
index f2a4fb8053..3d8b96eb1f 100644
--- a/src/lib/libssl/src/crypto/ec/ec_lib.c
+++ b/src/lib/libssl/src/crypto/ec/ec_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_lib.c,v 1.13 2014/07/09 11:10:50 bcook Exp $ */ 1/* $OpenBSD: ec_lib.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -63,6 +63,8 @@
63 63
64#include <string.h> 64#include <string.h>
65 65
66#include <openssl/opensslconf.h>
67
66#include <openssl/err.h> 68#include <openssl/err.h>
67#include <openssl/opensslv.h> 69#include <openssl/opensslv.h>
68 70
diff --git a/src/lib/libssl/src/crypto/ec/ec_oct.c b/src/lib/libssl/src/crypto/ec/ec_oct.c
index cd07890c74..82124a8f80 100644
--- a/src/lib/libssl/src/crypto/ec/ec_oct.c
+++ b/src/lib/libssl/src/crypto/ec/ec_oct.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_oct.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ec_oct.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -63,6 +63,8 @@
63 63
64#include <string.h> 64#include <string.h>
65 65
66#include <openssl/opensslconf.h>
67
66#include <openssl/err.h> 68#include <openssl/err.h>
67#include <openssl/opensslv.h> 69#include <openssl/opensslv.h>
68 70
diff --git a/src/lib/libssl/src/crypto/ec/eck_prn.c b/src/lib/libssl/src/crypto/ec/eck_prn.c
index eba10245d8..fb5ee7f52b 100644
--- a/src/lib/libssl/src/crypto/ec/eck_prn.c
+++ b/src/lib/libssl/src/crypto/ec/eck_prn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eck_prn.c,v 1.7 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: eck_prn.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -64,6 +64,8 @@
64#include <stdio.h> 64#include <stdio.h>
65#include <string.h> 65#include <string.h>
66 66
67#include <openssl/opensslconf.h>
68
67#include "cryptlib.h" 69#include "cryptlib.h"
68#include <openssl/evp.h> 70#include <openssl/evp.h>
69#include <openssl/ec.h> 71#include <openssl/ec.h>
diff --git a/src/lib/libssl/src/crypto/ec/ecp_nistp224.c b/src/lib/libssl/src/crypto/ec/ecp_nistp224.c
index 473d75a72b..c466d2db83 100644
--- a/src/lib/libssl/src/crypto/ec/ecp_nistp224.c
+++ b/src/lib/libssl/src/crypto/ec/ecp_nistp224.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistp224.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecp_nistp224.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Emilia Kasper (Google) for the OpenSSL project. 3 * Written by Emilia Kasper (Google) for the OpenSSL project.
4 */ 4 */
@@ -25,12 +25,13 @@
25 * and Adam Langley's public domain 64-bit C implementation of curve25519 25 * and Adam Langley's public domain 64-bit C implementation of curve25519
26 */ 26 */
27 27
28#include <stdint.h>
29#include <string.h>
30
28#include <openssl/opensslconf.h> 31#include <openssl/opensslconf.h>
29#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
30 32
31#include <stdint.h> 33#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
32 34
33#include <string.h>
34#include <openssl/err.h> 35#include <openssl/err.h>
35#include "ec_lcl.h" 36#include "ec_lcl.h"
36 37
diff --git a/src/lib/libssl/src/crypto/ec/ecp_nistp256.c b/src/lib/libssl/src/crypto/ec/ecp_nistp256.c
index a72b1163ff..7b122e6307 100644
--- a/src/lib/libssl/src/crypto/ec/ecp_nistp256.c
+++ b/src/lib/libssl/src/crypto/ec/ecp_nistp256.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistp256.c,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecp_nistp256.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Adam Langley (Google) for the OpenSSL project 3 * Written by Adam Langley (Google) for the OpenSSL project
4 */ 4 */
@@ -26,12 +26,13 @@
26 * work which got its smarts from Daniel J. Bernstein's work on the same. 26 * work which got its smarts from Daniel J. Bernstein's work on the same.
27 */ 27 */
28 28
29#include <stdint.h>
30#include <string.h>
31
29#include <openssl/opensslconf.h> 32#include <openssl/opensslconf.h>
30#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
31 33
32#include <stdint.h> 34#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
33 35
34#include <string.h>
35#include <openssl/err.h> 36#include <openssl/err.h>
36#include "ec_lcl.h" 37#include "ec_lcl.h"
37 38
diff --git a/src/lib/libssl/src/crypto/ec/ecp_nistp521.c b/src/lib/libssl/src/crypto/ec/ecp_nistp521.c
index 1ff3837411..cec0a3b470 100644
--- a/src/lib/libssl/src/crypto/ec/ecp_nistp521.c
+++ b/src/lib/libssl/src/crypto/ec/ecp_nistp521.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistp521.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecp_nistp521.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Adam Langley (Google) for the OpenSSL project 3 * Written by Adam Langley (Google) for the OpenSSL project
4 */ 4 */
@@ -26,12 +26,13 @@
26 * work which got its smarts from Daniel J. Bernstein's work on the same. 26 * work which got its smarts from Daniel J. Bernstein's work on the same.
27 */ 27 */
28 28
29#include <stdint.h>
30#include <string.h>
31
29#include <openssl/opensslconf.h> 32#include <openssl/opensslconf.h>
30#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
31 33
32#include <stdint.h> 34#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
33 35
34#include <string.h>
35#include <openssl/err.h> 36#include <openssl/err.h>
36#include "ec_lcl.h" 37#include "ec_lcl.h"
37 38
diff --git a/src/lib/libssl/src/crypto/ec/ecp_nistputil.c b/src/lib/libssl/src/crypto/ec/ecp_nistputil.c
index 87aa979252..ca55b49ba2 100644
--- a/src/lib/libssl/src/crypto/ec/ecp_nistputil.c
+++ b/src/lib/libssl/src/crypto/ec/ecp_nistputil.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistputil.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecp_nistputil.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Bodo Moeller for the OpenSSL project. 3 * Written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -18,14 +18,16 @@
18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 */ 19 */
20 20
21#include <stddef.h>
22
21#include <openssl/opensslconf.h> 23#include <openssl/opensslconf.h>
24
22#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 25#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
23 26
24/* 27/*
25 * Common utility functions for ecp_nistp224.c, ecp_nistp256.c, ecp_nistp521.c. 28 * Common utility functions for ecp_nistp224.c, ecp_nistp256.c, ecp_nistp521.c.
26 */ 29 */
27 30
28#include <stddef.h>
29#include "ec_lcl.h" 31#include "ec_lcl.h"
30 32
31/* Convert an array of points into affine coordinates. 33/* Convert an array of points into affine coordinates.
diff --git a/src/lib/libssl/src/crypto/ecdh/ech_err.c b/src/lib/libssl/src/crypto/ecdh/ech_err.c
index c44f364a51..6b417a255d 100644
--- a/src/lib/libssl/src/crypto/ecdh/ech_err.c
+++ b/src/lib/libssl/src/crypto/ecdh/ech_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_err.c,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ech_err.c,v 1.3 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ecdh.h> 66#include <openssl/ecdh.h>
64 67
diff --git a/src/lib/libssl/src/crypto/ecdh/ech_lib.c b/src/lib/libssl/src/crypto/ecdh/ech_lib.c
index 99390c2373..e9fae9428b 100644
--- a/src/lib/libssl/src/crypto/ecdh/ech_lib.c
+++ b/src/lib/libssl/src/crypto/ecdh/ech_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_lib.c,v 1.6 2014/07/09 11:10:50 bcook Exp $ */ 1/* $OpenBSD: ech_lib.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,8 +67,11 @@
67 * 67 *
68 */ 68 */
69 69
70#include "ech_locl.h"
71#include <string.h> 70#include <string.h>
71
72#include <openssl/opensslconf.h>
73
74#include "ech_locl.h"
72#ifndef OPENSSL_NO_ENGINE 75#ifndef OPENSSL_NO_ENGINE
73#include <openssl/engine.h> 76#include <openssl/engine.h>
74#endif 77#endif
diff --git a/src/lib/libssl/src/crypto/ecdh/ech_ossl.c b/src/lib/libssl/src/crypto/ecdh/ech_ossl.c
index dc99eec79e..aa22ccafa2 100644
--- a/src/lib/libssl/src/crypto/ecdh/ech_ossl.c
+++ b/src/lib/libssl/src/crypto/ecdh/ech_ossl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_ossl.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ech_ossl.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -67,9 +67,10 @@
67 * 67 *
68 */ 68 */
69 69
70
71#include <string.h>
72#include <limits.h> 70#include <limits.h>
71#include <string.h>
72
73#include <openssl/opensslconf.h>
73 74
74#include "cryptlib.h" 75#include "cryptlib.h"
75 76
diff --git a/src/lib/libssl/src/crypto/ecdsa/ecs_err.c b/src/lib/libssl/src/crypto/ecdsa/ecs_err.c
index b6297c2fbe..721b53c3f4 100644
--- a/src/lib/libssl/src/crypto/ecdsa/ecs_err.c
+++ b/src/lib/libssl/src/crypto/ecdsa/ecs_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_err.c,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecs_err.c,v 1.3 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ecdsa.h> 66#include <openssl/ecdsa.h>
64 67
diff --git a/src/lib/libssl/src/crypto/ecdsa/ecs_lib.c b/src/lib/libssl/src/crypto/ecdsa/ecs_lib.c
index a1c05d1a41..a92d6117c9 100644
--- a/src/lib/libssl/src/crypto/ecdsa/ecs_lib.c
+++ b/src/lib/libssl/src/crypto/ecdsa/ecs_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_lib.c,v 1.6 2014/07/09 11:10:50 bcook Exp $ */ 1/* $OpenBSD: ecs_lib.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -54,6 +54,9 @@
54 */ 54 */
55 55
56#include <string.h> 56#include <string.h>
57
58#include <openssl/opensslconf.h>
59
57#include "ecs_locl.h" 60#include "ecs_locl.h"
58#ifndef OPENSSL_NO_ENGINE 61#ifndef OPENSSL_NO_ENGINE
59#include <openssl/engine.h> 62#include <openssl/engine.h>
diff --git a/src/lib/libssl/src/crypto/ecdsa/ecs_ossl.c b/src/lib/libssl/src/crypto/ecdsa/ecs_ossl.c
index e44b435f2a..e2c4b1d6d1 100644
--- a/src/lib/libssl/src/crypto/ecdsa/ecs_ossl.c
+++ b/src/lib/libssl/src/crypto/ecdsa/ecs_ossl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_ossl.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecs_ossl.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project 3 * Written by Nils Larsch for the OpenSSL project
4 */ 4 */
@@ -56,6 +56,8 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>
60
59#include "ecs_locl.h" 61#include "ecs_locl.h"
60#include <openssl/err.h> 62#include <openssl/err.h>
61#include <openssl/obj_mac.h> 63#include <openssl/obj_mac.h>
diff --git a/src/lib/libssl/src/crypto/ecdsa/ecs_sign.c b/src/lib/libssl/src/crypto/ecdsa/ecs_sign.c
index 3444dd1703..39bcf5fe5c 100644
--- a/src/lib/libssl/src/crypto/ecdsa/ecs_sign.c
+++ b/src/lib/libssl/src/crypto/ecdsa/ecs_sign.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_sign.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecs_sign.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,6 +53,8 @@
53 * 53 *
54 */ 54 */
55 55
56#include <openssl/opensslconf.h>
57
56#include "ecs_locl.h" 58#include "ecs_locl.h"
57#ifndef OPENSSL_NO_ENGINE 59#ifndef OPENSSL_NO_ENGINE
58#include <openssl/engine.h> 60#include <openssl/engine.h>
diff --git a/src/lib/libssl/src/crypto/ecdsa/ecs_vrf.c b/src/lib/libssl/src/crypto/ecdsa/ecs_vrf.c
index 9ff8e374a7..40a677c46a 100644
--- a/src/lib/libssl/src/crypto/ecdsa/ecs_vrf.c
+++ b/src/lib/libssl/src/crypto/ecdsa/ecs_vrf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecs_vrf.c,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecs_vrf.c,v 1.3 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project 3 * Written by Nils Larsch for the OpenSSL project
4 */ 4 */
@@ -56,6 +56,8 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>
60
59#include "ecs_locl.h" 61#include "ecs_locl.h"
60#ifndef OPENSSL_NO_ENGINE 62#ifndef OPENSSL_NO_ENGINE
61#include <openssl/engine.h> 63#include <openssl/engine.h>
diff --git a/src/lib/libssl/src/crypto/engine/eng_aesni.c b/src/lib/libssl/src/crypto/engine/eng_aesni.c
index d1b2d613b9..0bb558c1fd 100644
--- a/src/lib/libssl/src/crypto/engine/eng_aesni.c
+++ b/src/lib/libssl/src/crypto/engine/eng_aesni.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_aesni.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: eng_aesni.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Support for Intel AES-NI intruction set 3 * Support for Intel AES-NI intruction set
4 * Author: Huang Ying <ying.huang@intel.com> 4 * Author: Huang Ying <ying.huang@intel.com>
@@ -73,13 +73,13 @@
73 * 73 *
74 */ 74 */
75 75
76#include <assert.h>
77#include <stdio.h>
76 78
77#include <openssl/opensslconf.h> 79#include <openssl/opensslconf.h>
78 80
79#if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_AES_NI) && !defined(OPENSSL_NO_AES) 81#if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_AES_NI) && !defined(OPENSSL_NO_AES)
80 82
81#include <stdio.h>
82#include <assert.h>
83#include "cryptlib.h" 83#include "cryptlib.h"
84#include <openssl/dso.h> 84#include <openssl/dso.h>
85#include <openssl/engine.h> 85#include <openssl/engine.h>
diff --git a/src/lib/libssl/src/crypto/engine/eng_all.c b/src/lib/libssl/src/crypto/engine/eng_all.c
index 086c903675..21b76266c7 100644
--- a/src/lib/libssl/src/crypto/engine/eng_all.c
+++ b/src/lib/libssl/src/crypto/engine/eng_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_all.c,v 1.25 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: eng_all.c,v 1.26 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Richard Levitte <richard@levitte.org> for the OpenSSL 2/* Written by Richard Levitte <richard@levitte.org> for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -56,6 +56,8 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>
60
59#include "cryptlib.h" 61#include "cryptlib.h"
60#include "eng_int.h" 62#include "eng_int.h"
61 63
diff --git a/src/lib/libssl/src/crypto/engine/eng_err.c b/src/lib/libssl/src/crypto/engine/eng_err.c
index 298c33f485..d65efde991 100644
--- a/src/lib/libssl/src/crypto/engine/eng_err.c
+++ b/src/lib/libssl/src/crypto/engine/eng_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_err.c,v 1.9 2014/06/22 11:33:47 jsing Exp $ */ 1/* $OpenBSD: eng_err.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2010 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2010 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/engine.h> 66#include <openssl/engine.h>
64 67
diff --git a/src/lib/libssl/src/crypto/engine/eng_fat.c b/src/lib/libssl/src/crypto/engine/eng_fat.c
index d995104a7c..9805729922 100644
--- a/src/lib/libssl/src/crypto/engine/eng_fat.c
+++ b/src/lib/libssl/src/crypto/engine/eng_fat.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_fat.c,v 1.13 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: eng_fat.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -60,6 +60,8 @@
60 60
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "eng_int.h" 65#include "eng_int.h"
64#include <openssl/conf.h> 66#include <openssl/conf.h>
65 67
diff --git a/src/lib/libssl/src/crypto/engine/eng_int.h b/src/lib/libssl/src/crypto/engine/eng_int.h
index 22049fd7fd..aa3751f267 100644
--- a/src/lib/libssl/src/crypto/engine/eng_int.h
+++ b/src/lib/libssl/src/crypto/engine/eng_int.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_int.h,v 1.6 2014/06/22 12:16:28 jsing Exp $ */ 1/* $OpenBSD: eng_int.h,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -65,6 +65,7 @@
65#define HEADER_ENGINE_INT_H 65#define HEADER_ENGINE_INT_H
66 66
67#include "cryptlib.h" 67#include "cryptlib.h"
68
68/* Take public definitions from engine.h */ 69/* Take public definitions from engine.h */
69#include <openssl/engine.h> 70#include <openssl/engine.h>
70 71
diff --git a/src/lib/libssl/src/crypto/engine/eng_list.c b/src/lib/libssl/src/crypto/engine/eng_list.c
index d7aef43999..35b45158e9 100644
--- a/src/lib/libssl/src/crypto/engine/eng_list.c
+++ b/src/lib/libssl/src/crypto/engine/eng_list.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_list.c,v 1.13 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: eng_list.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -64,6 +64,8 @@
64#include <string.h> 64#include <string.h>
65#include <unistd.h> 65#include <unistd.h>
66 66
67#include <openssl/opensslconf.h>
68
67#include "eng_int.h" 69#include "eng_int.h"
68 70
69/* The linked-list of pointers to engine types. engine_list_head 71/* The linked-list of pointers to engine types. engine_list_head
diff --git a/src/lib/libssl/src/crypto/engine/eng_openssl.c b/src/lib/libssl/src/crypto/engine/eng_openssl.c
index 882af0341f..ecc560eb26 100644
--- a/src/lib/libssl/src/crypto/engine/eng_openssl.c
+++ b/src/lib/libssl/src/crypto/engine/eng_openssl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_openssl.c,v 1.7 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: eng_openssl.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -64,6 +64,8 @@
64#include <stdio.h> 64#include <stdio.h>
65#include <string.h> 65#include <string.h>
66 66
67#include <openssl/opensslconf.h>
68
67#include <openssl/crypto.h> 69#include <openssl/crypto.h>
68#include "cryptlib.h" 70#include "cryptlib.h"
69#include <openssl/engine.h> 71#include <openssl/engine.h>
diff --git a/src/lib/libssl/src/crypto/engine/eng_padlock.c b/src/lib/libssl/src/crypto/engine/eng_padlock.c
index 936a440b1a..ca3c958033 100644
--- a/src/lib/libssl/src/crypto/engine/eng_padlock.c
+++ b/src/lib/libssl/src/crypto/engine/eng_padlock.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_padlock.c,v 1.11 2014/06/22 12:05:09 jsing Exp $ */ 1/* $OpenBSD: eng_padlock.c,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Support for VIA PadLock Advanced Cryptography Engine (ACE) 3 * Support for VIA PadLock Advanced Cryptography Engine (ACE)
4 * Written by Michal Ludvig <michal@logix.cz> 4 * Written by Michal Ludvig <michal@logix.cz>
@@ -63,11 +63,11 @@
63 * 63 *
64 */ 64 */
65 65
66
67#include <stdio.h> 66#include <stdio.h>
68#include <string.h> 67#include <string.h>
69 68
70#include <openssl/opensslconf.h> 69#include <openssl/opensslconf.h>
70
71#include <openssl/crypto.h> 71#include <openssl/crypto.h>
72#include <openssl/dso.h> 72#include <openssl/dso.h>
73#include <openssl/engine.h> 73#include <openssl/engine.h>
diff --git a/src/lib/libssl/src/crypto/engine/eng_rsax.c b/src/lib/libssl/src/crypto/engine/eng_rsax.c
index 090ff3dfda..daeb7e6ebb 100644
--- a/src/lib/libssl/src/crypto/engine/eng_rsax.c
+++ b/src/lib/libssl/src/crypto/engine/eng_rsax.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_rsax.c,v 1.8 2014/06/22 12:18:33 jsing Exp $ */ 1/* $OpenBSD: eng_rsax.c,v 1.9 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (c) 2010-2010 Intel Corp. 2/* Copyright (c) 2010-2010 Intel Corp.
3 * Author: Vinodh.Gopal@intel.com 3 * Author: Vinodh.Gopal@intel.com
4 * Jim Guilford 4 * Jim Guilford
@@ -66,6 +66,9 @@
66 66
67#include <stdio.h> 67#include <stdio.h>
68#include <string.h> 68#include <string.h>
69
70#include <openssl/opensslconf.h>
71
69#include <openssl/crypto.h> 72#include <openssl/crypto.h>
70#include <openssl/buffer.h> 73#include <openssl/buffer.h>
71#include <openssl/engine.h> 74#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 ee6d91f465..cc9d78cb07 100644
--- a/src/lib/libssl/src/crypto/err/err.c
+++ b/src/lib/libssl/src/crypto/err/err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err.c,v 1.36 2014/06/27 07:01:21 deraadt Exp $ */ 1/* $OpenBSD: err.c,v 1.37 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -109,9 +109,12 @@
109 * 109 *
110 */ 110 */
111 111
112#include <stdio.h>
113#include <stdarg.h> 112#include <stdarg.h>
113#include <stdio.h>
114#include <string.h> 114#include <string.h>
115
116#include <openssl/opensslconf.h>
117
115#include "cryptlib.h" 118#include "cryptlib.h"
116#include <openssl/lhash.h> 119#include <openssl/lhash.h>
117#include <openssl/crypto.h> 120#include <openssl/crypto.h>
diff --git a/src/lib/libssl/src/crypto/err/err_all.c b/src/lib/libssl/src/crypto/err/err_all.c
index 0de1ced6fd..d950aad3b4 100644
--- a/src/lib/libssl/src/crypto/err/err_all.c
+++ b/src/lib/libssl/src/crypto/err/err_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err_all.c,v 1.15 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: err_all.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/asn1.h> 63#include <openssl/asn1.h>
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#ifndef OPENSSL_NO_EC 65#ifndef OPENSSL_NO_EC
diff --git a/src/lib/libssl/src/crypto/evp/c_all.c b/src/lib/libssl/src/crypto/evp/c_all.c
index cbbca62195..d5afe8e94d 100644
--- a/src/lib/libssl/src/crypto/evp/c_all.c
+++ b/src/lib/libssl/src/crypto/evp/c_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_all.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: c_all.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,8 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60 60
61#include <openssl/opensslconf.h>
62
61#include <openssl/conf.h> 63#include <openssl/conf.h>
62#include <openssl/evp.h> 64#include <openssl/evp.h>
63 65
diff --git a/src/lib/libssl/src/crypto/evp/c_allc.c b/src/lib/libssl/src/crypto/evp/c_allc.c
index 804bd6950f..a4c796b6d5 100644
--- a/src/lib/libssl/src/crypto/evp/c_allc.c
+++ b/src/lib/libssl/src/crypto/evp/c_allc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_allc.c,v 1.11 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: c_allc.c,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/evp.h> 64#include <openssl/evp.h>
62#include <openssl/pkcs12.h> 65#include <openssl/pkcs12.h>
diff --git a/src/lib/libssl/src/crypto/evp/c_alld.c b/src/lib/libssl/src/crypto/evp/c_alld.c
index 9b589ae7ec..16726b6caa 100644
--- a/src/lib/libssl/src/crypto/evp/c_alld.c
+++ b/src/lib/libssl/src/crypto/evp/c_alld.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_alld.c,v 1.9 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: c_alld.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/evp.h> 64#include <openssl/evp.h>
62#include <openssl/pkcs12.h> 65#include <openssl/pkcs12.h>
diff --git a/src/lib/libssl/src/crypto/evp/digest.c b/src/lib/libssl/src/crypto/evp/digest.c
index 5d5799a49f..e1ce7dd3a3 100644
--- a/src/lib/libssl/src/crypto/evp/digest.c
+++ b/src/lib/libssl/src/crypto/evp/digest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: digest.c,v 1.19 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: digest.c,v 1.20 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -112,6 +112,8 @@
112#include <stdio.h> 112#include <stdio.h>
113#include <string.h> 113#include <string.h>
114 114
115#include <openssl/opensslconf.h>
116
115#include "cryptlib.h" 117#include "cryptlib.h"
116#include <openssl/objects.h> 118#include <openssl/objects.h>
117#include <openssl/evp.h> 119#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/evp/e_aes.c b/src/lib/libssl/src/crypto/evp/e_aes.c
index f40bcf8bd3..fb767d9619 100644
--- a/src/lib/libssl/src/crypto/evp/e_aes.c
+++ b/src/lib/libssl/src/crypto/evp/e_aes.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_aes.c,v 1.22 2014/06/15 22:53:21 tedu Exp $ */ 1/* $OpenBSD: e_aes.c,v 1.23 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -49,16 +49,19 @@
49 * 49 *
50 */ 50 */
51 51
52#include <assert.h>
53#include <string.h>
54
52#include <openssl/opensslconf.h> 55#include <openssl/opensslconf.h>
56
53#ifndef OPENSSL_NO_AES 57#ifndef OPENSSL_NO_AES
54#include <openssl/evp.h>
55#include <openssl/err.h>
56#include <string.h>
57#include <assert.h>
58#include <openssl/aes.h> 58#include <openssl/aes.h>
59#include <openssl/err.h>
60#include <openssl/evp.h>
61#include <openssl/rand.h>
62
59#include "evp_locl.h" 63#include "evp_locl.h"
60#include "modes_lcl.h" 64#include "modes_lcl.h"
61#include <openssl/rand.h>
62 65
63typedef struct { 66typedef struct {
64 AES_KEY ks; 67 AES_KEY ks;
diff --git a/src/lib/libssl/src/crypto/evp/e_aes_cbc_hmac_sha1.c b/src/lib/libssl/src/crypto/evp/e_aes_cbc_hmac_sha1.c
index c38ab11280..a9a5cf1ca5 100644
--- a/src/lib/libssl/src/crypto/evp/e_aes_cbc_hmac_sha1.c
+++ b/src/lib/libssl/src/crypto/evp/e_aes_cbc_hmac_sha1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_aes_cbc_hmac_sha1.c,v 1.6 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_aes_cbc_hmac_sha1.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2011-2013 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2011-2013 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -48,11 +48,11 @@
48 * ==================================================================== 48 * ====================================================================
49 */ 49 */
50 50
51#include <openssl/opensslconf.h>
52
53#include <stdio.h> 51#include <stdio.h>
54#include <string.h> 52#include <string.h>
55 53
54#include <openssl/opensslconf.h>
55
56#if !defined(OPENSSL_NO_AES) && !defined(OPENSSL_NO_SHA1) 56#if !defined(OPENSSL_NO_AES) && !defined(OPENSSL_NO_SHA1)
57 57
58#include <openssl/evp.h> 58#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/evp/e_bf.c b/src/lib/libssl/src/crypto/evp/e_bf.c
index 06c734783e..fe133fb8ea 100644
--- a/src/lib/libssl/src/crypto/evp/e_bf.c
+++ b/src/lib/libssl/src/crypto/evp/e_bf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_bf.c,v 1.6 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_bf.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#ifndef OPENSSL_NO_BF 64#ifndef OPENSSL_NO_BF
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/evp/e_camellia.c b/src/lib/libssl/src/crypto/evp/e_camellia.c
index 871bada59e..4868c98c5d 100644
--- a/src/lib/libssl/src/crypto/evp/e_camellia.c
+++ b/src/lib/libssl/src/crypto/evp/e_camellia.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_camellia.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_camellia.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -53,12 +53,14 @@
53 * 53 *
54 */ 54 */
55 55
56#include <assert.h>
57#include <string.h>
58
56#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
57#ifndef OPENSSL_NO_CAMELLIA 61#ifndef OPENSSL_NO_CAMELLIA
58#include <openssl/evp.h> 62#include <openssl/evp.h>
59#include <openssl/err.h> 63#include <openssl/err.h>
60#include <string.h>
61#include <assert.h>
62#include <openssl/camellia.h> 64#include <openssl/camellia.h>
63#include "evp_locl.h" 65#include "evp_locl.h"
64 66
diff --git a/src/lib/libssl/src/crypto/evp/e_cast.c b/src/lib/libssl/src/crypto/evp/e_cast.c
index ee97f49c2e..2476bf2799 100644
--- a/src/lib/libssl/src/crypto/evp/e_cast.c
+++ b/src/lib/libssl/src/crypto/evp/e_cast.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_cast.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_cast.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_CAST 65#ifndef OPENSSL_NO_CAST
diff --git a/src/lib/libssl/src/crypto/evp/e_chacha.c b/src/lib/libssl/src/crypto/evp/e_chacha.c
index d1a1c59ae6..0a5ab98cdb 100644
--- a/src/lib/libssl/src/crypto/evp/e_chacha.c
+++ b/src/lib/libssl/src/crypto/evp/e_chacha.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_chacha.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_chacha.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -15,6 +15,8 @@
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */ 16 */
17 17
18#include <openssl/opensslconf.h>
19
18#ifndef OPENSSL_NO_CHACHA 20#ifndef OPENSSL_NO_CHACHA
19 21
20#include <openssl/chacha.h> 22#include <openssl/chacha.h>
diff --git a/src/lib/libssl/src/crypto/evp/e_chacha20poly1305.c b/src/lib/libssl/src/crypto/evp/e_chacha20poly1305.c
index 90d8a9c7b8..da1e036668 100644
--- a/src/lib/libssl/src/crypto/evp/e_chacha20poly1305.c
+++ b/src/lib/libssl/src/crypto/evp/e_chacha20poly1305.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_chacha20poly1305.c,v 1.7 2014/06/21 15:30:36 jsing Exp $ */ 1/* $OpenBSD: e_chacha20poly1305.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014, Google Inc. 3 * Copyright (c) 2014, Google Inc.
4 * 4 *
@@ -17,14 +17,16 @@
17 17
18#include <stdint.h> 18#include <stdint.h>
19#include <string.h> 19#include <string.h>
20
20#include <openssl/opensslconf.h> 21#include <openssl/opensslconf.h>
21 22
22#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) 23#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
23 24
25#include <openssl/err.h>
26#include <openssl/evp.h>
24#include <openssl/chacha.h> 27#include <openssl/chacha.h>
25#include <openssl/poly1305.h> 28#include <openssl/poly1305.h>
26#include <openssl/evp.h> 29
27#include <openssl/err.h>
28#include "evp_locl.h" 30#include "evp_locl.h"
29 31
30#define POLY1305_TAG_LEN 16 32#define POLY1305_TAG_LEN 16
diff --git a/src/lib/libssl/src/crypto/evp/e_des.c b/src/lib/libssl/src/crypto/evp/e_des.c
index 45a6e84cb5..1f0de7cbfd 100644
--- a/src/lib/libssl/src/crypto/evp/e_des.c
+++ b/src/lib/libssl/src/crypto/evp/e_des.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_des.c,v 1.9 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_des.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#ifndef OPENSSL_NO_DES 64#ifndef OPENSSL_NO_DES
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/evp/e_des3.c b/src/lib/libssl/src/crypto/evp/e_des3.c
index 41fa09a2d9..f4264d8ca4 100644
--- a/src/lib/libssl/src/crypto/evp/e_des3.c
+++ b/src/lib/libssl/src/crypto/evp/e_des3.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_des3.c,v 1.14 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: e_des3.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#ifndef OPENSSL_NO_DES 65#ifndef OPENSSL_NO_DES
64#include <openssl/evp.h> 66#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/evp/e_idea.c b/src/lib/libssl/src/crypto/evp/e_idea.c
index 8f4e06161b..7dd385e04e 100644
--- a/src/lib/libssl/src/crypto/evp/e_idea.c
+++ b/src/lib/libssl/src/crypto/evp/e_idea.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_idea.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_idea.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_IDEA 65#ifndef OPENSSL_NO_IDEA
diff --git a/src/lib/libssl/src/crypto/evp/e_old.c b/src/lib/libssl/src/crypto/evp/e_old.c
index bfd45d2c88..235ebe242b 100644
--- a/src/lib/libssl/src/crypto/evp/e_old.c
+++ b/src/lib/libssl/src/crypto/evp/e_old.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_old.c,v 1.6 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_old.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2004. 3 * project 2004.
4 */ 4 */
@@ -56,6 +56,8 @@
56 * 56 *
57 */ 57 */
58 58
59#include <openssl/opensslconf.h>
60
59#ifndef OPENSSL_NO_DEPRECATED 61#ifndef OPENSSL_NO_DEPRECATED
60 62
61#include <openssl/evp.h> 63#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/evp/e_rc2.c b/src/lib/libssl/src/crypto/evp/e_rc2.c
index ad8e2f6c63..c164ab10f7 100644
--- a/src/lib/libssl/src/crypto/evp/e_rc2.c
+++ b/src/lib/libssl/src/crypto/evp/e_rc2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_rc2.c,v 1.8 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_rc2.c,v 1.9 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RC2 65#ifndef OPENSSL_NO_RC2
diff --git a/src/lib/libssl/src/crypto/evp/e_rc4.c b/src/lib/libssl/src/crypto/evp/e_rc4.c
index d272c03ee1..f8e4149a62 100644
--- a/src/lib/libssl/src/crypto/evp/e_rc4.c
+++ b/src/lib/libssl/src/crypto/evp/e_rc4.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_rc4.c,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_rc4.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RC4 65#ifndef OPENSSL_NO_RC4
diff --git a/src/lib/libssl/src/crypto/evp/e_rc4_hmac_md5.c b/src/lib/libssl/src/crypto/evp/e_rc4_hmac_md5.c
index edbc4de539..05c79ff09d 100644
--- a/src/lib/libssl/src/crypto/evp/e_rc4_hmac_md5.c
+++ b/src/lib/libssl/src/crypto/evp/e_rc4_hmac_md5.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_rc4_hmac_md5.c,v 1.3 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_rc4_hmac_md5.c,v 1.4 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -48,11 +48,11 @@
48 * ==================================================================== 48 * ====================================================================
49 */ 49 */
50 50
51#include <openssl/opensslconf.h>
52
53#include <stdio.h> 51#include <stdio.h>
54#include <string.h> 52#include <string.h>
55 53
54#include <openssl/opensslconf.h>
55
56#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_MD5) 56#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_MD5)
57 57
58#include <openssl/evp.h> 58#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/evp/e_rc5.c b/src/lib/libssl/src/crypto/evp/e_rc5.c
index f2c976319b..00e1251818 100644
--- a/src/lib/libssl/src/crypto/evp/e_rc5.c
+++ b/src/lib/libssl/src/crypto/evp/e_rc5.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_rc5.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: e_rc5.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RC5 65#ifndef OPENSSL_NO_RC5
diff --git a/src/lib/libssl/src/crypto/evp/e_xcbc_d.c b/src/lib/libssl/src/crypto/evp/e_xcbc_d.c
index 401fb2b766..496850b315 100644
--- a/src/lib/libssl/src/crypto/evp/e_xcbc_d.c
+++ b/src/lib/libssl/src/crypto/evp/e_xcbc_d.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_xcbc_d.c,v 1.10 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: e_xcbc_d.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63 65
64#ifndef OPENSSL_NO_DES 66#ifndef OPENSSL_NO_DES
diff --git a/src/lib/libssl/src/crypto/evp/evp_enc.c b/src/lib/libssl/src/crypto/evp/evp_enc.c
index 36e39a4668..798ac442f9 100644
--- a/src/lib/libssl/src/crypto/evp/evp_enc.c
+++ b/src/lib/libssl/src/crypto/evp/evp_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_enc.c,v 1.22 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: evp_enc.c,v 1.23 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/evp.h> 65#include <openssl/evp.h>
64#include <openssl/err.h> 66#include <openssl/err.h>
diff --git a/src/lib/libssl/src/crypto/evp/evp_err.c b/src/lib/libssl/src/crypto/evp/evp_err.c
index 6391a81422..2eddd79a3f 100644
--- a/src/lib/libssl/src/crypto/evp/evp_err.c
+++ b/src/lib/libssl/src/crypto/evp/evp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_err.c,v 1.19 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: evp_err.c,v 1.20 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/evp.h> 66#include <openssl/evp.h>
64 67
diff --git a/src/lib/libssl/src/crypto/evp/evp_pbe.c b/src/lib/libssl/src/crypto/evp/evp_pbe.c
index e53a681d5f..63e71c0bc9 100644
--- a/src/lib/libssl/src/crypto/evp/evp_pbe.c
+++ b/src/lib/libssl/src/crypto/evp/evp_pbe.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_pbe.c,v 1.18 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: evp_pbe.c,v 1.19 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/evp.h> 65#include <openssl/evp.h>
64#include <openssl/pkcs12.h> 66#include <openssl/pkcs12.h>
diff --git a/src/lib/libssl/src/crypto/evp/m_dss.c b/src/lib/libssl/src/crypto/evp/m_dss.c
index d49946d803..81e3dd1511 100644
--- a/src/lib/libssl/src/crypto/evp/m_dss.c
+++ b/src/lib/libssl/src/crypto/evp/m_dss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_dss.c,v 1.14 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_dss.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/evp.h> 64#include <openssl/evp.h>
62#include <openssl/objects.h> 65#include <openssl/objects.h>
diff --git a/src/lib/libssl/src/crypto/evp/m_dss1.c b/src/lib/libssl/src/crypto/evp/m_dss1.c
index e7261aeb66..efa91230dc 100644
--- a/src/lib/libssl/src/crypto/evp/m_dss1.c
+++ b/src/lib/libssl/src/crypto/evp/m_dss1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_dss1.c,v 1.14 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_dss1.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_SHA 65#ifndef OPENSSL_NO_SHA
diff --git a/src/lib/libssl/src/crypto/evp/m_ecdsa.c b/src/lib/libssl/src/crypto/evp/m_ecdsa.c
index 20a605292d..d4872dcf29 100644
--- a/src/lib/libssl/src/crypto/evp/m_ecdsa.c
+++ b/src/lib/libssl/src/crypto/evp/m_ecdsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_ecdsa.c,v 1.6 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_ecdsa.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -110,6 +110,9 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113
114#include <openssl/opensslconf.h>
115
113#include "cryptlib.h" 116#include "cryptlib.h"
114#include <openssl/evp.h> 117#include <openssl/evp.h>
115#include <openssl/objects.h> 118#include <openssl/objects.h>
diff --git a/src/lib/libssl/src/crypto/evp/m_md4.c b/src/lib/libssl/src/crypto/evp/m_md4.c
index 8535db9418..e24d0ad66f 100644
--- a/src/lib/libssl/src/crypto/evp/m_md4.c
+++ b/src/lib/libssl/src/crypto/evp/m_md4.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_md4.c,v 1.11 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_md4.c,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_MD4 65#ifndef OPENSSL_NO_MD4
diff --git a/src/lib/libssl/src/crypto/evp/m_md5.c b/src/lib/libssl/src/crypto/evp/m_md5.c
index 93b8672e5a..445b2b4381 100644
--- a/src/lib/libssl/src/crypto/evp/m_md5.c
+++ b/src/lib/libssl/src/crypto/evp/m_md5.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_md5.c,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_md5.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_MD5 65#ifndef OPENSSL_NO_MD5
diff --git a/src/lib/libssl/src/crypto/evp/m_mdc2.c b/src/lib/libssl/src/crypto/evp/m_mdc2.c
index a59cc5da66..c360c986d5 100644
--- a/src/lib/libssl/src/crypto/evp/m_mdc2.c
+++ b/src/lib/libssl/src/crypto/evp/m_mdc2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_mdc2.c,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_mdc2.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_MDC2 65#ifndef OPENSSL_NO_MDC2
diff --git a/src/lib/libssl/src/crypto/evp/m_ripemd.c b/src/lib/libssl/src/crypto/evp/m_ripemd.c
index 60498bfe8a..c496a205d6 100644
--- a/src/lib/libssl/src/crypto/evp/m_ripemd.c
+++ b/src/lib/libssl/src/crypto/evp/m_ripemd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_ripemd.c,v 1.9 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_ripemd.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RIPEMD 65#ifndef OPENSSL_NO_RIPEMD
diff --git a/src/lib/libssl/src/crypto/evp/m_sha.c b/src/lib/libssl/src/crypto/evp/m_sha.c
index 3865e8441f..ed22c1aec5 100644
--- a/src/lib/libssl/src/crypto/evp/m_sha.c
+++ b/src/lib/libssl/src/crypto/evp/m_sha.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_sha.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_sha.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) 65#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0)
diff --git a/src/lib/libssl/src/crypto/evp/m_sha1.c b/src/lib/libssl/src/crypto/evp/m_sha1.c
index 9c0a81b4ed..0441f632d3 100644
--- a/src/lib/libssl/src/crypto/evp/m_sha1.c
+++ b/src/lib/libssl/src/crypto/evp/m_sha1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: m_sha1.c,v 1.15 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_sha1.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_SHA 65#ifndef OPENSSL_NO_SHA
diff --git a/src/lib/libssl/src/crypto/evp/m_wp.c b/src/lib/libssl/src/crypto/evp/m_wp.c
index 0ddb7b9f95..c6b246a3c5 100644
--- a/src/lib/libssl/src/crypto/evp/m_wp.c
+++ b/src/lib/libssl/src/crypto/evp/m_wp.c
@@ -1,6 +1,9 @@
1/* $OpenBSD: m_wp.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: m_wp.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */
2 2
3#include <stdio.h> 3#include <stdio.h>
4
5#include <openssl/opensslconf.h>
6
4#include "cryptlib.h" 7#include "cryptlib.h"
5 8
6#ifndef OPENSSL_NO_WHIRLPOOL 9#ifndef OPENSSL_NO_WHIRLPOOL
diff --git a/src/lib/libssl/src/crypto/evp/p5_crpt2.c b/src/lib/libssl/src/crypto/evp/p5_crpt2.c
index 3a182aabfd..c072376912 100644
--- a/src/lib/libssl/src/crypto/evp/p5_crpt2.c
+++ b/src/lib/libssl/src/crypto/evp/p5_crpt2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p5_crpt2.c,v 1.15 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: p5_crpt2.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -60,6 +60,8 @@
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#if !defined(OPENSSL_NO_HMAC) && !defined(OPENSSL_NO_SHA) 66#if !defined(OPENSSL_NO_HMAC) && !defined(OPENSSL_NO_SHA)
65#include <openssl/x509.h> 67#include <openssl/x509.h>
diff --git a/src/lib/libssl/src/crypto/evp/p_dec.c b/src/lib/libssl/src/crypto/evp/p_dec.c
index 5ed2392270..c47408dff0 100644
--- a/src/lib/libssl/src/crypto/evp/p_dec.c
+++ b/src/lib/libssl/src/crypto/evp/p_dec.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_dec.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_dec.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/rand.h> 64#include <openssl/rand.h>
62#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
diff --git a/src/lib/libssl/src/crypto/evp/p_enc.c b/src/lib/libssl/src/crypto/evp/p_enc.c
index f6b2e52521..a1fb9d1d2c 100644
--- a/src/lib/libssl/src/crypto/evp/p_enc.c
+++ b/src/lib/libssl/src/crypto/evp/p_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_enc.c,v 1.7 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_enc.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/rand.h> 64#include <openssl/rand.h>
62#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
diff --git a/src/lib/libssl/src/crypto/evp/p_lib.c b/src/lib/libssl/src/crypto/evp/p_lib.c
index 8abaae3bcd..6db5e95cd0 100644
--- a/src/lib/libssl/src/crypto/evp/p_lib.c
+++ b/src/lib/libssl/src/crypto/evp/p_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_lib.c,v 1.13 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_lib.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/err.h> 65#include <openssl/err.h>
diff --git a/src/lib/libssl/src/crypto/evp/p_open.c b/src/lib/libssl/src/crypto/evp/p_open.c
index 2f8a3832f7..aec4d9f3d0 100644
--- a/src/lib/libssl/src/crypto/evp/p_open.c
+++ b/src/lib/libssl/src/crypto/evp/p_open.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_open.c,v 1.14 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_open.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61 64
62#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
diff --git a/src/lib/libssl/src/crypto/evp/p_seal.c b/src/lib/libssl/src/crypto/evp/p_seal.c
index d590cd7e37..4acb9f8054 100644
--- a/src/lib/libssl/src/crypto/evp/p_seal.c
+++ b/src/lib/libssl/src/crypto/evp/p_seal.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_seal.c,v 1.11 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: p_seal.c,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/rand.h> 64#include <openssl/rand.h>
62#ifndef OPENSSL_NO_RSA 65#ifndef OPENSSL_NO_RSA
diff --git a/src/lib/libssl/src/crypto/evp/pmeth_lib.c b/src/lib/libssl/src/crypto/evp/pmeth_lib.c
index 6f8515c670..f23524b8a9 100644
--- a/src/lib/libssl/src/crypto/evp/pmeth_lib.c
+++ b/src/lib/libssl/src/crypto/evp/pmeth_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pmeth_lib.c,v 1.6 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: pmeth_lib.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -60,6 +60,8 @@
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/objects.h> 66#include <openssl/objects.h>
65#include <openssl/evp.h> 67#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/lhash/lh_stats.c b/src/lib/libssl/src/crypto/lhash/lh_stats.c
index 1c7de61978..b4202efb2e 100644
--- a/src/lib/libssl/src/crypto/lhash/lh_stats.c
+++ b/src/lib/libssl/src/crypto/lhash/lh_stats.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: lh_stats.c,v 1.10 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: lh_stats.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <stdlib.h> 61#include <stdlib.h>
62
63#include <openssl/opensslconf.h>
64
62/* If you wish to build this outside of SSLeay, remove the following lines 65/* If you wish to build this outside of SSLeay, remove the following lines
63 * and things should work as expected */ 66 * and things should work as expected */
64#include "cryptlib.h" 67#include "cryptlib.h"
diff --git a/src/lib/libssl/src/crypto/lhash/lhash.c b/src/lib/libssl/src/crypto/lhash/lhash.c
index bfac94a0f7..f4994f7471 100644
--- a/src/lib/libssl/src/crypto/lhash/lhash.c
+++ b/src/lib/libssl/src/crypto/lhash/lhash.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: lhash.c,v 1.16 2014/07/09 11:10:51 bcook Exp $ */ 1/* $OpenBSD: lhash.c,v 1.17 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -97,6 +97,9 @@
97#include <stdio.h> 97#include <stdio.h>
98#include <string.h> 98#include <string.h>
99#include <stdlib.h> 99#include <stdlib.h>
100
101#include <openssl/opensslconf.h>
102
100#include <openssl/crypto.h> 103#include <openssl/crypto.h>
101#include <openssl/lhash.h> 104#include <openssl/lhash.h>
102 105
diff --git a/src/lib/libssl/src/crypto/md32_common.h b/src/lib/libssl/src/crypto/md32_common.h
index 0a78a5e86a..af753099f5 100644
--- a/src/lib/libssl/src/crypto/md32_common.h
+++ b/src/lib/libssl/src/crypto/md32_common.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: md32_common.h,v 1.15 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: md32_common.h,v 1.16 2014/07/10 22:45:56 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -109,6 +109,8 @@
109 * <appro@fy.chalmers.se> 109 * <appro@fy.chalmers.se>
110 */ 110 */
111 111
112#include <openssl/opensslconf.h>
113
112#if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN) 114#if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN)
113#error "DATA_ORDER must be defined!" 115#error "DATA_ORDER must be defined!"
114#endif 116#endif
diff --git a/src/lib/libssl/src/crypto/md4/md4.h b/src/lib/libssl/src/crypto/md4/md4.h
index bbdac701f6..39ee8f5841 100644
--- a/src/lib/libssl/src/crypto/md4/md4.h
+++ b/src/lib/libssl/src/crypto/md4/md4.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: md4.h,v 1.12 2014/07/10 09:01:04 miod Exp $ */ 1/* $OpenBSD: md4.h,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stddef.h>
60
59#ifndef HEADER_MD4_H 61#ifndef HEADER_MD4_H
60#define HEADER_MD4_H 62#define HEADER_MD4_H
61 63
62#include <stddef.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libssl/src/crypto/md5/md5.h b/src/lib/libssl/src/crypto/md5/md5.h
index 3f27da8d69..98bdbc7b25 100644
--- a/src/lib/libssl/src/crypto/md5/md5.h
+++ b/src/lib/libssl/src/crypto/md5/md5.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: md5.h,v 1.16 2014/07/10 09:01:04 miod Exp $ */ 1/* $OpenBSD: md5.h,v 1.17 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stddef.h>
60
59#ifndef HEADER_MD5_H 61#ifndef HEADER_MD5_H
60#define HEADER_MD5_H 62#define HEADER_MD5_H
61 63
62#include <stddef.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libssl/src/crypto/mdc2/mdc2.h b/src/lib/libssl/src/crypto/mdc2/mdc2.h
index 8ac68a15a9..9128eeb878 100644
--- a/src/lib/libssl/src/crypto/mdc2/mdc2.h
+++ b/src/lib/libssl/src/crypto/mdc2/mdc2.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: mdc2.h,v 1.12 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: mdc2.h,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#ifndef HEADER_MDC2_H 59#ifndef HEADER_MDC2_H
60#define HEADER_MDC2_H 60#define HEADER_MDC2_H
61 61
62#include <openssl/opensslconf.h>
63
62#include <openssl/des.h> 64#include <openssl/des.h>
63 65
64#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libssl/src/crypto/modes/modes_lcl.h b/src/lib/libssl/src/crypto/modes/modes_lcl.h
index eacb253e26..8e43e480fc 100644
--- a/src/lib/libssl/src/crypto/modes/modes_lcl.h
+++ b/src/lib/libssl/src/crypto/modes/modes_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: modes_lcl.h,v 1.7 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: modes_lcl.h,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2010 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2010 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -6,9 +6,11 @@
6 * ==================================================================== 6 * ====================================================================
7 */ 7 */
8 8
9#include <openssl/modes.h>
10#include <machine/endian.h> 9#include <machine/endian.h>
11 10
11#include <openssl/opensslconf.h>
12
13#include <openssl/modes.h>
12 14
13#if defined(_LP64) 15#if defined(_LP64)
14typedef long i64; 16typedef long i64;
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.c b/src/lib/libssl/src/crypto/objects/obj_dat.c
index 7221cbc847..4d0307a315 100644
--- a/src/lib/libssl/src/crypto/objects/obj_dat.c
+++ b/src/lib/libssl/src/crypto/objects/obj_dat.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: obj_dat.c,v 1.28 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: obj_dat.c,v 1.29 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -61,6 +61,8 @@
61#include <stdio.h> 61#include <stdio.h>
62#include <string.h> 62#include <string.h>
63 63
64#include <openssl/opensslconf.h>
65
64#include "cryptlib.h" 66#include "cryptlib.h"
65#include <openssl/lhash.h> 67#include <openssl/lhash.h>
66#include <openssl/asn1.h> 68#include <openssl/asn1.h>
diff --git a/src/lib/libssl/src/crypto/objects/obj_err.c b/src/lib/libssl/src/crypto/objects/obj_err.c
index 4d07476408..9cea59b785 100644
--- a/src/lib/libssl/src/crypto/objects/obj_err.c
+++ b/src/lib/libssl/src/crypto/objects/obj_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: obj_err.c,v 1.10 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: obj_err.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/objects.h> 66#include <openssl/objects.h>
64 67
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_err.c b/src/lib/libssl/src/crypto/ocsp/ocsp_err.c
index c4efc1c4e9..af781074b6 100644
--- a/src/lib/libssl/src/crypto/ocsp/ocsp_err.c
+++ b/src/lib/libssl/src/crypto/ocsp/ocsp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocsp_err.c,v 1.6 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: ocsp_err.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ocsp.h> 66#include <openssl/ocsp.h>
64 67
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c b/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c
index ce6b0dc65b..eda627f4ed 100644
--- a/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c
+++ b/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocsp_lib.c,v 1.12 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: ocsp_lib.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL 2/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL
3 * project. */ 3 * project. */
4 4
@@ -65,6 +65,8 @@
65#include <stdio.h> 65#include <stdio.h>
66#include <string.h> 66#include <string.h>
67 67
68#include <openssl/opensslconf.h>
69
68#include <openssl/objects.h> 70#include <openssl/objects.h>
69#include <openssl/rand.h> 71#include <openssl/rand.h>
70#include <openssl/x509.h> 72#include <openssl/x509.h>
diff --git a/src/lib/libssl/src/crypto/pem/pem_all.c b/src/lib/libssl/src/crypto/pem/pem_all.c
index a43c81f2c2..e883acdc65 100644
--- a/src/lib/libssl/src/crypto/pem/pem_all.c
+++ b/src/lib/libssl/src/crypto/pem/pem_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_all.c,v 1.13 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: pem_all.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -110,6 +110,9 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113
114#include <openssl/opensslconf.h>
115
113#include "cryptlib.h" 116#include "cryptlib.h"
114#include <openssl/bio.h> 117#include <openssl/bio.h>
115#include <openssl/evp.h> 118#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/pem/pem_err.c b/src/lib/libssl/src/crypto/pem/pem_err.c
index b7453f3f66..c3d0fa3576 100644
--- a/src/lib/libssl/src/crypto/pem/pem_err.c
+++ b/src/lib/libssl/src/crypto/pem/pem_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_err.c,v 1.10 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: pem_err.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/pem.h> 66#include <openssl/pem.h>
64 67
diff --git a/src/lib/libssl/src/crypto/pem/pem_info.c b/src/lib/libssl/src/crypto/pem/pem_info.c
index 0c8946550e..eaf70e4267 100644
--- a/src/lib/libssl/src/crypto/pem/pem_info.c
+++ b/src/lib/libssl/src/crypto/pem/pem_info.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_info.c,v 1.17 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pem_info.c,v 1.18 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/buffer.h> 65#include <openssl/buffer.h>
64#include <openssl/objects.h> 66#include <openssl/objects.h>
diff --git a/src/lib/libssl/src/crypto/pem/pem_lib.c b/src/lib/libssl/src/crypto/pem/pem_lib.c
index 130a2739a5..70e2aa633d 100644
--- a/src/lib/libssl/src/crypto/pem/pem_lib.c
+++ b/src/lib/libssl/src/crypto/pem/pem_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_lib.c,v 1.31 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pem_lib.c,v 1.32 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,8 @@
60#include <stdio.h> 60#include <stdio.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/buffer.h> 66#include <openssl/buffer.h>
65#include <openssl/objects.h> 67#include <openssl/objects.h>
diff --git a/src/lib/libssl/src/crypto/pem/pem_pkey.c b/src/lib/libssl/src/crypto/pem/pem_pkey.c
index cfa3c12752..68d6590f14 100644
--- a/src/lib/libssl/src/crypto/pem/pem_pkey.c
+++ b/src/lib/libssl/src/crypto/pem/pem_pkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_pkey.c,v 1.15 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pem_pkey.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/buffer.h> 65#include <openssl/buffer.h>
64#include <openssl/objects.h> 66#include <openssl/objects.h>
diff --git a/src/lib/libssl/src/crypto/pem/pem_seal.c b/src/lib/libssl/src/crypto/pem/pem_seal.c
index 45ea52b24b..08680e45db 100644
--- a/src/lib/libssl/src/crypto/pem/pem_seal.c
+++ b/src/lib/libssl/src/crypto/pem/pem_seal.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pem_seal.c,v 1.18 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pem_seal.c,v 1.19 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,7 @@
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h> /* for OPENSSL_NO_RSA */ 62#include <openssl/opensslconf.h> /* for OPENSSL_NO_RSA */
63
63#ifndef OPENSSL_NO_RSA 64#ifndef OPENSSL_NO_RSA
64#include "cryptlib.h" 65#include "cryptlib.h"
65#include <openssl/evp.h> 66#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/pem/pvkfmt.c b/src/lib/libssl/src/crypto/pem/pvkfmt.c
index 53c96e088c..8a945b4dd7 100644
--- a/src/lib/libssl/src/crypto/pem/pvkfmt.c
+++ b/src/lib/libssl/src/crypto/pem/pvkfmt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pvkfmt.c,v 1.7 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: pvkfmt.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2005. 3 * project 2005.
4 */ 4 */
@@ -62,6 +62,8 @@
62 62
63#include <string.h> 63#include <string.h>
64 64
65#include <openssl/opensslconf.h>
66
65#include "cryptlib.h" 67#include "cryptlib.h"
66#include <openssl/pem.h> 68#include <openssl/pem.h>
67#include <openssl/rand.h> 69#include <openssl/rand.h>
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c b/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c
index fabc96e858..582d1de23b 100644
--- a/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c
+++ b/src/lib/libssl/src/crypto/pkcs12/p12_mutl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_mutl.c,v 1.15 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: p12_mutl.c,v 1.16 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#ifndef OPENSSL_NO_HMAC 64#ifndef OPENSSL_NO_HMAC
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/hmac.h> 66#include <openssl/hmac.h>
diff --git a/src/lib/libssl/src/crypto/pkcs12/pk12err.c b/src/lib/libssl/src/crypto/pkcs12/pk12err.c
index 12f418eb23..0464a8303c 100644
--- a/src/lib/libssl/src/crypto/pkcs12/pk12err.c
+++ b/src/lib/libssl/src/crypto/pkcs12/pk12err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pk12err.c,v 1.9 2014/07/08 09:24:53 jsing Exp $ */ 1/* $OpenBSD: pk12err.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/pkcs12.h> 66#include <openssl/pkcs12.h>
64 67
diff --git a/src/lib/libssl/src/crypto/pkcs7/pkcs7err.c b/src/lib/libssl/src/crypto/pkcs7/pkcs7err.c
index a194e2dadc..8a67bf5221 100644
--- a/src/lib/libssl/src/crypto/pkcs7/pkcs7err.c
+++ b/src/lib/libssl/src/crypto/pkcs7/pkcs7err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs7err.c,v 1.10 2014/06/29 17:05:36 jsing Exp $ */ 1/* $OpenBSD: pkcs7err.c,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/pkcs7.h> 66#include <openssl/pkcs7.h>
64 67
diff --git a/src/lib/libssl/src/crypto/rand/rand.h b/src/lib/libssl/src/crypto/rand/rand.h
index af3d111b13..6ed16b9c41 100644
--- a/src/lib/libssl/src/crypto/rand/rand.h
+++ b/src/lib/libssl/src/crypto/rand/rand.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rand.h,v 1.20 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rand.h,v 1.21 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stdlib.h>
60
59#ifndef HEADER_RAND_H 61#ifndef HEADER_RAND_H
60#define HEADER_RAND_H 62#define HEADER_RAND_H
61 63
62#include <stdlib.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#include <openssl/ossl_typ.h> 66#include <openssl/ossl_typ.h>
diff --git a/src/lib/libssl/src/crypto/rand/rand_err.c b/src/lib/libssl/src/crypto/rand/rand_err.c
index 35b1d43666..3f91fcb37b 100644
--- a/src/lib/libssl/src/crypto/rand/rand_err.c
+++ b/src/lib/libssl/src/crypto/rand/rand_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rand_err.c,v 1.13 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rand_err.c,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/rand.h> 66#include <openssl/rand.h>
64 67
diff --git a/src/lib/libssl/src/crypto/rand/rand_lib.c b/src/lib/libssl/src/crypto/rand/rand_lib.c
index 200a868d70..38c1569940 100644
--- a/src/lib/libssl/src/crypto/rand/rand_lib.c
+++ b/src/lib/libssl/src/crypto/rand/rand_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rand_lib.c,v 1.17 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rand_lib.c,v 1.18 2014/07/10 22:45:57 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 3 * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
4 * 4 *
@@ -14,6 +14,9 @@
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */ 16 */
17
18#include <openssl/opensslconf.h>
19
17#include "cryptlib.h" 20#include "cryptlib.h"
18#include <openssl/rand.h> 21#include <openssl/rand.h>
19 22
diff --git a/src/lib/libssl/src/crypto/rc2/rc2.h b/src/lib/libssl/src/crypto/rc2/rc2.h
index eeec3c0c9b..21511ff36e 100644
--- a/src/lib/libssl/src/crypto/rc2/rc2.h
+++ b/src/lib/libssl/src/crypto/rc2/rc2.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rc2.h,v 1.10 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rc2.h,v 1.11 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,7 @@
60#define HEADER_RC2_H 60#define HEADER_RC2_H
61 61
62#include <openssl/opensslconf.h> /* OPENSSL_NO_RC2, RC2_INT */ 62#include <openssl/opensslconf.h> /* OPENSSL_NO_RC2, RC2_INT */
63
63#ifdef OPENSSL_NO_RC2 64#ifdef OPENSSL_NO_RC2
64#error RC2 is disabled. 65#error RC2 is disabled.
65#endif 66#endif
diff --git a/src/lib/libssl/src/crypto/rc4/rc4.h b/src/lib/libssl/src/crypto/rc4/rc4.h
index 0712fc0a95..5359577402 100644
--- a/src/lib/libssl/src/crypto/rc4/rc4.h
+++ b/src/lib/libssl/src/crypto/rc4/rc4.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rc4.h,v 1.11 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rc4.h,v 1.12 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,7 @@
60#define HEADER_RC4_H 60#define HEADER_RC4_H
61 61
62#include <openssl/opensslconf.h> /* OPENSSL_NO_RC4, RC4_INT */ 62#include <openssl/opensslconf.h> /* OPENSSL_NO_RC4, RC4_INT */
63
63#ifdef OPENSSL_NO_RC4 64#ifdef OPENSSL_NO_RC4
64#error RC4 is disabled. 65#error RC4 is disabled.
65#endif 66#endif
diff --git a/src/lib/libssl/src/crypto/rc5/rc5_locl.h b/src/lib/libssl/src/crypto/rc5/rc5_locl.h
index 07e1503981..07671decaa 100644
--- a/src/lib/libssl/src/crypto/rc5/rc5_locl.h
+++ b/src/lib/libssl/src/crypto/rc5/rc5_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rc5_locl.h,v 1.4 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: rc5_locl.h,v 1.5 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,8 @@
58 58
59#include <stdlib.h> 59#include <stdlib.h>
60 60
61#include <openssl/opensslconf.h>
62
61#undef c2l 63#undef c2l
62#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \ 64#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
63 l|=((unsigned long)(*((c)++)))<< 8L, \ 65 l|=((unsigned long)(*((c)++)))<< 8L, \
diff --git a/src/lib/libssl/src/crypto/ripemd/ripemd.h b/src/lib/libssl/src/crypto/ripemd/ripemd.h
index 820d0a2a69..a5f3a12937 100644
--- a/src/lib/libssl/src/crypto/ripemd/ripemd.h
+++ b/src/lib/libssl/src/crypto/ripemd/ripemd.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ripemd.h,v 1.13 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: ripemd.h,v 1.14 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stddef.h>
60
59#ifndef HEADER_RIPEMD_H 61#ifndef HEADER_RIPEMD_H
60#define HEADER_RIPEMD_H 62#define HEADER_RIPEMD_H
61 63
62#include <stddef.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libssl/src/crypto/rsa/rsa.h b/src/lib/libssl/src/crypto/rsa/rsa.h
index b84ab4c6d7..d15d1f1c97 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa.h
+++ b/src/lib/libssl/src/crypto/rsa/rsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa.h,v 1.24 2014/07/10 12:08:22 jsing Exp $ */ 1/* $OpenBSD: rsa.h,v 1.25 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -59,6 +59,8 @@
59#ifndef HEADER_RSA_H 59#ifndef HEADER_RSA_H
60#define HEADER_RSA_H 60#define HEADER_RSA_H
61 61
62#include <openssl/opensslconf.h>
63
62#include <openssl/asn1.h> 64#include <openssl/asn1.h>
63 65
64#ifndef OPENSSL_NO_BIO 66#ifndef OPENSSL_NO_BIO
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_ameth.c b/src/lib/libssl/src/crypto/rsa/rsa_ameth.c
index 679fe7b318..1eeb58ed9b 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_ameth.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_ameth.c,v 1.9 2014/07/09 22:55:17 tedu Exp $ */ 1/* $OpenBSD: rsa_ameth.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/asn1t.h> 64#include <openssl/asn1t.h>
62#include <openssl/x509.h> 65#include <openssl/x509.h>
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_crpt.c b/src/lib/libssl/src/crypto/rsa/rsa_crpt.c
index 5de69a6fb5..220ce9497a 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_crpt.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_crpt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_crpt.c,v 1.9 2014/07/10 12:36:58 miod Exp $ */ 1/* $OpenBSD: rsa_crpt.c,v 1.10 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/crypto.h> 63#include <openssl/crypto.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/lhash.h> 65#include <openssl/lhash.h>
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_depr.c b/src/lib/libssl/src/crypto/rsa/rsa_depr.c
index f66c832b2a..547f9a491e 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_depr.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_depr.c,v 1.6 2014/07/10 07:43:11 jsing Exp $ */ 1/* $OpenBSD: rsa_depr.c,v 1.7 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <time.h> 60#include <time.h>
61
62#include <openssl/opensslconf.h>
63
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/bn.h> 65#include <openssl/bn.h>
63#include <openssl/rsa.h> 66#include <openssl/rsa.h>
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_eay.c b/src/lib/libssl/src/crypto/rsa/rsa_eay.c
index 9b390fb8c0..3cc8f6c5cf 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_eay.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_eay.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_eay.c,v 1.32 2014/07/10 07:43:11 jsing Exp $ */ 1/* $OpenBSD: rsa_eay.c,v 1.33 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -110,6 +110,9 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113
114#include <openssl/opensslconf.h>
115
113#include "cryptlib.h" 116#include "cryptlib.h"
114#include <openssl/bn.h> 117#include <openssl/bn.h>
115#include <openssl/rsa.h> 118#include <openssl/rsa.h>
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_err.c b/src/lib/libssl/src/crypto/rsa/rsa_err.c
index 893069a892..4c4a3551c5 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_err.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_err.c,v 1.14 2014/07/09 19:51:38 jsing Exp $ */ 1/* $OpenBSD: rsa_err.c,v 1.15 2014/07/10 22:45:57 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/rsa.h> 66#include <openssl/rsa.h>
64 67
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_lib.c b/src/lib/libssl/src/crypto/rsa/rsa_lib.c
index 6f378ba0c0..d7a51c7b05 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_lib.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_lib.c,v 1.26 2014/07/10 07:43:11 jsing Exp $ */ 1/* $OpenBSD: rsa_lib.c,v 1.27 2014/07/10 22:45:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/crypto.h> 63#include <openssl/crypto.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/lhash.h> 65#include <openssl/lhash.h>
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c
index 893fbc04b8..09799818d3 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_oaep.c,v 1.21 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: rsa_oaep.c,v 1.22 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Ulf Moeller. This software is distributed on an "AS IS" 2/* Written by Ulf Moeller. This software is distributed on an "AS IS"
3 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. */ 3 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. */
4 4
@@ -21,6 +21,8 @@
21#include <stdio.h> 21#include <stdio.h>
22#include <string.h> 22#include <string.h>
23 23
24#include <openssl/opensslconf.h>
25
24#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1) 26#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)
25#include "cryptlib.h" 27#include "cryptlib.h"
26#include <openssl/bn.h> 28#include <openssl/bn.h>
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_pmeth.c b/src/lib/libssl/src/crypto/rsa/rsa_pmeth.c
index f9ebd9baba..0b2d680eed 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_pmeth.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_pmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_pmeth.c,v 1.12 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: rsa_pmeth.c,v 1.13 2014/07/10 22:45:57 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -60,6 +60,8 @@
60#include <stdio.h> 60#include <stdio.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/asn1t.h> 66#include <openssl/asn1t.h>
65#include <openssl/x509.h> 67#include <openssl/x509.h>
diff --git a/src/lib/libssl/src/crypto/sha/sha.h b/src/lib/libssl/src/crypto/sha/sha.h
index 5baa80e62f..c2e303fcc2 100644
--- a/src/lib/libssl/src/crypto/sha/sha.h
+++ b/src/lib/libssl/src/crypto/sha/sha.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha.h,v 1.16 2014/07/10 09:01:04 miod Exp $ */ 1/* $OpenBSD: sha.h,v 1.17 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <stddef.h>
60
59#ifndef HEADER_SHA_H 61#ifndef HEADER_SHA_H
60#define HEADER_SHA_H 62#define HEADER_SHA_H
61 63
62#include <stddef.h>
63
64#include <openssl/opensslconf.h> 64#include <openssl/opensslconf.h>
65 65
66#ifdef __cplusplus 66#ifdef __cplusplus
diff --git a/src/lib/libssl/src/crypto/sha/sha1_one.c b/src/lib/libssl/src/crypto/sha/sha1_one.c
index b6178c39af..f6b5e4bacf 100644
--- a/src/lib/libssl/src/crypto/sha/sha1_one.c
+++ b/src/lib/libssl/src/crypto/sha/sha1_one.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha1_one.c,v 1.10 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: sha1_one.c,v 1.11 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,6 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61
62#include <openssl/opensslconf.h>
63
61#include <openssl/crypto.h> 64#include <openssl/crypto.h>
62#include <openssl/sha.h> 65#include <openssl/sha.h>
63 66
diff --git a/src/lib/libssl/src/crypto/sha/sha1dgst.c b/src/lib/libssl/src/crypto/sha/sha1dgst.c
index 94fabddd83..aac27bdd2d 100644
--- a/src/lib/libssl/src/crypto/sha/sha1dgst.c
+++ b/src/lib/libssl/src/crypto/sha/sha1dgst.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha1dgst.c,v 1.12 2014/07/09 11:10:51 bcook Exp $ */ 1/* $OpenBSD: sha1dgst.c,v 1.13 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,8 +56,10 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <openssl/crypto.h>
60#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
61#include <openssl/crypto.h>
62
61#if !defined(OPENSSL_NO_SHA1) && !defined(OPENSSL_NO_SHA) 63#if !defined(OPENSSL_NO_SHA1) && !defined(OPENSSL_NO_SHA)
62 64
63#undef SHA_0 65#undef SHA_0
diff --git a/src/lib/libssl/src/crypto/sha/sha256.c b/src/lib/libssl/src/crypto/sha/sha256.c
index 6d7af561fc..a4c259dab7 100644
--- a/src/lib/libssl/src/crypto/sha/sha256.c
+++ b/src/lib/libssl/src/crypto/sha/sha256.c
@@ -1,15 +1,18 @@
1/* $OpenBSD: sha256.c,v 1.6 2014/07/09 16:06:13 miod Exp $ */ 1/* $OpenBSD: sha256.c,v 1.7 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved 3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved
4 * according to the OpenSSL license [found in ../../LICENSE]. 4 * according to the OpenSSL license [found in ../../LICENSE].
5 * ==================================================================== 5 * ====================================================================
6 */ 6 */
7
7#include <openssl/opensslconf.h> 8#include <openssl/opensslconf.h>
9
8#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256) 10#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256)
9 11
12#include <machine/endian.h>
13
10#include <stdlib.h> 14#include <stdlib.h>
11#include <string.h> 15#include <string.h>
12#include <machine/endian.h>
13 16
14#include <openssl/crypto.h> 17#include <openssl/crypto.h>
15#include <openssl/sha.h> 18#include <openssl/sha.h>
diff --git a/src/lib/libssl/src/crypto/sha/sha512.c b/src/lib/libssl/src/crypto/sha/sha512.c
index 01ec6a6cde..eb10024e32 100644
--- a/src/lib/libssl/src/crypto/sha/sha512.c
+++ b/src/lib/libssl/src/crypto/sha/sha512.c
@@ -1,10 +1,17 @@
1/* $OpenBSD: sha512.c,v 1.11 2014/07/09 16:06:13 miod Exp $ */ 1/* $OpenBSD: sha512.c,v 1.12 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved 3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved
4 * according to the OpenSSL license [found in ../../LICENSE]. 4 * according to the OpenSSL license [found in ../../LICENSE].
5 * ==================================================================== 5 * ====================================================================
6 */ 6 */
7
8#include <machine/endian.h>
9
10#include <stdlib.h>
11#include <string.h>
12
7#include <openssl/opensslconf.h> 13#include <openssl/opensslconf.h>
14
8#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA512) 15#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA512)
9/* 16/*
10 * IMPLEMENTATION NOTES. 17 * IMPLEMENTATION NOTES.
@@ -41,9 +48,6 @@
41 * 16-bit platforms. 48 * 16-bit platforms.
42 * <appro@fy.chalmers.se> 49 * <appro@fy.chalmers.se>
43 */ 50 */
44#include <stdlib.h>
45#include <string.h>
46#include <machine/endian.h>
47 51
48#include <openssl/crypto.h> 52#include <openssl/crypto.h>
49#include <openssl/sha.h> 53#include <openssl/sha.h>
diff --git a/src/lib/libssl/src/crypto/sha/sha_dgst.c b/src/lib/libssl/src/crypto/sha/sha_dgst.c
index a255450977..bb8c0c244f 100644
--- a/src/lib/libssl/src/crypto/sha/sha_dgst.c
+++ b/src/lib/libssl/src/crypto/sha/sha_dgst.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha_dgst.c,v 1.11 2014/07/09 11:10:51 bcook Exp $ */ 1/* $OpenBSD: sha_dgst.c,v 1.12 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,8 +56,10 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <openssl/crypto.h>
60#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60
61#include <openssl/crypto.h>
62
61#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA) 63#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA)
62 64
63#undef SHA_1 65#undef SHA_1
@@ -70,4 +72,3 @@
70#include "sha_locl.h" 72#include "sha_locl.h"
71 73
72#endif 74#endif
73
diff --git a/src/lib/libssl/src/crypto/sha/sha_one.c b/src/lib/libssl/src/crypto/sha/sha_one.c
index 557d3cab6a..1d3fc35f05 100644
--- a/src/lib/libssl/src/crypto/sha/sha_one.c
+++ b/src/lib/libssl/src/crypto/sha/sha_one.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha_one.c,v 1.7 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: sha_one.c,v 1.8 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -58,8 +58,11 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61#include <openssl/sha.h> 61
62#include <openssl/opensslconf.h>
63
62#include <openssl/crypto.h> 64#include <openssl/crypto.h>
65#include <openssl/sha.h>
63 66
64#ifndef OPENSSL_NO_SHA0 67#ifndef OPENSSL_NO_SHA0
65unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md) 68unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md)
diff --git a/src/lib/libssl/src/crypto/srp/srp.h b/src/lib/libssl/src/crypto/srp/srp.h
index 53e7b8049a..168d9656b3 100644
--- a/src/lib/libssl/src/crypto/srp/srp.h
+++ b/src/lib/libssl/src/crypto/srp/srp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: srp.h,v 1.2 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: srp.h,v 1.3 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with 2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with
3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr) 3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr)
4 * for the EdelKey project and contributed to the OpenSSL project 2004. 4 * for the EdelKey project and contributed to the OpenSSL project 2004.
@@ -59,6 +59,8 @@
59#ifndef __SRP_H__ 59#ifndef __SRP_H__
60#define __SRP_H__ 60#define __SRP_H__
61 61
62#include <openssl/opensslconf.h>
63
62#ifndef OPENSSL_NO_SRP 64#ifndef OPENSSL_NO_SRP
63 65
64#include <stdio.h> 66#include <stdio.h>
diff --git a/src/lib/libssl/src/crypto/srp/srp_lib.c b/src/lib/libssl/src/crypto/srp/srp_lib.c
index 19056d4008..078296fa0a 100644
--- a/src/lib/libssl/src/crypto/srp/srp_lib.c
+++ b/src/lib/libssl/src/crypto/srp/srp_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: srp_lib.c,v 1.7 2014/07/10 20:22:00 miod Exp $ */ 1/* $OpenBSD: srp_lib.c,v 1.8 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with 2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with
3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr) 3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr)
4 * for the EdelKey project and contributed to the OpenSSL project 2004. 4 * for the EdelKey project and contributed to the OpenSSL project 2004.
@@ -56,6 +56,9 @@
56 * Hudson (tjh@cryptsoft.com). 56 * Hudson (tjh@cryptsoft.com).
57 * 57 *
58 */ 58 */
59
60#include <openssl/opensslconf.h>
61
59#ifndef OPENSSL_NO_SRP 62#ifndef OPENSSL_NO_SRP
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include "srp_lcl.h" 64#include "srp_lcl.h"
diff --git a/src/lib/libssl/src/crypto/srp/srp_vfy.c b/src/lib/libssl/src/crypto/srp/srp_vfy.c
index fb6e0ab806..756744609a 100644
--- a/src/lib/libssl/src/crypto/srp/srp_vfy.c
+++ b/src/lib/libssl/src/crypto/srp/srp_vfy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: srp_vfy.c,v 1.5 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: srp_vfy.c,v 1.6 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with 2/* Written by Christophe Renou (christophe.renou@edelweb.fr) with
3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr) 3 * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr)
4 * for the EdelKey project and contributed to the OpenSSL project 2004. 4 * for the EdelKey project and contributed to the OpenSSL project 2004.
@@ -56,6 +56,9 @@
56 * Hudson (tjh@cryptsoft.com). 56 * Hudson (tjh@cryptsoft.com).
57 * 57 *
58 */ 58 */
59
60#include <openssl/opensslconf.h>
61
59#ifndef OPENSSL_NO_SRP 62#ifndef OPENSSL_NO_SRP
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include "srp_lcl.h" 64#include "srp_lcl.h"
diff --git a/src/lib/libssl/src/crypto/store/str_err.c b/src/lib/libssl/src/crypto/store/str_err.c
index a3f7f2aa46..ff353920ab 100644
--- a/src/lib/libssl/src/crypto/store/str_err.c
+++ b/src/lib/libssl/src/crypto/store/str_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: str_err.c,v 1.3 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: str_err.c,v 1.4 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/store.h> 66#include <openssl/store.h>
64 67
diff --git a/src/lib/libssl/src/crypto/store/str_lib.c b/src/lib/libssl/src/crypto/store/str_lib.c
index 2e76b6e728..ff00aa19ce 100644
--- a/src/lib/libssl/src/crypto/store/str_lib.c
+++ b/src/lib/libssl/src/crypto/store/str_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: str_lib.c,v 1.9 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: str_lib.c,v 1.10 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2003. 3 * project 2003.
4 */ 4 */
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <string.h> 59#include <string.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/bn.h> 63#include <openssl/bn.h>
61#include <openssl/err.h> 64#include <openssl/err.h>
62#ifndef OPENSSL_NO_ENGINE 65#ifndef OPENSSL_NO_ENGINE
diff --git a/src/lib/libssl/src/crypto/ts/ts.h b/src/lib/libssl/src/crypto/ts/ts.h
index a6010fe86a..4457d30dd7 100644
--- a/src/lib/libssl/src/crypto/ts/ts.h
+++ b/src/lib/libssl/src/crypto/ts/ts.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts.h,v 1.6 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: ts.h,v 1.7 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL
3 * project 2002, 2003, 2004. 3 * project 2002, 2003, 2004.
4 */ 4 */
@@ -60,6 +60,7 @@
60#define HEADER_TS_H 60#define HEADER_TS_H
61 61
62#include <openssl/opensslconf.h> 62#include <openssl/opensslconf.h>
63
63#ifndef OPENSSL_NO_BUFFER 64#ifndef OPENSSL_NO_BUFFER
64#include <openssl/buffer.h> 65#include <openssl/buffer.h>
65#endif 66#endif
diff --git a/src/lib/libssl/src/crypto/ts/ts_asn1.c b/src/lib/libssl/src/crypto/ts/ts_asn1.c
index 8ee9f08221..bb87aa1d88 100644
--- a/src/lib/libssl/src/crypto/ts/ts_asn1.c
+++ b/src/lib/libssl/src/crypto/ts/ts_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_asn1.c,v 1.4 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ts_asn1.c,v 1.5 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Nils Larsch for the OpenSSL project 2004. 2/* Written by Nils Larsch for the OpenSSL project 2004.
3 */ 3 */
4/* ==================================================================== 4/* ====================================================================
@@ -55,6 +55,8 @@
55 * 55 *
56 */ 56 */
57 57
58#include <openssl/opensslconf.h>
59
58#include <openssl/ts.h> 60#include <openssl/ts.h>
59#include <openssl/err.h> 61#include <openssl/err.h>
60#include <openssl/asn1t.h> 62#include <openssl/asn1t.h>
diff --git a/src/lib/libssl/src/crypto/ts/ts_conf.c b/src/lib/libssl/src/crypto/ts/ts_conf.c
index b71caa8df0..685fdc0736 100644
--- a/src/lib/libssl/src/crypto/ts/ts_conf.c
+++ b/src/lib/libssl/src/crypto/ts/ts_conf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_conf.c,v 1.5 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ts_conf.c,v 1.6 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
3 * project 2002. 3 * project 2002.
4 */ 4 */
@@ -58,6 +58,8 @@
58 58
59#include <string.h> 59#include <string.h>
60 60
61#include <openssl/opensslconf.h>
62
61#include <openssl/crypto.h> 63#include <openssl/crypto.h>
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/pem.h> 65#include <openssl/pem.h>
diff --git a/src/lib/libssl/src/crypto/ts/ts_err.c b/src/lib/libssl/src/crypto/ts/ts_err.c
index 0fbfddea2f..f71be883f8 100644
--- a/src/lib/libssl/src/crypto/ts/ts_err.c
+++ b/src/lib/libssl/src/crypto/ts/ts_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_err.c,v 1.3 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ts_err.c,v 1.4 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ts.h> 66#include <openssl/ts.h>
64 67
diff --git a/src/lib/libssl/src/crypto/txt_db/txt_db.h b/src/lib/libssl/src/crypto/txt_db/txt_db.h
index 4668cfb624..56b6b42482 100644
--- a/src/lib/libssl/src/crypto/txt_db/txt_db.h
+++ b/src/lib/libssl/src/crypto/txt_db/txt_db.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: txt_db.h,v 1.8 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: txt_db.h,v 1.9 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,7 @@
60#define HEADER_TXT_DB_H 60#define HEADER_TXT_DB_H
61 61
62#include <openssl/opensslconf.h> 62#include <openssl/opensslconf.h>
63
63#ifndef OPENSSL_NO_BIO 64#ifndef OPENSSL_NO_BIO
64#include <openssl/bio.h> 65#include <openssl/bio.h>
65#endif 66#endif
diff --git a/src/lib/libssl/src/crypto/ui/ui.h b/src/lib/libssl/src/crypto/ui/ui.h
index 5abd5c2d7f..b6b0075e4d 100644
--- a/src/lib/libssl/src/crypto/ui/ui.h
+++ b/src/lib/libssl/src/crypto/ui/ui.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ui.h,v 1.8 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ui.h,v 1.9 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -59,6 +59,8 @@
59#ifndef HEADER_UI_H 59#ifndef HEADER_UI_H
60#define HEADER_UI_H 60#define HEADER_UI_H
61 61
62#include <openssl/opensslconf.h>
63
62#ifndef OPENSSL_NO_DEPRECATED 64#ifndef OPENSSL_NO_DEPRECATED
63#include <openssl/crypto.h> 65#include <openssl/crypto.h>
64#endif 66#endif
diff --git a/src/lib/libssl/src/crypto/ui/ui_err.c b/src/lib/libssl/src/crypto/ui/ui_err.c
index 3c204171f3..576f334796 100644
--- a/src/lib/libssl/src/crypto/ui/ui_err.c
+++ b/src/lib/libssl/src/crypto/ui/ui_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ui_err.c,v 1.7 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ui_err.c,v 1.8 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/ui.h> 66#include <openssl/ui.h>
64 67
diff --git a/src/lib/libssl/src/crypto/whrlpool/whrlpool.h b/src/lib/libssl/src/crypto/whrlpool/whrlpool.h
index e0ff0f872d..875d34f7d3 100644
--- a/src/lib/libssl/src/crypto/whrlpool/whrlpool.h
+++ b/src/lib/libssl/src/crypto/whrlpool/whrlpool.h
@@ -1,10 +1,10 @@
1/* $OpenBSD: whrlpool.h,v 1.4 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: whrlpool.h,v 1.5 2014/07/10 22:45:58 jsing Exp $ */
2
3#include <stddef.h>
2 4
3#ifndef HEADER_WHRLPOOL_H 5#ifndef HEADER_WHRLPOOL_H
4#define HEADER_WHRLPOOL_H 6#define HEADER_WHRLPOOL_H
5 7
6#include <stddef.h>
7
8#include <openssl/opensslconf.h> 8#include <openssl/opensslconf.h>
9 9
10#ifdef __cplusplus 10#ifdef __cplusplus
diff --git a/src/lib/libssl/src/crypto/x509/by_dir.c b/src/lib/libssl/src/crypto/x509/by_dir.c
index 2a5fb04373..110c22d6f5 100644
--- a/src/lib/libssl/src/crypto/x509/by_dir.c
+++ b/src/lib/libssl/src/crypto/x509/by_dir.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: by_dir.c,v 1.30 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: by_dir.c,v 1.31 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,15 +56,18 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <sys/types.h>
60
59#include <errno.h> 61#include <errno.h>
60#include <stdio.h> 62#include <stdio.h>
61#include <string.h> 63#include <string.h>
62#include <time.h> 64#include <time.h>
63#include <unistd.h> 65#include <unistd.h>
64 66
67#include <openssl/opensslconf.h>
68
65#include "cryptlib.h" 69#include "cryptlib.h"
66 70
67#include <sys/types.h>
68#ifndef OPENSSL_NO_POSIX_IO 71#ifndef OPENSSL_NO_POSIX_IO
69# include <sys/stat.h> 72# include <sys/stat.h>
70#endif 73#endif
@@ -72,7 +75,6 @@
72#include <openssl/lhash.h> 75#include <openssl/lhash.h>
73#include <openssl/x509.h> 76#include <openssl/x509.h>
74 77
75
76typedef struct lookup_dir_hashes_st { 78typedef struct lookup_dir_hashes_st {
77 unsigned long hash; 79 unsigned long hash;
78 int suffix; 80 int suffix;
diff --git a/src/lib/libssl/src/crypto/x509/x509_cmp.c b/src/lib/libssl/src/crypto/x509/x509_cmp.c
index aa85286d8b..20b4ceba27 100644
--- a/src/lib/libssl/src/crypto/x509/x509_cmp.c
+++ b/src/lib/libssl/src/crypto/x509/x509_cmp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_cmp.c,v 1.20 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: x509_cmp.c,v 1.21 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -60,6 +60,8 @@
60#include <stdio.h> 60#include <stdio.h>
61#include <string.h> 61#include <string.h>
62 62
63#include <openssl/opensslconf.h>
64
63#include "cryptlib.h" 65#include "cryptlib.h"
64#include <openssl/asn1.h> 66#include <openssl/asn1.h>
65#include <openssl/objects.h> 67#include <openssl/objects.h>
diff --git a/src/lib/libssl/src/crypto/x509/x509_err.c b/src/lib/libssl/src/crypto/x509/x509_err.c
index 93b8fa7698..6a15ac9fd0 100644
--- a/src/lib/libssl/src/crypto/x509/x509_err.c
+++ b/src/lib/libssl/src/crypto/x509/x509_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_err.c,v 1.11 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x509_err.c,v 1.12 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/x509.h> 66#include <openssl/x509.h>
64 67
diff --git a/src/lib/libssl/src/crypto/x509/x509_req.c b/src/lib/libssl/src/crypto/x509/x509_req.c
index b041a154e4..d22fc12a70 100644
--- a/src/lib/libssl/src/crypto/x509/x509_req.c
+++ b/src/lib/libssl/src/crypto/x509/x509_req.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_req.c,v 1.13 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x509_req.c,v 1.14 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include "cryptlib.h" 63#include "cryptlib.h"
61#include <openssl/bn.h> 64#include <openssl/bn.h>
62#include <openssl/evp.h> 65#include <openssl/evp.h>
diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.c b/src/lib/libssl/src/crypto/x509/x509_vfy.c
index 5150ffa5d2..60067d220f 100644
--- a/src/lib/libssl/src/crypto/x509/x509_vfy.c
+++ b/src/lib/libssl/src/crypto/x509/x509_vfy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_vfy.c,v 1.31 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: x509_vfy.c,v 1.32 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -62,6 +62,8 @@
62#include <time.h> 62#include <time.h>
63#include <unistd.h> 63#include <unistd.h>
64 64
65#include <openssl/opensslconf.h>
66
65#include "cryptlib.h" 67#include "cryptlib.h"
66#include <openssl/crypto.h> 68#include <openssl/crypto.h>
67#include <openssl/lhash.h> 69#include <openssl/lhash.h>
diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.h b/src/lib/libssl/src/crypto/x509/x509_vfy.h
index dfc0f700dc..5b411ca678 100644
--- a/src/lib/libssl/src/crypto/x509/x509_vfy.h
+++ b/src/lib/libssl/src/crypto/x509/x509_vfy.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_vfy.h,v 1.12 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x509_vfy.h,v 1.13 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -66,6 +66,7 @@
66#define HEADER_X509_VFY_H 66#define HEADER_X509_VFY_H
67 67
68#include <openssl/opensslconf.h> 68#include <openssl/opensslconf.h>
69
69#ifndef OPENSSL_NO_LHASH 70#ifndef OPENSSL_NO_LHASH
70#include <openssl/lhash.h> 71#include <openssl/lhash.h>
71#endif 72#endif
diff --git a/src/lib/libssl/src/crypto/x509/x_all.c b/src/lib/libssl/src/crypto/x509/x_all.c
index 4461c7dda9..f01e47416d 100644
--- a/src/lib/libssl/src/crypto/x509/x_all.c
+++ b/src/lib/libssl/src/crypto/x509/x_all.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_all.c,v 1.16 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x_all.c,v 1.17 2014/07/10 22:45:58 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,6 +57,9 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
60#include <openssl/stack.h> 63#include <openssl/stack.h>
61#include "cryptlib.h" 64#include "cryptlib.h"
62#include <openssl/buffer.h> 65#include <openssl/buffer.h>
diff --git a/src/lib/libssl/src/crypto/x509v3/ext_dat.h b/src/lib/libssl/src/crypto/x509v3/ext_dat.h
index 36d535d42d..1111af2108 100644
--- a/src/lib/libssl/src/crypto/x509v3/ext_dat.h
+++ b/src/lib/libssl/src/crypto/x509v3/ext_dat.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ext_dat.h,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ext_dat.h,v 1.11 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -55,6 +55,9 @@
55 * Hudson (tjh@cryptsoft.com). 55 * Hudson (tjh@cryptsoft.com).
56 * 56 *
57 */ 57 */
58
59#include <openssl/opensslconf.h>
60
58/* This file contains a table of "standard" extensions */ 61/* This file contains a table of "standard" extensions */
59 62
60extern X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku; 63extern X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku;
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_addr.c b/src/lib/libssl/src/crypto/x509v3/v3_addr.c
index 3fb43603c0..9099994dc4 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_addr.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_addr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_addr.c,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: v3_addr.c,v 1.11 2014/07/10 22:45:58 jsing Exp $ */
2/* 2/*
3 * Contributed to the OpenSSL Project by the American Registry for 3 * Contributed to the OpenSSL Project by the American Registry for
4 * Internet Numbers ("ARIN"). 4 * Internet Numbers ("ARIN").
@@ -63,6 +63,8 @@
63#include <stdio.h> 63#include <stdio.h>
64#include <stdlib.h> 64#include <stdlib.h>
65 65
66#include <openssl/opensslconf.h>
67
66#include "cryptlib.h" 68#include "cryptlib.h"
67#include <openssl/conf.h> 69#include <openssl/conf.h>
68#include <openssl/asn1.h> 70#include <openssl/asn1.h>
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_asid.c b/src/lib/libssl/src/crypto/x509v3/v3_asid.c
index b3245c9fe1..473304c1e5 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_asid.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_asid.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_asid.c,v 1.8 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: v3_asid.c,v 1.9 2014/07/10 22:45:58 jsing Exp $ */
2/* 2/*
3 * Contributed to the OpenSSL Project by the American Registry for 3 * Contributed to the OpenSSL Project by the American Registry for
4 * Internet Numbers ("ARIN"). 4 * Internet Numbers ("ARIN").
@@ -62,6 +62,9 @@
62 62
63#include <stdio.h> 63#include <stdio.h>
64#include <string.h> 64#include <string.h>
65
66#include <openssl/opensslconf.h>
67
65#include "cryptlib.h" 68#include "cryptlib.h"
66#include <openssl/conf.h> 69#include <openssl/conf.h>
67#include <openssl/asn1.h> 70#include <openssl/asn1.h>
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c b/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c
index ca3fc51c77..0406c83be3 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_ocsp.c,v 1.8 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: v3_ocsp.c,v 1.9 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#ifndef OPENSSL_NO_OCSP 64#ifndef OPENSSL_NO_OCSP
63 65
64#include "cryptlib.h" 66#include "cryptlib.h"
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_purp.c b/src/lib/libssl/src/crypto/x509v3/v3_purp.c
index 02538335ae..0d4b9aae64 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_purp.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_purp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_purp.c,v 1.19 2014/07/10 13:58:23 jsing Exp $ */ 1/* $OpenBSD: v3_purp.c,v 1.20 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/opensslconf.h>
63
62#include "cryptlib.h" 64#include "cryptlib.h"
63#include <openssl/x509v3.h> 65#include <openssl/x509v3.h>
64#include <openssl/x509_vfy.h> 66#include <openssl/x509_vfy.h>
diff --git a/src/lib/libssl/src/crypto/x509v3/v3err.c b/src/lib/libssl/src/crypto/x509v3/v3err.c
index eaa7cdf8d5..a49632a069 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3err.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3err.c,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: v3err.c,v 1.11 2014/07/10 22:45:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -59,6 +59,9 @@
59 */ 59 */
60 60
61#include <stdio.h> 61#include <stdio.h>
62
63#include <openssl/opensslconf.h>
64
62#include <openssl/err.h> 65#include <openssl/err.h>
63#include <openssl/x509v3.h> 66#include <openssl/x509v3.h>
64 67
diff --git a/src/lib/libssl/src/crypto/x509v3/x509v3.h b/src/lib/libssl/src/crypto/x509v3/x509v3.h
index 73ef3ecc57..a88223cd9b 100644
--- a/src/lib/libssl/src/crypto/x509v3/x509v3.h
+++ b/src/lib/libssl/src/crypto/x509v3/x509v3.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509v3.h,v 1.14 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: x509v3.h,v 1.15 2014/07/10 22:45:58 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -58,6 +58,8 @@
58#ifndef HEADER_X509V3_H 58#ifndef HEADER_X509V3_H
59#define HEADER_X509V3_H 59#define HEADER_X509V3_H
60 60
61#include <openssl/opensslconf.h>
62
61#include <openssl/bio.h> 63#include <openssl/bio.h>
62#include <openssl/x509.h> 64#include <openssl/x509.h>
63#include <openssl/conf.h> 65#include <openssl/conf.h>