xref: /dragonfly/usr.sbin/802_11/Makefile.crypto (revision 029e6489)
1# $FreeBSD: head/usr.sbin/wpa/Makefile.crypto 252726 2013-07-04 21:12:58Z rpaulo $
2
3SRCS+=		crypto_openssl.c random.c sha1-prf.c sha256-prf.c
4DPADD+=		${LIBSSL} ${LIBCRYPTO}
5LDADD+=		-lprivate_ssl -lprivate_crypto
6CFLAGS+= 	-DCONFIG_SHA256 -I${.CURDIR}/../../../crypto/libressl/include
7LDFLAGS+=	${PRIVATELIB_LDFLAGS}
8
9.if defined(TLS_FUNCS)
10NEED_TLS_PRF=y
11.if defined(CONFIG_INTERNAL_TLS)
12CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \
13	-DCONFIG_TLS_INTERNAL_CLIENT
14SRCS+=	asn1.c \
15	bignum.c \
16	crypto_internal-cipher.c \
17	crypto_internal-modexp.c \
18	crypto_internal-rsa.c \
19	pkcs1.c \
20	pkcs5.c \
21	pkcs8.c \
22	rsa.c \
23	tls_internal.c \
24	tlsv1_common.c \
25	tlsv1_record.c \
26	tlsv1_cred.c \
27	tlsv1_client.c \
28	tlsv1_client_write.c \
29	tlsv1_client_read.c \
30	x509v3.c
31NEED_DES=y
32NEED_MD4=y
33NEED_RC4=y
34.else
35CFLAGS+=-DEAP_TLS_OPENSSL
36SRCS+=	tls_openssl.c tls_openssl_ocsp.c
37.endif
38.endif
39
40.if defined(CONFIG_INTERNAL_AES)
41SRCS+=	aes-internal.c \
42	aes-internal-dec.c \
43	aes-internal-enc.c
44.endif
45
46.if defined(NEED_AES_CBC)
47SRCS+=	aes-cbc.c
48.endif
49
50.if defined(NEED_AES_EAX)
51SRCS+=	aes-eax.c
52NEED_AES_CTR=y
53.endif
54
55.if defined(NEED_AES_CTR)
56SRCS+=	aes-ctr.c
57.endif
58
59.if defined(NEED_AES_ENCBLOCK)
60SRCS+=	aes-encblock.c
61.endif
62
63.if defined(NEED_AES_OMAC1)
64SRCS+=	aes-omac1.c
65.endif
66
67.if defined(NEED_DES)
68.if defined(CONFIG_INTERNAL_DES)
69SRCS+=	des-internal.c
70.endif
71.endif
72
73.if defined(NEED_MD4)
74.if defined(CONFIG_INTERNAL_MD4)
75SRCS+=	md4-internal.c
76.endif
77.endif
78
79.if defined(CONFIG_INTERNAL_MD5)
80SRCS+=	md5-internal.c
81.endif
82
83.if defined(NEED_FIPS186_2_PRF)
84.if defined(CONFIG_INTERNAL_SHA1)
85SRCS+=	fips_prf_internal.c
86.else
87SRCS+=	fips_prf_openssl.c
88.endif
89.endif
90
91.if defined(CONFIG_INTERNAL_RC4)
92SRCS+=	rc4.c
93.endif
94
95.if defined(CONFIG_INTERNAL_SHA1)
96SRCS+=	sha1-internal.c sha1-pbkdf2.c sha1.c sha1-prf.c
97.endif
98
99.if defined(NEED_SHA256)
100CFLAGS+=-DCONFIG_SHA256
101SRCS+=	sha256.c
102.if defined(CONFIG_INTERNAL_SHA256)
103SRCS+=	sha256-internal.c sha256-prf.c
104.endif
105.endif
106
107.if defined(NEED_TLS_PRF)
108SRCS+=	sha1-tlsprf.c sha256-tlsprf.c
109.endif
110
111.if defined(CONFIG_INTERNAL_DH5)
112SRCS+=	dh_group5.c
113.endif
114
115.if defined(CONFIG_INTERNAL_DH)
116SRCS+=	dh_groups.c
117.endif
118