4 * \brief Configuration options (set of defines)
6 * This set of compile-time options may be used to enable
7 * or disable features selectively, and reduce the global
10 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
11 * SPDX-License-Identifier: GPL-2.0
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.
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.
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.
27 * This file is part of mbed TLS (https://tls.mbed.org)
30 #ifndef MBEDTLS_CONFIG_H
31 #define MBEDTLS_CONFIG_H
33 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
34 //#define _CRT_SECURE_NO_DEPRECATE 1
38 * \name SECTION: System support
40 * This section sets system specific settings.
45 * \def MBEDTLS_HAVE_ASM
47 * The compiler has support for asm().
49 * Requires support for asm() in compiler.
54 * include/mbedtls/bn_mul.h
56 * Comment to disable the use of assembly code.
58 #define MBEDTLS_HAVE_ASM
61 * \def MBEDTLS_HAVE_SSE2
63 * CPU supports SSE2 instruction set.
65 * Uncomment if the CPU supports SSE2 (IA-32 specific).
67 #define MBEDTLS_HAVE_SSE2 /* swyter: disable this if you want to support platforms < Pentium 4 */
70 * \def MBEDTLS_HAVE_TIME
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
76 * Comment if your system does not support time functions
78 //#define MBEDTLS_HAVE_TIME
81 * \def MBEDTLS_HAVE_TIME_DATE
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
88 * Comment if your system does not have a correct clock.
90 //#define MBEDTLS_HAVE_TIME_DATE
93 * \def MBEDTLS_PLATFORM_MEMORY
95 * Enable the memory allocation layer.
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.
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.
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.
110 * Requires: MBEDTLS_PLATFORM_C
112 * Enable this layer to allow use of alternative memory allocators.
114 //#define MBEDTLS_PLATFORM_MEMORY
117 * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
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)
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.
128 * Requires: MBEDTLS_PLATFORM_C
130 * Uncomment to prevent default assignment of standard functions in the
133 //#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
136 * \def MBEDTLS_PLATFORM_EXIT_ALT
138 * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the
139 * function in the platform abstraction layer.
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.
145 * All these define require MBEDTLS_PLATFORM_C to be defined!
147 * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows;
148 * it will be enabled automatically by check_config.h
150 * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
151 * MBEDTLS_PLATFORM_XXX_MACRO!
153 * Uncomment a macro to enable alternate implementation of specific base
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
164 * \def MBEDTLS_DEPRECATED_WARNING
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.
171 * This only works with GCC and Clang. With other compilers, you may want to
172 * use MBEDTLS_DEPRECATED_REMOVED
174 * Uncomment to get warnings on using deprecated functions.
176 //#define MBEDTLS_DEPRECATED_WARNING
179 * \def MBEDTLS_DEPRECATED_REMOVED
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.
186 * Uncomment to get errors on using deprecated functions.
188 #define MBEDTLS_DEPRECATED_REMOVED /* swyter: we are explictily using the new API set */
190 /* \} name SECTION: System support */
193 * \name SECTION: mbed TLS feature support
195 * This section sets support for features that are or are not needed
196 * within the modules that are enabled.
201 * \def MBEDTLS_TIMING_ALT
203 * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(),
204 * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
206 * Only works if you have MBEDTLS_TIMING_C enabled.
208 * You will need to provide a header "timing_alt.h" and an implementation at
211 //#define MBEDTLS_TIMING_ALT
214 * \def MBEDTLS_AES_ALT
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.
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.
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.
229 * Uncomment a macro to enable alternate implementation of the corresponding
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
247 * \def MBEDTLS_MD2_PROCESS_ALT
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.
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.
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.
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
266 * Uncomment a macro to enable alternate implementation of the corresponding
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
285 * \def MBEDTLS_TEST_NULL_ENTROPY
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).
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.
296 * Requires MBEDTLS_ENTROPY_C, MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
299 //#define MBEDTLS_TEST_NULL_ENTROPY
302 * \def MBEDTLS_ENTROPY_HARDWARE_ALT
304 * Uncomment this macro to let mbed TLS use your own implementation of a
305 * hardware entropy collector.
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.
310 * Uncomment to use your own hardware entropy collector.
312 //#define MBEDTLS_ENTROPY_HARDWARE_ALT
315 * \def MBEDTLS_AES_ROM_TABLES
317 * Store the AES tables in ROM.
319 * Uncomment this macro to store the AES tables in ROM.
321 //#define MBEDTLS_AES_ROM_TABLES
324 * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
326 * Use less ROM for the Camellia implementation (saves about 768 bytes).
328 * Uncomment this macro to use less memory for Camellia.
330 //#define MBEDTLS_CAMELLIA_SMALL_MEMORY
333 * \def MBEDTLS_CIPHER_MODE_CBC
335 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
337 #define MBEDTLS_CIPHER_MODE_CBC
340 * \def MBEDTLS_CIPHER_MODE_CFB
342 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
344 #define MBEDTLS_CIPHER_MODE_CFB
347 * \def MBEDTLS_CIPHER_MODE_CTR
349 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
351 #define MBEDTLS_CIPHER_MODE_CTR
354 * \def MBEDTLS_CIPHER_NULL_CIPHER
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!
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
382 * Uncomment this macro to enable the NULL cipher and ciphersuites
384 //#define MBEDTLS_CIPHER_NULL_CIPHER
387 * \def MBEDTLS_CIPHER_PADDING_PKCS7
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
393 * If you disable all padding modes, only full blocks can be used with CBC.
395 * Enable padding modes in the cipher layer.
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
403 * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES
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!
409 * This enables the following ciphersuites:
410 * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA
411 * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA
413 * Uncomment this macro to enable weak ciphersuites
415 //#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
418 * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES
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
426 * Uncomment this macro to remove RC4 ciphersuites by default.
428 #define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
431 * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED
433 * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve
434 * module. By default all supported curves are enabled.
436 * Comment macros to disable the curve and functions for it
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
452 * \def MBEDTLS_ECP_NIST_OPTIM
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.
458 * Comment this macro to disable NIST curves optimisation.
460 #define MBEDTLS_ECP_NIST_OPTIM
463 * \def MBEDTLS_ECDSA_DETERMINISTIC
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.
470 * Requires: MBEDTLS_HMAC_DRBG_C
472 * Comment this macro to disable deterministic ECDSA.
474 #define MBEDTLS_ECDSA_DETERMINISTIC
477 * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
479 * Enable the PSK based ciphersuite modes in SSL / TLS.
481 * This enables the following ciphersuites (if other requisites are
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
496 //#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED /* swyter: we don't need PSK-based ciphers for schannel */
499 * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
501 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
503 * Requires: MBEDTLS_DHM_C
505 * This enables the following ciphersuites (if other requisites are
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
520 //#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED /* swyter: we don't need PSK-based ciphers for schannel */
523 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
525 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
527 * Requires: MBEDTLS_ECDH_C
529 * This enables the following ciphersuites (if other requisites are
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
540 //#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED /* swyter: we don't need PSK-based ciphers for schannel */
543 * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
545 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
547 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
548 * MBEDTLS_X509_CRT_PARSE_C
550 * This enables the following ciphersuites (if other requisites are
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
565 //#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED /* swyter: we don't need PSK-based ciphers for schannel */
568 * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
570 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
572 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
573 * MBEDTLS_X509_CRT_PARSE_C
575 * This enables the following ciphersuites (if other requisites are
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
593 #define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
596 * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
598 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
600 * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
601 * MBEDTLS_X509_CRT_PARSE_C
603 * This enables the following ciphersuites (if other requisites are
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
619 #define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
622 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
624 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
626 * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
627 * MBEDTLS_X509_CRT_PARSE_C
629 * This enables the following ciphersuites (if other requisites are
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
644 #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
647 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
649 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
651 * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
653 * This enables the following ciphersuites (if other requisites are
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
668 #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
671 * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
673 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
675 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
677 * This enables the following ciphersuites (if other requisites are
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
692 #define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
695 * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
697 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
699 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
701 * This enables the following ciphersuites (if other requisites are
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
716 #define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
719 * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
721 * Enable the ECJPAKE based ciphersuite modes in SSL / TLS.
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.
727 * Requires: MBEDTLS_ECJPAKE_C
729 * MBEDTLS_ECP_DP_SECP256R1_ENABLED
731 * This enables the following ciphersuites (if other requisites are
733 * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
735 //#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
738 * \def MBEDTLS_PK_PARSE_EC_EXTENDED
740 * Enhance support for reading EC keys using variants of SEC1 not allowed by
741 * RFC 5915 and RFC 5480.
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).
747 * Disable if you only need to support RFC 5915 + 5480 key formats.
749 #define MBEDTLS_PK_PARSE_EC_EXTENDED
752 * \def MBEDTLS_ERROR_STRERROR_DUMMY
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).
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.
761 * Disable if you run into name conflicts and want to really remove the
764 #define MBEDTLS_ERROR_STRERROR_DUMMY
767 * \def MBEDTLS_GENPRIME
769 * Enable the prime-number generation code.
771 * Requires: MBEDTLS_BIGNUM_C
773 #define MBEDTLS_GENPRIME
778 * Enable functions that use the filesystem.
780 //#define MBEDTLS_FS_IO /* swyter: we don't have to access the filesystem directly in schannel */
783 * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
785 * Do not add default entropy sources. These are the platform specific,
786 * mbedtls_timing_hardclock and HAVEGE based poll functions.
788 * This is useful to have more control over the added entropy sources in an
791 * Uncomment this macro to prevent loading of default entropy functions.
793 //#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
796 * \def MBEDTLS_NO_PLATFORM_ENTROPY
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.
802 * Uncomment this macro to disable the built-in platform entropy functions.
804 //#define MBEDTLS_NO_PLATFORM_ENTROPY
807 * \def MBEDTLS_ENTROPY_FORCE_SHA256
809 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
810 * default SHA-512 based one (if both are available).
812 * Requires: MBEDTLS_SHA256_C
814 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
815 * if you have performance concerns.
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.
820 #define MBEDTLS_ENTROPY_FORCE_SHA256 /* swyter: ReactOS is primarily 32-bit only, this speeds it up notably */
823 * \def MBEDTLS_ENTROPY_NV_SEED
825 * Enable the non-volatile (NV) seed file-based entropy source.
826 * (Also enables the NV seed read/write functions in the platform layer)
828 * This is crucial (if not required) on systems that do not have a
829 * cryptographic entropy source (in hardware or kernel) available.
831 * Requires: MBEDTLS_ENTROPY_C, MBEDTLS_PLATFORM_C
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.
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.
845 * \note The entropy collector will write to the seed file before entropy is
846 * given to an external source, to update it.
848 //#define MBEDTLS_ENTROPY_NV_SEED
851 * \def MBEDTLS_MEMORY_DEBUG
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.
857 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
859 * Uncomment this macro to let the buffer allocator print out error messages.
861 //#define MBEDTLS_MEMORY_DEBUG
864 * \def MBEDTLS_MEMORY_BACKTRACE
866 * Include backtrace information with each allocated block.
868 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
869 * GLIBC-compatible backtrace() an backtrace_symbols() support
871 * Uncomment this macro to include backtrace information
873 //#define MBEDTLS_MEMORY_BACKTRACE
876 * \def MBEDTLS_PK_RSA_ALT_SUPPORT
878 * Support external private RSA keys (eg from a HSM) in the PK layer.
880 * Comment this macro to disable support for external private RSA keys.
882 #define MBEDTLS_PK_RSA_ALT_SUPPORT
885 * \def MBEDTLS_PKCS1_V15
887 * Enable support for PKCS#1 v1.5 encoding.
889 * Requires: MBEDTLS_RSA_C
891 * This enables support for PKCS#1 v1.5 operations.
893 #define MBEDTLS_PKCS1_V15
896 * \def MBEDTLS_PKCS1_V21
898 * Enable support for PKCS#1 v2.1 encoding.
900 * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C
902 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
904 #define MBEDTLS_PKCS1_V21
907 * \def MBEDTLS_RSA_NO_CRT
909 * Do not use the Chinese Remainder Theorem for the RSA private operation.
911 * Uncomment this macro to disable the use of CRT in RSA.
914 //#define MBEDTLS_RSA_NO_CRT
917 * \def MBEDTLS_SELF_TEST
919 * Enable the checkup functions (*_self_test).
921 //#define MBEDTLS_SELF_TEST /* swyter: we don't need this, adds quite a bit of bloat */
924 * \def MBEDTLS_SHA256_SMALLER
926 * Enable an implementation of SHA-256 that has lower ROM footprint but also
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
935 * Uncomment to enable the smaller implementation of SHA256.
937 //#define MBEDTLS_SHA256_SMALLER
940 * \def MBEDTLS_SSL_AEAD_RANDOM_IV
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).
945 * Using the sequence number is generally recommended.
947 * Uncomment this macro to always use random IVs with AEAD ciphersuites.
949 //#define MBEDTLS_SSL_AEAD_RANDOM_IV
952 * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
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.
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.
961 * Enable sending of all alert messages
963 #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
966 * \def MBEDTLS_SSL_DEBUG_ALL
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.
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.
975 * Uncomment this macro to report all debug messages on errors introducing
976 * a timing side-channel.
979 //#define MBEDTLS_SSL_DEBUG_ALL /* swyter: we don't need that much verboseness that clogges up the dll with strings */
981 /** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
983 * Enable support for Encrypt-then-MAC, RFC 7366.
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.
989 * This only affects CBC ciphersuites, and is useless if none is defined.
991 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
992 * MBEDTLS_SSL_PROTO_TLS1_1 or
993 * MBEDTLS_SSL_PROTO_TLS1_2
995 * Comment this macro to disable support for Encrypt-then-MAC
997 #define MBEDTLS_SSL_ENCRYPT_THEN_MAC
999 /** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
1001 * Enable support for Extended Master Secret, aka Session Hash
1002 * (draft-ietf-tls-session-hash-02).
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.
1009 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
1010 * MBEDTLS_SSL_PROTO_TLS1_1 or
1011 * MBEDTLS_SSL_PROTO_TLS1_2
1013 * Comment this macro to disable support for Extended Master Secret.
1015 #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
1018 * \def MBEDTLS_SSL_FALLBACK_SCSV
1020 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
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.
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.
1030 * Comment this macro to disable support for FALLBACK_SCSV
1032 //#define MBEDTLS_SSL_FALLBACK_SCSV /* swyter: as the description says, we don't need this for clients */
1035 * \def MBEDTLS_SSL_HW_RECORD_ACCEL
1037 * Enable hooking functions in SSL module for hardware acceleration of
1038 * individual records.
1040 * Uncomment this macro to enable hooking functions.
1042 //#define MBEDTLS_SSL_HW_RECORD_ACCEL
1045 * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING
1047 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
1049 * This is a countermeasure to the BEAST attack, which also minimizes the risk
1050 * of interoperability issues compared to sending 0-length records.
1052 * Comment this macro to disable 1/n-1 record splitting.
1054 #define MBEDTLS_SSL_CBC_RECORD_SPLITTING
1057 * \def MBEDTLS_SSL_RENEGOTIATION
1059 * Disable support for TLS renegotiation.
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.
1067 * Comment this to disable support for renegotiation.
1069 #define MBEDTLS_SSL_RENEGOTIATION
1072 * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
1074 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
1075 * SSL Server module (MBEDTLS_SSL_SRV_C).
1077 * Uncomment this macro to enable support for SSLv2 Client Hello messages.
1079 //#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO /* swyter: we don't need anything server-related */
1082 * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
1084 * Pick the ciphersuite according to the client's preferences rather than ours
1085 * in the SSL Server module (MBEDTLS_SSL_SRV_C).
1087 * Uncomment this macro to respect client's ciphersuite order
1089 //#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE /* swyter: we don't need anything server-related */
1092 * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1094 * Enable support for RFC 6066 max_fragment_length extension in SSL.
1096 * Comment this macro to disable support for the max_fragment_length extension
1098 #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1101 * \def MBEDTLS_SSL_PROTO_SSL3
1103 * Enable support for SSL 3.0.
1105 * Requires: MBEDTLS_MD5_C
1108 * Comment this macro to disable support for SSL 3.0
1110 //#define MBEDTLS_SSL_PROTO_SSL3 /* swyter: this is potentially insecure and should remain ethernaly disabled */
1113 * \def MBEDTLS_SSL_PROTO_TLS1
1115 * Enable support for TLS 1.0.
1117 * Requires: MBEDTLS_MD5_C
1120 * Comment this macro to disable support for TLS 1.0
1122 #define MBEDTLS_SSL_PROTO_TLS1
1125 * \def MBEDTLS_SSL_PROTO_TLS1_1
1127 * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
1129 * Requires: MBEDTLS_MD5_C
1132 * Comment this macro to disable support for TLS 1.1 / DTLS 1.0
1134 #define MBEDTLS_SSL_PROTO_TLS1_1
1137 * \def MBEDTLS_SSL_PROTO_TLS1_2
1139 * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
1141 * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C
1142 * (Depends on ciphersuites)
1144 * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
1146 #define MBEDTLS_SSL_PROTO_TLS1_2
1149 * \def MBEDTLS_SSL_PROTO_DTLS
1151 * Enable support for DTLS (all available versions).
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.
1156 * Requires: MBEDTLS_SSL_PROTO_TLS1_1
1157 * or MBEDTLS_SSL_PROTO_TLS1_2
1159 * Comment this macro to disable support for DTLS
1161 //#define MBEDTLS_SSL_PROTO_DTLS /* swyter: schannel does not support UDP sockets, DTLS is useless */
1164 * \def MBEDTLS_SSL_ALPN
1166 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
1168 * Comment this macro to disable support for ALPN.
1170 #define MBEDTLS_SSL_ALPN
1173 * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
1175 * Enable support for the anti-replay mechanism in DTLS.
1177 * Requires: MBEDTLS_SSL_TLS_C
1178 * MBEDTLS_SSL_PROTO_DTLS
1180 * \warning Disabling this is often a security risk!
1181 * See mbedtls_ssl_conf_dtls_anti_replay() for details.
1183 * Comment this to disable anti-replay in DTLS.
1185 //#define MBEDTLS_SSL_DTLS_ANTI_REPLAY /* swyter: schannel does not support UDP sockets, DTLS is useless */
1188 * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
1190 * Enable support for HelloVerifyRequest on DTLS servers.
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.
1197 * \warning Disabling this can ba a security risk! (see above)
1199 * Requires: MBEDTLS_SSL_PROTO_DTLS
1201 * Comment this to disable support for HelloVerifyRequest.
1203 //#define MBEDTLS_SSL_DTLS_HELLO_VERIFY /* swyter: schannel does not support UDP sockets, DTLS is useless */
1206 * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
1208 * Enable server-side support for clients that reconnect from the same port.
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.
1215 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
1217 * Comment this to disable support for clients reusing the source port.
1219 //#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE /* swyter: schannel does not support UDP sockets, DTLS is useless */
1222 * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
1224 * Enable support for a limit of records with bad MAC.
1226 * See mbedtls_ssl_conf_dtls_badmac_limit().
1228 * Requires: MBEDTLS_SSL_PROTO_DTLS
1230 //#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT /* swyter: schannel does not support UDP sockets, DTLS is useless */
1233 * \def MBEDTLS_SSL_SESSION_TICKETS
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.
1242 * Comment this macro to disable support for SSL session tickets
1244 #define MBEDTLS_SSL_SESSION_TICKETS
1247 * \def MBEDTLS_SSL_EXPORT_KEYS
1249 * Enable support for exporting key block and master secret.
1250 * This is required for certain users of TLS, e.g. EAP-TLS.
1252 * Comment this macro to disable support for key export
1254 //#define MBEDTLS_SSL_EXPORT_KEYS
1257 * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
1259 * Enable support for RFC 6066 server name indication (SNI) in SSL.
1261 * Requires: MBEDTLS_X509_CRT_PARSE_C
1263 * Comment this macro to disable support for server name indication in SSL
1265 #define MBEDTLS_SSL_SERVER_NAME_INDICATION
1268 * \def MBEDTLS_SSL_TRUNCATED_HMAC
1270 * Enable support for RFC 6066 truncated HMAC in SSL.
1272 * Comment this macro to disable support for truncated HMAC in SSL
1274 #define MBEDTLS_SSL_TRUNCATED_HMAC
1277 * \def MBEDTLS_THREADING_ALT
1279 * Provide your own alternate threading implementation.
1281 * Requires: MBEDTLS_THREADING_C
1283 * Uncomment this to allow your own alternate threading implementation.
1285 //#define MBEDTLS_THREADING_ALT
1288 * \def MBEDTLS_THREADING_PTHREAD
1290 * Enable the pthread wrapper layer for the threading layer.
1292 * Requires: MBEDTLS_THREADING_C
1294 * Uncomment this to enable pthread mutexes.
1296 //#define MBEDTLS_THREADING_PTHREAD
1299 * \def MBEDTLS_VERSION_FEATURES
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().
1305 * Requires: MBEDTLS_VERSION_C
1307 * Comment this to disable run-time checking and save ROM space
1309 //#define MBEDTLS_VERSION_FEATURES
1312 * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
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.
1317 * Uncomment to prevent an error.
1319 //#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
1322 * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1324 * If set, the X509 parser will not break-off when parsing an X509 certificate
1325 * and encountering an unknown critical extension.
1327 * \warning Depending on your PKI use, enabling this can be a security risk!
1329 * Uncomment to prevent an error.
1331 //#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1334 * \def MBEDTLS_X509_CHECK_KEY_USAGE
1336 * Enable verification of the keyUsage extension (CA and leaf certificates).
1338 * Disabling this avoids problems with mis-issued and/or misused
1339 * (intermediate) CA and leaf certificates.
1341 * \warning Depending on your PKI use, disabling this can be a security risk!
1343 * Comment to skip keyUsage checking for both CA and leaf certificates.
1345 #define MBEDTLS_X509_CHECK_KEY_USAGE
1348 * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
1350 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1352 * Disabling this avoids problems with mis-issued and/or misused certificates.
1354 * \warning Depending on your PKI use, disabling this can be a security risk!
1356 * Comment to skip extendedKeyUsage checking for certificates.
1358 #define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
1361 * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
1363 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1364 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1366 * Comment this macro to disallow using RSASSA-PSS in certificates.
1368 #define MBEDTLS_X509_RSASSA_PSS_SUPPORT
1371 * \def MBEDTLS_ZLIB_SUPPORT
1373 * If set, the SSL/TLS module uses ZLIB to support compression and
1374 * decompression of packet data.
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.
1380 * \note Currently compression can't be used with DTLS.
1382 * Used in: library/ssl_tls.c
1386 * This feature requires zlib library and headers to be present.
1388 * Uncomment to enable use of ZLIB
1390 //#define MBEDTLS_ZLIB_SUPPORT
1391 /* \} name SECTION: mbed TLS feature support */
1394 * \name SECTION: mbed TLS modules
1396 * This section enables or disables entire modules in mbed TLS
1401 * \def MBEDTLS_AESNI_C
1403 * Enable AES-NI support on x86-64.
1405 * Module: library/aesni.c
1406 * Caller: library/aes.c
1408 * Requires: MBEDTLS_HAVE_ASM
1410 * This modules adds support for the AES-NI instructions on x86-64
1412 #define MBEDTLS_AESNI_C /* swyter: looks like these AMD64 improvements are behind an arch macro, better perf is always good */
1415 * \def MBEDTLS_AES_C
1417 * Enable the AES block cipher.
1419 * Module: library/aes.c
1420 * Caller: library/ssl_tls.c
1422 * library/ctr_drbg.c
1424 * This module enables the following ciphersuites (if other requisites are
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
1485 * PEM_PARSE uses AES for decrypting encrypted keys.
1487 #define MBEDTLS_AES_C
1490 * \def MBEDTLS_ARC4_C
1492 * Enable the ARCFOUR stream cipher.
1494 * Module: library/arc4.c
1495 * Caller: library/ssl_tls.c
1497 * This module enables the following ciphersuites (if other requisites are
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
1510 #define MBEDTLS_ARC4_C
1513 * \def MBEDTLS_ASN1_PARSE_C
1515 * Enable the generic ASN1 parser.
1517 * Module: library/asn1.c
1518 * Caller: library/x509.c
1524 #define MBEDTLS_ASN1_PARSE_C
1527 * \def MBEDTLS_ASN1_WRITE_C
1529 * Enable the generic ASN1 writer.
1531 * Module: library/asn1write.c
1532 * Caller: library/ecdsa.c
1534 * library/x509_create.c
1535 * library/x509write_crt.c
1536 * library/mbedtls_x509write_csr.c
1538 #define MBEDTLS_ASN1_WRITE_C
1541 * \def MBEDTLS_BASE64_C
1543 * Enable the Base64 module.
1545 * Module: library/base64.c
1546 * Caller: library/pem.c
1548 * This module is required for PEM support (required by X.509).
1550 //#define MBEDTLS_BASE64_C
1553 * \def MBEDTLS_BIGNUM_C
1555 * Enable the multi-precision integer library.
1557 * Module: library/bignum.c
1558 * Caller: library/dhm.c
1564 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
1566 #define MBEDTLS_BIGNUM_C
1569 * \def MBEDTLS_BLOWFISH_C
1571 * Enable the Blowfish block cipher.
1573 * Module: library/blowfish.c
1575 #define MBEDTLS_BLOWFISH_C
1578 * \def MBEDTLS_CAMELLIA_C
1580 * Enable the Camellia block cipher.
1582 * Module: library/camellia.c
1583 * Caller: library/ssl_tls.c
1585 * This module enables the following ciphersuites (if other requisites are
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
1630 #define MBEDTLS_CAMELLIA_C
1633 * \def MBEDTLS_CCM_C
1635 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1637 * Module: library/ccm.c
1639 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
1641 * This module enables the AES-CCM ciphersuites, if other requisites are
1644 #define MBEDTLS_CCM_C
1647 * \def MBEDTLS_CERTS_C
1649 * Enable the test certificates.
1651 * Module: library/certs.c
1654 * This module is used for testing (ssl_client/server).
1656 //#define MBEDTLS_CERTS_C /* swyter: these test certs are completely useless */
1659 * \def MBEDTLS_CIPHER_C
1661 * Enable the generic cipher layer.
1663 * Module: library/cipher.c
1664 * Caller: library/ssl_tls.c
1666 * Uncomment to enable generic cipher wrappers.
1668 #define MBEDTLS_CIPHER_C
1671 * \def MBEDTLS_CTR_DRBG_C
1673 * Enable the CTR_DRBG AES-256-based random generator.
1675 * Module: library/ctr_drbg.c
1678 * Requires: MBEDTLS_AES_C
1680 * This module provides the CTR_DRBG AES-256 random number generator.
1682 #define MBEDTLS_CTR_DRBG_C
1685 * \def MBEDTLS_DEBUG_C
1687 * Enable the debug functions.
1689 * Module: library/debug.c
1690 * Caller: library/ssl_cli.c
1694 * This module provides debugging functions.
1697 #define MBEDTLS_DEBUG_C /* swyter: we don't even need this level of verboseness, useful only when developing */
1701 * \def MBEDTLS_DES_C
1703 * Enable the DES block cipher.
1705 * Module: library/des.c
1706 * Caller: library/pem.c
1709 * This module enables the following ciphersuites (if other requisites are
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
1722 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
1724 #define MBEDTLS_DES_C
1727 * \def MBEDTLS_DHM_C
1729 * Enable the Diffie-Hellman-Merkle module.
1731 * Module: library/dhm.c
1732 * Caller: library/ssl_cli.c
1735 * This module is used by the following key exchanges:
1738 #define MBEDTLS_DHM_C
1741 * \def MBEDTLS_ECDH_C
1743 * Enable the elliptic curve Diffie-Hellman library.
1745 * Module: library/ecdh.c
1746 * Caller: library/ssl_cli.c
1749 * This module is used by the following key exchanges:
1750 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
1752 * Requires: MBEDTLS_ECP_C
1754 #define MBEDTLS_ECDH_C
1757 * \def MBEDTLS_ECDSA_C
1759 * Enable the elliptic curve DSA library.
1761 * Module: library/ecdsa.c
1764 * This module is used by the following key exchanges:
1767 * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
1769 #define MBEDTLS_ECDSA_C
1772 * \def MBEDTLS_ECJPAKE_C
1774 * Enable the elliptic curve J-PAKE library.
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.
1780 * Module: library/ecjpake.c
1783 * This module is used by the following key exchanges:
1786 * Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C
1788 //#define MBEDTLS_ECJPAKE_C
1791 * \def MBEDTLS_ECP_C
1793 * Enable the elliptic curve over GF(p) library.
1795 * Module: library/ecp.c
1796 * Caller: library/ecdh.c
1800 * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
1802 #define MBEDTLS_ECP_C
1805 * \def MBEDTLS_ENTROPY_C
1807 * Enable the platform-specific entropy code.
1809 * Module: library/entropy.c
1812 * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
1814 * This module provides a generic entropy pool
1816 #define MBEDTLS_ENTROPY_C
1819 * \def MBEDTLS_ERROR_C
1821 * Enable error code to error string conversion.
1823 * Module: library/error.c
1826 * This module enables mbedtls_strerror().
1828 //#define MBEDTLS_ERROR_C /* swyter: we don't print user errors, so this trims some fat */
1831 * \def MBEDTLS_GCM_C
1833 * Enable the Galois/Counter Mode (GCM) for AES.
1835 * Module: library/gcm.c
1837 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
1839 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1840 * requisites are enabled as well.
1842 #define MBEDTLS_GCM_C
1845 * \def MBEDTLS_HAVEGE_C
1847 * Enable the HAVEGE random generator.
1849 * Warning: the HAVEGE random generator is not suitable for virtualized
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.
1858 * Module: library/havege.c
1861 * Requires: MBEDTLS_TIMING_C
1863 * Uncomment to enable the HAVEGE random generator.
1865 //#define MBEDTLS_HAVEGE_C
1868 * \def MBEDTLS_HMAC_DRBG_C
1870 * Enable the HMAC_DRBG random generator.
1872 * Module: library/hmac_drbg.c
1875 * Requires: MBEDTLS_MD_C
1877 * Uncomment to enable the HMAC_DRBG random number geerator.
1879 #define MBEDTLS_HMAC_DRBG_C
1884 * Enable the generic message digest layer.
1886 * Module: library/mbedtls_md.c
1889 * Uncomment to enable generic message digest wrappers.
1891 #define MBEDTLS_MD_C
1894 * \def MBEDTLS_MD2_C
1896 * Enable the MD2 hash algorithm.
1898 * Module: library/mbedtls_md2.c
1901 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1903 //#define MBEDTLS_MD2_C
1906 * \def MBEDTLS_MD4_C
1908 * Enable the MD4 hash algorithm.
1910 * Module: library/mbedtls_md4.c
1913 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1915 //#define MBEDTLS_MD4_C
1918 * \def MBEDTLS_MD5_C
1920 * Enable the MD5 hash algorithm.
1922 * Module: library/mbedtls_md5.c
1923 * Caller: library/mbedtls_md.c
1927 * This module is required for SSL/TLS and X.509.
1928 * PEM_PARSE uses MD5 for decrypting encrypted keys.
1930 #define MBEDTLS_MD5_C
1933 * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
1935 * Enable the buffer allocator implementation that makes use of a (stack)
1936 * based buffer to 'allocate' dynamic memory. (replaces calloc() and free()
1939 * Module: library/memory_buffer_alloc.c
1941 * Requires: MBEDTLS_PLATFORM_C
1942 * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
1944 * Enable this module to enable the buffer memory allocator.
1946 //#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
1949 * \def MBEDTLS_NET_C
1951 * Enable the TCP and UDP over IPv6/IPv4 networking routines.
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().
1957 * \note See also our Knowledge Base article about porting to a new
1959 * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
1961 * Module: library/net.c
1963 * This module provides networking routines.
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 */
1968 * \def MBEDTLS_OID_C
1970 * Enable the OID database.
1972 * Module: library/oid.c
1973 * Caller: library/asn1write.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
1986 * This modules translates between OIDs and internal values.
1988 #define MBEDTLS_OID_C
1991 * \def MBEDTLS_PADLOCK_C
1993 * Enable VIA Padlock support on x86.
1995 * Module: library/padlock.c
1996 * Caller: library/aes.c
1998 * Requires: MBEDTLS_HAVE_ASM
2000 * This modules adds support for the VIA PadLock on x86.
2002 #define MBEDTLS_PADLOCK_C
2005 * \def MBEDTLS_PEM_PARSE_C
2007 * Enable PEM decoding / parsing.
2009 * Module: library/pem.c
2010 * Caller: library/dhm.c
2012 * library/mbedtls_x509_crl.c
2013 * library/mbedtls_x509_crt.c
2014 * library/mbedtls_x509_csr.c
2016 * Requires: MBEDTLS_BASE64_C
2018 * This modules adds support for decoding / parsing PEM files.
2020 //#define MBEDTLS_PEM_PARSE_C /* swyter: we don't do any PEM decoding */
2023 * \def MBEDTLS_PEM_WRITE_C
2025 * Enable PEM encoding / writing.
2027 * Module: library/pem.c
2028 * Caller: library/pkwrite.c
2029 * library/x509write_crt.c
2030 * library/mbedtls_x509write_csr.c
2032 * Requires: MBEDTLS_BASE64_C
2034 * This modules adds support for encoding / writing PEM files.
2036 //#define MBEDTLS_PEM_WRITE_C /* swyter: we don't do any PEM decoding */
2041 * Enable the generic public (asymetric) key layer.
2043 * Module: library/pk.c
2044 * Caller: library/ssl_tls.c
2048 * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
2050 * Uncomment to enable generic public key wrappers.
2052 #define MBEDTLS_PK_C
2055 * \def MBEDTLS_PK_PARSE_C
2057 * Enable the generic public (asymetric) key parser.
2059 * Module: library/pkparse.c
2060 * Caller: library/mbedtls_x509_crt.c
2061 * library/mbedtls_x509_csr.c
2063 * Requires: MBEDTLS_PK_C
2065 * Uncomment to enable generic public key parse functions.
2067 #define MBEDTLS_PK_PARSE_C
2070 * \def MBEDTLS_PK_WRITE_C
2072 * Enable the generic public (asymetric) key writer.
2074 * Module: library/pkwrite.c
2075 * Caller: library/x509write.c
2077 * Requires: MBEDTLS_PK_C
2079 * Uncomment to enable generic public key write functions.
2081 //#define MBEDTLS_PK_WRITE_C /* swyter: we don't write any PK */
2084 * \def MBEDTLS_PKCS5_C
2086 * Enable PKCS#5 functions.
2088 * Module: library/pkcs5.c
2090 * Requires: MBEDTLS_MD_C
2092 * This module adds support for the PKCS#5 functions.
2094 #define MBEDTLS_PKCS5_C
2097 * \def MBEDTLS_PKCS11_C
2099 * Enable wrapper for PKCS#11 smartcard support.
2101 * Module: library/pkcs11.c
2102 * Caller: library/pk.c
2104 * Requires: MBEDTLS_PK_C
2106 * This module enables SSL/TLS PKCS #11 smartcard support.
2107 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
2109 //#define MBEDTLS_PKCS11_C
2112 * \def MBEDTLS_PKCS12_C
2114 * Enable PKCS#12 PBE functions.
2115 * Adds algorithms for parsing PKCS#8 encrypted private keys
2117 * Module: library/pkcs12.c
2118 * Caller: library/pkparse.c
2120 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2121 * Can use: MBEDTLS_ARC4_C
2123 * This module enables PKCS#12 functions.
2125 #define MBEDTLS_PKCS12_C
2128 * \def MBEDTLS_PLATFORM_C
2130 * Enable the platform abstraction layer that allows you to re-assign
2131 * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
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.
2137 * \note This abstraction layer must be enabled on Windows (including MSYS2)
2138 * as other module rely on it for a fixed snprintf implementation.
2140 * Module: library/platform.c
2141 * Caller: Most other .c files
2143 * This module enables abstraction of common (libc) functions.
2145 #define MBEDTLS_PLATFORM_C
2148 * \def MBEDTLS_RIPEMD160_C
2150 * Enable the RIPEMD-160 hash algorithm.
2152 * Module: library/mbedtls_ripemd160.c
2153 * Caller: library/mbedtls_md.c
2156 #define MBEDTLS_RIPEMD160_C
2159 * \def MBEDTLS_RSA_C
2161 * Enable the RSA public-key cryptosystem.
2163 * Module: library/rsa.c
2164 * Caller: library/ssl_cli.c
2169 * This module is used by the following key exchanges:
2170 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
2172 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
2174 #define MBEDTLS_RSA_C
2177 * \def MBEDTLS_SHA1_C
2179 * Enable the SHA1 cryptographic hash algorithm.
2181 * Module: library/mbedtls_sha1.c
2182 * Caller: library/mbedtls_md.c
2186 * library/x509write_crt.c
2188 * This module is required for SSL/TLS and SHA1-signed certificates.
2190 #define MBEDTLS_SHA1_C
2193 * \def MBEDTLS_SHA256_C
2195 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
2197 * Module: library/mbedtls_sha256.c
2198 * Caller: library/entropy.c
2199 * library/mbedtls_md.c
2204 * This module adds support for SHA-224 and SHA-256.
2205 * This module is required for the SSL/TLS 1.2 PRF function.
2207 #define MBEDTLS_SHA256_C
2210 * \def MBEDTLS_SHA512_C
2212 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
2214 * Module: library/mbedtls_sha512.c
2215 * Caller: library/entropy.c
2216 * library/mbedtls_md.c
2220 * This module adds support for SHA-384 and SHA-512.
2222 #define MBEDTLS_SHA512_C
2225 * \def MBEDTLS_SSL_CACHE_C
2227 * Enable simple SSL cache implementation.
2229 * Module: library/ssl_cache.c
2232 * Requires: MBEDTLS_SSL_CACHE_C
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 */
2237 * \def MBEDTLS_SSL_COOKIE_C
2239 * Enable basic implementation of DTLS cookies for hello verification.
2241 * Module: library/ssl_cookie.c
2244 //#define MBEDTLS_SSL_COOKIE_C /* swyter: schannel does not support UDP sockets, DTLS is useless */
2247 * \def MBEDTLS_SSL_TICKET_C
2249 * Enable an implementation of TLS server-side callbacks for session tickets.
2251 * Module: library/ssl_ticket.c
2254 * Requires: MBEDTLS_CIPHER_C
2256 #define MBEDTLS_SSL_TICKET_C
2259 * \def MBEDTLS_SSL_CLI_C
2261 * Enable the SSL/TLS client code.
2263 * Module: library/ssl_cli.c
2266 * Requires: MBEDTLS_SSL_TLS_C
2268 * This module is required for SSL/TLS client support.
2270 #define MBEDTLS_SSL_CLI_C
2273 * \def MBEDTLS_SSL_SRV_C
2275 * Enable the SSL/TLS server code.
2277 * Module: library/ssl_srv.c
2280 * Requires: MBEDTLS_SSL_TLS_C
2282 * This module is required for SSL/TLS server support.
2284 //#define MBEDTLS_SSL_SRV_C /* swyter: we don't need anything server-related */
2287 * \def MBEDTLS_SSL_TLS_C
2289 * Enable the generic SSL/TLS code.
2291 * Module: library/ssl_tls.c
2292 * Caller: library/ssl_cli.c
2295 * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2296 * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
2298 * This module is required for SSL/TLS.
2300 #define MBEDTLS_SSL_TLS_C
2303 * \def MBEDTLS_THREADING_C
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
2312 * Module: library/threading.c
2314 * This allows different threading implementations (self-implemented or
2317 * You will have to enable either MBEDTLS_THREADING_ALT or
2318 * MBEDTLS_THREADING_PTHREAD.
2320 * Enable this layer to allow use of mutexes within mbed TLS
2322 //#define MBEDTLS_THREADING_C
2325 * \def MBEDTLS_TIMING_C
2327 * Enable the semi-portable timing interface.
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.
2336 * \note See also our Knowledge Base article about porting to a new
2338 * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
2340 * Module: library/timing.c
2341 * Caller: library/havege.c
2343 * This module is used by the HAVEGE random number generator.
2345 #define MBEDTLS_TIMING_C
2348 * \def MBEDTLS_VERSION_C
2350 * Enable run-time version information.
2352 * Module: library/version.c
2354 * This module provides run-time version information.
2356 //#define MBEDTLS_VERSION_C /* swyter: we don't use these functions, so it's a waste of space */
2359 * \def MBEDTLS_X509_USE_C
2361 * Enable X.509 core for using certificates.
2363 * Module: library/x509.c
2364 * Caller: library/mbedtls_x509_crl.c
2365 * library/mbedtls_x509_crt.c
2366 * library/mbedtls_x509_csr.c
2368 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
2369 * MBEDTLS_PK_PARSE_C
2371 * This module is required for the X.509 parsing modules.
2373 #define MBEDTLS_X509_USE_C
2376 * \def MBEDTLS_X509_CRT_PARSE_C
2378 * Enable X.509 certificate parsing.
2380 * Module: library/mbedtls_x509_crt.c
2381 * Caller: library/ssl_cli.c
2385 * Requires: MBEDTLS_X509_USE_C
2387 * This module is required for X.509 certificate parsing.
2389 #define MBEDTLS_X509_CRT_PARSE_C
2392 * \def MBEDTLS_X509_CRL_PARSE_C
2394 * Enable X.509 CRL parsing.
2396 * Module: library/mbedtls_x509_crl.c
2397 * Caller: library/mbedtls_x509_crt.c
2399 * Requires: MBEDTLS_X509_USE_C
2401 * This module is required for X.509 CRL parsing.
2403 //#define MBEDTLS_X509_CRL_PARSE_C /* swyter: we don't verify certs directly */
2406 * \def MBEDTLS_X509_CSR_PARSE_C
2408 * Enable X.509 Certificate Signing Request (CSR) parsing.
2410 * Module: library/mbedtls_x509_csr.c
2411 * Caller: library/x509_crt_write.c
2413 * Requires: MBEDTLS_X509_USE_C
2415 * This module is used for reading X.509 certificate request.
2417 //#define MBEDTLS_X509_CSR_PARSE_C /* swyter: we don't verify certs directly */
2420 * \def MBEDTLS_X509_CREATE_C
2422 * Enable X.509 core for creating certificates.
2424 * Module: library/x509_create.c
2426 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
2428 * This module is the basis for creating X.509 certificates and CSRs.
2430 //#define MBEDTLS_X509_CREATE_C /* swyter: we don't create certs in schannel */
2433 * \def MBEDTLS_X509_CRT_WRITE_C
2435 * Enable creating X.509 certificates.
2437 * Module: library/x509_crt_write.c
2439 * Requires: MBEDTLS_X509_CREATE_C
2441 * This module is required for X.509 certificate creation.
2443 //#define MBEDTLS_X509_CRT_WRITE_C /* swyter: we don't create certs in schannel */
2446 * \def MBEDTLS_X509_CSR_WRITE_C
2448 * Enable creating X.509 Certificate Signing Requests (CSR).
2450 * Module: library/x509_csr_write.c
2452 * Requires: MBEDTLS_X509_CREATE_C
2454 * This module is required for X.509 certificate request writing.
2456 //#define MBEDTLS_X509_CSR_WRITE_C /* swyter: we don't create certs in schannel, this is for servers */
2459 * \def MBEDTLS_XTEA_C
2461 * Enable the XTEA block cipher.
2463 * Module: library/xtea.c
2466 #define MBEDTLS_XTEA_C
2468 /* \} name SECTION: mbed TLS modules */
2471 * \name SECTION: Module configuration options
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.
2477 * Our advice is to enable options and change their values here
2478 * only if you have a good reason and know the consequences.
2480 * Please check the respective header file for documentation on these
2481 * parameters (to prevent duplicate documentation).
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. */
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 */
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 */
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 */
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 */
2511 /* Memory buffer allocator options */
2512 //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
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 */
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 */
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 */
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 */
2555 * Complete list of ciphersuites to use, in order of preference.
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.
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.
2564 * The value below is only an example, not the default.
2566 //#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
2569 //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
2571 /* \} name SECTION: Customisation configuration options */
2573 /* Target and application specific configurations */
2574 //#define YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE "target_config.h"
2577 * Allow user to override any previous default.
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.
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
2589 #include "check_config.h"
2591 #endif /* MBEDTLS_CONFIG_H */