blob: 96bac94763e0a5ce8da4dd498d9556a7c1ab4e17 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#CFLAGS += -DALL_DH_GROUPS
2CFLAGS += -DCONFIG_SHA256
3CFLAGS += -DCONFIG_SHA384
4CFLAGS += -DCONFIG_HMAC_SHA256_KDF
5CFLAGS += -DCONFIG_HMAC_SHA384_KDF
6
7# crypto_module_tests.c
8CFLAGS += -DCONFIG_MODULE_TESTS
9CFLAGS += -DCONFIG_DPP
10#CFLAGS += -DCONFIG_DPP2
11#CFLAGS += -DCONFIG_DPP3
12CFLAGS += -DCONFIG_ECC
13CFLAGS += -DCONFIG_MESH
14CFLAGS += -DEAP_PSK
15CFLAGS += -DEAP_FAST
16
17ifeq ($(CONFIG_TLS),mbedtls)
18
19# (enable features for 'cd tests; make run-tests CONFIG_TLS=mbedtls')
20CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
21CFLAGS += -DCONFIG_DES
22CFLAGS += -DEAP_IKEV2
23CFLAGS += -DEAP_MSCHAPv2
24CFLAGS += -DEAP_SIM
25
26LIB_OBJS = tls_mbedtls.o crypto_mbedtls.o
27LIB_OBJS+= \
28 aes-eax.o \
29 aes-siv.o \
30 dh_groups.o \
31 milenage.o \
32 ms_funcs.o
33
34else
35ifeq ($(CONFIG_TLS),openssl)
36
37# (enable features for 'cd tests; make run-tests CONFIG_TLS=openssl')
38ifndef CONFIG_TLS_DEFAULT_CIPHERS
39CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW"
40endif
41CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
42CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
43CFLAGS += -DEAP_TLS_OPENSSL
44
45LIB_OBJS = tls_openssl.o fips_prf_openssl.o crypto_openssl.o
46LIB_OBJS+= \
47 aes-ctr.o \
48 aes-eax.o \
49 aes-encblock.o \
50 aes-siv.o \
51 dh_groups.o \
52 milenage.o \
53 ms_funcs.o \
54 sha1-prf.o \
55 sha1-tlsprf.o \
56 sha1-tprf.o \
57 sha256-kdf.o \
58 sha256-prf.o \
59 sha256-tlsprf.o
60
61else
62ifeq ($(CONFIG_TLS),wolfssl)
63
64# (wolfssl libraries must be built with ./configure --enable-wpas)
65# (enable features for 'cd tests; make run-tests CONFIG_TLS=wolfssl')
66CFLAGS += -DWOLFSSL_DER_LOAD
67CFLAGS += -DCONFIG_DES
68
69LIB_OBJS = tls_wolfssl.o fips_prf_wolfssl.o crypto_wolfssl.o
70LIB_OBJS+= \
71 aes-ctr.o \
72 aes-eax.o \
73 aes-encblock.o \
74 aes-siv.o \
75 dh_groups.o \
76 milenage.o \
77 ms_funcs.o \
78 sha1-prf.o \
79 sha1-tlsprf.o \
80 sha1-tprf.o \
81 sha256-kdf.o \
82 sha256-prf.o \
83 sha256-tlsprf.o
84
85else
86ifeq ($(CONFIG_TLS),gnutls)
87
88# (enable features for 'cd tests; make run-tests CONFIG_TLS=gnutls')
89LIB_OBJS = tls_gnutls.o crypto_gnutls.o
90LIB_OBJS+= \
91 aes-cbc.o \
92 aes-ctr.o \
93 aes-eax.o \
94 aes-encblock.o \
95 aes-omac1.o \
96 aes-siv.o \
97 aes-unwrap.o \
98 aes-wrap.o \
99 dh_group5.o \
100 dh_groups.o \
101 milenage.o \
102 ms_funcs.o \
103 rc4.o \
104 sha1-pbkdf2.o \
105 sha1-prf.o \
106 fips_prf_internal.o \
107 sha1-internal.o \
108 sha1-tlsprf.o \
109 sha1-tprf.o \
110 sha256-kdf.o \
111 sha256-prf.o \
112 sha256-tlsprf.o
113
114else
115
116CFLAGS += -DCONFIG_CRYPTO_INTERNAL
117CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
118CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER
119CFLAGS += -DCONFIG_INTERNAL_SHA384
120
121LIB_OBJS= \
122 aes-cbc.o \
123 aes-ccm.o \
124 aes-ctr.o \
125 aes-eax.o \
126 aes-encblock.o \
127 aes-internal.o \
128 aes-internal-dec.o \
129 aes-internal-enc.o \
130 aes-omac1.o \
131 aes-siv.o \
132 aes-unwrap.o \
133 aes-wrap.o \
134 des-internal.o \
135 dh_group5.o \
136 dh_groups.o \
137 md4-internal.o \
138 md5.o \
139 md5-internal.o \
140 milenage.o \
141 ms_funcs.o \
142 rc4.o \
143 sha1.o \
144 sha1-internal.o \
145 sha1-pbkdf2.o \
146 sha1-prf.o \
147 sha1-tlsprf.o \
148 sha1-tprf.o \
149 sha256.o \
150 sha256-kdf.o \
151 sha256-prf.o \
152 sha256-tlsprf.o \
153 sha256-internal.o \
154 sha384.o \
155 sha384-prf.o \
156 sha384-internal.o \
157 sha512.o \
158 sha512-prf.o \
159 sha512-internal.o
160
161LIB_OBJS += crypto_internal.o
162LIB_OBJS += crypto_internal-cipher.o
163LIB_OBJS += crypto_internal-modexp.o
164LIB_OBJS += crypto_internal-rsa.o
165LIB_OBJS += tls_internal.o
166LIB_OBJS += fips_prf_internal.o
167
168endif
169endif
170endif
171endif
172
173
174# (used by wlantest/{bip,gcmp,rx_mgmt}.c and tests/test-aes.c)
175LIB_OBJS += aes-gcm.o
176
177ifndef TEST_FUZZ
178LIB_OBJS += random.o
179endif
180
181include ../lib.rules