Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
user_settings.h
1
/* user_settings.h : custom configuration for wolfcrypt/wolfSSL */
2
3
#ifndef USER_SETTINGS_H
4
#define USER_SETTINGS_H
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
10
/* System */
11
#ifndef WOLFSSL_RIOT_OS
12
#define WOLFSSL_RIOT_OS 1
13
#endif
14
#include <
random.h
>
15
#define CUSTOM_RAND_GENERATE random_uint32
16
#define CUSTOM_RAND_TYPE uint32_t
17
#define NO_WRITEV
18
#define NO_DEV_RANDOM
19
#define NO_FILESYSTEM
20
#define NO_WOLFSSL_MEMORY
21
#define NO_MAIN_DRIVER
22
#define NO_SIG_WRAPPER
23
#define NO_OLD_RNGNAME
24
#define HAVE_STRINGS_H
25
#define WOLFSSL_IPV6
26
27
/* Single precision math */
28
#define WOLFSSL_SP_MATH
29
#define WOLFSSL_SP_SMALL
30
#define SP_WORD_SIZE 32
31
#define WOLFSSL_SP
32
33
/* GNRC support enabled if not
34
* using sockets
35
*/
36
#ifndef MODULE_WOLFSSL_SOCKET
37
#define WOLFSSL_GNRC
38
#define WOLFSSL_USER_IO
39
#else
40
#include <
sys/socket.h
>
41
#endif
42
43
/* Select wolfcrypt only / +wolfssl
44
* at compile time (via USEMODULE)
45
*/
46
#ifndef MODULE_WOLFSSL_TLS
47
#ifndef MODULE_WOLFSSL_TLS13
48
#define WOLFCRYPT_ONLY
49
#else
50
#define NO_OLD_TLS
51
#define HAVE_TLS_EXTENSIONS
52
#define HAVE_AES_DECRYPT
53
#define HAVE_AESGCM
54
#define GCM_SMALL
55
#define HAVE_AESCCM
56
#define WOLFSSL_AES_COUNTER
57
#define WOLFSSL_AES_DIRECT
58
#endif
59
#else
60
#define HAVE_TLS_EXTENSIONS
61
#endif
62
63
/* Align on 32-bit (exc. native,
64
* don't modify default alignment.)
65
*/
66
#ifndef BOARD_NATIVE
67
#define WOLFSSL_GENERAL_ALIGNMENT 4
68
#endif
69
70
/* ARM-specific optimizations */
71
#ifdef CPU_ARM
72
#define TFM_ARM
73
#endif
74
75
/* defined somewhere else */
76
int
strncasecmp(
const
char
*s1,
const
char
* s2,
size_t
sz);
77
78
#define SINGLE_THREADED
79
80
/* Global settings */
81
#define SMALL_SESSION_CACHE
82
#define WOLFSSL_DH_CONST
83
#define WORD64_AVAILABLE
84
#define TFM_TIMING_RESISTANT
85
#define USE_CERT_BUFFERS_2048
86
#define NO_RC4
87
88
/* Modules */
89
#undef WC_NO_RNG
90
#ifndef MODULE_WOLFCRYPT_RANDOM
91
#define WC_NO_RNG
92
#endif
93
94
#undef WOLFSSL_DTLS
95
#ifdef MODULE_WOLFSSL_DTLS
96
#define WOLFSSL_DTLS
97
#endif
98
99
#undef WOLFSSL_DTLS13
100
#ifdef MODULE_WOLFSSL_DTLS13
101
#define WOLFSSL_DTLS13
102
#define HAVE_AEAD
103
#endif
104
105
#undef HAVE_FFDHE_2048
106
#ifdef MODULE_WOLFCRYPT_FFDHE_2048
107
#define HAVE_FFDHE_2048
108
#endif
109
110
#undef HAVE_CHACHA
111
#ifdef MODULE_WOLFCRYPT_CHACHA
112
#define HAVE_CHACHA
113
#endif
114
115
#undef HAVE_POLY1305
116
#ifdef MODULE_WOLFCRYPT_POLY1305
117
#define HAVE_POLY1305
118
#define HAVE_ONE_TIME_AUTH
119
#endif
120
121
#undef HAVE_CURVE25519
122
#ifdef MODULE_WOLFCRYPT_CURVE25519
123
#define HAVE_CURVE25519
124
#define CURVE25519_SMALL
125
#endif
126
127
#undef HAVE_ED25519
128
#ifdef MODULE_WOLFCRYPT_ED25519
129
#define HAVE_ED25519
130
#define ED25519_SMALL
131
#endif
132
133
#undef NO_AES
134
#undef NO_CODING
135
#undef NO_CMAC
136
#ifndef MODULE_WOLFCRYPT_AES
137
#define NO_AES
138
#endif
139
#ifndef MODULE_WOLFCRYPT_CMAC
140
#define NO_CMAC
141
#endif
142
#ifndef MODULE_WOLFCRYPT_CODING
143
#define NO_CODING
144
#endif
145
146
#ifndef MODULE_WOLFCRYPT_ASN
147
#define NO_ASN
148
#endif
149
150
#ifndef MODULE_WOLFCRYPT_HMAC
151
#define NO_HMAC
152
#endif
153
154
#undef NO_SHA
155
#ifndef MODULE_WOLFCRYPT_SHA
156
#define NO_SHA
157
#else
158
#define USE_SLOW_SHA
159
#define USE_SLOW_SHA2
160
#endif
161
162
#undef HAVE_SHA512
163
#undef HAVE_SHA384
164
#undef WOLFSSL_SHA384
165
#undef WOLFSSL_SHA512
166
#ifdef MODULE_WOLFCRYPT_SHA512
167
#define HAVE_SHA384
168
#define HAVE_SHA512
169
#define WOLFSSL_SHA384
170
#define WOLFSSL_SHA512
171
#define USE_SLOW_SHA512
172
#endif
173
174
#undef WOLFSSL_SHA3
175
#ifdef MODULE_WOLFCRYPT_SHA3
176
#define WOLFSSL_SHA3
177
#endif
178
179
#undef HAVE_ECC
180
#ifdef MODULE_WOLFCRYPT_ECC
181
#define HAVE_ECC
182
#define FP_ECC
183
#define WOLFSSL_HAVE_SP_ECC
184
#define WOLFSSL_HAVE_SP_ECC
185
#define ECC_TIMING_RESISTANT
186
#define HAVE_SUPPORTED_CURVES
187
#endif
188
189
#undef HAVE_BLAKE2B
190
#ifdef MODULE_WOLFCRYPT_BLAKE2B
191
#define HAVE_BLAKE2B
192
#endif
193
194
#undef HAVE_CAMELLIA
195
#ifdef MODULE_WOLFCRYPT_CAMELLIA
196
#define HAVE_CAMELLIA
197
#endif
198
199
#undef HAVE_IDEA
200
#ifdef MODULE_WOLFCRYPT_IDEA
201
#define HAVE_IDEA
202
#endif
203
204
#undef HAVE_HC128
205
#ifdef MODULE_WOLFCRYPT_HC128
206
#define HAVE_HC128
207
#endif
208
209
#undef HAVE_PKCS7
210
#ifdef MODULE_WOLFCRYPT_PKCS7
211
#define HAVE_PKCS7
212
#endif
213
214
#undef NO_PKCS12
215
#ifndef MODULE_WOLFCRYPT_PKCS12
216
#define NO_PKCS12
217
#endif
218
219
#undef NO_PWDBASED
220
#ifndef MODULE_WOLFCRYPT_PWDBASED
221
#define NO_PWDBASED
222
#endif
223
224
#undef WOLFSSL_STATIC_PSK
225
#ifdef MODULE_WOLFSSL_PSK
226
#define WOLFSSL_STATIC_PSK
227
#endif
228
229
#undef HAVE_LIBZ
230
#ifdef MODULE_WOLFCRYPT_COMPRESS
231
#define HAVE_LIBZ
232
#endif
233
234
#ifdef MODULE_WOLFCRYPT_RSA
235
#define HAVE_RSA
236
#define RSA_LOW_MEM
237
#define WC_RSA_BLINDING
238
#define WOLFSSL_STATIC_RSA
239
#define WOLFSSL_HAVE_SP_DH
240
#define WOLFSSL_HAVE_SP_RSA
241
#else
242
#define NO_RSA
243
#endif
244
245
#undef NO_DES3
246
#ifndef MODULE_WOLFCRYPT_DES3
247
#define NO_DES3
248
#endif
249
250
#undef NO_DH
251
#ifndef MODULE_WOLFCRYPT_DH
252
#define NO_DH
253
#endif
254
255
#undef NO_DSA
256
#ifndef MODULE_WOLFCRYPT_DSA
257
#define NO_DSA
258
#endif
259
260
#undef WOLFSSL_MD2
261
#ifdef MODULE_WOLFSSL_MD2
262
#define WOLFSSL_MD2
263
#endif
264
265
#undef NO_MD4
266
#ifndef MODULE_WOLFCRYPT_MD4
267
#define NO_MD4
268
#endif
269
270
#undef NO_RABBIT
271
#ifndef MODULE_WOLFCRYPT_RABBIT
272
#define NO_RABBIT
273
#endif
274
275
#undef NO_MD5
276
#ifndef MODULE_WOLFCRYPT_MD5
277
#define NO_MD5
278
#endif
279
280
#undef WOLFSSL_RIPEMD
281
#ifdef MODULE_WOLFCRYPT_RIPEMD
282
#define WOLFSSL_RIPEMD
283
#endif
284
285
#undef NO_SIG_WRAPPER
286
#ifndef MODULE_WOLFCRYPT_SIGNATURE
287
#define NO_SIG_WRAPPER
288
#endif
289
290
#undef HAVE_SRP
291
#ifdef MODULE_WOLFCRYPT_SRP
292
#define HAVE_SRP
293
#endif
294
295
#undef HAVE_OCSP
296
#ifdef MODULE_WOLFSSL_OCSP
297
#define HAVE_OCSP
298
#endif
299
300
#undef HAVE_CRL
301
#ifdef MODULE_WOLFSSL_CRL
302
#define HAVE_CRL
303
#endif
304
305
#undef HAVE_TLS13
306
#ifdef MODULE_WOLFSSL_TLS13
307
#define HAVE_TLS13
308
#define WOLFSSL_TLS13
309
#define BUILD_TLS_AES_128_GCM_SHA256
310
#define NO_OLD_TLS
311
#define HAVE_TLS_EXTENSIONS
312
#define HAVE_AES_DECRYPT
313
#define HAVE_AESGCM
314
#define GCM_SMALL
315
#define HAVE_AESCCM
316
#define WOLFSSL_AES_COUNTER
317
#define WOLFSSL_AES_DIRECT
318
#define HAVE_FFDHE_4096
319
#define HAVE_HKDF
320
#define WC_RSA_PSS
321
#define WOLFSSL_SEND_HRR_COOKIE
322
#endif
323
324
#ifdef MODULE_WOLFSSL_DEBUG
325
#define DEBUG_WOLFSSL
326
#define WOLFSSL_LOG_PRINTF
327
#endif
328
329
#ifdef __cplusplus
330
}
331
#endif
332
333
/* The following defines should prevent declaration of name-colliding "Aes"
334
* structure on SAML21, SAME54 platform code
335
*
336
* TODO: avoid pulling in all vendor files through cpu_conf.h
337
*/
338
#define _SAML21_AES_COMPONENT_
339
#define _SAMD51_AES_COMPONENT_
340
#define _SAME54_AES_COMPONENT_
341
#define _SAMR34_AES_COMPONENT_
342
343
#endif
/* USER_SETTINGS_H */
random.h
Common interface to the software PRNG.
socket.h
Main socket header.
Generated on Fri Jan 3 2025 13:31:20 by
1.9.8