191f5df38SWarner Losh.if ${MK_OPENSSL} != "no" 2c6db8143SBaptiste DaroussinLIBADD+= ssl crypto 3f05cddf9SRui PauloCFLAGS+= -DCONFIG_SHA256 4*c1d255d3SCy SchubertCFLAGS+= -DCONFIG_ECC 5d9246288SBernhard Schmidt.else 6d9246288SBernhard SchmidtCFLAGS+=-DCONFIG_CRYPTO_INTERNAL 7d9246288SBernhard SchmidtCONFIG_INTERNAL_AES=y 8d9246288SBernhard SchmidtCONFIG_INTERNAL_DES=y 9d9246288SBernhard SchmidtCONFIG_INTERNAL_MD4=y 10d9246288SBernhard SchmidtCONFIG_INTERNAL_MD5=y 11d9246288SBernhard SchmidtCONFIG_INTERNAL_RC4=y 12d9246288SBernhard SchmidtCONFIG_INTERNAL_SHA1=y 13f05cddf9SRui PauloNEED_SHA256=y 14d9246288SBernhard SchmidtCONFIG_INTERNAL_SHA256=y 157c5a624aSAdrian ChaddNEED_SHA384=y 167c5a624aSAdrian ChaddCONFIG_INTERNAL_SHA384=y 177c5a624aSAdrian ChaddNEED_SHA512=y 187c5a624aSAdrian ChaddCONFIG_INTERNAL_SHA512=y 19d9246288SBernhard SchmidtCONFIG_INTERNAL_TLS=y 207c5a624aSAdrian ChaddNEED_DH_GROUPS=y 21f05cddf9SRui PauloCONFIG_INTERNAL_DH5=y 22d9246288SBernhard SchmidtNEED_AES_ENC=true 23325151a3SRui PauloNEED_AES_CBC=true 24d9246288SBernhard Schmidt.endif 2585732ac8SCy SchubertNEED_AES_OMAC1=true 269a0f8228SCy SchubertTLS_FUNCS=y 27d9246288SBernhard Schmidt 28d9246288SBernhard Schmidt.if defined(TLS_FUNCS) 29d9246288SBernhard SchmidtNEED_TLS_PRF=y 30d9246288SBernhard Schmidt.if defined(CONFIG_INTERNAL_TLS) 31d9246288SBernhard SchmidtCFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \ 32d9246288SBernhard Schmidt -DCONFIG_TLS_INTERNAL_CLIENT 33d9246288SBernhard SchmidtNEED_DES=y 34d9246288SBernhard SchmidtNEED_MD4=y 35d9246288SBernhard SchmidtNEED_RC4=y 36d9246288SBernhard Schmidt.else 37d9246288SBernhard SchmidtCFLAGS+=-DEAP_TLS_OPENSSL 38d9246288SBernhard Schmidt.endif 39d9246288SBernhard Schmidt.endif 40d9246288SBernhard Schmidt 41d9246288SBernhard Schmidt.if defined(NEED_AES_EAX) 42d9246288SBernhard SchmidtNEED_AES_CTR=y 43d9246288SBernhard Schmidt.endif 44d9246288SBernhard Schmidt 45d9246288SBernhard Schmidt.if defined(NEED_SHA256) 46d9246288SBernhard SchmidtCFLAGS+=-DCONFIG_SHA256 47d9246288SBernhard Schmidt.endif 48d9246288SBernhard Schmidt 497c5a624aSAdrian Chadd.if defined(NEED_SHA384) 507c5a624aSAdrian ChaddCFLAGS+=-DCONFIG_SHA384 517c5a624aSAdrian Chadd.endif 527c5a624aSAdrian Chadd 537c5a624aSAdrian Chadd.if defined(NEED_SHA512) 547c5a624aSAdrian ChaddCFLAGS+=-DCONFIG_SHA512 55f05cddf9SRui Paulo.endif 567c5a624aSAdrian Chadd 577c5a624aSAdrian Chadd.if defined(NEED_DH_GROUPS_ALL) 587c5a624aSAdrian ChaddCFLAGS+=-DALL_DH_GROUPS 597c5a624aSAdrian Chadd.endif 60