blob: 49fa597288936da04cf961cc74a8056ca7674450 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakker37ca75d2011-01-06 12:28:03 +00004 * \brief Configuration options (set of defines)
5 *
Manuel Pégourié-Gonnarda658a402015-01-23 09:45:19 +00006 * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
Manuel Pégourié-Gonnardfe446432015-03-06 13:17:10 +00008 * This file is part of mbed TLS (https://tls.mbed.org)
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00009 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000010 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 *
Paul Bakker5121ce52009-01-03 21:22:43 +000024 * This set of compile-time options may be used to enable
25 * or disable features selectively, and reduce the global
26 * memory footprint.
27 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020028#ifndef MBEDTLS_CONFIG_H
29#define MBEDTLS_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000030
Paul Bakkercce9d772011-11-18 14:26:47 +000031#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
Paul Bakker5121ce52009-01-03 21:22:43 +000032#define _CRT_SECURE_NO_DEPRECATE 1
33#endif
34
Paul Bakkerf3b86c12011-01-27 15:24:17 +000035/**
Paul Bakker0a62cd12011-01-21 11:00:08 +000036 * \name SECTION: System support
37 *
38 * This section sets system specific settings.
39 * \{
40 */
41
Paul Bakkerf3b86c12011-01-27 15:24:17 +000042/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020043 * \def MBEDTLS_HAVE_ASM
Paul Bakkerf3b86c12011-01-27 15:24:17 +000044 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020045 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000046 *
47 * Requires support for asm() in compiler.
48 *
49 * Used in:
50 * library/timing.c
51 * library/padlock.c
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +000052 * include/mbedtls/bn_mul.h
Paul Bakker68041ec2009-04-19 21:17:55 +000053 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020054 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000055 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020056#define MBEDTLS_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000057
Paul Bakkerf3b86c12011-01-27 15:24:17 +000058/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020059 * \def MBEDTLS_HAVE_SSE2
Paul Bakkerf3b86c12011-01-27 15:24:17 +000060 *
Paul Bakkere23c3152012-10-01 14:42:47 +000061 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000062 *
Paul Bakker5121ce52009-01-03 21:22:43 +000063 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000064 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020065//#define MBEDTLS_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020066
67/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020068 * \def MBEDTLS_HAVE_TIME
Paul Bakkerfa9b1002013-07-03 15:31:03 +020069 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020070 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +020071 *
72 * Comment if your system does not support time functions
73 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020074#define MBEDTLS_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +010075
76/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020077 * \def MBEDTLS_PLATFORM_MEMORY
Paul Bakkerdefc0ca2014-02-04 17:30:24 +010078 *
79 * Enable the memory allocation layer.
80 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +000081 * By default mbed TLS uses the system-provided malloc() and free().
Paul Bakkerdefc0ca2014-02-04 17:30:24 +010082 * This allows different allocators (self-implemented or provided) to be
83 * provided to the platform abstraction layer.
84 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020085 * Enabling MBEDTLS_PLATFORM_MEMORY without the
86 * MBEDTLS_PLATFORM_{FREE,MALLOC}_MACROs will provide
87 * "mbedtls_platform_set_malloc_free()" allowing you to set an alternative malloc() and
Rich Evans16f8cd82015-02-06 16:14:34 +000088 * free() function pointer at runtime.
89 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020090 * Enabling MBEDTLS_PLATFORM_MEMORY and specifying
91 * MBEDTLS_PLATFORM_{MALLOC,FREE}_MACROs will allow you to specify the
Rich Evans16f8cd82015-02-06 16:14:34 +000092 * alternate function at compile time.
Paul Bakkerdefc0ca2014-02-04 17:30:24 +010093 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020094 * Requires: MBEDTLS_PLATFORM_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +010095 *
96 * Enable this layer to allow use of alternative memory allocators.
97 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020098//#define MBEDTLS_PLATFORM_MEMORY
Paul Bakkerdefc0ca2014-02-04 17:30:24 +010099
100/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200101 * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
Paul Bakker088c5c52014-04-25 11:11:10 +0200102 *
103 * Do not assign standard functions in the platform layer (e.g. malloc() to
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200104 * MBEDTLS_PLATFORM_STD_MALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF)
Paul Bakker088c5c52014-04-25 11:11:10 +0200105 *
106 * This makes sure there are no linking errors on platforms that do not support
107 * these functions. You will HAVE to provide alternatives, either at runtime
108 * via the platform_set_xxx() functions or at compile time by setting
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200109 * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a
110 * MBEDTLS_PLATFORM_XXX_MACRO.
Paul Bakker088c5c52014-04-25 11:11:10 +0200111 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200112 * Requires: MBEDTLS_PLATFORM_C
Paul Bakker088c5c52014-04-25 11:11:10 +0200113 *
114 * Uncomment to prevent default assignment of standard functions in the
115 * platform layer.
116 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200117//#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
Paul Bakker088c5c52014-04-25 11:11:10 +0200118
119/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200120 * \def MBEDTLS_PLATFORM_XXX_ALT
Paul Bakker747a83a2014-02-01 22:50:07 +0100121 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000122 * Uncomment a macro to let mbed TLS support the function in the platform
Paul Bakker747a83a2014-02-01 22:50:07 +0100123 * abstraction layer.
124 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200125 * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will
126 * provide a function "mbedtls_platform_set_printf()" that allows you to set an
Paul Bakker747a83a2014-02-01 22:50:07 +0100127 * alternative printf function pointer.
128 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200129 * All these define require MBEDTLS_PLATFORM_C to be defined!
Paul Bakker747a83a2014-02-01 22:50:07 +0100130 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200131 * WARNING: MBEDTLS_PLATFORM_SNPRINTF_ALT is not available on Windows
Rich Evans46b0a8d2015-01-30 10:47:32 +0000132 * for compatibility reasons.
133 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200134 * WARNING: MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
135 * MBEDTLS_PLATFORM_XXX_MACRO!
Rich Evans16f8cd82015-02-06 16:14:34 +0000136 *
Paul Bakker747a83a2014-02-01 22:50:07 +0100137 * Uncomment a macro to enable alternate implementation of specific base
138 * platform function
139 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200140//#define MBEDTLS_PLATFORM_EXIT_ALT
141//#define MBEDTLS_PLATFORM_FPRINTF_ALT
142//#define MBEDTLS_PLATFORM_PRINTF_ALT
143//#define MBEDTLS_PLATFORM_SNPRINTF_ALT
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100144
145/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200146 * \def MBEDTLS_DEPRECATED_WARNING
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100147 *
148 * Mark deprecated functions so that they generate a warning if used.
149 * Functions deprecated in one version will usually be removed in the next
150 * version. You can enable this to help you prepare the transition to a new
151 * major version by making sure your code is not using these functions.
152 *
153 * This only works with GCC and Clang. With other compilers, you may want to
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200154 * use MBEDTLS_DEPRECATED_REMOVED
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100155 *
156 * Uncomment to get warnings on using deprecated functions.
157 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200158//#define MBEDTLS_DEPRECATED_WARNING
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100159
160/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200161 * \def MBEDTLS_DEPRECATED_REMOVED
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100162 *
163 * Remove deprecated functions so that they generate an error if used.
164 * Functions deprecated in one version will usually be removed in the next
165 * version. You can enable this to help you prepare the transition to a new
166 * major version by making sure your code is not using these functions.
167 *
168 * Uncomment to get errors on using deprecated functions.
169 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200170//#define MBEDTLS_DEPRECATED_REMOVED
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100171
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200172/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000173
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000174/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000175 * \name SECTION: mbed TLS feature support
Paul Bakker0a62cd12011-01-21 11:00:08 +0000176 *
177 * This section sets support for features that are or are not needed
178 * within the modules that are enabled.
179 * \{
180 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000181
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000182/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200183 * \def MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +0100184 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200185 * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(),
186 * mbedtls_timing_get_timer(), mbedtls_set_alarm() and mbedtls_timing_m_sleep().
Paul Bakkerf2561b32014-02-06 15:11:55 +0100187 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200188 * Only works if you have MBEDTLS_TIMING_C enabled.
Paul Bakkerf2561b32014-02-06 15:11:55 +0100189 *
190 * You will need to provide a header "timing_alt.h" and an implementation at
191 * compile time.
192 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200193//#define MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +0100194
195/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200196 * \def MBEDTLS__MODULE_NAME__ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200197 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000198 * Uncomment a macro to let mbed TLS use your alternate core implementation of
Manuel Pégourié-Gonnardd1a82602015-05-12 14:20:23 +0200199 * a symmetric crypto or hash module (e.g. platform specific assembly
200 * optimized implementations). Keep in mind that the function prototypes
201 * should remain the same.
Paul Bakker90995b52013-06-24 19:20:35 +0200202 *
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200203 * This replaces the whole module. If you only want to replace one of the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200204 * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags.
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200205 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200206 * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer
207 * provide the "struct mbedtls_aes_context" definition and omit the base function
Paul Bakker90995b52013-06-24 19:20:35 +0200208 * declarations and implementations. "aes_alt.h" will be included from
209 * "aes.h" to include the new function definitions.
210 *
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200211 * Uncomment a macro to enable alternate implementation of the corresponding
212 * module.
Paul Bakker90995b52013-06-24 19:20:35 +0200213 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200214//#define MBEDTLS_AES_ALT
215//#define MBEDTLS_ARC4_ALT
216//#define MBEDTLS_BLOWFISH_ALT
217//#define MBEDTLS_CAMELLIA_ALT
218//#define MBEDTLS_DES_ALT
219//#define MBEDTLS_XTEA_ALT
220//#define MBEDTLS_MD2_ALT
221//#define MBEDTLS_MD4_ALT
222//#define MBEDTLS_MD5_ALT
223//#define MBEDTLS_RIPEMD160_ALT
224//#define MBEDTLS_SHA1_ALT
225//#define MBEDTLS_SHA256_ALT
226//#define MBEDTLS_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200227
228/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200229 * \def MBEDTLS__FUNCTION_NAME__ALT
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200230 *
231 * Uncomment a macro to let mbed TLS use you alternate core implementation of
Manuel Pégourié-Gonnardd1a82602015-05-12 14:20:23 +0200232 * symmetric crypto or hash function. Keep in mind that function prototypes
233 * should remain the same.
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200234 *
235 * This replaces only one function. The header file from mbed TLS is still
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200236 * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags.
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200237 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200238 * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will
239 * no longer provide the mbedtls_sha1_process() function, but it will still provide
240 * the other function (using your mbedtls_sha1_process() function) and the definition
241 * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200242 * with this definition.
243 *
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200244 * Uncomment a macro to enable alternate implementation of the corresponding
245 * function.
246 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200247//#define MBEDTLS_MD2_PROCESS_ALT
248//#define MBEDTLS_MD4_PROCESS_ALT
249//#define MBEDTLS_MD5_PROCESS_ALT
250//#define MBEDTLS_RIPEMD160_PROCESS_ALT
251//#define MBEDTLS_SHA1_PROCESS_ALT
252//#define MBEDTLS_SHA256_PROCESS_ALT
253//#define MBEDTLS_SHA512_PROCESS_ALT
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200254
255/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200256 * \def MBEDTLS_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000257 *
258 * Store the AES tables in ROM.
259 *
260 * Uncomment this macro to store the AES tables in ROM.
Paul Bakker15566e42011-04-24 21:19:15 +0000261 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200262//#define MBEDTLS_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000263
264/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200265 * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
Manuel Pégourié-Gonnard62edcc82015-04-03 16:28:19 +0200266 *
267 * Use less ROM for the Camellia implementation (saves about 768 bytes).
268 *
269 * Uncomment this macro to use less memory for Camellia.
270 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200271//#define MBEDTLS_CAMELLIA_SMALL_MEMORY
Manuel Pégourié-Gonnard62edcc82015-04-03 16:28:19 +0200272
273/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200274 * \def MBEDTLS_CIPHER_MODE_CBC
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200275 *
276 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
277 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200278#define MBEDTLS_CIPHER_MODE_CBC
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200279
280/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200281 * \def MBEDTLS_CIPHER_MODE_CFB
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000282 *
283 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
284 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200285#define MBEDTLS_CIPHER_MODE_CFB
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000286
287/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200288 * \def MBEDTLS_CIPHER_MODE_CTR
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000289 *
290 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
291 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200292#define MBEDTLS_CIPHER_MODE_CTR
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000293
294/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200295 * \def MBEDTLS_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000296 *
297 * Enable NULL cipher.
298 * Warning: Only do so when you know what you are doing. This allows for
299 * encryption or channels without any security!
300 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200301 * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable
Paul Bakkerfab5c822012-02-06 16:45:10 +0000302 * the following ciphersuites:
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200303 * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA
304 * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA
305 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA
306 * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA
307 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384
308 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256
309 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA
310 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384
311 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256
312 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA
313 * MBEDTLS_TLS_RSA_WITH_NULL_SHA256
314 * MBEDTLS_TLS_RSA_WITH_NULL_SHA
315 * MBEDTLS_TLS_RSA_WITH_NULL_MD5
316 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384
317 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256
318 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA
319 * MBEDTLS_TLS_PSK_WITH_NULL_SHA384
320 * MBEDTLS_TLS_PSK_WITH_NULL_SHA256
321 * MBEDTLS_TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000322 *
323 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000324 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200325//#define MBEDTLS_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000326
327/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200328 * \def MBEDTLS_CIPHER_PADDING_XXX
Paul Bakker48e93c82013-08-14 12:21:18 +0200329 *
330 * Uncomment or comment macros to add support for specific padding modes
331 * in the cipher layer with cipher modes that support padding (e.g. CBC)
332 *
333 * If you disable all padding modes, only full blocks can be used with CBC.
334 *
335 * Enable padding modes in the cipher layer.
336 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200337#define MBEDTLS_CIPHER_PADDING_PKCS7
338#define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
339#define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
340#define MBEDTLS_CIPHER_PADDING_ZEROS
Paul Bakker48e93c82013-08-14 12:21:18 +0200341
342/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200343 * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000344 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200345 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000346 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000347 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000348 *
349 * This enables the following ciphersuites:
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200350 * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA
351 * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000352 *
353 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000354 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200355//#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000356
357/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200358 * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200359 *
360 * Remove RC4 ciphersuites by default in SSL / TLS.
361 * This flag removes the ciphersuites based on RC4 from the default list as
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200362 * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +0200363 * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200364 * explicitly.
365 *
366 * Uncomment this macro to remove RC4 ciphersuites by default.
367 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200368#define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200369
370/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200371 * \def MBEDTLS_ECP_XXXX_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200372 *
373 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200374 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200375 *
376 * Comment macros to disable the curve and functions for it
377 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200378#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
379#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
380#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
381#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
382#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
383#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
384#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
385#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
386#define MBEDTLS_ECP_DP_BP256R1_ENABLED
387#define MBEDTLS_ECP_DP_BP384R1_ENABLED
388#define MBEDTLS_ECP_DP_BP512R1_ENABLED
389//#define MBEDTLS_ECP_DP_M221_ENABLED // Not implemented yet!
390#define MBEDTLS_ECP_DP_M255_ENABLED
391//#define MBEDTLS_ECP_DP_M383_ENABLED // Not implemented yet!
392//#define MBEDTLS_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200393
394/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200395 * \def MBEDTLS_ECP_NIST_OPTIM
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200396 *
397 * Enable specific 'modulo p' routines for each NIST prime.
398 * Depending on the prime and architecture, makes operations 4 to 8 times
399 * faster on the corresponding curve.
400 *
401 * Comment this macro to disable NIST curves optimisation.
402 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200403#define MBEDTLS_ECP_NIST_OPTIM
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200404
405/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200406 * \def MBEDTLS_ECDSA_DETERMINISTIC
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100407 *
408 * Enable deterministic ECDSA (RFC 6979).
409 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
410 * may result in a compromise of the long-term signing key. This is avoided by
411 * the deterministic variant.
412 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200413 * Requires: MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100414 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100415 * Comment this macro to disable deterministic ECDSA.
416 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200417#define MBEDTLS_ECDSA_DETERMINISTIC
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100418
419/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200420 * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200421 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200422 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200423 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200424 * This enables the following ciphersuites (if other requisites are
425 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200426 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
427 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
428 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
429 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
430 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
431 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
432 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
433 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
434 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
435 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
436 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
437 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200438 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200439#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200440
441/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200442 * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200443 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200444 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200445 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200446 * Requires: MBEDTLS_DHM_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200447 *
448 * This enables the following ciphersuites (if other requisites are
449 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200450 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
451 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
452 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
453 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
454 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
455 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
456 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
457 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
458 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
459 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
460 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
461 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200462 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200463#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200464
465/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200466 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200467 *
468 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
469 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200470 * Requires: MBEDTLS_ECDH_C
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200471 *
472 * This enables the following ciphersuites (if other requisites are
473 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200474 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
475 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
476 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
477 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
478 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
479 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
480 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
481 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200482 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200483#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200484
485/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200486 * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200487 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200488 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200489 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200490 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
491 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200492 *
493 * This enables the following ciphersuites (if other requisites are
494 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200495 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
496 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
497 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
498 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
499 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
500 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
501 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
502 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
503 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
504 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
505 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
506 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200507 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200508#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200509
510/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200511 * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200512 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200513 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200514 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200515 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
516 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200517 *
518 * This enables the following ciphersuites (if other requisites are
519 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200520 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
521 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
522 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
523 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
524 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
525 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
526 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
527 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
528 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
529 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
530 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
531 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
532 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
533 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
534 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200535 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200536#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200537
538/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200539 * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200540 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200541 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200542 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200543 * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
544 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200545 *
546 * This enables the following ciphersuites (if other requisites are
547 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200548 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
549 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
550 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
551 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
552 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
553 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
554 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
555 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
556 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
557 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
558 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
559 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
560 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200561 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200562#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200563
564/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200565 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200566 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200567 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200568 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200569 * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
570 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200571 *
572 * This enables the following ciphersuites (if other requisites are
573 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200574 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
575 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
576 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
577 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
578 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
579 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
580 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
581 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
582 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
583 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
584 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
585 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200586 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200587#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200588
589/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200590 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200591 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200592 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200593 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200594 * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200595 *
596 * This enables the following ciphersuites (if other requisites are
597 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200598 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
599 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
600 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
601 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
602 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
603 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
604 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
605 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
606 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
607 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
608 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
609 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200610 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200611#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200612
613/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200614 * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100615 *
616 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
617 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200618 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100619 *
620 * This enables the following ciphersuites (if other requisites are
621 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200622 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
623 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
624 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
625 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
626 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
627 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
628 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
629 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
630 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
631 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
632 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
633 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100634 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200635#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100636
637/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200638 * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100639 *
640 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
641 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200642 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100643 *
644 * This enables the following ciphersuites (if other requisites are
645 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200646 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
647 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
648 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
649 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
650 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
651 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
652 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
653 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
654 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
655 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
656 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
657 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100658 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200659#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100660
661/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200662 * \def MBEDTLS_PK_PARSE_EC_EXTENDED
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100663 *
664 * Enhance support for reading EC keys using variants of SEC1 not allowed by
665 * RFC 5915 and RFC 5480.
666 *
667 * Currently this means parsing the SpecifiedECDomain choice of EC
668 * parameters (only known groups are supported, not arbitrary domains, to
669 * avoid validation issues).
670 *
671 * Disable if you only need to support RFC 5915 + 5480 key formats.
672 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200673#define MBEDTLS_PK_PARSE_EC_EXTENDED
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100674
675/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200676 * \def MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100677 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200678 * Enable a dummy error function to make use of mbedtls_strerror() in
679 * third party libraries easier when MBEDTLS_ERROR_C is disabled
680 * (no effect when MBEDTLS_ERROR_C is enabled).
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200681 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200682 * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
683 * not using mbedtls_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100684 *
685 * Disable if you run into name conflicts and want to really remove the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200686 * mbedtls_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100687 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200688#define MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100689
690/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200691 * \def MBEDTLS_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000692 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200693 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200694 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200695 * Requires: MBEDTLS_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000696 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200697#define MBEDTLS_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000698
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000699/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200700 * \def MBEDTLS_FS_IO
Paul Bakker335db3f2011-04-25 15:28:35 +0000701 *
702 * Enable functions that use the filesystem.
703 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200704#define MBEDTLS_FS_IO
Paul Bakker335db3f2011-04-25 15:28:35 +0000705
706/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200707 * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000708 *
709 * Do not add default entropy sources. These are the platform specific,
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200710 * mbedtls_timing_hardclock and HAVEGE based poll functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000711 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700712 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000713 * application.
714 *
715 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000716 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200717//#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000718
719/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200720 * \def MBEDTLS_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000721 *
722 * Do not use built-in platform entropy functions.
723 * This is useful if your platform does not support
724 * standards like the /dev/urandom or Windows CryptoAPI.
725 *
726 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000727 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200728//#define MBEDTLS_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000729
730/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200731 * \def MBEDTLS_ENTROPY_FORCE_SHA256
Paul Bakker2ceda572014-02-06 15:55:25 +0100732 *
733 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
734 * default SHA-512 based one (if both are available).
735 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200736 * Requires: MBEDTLS_SHA256_C
Paul Bakker2ceda572014-02-06 15:55:25 +0100737 *
738 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
739 * if you have performance concerns.
740 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200741 * This option is only useful if both MBEDTLS_SHA256_C and
742 * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
Paul Bakker2ceda572014-02-06 15:55:25 +0100743 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200744//#define MBEDTLS_ENTROPY_FORCE_SHA256
Paul Bakker2ceda572014-02-06 15:55:25 +0100745
746/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200747 * \def MBEDTLS_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200748 *
749 * Enable debugging of buffer allocator memory issues. Automatically prints
750 * (to stderr) all (fatal) messages on memory allocation issues. Enables
751 * function for 'debug output' of allocated memory.
752 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200753 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200754 *
755 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200756 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200757//#define MBEDTLS_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200758
759/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200760 * \def MBEDTLS_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200761 *
762 * Include backtrace information with each allocated block.
763 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200764 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200765 * GLIBC-compatible backtrace() an backtrace_symbols() support
766 *
767 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200768 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200769//#define MBEDTLS_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200770
771/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200772 * \def MBEDTLS_PK_RSA_ALT_SUPPORT
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +0200773 *
774 * Support external private RSA keys (eg from a HSM) in the PK layer.
775 *
776 * Comment this macro to disable support for external private RSA keys.
777 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200778#define MBEDTLS_PK_RSA_ALT_SUPPORT
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +0200779
780/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200781 * \def MBEDTLS_PKCS1_V15
Paul Bakker48377d92013-08-30 12:06:24 +0200782 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200783 * Enable support for PKCS#1 v1.5 encoding.
784 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200785 * Requires: MBEDTLS_RSA_C
Paul Bakker48377d92013-08-30 12:06:24 +0200786 *
Paul Bakker48377d92013-08-30 12:06:24 +0200787 * This enables support for PKCS#1 v1.5 operations.
788 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200789#define MBEDTLS_PKCS1_V15
Paul Bakker48377d92013-08-30 12:06:24 +0200790
791/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200792 * \def MBEDTLS_PKCS1_V21
Paul Bakker9dcc3222011-03-08 14:16:06 +0000793 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200794 * Enable support for PKCS#1 v2.1 encoding.
795 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200796 * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000797 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000798 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
799 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200800#define MBEDTLS_PKCS1_V21
Paul Bakker9dcc3222011-03-08 14:16:06 +0000801
802/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200803 * \def MBEDTLS_RSA_NO_CRT
Paul Bakker0216cc12011-03-26 13:40:23 +0000804 *
805 * Do not use the Chinese Remainder Theorem for the RSA private operation.
806 *
807 * Uncomment this macro to disable the use of CRT in RSA.
808 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000809 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200810//#define MBEDTLS_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000811
812/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200813 * \def MBEDTLS_SELF_TEST
Paul Bakker15566e42011-04-24 21:19:15 +0000814 *
815 * Enable the checkup functions (*_self_test).
816 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200817#define MBEDTLS_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000818
819/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200820 * \def MBEDTLS_SSL_AEAD_RANDOM_IV
Manuel Pégourié-Gonnardd056ce02014-10-29 22:29:20 +0100821 *
822 * Generate a random IV rather than using the record sequence number as a
823 * nonce for ciphersuites using and AEAD algorithm (GCM or CCM).
824 *
825 * Using the sequence number is generally recommended.
826 *
827 * Uncomment this macro to always use random IVs with AEAD ciphersuites.
828 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200829//#define MBEDTLS_SSL_AEAD_RANDOM_IV
Manuel Pégourié-Gonnardd056ce02014-10-29 22:29:20 +0100830
831/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200832 * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100833 *
834 * Enable sending of alert messages in case of encountered errors as per RFC.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000835 * If you choose not to send the alert messages, mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100836 * with other servers, only debugging of failures is harder.
837 *
838 * The advantage of not sending alert messages, is that no information is given
839 * about reasons for failures thus preventing adversaries of gaining intel.
840 *
841 * Enable sending of all alert messages
842 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200843#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100844
845/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200846 * \def MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100847 *
848 * Enable the debug messages in SSL module for all issues.
849 * Debug messages have been disabled in some places to prevent timing
850 * attacks due to (unbalanced) debugging function calls.
851 *
852 * If you need all error reporting you should enable this during debugging,
853 * but remove this for production servers that should log as well.
854 *
855 * Uncomment this macro to report all debug messages on errors introducing
856 * a timing side-channel.
857 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100858 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200859//#define MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100860
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200861/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100862 *
863 * Enable support for Encrypt-then-MAC, RFC 7366.
864 *
865 * This allows peers that both support it to use a more robust protection for
866 * ciphersuites using CBC, providing deep resistance against timing attacks
867 * on the padding or underlying cipher.
868 *
869 * This only affects CBC ciphersuites, and is useless if none is defined.
870 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200871 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
872 * MBEDTLS_SSL_PROTO_TLS1_1 or
873 * MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100874 *
875 * Comment this macro to disable support for Encrypt-then-MAC
876 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200877#define MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100878
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200879/** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200880 *
881 * Enable support for Extended Master Secret, aka Session Hash
882 * (draft-ietf-tls-session-hash-02).
883 *
884 * This was introduced as "the proper fix" to the Triple Handshake familiy of
885 * attacks, but it is recommended to always use it (even if you disable
886 * renegotiation), since it actually fixes a more fundamental issue in the
887 * original SSL/TLS design, and has implications beyond Triple Handshake.
888 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200889 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
890 * MBEDTLS_SSL_PROTO_TLS1_1 or
891 * MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100892 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200893 * Comment this macro to disable support for Extended Master Secret.
894 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200895#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200896
Paul Bakkerd66f0702013-01-31 16:57:45 +0100897/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200898 * \def MBEDTLS_SSL_FALLBACK_SCSV
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200899 *
900 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
901 *
902 * For servers, it is recommended to always enable this, unless you support
903 * only one version of TLS, or know for sure that none of your clients
904 * implements a fallback strategy.
905 *
906 * For clients, you only need this if you're using a fallback strategy, which
907 * is not recommended in the first place, unless you absolutely need it to
908 * interoperate with buggy (version-intolerant) servers.
909 *
910 * Comment this macro to disable support for FALLBACK_SCSV
911 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200912#define MBEDTLS_SSL_FALLBACK_SCSV
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200913
914/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200915 * \def MBEDTLS_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000916 *
917 * Enable hooking functions in SSL module for hardware acceleration of
918 * individual records.
919 *
920 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000921 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200922//#define MBEDTLS_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000923
924/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200925 * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100926 *
927 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
928 *
929 * This is a countermeasure to the BEAST attack, which also minimizes the risk
930 * of interoperability issues compared to sending 0-length records.
931 *
932 * Comment this macro to disable 1/n-1 record splitting.
933 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200934#define MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100935
936/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200937 * \def MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100938 *
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100939 * Disable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100940 *
941 * The two main uses of renegotiation are (1) refresh keys on long-lived
942 * connections and (2) client authentication after the initial handshake.
943 * If you don't need renegotiation, it's probably better to disable it, since
944 * it has been associated with security issues in the past and is easy to
945 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100946 *
Manuel Pégourié-Gonnard55f968b2015-03-09 16:23:15 +0000947 * Comment this to disable support for renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100948 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200949#define MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100950
951/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200952 * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
Paul Bakker78a8c712013-03-06 17:01:52 +0100953 *
954 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200955 * SSL Server module (MBEDTLS_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100956 *
Manuel Pégourié-Gonnard265dd5c2015-03-10 13:48:34 +0000957 * Uncomment this macro to enable support for SSLv2 Client Hello messages.
Paul Bakker78a8c712013-03-06 17:01:52 +0100958 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200959//#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
Paul Bakker78a8c712013-03-06 17:01:52 +0100960
961/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200962 * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100963 *
964 * Pick the ciphersuite according to the client's preferences rather than ours
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200965 * in the SSL Server module (MBEDTLS_SSL_SRV_C).
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100966 *
967 * Uncomment this macro to respect client's ciphersuite order
968 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200969//#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100970
971/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200972 * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +0200973 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200974 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200975 *
976 * Comment this macro to disable support for the max_fragment_length extension
977 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200978#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +0200979
980/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200981 * \def MBEDTLS_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200982 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200983 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200984 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200985 * Requires: MBEDTLS_MD5_C
986 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200987 *
988 * Comment this macro to disable support for SSL 3.0
989 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200990#define MBEDTLS_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200991
992/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200993 * \def MBEDTLS_SSL_PROTO_TLS1
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200994 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200995 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200996 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200997 * Requires: MBEDTLS_MD5_C
998 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200999 *
1000 * Comment this macro to disable support for TLS 1.0
1001 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001002#define MBEDTLS_SSL_PROTO_TLS1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001003
1004/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001005 * \def MBEDTLS_SSL_PROTO_TLS1_1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001006 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001007 * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001008 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001009 * Requires: MBEDTLS_MD5_C
1010 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001011 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001012 * Comment this macro to disable support for TLS 1.1 / DTLS 1.0
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001013 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001014#define MBEDTLS_SSL_PROTO_TLS1_1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001015
1016/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001017 * \def MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001018 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001019 * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001020 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001021 * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001022 * (Depends on ciphersuites)
1023 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001024 * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001025 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001026#define MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001027
1028/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001029 * \def MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001030 *
1031 * Enable support for DTLS (all available versions).
1032 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001033 * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0,
1034 * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001035 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001036 * Requires: MBEDTLS_SSL_PROTO_TLS1_1
1037 * or MBEDTLS_SSL_PROTO_TLS1_2
1038 * MBEDTLS_TIMING_C
Manuel Pégourié-Gonnard8e704f02014-10-14 20:03:35 +02001039 *
1040 * \note Dependency on TIMING_C may be replaced by something more flexible
1041 * (callbacks or abstraction layer in the next major version). Please contact
1042 * us if you're having issues with this dependency.
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001043 *
1044 * Comment this macro to disable support for DTLS
1045 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001046#define MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001047
1048/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001049 * \def MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001050 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +01001051 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001052 *
Paul Bakker27e36d32014-04-08 12:33:37 +02001053 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001054 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001055#define MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001056
1057/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001058 * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001059 *
1060 * Enable support for the anti-replay mechanism in DTLS.
1061 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001062 * Requires: MBEDTLS_SSL_TLS_C
1063 * MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001064 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001065 * \warning Disabling this is often a security risk!
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001066 * See mbedtls_ssl_conf_dtls_anti_replay() for details.
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001067 *
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001068 * Comment this to disable anti-replay in DTLS.
1069 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001070#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001071
1072/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001073 * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001074 *
1075 * Enable support for HelloVerifyRequest on DTLS servers.
1076 *
1077 * This feature is highly recommended to prevent DTLS servers being used as
1078 * amplifiers in DoS attacks against other hosts. It should always be enabled
1079 * unless you know for sure amplification cannot be a problem in the
1080 * environment in which your server operates.
1081 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001082 * \warning Disabling this can ba a security risk! (see above)
1083 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001084 * Requires: MBEDTLS_SSL_SRV_C
1085 * MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001086 *
1087 * Comment this to disable support for HelloVerifyRequest.
1088 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001089#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001090
1091/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001092 * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001093 *
1094 * Enable support for a limit of records with bad MAC.
1095 *
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001096 * See mbedtls_ssl_conf_dtls_badmac_limit().
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001097 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001098 * Requires: MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001099 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001100#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001101
1102/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001103 * \def MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +02001104 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001105 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +02001106 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001107 * Requires: MBEDTLS_AES_C
1108 * MBEDTLS_SHA256_C
1109 * MBEDTLS_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +02001110 *
1111 * Comment this macro to disable support for SSL session tickets
1112 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001113#define MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +02001114
1115/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001116 * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +02001117 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001118 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +02001119 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001120 * Requires: MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +00001121 *
Paul Bakker0be444a2013-08-27 21:55:01 +02001122 * Comment this macro to disable support for server name indication in SSL
1123 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001124#define MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +02001125
1126/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001127 * \def MBEDTLS_SSL_TRUNCATED_HMAC
Paul Bakker1f2bc622013-08-15 13:45:55 +02001128 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001129 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +02001130 *
1131 * Comment this macro to disable support for truncated HMAC in SSL
1132 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001133#define MBEDTLS_SSL_TRUNCATED_HMAC
Paul Bakker1f2bc622013-08-15 13:45:55 +02001134
1135/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001136 * \def MBEDTLS_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001137 *
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001138 * Enable mbedtls_ssl_conf_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001139 *
1140 * This is disabled by default since it breaks binary compatibility with the
1141 * 1.3.x line. If you choose to enable it, you will need to rebuild your
1142 * application against the new header files, relinking will not be enough.
1143 * It will be enabled by default, or no longer an option, in the 1.4 branch.
1144 *
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001145 * Uncomment to make mbedtls_ssl_conf_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001146 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001147//#define MBEDTLS_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001148
1149/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001150 * \def MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001151 *
1152 * Provide your own alternate threading implementation.
1153 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001154 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001155 *
1156 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +02001157 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001158//#define MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001159
1160/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001161 * \def MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001162 *
1163 * Enable the pthread wrapper layer for the threading layer.
1164 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001165 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001166 *
1167 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +02001168 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001169//#define MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001170
1171/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001172 * \def MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001173 *
1174 * Allow run-time checking of compile-time enabled features. Thus allowing users
1175 * to check at run-time if the library is for instance compiled with threading
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001176 * support via mbedtls_version_check_feature().
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001177 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001178 * Requires: MBEDTLS_VERSION_C
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001179 *
1180 * Comment this to disable run-time checking and save ROM space
1181 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001182#define MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001183
1184/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001185 * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001186 *
1187 * If set, the X509 parser will not break-off when parsing an X509 certificate
1188 * and encountering an extension in a v1 or v2 certificate.
1189 *
1190 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001191 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001192//#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001193
1194/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001195 * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker5c721f92011-07-27 16:51:09 +00001196 *
1197 * If set, the X509 parser will not break-off when parsing an X509 certificate
1198 * and encountering an unknown critical extension.
1199 *
1200 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +00001201 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001202//#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +00001203
1204/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001205 * \def MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001206 *
1207 * Enable verification of the keyUsage extension (CA and leaf certificates).
1208 *
1209 * Disabling this avoids problems with mis-issued and/or misused
1210 * (intermediate) CA and leaf certificates.
1211 *
1212 * \warning Depending on your PKI use, disabling this can be a security risk!
1213 *
1214 * Comment to skip keyUsage checking for both CA and leaf certificates.
1215 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001216#define MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001217
1218/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001219 * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001220 *
1221 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1222 *
1223 * Disabling this avoids problems with mis-issued and/or misused certificates.
1224 *
1225 * \warning Depending on your PKI use, disabling this can be a security risk!
1226 *
1227 * Comment to skip extendedKeyUsage checking for certificates.
1228 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001229#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001230
1231/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001232 * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001233 *
1234 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1235 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1236 *
1237 * Comment this macro to disallow using RSASSA-PSS in certificates.
1238 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001239#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001240
1241/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001242 * \def MBEDTLS_ZLIB_SUPPORT
Paul Bakker2770fbd2012-07-03 13:30:23 +00001243 *
1244 * If set, the SSL/TLS module uses ZLIB to support compression and
1245 * decompression of packet data.
1246 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001247 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1248 * CRIME attack. Before enabling this option, you should examine with care if
1249 * CRIME or similar exploits may be a applicable to your use case.
1250 *
Manuel Pégourié-Gonnarda0e16322014-07-14 17:38:41 +02001251 * \note Currently compression can't bu used with DTLS.
1252 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001253 * Used in: library/ssl_tls.c
1254 * library/ssl_cli.c
1255 * library/ssl_srv.c
1256 *
1257 * This feature requires zlib library and headers to be present.
1258 *
1259 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001260 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001261//#define MBEDTLS_ZLIB_SUPPORT
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001262/* \} name SECTION: mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001263
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001264/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001265 * \name SECTION: mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +00001266 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001267 * This section enables or disables entire modules in mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +00001268 * \{
1269 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001270
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001271/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001272 * \def MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001273 *
1274 * Enable AES-NI support on x86-64.
1275 *
1276 * Module: library/aesni.c
1277 * Caller: library/aes.c
1278 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001279 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001280 *
1281 * This modules adds support for the AES-NI instructions on x86-64
1282 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001283#define MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001284
1285/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001286 * \def MBEDTLS_AES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001287 *
1288 * Enable the AES block cipher.
1289 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001290 * Module: library/aes.c
1291 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001292 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001293 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001294 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001295 * This module enables the following ciphersuites (if other requisites are
1296 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001297 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1298 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1299 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1300 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1301 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1302 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1303 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1304 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1305 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1306 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1307 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1308 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
1309 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1310 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1311 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1312 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1313 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
1314 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
1315 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
1316 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
1317 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1318 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1319 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1320 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1321 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1322 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1323 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1324 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1325 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1326 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1327 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1328 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1329 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1330 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1331 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1332 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1333 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1334 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1335 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1336 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1337 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
1338 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
1339 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
1340 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
1341 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
1342 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
1343 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1344 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1345 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1346 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1347 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1348 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1349 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
1350 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
1351 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
1352 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
1353 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
1354 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001355 *
Paul Bakkercff68422013-09-15 20:43:33 +02001356 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001357 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001358#define MBEDTLS_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001359
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001360/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001361 * \def MBEDTLS_ARC4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001362 *
1363 * Enable the ARCFOUR stream cipher.
1364 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001365 * Module: library/arc4.c
1366 * Caller: library/ssl_tls.c
1367 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001368 * This module enables the following ciphersuites (if other requisites are
1369 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001370 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1371 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
1372 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
1373 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
1374 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
1375 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
1376 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
1377 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
1378 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
1379 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001380 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001381#define MBEDTLS_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001382
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001383/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001384 * \def MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001385 *
1386 * Enable the generic ASN1 parser.
1387 *
1388 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001389 * Caller: library/x509.c
1390 * library/dhm.c
1391 * library/pkcs12.c
1392 * library/pkcs5.c
1393 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001394 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001395#define MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001396
1397/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001398 * \def MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001399 *
1400 * Enable the generic ASN1 writer.
1401 *
1402 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001403 * Caller: library/ecdsa.c
1404 * library/pkwrite.c
1405 * library/x509_create.c
1406 * library/x509write_crt.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001407 * library/mbedtls_x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001408 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001409#define MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001410
1411/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001412 * \def MBEDTLS_BASE64_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001413 *
1414 * Enable the Base64 module.
1415 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001416 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001417 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001418 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001419 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001420 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001421#define MBEDTLS_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001422
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001423/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001424 * \def MBEDTLS_BIGNUM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001425 *
Paul Bakker9a736322012-11-14 12:39:52 +00001426 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001427 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001428 * Module: library/bignum.c
1429 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001430 * library/ecp.c
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001431 * library/ecdsa.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001432 * library/rsa.c
1433 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001434 *
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001435 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
Paul Bakker5121ce52009-01-03 21:22:43 +00001436 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001437#define MBEDTLS_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001438
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001439/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001440 * \def MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001441 *
1442 * Enable the Blowfish block cipher.
1443 *
1444 * Module: library/blowfish.c
1445 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001446#define MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001447
1448/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001449 * \def MBEDTLS_CAMELLIA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001450 *
1451 * Enable the Camellia block cipher.
1452 *
Paul Bakker38119b12009-01-10 23:31:23 +00001453 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001454 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001455 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001456 * This module enables the following ciphersuites (if other requisites are
1457 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001458 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1459 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1460 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1461 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1462 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1463 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1464 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1465 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
1466 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1467 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1468 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1469 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1470 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
1471 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
1472 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1473 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1474 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1475 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1476 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1477 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1478 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1479 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1480 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1481 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1482 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1483 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1484 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1485 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1486 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1487 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1488 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1489 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1490 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1491 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1492 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1493 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1494 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1495 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1496 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1497 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1498 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1499 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001500 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001501#define MBEDTLS_CAMELLIA_C
Paul Bakker38119b12009-01-10 23:31:23 +00001502
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001503/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001504 * \def MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001505 *
1506 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1507 *
1508 * Module: library/ccm.c
1509 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001510 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001511 *
1512 * This module enables the AES-CCM ciphersuites, if other requisites are
1513 * enabled as well.
1514 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001515#define MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001516
1517/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001518 * \def MBEDTLS_CERTS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001519 *
1520 * Enable the test certificates.
1521 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001522 * Module: library/certs.c
1523 * Caller:
1524 *
1525 * This module is used for testing (ssl_client/server).
1526 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001527#define MBEDTLS_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001528
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001529/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001530 * \def MBEDTLS_CIPHER_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001531 *
1532 * Enable the generic cipher layer.
1533 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001534 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001535 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001536 *
1537 * Uncomment to enable generic cipher wrappers.
1538 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001539#define MBEDTLS_CIPHER_C
Paul Bakker8123e9d2011-01-06 15:37:30 +00001540
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001541/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001542 * \def MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001543 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001544 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001545 *
1546 * Module: library/ctr_drbg.c
1547 * Caller:
1548 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001549 * Requires: MBEDTLS_AES_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001550 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001551 * This module provides the CTR_DRBG AES-256 random number generator.
1552 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001553#define MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001554
1555/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001556 * \def MBEDTLS_DEBUG_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001557 *
1558 * Enable the debug functions.
1559 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001560 * Module: library/debug.c
1561 * Caller: library/ssl_cli.c
1562 * library/ssl_srv.c
1563 * library/ssl_tls.c
1564 *
1565 * This module provides debugging functions.
1566 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001567#define MBEDTLS_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001568
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001569/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001570 * \def MBEDTLS_DES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001571 *
1572 * Enable the DES block cipher.
1573 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001574 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001575 * Caller: library/pem.c
1576 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001577 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001578 * This module enables the following ciphersuites (if other requisites are
1579 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001580 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1581 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
1582 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
1583 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1584 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1585 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1586 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1587 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
1588 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
1589 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001590 *
Paul Bakkercff68422013-09-15 20:43:33 +02001591 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001592 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001593#define MBEDTLS_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001594
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001595/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001596 * \def MBEDTLS_DHM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001597 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001598 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001599 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001600 * Module: library/dhm.c
1601 * Caller: library/ssl_cli.c
1602 * library/ssl_srv.c
1603 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001604 * This module is used by the following key exchanges:
1605 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001606 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001607#define MBEDTLS_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001608
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001609/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001610 * \def MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001611 *
1612 * Enable the elliptic curve Diffie-Hellman library.
1613 *
1614 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001615 * Caller: library/ssl_cli.c
1616 * library/ssl_srv.c
1617 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001618 * This module is used by the following key exchanges:
1619 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001620 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001621 * Requires: MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001622 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001623#define MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001624
1625/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001626 * \def MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001627 *
1628 * Enable the elliptic curve DSA library.
1629 *
1630 * Module: library/ecdsa.c
1631 * Caller:
1632 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001633 * This module is used by the following key exchanges:
1634 * ECDHE-ECDSA
1635 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001636 * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001637 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001638#define MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001639
1640/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001641 * \def MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001642 *
1643 * Enable the elliptic curve over GF(p) library.
1644 *
1645 * Module: library/ecp.c
1646 * Caller: library/ecdh.c
1647 * library/ecdsa.c
1648 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001649 * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001650 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001651#define MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001652
1653/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001654 * \def MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001655 *
1656 * Enable the platform-specific entropy code.
1657 *
1658 * Module: library/entropy.c
1659 * Caller:
1660 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001661 * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001662 *
1663 * This module provides a generic entropy pool
1664 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001665#define MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001666
1667/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001668 * \def MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001669 *
1670 * Enable error code to error string conversion.
1671 *
1672 * Module: library/error.c
1673 * Caller:
1674 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001675 * This module enables mbedtls_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001676 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001677#define MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001678
1679/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001680 * \def MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001681 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001682 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001683 *
1684 * Module: library/gcm.c
1685 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001686 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001687 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001688 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1689 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001690 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001691#define MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001692
1693/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001694 * \def MBEDTLS_HAVEGE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001695 *
1696 * Enable the HAVEGE random generator.
1697 *
Paul Bakker2a844242013-06-24 13:01:53 +02001698 * Warning: the HAVEGE random generator is not suitable for virtualized
1699 * environments
1700 *
1701 * Warning: the HAVEGE random generator is dependent on timing and specific
1702 * processor traits. It is therefore not advised to use HAVEGE as
1703 * your applications primary random generator or primary entropy pool
1704 * input. As a secondary input to your entropy pool, it IS able add
1705 * the (limited) extra entropy it provides.
1706 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001707 * Module: library/havege.c
1708 * Caller:
1709 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001710 * Requires: MBEDTLS_TIMING_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001711 *
Paul Bakker2a844242013-06-24 13:01:53 +02001712 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001713 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001714//#define MBEDTLS_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001715
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001716/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001717 * \def MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001718 *
1719 * Enable the HMAC_DRBG random generator.
1720 *
1721 * Module: library/hmac_drbg.c
1722 * Caller:
1723 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001724 * Requires: MBEDTLS_MD_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001725 *
1726 * Uncomment to enable the HMAC_DRBG random number geerator.
1727 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001728#define MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001729
1730/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001731 * \def MBEDTLS_MD_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001732 *
1733 * Enable the generic message digest layer.
1734 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001735 * Module: library/mbedtls_md.c
Paul Bakker17373852011-01-06 14:20:01 +00001736 * Caller:
1737 *
1738 * Uncomment to enable generic message digest wrappers.
1739 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001740#define MBEDTLS_MD_C
Paul Bakker17373852011-01-06 14:20:01 +00001741
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001742/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001743 * \def MBEDTLS_MD2_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001744 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001745 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001746 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001747 * Module: library/mbedtls_md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001748 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001749 *
1750 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001751 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001752//#define MBEDTLS_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001753
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001754/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001755 * \def MBEDTLS_MD4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001756 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001757 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001758 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001759 * Module: library/mbedtls_md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001760 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001761 *
1762 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001763 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001764//#define MBEDTLS_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001765
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001766/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001767 * \def MBEDTLS_MD5_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001768 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001769 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001770 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001771 * Module: library/mbedtls_md5.c
1772 * Caller: library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001773 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001774 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001775 *
1776 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001777 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001778 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001779#define MBEDTLS_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001780
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001781/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001782 * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001783 *
1784 * Enable the buffer allocator implementation that makes use of a (stack)
1785 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1786 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001787 *
1788 * Module: library/memory_buffer_alloc.c
1789 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001790 * Requires: MBEDTLS_PLATFORM_C
1791 * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
Paul Bakker6e339b52013-07-03 13:37:05 +02001792 *
1793 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001794 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001795//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001796
1797/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001798 * \def MBEDTLS_NET_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001799 *
1800 * Enable the TCP/IP networking routines.
1801 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001802 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001803 *
1804 * This module provides TCP/IP networking routines.
1805 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001806#define MBEDTLS_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001807
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001808/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001809 * \def MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001810 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001811 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001812 *
1813 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001814 * Caller: library/asn1write.c
1815 * library/pkcs5.c
1816 * library/pkparse.c
1817 * library/pkwrite.c
1818 * library/rsa.c
1819 * library/x509.c
1820 * library/x509_create.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001821 * library/mbedtls_x509_crl.c
1822 * library/mbedtls_x509_crt.c
1823 * library/mbedtls_x509_csr.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001824 * library/x509write_crt.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001825 * library/mbedtls_x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001826 *
1827 * This modules translates between OIDs and internal values.
1828 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001829#define MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001830
1831/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001832 * \def MBEDTLS_PADLOCK_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001833 *
1834 * Enable VIA Padlock support on x86.
1835 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001836 * Module: library/padlock.c
1837 * Caller: library/aes.c
1838 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001839 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001840 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001841 * This modules adds support for the VIA PadLock on x86.
1842 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001843#define MBEDTLS_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001844
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001845/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001846 * \def MBEDTLS_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001847 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001848 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001849 *
1850 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001851 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001852 * library/pkparse.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001853 * library/mbedtls_x509_crl.c
1854 * library/mbedtls_x509_crt.c
1855 * library/mbedtls_x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001856 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001857 * Requires: MBEDTLS_BASE64_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001858 *
Paul Bakkercff68422013-09-15 20:43:33 +02001859 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001860 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001861#define MBEDTLS_PEM_PARSE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001862
1863/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001864 * \def MBEDTLS_PEM_WRITE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001865 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001866 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001867 *
1868 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001869 * Caller: library/pkwrite.c
1870 * library/x509write_crt.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001871 * library/mbedtls_x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001872 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001873 * Requires: MBEDTLS_BASE64_C
Paul Bakkercff68422013-09-15 20:43:33 +02001874 *
1875 * This modules adds support for encoding / writing PEM files.
1876 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001877#define MBEDTLS_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001878
1879/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001880 * \def MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001881 *
1882 * Enable the generic public (asymetric) key layer.
1883 *
1884 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001885 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001886 * library/ssl_cli.c
1887 * library/ssl_srv.c
1888 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001889 * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001890 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001891 * Uncomment to enable generic public key wrappers.
1892 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001893#define MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001894
1895/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001896 * \def MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001897 *
1898 * Enable the generic public (asymetric) key parser.
1899 *
1900 * Module: library/pkparse.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001901 * Caller: library/mbedtls_x509_crt.c
1902 * library/mbedtls_x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001903 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001904 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02001905 *
1906 * Uncomment to enable generic public key parse functions.
1907 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001908#define MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001909
1910/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001911 * \def MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001912 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001913 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001914 *
1915 * Module: library/pkwrite.c
1916 * Caller: library/x509write.c
1917 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001918 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02001919 *
1920 * Uncomment to enable generic public key write functions.
1921 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001922#define MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001923
1924/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001925 * \def MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001926 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001927 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001928 *
1929 * Module: library/pkcs5.c
1930 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001931 * Requires: MBEDTLS_MD_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001932 *
1933 * This module adds support for the PKCS#5 functions.
1934 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001935#define MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001936
1937/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001938 * \def MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001939 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001940 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001941 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001942 * Module: library/pkcs11.c
1943 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001944 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001945 * Requires: MBEDTLS_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001946 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001947 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001948 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001949 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001950//#define MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001951
1952/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001953 * \def MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001954 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001955 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001956 * Adds algorithms for parsing PKCS#8 encrypted private keys
1957 *
1958 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001959 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001960 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001961 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
1962 * Can use: MBEDTLS_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001963 *
1964 * This module enables PKCS#12 functions.
1965 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001966#define MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001967
1968/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001969 * \def MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01001970 *
1971 * Enable the platform abstraction layer that allows you to re-assign
Rich Evansc39cb492015-01-30 12:01:34 +00001972 * functions like malloc(), free(), snprintf(), printf(), fprintf(), exit()
Paul Bakker747a83a2014-02-01 22:50:07 +01001973 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001974 * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
1975 * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
Rich Evans16f8cd82015-02-06 16:14:34 +00001976 * above to be specified at runtime or compile time respectively.
Paul Bakker747a83a2014-02-01 22:50:07 +01001977 *
1978 * Module: library/platform.c
1979 * Caller: Most other .c files
1980 *
1981 * This module enables abstraction of common (libc) functions.
1982 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001983#define MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01001984
1985/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001986 * \def MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001987 *
1988 * Enable the RIPEMD-160 hash algorithm.
1989 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001990 * Module: library/mbedtls_ripemd160.c
1991 * Caller: library/mbedtls_md.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001992 *
1993 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001994#define MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001995
1996/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001997 * \def MBEDTLS_RSA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001998 *
1999 * Enable the RSA public-key cryptosystem.
2000 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002001 * Module: library/rsa.c
2002 * Caller: library/ssl_cli.c
2003 * library/ssl_srv.c
2004 * library/ssl_tls.c
2005 * library/x509.c
2006 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02002007 * This module is used by the following key exchanges:
2008 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00002009 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002010 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002011 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002012#define MBEDTLS_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002013
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002014/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002015 * \def MBEDTLS_SHA1_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002016 *
2017 * Enable the SHA1 cryptographic hash algorithm.
2018 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002019 * Module: library/mbedtls_sha1.c
2020 * Caller: library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002021 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002022 * library/ssl_srv.c
2023 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002024 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002025 *
2026 * This module is required for SSL/TLS and SHA1-signed certificates.
2027 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002028#define MBEDTLS_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002029
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002030/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002031 * \def MBEDTLS_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002032 *
2033 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
2034 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002035 * Module: library/mbedtls_sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002036 * Caller: library/entropy.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002037 * library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002038 * library/ssl_cli.c
2039 * library/ssl_srv.c
2040 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002041 *
2042 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01002043 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00002044 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002045#define MBEDTLS_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002046
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002047/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002048 * \def MBEDTLS_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002049 *
2050 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
2051 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002052 * Module: library/mbedtls_sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002053 * Caller: library/entropy.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002054 * library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002055 * library/ssl_cli.c
2056 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002057 *
2058 * This module adds support for SHA-384 and SHA-512.
2059 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002060#define MBEDTLS_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002061
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002062/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002063 * \def MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002064 *
2065 * Enable simple SSL cache implementation.
2066 *
2067 * Module: library/ssl_cache.c
2068 * Caller:
2069 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002070 * Requires: MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002071 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002072#define MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002073
2074/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002075 * \def MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002076 *
2077 * Enable basic implementation of DTLS cookies for hello verification.
2078 *
2079 * Module: library/ssl_cookie.c
2080 * Caller:
2081 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002082 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002083 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002084#define MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002085
2086/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002087 * \def MBEDTLS_SSL_CLI_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002088 *
2089 * Enable the SSL/TLS client code.
2090 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002091 * Module: library/ssl_cli.c
2092 * Caller:
2093 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002094 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002095 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002096 * This module is required for SSL/TLS client support.
2097 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002098#define MBEDTLS_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002099
Paul Bakker9a736322012-11-14 12:39:52 +00002100/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002101 * \def MBEDTLS_SSL_SRV_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002102 *
2103 * Enable the SSL/TLS server code.
2104 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002105 * Module: library/ssl_srv.c
2106 * Caller:
2107 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002108 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002109 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002110 * This module is required for SSL/TLS server support.
2111 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002112#define MBEDTLS_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002113
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002114/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002115 * \def MBEDTLS_SSL_TLS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002116 *
Paul Bakkere29ab062011-05-18 13:26:54 +00002117 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002118 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002119 * Module: library/ssl_tls.c
2120 * Caller: library/ssl_cli.c
2121 * library/ssl_srv.c
2122 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002123 * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2124 * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
Paul Bakker5690efc2011-05-26 13:16:06 +00002125 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002126 * This module is required for SSL/TLS.
2127 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002128#define MBEDTLS_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002129
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002130/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002131 * \def MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002132 *
2133 * Enable the threading abstraction layer.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002134 * By default mbed TLS assumes it is used in a non-threaded environment or that
Paul Bakker2466d932013-09-28 14:40:38 +02002135 * contexts are not shared between threads. If you do intend to use contexts
2136 * between threads, you will need to enable this layer to prevent race
2137 * conditions.
2138 *
2139 * Module: library/threading.c
2140 *
2141 * This allows different threading implementations (self-implemented or
2142 * provided).
2143 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002144 * You will have to enable either MBEDTLS_THREADING_ALT or
2145 * MBEDTLS_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02002146 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002147 * Enable this layer to allow use of mutexes within mbed TLS
Paul Bakker2466d932013-09-28 14:40:38 +02002148 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002149//#define MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002150
2151/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002152 * \def MBEDTLS_TIMING_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002153 *
2154 * Enable the portable timing interface.
2155 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002156 * Module: library/timing.c
2157 * Caller: library/havege.c
2158 *
2159 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002160 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002161#define MBEDTLS_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002162
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002163/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002164 * \def MBEDTLS_VERSION_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002165 *
2166 * Enable run-time version information.
2167 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00002168 * Module: library/version.c
2169 *
2170 * This module provides run-time version information.
2171 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002172#define MBEDTLS_VERSION_C
Paul Bakker0a62cd12011-01-21 11:00:08 +00002173
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002174/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002175 * \def MBEDTLS_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002176 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002177 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002178 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002179 * Module: library/x509.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002180 * Caller: library/mbedtls_x509_crl.c
2181 * library/mbedtls_x509_crt.c
2182 * library/mbedtls_x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002183 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002184 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
2185 * MBEDTLS_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002186 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002187 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00002188 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002189#define MBEDTLS_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002190
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002191/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002192 * \def MBEDTLS_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002193 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002194 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002195 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002196 * Module: library/mbedtls_x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002197 * Caller: library/ssl_cli.c
2198 * library/ssl_srv.c
2199 * library/ssl_tls.c
2200 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002201 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002202 *
2203 * This module is required for X.509 certificate parsing.
2204 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002205#define MBEDTLS_X509_CRT_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002206
2207/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002208 * \def MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002209 *
2210 * Enable X.509 CRL parsing.
2211 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002212 * Module: library/mbedtls_x509_crl.c
2213 * Caller: library/mbedtls_x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002214 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002215 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002216 *
2217 * This module is required for X.509 CRL parsing.
2218 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002219#define MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002220
2221/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002222 * \def MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002223 *
2224 * Enable X.509 Certificate Signing Request (CSR) parsing.
2225 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002226 * Module: library/mbedtls_x509_csr.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002227 * Caller: library/x509_crt_write.c
2228 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002229 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002230 *
2231 * This module is used for reading X.509 certificate request.
2232 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002233#define MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002234
2235/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002236 * \def MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002237 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002238 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002239 *
2240 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002241 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002242 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002243 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002244 * This module is the basis for creating X.509 certificates and CSRs.
2245 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002246#define MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002247
2248/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002249 * \def MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002250 *
2251 * Enable creating X.509 certificates.
2252 *
2253 * Module: library/x509_crt_write.c
2254 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002255 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002256 *
2257 * This module is required for X.509 certificate creation.
2258 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002259#define MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002260
2261/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002262 * \def MBEDTLS_X509_CSR_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002263 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002264 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002265 *
2266 * Module: library/x509_csr_write.c
2267 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002268 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002269 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002270 * This module is required for X.509 certificate request writing.
2271 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002272#define MBEDTLS_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002273
2274/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002275 * \def MBEDTLS_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002276 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002277 * Enable the XTEA block cipher.
2278 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002279 * Module: library/xtea.c
2280 * Caller:
2281 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002282#define MBEDTLS_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002283
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002284/* \} name SECTION: mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002285
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002286/**
2287 * \name SECTION: Module configuration options
2288 *
2289 * This section allows for the setting of module specific sizes and
2290 * configuration options. The default values are already present in the
2291 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002292 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002293 * Our advice is to enable options and change their values here
2294 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002295 *
2296 * Please check the respective header file for documentation on these
2297 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002298 * \{
2299 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002300
Paul Bakker088c5c52014-04-25 11:11:10 +02002301/* MPI / BIGNUM options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002302//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2303//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002304
Paul Bakker088c5c52014-04-25 11:11:10 +02002305/* CTR_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002306//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2307//#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2308//#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2309//#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2310//#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002311
Paul Bakker088c5c52014-04-25 11:11:10 +02002312/* HMAC_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002313//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2314//#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2315//#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2316//#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002317
Paul Bakker088c5c52014-04-25 11:11:10 +02002318/* ECP options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002319//#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2320//#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2321//#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002322
Paul Bakker088c5c52014-04-25 11:11:10 +02002323/* Entropy options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002324//#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2325//#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002326
Paul Bakker088c5c52014-04-25 11:11:10 +02002327/* Memory buffer allocator options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002328//#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002329
Paul Bakker088c5c52014-04-25 11:11:10 +02002330/* Platform options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002331//#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. */
2332//#define MBEDTLS_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2333//#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2334//#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2335//#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2336//#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2337//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002338
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002339/* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
2340/* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
2341//#define MBEDTLS_PLATFORM_MALLOC_MACRO malloc /**< Default allocator macro to use, can be undefined */
2342//#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2343//#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2344//#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2345//#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
2346//#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002347
Paul Bakker088c5c52014-04-25 11:11:10 +02002348/* SSL Cache options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002349//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2350//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002351
Paul Bakker088c5c52014-04-25 11:11:10 +02002352/* SSL options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002353//#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2354//#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
2355//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
2356//#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002357
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002358/**
2359 * Complete list of ciphersuites to use, in order of preference.
2360 *
2361 * \warning No dependency checking is done on that field! This option can only
2362 * be used to restrict the set of available ciphersuites. It is your
2363 * responsibility to make sure the needed modules are active.
2364 *
2365 * Use this to save a few hundred bytes of ROM (default ordering of all
2366 * available ciphersuites) and a few to a few hundred bytes of RAM.
2367 *
2368 * The value below is only an example, not the default.
2369 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002370//#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002371
Paul Bakkereaebbd52014-04-25 15:04:14 +02002372/* Debug options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002373//#define MBEDTLS_DEBUG_DFL_MODE MBEDTLS_DEBUG_LOG_FULL /**< Default log: Full or Raw */
Paul Bakkereaebbd52014-04-25 15:04:14 +02002374
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002375/* X509 options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002376//#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002377
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002378/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002379
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002380#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002381
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002382#endif /* MBEDTLS_CONFIG_H */