LIBPRIV: Add common PRIVATELIB_LDFLAGS definitions.
[dragonfly.git] / usr.sbin / 802_11 / Makefile.crypto
1 # $FreeBSD: head/usr.sbin/wpa/Makefile.crypto 252726 2013-07-04 21:12:58Z rpaulo $
2
3 SRCS+=          crypto_openssl.c random.c sha1-prf.c sha256-prf.c
4 DPADD+=         ${LIBRESSL} ${LIBRECRYPTO}
5 LDADD+=         -lprivate_ssl -lprivate_crypto
6 CFLAGS+=        -DCONFIG_SHA256 -I${.CURDIR}/../../../crypto/libressl/include
7 LDFLAGS+=       ${PRIVATELIB_LDFLAGS}
8
9 .if defined(TLS_FUNCS)
10 NEED_TLS_PRF=y
11 .if defined(CONFIG_INTERNAL_TLS)
12 CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \
13         -DCONFIG_TLS_INTERNAL_CLIENT
14 SRCS+=  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
31 NEED_DES=y
32 NEED_MD4=y
33 NEED_RC4=y
34 .else
35 CFLAGS+=-DEAP_TLS_OPENSSL
36 SRCS+=  tls_openssl.c
37 .endif
38 .endif
39
40 .if defined(CONFIG_INTERNAL_AES)
41 SRCS+=  aes-internal.c \
42         aes-internal-dec.c \
43         aes-internal-enc.c
44 .endif
45
46 .if defined(NEED_AES_CBC)
47 SRCS+=  aes-cbc.c
48 .endif
49
50 .if defined(NEED_AES_EAX)
51 SRCS+=  aes-eax.c
52 NEED_AES_CTR=y
53 .endif
54
55 .if defined(NEED_AES_CTR)
56 SRCS+=  aes-ctr.c
57 .endif
58
59 .if defined(NEED_AES_ENCBLOCK)
60 SRCS+=  aes-encblock.c
61 .endif
62
63 .if defined(NEED_AES_OMAC1)
64 SRCS+=  aes-omac1.c
65 .endif
66
67 .if defined(NEED_DES)
68 .if defined(CONFIG_INTERNAL_DES)
69 SRCS+=  des-internal.c
70 .endif
71 .endif
72
73 .if defined(NEED_MD4)
74 .if defined(CONFIG_INTERNAL_MD4)
75 SRCS+=  md4-internal.c
76 .endif
77 .endif
78
79 .if defined(CONFIG_INTERNAL_MD5)
80 SRCS+=  md5-internal.c
81 .endif
82
83 .if defined(NEED_FIPS186_2_PRF)
84 .if defined(CONFIG_INTERNAL_SHA1)
85 SRCS+=  fips_prf_internal.c
86 .else
87 SRCS+=  fips_prf_openssl.c
88 .endif
89 .endif
90
91 .if defined(CONFIG_INTERNAL_RC4)
92 SRCS+=  rc4.c
93 .endif
94
95 .if defined(CONFIG_INTERNAL_SHA1)
96 SRCS+=  sha1-internal.c sha1-pbkdf2.c sha1.c sha1-prf.c
97 .endif
98
99 .if defined(NEED_SHA256)
100 CFLAGS+=-DCONFIG_SHA256
101 SRCS+=  sha256.c
102 .if defined(CONFIG_INTERNAL_SHA256)
103 SRCS+=  sha256-internal.c sha256-prf.c
104 .endif
105 .endif
106
107 .if defined(NEED_TLS_PRF)
108 SRCS+=  sha1-tlsprf.c
109 .endif
110
111 .if defined(CONFIG_INTERNAL_DH5)
112 SRCS+=  dh_group5.c
113 .endif
114
115 .if defined(CONFIG_INTERNAL_DH)
116 SRCS+=  dh_groups.c
117 .endif