1 # $FreeBSD: head/usr.sbin/wpa/Makefile.crypto 252726 2013-07-04 21:12:58Z rpaulo $
3 #.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
4 SRCS+= crypto_openssl.c random.c sha1-prf.c sha256-prf.c
5 DPADD+= ${LIBSSL} ${LIBCRYPTO}
7 CFLAGS+= -DCONFIG_SHA256
9 #CFLAGS+=-DCONFIG_CRYPTO_INTERNAL
10 #SRCS+= crypto_internal.c random.c
11 #CONFIG_INTERNAL_AES=y
12 #CONFIG_INTERNAL_DES=y
13 #CONFIG_INTERNAL_MD4=y
14 #CONFIG_INTERNAL_MD5=y
15 #CONFIG_INTERNAL_RC4=y
16 #CONFIG_INTERNAL_SHA1=y
18 #CONFIG_INTERNAL_SHA256=y
19 #CONFIG_INTERNAL_TLS=y
20 #CONFIG_INTERNAL_DH5=y
25 .if defined(TLS_FUNCS)
27 .if defined(CONFIG_INTERNAL_TLS)
28 CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \
29 -DCONFIG_TLS_INTERNAL_CLIENT
32 crypto_internal-cipher.c \
33 crypto_internal-modexp.c \
34 crypto_internal-rsa.c \
44 tlsv1_client_write.c \
51 CFLAGS+=-DEAP_TLS_OPENSSL
56 .if defined(CONFIG_INTERNAL_AES)
57 SRCS+= aes-internal.c \
62 .if defined(NEED_AES_CBC)
66 .if defined(NEED_AES_EAX)
71 .if defined(NEED_AES_CTR)
75 .if defined(NEED_AES_ENCBLOCK)
79 .if defined(NEED_AES_OMAC1)
84 .if defined(CONFIG_INTERNAL_DES)
90 .if defined(CONFIG_INTERNAL_MD4)
95 .if defined(CONFIG_INTERNAL_MD5)
99 .if defined(NEED_FIPS186_2_PRF)
100 .if defined(CONFIG_INTERNAL_SHA1)
101 SRCS+= fips_prf_internal.c
103 SRCS+= fips_prf_openssl.c
107 .if defined(CONFIG_INTERNAL_RC4)
111 .if defined(CONFIG_INTERNAL_SHA1)
112 SRCS+= sha1-internal.c sha1-pbkdf2.c sha1.c sha1-prf.c
115 .if defined(NEED_SHA256)
116 CFLAGS+=-DCONFIG_SHA256
118 .if defined(CONFIG_INTERNAL_SHA256)
119 SRCS+= sha256-internal.c sha256-prf.c
123 .if defined(NEED_TLS_PRF)
127 .if defined(CONFIG_INTERNAL_DH5)
131 .if defined(CONFIG_INTERNAL_DH)