xref: /freebsd/usr.sbin/wpa/Makefile.crypto (revision c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5)
1d9246288SBernhard Schmidt# $FreeBSD$
2d9246288SBernhard Schmidt
391f5df38SWarner Losh.if ${MK_OPENSSL} != "no"
4c6db8143SBaptiste DaroussinLIBADD+=	ssl crypto
5f05cddf9SRui PauloCFLAGS+= -DCONFIG_SHA256
6*c1d255d3SCy SchubertCFLAGS+= -DCONFIG_ECC
7d9246288SBernhard Schmidt.else
8d9246288SBernhard SchmidtCFLAGS+=-DCONFIG_CRYPTO_INTERNAL
9d9246288SBernhard SchmidtCONFIG_INTERNAL_AES=y
10d9246288SBernhard SchmidtCONFIG_INTERNAL_DES=y
11d9246288SBernhard SchmidtCONFIG_INTERNAL_MD4=y
12d9246288SBernhard SchmidtCONFIG_INTERNAL_MD5=y
13d9246288SBernhard SchmidtCONFIG_INTERNAL_RC4=y
14d9246288SBernhard SchmidtCONFIG_INTERNAL_SHA1=y
15f05cddf9SRui PauloNEED_SHA256=y
16d9246288SBernhard SchmidtCONFIG_INTERNAL_SHA256=y
177c5a624aSAdrian ChaddNEED_SHA384=y
187c5a624aSAdrian ChaddCONFIG_INTERNAL_SHA384=y
197c5a624aSAdrian ChaddNEED_SHA512=y
207c5a624aSAdrian ChaddCONFIG_INTERNAL_SHA512=y
21d9246288SBernhard SchmidtCONFIG_INTERNAL_TLS=y
227c5a624aSAdrian ChaddNEED_DH_GROUPS=y
23f05cddf9SRui PauloCONFIG_INTERNAL_DH5=y
24d9246288SBernhard SchmidtNEED_AES_ENC=true
25325151a3SRui PauloNEED_AES_CBC=true
26d9246288SBernhard Schmidt.endif
2785732ac8SCy SchubertNEED_AES_OMAC1=true
289a0f8228SCy SchubertTLS_FUNCS=y
29d9246288SBernhard Schmidt
30d9246288SBernhard Schmidt.if defined(TLS_FUNCS)
31d9246288SBernhard SchmidtNEED_TLS_PRF=y
32d9246288SBernhard Schmidt.if defined(CONFIG_INTERNAL_TLS)
33d9246288SBernhard SchmidtCFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \
34d9246288SBernhard Schmidt	-DCONFIG_TLS_INTERNAL_CLIENT
35d9246288SBernhard SchmidtNEED_DES=y
36d9246288SBernhard SchmidtNEED_MD4=y
37d9246288SBernhard SchmidtNEED_RC4=y
38d9246288SBernhard Schmidt.else
39d9246288SBernhard SchmidtCFLAGS+=-DEAP_TLS_OPENSSL
40d9246288SBernhard Schmidt.endif
41d9246288SBernhard Schmidt.endif
42d9246288SBernhard Schmidt
43d9246288SBernhard Schmidt.if defined(NEED_AES_EAX)
44d9246288SBernhard SchmidtNEED_AES_CTR=y
45d9246288SBernhard Schmidt.endif
46d9246288SBernhard Schmidt
47d9246288SBernhard Schmidt.if defined(NEED_SHA256)
48d9246288SBernhard SchmidtCFLAGS+=-DCONFIG_SHA256
49d9246288SBernhard Schmidt.endif
50d9246288SBernhard Schmidt
517c5a624aSAdrian Chadd.if defined(NEED_SHA384)
527c5a624aSAdrian ChaddCFLAGS+=-DCONFIG_SHA384
537c5a624aSAdrian Chadd.endif
547c5a624aSAdrian Chadd
557c5a624aSAdrian Chadd.if defined(NEED_SHA512)
567c5a624aSAdrian ChaddCFLAGS+=-DCONFIG_SHA512
57f05cddf9SRui Paulo.endif
587c5a624aSAdrian Chadd
597c5a624aSAdrian Chadd.if defined(NEED_DH_GROUPS_ALL)
607c5a624aSAdrian ChaddCFLAGS+=-DALL_DH_GROUPS
617c5a624aSAdrian Chadd.endif
62