]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/wpa/Makefile.crypto
zfs: merge OpenZFS master-891568c99
[FreeBSD/FreeBSD.git] / usr.sbin / wpa / Makefile.crypto
1 # $FreeBSD$
2
3 .if ${MK_OPENSSL} != "no"
4 SRCS+=  crypto_openssl.c random.c sha1-prf.c sha256-prf.c sha256-tlsprf.c \
5         sha512.c
6 LIBADD+=        ssl crypto
7 CFLAGS+= -DCONFIG_SHA256
8 .else
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
17 NEED_SHA256=y
18 CONFIG_INTERNAL_SHA256=y
19 NEED_SHA384=y
20 CONFIG_INTERNAL_SHA384=y
21 NEED_SHA512=y
22 CONFIG_INTERNAL_SHA512=y
23 CONFIG_INTERNAL_TLS=y
24 NEED_DH_GROUPS=y
25 CONFIG_INTERNAL_DH5=y
26 NEED_AES_ENC=true
27 NEED_AES_CBC=true
28 .endif
29 NEED_AES_OMAC1=true
30
31 .if defined(TLS_FUNCS)
32 NEED_TLS_PRF=y
33 .if defined(CONFIG_INTERNAL_TLS)
34 CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \
35         -DCONFIG_TLS_INTERNAL_CLIENT
36 SRCS+=  asn1.c \
37         bignum.c \
38         crypto_internal-cipher.c \
39         crypto_internal-modexp.c \
40         crypto_internal-rsa.c \
41         pkcs1.c \
42         pkcs5.c \
43         pkcs8.c \
44         rsa.c \
45         tls_internal.c \
46         tlsv1_common.c \
47         tlsv1_record.c \
48         tlsv1_cred.c \
49         tlsv1_client.c \
50         tlsv1_client_write.c \
51         tlsv1_client_read.c \
52         tlsv1_client_ocsp.c \
53         x509v3.c
54 NEED_DES=y
55 NEED_MD4=y
56 NEED_RC4=y
57 .else
58 CFLAGS+=-DEAP_TLS_OPENSSL
59 SRCS+=  tls_openssl.c tls_openssl_ocsp.c
60 .endif
61 .endif
62
63 .if defined(CONFIG_INTERNAL_AES)
64 SRCS+=  aes-unwrap.c aes-wrap.c \
65         aes-internal.c \
66         aes-internal-dec.c \
67         aes-internal-enc.c
68 .endif
69
70 .if defined(NEED_AES_CBC)
71 SRCS+=  aes-cbc.c
72 .endif
73
74 .if defined(NEED_AES_EAX)
75 SRCS+=  aes-eax.c
76 NEED_AES_CTR=y
77 .endif
78
79 .if defined(NEED_AES_CTR)
80 SRCS+=  aes-ctr.c
81 .endif
82
83 .if defined(NEED_AES_ENCBLOCK)
84 SRCS+=  aes-encblock.c
85 .endif
86
87 .if defined(NEED_AES_OMAC1)
88 SRCS+=  aes-omac1.c
89 .endif
90
91 .if defined(NEED_DES)
92 .if defined(CONFIG_INTERNAL_DES)
93 SRCS+=  des-internal.c
94 .endif
95 .endif
96
97 .if defined(NEED_MD4)
98 .if defined(CONFIG_INTERNAL_MD4)
99 SRCS+=  md4-internal.c
100 .endif
101 .endif
102
103 .if defined(CONFIG_INTERNAL_MD5)
104 SRCS+=  md5.c md5-internal.c
105 .endif
106
107 .if defined(NEED_FIPS186_2_PRF)
108 .if defined(CONFIG_INTERNAL_SHA1)
109 SRCS+=  fips_prf_internal.c
110 .else
111 SRCS+=  fips_prf_openssl.c
112 .endif
113 .endif
114
115 .if defined(CONFIG_INTERNAL_RC4)
116 SRCS+=  rc4.c
117 .endif
118
119 .if defined(CONFIG_INTERNAL_SHA1)
120 SRCS+=  sha1-internal.c sha1-pbkdf2.c sha1.c sha1-prf.c
121 .endif
122
123 .if defined(NEED_SHA256)
124 CFLAGS+=-DCONFIG_SHA256
125 SRCS+=  sha256.c
126 .if defined(CONFIG_INTERNAL_SHA256)
127 SRCS+=  sha256-internal.c sha256-prf.c
128 .endif
129 .endif
130
131 .if defined(NEED_SHA384)
132 CFLAGS+=-DCONFIG_SHA384
133 SRCS+=  sha384.c
134 .if defined(CONFIG_INTERNAL_SHA384)
135 SRCS+=  sha384-internal.c sha384-prf.c
136 .endif
137 .endif
138
139 .if defined(NEED_SHA512)
140 CFLAGS+=-DCONFIG_SHA512
141 SRCS+=  sha512.c
142 .if defined(CONFIG_INTERNAL_SHA512)
143 SRCS+=  sha512-internal.c sha512-prf.c
144 .endif
145 .endif
146
147 .if defined(NEED_TLS_PRF)
148 SRCS+=  sha1-tlsprf.c
149 .endif
150
151 .if defined(CONFIG_INTERNAL_DH5)
152 .if defined(NEED_DH_GROUPS)
153 SRCS+=  dh_group5.c
154 .endif
155 .endif
156
157 .if defined(NEED_DH_GROUPS)
158 SRCS+=  dh_groups.c
159 .endif
160
161 .if defined(NEED_DH_GROUPS_ALL)
162 CFLAGS+=-DALL_DH_GROUPS
163 .endif