1 2SHLIBDIR?= /lib 3.if !defined(LIBCRYPTO_WITHOUT_SUBDIRS) 4SUBDIR= engines modules 5.endif 6 7.include <bsd.own.mk> 8.include <src.opts.mk> 9 10PACKAGE= openssl-lib 11LIB= crypto 12SHLIB_MAJOR= 30 13VERSION_MAP= ${.CURDIR}/Version.map 14 15NO_LINT= 16PCFILES= libcrypto.pc 17 18.include "Makefile.man" 19.include "Makefile.inc" 20 21SRCS= asn1_dsa.c bsearch.c cpt_err.c context.c core_algorithm.c core_fetch.c core_namemap.c cpuid.c cryptlib.c ctype.c 22SRCS+= cversion.c der_writer.c ebcdic.c ex_data.c getenv.c info.c init.c initthread.c 23SRCS+= mem.c mem_sec.c o_dir.c o_fopen.c o_init.c o_str.c o_time.c packet.c 24SRCS+= param_build.c param_build_set.c params.c params_dup.c params_from_text.c 25SRCS+= passphrase.c provider.c provider_child.c provider_conf.c provider_core.c provider_predefined.c punycode.c self_test_core.c sparse_array.c threads_lib.c threads_none.c threads_pthread.c trace.c uid.c 26.if defined(ASM_aarch64) 27SRCS+= arm64cpuid.S armcap.c 28ACFLAGS.arm64cpuid.S= -march=armv8-a+crypto 29.elif defined(ASM_amd64) 30SRCS+= x86_64cpuid.S 31.elif defined(ASM_arm) 32SRCS+= armv4cpuid.S armcap.c 33.elif defined(ASM_i386) 34SRCS+= x86cpuid.S 35.elif defined(ASM_powerpc) 36SRCS+= ppccpuid.S ppccap.c 37.elif defined(ASM_powerpc64) 38SRCS+= ppccpuid.S ppccap.c 39.elif defined(ASM_powerpc64le) 40SRCS+= ppccpuid.S ppccap.c 41.else 42SRCS+= mem_clr.c 43.endif 44 45# aes 46SRCS+= aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c 47.if defined(ASM_aarch64) 48SRCS+= aes_cbc.c aes_core.c aesv8-armx.S vpaes-armv8.S 49ACFLAGS.aesv8-armx.S= -march=armv8-a+crypto 50.elif defined(ASM_amd64) 51SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S 52SRCS+= aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S 53.elif defined(ASM_arm) 54SRCS+= aes_cbc.c aes-armv4.S aesv8-armx.S bsaes-armv7.S 55.elif defined(ASM_i386) 56SRCS+= aes-586.S aesni-x86.S vpaes-x86.S 57.elif defined(ASM_powerpc) 58SRCS+= aes_cbc.c aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S 59.elif defined(ASM_powerpc64) 60SRCS+= aes_cbc.c aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S 61.elif defined(ASM_powerpc64le) 62SRCS+= aes_cbc.c aes_core.c aes-ppc.S vpaes-ppc.S aesp8-ppc.S 63.else 64SRCS+= aes_cbc.c aes_core.c 65.endif 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_parse.c asn_mime.c asn_moid.c asn_mstbl.c asn_pack.c bio_asn1.c 73SRCS+= bio_ndef.c d2i_param.c d2i_pr.c d2i_pu.c evp_asn1.c f_int.c f_string.c 74SRCS+= i2d_evp.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_prefix.c bf_readbuff.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+= bio_addr.c bio_dump.c bio_print.c bio_sock.c bio_sock2.c bf_buff.c 93SRCS+= bf_lbuf.c 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_core.c bss_dgram.c bss_fd.c 95SRCS+= bss_file.c bss_log.c bss_mem.c bss_null.c bss_sock.c ossl_core_bio.c 96 97# bn 98SRCS+= bn_add.c bn_blind.c bn_const.c bn_conv.c bn_ctx.c bn_depr.c bn_dh.c 99SRCS+= bn_div.c bn_err.c bn_exp.c bn_exp2.c bn_gcd.c bn_gf2m.c bn_intern.c 100SRCS+= bn_kron.c bn_lib.c bn_mod.c bn_mont.c bn_mpi.c bn_mul.c bn_nist.c 101SRCS+= bn_prime.c bn_print.c bn_rand.c bn_recp.c bn_rsa_fips186_4.c bn_shift.c 102SRCS+= bn_sqr.c bn_sqrt.c bn_srp.c bn_word.c bn_x931p.c 103.if defined(ASM_aarch64) 104SRCS+= armv8-mont.S bn_asm.c 105.elif defined(ASM_amd64) 106SRCS+= rsaz-avx2.S rsaz-avx512.S rsaz-x86_64.S rsaz_exp.c rsaz_exp_x2.c 107SRCS+= x86_64-gcc.c x86_64-gf2m.S x86_64-mont.S x86_64-mont5.S 108.elif defined(ASM_arm) 109SRCS+= armv4-gf2m.S armv4-mont.S bn_asm.c 110.elif defined(ASM_i386) 111SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S 112.elif defined(ASM_powerpc) 113SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S 114.elif defined(ASM_powerpc64) 115SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S 116.elif defined(ASM_powerpc64le) 117SRCS+= bn_ppc.c bn-ppc.S ppc-mont.S 118.else 119SRCS+= bn_asm.c 120.endif 121 122# Full of strict aliasing violations that LLVM has been seen to break with 123# optimisations, which can lead to ECDSA signatures not working. See 124# https://github.com/openssl/openssl/issues/12247 for the upstream bug report. 125CFLAGS.bn_nist.c+= -fno-strict-aliasing 126 127# buffer 128SRCS+= buf_err.c buffer.c 129 130# camellia 131SRCS+= cmll_cfb.c cmll_ctr.c cmll_ecb.c cmll_ofb.c 132.if defined(ASM_amd64) 133SRCS+= cmll-x86_64.S cmll_misc.c 134.elif defined(ASM_i386) 135SRCS+= cmll-x86.S 136.else 137SRCS+= camellia.c cmll_cbc.c cmll_misc.c 138.endif 139 140# cast 141SRCS+= c_cfb64.c c_ecb.c c_enc.c c_ofb64.c c_skey.c 142 143# chacha 144.if defined(ASM_aarch64) 145SRCS+= chacha-armv8.S 146.elif defined(ASM_amd64) 147SRCS+= chacha-x86_64.S 148.elif defined(ASM_arm) 149SRCS+= chacha-armv4.S 150.elif defined(ASM_i386) 151SRCS+= chacha-x86.S 152.elif defined(ASM_powerpc) 153SRCS+= chacha_ppc.c chacha-ppc.S 154.elif defined(ASM_powerpc64) 155SRCS+= chacha_ppc.c chacha-ppc.S 156.elif defined(ASM_powerpc64le) 157SRCS+= chacha_ppc.c chacha-ppc.S 158.else 159SRCS+= chacha_enc.c 160.endif 161 162# cmac 163SRCS+= cmac.c 164 165# cmp 166SRCS+= cmp_asn.c cmp_client.c cmp_ctx.c cmp_err.c cmp_hdr.c cmp_http.c 167SRCS+= cmp_msg.c cmp_protect.c cmp_server.c cmp_status.c cmp_util.c cmp_vfy.c 168 169# cms 170SRCS+= cms_asn1.c cms_att.c cms_cd.c cms_dd.c cms_dh.c cms_ec.c cms_enc.c 171SRCS+= cms_env.c cms_err.c cms_ess.c cms_io.c cms_kari.c cms_lib.c cms_pwri.c 172SRCS+= cms_rsa.c cms_sd.c cms_smime.c 173 174# comp 175SRCS+= c_zlib.c comp_err.c comp_lib.c 176 177# conf 178SRCS+= conf_api.c conf_def.c conf_err.c conf_lib.c conf_mall.c conf_mod.c 179SRCS+= conf_sap.c conf_ssl.c 180 181# crmf 182SRCS+= crmf_asn.c crmf_err.c crmf_lib.c crmf_pbm.c 183 184# ct 185SRCS+= ct_b64.c ct_err.c ct_log.c ct_oct.c ct_policy.c ct_prn.c ct_sct.c 186SRCS+= ct_sct_ctx.c ct_vfy.c ct_x509v3.c 187 188# des 189SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c 190SRCS+= ecb_enc.c fcrypt.c ofb64ede.c ofb64enc.c ofb_enc.c pcbc_enc.c 191SRCS+= qud_cksm.c rand_key.c set_key.c str2key.c xcbc_enc.c 192.if defined(ASM_i386) 193SRCS+= crypt586.S des-586.S 194.else 195SRCS+= des_enc.c fcrypt_b.c 196.endif 197 198# dh 199SRCS+= dh_ameth.c dh_asn1.c dh_backend.c dh_check.c dh_depr.c dh_err.c dh_gen.c 200SRCS+= dh_group_params.c dh_kdf.c dh_key.c dh_lib.c dh_meth.c dh_pmeth.c 201SRCS+= dh_prn.c dh_rfc5114.c 202 203# dsa 204SRCS+= dsa_ameth.c dsa_asn1.c dsa_backend.c dsa_check.c dsa_depr.c dsa_err.c 205SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_meth.c dsa_ossl.c dsa_pmeth.c 206SRCS+= dsa_prn.c dsa_sign.c dsa_vrf.c 207 208# dso 209SRCS+= dso_dlfcn.c dso_err.c dso_lib.c 210 211# ec 212SRCS+= curve25519.c curve448.c curve448_tables.c ec2_oct.c ec2_smpl.c 213SRCS+= ec_ameth.c ec_asn1.c ec_backend.c ec_check.c ec_curve.c ec_cvt.c 214SRCS+= ec_deprecated.c ec_err.c ec_key.c ec_kmeth.c ec_lib.c ec_mult.c ec_oct.c 215SRCS+= ec_pmeth.c ec_print.c ecdh_kdf.c ecdh_ossl.c ecdsa_ossl.c ecdsa_sign.c 216SRCS+= ecdsa_vrf.c eck_prn.c ecp_mont.c ecp_nist.c 217SRCS+= ecp_oct.c ecp_smpl.c ecx_backend.c ecx_key.c ecx_meth.c eddsa.c 218SRCS+= f_generic.c f_impl32.c f_impl64.c scalar.c 219# see OPENSSL_NO_EC_NISTP_64_GCC_128 in configuration.h 220.if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} 221SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c 222.endif 223.if defined(ASM_aarch64) 224SRCS+= ecp_nistz256-armv8.S ecp_nistz256.c 225.elif defined(ASM_amd64) 226SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S 227.elif defined(ASM_arm) 228SRCS+= ecp_nistz256-armv4.S ecp_nistz256.c 229.elif defined(ASM_i386) 230SRCS+= ecp_nistz256-x86.S ecp_nistz256.c 231.elif defined(ASM_powerpc64) 232SRCS+= ecp_nistp521-ppc64.S ecp_nistz256-ppc64.S ecp_nistz256.c ecp_ppc.c x25519-ppc64.S 233.elif defined(ASM_powerpc64le) 234SRCS+= ecp_nistp521-ppc64.S ecp_nistz256-ppc64.S ecp_nistz256.c ecp_ppc.c x25519-ppc64.S 235.endif 236 237# encode_decode 238SRCS+= decoder_err.c decoder_lib.c decoder_meth.c decoder_pkey.c 239SRCS+= encoder_err.c encoder_lib.c encoder_meth.c encoder_pkey.c 240 241# engine 242SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_dyn.c eng_err.c 243SRCS+= eng_fat.c eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c 244SRCS+= eng_rdrand.c eng_table.c tb_asnmth.c tb_cipher.c tb_dh.c tb_digest.c 245SRCS+= tb_dsa.c tb_eckey.c tb_pkmeth.c tb_rand.c tb_rsa.c 246 247# err 248SRCS+= err.c err_all.c err_all_legacy.c err_blocks.c err_prn.c 249 250# ess 251SRCS+= ess_asn1.c ess_err.c ess_lib.c 252 253# evp 254SRCS+= asymcipher.c bio_b64.c bio_enc.c bio_md.c bio_ok.c c_allc.c c_alld.c cmeth_lib.c 255SRCS+= ctrl_params_translate.c dh_ctrl.c dh_support.c digest.c dsa_ctrl.c e_aes.c e_aes_cbc_hmac_sha1.c 256SRCS+= e_aes_cbc_hmac_sha256.c e_aria.c e_bf.c e_camellia.c e_cast.c 257SRCS+= e_chacha20_poly1305.c e_des.c e_des3.c e_idea.c e_null.c e_old.c 258SRCS+= e_rc2.c e_rc4.c e_rc4_hmac_md5.c e_rc5.c e_seed.c e_sm4.c e_xcbc_d.c ec_ctrl.c ec_support.c 259SRCS+= encode.c evp_cnf.c evp_enc.c evp_err.c evp_fetch.c evp_key.c evp_lib.c evp_pbe.c 260SRCS+= evp_pkey.c evp_rand.c evp_utils.c exchange.c kdf_lib.c kdf_meth.c kem.c keymgmt_lib.c keymgmt_meth.c 261SRCS+= legacy_blake2.c legacy_md4.c legacy_md5.c legacy_md5_sha1.c m_null.c 262SRCS+= legacy_ripemd.c legacy_sha.c legacy_wp.c m_sigver.c mac_lib.c mac_meth.c names.c p5_crpt.c 263SRCS+= p5_crpt2.c p_dec.c p_enc.c p_legacy.c p_lib.c p_open.c p_seal.c p_sign.c 264SRCS+= p_verify.c pbe_scrypt.c pmeth_check.c pmeth_gn.c pmeth_lib.c signature.c 265 266# ffc 267SRCS+= ffc_backend.c ffc_dh.c ffc_key_generate.c ffc_key_validate.c 268SRCS+= ffc_params.c ffc_params_generate.c ffc_params_validate.c 269 270# hmac 271SRCS+= hmac.c 272 273# http 274SRCS+= http_client.c http_err.c http_lib.c 275 276# kdf 277SRCS+= kdf_err.c 278 279# lhash 280SRCS+= lh_stats.c lhash.c 281 282# md4 283SRCS+= md4_dgst.c md4_one.c 284 285# md5 286SRCS+= md5_dgst.c md5_one.c md5_sha1.c 287.if defined(ASM_amd64) 288SRCS+= md5-x86_64.S 289.elif defined(ASM_i386) 290SRCS+= md5-586.S 291.endif 292 293# modes 294SRCS+= cbc128.c ccm128.c cfb128.c ctr128.c cts128.c gcm128.c ocb128.c 295SRCS+= ofb128.c siv128.c wrap128.c xts128.c 296.if defined(ASM_aarch64) 297SRCS+= ghashv8-armx.S aes-gcm-armv8_64.S 298ACFLAGS.ghashv8-armx.S= -march=armv8-a+crypto 299.elif defined(ASM_amd64) 300SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S 301.elif defined(ASM_arm) 302SRCS+= ghash-armv4.S ghashv8-armx.S 303.elif defined(ASM_i386) 304SRCS+= ghash-x86.S 305.elif defined(ASM_powerpc) 306SRCS+= ghashp8-ppc.S 307.elif defined(ASM_powerpc64) 308SRCS+= ghashp8-ppc.S 309.elif defined(ASM_powerpc64le) 310SRCS+= ghashp8-ppc.S 311.endif 312 313# objects 314SRCS+= o_names.c obj_dat.c obj_err.c obj_lib.c obj_xref.c 315 316# ocsp 317SRCS+= ocsp_asn.c ocsp_cl.c ocsp_err.c ocsp_ext.c ocsp_http.c ocsp_lib.c 318SRCS+= ocsp_prn.c ocsp_srv.c ocsp_vfy.c v3_ocsp.c 319 320# pem 321SRCS+= pem_all.c pem_err.c pem_info.c pem_lib.c pem_oth.c pem_pk8.c 322SRCS+= pem_pkey.c pem_sign.c pem_x509.c pem_xaux.c pvkfmt.c 323 324# pkcs12 325SRCS+= p12_add.c p12_asn.c p12_attr.c p12_crpt.c p12_crt.c p12_decr.c 326SRCS+= p12_init.c p12_key.c p12_kiss.c p12_mutl.c p12_npas.c p12_p8d.c 327SRCS+= p12_p8e.c p12_sbag.c p12_utl.c pk12err.c 328 329# pkcs7 330SRCS+= bio_pk7.c pk7_asn1.c pk7_attr.c pk7_doit.c pk7_lib.c pk7_mime.c 331SRCS+= pk7_smime.c pkcs7err.c 332 333# poly1305 334SRCS+= poly1305.c 335.if defined(ASM_aarch64) 336SRCS+= poly1305-armv8.S 337.elif defined(ASM_amd64) 338SRCS+= poly1305-x86_64.S 339.elif defined(ASM_arm) 340SRCS+= poly1305-armv4.S 341.elif defined(ASM_i386) 342SRCS+= poly1305-x86.S 343.elif defined(ASM_powerpc) 344SRCS+= poly1305_ppc.c poly1305-ppc.S poly1305-ppcfp.S 345.elif defined(ASM_powerpc64) 346SRCS+= poly1305_ppc.c poly1305-ppc.S poly1305-ppcfp.S 347.elif defined(ASM_powerpc64le) 348SRCS+= poly1305_ppc.c poly1305-ppc.S poly1305-ppcfp.S 349.endif 350 351# property 352SRCS+= defn_cache.c property.c property_err.c property_parse.c property_query.c 353SRCS+= property_string.c 354 355# providers 356SRCS+= baseprov.c defltprov.c nullprov.c prov_running.c 357 358# providers/common 359SRCS+= bio_prov.c capabilities.c digest_to_nid.c provider_ctx.c provider_err.c 360SRCS+= provider_seeding.c provider_util.c securitycheck.c 361SRCS+= securitycheck_default.c 362 363# providers/common/der 364SRCS+= der_rsa_gen.c der_rsa_key.c der_rsa_sig.c 365SRCS+= der_digests_gen.c 366SRCS+= der_wrap_gen.c 367SRCS+= der_dsa_gen.c der_dsa_key.c der_dsa_sig.c 368SRCS+= der_ec_gen.c der_ec_key.c der_ec_sig.c 369SRCS+= der_ecx_gen.c der_ecx_key.c 370 371# providers/implementations/asymciphers 372SRCS+= rsa_enc.c 373 374# providers/implementations/ciphers 375SRCS+= ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \ 376 ciphercommon_gcm.c ciphercommon_gcm_hw.c \ 377 ciphercommon_ccm.c ciphercommon_ccm_hw.c 378SRCS+= cipher_aes.c cipher_aes_hw.c \ 379 cipher_aes_xts.c cipher_aes_xts_hw.c \ 380 cipher_aes_gcm.c cipher_aes_gcm_hw.c \ 381 cipher_aes_ccm.c cipher_aes_ccm_hw.c \ 382 cipher_aes_wrp.c \ 383 cipher_aes_cbc_hmac_sha.c \ 384 cipher_aes_cbc_hmac_sha256_hw.c cipher_aes_cbc_hmac_sha1_hw.c \ 385 cipher_cts.c 386SRCS+= cipher_aes_ocb.c cipher_aes_ocb_hw.c 387SRCS+= cipher_aes_xts_fips.c 388SRCS+= cipher_aes_siv.c cipher_aes_siv_hw.c 389SRCS+= cipher_blowfish.c cipher_blowfish_hw.c 390SRCS+= cipher_camellia.c cipher_camellia_hw.c 391SRCS+= cipher_cast5.c cipher_cast5_hw.c 392SRCS+= cipher_chacha20.c cipher_chacha20_hw.c 393SRCS+= cipher_chacha20_poly1305.c cipher_chacha20_poly1305_hw.c 394SRCS+= cipher_des.c cipher_des_hw.c 395SRCS+= cipher_desx.c cipher_desx_hw.c 396SRCS+= cipher_null.c 397SRCS+= cipher_rc4.c cipher_rc4_hw.c 398SRCS+= cipher_rc4_hmac_md5.c cipher_rc4_hmac_md5_hw.c 399SRCS+= cipher_seed.c cipher_seed_hw.c 400SRCS+= cipher_tdes.c cipher_tdes_common.c cipher_tdes_hw.c 401SRCS+= cipher_tdes_default.c cipher_tdes_default_hw.c \ 402 cipher_tdes_wrap.c cipher_tdes_wrap_hw.c 403 404# providers/implementations/digests 405SRCS+= digestcommon.c 406SRCS+= blake2_prov.c blake2b_prov.c blake2s_prov.c 407SRCS+= md4_prov.c 408SRCS+= md5_prov.c md5_sha1_prov.c 409SRCS+= null_prov.c 410SRCS+= ripemd_prov.c 411SRCS+= sha2_prov.c sha3_prov.c 412SRCS+= wp_prov.c 413 414# providers/implementations/encode_decode 415SRCS+= decode_der2key.c decode_epki2pki.c decode_msblob2key.c decode_pvk2key.c 416SRCS+= decode_pem2der.c decode_spki2typespki.c 417SRCS+= encode_key2any.c encode_key2blob.c encode_key2ms.c encode_key2text.c 418SRCS+= endecoder_common.c 419 420# providers/implementations/exchange 421SRCS+= dh_exch.c 422SRCS+= ecx_exch.c ecdh_exch.c 423SRCS+= kdf_exch.c 424 425# providers/implementations/kdfs 426SRCS+= hkdf.c kbkdf.c krb5kdf.c pbkdf1.c pbkdf2.c pbkdf2_fips.c 427SRCS+= pkcs12kdf.c scrypt.c sskdf.c sshkdf.c tls1_prf.c x942kdf.c 428 429# providers/implementations/kem 430SRCS+= rsa_kem.c 431 432# providers/implementations/keymgmt 433SRCS+= dh_kmgmt.c dsa_kmgmt.c ec_kmgmt.c ecx_kmgmt.c kdf_legacy_kmgmt.c 434SRCS+= mac_legacy_kmgmt.c rsa_kmgmt.c 435 436# providers/implementations/macs 437SRCS+= gmac_prov.c hmac_prov.c kmac_prov.c 438SRCS+= blake2b_mac.c blake2s_mac.c 439SRCS+= cmac_prov.c 440SRCS+= poly1305_prov.c 441SRCS+= siphash_prov.c 442 443# providers/implementations/rands 444SRCS+= crngt.c drbg.c drbg_ctr.c drbg_hash.c drbg_hmac.c test_rng.c 445SRCS+= seed_src.c 446 447# providers/implementations/rands/seeding 448SRCS+= rand_cpu_x86.c rand_tsc.c rand_unix.c rand_win.c 449 450# providers/implementations/signature 451SRCS+= dsa_sig.c eddsa_sig.c ecdsa_sig.c mac_legacy_sig.c rsa_sig.c 452 453# providers/implementations/storemgmt 454SRCS+= file_store.c file_store_any2obj.c 455 456# rand 457SRCS+= prov_seed.c rand_deprecated.c rand_egd.c rand_err.c rand_lib.c 458SRCS+= rand_meth.c rand_pool.c randfile.c 459 460# rc2 461SRCS+= rc2_cbc.c rc2_ecb.c rc2_skey.c rc2cfb64.c rc2ofb64.c 462 463# rc4 464.if defined(ASM_amd64) 465SRCS+= rc4-md5-x86_64.S rc4-x86_64.S 466.elif defined(ASM_i386) 467SRCS+= rc4-586.S 468.else 469SRCS+= rc4_enc.c rc4_skey.c 470.endif 471 472# ripemd 473SRCS+= rmd_dgst.c rmd_one.c 474.if defined(ASM_i386) 475SRCS+= rmd-586.S 476.endif 477 478# rsa 479SRCS+= rsa_ameth.c rsa_asn1.c rsa_backend.c rsa_chk.c rsa_crpt.c rsa_depr.c 480SRCS+= rsa_err.c rsa_gen.c rsa_lib.c rsa_meth.c rsa_mp.c rsa_mp_names.c 481SRCS+= rsa_none.c rsa_oaep.c rsa_ossl.c rsa_pk1.c rsa_pmeth.c rsa_prn.c 482SRCS+= rsa_pss.c rsa_saos.c rsa_schemes.c rsa_sign.c rsa_sp800_56b_check.c 483SRCS+= rsa_sp800_56b_gen.c rsa_x931.c rsa_x931g.c 484 485# seed 486SRCS+= seed.c seed_cbc.c seed_cfb.c seed_ecb.c seed_ofb.c 487 488# sha 489SRCS+= sha1_one.c sha1dgst.c sha256.c sha3.c sha512.c 490.if defined(ASM_aarch64) 491SRCS+= keccak1600-armv8.S sha1-armv8.S sha256-armv8.S sha512-armv8.S 492.elif defined(ASM_amd64) 493SRCS+= keccak1600-x86_64.S sha1-mb-x86_64.S sha1-x86_64.S 494SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S 495.elif defined(ASM_arm) 496SRCS+= keccak1600-armv4.S sha1-armv4-large.S sha256-armv4.S sha512-armv4.S 497.elif defined(ASM_i386) 498SRCS+= keccak1600.c sha1-586.S sha256-586.S sha512-586.S 499.elif defined(ASM_powerpc) 500SRCS+= keccak1600.c sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S 501.elif defined(ASM_powerpc64) 502SRCS+= keccak1600-ppc64.S sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S 503.elif defined(ASM_powerpc64le) 504SRCS+= keccak1600-ppc64.S sha_ppc.c sha1-ppc.S sha256-ppc.S sha512-ppc.S sha256p8-ppc.S sha512p8-ppc.S 505.else 506SRCS+= keccak1600.c 507.endif 508 509# siphash 510SRCS+= siphash.c 511 512# srp 513SRCS+= srp_lib.c srp_vfy.c 514 515# ssl 516SRCS+= s3_cbc.c 517 518# ssl/record 519SRCS+= tls_pad.c 520 521# stack 522SRCS+= stack.c 523 524# store 525SRCS+= store_err.c store_init.c store_lib.c store_meth.c store_register.c 526SRCS+= store_result.c store_strings.c 527 528# ts 529SRCS+= ts_asn1.c ts_conf.c ts_err.c ts_lib.c ts_req_print.c ts_req_utils.c 530SRCS+= ts_rsp_print.c ts_rsp_sign.c ts_rsp_utils.c ts_rsp_verify.c 531SRCS+= ts_verify_ctx.c 532 533# txt_db 534SRCS+= txt_db.c 535 536# ui 537SRCS+= ui_err.c ui_lib.c ui_null.c ui_openssl.c ui_util.c 538 539# whrlpool 540SRCS+= wp_dgst.c 541.if defined(ASM_amd64) 542SRCS+= wp-x86_64.S 543.elif defined(ASM_i386) 544SRCS+= wp-mmx.S wp_block.c 545.else 546SRCS+= wp_block.c 547.endif 548 549# x509 550SRCS+= by_dir.c by_file.c by_store.c 551SRCS+= pcy_cache.c pcy_data.c pcy_lib.c pcy_map.c pcy_node.c pcy_tree.c 552SRCS+= t_crl.c t_req.c t_x509.c 553SRCS+= v3_addr.c v3_admis.c v3_akeya.c v3_akid.c v3_asid.c 554SRCS+= v3_bcons.c v3_bitst.c v3_conf.c v3_cpols.c v3_crld.c v3_enum.c 555SRCS+= v3_extku.c v3_genn.c v3_ia5.c v3_info.c v3_int.c v3_ist.c v3_lib.c v3_ncons.c 556SRCS+= v3_pci.c v3_pcia.c v3_pcons.c v3_pku.c v3_pmaps.c v3_prn.c v3_purp.c 557SRCS+= v3_san.c v3_skid.c v3_sxnet.c v3_tlsf.c v3_utf8.c v3_utl.c v3err.c 558SRCS+= x509_att.c x509_cmp.c x509_d2.c x509_def.c x509_err.c x509_ext.c x509_lu.c x509_meth.c 559SRCS+= x509_obj.c x509_r2x.c x509_req.c x509_set.c x509_trust.c x509_txt.c 560SRCS+= x509_v3.c x509_vfy.c x509_vpm.c x509cset.c x509name.c x509rset.c 561SRCS+= x509spki.c x509type.c x_all.c x_attrib.c x_crl.c x_exten.c x_name.c 562SRCS+= x_pubkey.c x_req.c x_x509.c x_x509a.c 563 564INCS= aes.h asn1.h asn1_mac.h asn1err.h asn1t.h async.h asyncerr.h bio.h 565INCS+= bioerr.h blowfish.h bn.h bnerr.h buffer.h buffererr.h camellia.h 566INCS+= cast.h cmac.h cmp.h cmp_util.h cmperr.h cms.h cmserr.h comp.h comperr.h conf.h conf_api.h 567INCS+= conferr.h configuration.h conftypes.h core.h core_dispatch.h core_names.h core_object.h 568INCS+= crmf.h crmferr.h crypto.h cryptoerr.h cryptoerr_legacy.h ct.h cterr.h 569INCS+= decoder.h decodererr.h des.h dh.h dherr.h dsa.h 570INCS+= dsaerr.h dtls1.h e_os2.h ebcdic.h ec.h ecdh.h ecdsa.h ecerr.h encoder.h encodererr.h 571INCS+= engine.h engineerr.h err.h ess.h esserr.h evp.h evperr.h fips_names.h fipskey.h hmac.h http.h httperr.h idea.h kdf.h 572INCS+= kdferr.h lhash.h macros.h md2.h md4.h md5.h mdc2.h modes.h obj_mac.h 573INCS+= objects.h objectserr.h ocsp.h ocsperr.h opensslconf.h opensslv.h 574INCS+= ossl_typ.h param_build.h params.h pem.h pem2.h pemerr.h pkcs12.h pkcs12err.h pkcs7.h 575INCS+= pkcs7err.h prov_ssl.h proverr.h provider.h rand.h randerr.h rc2.h rc4.h rc5.h ripemd.h 576INCS+= rsa.h rsaerr.h safestack.h seed.h self_test.h sha.h srp.h srtp.h ssl.h ssl2.h 577INCS+= ssl3.h sslerr.h sslerr_legacy.h stack.h store.h storeerr.h symhacks.h tls1.h trace.h ts.h 578INCS+= tserr.h txt_db.h types.h ui.h uierr.h whrlpool.h x509.h x509_vfy.h x509err.h 579INCS+= x509v3.h x509v3err.h 580 581INCSDIR= ${INCLUDEDIR}/openssl 582 583LIBADD= pthread 584 585SRCS+= buildinf.h 586 587CLEANDIRS= openssl 588CLEANFILES= buildinf.h 589 590.if defined(ASM_${MACHINE_CPUARCH}) || defined(ASM_${MACHINE_ARCH}) 591_cmd1=/%%NO_ASM%%/d 592.else 593_cmd1=s/%%NO_ASM%%// 594.endif 595.if ${MK_OPENSSL_KTLS} != "no" 596_cmd2=/%%NO_KTLS%%/d 597.else 598_cmd2=s/%%NO_KTLS%%// 599.endif 600 601buildinf.h: Makefile 602 ( echo "/*"; \ 603 echo " * WARNING: do not edit!"; \ 604 echo " * Generated by ${.ALLSRC}"; \ 605 echo " */"; \ 606 echo "#define PLATFORM \"platform: FreeBSD-${MACHINE_ARCH}\""; \ 607 echo "#define DATE \"built on: reproducible build, date unspecified\""; \ 608 echo "static const char compiler_flags[] = \"compiler: ${COMPILER_TYPE}\";" ) \ 609 > ${.TARGET} 610 611buildasm cleanasm: 612.for arch in aarch64 amd64 arm i386 powerpc powerpc64 powerpc64le 613 make MK_AUTO_OBJ=no -DWITHOUT_AUTO_ASM -DASM_${arch} \ 614 -f ${.CURDIR}/Makefile.asm -C ${SRCTOP}/sys/crypto/openssl/${arch} \ 615 ${.TARGET:S/build/all/:S/asm$//} 616.endfor 617 618.include <bsd.lib.mk> 619 620PICFLAG+= -DOPENSSL_PIC 621 622.if defined(ASM_${MACHINE_CPUARCH}) 623.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_CPUARCH} 624.if defined(ASM_amd64) 625.PATH: ${LCRYPTO_SRC}/crypto/bn/asm 626.endif 627.elif defined(ASM_${MACHINE_ARCH}) 628.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_ARCH} 629.endif 630 631.PATH: ${LCRYPTO_SRC}/crypto \ 632 ${LCRYPTO_SRC}/crypto/aes \ 633 ${LCRYPTO_SRC}/crypto/aria \ 634 ${LCRYPTO_SRC}/crypto/asn1 \ 635 ${LCRYPTO_SRC}/crypto/async \ 636 ${LCRYPTO_SRC}/crypto/async/arch \ 637 ${LCRYPTO_SRC}/crypto/bf \ 638 ${LCRYPTO_SRC}/crypto/bio \ 639 ${LCRYPTO_SRC}/crypto/bn \ 640 ${LCRYPTO_SRC}/crypto/buffer \ 641 ${LCRYPTO_SRC}/crypto/camellia \ 642 ${LCRYPTO_SRC}/crypto/cast \ 643 ${LCRYPTO_SRC}/crypto/chacha \ 644 ${LCRYPTO_SRC}/crypto/cmac \ 645 ${LCRYPTO_SRC}/crypto/cmp \ 646 ${LCRYPTO_SRC}/crypto/cms \ 647 ${LCRYPTO_SRC}/crypto/comp \ 648 ${LCRYPTO_SRC}/crypto/conf \ 649 ${LCRYPTO_SRC}/crypto/crmf \ 650 ${LCRYPTO_SRC}/crypto/ct \ 651 ${LCRYPTO_SRC}/crypto/des \ 652 ${LCRYPTO_SRC}/crypto/dh \ 653 ${LCRYPTO_SRC}/crypto/dsa \ 654 ${LCRYPTO_SRC}/crypto/dso \ 655 ${LCRYPTO_SRC}/crypto/ec \ 656 ${LCRYPTO_SRC}/crypto/ec/curve448 \ 657 ${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 \ 658 ${LCRYPTO_SRC}/crypto/ec/curve448/arch_64 \ 659 ${LCRYPTO_SRC}/crypto/encode_decode \ 660 ${LCRYPTO_SRC}/crypto/engine \ 661 ${LCRYPTO_SRC}/crypto/err \ 662 ${LCRYPTO_SRC}/crypto/ess \ 663 ${LCRYPTO_SRC}/crypto/evp \ 664 ${LCRYPTO_SRC}/crypto/ffc \ 665 ${LCRYPTO_SRC}/crypto/hmac \ 666 ${LCRYPTO_SRC}/crypto/http \ 667 ${LCRYPTO_SRC}/crypto/idea \ 668 ${LCRYPTO_SRC}/crypto/kdf \ 669 ${LCRYPTO_SRC}/crypto/lhash \ 670 ${LCRYPTO_SRC}/crypto/md4 \ 671 ${LCRYPTO_SRC}/crypto/md5 \ 672 ${LCRYPTO_SRC}/crypto/mdc2 \ 673 ${LCRYPTO_SRC}/crypto/modes \ 674 ${LCRYPTO_SRC}/crypto/objects \ 675 ${LCRYPTO_SRC}/crypto/ocsp \ 676 ${LCRYPTO_SRC}/crypto/pem \ 677 ${LCRYPTO_SRC}/crypto/pkcs12 \ 678 ${LCRYPTO_SRC}/crypto/pkcs7 \ 679 ${LCRYPTO_SRC}/crypto/poly1305 \ 680 ${LCRYPTO_SRC}/crypto/property \ 681 ${LCRYPTO_SRC}/crypto/rand \ 682 ${LCRYPTO_SRC}/crypto/rc2 \ 683 ${LCRYPTO_SRC}/crypto/rc4 \ 684 ${LCRYPTO_SRC}/crypto/rc5 \ 685 ${LCRYPTO_SRC}/crypto/ripemd \ 686 ${LCRYPTO_SRC}/crypto/rsa \ 687 ${LCRYPTO_SRC}/crypto/seed \ 688 ${LCRYPTO_SRC}/crypto/sha \ 689 ${LCRYPTO_SRC}/crypto/siphash \ 690 ${LCRYPTO_SRC}/crypto/sm2 \ 691 ${LCRYPTO_SRC}/crypto/sm3 \ 692 ${LCRYPTO_SRC}/crypto/sm4 \ 693 ${LCRYPTO_SRC}/crypto/srp \ 694 ${LCRYPTO_SRC}/crypto/stack \ 695 ${LCRYPTO_SRC}/crypto/store \ 696 ${LCRYPTO_SRC}/crypto/ts \ 697 ${LCRYPTO_SRC}/crypto/txt_db \ 698 ${LCRYPTO_SRC}/crypto/ui \ 699 ${LCRYPTO_SRC}/crypto/whrlpool \ 700 ${LCRYPTO_SRC}/crypto/x509 \ 701 ${LCRYPTO_SRC}/crypto/x509v3 \ 702 ${LCRYPTO_SRC}/include/openssl \ 703 ${LCRYPTO_SRC}/providers \ 704 ${LCRYPTO_SRC}/providers/common \ 705 ${LCRYPTO_SRC}/providers/common/der \ 706 ${LCRYPTO_SRC}/providers/implementations/asymciphers \ 707 ${LCRYPTO_SRC}/providers/implementations/ciphers \ 708 ${LCRYPTO_SRC}/providers/implementations/digests \ 709 ${LCRYPTO_SRC}/providers/implementations/encode_decode \ 710 ${LCRYPTO_SRC}/providers/implementations/exchange \ 711 ${LCRYPTO_SRC}/providers/implementations/kdfs \ 712 ${LCRYPTO_SRC}/providers/implementations/kem \ 713 ${LCRYPTO_SRC}/providers/implementations/keymgmt \ 714 ${LCRYPTO_SRC}/providers/implementations/macs \ 715 ${LCRYPTO_SRC}/providers/implementations/rands \ 716 ${LCRYPTO_SRC}/providers/implementations/rands/seeding \ 717 ${LCRYPTO_SRC}/providers/implementations/signature \ 718 ${LCRYPTO_SRC}/providers/implementations/storemgmt \ 719 ${LCRYPTO_SRC}/ssl \ 720 ${LCRYPTO_SRC}/ssl/record 721