1# $FreeBSD$ 2 3SHLIBDIR?= /lib 4SUBDIR= engines 5 6.include <bsd.own.mk> 7.include <src.opts.mk> 8 9PACKAGE= openssl 10LIB= crypto 11SHLIB_MAJOR= 111 12VERSION_MAP= ${.CURDIR}/Version.map 13 14NO_LINT= 15PCFILES= libcrypto.pc 16 17.include "Makefile.man" 18.include "Makefile.inc" 19 20SRCS= cpt_err.c cryptlib.c ctype.c cversion.c ex_data.c getenv.c init.c 21SRCS+= mem.c mem_dbg.c mem_sec.c o_dir.c o_fips.c o_fopen.c o_init.c 22SRCS+= o_str.c o_time.c threads_pthread.c uid.c 23.if defined(ASM_aarch64) 24SRCS+= arm64cpuid.S armcap.c 25ACFLAGS.arm64cpuid.S= -march=armv8-a+crypto 26.elif defined(ASM_amd64) 27SRCS+= x86_64cpuid.S 28.elif defined(ASM_arm) 29SRCS+= armv4cpuid.S armcap.c 30.elif defined(ASM_i386) 31SRCS+= x86cpuid.S 32.elif defined(ASM_powerpc) 33SRCS+= ppccpuid.S ppccap.c 34.elif defined(ASM_powerpc64) 35SRCS+= ppccpuid.S ppccap.c 36.elif defined(ASM_powerpc64le) 37SRCS+= ppccpuid.S ppccap.c 38.else 39SRCS+= mem_clr.c 40.endif 41 42# aes 43SRCS+= aes_cbc.c aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c 44.if defined(ASM_aarch64) 45SRCS+= aes_core.c aesv8-armx.S vpaes-armv8.S 46ACFLAGS.aesv8-armx.S= -march=armv8-a+crypto 47.elif defined(ASM_amd64) 48SRCS+= aes_core.c aesni-mb-x86_64.S aesni-sha1-x86_64.S aesni-sha256-x86_64.S 49SRCS+= aesni-x86_64.S vpaes-x86_64.S 50.elif defined(ASM_arm) 51SRCS+= aes-armv4.S aesv8-armx.S bsaes-armv7.S 52.elif defined(ASM_i386) 53SRCS+= aes_core.c aesni-x86.S vpaes-x86.S 54.elif defined(ASM_powerpc) 55SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S 56.elif defined(ASM_powerpc64) 57SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S 58.elif defined(ASM_powerpc64le) 59SRCS+= aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S 60.else 61SRCS+= aes_core.c 62.endif 63 64# aria 65SRCS+= aria.c 66 67# asn1 68SRCS+= a_bitstr.c a_d2i_fp.c a_digest.c a_dup.c a_gentm.c a_i2d_fp.c 69SRCS+= a_int.c a_mbstr.c a_object.c a_octet.c a_print.c a_sign.c a_strex.c 70SRCS+= a_strnid.c a_time.c a_type.c a_utctm.c a_utf8.c a_verify.c 71SRCS+= ameth_lib.c asn1_err.c asn1_gen.c asn1_item_list.c asn1_lib.c 72SRCS+= asn1_par.c asn_mime.c asn_moid.c asn_mstbl.c asn_pack.c bio_asn1.c 73SRCS+= bio_ndef.c d2i_pr.c d2i_pu.c evp_asn1.c f_int.c f_string.c i2d_pr.c 74SRCS+= i2d_pu.c n_pkey.c nsseq.c p5_pbe.c p5_pbev2.c p5_scrypt.c p8_pkey.c 75SRCS+= t_bitst.c t_pkey.c t_spki.c tasn_dec.c tasn_enc.c tasn_fre.c 76SRCS+= tasn_new.c tasn_prn.c tasn_scn.c tasn_typ.c tasn_utl.c x_algor.c 77SRCS+= x_bignum.c x_info.c x_int64.c x_long.c x_pkey.c x_sig.c x_spki.c 78SRCS+= x_val.c 79 80# async 81SRCS+= async.c async_err.c async_posix.c async_wait.c 82 83# bf 84SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c 85.if defined(ASM_i386) 86SRCS+= bf-586.S 87.else 88SRCS+= bf_enc.c 89.endif 90 91# bio 92SRCS+= b_addr.c b_dump.c b_print.c b_sock.c b_sock2.c bf_buff.c bf_lbuf.c 93SRCS+= bf_nbio.c bf_null.c bio_cb.c bio_err.c bio_lib.c bio_meth.c 94SRCS+= bss_acpt.c bss_bio.c bss_conn.c bss_dgram.c bss_fd.c bss_file.c 95SRCS+= bss_log.c bss_mem.c bss_null.c bss_sock.c 96 97# blake2 98SRCS+= blake2b.c blake2s.c m_blake2b.c m_blake2s.c 99 100# bn 101SRCS+= bn_add.c bn_blind.c bn_const.c bn_ctx.c bn_depr.c bn_dh.c bn_div.c 102SRCS+= bn_err.c bn_exp.c bn_exp2.c bn_gcd.c bn_gf2m.c bn_intern.c bn_kron.c 103SRCS+= bn_lib.c bn_mod.c bn_mont.c bn_mpi.c bn_mul.c bn_nist.c bn_prime.c 104SRCS+= bn_print.c bn_rand.c bn_recp.c bn_shift.c bn_sqr.c bn_sqrt.c 105SRCS+= bn_srp.c bn_word.c bn_x931p.c 106.if defined(ASM_aarch64) 107SRCS+= armv8-mont.S bn_asm.c 108.elif defined(ASM_amd64) 109SRCS+= rsaz-avx2.S rsaz-x86_64.S rsaz_exp.c x86_64-gcc.c x86_64-gf2m.S 110SRCS+= x86_64-mont.S x86_64-mont5.S 111.elif defined(ASM_arm) 112SRCS+= armv4-gf2m.S armv4-mont.S bn_asm.c 113.elif defined(ASM_i386) 114SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S 115.elif defined(ASM_powerpc) 116SRCS+= ppc.S ppc-mont.S 117.elif defined(ASM_powerpc64) 118SRCS+= ppc.S ppc-mont.S 119.elif defined(ASM_powerpc64le) 120SRCS+= ppc.S ppc-mont.S 121.else 122SRCS+= bn_asm.c 123.endif 124 125# Full of strict aliasing violations that LLVM has been seen to break with 126# optimisations, which can lead to ECDSA signatures not working. See 127# https://github.com/openssl/openssl/issues/12247 for the upstream bug report. 128CFLAGS.bn_nist.c+= -fno-strict-aliasing 129 130# buffer 131SRCS+= buf_err.c buffer.c 132 133# camellia 134SRCS+= cmll_cfb.c cmll_ctr.c cmll_ecb.c cmll_ofb.c 135.if defined(ASM_amd64) 136SRCS+= cmll-x86_64.S cmll_misc.c 137.elif defined(ASM_i386) 138SRCS+= cmll-x86.S 139.else 140SRCS+= camellia.c cmll_cbc.c cmll_misc.c 141.endif 142 143# cast 144SRCS+= c_cfb64.c c_ecb.c c_enc.c c_ofb64.c c_skey.c 145 146# chacha 147.if defined(ASM_aarch64) 148SRCS+= chacha-armv8.S 149.elif defined(ASM_amd64) 150SRCS+= chacha-x86_64.S 151.elif defined(ASM_arm) 152SRCS+= chacha-armv4.S 153.elif defined(ASM_i386) 154SRCS+= chacha-x86.S 155.elif defined(ASM_powerpc) 156SRCS+= chacha-ppc.S 157.elif defined(ASM_powerpc64) 158SRCS+= chacha-ppc.S 159.elif defined(ASM_powerpc64le) 160SRCS+= chacha-ppc.S 161.else 162SRCS+= chacha_enc.c 163.endif 164 165# cmac 166SRCS+= cm_ameth.c cm_pmeth.c cmac.c 167 168# cms 169SRCS+= cms_asn1.c cms_att.c cms_dd.c cms_enc.c cms_env.c cms_err.c 170SRCS+= cms_ess.c cms_io.c cms_kari.c cms_lib.c cms_pwri.c cms_sd.c 171SRCS+= cms_smime.c 172 173# comp 174SRCS+= c_zlib.c comp_err.c comp_lib.c 175 176# conf 177SRCS+= conf_api.c conf_def.c conf_err.c conf_lib.c conf_mall.c conf_mod.c 178SRCS+= conf_sap.c conf_ssl.c 179 180# ct 181SRCS+= ct_b64.c ct_err.c ct_log.c ct_oct.c ct_policy.c ct_prn.c ct_sct.c 182SRCS+= ct_sct_ctx.c ct_vfy.c ct_x509v3.c 183 184# des 185SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c 186SRCS+= ecb_enc.c fcrypt.c ofb64ede.c ofb64enc.c ofb_enc.c pcbc_enc.c 187SRCS+= qud_cksm.c rand_key.c set_key.c str2key.c xcbc_enc.c 188.if defined(ASM_i386) 189SRCS+= crypt586.S des-586.S 190.else 191SRCS+= des_enc.c fcrypt_b.c 192.endif 193 194# dh 195SRCS+= dh_ameth.c dh_asn1.c dh_check.c dh_depr.c dh_err.c dh_gen.c dh_kdf.c 196SRCS+= dh_key.c dh_lib.c dh_meth.c dh_pmeth.c dh_prn.c dh_rfc5114.c 197SRCS+= dh_rfc7919.c 198 199# dsa 200SRCS+= dsa_ameth.c dsa_asn1.c dsa_depr.c dsa_err.c dsa_gen.c dsa_key.c 201SRCS+= dsa_lib.c dsa_meth.c dsa_ossl.c dsa_pmeth.c dsa_prn.c dsa_sign.c 202SRCS+= dsa_vrf.c 203 204# dso 205SRCS+= dso_dlfcn.c dso_err.c dso_lib.c 206 207# ec 208SRCS+= curve25519.c curve448.c curve448_tables.c ec2_oct.c ec2_smpl.c 209SRCS+= ec_ameth.c ec_asn1.c ec_check.c ec_curve.c ec_cvt.c ec_err.c 210SRCS+= ec_key.c ec_kmeth.c ec_lib.c ec_mult.c ec_oct.c ec_pmeth.c 211SRCS+= ec_print.c ecdh_kdf.c ecdh_ossl.c ecdsa_ossl.c ecdsa_sign.c 212SRCS+= ecdsa_vrf.c eck_prn.c ecp_mont.c ecp_nist.c ecp_oct.c ecp_smpl.c 213SRCS+= ecx_meth.c eddsa.c f_generic.c f_impl.c scalar.c 214.if defined(ASM_aarch64) 215SRCS+= ecp_nistz256-armv8.S ecp_nistz256.c 216.elif defined(ASM_amd64) 217SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S 218.elif defined(ASM_arm) 219SRCS+= ecp_nistz256-armv4.S ecp_nistz256.c 220.elif defined(ASM_i386) 221SRCS+= ecp_nistz256-x86.S ecp_nistz256.c 222.elif defined(ASM_powerpc64) 223SRCS+= ecp_nistz256-ppc64.S ecp_nistz256.c x25519-ppc64.S 224.elif defined(ASM_powerpc64le) 225SRCS+= ecp_nistz256-ppc64.S ecp_nistz256.c x25519-ppc64.S 226.endif 227 228# engine 229SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_devcrypto.c eng_dyn.c eng_err.c 230SRCS+= eng_fat.c eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c 231SRCS+= eng_rdrand.c eng_table.c tb_asnmth.c tb_cipher.c tb_dh.c tb_digest.c 232SRCS+= tb_dsa.c tb_eckey.c tb_pkmeth.c tb_rand.c tb_rsa.c 233 234# err 235SRCS+= err.c err_all.c err_prn.c 236 237# evp 238SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_allc.c c_alld.c cmeth_lib.c 239SRCS+= digest.c e_aes.c e_aes_cbc_hmac_sha1.c e_aes_cbc_hmac_sha256.c 240SRCS+= e_aria.c e_bf.c e_camellia.c e_cast.c e_chacha20_poly1305.c e_des.c 241SRCS+= e_des3.c e_idea.c e_null.c e_old.c e_rc2.c e_rc4.c e_rc4_hmac_md5.c 242SRCS+= e_rc5.c e_seed.c e_sm4.c e_xcbc_d.c encode.c evp_cnf.c evp_enc.c 243SRCS+= evp_err.c evp_key.c evp_lib.c evp_pbe.c evp_pkey.c m_md4.c m_md5.c 244SRCS+= m_md5_sha1.c m_mdc2.c m_null.c m_ripemd.c m_sha1.c m_sha3.c 245SRCS+= m_sigver.c m_wp.c names.c p5_crpt.c p5_crpt2.c p_dec.c p_enc.c 246SRCS+= p_lib.c p_open.c p_seal.c p_sign.c p_verify.c pbe_scrypt.c 247SRCS+= pmeth_fn.c pmeth_gn.c pmeth_lib.c 248 249# hmac 250SRCS+= hm_ameth.c hm_pmeth.c hmac.c 251 252# idea 253SRCS+= i_cbc.c i_cfb64.c i_ecb.c i_ofb64.c i_skey.c 254 255# kdf 256SRCS+= hkdf.c kdf_err.c scrypt.c tls1_prf.c 257 258# lhash 259SRCS+= lh_stats.c lhash.c 260 261# md4 262SRCS+= md4_dgst.c md4_one.c 263 264# md5 265SRCS+= md5_dgst.c md5_one.c 266.if defined(ASM_amd64) 267SRCS+= md5-x86_64.S 268.elif defined(ASM_i386) 269SRCS+= md5-586.S 270.endif 271 272# mdc2 273SRCS+= mdc2_one.c mdc2dgst.c 274 275# modes 276SRCS+= cbc128.c ccm128.c cfb128.c ctr128.c cts128.c gcm128.c ocb128.c 277SRCS+= ofb128.c wrap128.c xts128.c 278.if defined(ASM_aarch64) 279SRCS+= ghashv8-armx.S 280ACFLAGS.ghashv8-armx.S= -march=armv8-a+crypto 281.elif defined(ASM_amd64) 282SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S 283.elif defined(ASM_arm) 284SRCS+= ghash-armv4.S ghashv8-armx.S 285.elif defined(ASM_i386) 286SRCS+= ghash-x86.S 287.elif defined(ASM_powerpc) 288SRCS+= ghashp8-ppc.S 289.elif defined(ASM_powerpc64) 290SRCS+= ghashp8-ppc.S 291.elif defined(ASM_powerpc64le) 292SRCS+= ghashp8-ppc.S 293.endif 294 295# objects 296SRCS+= o_names.c obj_dat.c obj_err.c obj_lib.c obj_xref.c 297 298# ocsp 299SRCS+= ocsp_asn.c ocsp_cl.c ocsp_err.c ocsp_ext.c ocsp_ht.c ocsp_lib.c 300SRCS+= ocsp_prn.c ocsp_srv.c ocsp_vfy.c v3_ocsp.c 301 302# pem 303SRCS+= pem_all.c pem_err.c pem_info.c pem_lib.c pem_oth.c pem_pk8.c 304SRCS+= pem_pkey.c pem_sign.c pem_x509.c pem_xaux.c pvkfmt.c 305 306# pkcs12 307SRCS+= p12_add.c p12_asn.c p12_attr.c p12_crpt.c p12_crt.c p12_decr.c 308SRCS+= p12_init.c p12_key.c p12_kiss.c p12_mutl.c p12_npas.c p12_p8d.c 309SRCS+= p12_p8e.c p12_sbag.c p12_utl.c pk12err.c 310 311# pkcs7 312SRCS+= bio_pk7.c pk7_asn1.c pk7_attr.c pk7_doit.c pk7_lib.c pk7_mime.c 313SRCS+= pk7_smime.c pkcs7err.c 314 315# poly1305 316SRCS+= poly1305.c poly1305_ameth.c poly1305_pmeth.c 317.if defined(ASM_aarch64) 318SRCS+= poly1305-armv8.S 319.elif defined(ASM_amd64) 320SRCS+= poly1305-x86_64.S 321.elif defined(ASM_arm) 322SRCS+= poly1305-armv4.S 323.elif defined(ASM_i386) 324SRCS+= poly1305-x86.S 325.elif defined(ASM_powerpc) 326SRCS+= poly1305-ppc.S poly1305-ppcfp.S 327.elif defined(ASM_powerpc64) 328SRCS+= poly1305-ppc.S poly1305-ppcfp.S 329.elif defined(ASM_powerpc64le) 330SRCS+= poly1305-ppc.S poly1305-ppcfp.S 331.endif 332 333# rand 334SRCS+= drbg_ctr.c drbg_lib.c rand_err.c rand_lib.c rand_unix.c randfile.c 335 336# rc2 337SRCS+= rc2_cbc.c rc2_ecb.c rc2_skey.c rc2cfb64.c rc2ofb64.c 338 339# rc4 340.if defined(ASM_amd64) 341SRCS+= rc4-md5-x86_64.S rc4-x86_64.S 342.elif defined(ASM_i386) 343SRCS+= rc4-586.S 344.else 345SRCS+= rc4_enc.c rc4_skey.c 346.endif 347 348# rc5 349SRCS+= rc5_ecb.c rc5_skey.c rc5cfb64.c rc5ofb64.c 350.if defined(ASM_i386) 351SRCS+= rc5-586.S 352.else 353SRCS+= rc5_enc.c 354.endif 355 356# ripemd 357SRCS+= rmd_dgst.c rmd_one.c 358.if defined(ASM_i386) 359SRCS+= rmd-586.S 360.endif 361 362# rsa 363SRCS+= rsa_ameth.c rsa_asn1.c rsa_chk.c rsa_crpt.c rsa_depr.c rsa_err.c 364SRCS+= rsa_gen.c rsa_lib.c rsa_meth.c rsa_mp.c rsa_none.c rsa_oaep.c 365SRCS+= rsa_ossl.c rsa_pk1.c rsa_pmeth.c rsa_prn.c rsa_pss.c rsa_saos.c 366SRCS+= rsa_sign.c rsa_ssl.c rsa_x931.c rsa_x931g.c 367 368# seed 369SRCS+= seed.c seed_cbc.c seed_cfb.c seed_ecb.c seed_ofb.c 370 371# sha 372SRCS+= sha1_one.c sha1dgst.c sha256.c sha512.c 373.if defined(ASM_aarch64) 374SRCS+= keccak1600-armv8.S sha1-armv8.S sha256-armv8.S sha512-armv8.S 375.elif defined(ASM_amd64) 376SRCS+= keccak1600-x86_64.S sha1-mb-x86_64.S sha1-x86_64.S 377SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S 378.elif defined(ASM_arm) 379SRCS+= keccak1600-armv4.S sha1-armv4-large.S sha256-armv4.S sha512-armv4.S 380.elif defined(ASM_i386) 381SRCS+= keccak1600.c sha1-586.S sha256-586.S sha512-586.S 382.elif defined(ASM_powerpc) 383SRCS+= keccak1600.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S 384.elif defined(ASM_powerpc64) 385SRCS+= keccak1600-ppc64.S sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S 386.elif defined(ASM_powerpc64le) 387SRCS+= keccak1600-ppc64.S sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S 388.else 389SRCS+= keccak1600.c 390.endif 391 392# siphash 393SRCS+= siphash.c siphash_ameth.c siphash_pmeth.c 394 395# sm2 396SRCS+= sm2_crypt.c sm2_err.c sm2_pmeth.c sm2_sign.c 397 398# sm3 399SRCS+= m_sm3.c sm3.c 400 401# sm4 402SRCS+= sm4.c 403 404# srp 405SRCS+= srp_lib.c srp_vfy.c 406 407# stack 408SRCS+= stack.c 409 410# store 411SRCS+= loader_file.c store_err.c store_init.c store_lib.c store_register.c 412SRCS+= store_strings.c 413 414# ts 415SRCS+= ts_asn1.c ts_conf.c ts_err.c ts_lib.c ts_req_print.c ts_req_utils.c 416SRCS+= ts_rsp_print.c ts_rsp_sign.c ts_rsp_utils.c ts_rsp_verify.c 417SRCS+= ts_verify_ctx.c 418 419# txt_db 420SRCS+= txt_db.c 421 422# ui 423SRCS+= ui_err.c ui_lib.c ui_null.c ui_openssl.c ui_util.c 424 425# whrlpool 426SRCS+= wp_dgst.c 427.if defined(ASM_amd64) 428SRCS+= wp-x86_64.S 429.elif defined(ASM_i386) 430SRCS+= wp-mmx.S wp_block.c 431.else 432SRCS+= wp_block.c 433.endif 434 435# x509 436SRCS+= by_dir.c by_file.c t_crl.c t_req.c t_x509.c x509_att.c x509_cmp.c 437SRCS+= x509_d2.c x509_def.c x509_err.c x509_ext.c x509_lu.c x509_meth.c 438SRCS+= x509_obj.c x509_r2x.c x509_req.c x509_set.c x509_trs.c x509_txt.c 439SRCS+= x509_v3.c x509_vfy.c x509_vpm.c x509cset.c x509name.c x509rset.c 440SRCS+= x509spki.c x509type.c x_all.c x_attrib.c x_crl.c x_exten.c x_name.c 441SRCS+= x_pubkey.c x_req.c x_x509.c x_x509a.c 442 443# x509v3 444SRCS+= pcy_cache.c pcy_data.c pcy_lib.c pcy_map.c pcy_node.c pcy_tree.c 445SRCS+= v3_addr.c v3_admis.c v3_akey.c v3_akeya.c v3_alt.c v3_asid.c 446SRCS+= v3_bcons.c v3_bitst.c v3_conf.c v3_cpols.c v3_crld.c v3_enum.c 447SRCS+= v3_extku.c v3_genn.c v3_ia5.c v3_info.c v3_int.c v3_lib.c v3_ncons.c 448SRCS+= v3_pci.c v3_pcia.c v3_pcons.c v3_pku.c v3_pmaps.c v3_prn.c v3_purp.c 449SRCS+= v3_skey.c v3_sxnet.c v3_tlsf.c v3_utl.c v3err.c 450 451INCS= aes.h asn1.h asn1_mac.h asn1err.h asn1t.h async.h asyncerr.h bio.h 452INCS+= bioerr.h blowfish.h bn.h bnerr.h buffer.h buffererr.h camellia.h 453INCS+= cast.h cmac.h cms.h cmserr.h comp.h comperr.h conf.h conf_api.h 454INCS+= conferr.h crypto.h cryptoerr.h ct.h cterr.h des.h dh.h dherr.h dsa.h 455INCS+= dsaerr.h dtls1.h e_os2.h ebcdic.h ec.h ecdh.h ecdsa.h ecerr.h 456INCS+= engine.h engineerr.h err.h evp.h evperr.h hmac.h idea.h kdf.h 457INCS+= kdferr.h lhash.h md2.h md4.h md5.h mdc2.h modes.h obj_mac.h 458INCS+= objects.h objectserr.h ocsp.h ocsperr.h opensslconf.h opensslv.h 459INCS+= ossl_typ.h pem.h pem2.h pemerr.h pkcs12.h pkcs12err.h pkcs7.h 460INCS+= pkcs7err.h rand.h rand_drbg.h randerr.h rc2.h rc4.h rc5.h ripemd.h 461INCS+= rsa.h rsaerr.h safestack.h seed.h sha.h srp.h srtp.h ssl.h ssl2.h 462INCS+= ssl3.h sslerr.h stack.h store.h storeerr.h symhacks.h tls1.h ts.h 463INCS+= tserr.h txt_db.h ui.h uierr.h whrlpool.h x509.h x509_vfy.h x509err.h 464INCS+= x509v3.h x509v3err.h 465 466INCSDIR= ${INCLUDEDIR}/openssl 467 468LIBADD= pthread 469 470CFLAGS+= -I${LCRYPTO_SRC}/crypto 471CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448 472CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 473CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes 474CFLAGS+= -I${.OBJDIR} 475 476.if !empty(SRCS:M*.S) 477ACFLAGS+= -Wa,--noexecstack 478.endif 479 480SRCS+= buildinf.h 481 482CLEANDIRS= openssl 483CLEANFILES= buildinf.h opensslconf.h opensslconf.h.tmp 484 485.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) 486_cmd1=/%%NO_ASM%%/d 487.else 488_cmd1=s/%%NO_ASM%%// 489.endif 490.if ${MK_OPENSSL_KTLS} != "no" 491_cmd2=/%%NO_KTLS%%/d 492.else 493_cmd2=s/%%NO_KTLS%%// 494.endif 495 496buildinf.h: Makefile 497 ( echo "/*"; \ 498 echo " * WARNING: do not edit!"; \ 499 echo " * Generated by ${.ALLSRC}"; \ 500 echo " */"; \ 501 echo "#define PLATFORM \"platform: FreeBSD-${MACHINE_ARCH}\""; \ 502 echo "#define DATE \"built on: reproducible build, date unspecified\""; \ 503 echo "static const char compiler_flags[] = \"compiler: ${COMPILER_TYPE}\";" ) \ 504 > ${.TARGET} 505 506beforedepend: openssl_opensslconf.h 507beforebuild: openssl_opensslconf.h 508 509openssl_opensslconf.h: opensslconf.h 510 mkdir -p openssl 511 ln -fs ${.OBJDIR}/${.ALLSRC} openssl/${.ALLSRC} 512 513opensslconf.h: opensslconf.h.in 514 sed '${_cmd1}; ${_cmd2}' ${.ALLSRC} > ${.TARGET}.tmp 515 mv -f ${.TARGET}.tmp ${.TARGET} 516 517.include <bsd.lib.mk> 518 519PICFLAG+= -DOPENSSL_PIC 520 521.if defined(ASM_${MACHINE_CPUARCH}) 522.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_CPUARCH} 523.if defined(ASM_amd64) 524.PATH: ${LCRYPTO_SRC}/crypto/bn/asm 525.endif 526.elif defined(ASM_${MACHINE_ARCH}) 527.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_ARCH} 528.endif 529 530.PATH: ${LCRYPTO_SRC}/crypto \ 531 ${LCRYPTO_SRC}/crypto/aes \ 532 ${LCRYPTO_SRC}/crypto/aria \ 533 ${LCRYPTO_SRC}/crypto/asn1 \ 534 ${LCRYPTO_SRC}/crypto/async \ 535 ${LCRYPTO_SRC}/crypto/async/arch \ 536 ${LCRYPTO_SRC}/crypto/bf \ 537 ${LCRYPTO_SRC}/crypto/bio \ 538 ${LCRYPTO_SRC}/crypto/blake2 \ 539 ${LCRYPTO_SRC}/crypto/bn \ 540 ${LCRYPTO_SRC}/crypto/buffer \ 541 ${LCRYPTO_SRC}/crypto/camellia \ 542 ${LCRYPTO_SRC}/crypto/cast \ 543 ${LCRYPTO_SRC}/crypto/chacha \ 544 ${LCRYPTO_SRC}/crypto/cmac \ 545 ${LCRYPTO_SRC}/crypto/cms \ 546 ${LCRYPTO_SRC}/crypto/comp \ 547 ${LCRYPTO_SRC}/crypto/conf \ 548 ${LCRYPTO_SRC}/crypto/ct \ 549 ${LCRYPTO_SRC}/crypto/des \ 550 ${LCRYPTO_SRC}/crypto/dh \ 551 ${LCRYPTO_SRC}/crypto/dsa \ 552 ${LCRYPTO_SRC}/crypto/dso \ 553 ${LCRYPTO_SRC}/crypto/ec \ 554 ${LCRYPTO_SRC}/crypto/ec/curve448 \ 555 ${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 \ 556 ${LCRYPTO_SRC}/crypto/engine \ 557 ${LCRYPTO_SRC}/crypto/err \ 558 ${LCRYPTO_SRC}/crypto/evp \ 559 ${LCRYPTO_SRC}/crypto/hmac \ 560 ${LCRYPTO_SRC}/crypto/idea \ 561 ${LCRYPTO_SRC}/crypto/kdf \ 562 ${LCRYPTO_SRC}/crypto/lhash \ 563 ${LCRYPTO_SRC}/crypto/md4 \ 564 ${LCRYPTO_SRC}/crypto/md5 \ 565 ${LCRYPTO_SRC}/crypto/mdc2 \ 566 ${LCRYPTO_SRC}/crypto/modes \ 567 ${LCRYPTO_SRC}/crypto/objects \ 568 ${LCRYPTO_SRC}/crypto/ocsp \ 569 ${LCRYPTO_SRC}/crypto/pem \ 570 ${LCRYPTO_SRC}/crypto/pkcs12 \ 571 ${LCRYPTO_SRC}/crypto/pkcs7 \ 572 ${LCRYPTO_SRC}/crypto/poly1305 \ 573 ${LCRYPTO_SRC}/crypto/rand \ 574 ${LCRYPTO_SRC}/crypto/rc2 \ 575 ${LCRYPTO_SRC}/crypto/rc4 \ 576 ${LCRYPTO_SRC}/crypto/rc5 \ 577 ${LCRYPTO_SRC}/crypto/ripemd \ 578 ${LCRYPTO_SRC}/crypto/rsa \ 579 ${LCRYPTO_SRC}/crypto/seed \ 580 ${LCRYPTO_SRC}/crypto/sha \ 581 ${LCRYPTO_SRC}/crypto/siphash \ 582 ${LCRYPTO_SRC}/crypto/sm2 \ 583 ${LCRYPTO_SRC}/crypto/sm3 \ 584 ${LCRYPTO_SRC}/crypto/sm4 \ 585 ${LCRYPTO_SRC}/crypto/srp \ 586 ${LCRYPTO_SRC}/crypto/stack \ 587 ${LCRYPTO_SRC}/crypto/store \ 588 ${LCRYPTO_SRC}/crypto/ts \ 589 ${LCRYPTO_SRC}/crypto/txt_db \ 590 ${LCRYPTO_SRC}/crypto/ui \ 591 ${LCRYPTO_SRC}/crypto/whrlpool \ 592 ${LCRYPTO_SRC}/crypto/x509 \ 593 ${LCRYPTO_SRC}/crypto/x509v3 \ 594 ${LCRYPTO_SRC}/include/openssl 595