[MBEDTLS]
[reactos.git] / reactos / sdk / include / reactos / libs / mbedtls / config.h
1 /**
2 * \file config.h
3 *
4 * \brief Configuration options (set of defines)
5 *
6 * This set of compile-time options may be used to enable
7 * or disable features selectively, and reduce the global
8 * memory footprint.
9 *
10 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
11 * SPDX-License-Identifier: GPL-2.0
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
27 * This file is part of mbed TLS (https://tls.mbed.org)
28 */
29
30 #ifndef MBEDTLS_CONFIG_H
31 #define MBEDTLS_CONFIG_H
32
33 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
34 //#define _CRT_SECURE_NO_DEPRECATE 1
35 #endif
36
37 /**
38 * \name SECTION: System support
39 *
40 * This section sets system specific settings.
41 * \{
42 */
43
44 /**
45 * \def MBEDTLS_HAVE_ASM
46 *
47 * The compiler has support for asm().
48 *
49 * Requires support for asm() in compiler.
50 *
51 * Used in:
52 * library/timing.c
53 * library/padlock.c
54 * include/mbedtls/bn_mul.h
55 *
56 * Comment to disable the use of assembly code.
57 */
58 #define MBEDTLS_HAVE_ASM
59
60 /**
61 * \def MBEDTLS_HAVE_SSE2
62 *
63 * CPU supports SSE2 instruction set.
64 *
65 * Uncomment if the CPU supports SSE2 (IA-32 specific).
66 */
67 #define MBEDTLS_HAVE_SSE2 /* swyter: disable this if you want to support platforms < Pentium 4 */
68
69 /**
70 * \def MBEDTLS_HAVE_TIME
71 *
72 * System has time.h and time().
73 * The time does not need to be correct, only time differences are used,
74 * by contrast with MBEDTLS_HAVE_TIME_DATE
75 *
76 * Comment if your system does not support time functions
77 */
78 //#define MBEDTLS_HAVE_TIME
79
80 /**
81 * \def MBEDTLS_HAVE_TIME_DATE
82 *
83 * System has time.h and time(), gmtime() and the clock is correct.
84 * The time needs to be correct (not necesarily very accurate, but at least
85 * the date should be correct). This is used to verify the validity period of
86 * X.509 certificates.
87 *
88 * Comment if your system does not have a correct clock.
89 */
90 //#define MBEDTLS_HAVE_TIME_DATE
91
92 /**
93 * \def MBEDTLS_PLATFORM_MEMORY
94 *
95 * Enable the memory allocation layer.
96 *
97 * By default mbed TLS uses the system-provided calloc() and free().
98 * This allows different allocators (self-implemented or provided) to be
99 * provided to the platform abstraction layer.
100 *
101 * Enabling MBEDTLS_PLATFORM_MEMORY without the
102 * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide
103 * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and
104 * free() function pointer at runtime.
105 *
106 * Enabling MBEDTLS_PLATFORM_MEMORY and specifying
107 * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the
108 * alternate function at compile time.
109 *
110 * Requires: MBEDTLS_PLATFORM_C
111 *
112 * Enable this layer to allow use of alternative memory allocators.
113 */
114 //#define MBEDTLS_PLATFORM_MEMORY
115
116 /**
117 * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
118 *
119 * Do not assign standard functions in the platform layer (e.g. calloc() to
120 * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF)
121 *
122 * This makes sure there are no linking errors on platforms that do not support
123 * these functions. You will HAVE to provide alternatives, either at runtime
124 * via the platform_set_xxx() functions or at compile time by setting
125 * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a
126 * MBEDTLS_PLATFORM_XXX_MACRO.
127 *
128 * Requires: MBEDTLS_PLATFORM_C
129 *
130 * Uncomment to prevent default assignment of standard functions in the
131 * platform layer.
132 */
133 //#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
134
135 /**
136 * \def MBEDTLS_PLATFORM_EXIT_ALT
137 *
138 * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the
139 * function in the platform abstraction layer.
140 *
141 * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will
142 * provide a function "mbedtls_platform_set_printf()" that allows you to set an
143 * alternative printf function pointer.
144 *
145 * All these define require MBEDTLS_PLATFORM_C to be defined!
146 *
147 * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows;
148 * it will be enabled automatically by check_config.h
149 *
150 * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
151 * MBEDTLS_PLATFORM_XXX_MACRO!
152 *
153 * Uncomment a macro to enable alternate implementation of specific base
154 * platform function
155 */
156 //#define MBEDTLS_PLATFORM_EXIT_ALT
157 //#define MBEDTLS_PLATFORM_TIME_ALT
158 //#define MBEDTLS_PLATFORM_FPRINTF_ALT
159 //#define MBEDTLS_PLATFORM_PRINTF_ALT
160 //#define MBEDTLS_PLATFORM_SNPRINTF_ALT
161 //#define MBEDTLS_PLATFORM_NV_SEED_ALT
162
163 /**
164 * \def MBEDTLS_DEPRECATED_WARNING
165 *
166 * Mark deprecated functions so that they generate a warning if used.
167 * Functions deprecated in one version will usually be removed in the next
168 * version. You can enable this to help you prepare the transition to a new
169 * major version by making sure your code is not using these functions.
170 *
171 * This only works with GCC and Clang. With other compilers, you may want to
172 * use MBEDTLS_DEPRECATED_REMOVED
173 *
174 * Uncomment to get warnings on using deprecated functions.
175 */
176 //#define MBEDTLS_DEPRECATED_WARNING
177
178 /**
179 * \def MBEDTLS_DEPRECATED_REMOVED
180 *
181 * Remove deprecated functions so that they generate an error if used.
182 * Functions deprecated in one version will usually be removed in the next
183 * version. You can enable this to help you prepare the transition to a new
184 * major version by making sure your code is not using these functions.
185 *
186 * Uncomment to get errors on using deprecated functions.
187 */
188 #define MBEDTLS_DEPRECATED_REMOVED /* swyter: we are explictily using the new API set */
189
190 /* \} name SECTION: System support */
191
192 /**
193 * \name SECTION: mbed TLS feature support
194 *
195 * This section sets support for features that are or are not needed
196 * within the modules that are enabled.
197 * \{
198 */
199
200 /**
201 * \def MBEDTLS_TIMING_ALT
202 *
203 * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(),
204 * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
205 *
206 * Only works if you have MBEDTLS_TIMING_C enabled.
207 *
208 * You will need to provide a header "timing_alt.h" and an implementation at
209 * compile time.
210 */
211 //#define MBEDTLS_TIMING_ALT
212
213 /**
214 * \def MBEDTLS_AES_ALT
215 *
216 * MBEDTLS__MODULE_NAME__ALT: Uncomment a macro to let mbed TLS use your
217 * alternate core implementation of a symmetric crypto or hash module (e.g.
218 * platform specific assembly optimized implementations). Keep in mind that
219 * the function prototypes should remain the same.
220 *
221 * This replaces the whole module. If you only want to replace one of the
222 * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags.
223 *
224 * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer
225 * provide the "struct mbedtls_aes_context" definition and omit the base function
226 * declarations and implementations. "aes_alt.h" will be included from
227 * "aes.h" to include the new function definitions.
228 *
229 * Uncomment a macro to enable alternate implementation of the corresponding
230 * module.
231 */
232 //#define MBEDTLS_AES_ALT
233 //#define MBEDTLS_ARC4_ALT
234 //#define MBEDTLS_BLOWFISH_ALT
235 //#define MBEDTLS_CAMELLIA_ALT
236 //#define MBEDTLS_DES_ALT
237 //#define MBEDTLS_XTEA_ALT
238 //#define MBEDTLS_MD2_ALT
239 //#define MBEDTLS_MD4_ALT
240 //#define MBEDTLS_MD5_ALT
241 //#define MBEDTLS_RIPEMD160_ALT
242 //#define MBEDTLS_SHA1_ALT
243 //#define MBEDTLS_SHA256_ALT
244 //#define MBEDTLS_SHA512_ALT
245
246 /**
247 * \def MBEDTLS_MD2_PROCESS_ALT
248 *
249 * MBEDTLS__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use you
250 * alternate core implementation of symmetric crypto or hash function. Keep in
251 * mind that function prototypes should remain the same.
252 *
253 * This replaces only one function. The header file from mbed TLS is still
254 * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags.
255 *
256 * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will
257 * no longer provide the mbedtls_sha1_process() function, but it will still provide
258 * the other function (using your mbedtls_sha1_process() function) and the definition
259 * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible
260 * with this definition.
261 *
262 * Note: if you use the AES_xxx_ALT macros, then is is recommended to also set
263 * MBEDTLS_AES_ROM_TABLES in order to help the linker garbage-collect the AES
264 * tables.
265 *
266 * Uncomment a macro to enable alternate implementation of the corresponding
267 * function.
268 */
269 //#define MBEDTLS_MD2_PROCESS_ALT
270 //#define MBEDTLS_MD4_PROCESS_ALT
271 //#define MBEDTLS_MD5_PROCESS_ALT
272 //#define MBEDTLS_RIPEMD160_PROCESS_ALT
273 //#define MBEDTLS_SHA1_PROCESS_ALT
274 //#define MBEDTLS_SHA256_PROCESS_ALT
275 //#define MBEDTLS_SHA512_PROCESS_ALT
276 //#define MBEDTLS_DES_SETKEY_ALT
277 //#define MBEDTLS_DES_CRYPT_ECB_ALT
278 //#define MBEDTLS_DES3_CRYPT_ECB_ALT
279 //#define MBEDTLS_AES_SETKEY_ENC_ALT
280 //#define MBEDTLS_AES_SETKEY_DEC_ALT
281 //#define MBEDTLS_AES_ENCRYPT_ALT
282 //#define MBEDTLS_AES_DECRYPT_ALT
283
284 /**
285 * \def MBEDTLS_TEST_NULL_ENTROPY
286 *
287 * Enables testing and use of mbed TLS without any configured entropy sources.
288 * This permits use of the library on platforms before an entropy source has
289 * been integrated (see for example the MBEDTLS_ENTROPY_HARDWARE_ALT or the
290 * MBEDTLS_ENTROPY_NV_SEED switches).
291 *
292 * WARNING! This switch MUST be disabled in production builds, and is suitable
293 * only for development.
294 * Enabling the switch negates any security provided by the library.
295 *
296 * Requires MBEDTLS_ENTROPY_C, MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
297 *
298 */
299 //#define MBEDTLS_TEST_NULL_ENTROPY
300
301 /**
302 * \def MBEDTLS_ENTROPY_HARDWARE_ALT
303 *
304 * Uncomment this macro to let mbed TLS use your own implementation of a
305 * hardware entropy collector.
306 *
307 * Your function must be called \c mbedtls_hardware_poll(), have the same
308 * prototype as declared in entropy_poll.h, and accept NULL as first argument.
309 *
310 * Uncomment to use your own hardware entropy collector.
311 */
312 //#define MBEDTLS_ENTROPY_HARDWARE_ALT
313
314 /**
315 * \def MBEDTLS_AES_ROM_TABLES
316 *
317 * Store the AES tables in ROM.
318 *
319 * Uncomment this macro to store the AES tables in ROM.
320 */
321 //#define MBEDTLS_AES_ROM_TABLES
322
323 /**
324 * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
325 *
326 * Use less ROM for the Camellia implementation (saves about 768 bytes).
327 *
328 * Uncomment this macro to use less memory for Camellia.
329 */
330 //#define MBEDTLS_CAMELLIA_SMALL_MEMORY
331
332 /**
333 * \def MBEDTLS_CIPHER_MODE_CBC
334 *
335 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
336 */
337 #define MBEDTLS_CIPHER_MODE_CBC
338
339 /**
340 * \def MBEDTLS_CIPHER_MODE_CFB
341 *
342 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
343 */
344 #define MBEDTLS_CIPHER_MODE_CFB
345
346 /**
347 * \def MBEDTLS_CIPHER_MODE_CTR
348 *
349 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
350 */
351 #define MBEDTLS_CIPHER_MODE_CTR
352
353 /**
354 * \def MBEDTLS_CIPHER_NULL_CIPHER
355 *
356 * Enable NULL cipher.
357 * Warning: Only do so when you know what you are doing. This allows for
358 * encryption or channels without any security!
359 *
360 * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable
361 * the following ciphersuites:
362 * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA
363 * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA
364 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA
365 * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA
366 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384
367 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256
368 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA
369 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384
370 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256
371 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA
372 * MBEDTLS_TLS_RSA_WITH_NULL_SHA256
373 * MBEDTLS_TLS_RSA_WITH_NULL_SHA
374 * MBEDTLS_TLS_RSA_WITH_NULL_MD5
375 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384
376 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256
377 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA
378 * MBEDTLS_TLS_PSK_WITH_NULL_SHA384
379 * MBEDTLS_TLS_PSK_WITH_NULL_SHA256
380 * MBEDTLS_TLS_PSK_WITH_NULL_SHA
381 *
382 * Uncomment this macro to enable the NULL cipher and ciphersuites
383 */
384 //#define MBEDTLS_CIPHER_NULL_CIPHER
385
386 /**
387 * \def MBEDTLS_CIPHER_PADDING_PKCS7
388 *
389 * MBEDTLS_CIPHER_PADDING_XXX: Uncomment or comment macros to add support for
390 * specific padding modes in the cipher layer with cipher modes that support
391 * padding (e.g. CBC)
392 *
393 * If you disable all padding modes, only full blocks can be used with CBC.
394 *
395 * Enable padding modes in the cipher layer.
396 */
397 #define MBEDTLS_CIPHER_PADDING_PKCS7
398 #define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
399 #define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
400 #define MBEDTLS_CIPHER_PADDING_ZEROS
401
402 /**
403 * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES
404 *
405 * Enable weak ciphersuites in SSL / TLS.
406 * Warning: Only do so when you know what you are doing. This allows for
407 * channels with virtually no security at all!
408 *
409 * This enables the following ciphersuites:
410 * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA
411 * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA
412 *
413 * Uncomment this macro to enable weak ciphersuites
414 */
415 //#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
416
417 /**
418 * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES
419 *
420 * Remove RC4 ciphersuites by default in SSL / TLS.
421 * This flag removes the ciphersuites based on RC4 from the default list as
422 * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to
423 * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them
424 * explicitly.
425 *
426 * Uncomment this macro to remove RC4 ciphersuites by default.
427 */
428 #define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
429
430 /**
431 * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED
432 *
433 * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve
434 * module. By default all supported curves are enabled.
435 *
436 * Comment macros to disable the curve and functions for it
437 */
438 #define MBEDTLS_ECP_DP_SECP192R1_ENABLED
439 #define MBEDTLS_ECP_DP_SECP224R1_ENABLED
440 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
441 #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
442 #define MBEDTLS_ECP_DP_SECP521R1_ENABLED
443 #define MBEDTLS_ECP_DP_SECP192K1_ENABLED
444 #define MBEDTLS_ECP_DP_SECP224K1_ENABLED
445 #define MBEDTLS_ECP_DP_SECP256K1_ENABLED
446 #define MBEDTLS_ECP_DP_BP256R1_ENABLED
447 #define MBEDTLS_ECP_DP_BP384R1_ENABLED
448 #define MBEDTLS_ECP_DP_BP512R1_ENABLED
449 #define MBEDTLS_ECP_DP_CURVE25519_ENABLED
450
451 /**
452 * \def MBEDTLS_ECP_NIST_OPTIM
453 *
454 * Enable specific 'modulo p' routines for each NIST prime.
455 * Depending on the prime and architecture, makes operations 4 to 8 times
456 * faster on the corresponding curve.
457 *
458 * Comment this macro to disable NIST curves optimisation.
459 */
460 #define MBEDTLS_ECP_NIST_OPTIM
461
462 /**
463 * \def MBEDTLS_ECDSA_DETERMINISTIC
464 *
465 * Enable deterministic ECDSA (RFC 6979).
466 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
467 * may result in a compromise of the long-term signing key. This is avoided by
468 * the deterministic variant.
469 *
470 * Requires: MBEDTLS_HMAC_DRBG_C
471 *
472 * Comment this macro to disable deterministic ECDSA.
473 */
474 #define MBEDTLS_ECDSA_DETERMINISTIC
475
476 /**
477 * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
478 *
479 * Enable the PSK based ciphersuite modes in SSL / TLS.
480 *
481 * This enables the following ciphersuites (if other requisites are
482 * enabled as well):
483 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
484 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
485 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
486 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
487 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
488 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
489 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
490 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
491 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
492 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
493 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
494 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
495 */
496 //#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED /* swyter: we don't need PSK-based ciphers for schannel */
497
498 /**
499 * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
500 *
501 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
502 *
503 * Requires: MBEDTLS_DHM_C
504 *
505 * This enables the following ciphersuites (if other requisites are
506 * enabled as well):
507 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
508 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
509 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
510 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
511 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
512 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
513 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
514 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
515 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
516 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
517 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
518 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
519 */
520 //#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED /* swyter: we don't need PSK-based ciphers for schannel */
521
522 /**
523 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
524 *
525 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
526 *
527 * Requires: MBEDTLS_ECDH_C
528 *
529 * This enables the following ciphersuites (if other requisites are
530 * enabled as well):
531 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
532 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
533 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
534 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
535 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
536 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
537 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
538 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
539 */
540 //#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED /* swyter: we don't need PSK-based ciphers for schannel */
541
542 /**
543 * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
544 *
545 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
546 *
547 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
548 * MBEDTLS_X509_CRT_PARSE_C
549 *
550 * This enables the following ciphersuites (if other requisites are
551 * enabled as well):
552 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
553 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
554 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
555 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
556 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
557 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
558 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
559 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
560 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
561 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
562 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
563 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
564 */
565 //#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED /* swyter: we don't need PSK-based ciphers for schannel */
566
567 /**
568 * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
569 *
570 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
571 *
572 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
573 * MBEDTLS_X509_CRT_PARSE_C
574 *
575 * This enables the following ciphersuites (if other requisites are
576 * enabled as well):
577 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
578 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
579 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
580 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
581 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
582 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
583 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
584 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
585 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
586 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
587 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
588 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
589 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
590 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
591 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
592 */
593 #define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
594
595 /**
596 * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
597 *
598 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
599 *
600 * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
601 * MBEDTLS_X509_CRT_PARSE_C
602 *
603 * This enables the following ciphersuites (if other requisites are
604 * enabled as well):
605 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
606 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
607 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
608 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
609 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
610 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
611 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
612 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
613 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
614 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
615 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
616 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
617 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
618 */
619 #define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
620
621 /**
622 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
623 *
624 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
625 *
626 * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
627 * MBEDTLS_X509_CRT_PARSE_C
628 *
629 * This enables the following ciphersuites (if other requisites are
630 * enabled as well):
631 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
632 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
633 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
634 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
635 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
636 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
637 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
638 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
639 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
640 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
641 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
642 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
643 */
644 #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
645
646 /**
647 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
648 *
649 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
650 *
651 * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
652 *
653 * This enables the following ciphersuites (if other requisites are
654 * enabled as well):
655 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
656 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
657 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
658 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
659 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
660 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
661 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
662 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
663 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
664 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
665 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
666 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
667 */
668 #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
669
670 /**
671 * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
672 *
673 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
674 *
675 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
676 *
677 * This enables the following ciphersuites (if other requisites are
678 * enabled as well):
679 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
680 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
681 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
682 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
683 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
684 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
685 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
686 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
687 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
688 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
689 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
690 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
691 */
692 #define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
693
694 /**
695 * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
696 *
697 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
698 *
699 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
700 *
701 * This enables the following ciphersuites (if other requisites are
702 * enabled as well):
703 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
704 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
705 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
706 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
707 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
708 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
709 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
710 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
711 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
712 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
713 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
714 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
715 */
716 #define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
717
718 /**
719 * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
720 *
721 * Enable the ECJPAKE based ciphersuite modes in SSL / TLS.
722 *
723 * \warning This is currently experimental. EC J-PAKE support is based on the
724 * Thread v1.0.0 specification; incompatible changes to the specification
725 * might still happen. For this reason, this is disabled by default.
726 *
727 * Requires: MBEDTLS_ECJPAKE_C
728 * MBEDTLS_SHA256_C
729 * MBEDTLS_ECP_DP_SECP256R1_ENABLED
730 *
731 * This enables the following ciphersuites (if other requisites are
732 * enabled as well):
733 * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
734 */
735 //#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
736
737 /**
738 * \def MBEDTLS_PK_PARSE_EC_EXTENDED
739 *
740 * Enhance support for reading EC keys using variants of SEC1 not allowed by
741 * RFC 5915 and RFC 5480.
742 *
743 * Currently this means parsing the SpecifiedECDomain choice of EC
744 * parameters (only known groups are supported, not arbitrary domains, to
745 * avoid validation issues).
746 *
747 * Disable if you only need to support RFC 5915 + 5480 key formats.
748 */
749 #define MBEDTLS_PK_PARSE_EC_EXTENDED
750
751 /**
752 * \def MBEDTLS_ERROR_STRERROR_DUMMY
753 *
754 * Enable a dummy error function to make use of mbedtls_strerror() in
755 * third party libraries easier when MBEDTLS_ERROR_C is disabled
756 * (no effect when MBEDTLS_ERROR_C is enabled).
757 *
758 * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
759 * not using mbedtls_strerror() or error_strerror() in your application.
760 *
761 * Disable if you run into name conflicts and want to really remove the
762 * mbedtls_strerror()
763 */
764 #define MBEDTLS_ERROR_STRERROR_DUMMY
765
766 /**
767 * \def MBEDTLS_GENPRIME
768 *
769 * Enable the prime-number generation code.
770 *
771 * Requires: MBEDTLS_BIGNUM_C
772 */
773 #define MBEDTLS_GENPRIME
774
775 /**
776 * \def MBEDTLS_FS_IO
777 *
778 * Enable functions that use the filesystem.
779 */
780 //#define MBEDTLS_FS_IO /* swyter: we don't have to access the filesystem directly in schannel */
781
782 /**
783 * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
784 *
785 * Do not add default entropy sources. These are the platform specific,
786 * mbedtls_timing_hardclock and HAVEGE based poll functions.
787 *
788 * This is useful to have more control over the added entropy sources in an
789 * application.
790 *
791 * Uncomment this macro to prevent loading of default entropy functions.
792 */
793 //#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
794
795 /**
796 * \def MBEDTLS_NO_PLATFORM_ENTROPY
797 *
798 * Do not use built-in platform entropy functions.
799 * This is useful if your platform does not support
800 * standards like the /dev/urandom or Windows CryptoAPI.
801 *
802 * Uncomment this macro to disable the built-in platform entropy functions.
803 */
804 //#define MBEDTLS_NO_PLATFORM_ENTROPY
805
806 /**
807 * \def MBEDTLS_ENTROPY_FORCE_SHA256
808 *
809 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
810 * default SHA-512 based one (if both are available).
811 *
812 * Requires: MBEDTLS_SHA256_C
813 *
814 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
815 * if you have performance concerns.
816 *
817 * This option is only useful if both MBEDTLS_SHA256_C and
818 * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
819 */
820 #define MBEDTLS_ENTROPY_FORCE_SHA256 /* swyter: ReactOS is primarily 32-bit only, this speeds it up notably */
821
822 /**
823 * \def MBEDTLS_ENTROPY_NV_SEED
824 *
825 * Enable the non-volatile (NV) seed file-based entropy source.
826 * (Also enables the NV seed read/write functions in the platform layer)
827 *
828 * This is crucial (if not required) on systems that do not have a
829 * cryptographic entropy source (in hardware or kernel) available.
830 *
831 * Requires: MBEDTLS_ENTROPY_C, MBEDTLS_PLATFORM_C
832 *
833 * \note The read/write functions that are used by the entropy source are
834 * determined in the platform layer, and can be modified at runtime and/or
835 * compile-time depending on the flags (MBEDTLS_PLATFORM_NV_SEED_*) used.
836 *
837 * \note If you use the default implementation functions that read a seedfile
838 * with regular fopen(), please make sure you make a seedfile with the
839 * proper name (defined in MBEDTLS_PLATFORM_STD_NV_SEED_FILE) and at
840 * least MBEDTLS_ENTROPY_BLOCK_SIZE bytes in size that can be read from
841 * and written to or you will get an entropy source error! The default
842 * implementation will only use the first MBEDTLS_ENTROPY_BLOCK_SIZE
843 * bytes from the file.
844 *
845 * \note The entropy collector will write to the seed file before entropy is
846 * given to an external source, to update it.
847 */
848 //#define MBEDTLS_ENTROPY_NV_SEED
849
850 /**
851 * \def MBEDTLS_MEMORY_DEBUG
852 *
853 * Enable debugging of buffer allocator memory issues. Automatically prints
854 * (to stderr) all (fatal) messages on memory allocation issues. Enables
855 * function for 'debug output' of allocated memory.
856 *
857 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
858 *
859 * Uncomment this macro to let the buffer allocator print out error messages.
860 */
861 //#define MBEDTLS_MEMORY_DEBUG
862
863 /**
864 * \def MBEDTLS_MEMORY_BACKTRACE
865 *
866 * Include backtrace information with each allocated block.
867 *
868 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
869 * GLIBC-compatible backtrace() an backtrace_symbols() support
870 *
871 * Uncomment this macro to include backtrace information
872 */
873 //#define MBEDTLS_MEMORY_BACKTRACE
874
875 /**
876 * \def MBEDTLS_PK_RSA_ALT_SUPPORT
877 *
878 * Support external private RSA keys (eg from a HSM) in the PK layer.
879 *
880 * Comment this macro to disable support for external private RSA keys.
881 */
882 #define MBEDTLS_PK_RSA_ALT_SUPPORT
883
884 /**
885 * \def MBEDTLS_PKCS1_V15
886 *
887 * Enable support for PKCS#1 v1.5 encoding.
888 *
889 * Requires: MBEDTLS_RSA_C
890 *
891 * This enables support for PKCS#1 v1.5 operations.
892 */
893 #define MBEDTLS_PKCS1_V15
894
895 /**
896 * \def MBEDTLS_PKCS1_V21
897 *
898 * Enable support for PKCS#1 v2.1 encoding.
899 *
900 * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C
901 *
902 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
903 */
904 #define MBEDTLS_PKCS1_V21
905
906 /**
907 * \def MBEDTLS_RSA_NO_CRT
908 *
909 * Do not use the Chinese Remainder Theorem for the RSA private operation.
910 *
911 * Uncomment this macro to disable the use of CRT in RSA.
912 *
913 */
914 //#define MBEDTLS_RSA_NO_CRT
915
916 /**
917 * \def MBEDTLS_SELF_TEST
918 *
919 * Enable the checkup functions (*_self_test).
920 */
921 //#define MBEDTLS_SELF_TEST /* swyter: we don't need this, adds quite a bit of bloat */
922
923 /**
924 * \def MBEDTLS_SHA256_SMALLER
925 *
926 * Enable an implementation of SHA-256 that has lower ROM footprint but also
927 * lower performance.
928 *
929 * The default implementation is meant to be a reasonnable compromise between
930 * performance and size. This version optimizes more aggressively for size at
931 * the expense of performance. Eg on Cortex-M4 it reduces the size of
932 * mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of about
933 * 30%.
934 *
935 * Uncomment to enable the smaller implementation of SHA256.
936 */
937 //#define MBEDTLS_SHA256_SMALLER
938
939 /**
940 * \def MBEDTLS_SSL_AEAD_RANDOM_IV
941 *
942 * Generate a random IV rather than using the record sequence number as a
943 * nonce for ciphersuites using and AEAD algorithm (GCM or CCM).
944 *
945 * Using the sequence number is generally recommended.
946 *
947 * Uncomment this macro to always use random IVs with AEAD ciphersuites.
948 */
949 //#define MBEDTLS_SSL_AEAD_RANDOM_IV
950
951 /**
952 * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
953 *
954 * Enable sending of alert messages in case of encountered errors as per RFC.
955 * If you choose not to send the alert messages, mbed TLS can still communicate
956 * with other servers, only debugging of failures is harder.
957 *
958 * The advantage of not sending alert messages, is that no information is given
959 * about reasons for failures thus preventing adversaries of gaining intel.
960 *
961 * Enable sending of all alert messages
962 */
963 #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
964
965 /**
966 * \def MBEDTLS_SSL_DEBUG_ALL
967 *
968 * Enable the debug messages in SSL module for all issues.
969 * Debug messages have been disabled in some places to prevent timing
970 * attacks due to (unbalanced) debugging function calls.
971 *
972 * If you need all error reporting you should enable this during debugging,
973 * but remove this for production servers that should log as well.
974 *
975 * Uncomment this macro to report all debug messages on errors introducing
976 * a timing side-channel.
977 *
978 */
979 //#define MBEDTLS_SSL_DEBUG_ALL /* swyter: we don't need that much verboseness that clogges up the dll with strings */
980
981 /** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
982 *
983 * Enable support for Encrypt-then-MAC, RFC 7366.
984 *
985 * This allows peers that both support it to use a more robust protection for
986 * ciphersuites using CBC, providing deep resistance against timing attacks
987 * on the padding or underlying cipher.
988 *
989 * This only affects CBC ciphersuites, and is useless if none is defined.
990 *
991 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
992 * MBEDTLS_SSL_PROTO_TLS1_1 or
993 * MBEDTLS_SSL_PROTO_TLS1_2
994 *
995 * Comment this macro to disable support for Encrypt-then-MAC
996 */
997 #define MBEDTLS_SSL_ENCRYPT_THEN_MAC
998
999 /** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
1000 *
1001 * Enable support for Extended Master Secret, aka Session Hash
1002 * (draft-ietf-tls-session-hash-02).
1003 *
1004 * This was introduced as "the proper fix" to the Triple Handshake familiy of
1005 * attacks, but it is recommended to always use it (even if you disable
1006 * renegotiation), since it actually fixes a more fundamental issue in the
1007 * original SSL/TLS design, and has implications beyond Triple Handshake.
1008 *
1009 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
1010 * MBEDTLS_SSL_PROTO_TLS1_1 or
1011 * MBEDTLS_SSL_PROTO_TLS1_2
1012 *
1013 * Comment this macro to disable support for Extended Master Secret.
1014 */
1015 #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
1016
1017 /**
1018 * \def MBEDTLS_SSL_FALLBACK_SCSV
1019 *
1020 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
1021 *
1022 * For servers, it is recommended to always enable this, unless you support
1023 * only one version of TLS, or know for sure that none of your clients
1024 * implements a fallback strategy.
1025 *
1026 * For clients, you only need this if you're using a fallback strategy, which
1027 * is not recommended in the first place, unless you absolutely need it to
1028 * interoperate with buggy (version-intolerant) servers.
1029 *
1030 * Comment this macro to disable support for FALLBACK_SCSV
1031 */
1032 //#define MBEDTLS_SSL_FALLBACK_SCSV /* swyter: as the description says, we don't need this for clients */
1033
1034 /**
1035 * \def MBEDTLS_SSL_HW_RECORD_ACCEL
1036 *
1037 * Enable hooking functions in SSL module for hardware acceleration of
1038 * individual records.
1039 *
1040 * Uncomment this macro to enable hooking functions.
1041 */
1042 //#define MBEDTLS_SSL_HW_RECORD_ACCEL
1043
1044 /**
1045 * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING
1046 *
1047 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
1048 *
1049 * This is a countermeasure to the BEAST attack, which also minimizes the risk
1050 * of interoperability issues compared to sending 0-length records.
1051 *
1052 * Comment this macro to disable 1/n-1 record splitting.
1053 */
1054 #define MBEDTLS_SSL_CBC_RECORD_SPLITTING
1055
1056 /**
1057 * \def MBEDTLS_SSL_RENEGOTIATION
1058 *
1059 * Disable support for TLS renegotiation.
1060 *
1061 * The two main uses of renegotiation are (1) refresh keys on long-lived
1062 * connections and (2) client authentication after the initial handshake.
1063 * If you don't need renegotiation, it's probably better to disable it, since
1064 * it has been associated with security issues in the past and is easy to
1065 * misuse/misunderstand.
1066 *
1067 * Comment this to disable support for renegotiation.
1068 */
1069 #define MBEDTLS_SSL_RENEGOTIATION
1070
1071 /**
1072 * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
1073 *
1074 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
1075 * SSL Server module (MBEDTLS_SSL_SRV_C).
1076 *
1077 * Uncomment this macro to enable support for SSLv2 Client Hello messages.
1078 */
1079 //#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO /* swyter: we don't need anything server-related */
1080
1081 /**
1082 * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
1083 *
1084 * Pick the ciphersuite according to the client's preferences rather than ours
1085 * in the SSL Server module (MBEDTLS_SSL_SRV_C).
1086 *
1087 * Uncomment this macro to respect client's ciphersuite order
1088 */
1089 //#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE /* swyter: we don't need anything server-related */
1090
1091 /**
1092 * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1093 *
1094 * Enable support for RFC 6066 max_fragment_length extension in SSL.
1095 *
1096 * Comment this macro to disable support for the max_fragment_length extension
1097 */
1098 #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1099
1100 /**
1101 * \def MBEDTLS_SSL_PROTO_SSL3
1102 *
1103 * Enable support for SSL 3.0.
1104 *
1105 * Requires: MBEDTLS_MD5_C
1106 * MBEDTLS_SHA1_C
1107 *
1108 * Comment this macro to disable support for SSL 3.0
1109 */
1110 //#define MBEDTLS_SSL_PROTO_SSL3 /* swyter: this is potentially insecure and should remain ethernaly disabled */
1111
1112 /**
1113 * \def MBEDTLS_SSL_PROTO_TLS1
1114 *
1115 * Enable support for TLS 1.0.
1116 *
1117 * Requires: MBEDTLS_MD5_C
1118 * MBEDTLS_SHA1_C
1119 *
1120 * Comment this macro to disable support for TLS 1.0
1121 */
1122 #define MBEDTLS_SSL_PROTO_TLS1
1123
1124 /**
1125 * \def MBEDTLS_SSL_PROTO_TLS1_1
1126 *
1127 * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
1128 *
1129 * Requires: MBEDTLS_MD5_C
1130 * MBEDTLS_SHA1_C
1131 *
1132 * Comment this macro to disable support for TLS 1.1 / DTLS 1.0
1133 */
1134 #define MBEDTLS_SSL_PROTO_TLS1_1
1135
1136 /**
1137 * \def MBEDTLS_SSL_PROTO_TLS1_2
1138 *
1139 * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
1140 *
1141 * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C
1142 * (Depends on ciphersuites)
1143 *
1144 * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
1145 */
1146 #define MBEDTLS_SSL_PROTO_TLS1_2
1147
1148 /**
1149 * \def MBEDTLS_SSL_PROTO_DTLS
1150 *
1151 * Enable support for DTLS (all available versions).
1152 *
1153 * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0,
1154 * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
1155 *
1156 * Requires: MBEDTLS_SSL_PROTO_TLS1_1
1157 * or MBEDTLS_SSL_PROTO_TLS1_2
1158 *
1159 * Comment this macro to disable support for DTLS
1160 */
1161 //#define MBEDTLS_SSL_PROTO_DTLS /* swyter: schannel does not support UDP sockets, DTLS is useless */
1162
1163 /**
1164 * \def MBEDTLS_SSL_ALPN
1165 *
1166 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
1167 *
1168 * Comment this macro to disable support for ALPN.
1169 */
1170 #define MBEDTLS_SSL_ALPN
1171
1172 /**
1173 * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
1174 *
1175 * Enable support for the anti-replay mechanism in DTLS.
1176 *
1177 * Requires: MBEDTLS_SSL_TLS_C
1178 * MBEDTLS_SSL_PROTO_DTLS
1179 *
1180 * \warning Disabling this is often a security risk!
1181 * See mbedtls_ssl_conf_dtls_anti_replay() for details.
1182 *
1183 * Comment this to disable anti-replay in DTLS.
1184 */
1185 //#define MBEDTLS_SSL_DTLS_ANTI_REPLAY /* swyter: schannel does not support UDP sockets, DTLS is useless */
1186
1187 /**
1188 * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
1189 *
1190 * Enable support for HelloVerifyRequest on DTLS servers.
1191 *
1192 * This feature is highly recommended to prevent DTLS servers being used as
1193 * amplifiers in DoS attacks against other hosts. It should always be enabled
1194 * unless you know for sure amplification cannot be a problem in the
1195 * environment in which your server operates.
1196 *
1197 * \warning Disabling this can ba a security risk! (see above)
1198 *
1199 * Requires: MBEDTLS_SSL_PROTO_DTLS
1200 *
1201 * Comment this to disable support for HelloVerifyRequest.
1202 */
1203 //#define MBEDTLS_SSL_DTLS_HELLO_VERIFY /* swyter: schannel does not support UDP sockets, DTLS is useless */
1204
1205 /**
1206 * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
1207 *
1208 * Enable server-side support for clients that reconnect from the same port.
1209 *
1210 * Some clients unexpectedly close the connection and try to reconnect using the
1211 * same source port. This needs special support from the server to handle the
1212 * new connection securely, as described in section 4.2.8 of RFC 6347. This
1213 * flag enables that support.
1214 *
1215 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
1216 *
1217 * Comment this to disable support for clients reusing the source port.
1218 */
1219 //#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE /* swyter: schannel does not support UDP sockets, DTLS is useless */
1220
1221 /**
1222 * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
1223 *
1224 * Enable support for a limit of records with bad MAC.
1225 *
1226 * See mbedtls_ssl_conf_dtls_badmac_limit().
1227 *
1228 * Requires: MBEDTLS_SSL_PROTO_DTLS
1229 */
1230 //#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT /* swyter: schannel does not support UDP sockets, DTLS is useless */
1231
1232 /**
1233 * \def MBEDTLS_SSL_SESSION_TICKETS
1234 *
1235 * Enable support for RFC 5077 session tickets in SSL.
1236 * Client-side, provides full support for session tickets (maintainance of a
1237 * session store remains the responsibility of the application, though).
1238 * Server-side, you also need to provide callbacks for writing and parsing
1239 * tickets, including authenticated encryption and key management. Example
1240 * callbacks are provided by MBEDTLS_SSL_TICKET_C.
1241 *
1242 * Comment this macro to disable support for SSL session tickets
1243 */
1244 #define MBEDTLS_SSL_SESSION_TICKETS
1245
1246 /**
1247 * \def MBEDTLS_SSL_EXPORT_KEYS
1248 *
1249 * Enable support for exporting key block and master secret.
1250 * This is required for certain users of TLS, e.g. EAP-TLS.
1251 *
1252 * Comment this macro to disable support for key export
1253 */
1254 //#define MBEDTLS_SSL_EXPORT_KEYS
1255
1256 /**
1257 * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
1258 *
1259 * Enable support for RFC 6066 server name indication (SNI) in SSL.
1260 *
1261 * Requires: MBEDTLS_X509_CRT_PARSE_C
1262 *
1263 * Comment this macro to disable support for server name indication in SSL
1264 */
1265 #define MBEDTLS_SSL_SERVER_NAME_INDICATION
1266
1267 /**
1268 * \def MBEDTLS_SSL_TRUNCATED_HMAC
1269 *
1270 * Enable support for RFC 6066 truncated HMAC in SSL.
1271 *
1272 * Comment this macro to disable support for truncated HMAC in SSL
1273 */
1274 #define MBEDTLS_SSL_TRUNCATED_HMAC
1275
1276 /**
1277 * \def MBEDTLS_THREADING_ALT
1278 *
1279 * Provide your own alternate threading implementation.
1280 *
1281 * Requires: MBEDTLS_THREADING_C
1282 *
1283 * Uncomment this to allow your own alternate threading implementation.
1284 */
1285 //#define MBEDTLS_THREADING_ALT
1286
1287 /**
1288 * \def MBEDTLS_THREADING_PTHREAD
1289 *
1290 * Enable the pthread wrapper layer for the threading layer.
1291 *
1292 * Requires: MBEDTLS_THREADING_C
1293 *
1294 * Uncomment this to enable pthread mutexes.
1295 */
1296 //#define MBEDTLS_THREADING_PTHREAD
1297
1298 /**
1299 * \def MBEDTLS_VERSION_FEATURES
1300 *
1301 * Allow run-time checking of compile-time enabled features. Thus allowing users
1302 * to check at run-time if the library is for instance compiled with threading
1303 * support via mbedtls_version_check_feature().
1304 *
1305 * Requires: MBEDTLS_VERSION_C
1306 *
1307 * Comment this to disable run-time checking and save ROM space
1308 */
1309 //#define MBEDTLS_VERSION_FEATURES
1310
1311 /**
1312 * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
1313 *
1314 * If set, the X509 parser will not break-off when parsing an X509 certificate
1315 * and encountering an extension in a v1 or v2 certificate.
1316 *
1317 * Uncomment to prevent an error.
1318 */
1319 //#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
1320
1321 /**
1322 * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1323 *
1324 * If set, the X509 parser will not break-off when parsing an X509 certificate
1325 * and encountering an unknown critical extension.
1326 *
1327 * \warning Depending on your PKI use, enabling this can be a security risk!
1328 *
1329 * Uncomment to prevent an error.
1330 */
1331 //#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1332
1333 /**
1334 * \def MBEDTLS_X509_CHECK_KEY_USAGE
1335 *
1336 * Enable verification of the keyUsage extension (CA and leaf certificates).
1337 *
1338 * Disabling this avoids problems with mis-issued and/or misused
1339 * (intermediate) CA and leaf certificates.
1340 *
1341 * \warning Depending on your PKI use, disabling this can be a security risk!
1342 *
1343 * Comment to skip keyUsage checking for both CA and leaf certificates.
1344 */
1345 #define MBEDTLS_X509_CHECK_KEY_USAGE
1346
1347 /**
1348 * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
1349 *
1350 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1351 *
1352 * Disabling this avoids problems with mis-issued and/or misused certificates.
1353 *
1354 * \warning Depending on your PKI use, disabling this can be a security risk!
1355 *
1356 * Comment to skip extendedKeyUsage checking for certificates.
1357 */
1358 #define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
1359
1360 /**
1361 * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
1362 *
1363 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1364 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1365 *
1366 * Comment this macro to disallow using RSASSA-PSS in certificates.
1367 */
1368 #define MBEDTLS_X509_RSASSA_PSS_SUPPORT
1369
1370 /**
1371 * \def MBEDTLS_ZLIB_SUPPORT
1372 *
1373 * If set, the SSL/TLS module uses ZLIB to support compression and
1374 * decompression of packet data.
1375 *
1376 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1377 * CRIME attack. Before enabling this option, you should examine with care if
1378 * CRIME or similar exploits may be a applicable to your use case.
1379 *
1380 * \note Currently compression can't be used with DTLS.
1381 *
1382 * Used in: library/ssl_tls.c
1383 * library/ssl_cli.c
1384 * library/ssl_srv.c
1385 *
1386 * This feature requires zlib library and headers to be present.
1387 *
1388 * Uncomment to enable use of ZLIB
1389 */
1390 //#define MBEDTLS_ZLIB_SUPPORT
1391 /* \} name SECTION: mbed TLS feature support */
1392
1393 /**
1394 * \name SECTION: mbed TLS modules
1395 *
1396 * This section enables or disables entire modules in mbed TLS
1397 * \{
1398 */
1399
1400 /**
1401 * \def MBEDTLS_AESNI_C
1402 *
1403 * Enable AES-NI support on x86-64.
1404 *
1405 * Module: library/aesni.c
1406 * Caller: library/aes.c
1407 *
1408 * Requires: MBEDTLS_HAVE_ASM
1409 *
1410 * This modules adds support for the AES-NI instructions on x86-64
1411 */
1412 #define MBEDTLS_AESNI_C /* swyter: looks like these AMD64 improvements are behind an arch macro, better perf is always good */
1413
1414 /**
1415 * \def MBEDTLS_AES_C
1416 *
1417 * Enable the AES block cipher.
1418 *
1419 * Module: library/aes.c
1420 * Caller: library/ssl_tls.c
1421 * library/pem.c
1422 * library/ctr_drbg.c
1423 *
1424 * This module enables the following ciphersuites (if other requisites are
1425 * enabled as well):
1426 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1427 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1428 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1429 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1430 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1431 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1432 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1433 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1434 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1435 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1436 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1437 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
1438 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1439 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1440 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1441 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1442 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
1443 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
1444 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
1445 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
1446 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1447 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1448 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1449 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1450 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1451 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1452 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1453 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1454 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1455 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1456 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1457 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1458 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1459 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1460 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1461 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1462 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1463 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1464 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1465 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1466 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
1467 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
1468 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
1469 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
1470 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
1471 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
1472 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1473 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1474 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1475 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1476 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1477 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1478 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
1479 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
1480 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
1481 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
1482 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
1483 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
1484 *
1485 * PEM_PARSE uses AES for decrypting encrypted keys.
1486 */
1487 #define MBEDTLS_AES_C
1488
1489 /**
1490 * \def MBEDTLS_ARC4_C
1491 *
1492 * Enable the ARCFOUR stream cipher.
1493 *
1494 * Module: library/arc4.c
1495 * Caller: library/ssl_tls.c
1496 *
1497 * This module enables the following ciphersuites (if other requisites are
1498 * enabled as well):
1499 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1500 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
1501 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
1502 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
1503 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
1504 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
1505 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
1506 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
1507 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
1508 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
1509 */
1510 #define MBEDTLS_ARC4_C
1511
1512 /**
1513 * \def MBEDTLS_ASN1_PARSE_C
1514 *
1515 * Enable the generic ASN1 parser.
1516 *
1517 * Module: library/asn1.c
1518 * Caller: library/x509.c
1519 * library/dhm.c
1520 * library/pkcs12.c
1521 * library/pkcs5.c
1522 * library/pkparse.c
1523 */
1524 #define MBEDTLS_ASN1_PARSE_C
1525
1526 /**
1527 * \def MBEDTLS_ASN1_WRITE_C
1528 *
1529 * Enable the generic ASN1 writer.
1530 *
1531 * Module: library/asn1write.c
1532 * Caller: library/ecdsa.c
1533 * library/pkwrite.c
1534 * library/x509_create.c
1535 * library/x509write_crt.c
1536 * library/mbedtls_x509write_csr.c
1537 */
1538 #define MBEDTLS_ASN1_WRITE_C
1539
1540 /**
1541 * \def MBEDTLS_BASE64_C
1542 *
1543 * Enable the Base64 module.
1544 *
1545 * Module: library/base64.c
1546 * Caller: library/pem.c
1547 *
1548 * This module is required for PEM support (required by X.509).
1549 */
1550 //#define MBEDTLS_BASE64_C
1551
1552 /**
1553 * \def MBEDTLS_BIGNUM_C
1554 *
1555 * Enable the multi-precision integer library.
1556 *
1557 * Module: library/bignum.c
1558 * Caller: library/dhm.c
1559 * library/ecp.c
1560 * library/ecdsa.c
1561 * library/rsa.c
1562 * library/ssl_tls.c
1563 *
1564 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
1565 */
1566 #define MBEDTLS_BIGNUM_C
1567
1568 /**
1569 * \def MBEDTLS_BLOWFISH_C
1570 *
1571 * Enable the Blowfish block cipher.
1572 *
1573 * Module: library/blowfish.c
1574 */
1575 #define MBEDTLS_BLOWFISH_C
1576
1577 /**
1578 * \def MBEDTLS_CAMELLIA_C
1579 *
1580 * Enable the Camellia block cipher.
1581 *
1582 * Module: library/camellia.c
1583 * Caller: library/ssl_tls.c
1584 *
1585 * This module enables the following ciphersuites (if other requisites are
1586 * enabled as well):
1587 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1588 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1589 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1590 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1591 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1592 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1593 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1594 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
1595 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1596 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1597 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1598 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1599 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
1600 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
1601 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1602 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1603 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1604 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1605 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1606 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1607 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1608 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1609 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1610 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1611 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1612 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1613 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1614 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1615 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1616 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1617 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1618 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1619 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1620 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1621 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1622 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1623 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1624 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1625 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1626 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1627 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1628 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
1629 */
1630 #define MBEDTLS_CAMELLIA_C
1631
1632 /**
1633 * \def MBEDTLS_CCM_C
1634 *
1635 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1636 *
1637 * Module: library/ccm.c
1638 *
1639 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
1640 *
1641 * This module enables the AES-CCM ciphersuites, if other requisites are
1642 * enabled as well.
1643 */
1644 #define MBEDTLS_CCM_C
1645
1646 /**
1647 * \def MBEDTLS_CERTS_C
1648 *
1649 * Enable the test certificates.
1650 *
1651 * Module: library/certs.c
1652 * Caller:
1653 *
1654 * This module is used for testing (ssl_client/server).
1655 */
1656 //#define MBEDTLS_CERTS_C /* swyter: these test certs are completely useless */
1657
1658 /**
1659 * \def MBEDTLS_CIPHER_C
1660 *
1661 * Enable the generic cipher layer.
1662 *
1663 * Module: library/cipher.c
1664 * Caller: library/ssl_tls.c
1665 *
1666 * Uncomment to enable generic cipher wrappers.
1667 */
1668 #define MBEDTLS_CIPHER_C
1669
1670 /**
1671 * \def MBEDTLS_CTR_DRBG_C
1672 *
1673 * Enable the CTR_DRBG AES-256-based random generator.
1674 *
1675 * Module: library/ctr_drbg.c
1676 * Caller:
1677 *
1678 * Requires: MBEDTLS_AES_C
1679 *
1680 * This module provides the CTR_DRBG AES-256 random number generator.
1681 */
1682 #define MBEDTLS_CTR_DRBG_C
1683
1684 /**
1685 * \def MBEDTLS_DEBUG_C
1686 *
1687 * Enable the debug functions.
1688 *
1689 * Module: library/debug.c
1690 * Caller: library/ssl_cli.c
1691 * library/ssl_srv.c
1692 * library/ssl_tls.c
1693 *
1694 * This module provides debugging functions.
1695 */
1696 #if DBG & 0
1697 #define MBEDTLS_DEBUG_C /* swyter: we don't even need this level of verboseness, useful only when developing */
1698 #endif
1699
1700 /**
1701 * \def MBEDTLS_DES_C
1702 *
1703 * Enable the DES block cipher.
1704 *
1705 * Module: library/des.c
1706 * Caller: library/pem.c
1707 * library/ssl_tls.c
1708 *
1709 * This module enables the following ciphersuites (if other requisites are
1710 * enabled as well):
1711 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1712 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
1713 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
1714 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1715 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1716 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1717 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1718 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
1719 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
1720 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
1721 *
1722 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
1723 */
1724 #define MBEDTLS_DES_C
1725
1726 /**
1727 * \def MBEDTLS_DHM_C
1728 *
1729 * Enable the Diffie-Hellman-Merkle module.
1730 *
1731 * Module: library/dhm.c
1732 * Caller: library/ssl_cli.c
1733 * library/ssl_srv.c
1734 *
1735 * This module is used by the following key exchanges:
1736 * DHE-RSA, DHE-PSK
1737 */
1738 #define MBEDTLS_DHM_C
1739
1740 /**
1741 * \def MBEDTLS_ECDH_C
1742 *
1743 * Enable the elliptic curve Diffie-Hellman library.
1744 *
1745 * Module: library/ecdh.c
1746 * Caller: library/ssl_cli.c
1747 * library/ssl_srv.c
1748 *
1749 * This module is used by the following key exchanges:
1750 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
1751 *
1752 * Requires: MBEDTLS_ECP_C
1753 */
1754 #define MBEDTLS_ECDH_C
1755
1756 /**
1757 * \def MBEDTLS_ECDSA_C
1758 *
1759 * Enable the elliptic curve DSA library.
1760 *
1761 * Module: library/ecdsa.c
1762 * Caller:
1763 *
1764 * This module is used by the following key exchanges:
1765 * ECDHE-ECDSA
1766 *
1767 * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
1768 */
1769 #define MBEDTLS_ECDSA_C
1770
1771 /**
1772 * \def MBEDTLS_ECJPAKE_C
1773 *
1774 * Enable the elliptic curve J-PAKE library.
1775 *
1776 * \warning This is currently experimental. EC J-PAKE support is based on the
1777 * Thread v1.0.0 specification; incompatible changes to the specification
1778 * might still happen. For this reason, this is disabled by default.
1779 *
1780 * Module: library/ecjpake.c
1781 * Caller:
1782 *
1783 * This module is used by the following key exchanges:
1784 * ECJPAKE
1785 *
1786 * Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C
1787 */
1788 //#define MBEDTLS_ECJPAKE_C
1789
1790 /**
1791 * \def MBEDTLS_ECP_C
1792 *
1793 * Enable the elliptic curve over GF(p) library.
1794 *
1795 * Module: library/ecp.c
1796 * Caller: library/ecdh.c
1797 * library/ecdsa.c
1798 * library/ecjpake.c
1799 *
1800 * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
1801 */
1802 #define MBEDTLS_ECP_C
1803
1804 /**
1805 * \def MBEDTLS_ENTROPY_C
1806 *
1807 * Enable the platform-specific entropy code.
1808 *
1809 * Module: library/entropy.c
1810 * Caller:
1811 *
1812 * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
1813 *
1814 * This module provides a generic entropy pool
1815 */
1816 #define MBEDTLS_ENTROPY_C
1817
1818 /**
1819 * \def MBEDTLS_ERROR_C
1820 *
1821 * Enable error code to error string conversion.
1822 *
1823 * Module: library/error.c
1824 * Caller:
1825 *
1826 * This module enables mbedtls_strerror().
1827 */
1828 //#define MBEDTLS_ERROR_C /* swyter: we don't print user errors, so this trims some fat */
1829
1830 /**
1831 * \def MBEDTLS_GCM_C
1832 *
1833 * Enable the Galois/Counter Mode (GCM) for AES.
1834 *
1835 * Module: library/gcm.c
1836 *
1837 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
1838 *
1839 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1840 * requisites are enabled as well.
1841 */
1842 #define MBEDTLS_GCM_C
1843
1844 /**
1845 * \def MBEDTLS_HAVEGE_C
1846 *
1847 * Enable the HAVEGE random generator.
1848 *
1849 * Warning: the HAVEGE random generator is not suitable for virtualized
1850 * environments
1851 *
1852 * Warning: the HAVEGE random generator is dependent on timing and specific
1853 * processor traits. It is therefore not advised to use HAVEGE as
1854 * your applications primary random generator or primary entropy pool
1855 * input. As a secondary input to your entropy pool, it IS able add
1856 * the (limited) extra entropy it provides.
1857 *
1858 * Module: library/havege.c
1859 * Caller:
1860 *
1861 * Requires: MBEDTLS_TIMING_C
1862 *
1863 * Uncomment to enable the HAVEGE random generator.
1864 */
1865 //#define MBEDTLS_HAVEGE_C
1866
1867 /**
1868 * \def MBEDTLS_HMAC_DRBG_C
1869 *
1870 * Enable the HMAC_DRBG random generator.
1871 *
1872 * Module: library/hmac_drbg.c
1873 * Caller:
1874 *
1875 * Requires: MBEDTLS_MD_C
1876 *
1877 * Uncomment to enable the HMAC_DRBG random number geerator.
1878 */
1879 #define MBEDTLS_HMAC_DRBG_C
1880
1881 /**
1882 * \def MBEDTLS_MD_C
1883 *
1884 * Enable the generic message digest layer.
1885 *
1886 * Module: library/mbedtls_md.c
1887 * Caller:
1888 *
1889 * Uncomment to enable generic message digest wrappers.
1890 */
1891 #define MBEDTLS_MD_C
1892
1893 /**
1894 * \def MBEDTLS_MD2_C
1895 *
1896 * Enable the MD2 hash algorithm.
1897 *
1898 * Module: library/mbedtls_md2.c
1899 * Caller:
1900 *
1901 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1902 */
1903 //#define MBEDTLS_MD2_C
1904
1905 /**
1906 * \def MBEDTLS_MD4_C
1907 *
1908 * Enable the MD4 hash algorithm.
1909 *
1910 * Module: library/mbedtls_md4.c
1911 * Caller:
1912 *
1913 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1914 */
1915 //#define MBEDTLS_MD4_C
1916
1917 /**
1918 * \def MBEDTLS_MD5_C
1919 *
1920 * Enable the MD5 hash algorithm.
1921 *
1922 * Module: library/mbedtls_md5.c
1923 * Caller: library/mbedtls_md.c
1924 * library/pem.c
1925 * library/ssl_tls.c
1926 *
1927 * This module is required for SSL/TLS and X.509.
1928 * PEM_PARSE uses MD5 for decrypting encrypted keys.
1929 */
1930 #define MBEDTLS_MD5_C
1931
1932 /**
1933 * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
1934 *
1935 * Enable the buffer allocator implementation that makes use of a (stack)
1936 * based buffer to 'allocate' dynamic memory. (replaces calloc() and free()
1937 * calls)
1938 *
1939 * Module: library/memory_buffer_alloc.c
1940 *
1941 * Requires: MBEDTLS_PLATFORM_C
1942 * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
1943 *
1944 * Enable this module to enable the buffer memory allocator.
1945 */
1946 //#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
1947
1948 /**
1949 * \def MBEDTLS_NET_C
1950 *
1951 * Enable the TCP and UDP over IPv6/IPv4 networking routines.
1952 *
1953 * \note This module only works on POSIX/Unix (including Linux, BSD and OS X)
1954 * and Windows. For other platforms, you'll want to disable it, and write your
1955 * own networking callbacks to be passed to \c mbedtls_ssl_set_bio().
1956 *
1957 * \note See also our Knowledge Base article about porting to a new
1958 * environment:
1959 * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
1960 *
1961 * Module: library/net.c
1962 *
1963 * This module provides networking routines.
1964 */
1965 //#define MBEDTLS_NET_C /* swyter: we don't use the network routines, in fact in schannel we replace them with our own shim to forward the managed network buffers */
1966
1967 /**
1968 * \def MBEDTLS_OID_C
1969 *
1970 * Enable the OID database.
1971 *
1972 * Module: library/oid.c
1973 * Caller: library/asn1write.c
1974 * library/pkcs5.c
1975 * library/pkparse.c
1976 * library/pkwrite.c
1977 * library/rsa.c
1978 * library/x509.c
1979 * library/x509_create.c
1980 * library/mbedtls_x509_crl.c
1981 * library/mbedtls_x509_crt.c
1982 * library/mbedtls_x509_csr.c
1983 * library/x509write_crt.c
1984 * library/mbedtls_x509write_csr.c
1985 *
1986 * This modules translates between OIDs and internal values.
1987 */
1988 #define MBEDTLS_OID_C
1989
1990 /**
1991 * \def MBEDTLS_PADLOCK_C
1992 *
1993 * Enable VIA Padlock support on x86.
1994 *
1995 * Module: library/padlock.c
1996 * Caller: library/aes.c
1997 *
1998 * Requires: MBEDTLS_HAVE_ASM
1999 *
2000 * This modules adds support for the VIA PadLock on x86.
2001 */
2002 #define MBEDTLS_PADLOCK_C
2003
2004 /**
2005 * \def MBEDTLS_PEM_PARSE_C
2006 *
2007 * Enable PEM decoding / parsing.
2008 *
2009 * Module: library/pem.c
2010 * Caller: library/dhm.c
2011 * library/pkparse.c
2012 * library/mbedtls_x509_crl.c
2013 * library/mbedtls_x509_crt.c
2014 * library/mbedtls_x509_csr.c
2015 *
2016 * Requires: MBEDTLS_BASE64_C
2017 *
2018 * This modules adds support for decoding / parsing PEM files.
2019 */
2020 //#define MBEDTLS_PEM_PARSE_C /* swyter: we don't do any PEM decoding */
2021
2022 /**
2023 * \def MBEDTLS_PEM_WRITE_C
2024 *
2025 * Enable PEM encoding / writing.
2026 *
2027 * Module: library/pem.c
2028 * Caller: library/pkwrite.c
2029 * library/x509write_crt.c
2030 * library/mbedtls_x509write_csr.c
2031 *
2032 * Requires: MBEDTLS_BASE64_C
2033 *
2034 * This modules adds support for encoding / writing PEM files.
2035 */
2036 //#define MBEDTLS_PEM_WRITE_C /* swyter: we don't do any PEM decoding */
2037
2038 /**
2039 * \def MBEDTLS_PK_C
2040 *
2041 * Enable the generic public (asymetric) key layer.
2042 *
2043 * Module: library/pk.c
2044 * Caller: library/ssl_tls.c
2045 * library/ssl_cli.c
2046 * library/ssl_srv.c
2047 *
2048 * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
2049 *
2050 * Uncomment to enable generic public key wrappers.
2051 */
2052 #define MBEDTLS_PK_C
2053
2054 /**
2055 * \def MBEDTLS_PK_PARSE_C
2056 *
2057 * Enable the generic public (asymetric) key parser.
2058 *
2059 * Module: library/pkparse.c
2060 * Caller: library/mbedtls_x509_crt.c
2061 * library/mbedtls_x509_csr.c
2062 *
2063 * Requires: MBEDTLS_PK_C
2064 *
2065 * Uncomment to enable generic public key parse functions.
2066 */
2067 #define MBEDTLS_PK_PARSE_C
2068
2069 /**
2070 * \def MBEDTLS_PK_WRITE_C
2071 *
2072 * Enable the generic public (asymetric) key writer.
2073 *
2074 * Module: library/pkwrite.c
2075 * Caller: library/x509write.c
2076 *
2077 * Requires: MBEDTLS_PK_C
2078 *
2079 * Uncomment to enable generic public key write functions.
2080 */
2081 //#define MBEDTLS_PK_WRITE_C /* swyter: we don't write any PK */
2082
2083 /**
2084 * \def MBEDTLS_PKCS5_C
2085 *
2086 * Enable PKCS#5 functions.
2087 *
2088 * Module: library/pkcs5.c
2089 *
2090 * Requires: MBEDTLS_MD_C
2091 *
2092 * This module adds support for the PKCS#5 functions.
2093 */
2094 #define MBEDTLS_PKCS5_C
2095
2096 /**
2097 * \def MBEDTLS_PKCS11_C
2098 *
2099 * Enable wrapper for PKCS#11 smartcard support.
2100 *
2101 * Module: library/pkcs11.c
2102 * Caller: library/pk.c
2103 *
2104 * Requires: MBEDTLS_PK_C
2105 *
2106 * This module enables SSL/TLS PKCS #11 smartcard support.
2107 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
2108 */
2109 //#define MBEDTLS_PKCS11_C
2110
2111 /**
2112 * \def MBEDTLS_PKCS12_C
2113 *
2114 * Enable PKCS#12 PBE functions.
2115 * Adds algorithms for parsing PKCS#8 encrypted private keys
2116 *
2117 * Module: library/pkcs12.c
2118 * Caller: library/pkparse.c
2119 *
2120 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2121 * Can use: MBEDTLS_ARC4_C
2122 *
2123 * This module enables PKCS#12 functions.
2124 */
2125 #define MBEDTLS_PKCS12_C
2126
2127 /**
2128 * \def MBEDTLS_PLATFORM_C
2129 *
2130 * Enable the platform abstraction layer that allows you to re-assign
2131 * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
2132 *
2133 * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
2134 * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
2135 * above to be specified at runtime or compile time respectively.
2136 *
2137 * \note This abstraction layer must be enabled on Windows (including MSYS2)
2138 * as other module rely on it for a fixed snprintf implementation.
2139 *
2140 * Module: library/platform.c
2141 * Caller: Most other .c files
2142 *
2143 * This module enables abstraction of common (libc) functions.
2144 */
2145 #define MBEDTLS_PLATFORM_C
2146
2147 /**
2148 * \def MBEDTLS_RIPEMD160_C
2149 *
2150 * Enable the RIPEMD-160 hash algorithm.
2151 *
2152 * Module: library/mbedtls_ripemd160.c
2153 * Caller: library/mbedtls_md.c
2154 *
2155 */
2156 #define MBEDTLS_RIPEMD160_C
2157
2158 /**
2159 * \def MBEDTLS_RSA_C
2160 *
2161 * Enable the RSA public-key cryptosystem.
2162 *
2163 * Module: library/rsa.c
2164 * Caller: library/ssl_cli.c
2165 * library/ssl_srv.c
2166 * library/ssl_tls.c
2167 * library/x509.c
2168 *
2169 * This module is used by the following key exchanges:
2170 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
2171 *
2172 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
2173 */
2174 #define MBEDTLS_RSA_C
2175
2176 /**
2177 * \def MBEDTLS_SHA1_C
2178 *
2179 * Enable the SHA1 cryptographic hash algorithm.
2180 *
2181 * Module: library/mbedtls_sha1.c
2182 * Caller: library/mbedtls_md.c
2183 * library/ssl_cli.c
2184 * library/ssl_srv.c
2185 * library/ssl_tls.c
2186 * library/x509write_crt.c
2187 *
2188 * This module is required for SSL/TLS and SHA1-signed certificates.
2189 */
2190 #define MBEDTLS_SHA1_C
2191
2192 /**
2193 * \def MBEDTLS_SHA256_C
2194 *
2195 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
2196 *
2197 * Module: library/mbedtls_sha256.c
2198 * Caller: library/entropy.c
2199 * library/mbedtls_md.c
2200 * library/ssl_cli.c
2201 * library/ssl_srv.c
2202 * library/ssl_tls.c
2203 *
2204 * This module adds support for SHA-224 and SHA-256.
2205 * This module is required for the SSL/TLS 1.2 PRF function.
2206 */
2207 #define MBEDTLS_SHA256_C
2208
2209 /**
2210 * \def MBEDTLS_SHA512_C
2211 *
2212 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
2213 *
2214 * Module: library/mbedtls_sha512.c
2215 * Caller: library/entropy.c
2216 * library/mbedtls_md.c
2217 * library/ssl_cli.c
2218 * library/ssl_srv.c
2219 *
2220 * This module adds support for SHA-384 and SHA-512.
2221 */
2222 #define MBEDTLS_SHA512_C
2223
2224 /**
2225 * \def MBEDTLS_SSL_CACHE_C
2226 *
2227 * Enable simple SSL cache implementation.
2228 *
2229 * Module: library/ssl_cache.c
2230 * Caller:
2231 *
2232 * Requires: MBEDTLS_SSL_CACHE_C
2233 */
2234 //#define MBEDTLS_SSL_CACHE_C /* swyter: we don't make use of this caching mechanism, as the WINE schannel API does not expose it */
2235
2236 /**
2237 * \def MBEDTLS_SSL_COOKIE_C
2238 *
2239 * Enable basic implementation of DTLS cookies for hello verification.
2240 *
2241 * Module: library/ssl_cookie.c
2242 * Caller:
2243 */
2244 //#define MBEDTLS_SSL_COOKIE_C /* swyter: schannel does not support UDP sockets, DTLS is useless */
2245
2246 /**
2247 * \def MBEDTLS_SSL_TICKET_C
2248 *
2249 * Enable an implementation of TLS server-side callbacks for session tickets.
2250 *
2251 * Module: library/ssl_ticket.c
2252 * Caller:
2253 *
2254 * Requires: MBEDTLS_CIPHER_C
2255 */
2256 #define MBEDTLS_SSL_TICKET_C
2257
2258 /**
2259 * \def MBEDTLS_SSL_CLI_C
2260 *
2261 * Enable the SSL/TLS client code.
2262 *
2263 * Module: library/ssl_cli.c
2264 * Caller:
2265 *
2266 * Requires: MBEDTLS_SSL_TLS_C
2267 *
2268 * This module is required for SSL/TLS client support.
2269 */
2270 #define MBEDTLS_SSL_CLI_C
2271
2272 /**
2273 * \def MBEDTLS_SSL_SRV_C
2274 *
2275 * Enable the SSL/TLS server code.
2276 *
2277 * Module: library/ssl_srv.c
2278 * Caller:
2279 *
2280 * Requires: MBEDTLS_SSL_TLS_C
2281 *
2282 * This module is required for SSL/TLS server support.
2283 */
2284 //#define MBEDTLS_SSL_SRV_C /* swyter: we don't need anything server-related */
2285
2286 /**
2287 * \def MBEDTLS_SSL_TLS_C
2288 *
2289 * Enable the generic SSL/TLS code.
2290 *
2291 * Module: library/ssl_tls.c
2292 * Caller: library/ssl_cli.c
2293 * library/ssl_srv.c
2294 *
2295 * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2296 * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
2297 *
2298 * This module is required for SSL/TLS.
2299 */
2300 #define MBEDTLS_SSL_TLS_C
2301
2302 /**
2303 * \def MBEDTLS_THREADING_C
2304 *
2305 * Enable the threading abstraction layer.
2306 * By default mbed TLS assumes it is used in a non-threaded environment or that
2307 * contexts are not shared between threads. If you do intend to use contexts
2308 * between threads, you will need to enable this layer to prevent race
2309 * conditions. See also our Knowledge Base article about threading:
2310 * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading
2311 *
2312 * Module: library/threading.c
2313 *
2314 * This allows different threading implementations (self-implemented or
2315 * provided).
2316 *
2317 * You will have to enable either MBEDTLS_THREADING_ALT or
2318 * MBEDTLS_THREADING_PTHREAD.
2319 *
2320 * Enable this layer to allow use of mutexes within mbed TLS
2321 */
2322 //#define MBEDTLS_THREADING_C
2323
2324 /**
2325 * \def MBEDTLS_TIMING_C
2326 *
2327 * Enable the semi-portable timing interface.
2328 *
2329 * \note The provided implementation only works on POSIX/Unix (including Linux,
2330 * BSD and OS X) and Windows. On other platforms, you can either disable that
2331 * module and provide your own implementations of the callbacks needed by
2332 * \c mbedtls_ssl_set_timer_cb() for DTLS, or leave it enabled and provide
2333 * your own implementation of the whole module by setting
2334 * \c MBEDTLS_TIMING_ALT in the current file.
2335 *
2336 * \note See also our Knowledge Base article about porting to a new
2337 * environment:
2338 * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
2339 *
2340 * Module: library/timing.c
2341 * Caller: library/havege.c
2342 *
2343 * This module is used by the HAVEGE random number generator.
2344 */
2345 #define MBEDTLS_TIMING_C
2346
2347 /**
2348 * \def MBEDTLS_VERSION_C
2349 *
2350 * Enable run-time version information.
2351 *
2352 * Module: library/version.c
2353 *
2354 * This module provides run-time version information.
2355 */
2356 //#define MBEDTLS_VERSION_C /* swyter: we don't use these functions, so it's a waste of space */
2357
2358 /**
2359 * \def MBEDTLS_X509_USE_C
2360 *
2361 * Enable X.509 core for using certificates.
2362 *
2363 * Module: library/x509.c
2364 * Caller: library/mbedtls_x509_crl.c
2365 * library/mbedtls_x509_crt.c
2366 * library/mbedtls_x509_csr.c
2367 *
2368 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
2369 * MBEDTLS_PK_PARSE_C
2370 *
2371 * This module is required for the X.509 parsing modules.
2372 */
2373 #define MBEDTLS_X509_USE_C
2374
2375 /**
2376 * \def MBEDTLS_X509_CRT_PARSE_C
2377 *
2378 * Enable X.509 certificate parsing.
2379 *
2380 * Module: library/mbedtls_x509_crt.c
2381 * Caller: library/ssl_cli.c
2382 * library/ssl_srv.c
2383 * library/ssl_tls.c
2384 *
2385 * Requires: MBEDTLS_X509_USE_C
2386 *
2387 * This module is required for X.509 certificate parsing.
2388 */
2389 #define MBEDTLS_X509_CRT_PARSE_C
2390
2391 /**
2392 * \def MBEDTLS_X509_CRL_PARSE_C
2393 *
2394 * Enable X.509 CRL parsing.
2395 *
2396 * Module: library/mbedtls_x509_crl.c
2397 * Caller: library/mbedtls_x509_crt.c
2398 *
2399 * Requires: MBEDTLS_X509_USE_C
2400 *
2401 * This module is required for X.509 CRL parsing.
2402 */
2403 //#define MBEDTLS_X509_CRL_PARSE_C /* swyter: we don't verify certs directly */
2404
2405 /**
2406 * \def MBEDTLS_X509_CSR_PARSE_C
2407 *
2408 * Enable X.509 Certificate Signing Request (CSR) parsing.
2409 *
2410 * Module: library/mbedtls_x509_csr.c
2411 * Caller: library/x509_crt_write.c
2412 *
2413 * Requires: MBEDTLS_X509_USE_C
2414 *
2415 * This module is used for reading X.509 certificate request.
2416 */
2417 //#define MBEDTLS_X509_CSR_PARSE_C /* swyter: we don't verify certs directly */
2418
2419 /**
2420 * \def MBEDTLS_X509_CREATE_C
2421 *
2422 * Enable X.509 core for creating certificates.
2423 *
2424 * Module: library/x509_create.c
2425 *
2426 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
2427 *
2428 * This module is the basis for creating X.509 certificates and CSRs.
2429 */
2430 //#define MBEDTLS_X509_CREATE_C /* swyter: we don't create certs in schannel */
2431
2432 /**
2433 * \def MBEDTLS_X509_CRT_WRITE_C
2434 *
2435 * Enable creating X.509 certificates.
2436 *
2437 * Module: library/x509_crt_write.c
2438 *
2439 * Requires: MBEDTLS_X509_CREATE_C
2440 *
2441 * This module is required for X.509 certificate creation.
2442 */
2443 //#define MBEDTLS_X509_CRT_WRITE_C /* swyter: we don't create certs in schannel */
2444
2445 /**
2446 * \def MBEDTLS_X509_CSR_WRITE_C
2447 *
2448 * Enable creating X.509 Certificate Signing Requests (CSR).
2449 *
2450 * Module: library/x509_csr_write.c
2451 *
2452 * Requires: MBEDTLS_X509_CREATE_C
2453 *
2454 * This module is required for X.509 certificate request writing.
2455 */
2456 //#define MBEDTLS_X509_CSR_WRITE_C /* swyter: we don't create certs in schannel, this is for servers */
2457
2458 /**
2459 * \def MBEDTLS_XTEA_C
2460 *
2461 * Enable the XTEA block cipher.
2462 *
2463 * Module: library/xtea.c
2464 * Caller:
2465 */
2466 #define MBEDTLS_XTEA_C
2467
2468 /* \} name SECTION: mbed TLS modules */
2469
2470 /**
2471 * \name SECTION: Module configuration options
2472 *
2473 * This section allows for the setting of module specific sizes and
2474 * configuration options. The default values are already present in the
2475 * relevant header files and should suffice for the regular use cases.
2476 *
2477 * Our advice is to enable options and change their values here
2478 * only if you have a good reason and know the consequences.
2479 *
2480 * Please check the respective header file for documentation on these
2481 * parameters (to prevent duplicate documentation).
2482 * \{
2483 */
2484
2485 /* MPI / BIGNUM options */
2486 //#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2487 //#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
2488
2489 /* CTR_DRBG options */
2490 //#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2491 //#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2492 //#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2493 //#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2494 //#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2495
2496 /* HMAC_DRBG options */
2497 //#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2498 //#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2499 //#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2500 //#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2501
2502 /* ECP options */
2503 //#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2504 //#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2505 //#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
2506
2507 /* Entropy options */
2508 //#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2509 //#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
2510
2511 /* Memory buffer allocator options */
2512 //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
2513
2514 /* Platform options */
2515 //#define MBEDTLS_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */
2516 //#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */
2517 //#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2518 //#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2519 //#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined */
2520 //#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2521 //#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2522 /* Note: your snprintf must correclty zero-terminate the buffer! */
2523 //#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
2524 //#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS 0 /**< Default exit value to use, can be undefined */
2525 //#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE 1 /**< Default exit value to use, can be undefined */
2526 //#define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
2527 //#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
2528 //#define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" /**< Seed file to read/write with default implementation */
2529
2530 /* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
2531 /* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
2532 //#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */
2533 //#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2534 //#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2535 //#define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time macro to use, can be undefined */
2536 //#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined */
2537 //#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2538 //#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
2539 /* Note: your snprintf must correclty zero-terminate the buffer! */
2540 //#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
2541 //#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
2542 //#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
2543
2544 /* SSL Cache options */
2545 //#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2546 //#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
2547
2548 /* SSL options */
2549 //#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Maxium fragment length in bytes, determines the size of each of the two internal I/O buffers */
2550 //#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
2551 //#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
2552 //#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
2553
2554 /**
2555 * Complete list of ciphersuites to use, in order of preference.
2556 *
2557 * \warning No dependency checking is done on that field! This option can only
2558 * be used to restrict the set of available ciphersuites. It is your
2559 * responsibility to make sure the needed modules are active.
2560 *
2561 * Use this to save a few hundred bytes of ROM (default ordering of all
2562 * available ciphersuites) and a few to a few hundred bytes of RAM.
2563 *
2564 * The value below is only an example, not the default.
2565 */
2566 //#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
2567
2568 /* X509 options */
2569 //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
2570
2571 /* \} name SECTION: Customisation configuration options */
2572
2573 /* Target and application specific configurations */
2574 //#define YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE "target_config.h"
2575
2576 /*
2577 * Allow user to override any previous default.
2578 *
2579 * Use two macro names for that, as:
2580 * - with yotta the prefix YOTTA_CFG_ is forced
2581 * - without yotta is looks weird to have a YOTTA prefix.
2582 */
2583 #if defined(YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE)
2584 #include YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE
2585 #elif defined(MBEDTLS_USER_CONFIG_FILE)
2586 #include MBEDTLS_USER_CONFIG_FILE
2587 #endif
2588
2589 #include "check_config.h"
2590
2591 #endif /* MBEDTLS_CONFIG_H */