blob: 0c72da9ba12170e29f7c6a860ab77c817f820aa5 [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é-Gonnard427b6722015-03-31 18:32:50 +0200199 * a symmetric or hash module (e.g. platform specific assembly optimized
Paul Bakker90995b52013-06-24 19:20:35 +0200200 * implementations). Keep in mind that the function prototypes should remain
201 * the same.
202 *
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
232 * symmetric of hash function. Keep in mind that function prototypes should
233 * remain the same.
234 *
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 *
244 *
245 * Uncomment a macro to enable alternate implementation of the corresponding
246 * function.
247 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200248//#define MBEDTLS_MD2_PROCESS_ALT
249//#define MBEDTLS_MD4_PROCESS_ALT
250//#define MBEDTLS_MD5_PROCESS_ALT
251//#define MBEDTLS_RIPEMD160_PROCESS_ALT
252//#define MBEDTLS_SHA1_PROCESS_ALT
253//#define MBEDTLS_SHA256_PROCESS_ALT
254//#define MBEDTLS_SHA512_PROCESS_ALT
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200255
256/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200257 * \def MBEDTLS_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000258 *
259 * Store the AES tables in ROM.
260 *
261 * Uncomment this macro to store the AES tables in ROM.
Paul Bakker15566e42011-04-24 21:19:15 +0000262 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200263//#define MBEDTLS_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000264
265/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200266 * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
Manuel Pégourié-Gonnard62edcc82015-04-03 16:28:19 +0200267 *
268 * Use less ROM for the Camellia implementation (saves about 768 bytes).
269 *
270 * Uncomment this macro to use less memory for Camellia.
271 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200272//#define MBEDTLS_CAMELLIA_SMALL_MEMORY
Manuel Pégourié-Gonnard62edcc82015-04-03 16:28:19 +0200273
274/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200275 * \def MBEDTLS_CIPHER_MODE_CBC
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200276 *
277 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
278 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200279#define MBEDTLS_CIPHER_MODE_CBC
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200280
281/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200282 * \def MBEDTLS_CIPHER_MODE_CFB
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000283 *
284 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
285 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200286#define MBEDTLS_CIPHER_MODE_CFB
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000287
288/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200289 * \def MBEDTLS_CIPHER_MODE_CTR
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000290 *
291 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
292 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200293#define MBEDTLS_CIPHER_MODE_CTR
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000294
295/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200296 * \def MBEDTLS_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000297 *
298 * Enable NULL cipher.
299 * Warning: Only do so when you know what you are doing. This allows for
300 * encryption or channels without any security!
301 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200302 * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable
Paul Bakkerfab5c822012-02-06 16:45:10 +0000303 * the following ciphersuites:
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200304 * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA
305 * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA
306 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA
307 * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA
308 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384
309 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256
310 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA
311 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384
312 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256
313 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA
314 * MBEDTLS_TLS_RSA_WITH_NULL_SHA256
315 * MBEDTLS_TLS_RSA_WITH_NULL_SHA
316 * MBEDTLS_TLS_RSA_WITH_NULL_MD5
317 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384
318 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256
319 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA
320 * MBEDTLS_TLS_PSK_WITH_NULL_SHA384
321 * MBEDTLS_TLS_PSK_WITH_NULL_SHA256
322 * MBEDTLS_TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000323 *
324 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000325 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200326//#define MBEDTLS_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000327
328/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200329 * \def MBEDTLS_CIPHER_PADDING_XXX
Paul Bakker48e93c82013-08-14 12:21:18 +0200330 *
331 * Uncomment or comment macros to add support for specific padding modes
332 * in the cipher layer with cipher modes that support padding (e.g. CBC)
333 *
334 * If you disable all padding modes, only full blocks can be used with CBC.
335 *
336 * Enable padding modes in the cipher layer.
337 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200338#define MBEDTLS_CIPHER_PADDING_PKCS7
339#define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
340#define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
341#define MBEDTLS_CIPHER_PADDING_ZEROS
Paul Bakker48e93c82013-08-14 12:21:18 +0200342
343/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200344 * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000345 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200346 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000347 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000348 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000349 *
350 * This enables the following ciphersuites:
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200351 * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA
352 * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000353 *
354 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000355 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200356//#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000357
358/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200359 * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200360 *
361 * Remove RC4 ciphersuites by default in SSL / TLS.
362 * This flag removes the ciphersuites based on RC4 from the default list as
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200363 * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +0200364 * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200365 * explicitly.
366 *
367 * Uncomment this macro to remove RC4 ciphersuites by default.
368 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200369#define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200370
371/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200372 * \def MBEDTLS_ECP_XXXX_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200373 *
374 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200375 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200376 *
377 * Comment macros to disable the curve and functions for it
378 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200379#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
380#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
381#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
382#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
383#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
384#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
385#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
386#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
387#define MBEDTLS_ECP_DP_BP256R1_ENABLED
388#define MBEDTLS_ECP_DP_BP384R1_ENABLED
389#define MBEDTLS_ECP_DP_BP512R1_ENABLED
390//#define MBEDTLS_ECP_DP_M221_ENABLED // Not implemented yet!
391#define MBEDTLS_ECP_DP_M255_ENABLED
392//#define MBEDTLS_ECP_DP_M383_ENABLED // Not implemented yet!
393//#define MBEDTLS_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200394
395/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200396 * \def MBEDTLS_ECP_NIST_OPTIM
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200397 *
398 * Enable specific 'modulo p' routines for each NIST prime.
399 * Depending on the prime and architecture, makes operations 4 to 8 times
400 * faster on the corresponding curve.
401 *
402 * Comment this macro to disable NIST curves optimisation.
403 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200404#define MBEDTLS_ECP_NIST_OPTIM
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200405
406/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200407 * \def MBEDTLS_ECDSA_DETERMINISTIC
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100408 *
409 * Enable deterministic ECDSA (RFC 6979).
410 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
411 * may result in a compromise of the long-term signing key. This is avoided by
412 * the deterministic variant.
413 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200414 * Requires: MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100415 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100416 * Comment this macro to disable deterministic ECDSA.
417 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200418#define MBEDTLS_ECDSA_DETERMINISTIC
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100419
420/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200421 * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200422 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200423 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200424 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200425 * This enables the following ciphersuites (if other requisites are
426 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200427 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
428 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
429 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
430 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
431 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
432 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
433 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
434 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
435 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
436 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
437 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
438 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200439 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200440#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200441
442/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200443 * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200444 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200445 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200446 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200447 * Requires: MBEDTLS_DHM_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200448 *
449 * This enables the following ciphersuites (if other requisites are
450 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200451 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
452 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
453 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
454 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
455 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
456 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
457 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
458 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
459 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
460 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
461 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
462 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200463 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200464#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200465
466/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200467 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200468 *
469 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
470 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200471 * Requires: MBEDTLS_ECDH_C
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200472 *
473 * This enables the following ciphersuites (if other requisites are
474 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200475 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
476 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
477 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
478 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
479 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
480 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
481 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
482 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200483 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200484#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200485
486/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200487 * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200488 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200489 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200490 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200491 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
492 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200493 *
494 * This enables the following ciphersuites (if other requisites are
495 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200496 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
497 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
498 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
499 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
500 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
501 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
502 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
503 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
504 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
505 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
506 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
507 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200508 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200509#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200510
511/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200512 * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200513 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200514 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200515 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200516 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
517 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200518 *
519 * This enables the following ciphersuites (if other requisites are
520 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200521 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
522 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
523 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
524 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
525 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
526 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
527 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
528 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
529 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
530 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
531 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
532 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
533 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
534 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
535 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200536 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200537#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200538
539/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200540 * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200541 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200542 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200543 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200544 * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
545 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200546 *
547 * This enables the following ciphersuites (if other requisites are
548 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200549 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
550 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
551 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
552 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
553 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
554 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
555 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
556 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
557 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
558 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
559 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
560 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
561 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200562 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200563#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200564
565/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200566 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200567 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200568 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200569 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200570 * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
571 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200572 *
573 * This enables the following ciphersuites (if other requisites are
574 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200575 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
576 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
577 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
578 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
579 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
580 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
581 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
582 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
583 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
584 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
585 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
586 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200587 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200588#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200589
590/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200591 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200592 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200593 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200594 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200595 * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200596 *
597 * This enables the following ciphersuites (if other requisites are
598 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200599 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
600 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
601 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
602 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
603 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
604 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
605 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
606 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
607 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
608 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
609 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
610 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200611 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200612#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200613
614/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200615 * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100616 *
617 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
618 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200619 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100620 *
621 * This enables the following ciphersuites (if other requisites are
622 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200623 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
624 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
625 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
626 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
627 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
628 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
629 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
630 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
631 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
632 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
633 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
634 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100635 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200636#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100637
638/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200639 * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100640 *
641 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
642 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200643 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100644 *
645 * This enables the following ciphersuites (if other requisites are
646 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200647 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
648 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
649 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
650 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
651 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
652 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
653 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
654 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
655 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
656 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
657 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
658 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100659 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200660#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100661
662/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200663 * \def MBEDTLS_PK_PARSE_EC_EXTENDED
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100664 *
665 * Enhance support for reading EC keys using variants of SEC1 not allowed by
666 * RFC 5915 and RFC 5480.
667 *
668 * Currently this means parsing the SpecifiedECDomain choice of EC
669 * parameters (only known groups are supported, not arbitrary domains, to
670 * avoid validation issues).
671 *
672 * Disable if you only need to support RFC 5915 + 5480 key formats.
673 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200674#define MBEDTLS_PK_PARSE_EC_EXTENDED
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100675
676/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200677 * \def MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100678 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200679 * Enable a dummy error function to make use of mbedtls_strerror() in
680 * third party libraries easier when MBEDTLS_ERROR_C is disabled
681 * (no effect when MBEDTLS_ERROR_C is enabled).
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200682 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200683 * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
684 * not using mbedtls_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100685 *
686 * Disable if you run into name conflicts and want to really remove the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200687 * mbedtls_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100688 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200689#define MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100690
691/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200692 * \def MBEDTLS_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000693 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200694 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200695 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200696 * Requires: MBEDTLS_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000697 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200698#define MBEDTLS_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000699
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000700/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200701 * \def MBEDTLS_FS_IO
Paul Bakker335db3f2011-04-25 15:28:35 +0000702 *
703 * Enable functions that use the filesystem.
704 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200705#define MBEDTLS_FS_IO
Paul Bakker335db3f2011-04-25 15:28:35 +0000706
707/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200708 * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000709 *
710 * Do not add default entropy sources. These are the platform specific,
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200711 * mbedtls_timing_hardclock and HAVEGE based poll functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000712 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700713 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000714 * application.
715 *
716 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000717 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200718//#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000719
720/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200721 * \def MBEDTLS_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000722 *
723 * Do not use built-in platform entropy functions.
724 * This is useful if your platform does not support
725 * standards like the /dev/urandom or Windows CryptoAPI.
726 *
727 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000728 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200729//#define MBEDTLS_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000730
731/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200732 * \def MBEDTLS_ENTROPY_FORCE_SHA256
Paul Bakker2ceda572014-02-06 15:55:25 +0100733 *
734 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
735 * default SHA-512 based one (if both are available).
736 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200737 * Requires: MBEDTLS_SHA256_C
Paul Bakker2ceda572014-02-06 15:55:25 +0100738 *
739 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
740 * if you have performance concerns.
741 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200742 * This option is only useful if both MBEDTLS_SHA256_C and
743 * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
Paul Bakker2ceda572014-02-06 15:55:25 +0100744 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200745//#define MBEDTLS_ENTROPY_FORCE_SHA256
Paul Bakker2ceda572014-02-06 15:55:25 +0100746
747/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200748 * \def MBEDTLS_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200749 *
750 * Enable debugging of buffer allocator memory issues. Automatically prints
751 * (to stderr) all (fatal) messages on memory allocation issues. Enables
752 * function for 'debug output' of allocated memory.
753 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200754 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200755 *
756 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200757 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200758//#define MBEDTLS_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200759
760/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200761 * \def MBEDTLS_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200762 *
763 * Include backtrace information with each allocated block.
764 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200765 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200766 * GLIBC-compatible backtrace() an backtrace_symbols() support
767 *
768 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200769 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200770//#define MBEDTLS_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200771
772/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200773 * \def MBEDTLS_PK_RSA_ALT_SUPPORT
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +0200774 *
775 * Support external private RSA keys (eg from a HSM) in the PK layer.
776 *
777 * Comment this macro to disable support for external private RSA keys.
778 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200779#define MBEDTLS_PK_RSA_ALT_SUPPORT
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +0200780
781/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200782 * \def MBEDTLS_PKCS1_V15
Paul Bakker48377d92013-08-30 12:06:24 +0200783 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200784 * Enable support for PKCS#1 v1.5 encoding.
785 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200786 * Requires: MBEDTLS_RSA_C
Paul Bakker48377d92013-08-30 12:06:24 +0200787 *
Paul Bakker48377d92013-08-30 12:06:24 +0200788 * This enables support for PKCS#1 v1.5 operations.
789 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200790#define MBEDTLS_PKCS1_V15
Paul Bakker48377d92013-08-30 12:06:24 +0200791
792/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200793 * \def MBEDTLS_PKCS1_V21
Paul Bakker9dcc3222011-03-08 14:16:06 +0000794 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200795 * Enable support for PKCS#1 v2.1 encoding.
796 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200797 * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000798 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000799 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
800 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200801#define MBEDTLS_PKCS1_V21
Paul Bakker9dcc3222011-03-08 14:16:06 +0000802
803/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200804 * \def MBEDTLS_RSA_NO_CRT
Paul Bakker0216cc12011-03-26 13:40:23 +0000805 *
806 * Do not use the Chinese Remainder Theorem for the RSA private operation.
807 *
808 * Uncomment this macro to disable the use of CRT in RSA.
809 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000810 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200811//#define MBEDTLS_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000812
813/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200814 * \def MBEDTLS_SELF_TEST
Paul Bakker15566e42011-04-24 21:19:15 +0000815 *
816 * Enable the checkup functions (*_self_test).
817 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200818#define MBEDTLS_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000819
820/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200821 * \def MBEDTLS_SSL_AEAD_RANDOM_IV
Manuel Pégourié-Gonnardd056ce02014-10-29 22:29:20 +0100822 *
823 * Generate a random IV rather than using the record sequence number as a
824 * nonce for ciphersuites using and AEAD algorithm (GCM or CCM).
825 *
826 * Using the sequence number is generally recommended.
827 *
828 * Uncomment this macro to always use random IVs with AEAD ciphersuites.
829 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200830//#define MBEDTLS_SSL_AEAD_RANDOM_IV
Manuel Pégourié-Gonnardd056ce02014-10-29 22:29:20 +0100831
832/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200833 * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100834 *
835 * Enable sending of alert messages in case of encountered errors as per RFC.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000836 * If you choose not to send the alert messages, mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100837 * with other servers, only debugging of failures is harder.
838 *
839 * The advantage of not sending alert messages, is that no information is given
840 * about reasons for failures thus preventing adversaries of gaining intel.
841 *
842 * Enable sending of all alert messages
843 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200844#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100845
846/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200847 * \def MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100848 *
849 * Enable the debug messages in SSL module for all issues.
850 * Debug messages have been disabled in some places to prevent timing
851 * attacks due to (unbalanced) debugging function calls.
852 *
853 * If you need all error reporting you should enable this during debugging,
854 * but remove this for production servers that should log as well.
855 *
856 * Uncomment this macro to report all debug messages on errors introducing
857 * a timing side-channel.
858 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100859 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200860//#define MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100861
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200862/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100863 *
864 * Enable support for Encrypt-then-MAC, RFC 7366.
865 *
866 * This allows peers that both support it to use a more robust protection for
867 * ciphersuites using CBC, providing deep resistance against timing attacks
868 * on the padding or underlying cipher.
869 *
870 * This only affects CBC ciphersuites, and is useless if none is defined.
871 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200872 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
873 * MBEDTLS_SSL_PROTO_TLS1_1 or
874 * MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100875 *
876 * Comment this macro to disable support for Encrypt-then-MAC
877 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200878#define MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100879
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200880/** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200881 *
882 * Enable support for Extended Master Secret, aka Session Hash
883 * (draft-ietf-tls-session-hash-02).
884 *
885 * This was introduced as "the proper fix" to the Triple Handshake familiy of
886 * attacks, but it is recommended to always use it (even if you disable
887 * renegotiation), since it actually fixes a more fundamental issue in the
888 * original SSL/TLS design, and has implications beyond Triple Handshake.
889 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200890 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
891 * MBEDTLS_SSL_PROTO_TLS1_1 or
892 * MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100893 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200894 * Comment this macro to disable support for Extended Master Secret.
895 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200896#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200897
Paul Bakkerd66f0702013-01-31 16:57:45 +0100898/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200899 * \def MBEDTLS_SSL_FALLBACK_SCSV
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200900 *
901 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
902 *
903 * For servers, it is recommended to always enable this, unless you support
904 * only one version of TLS, or know for sure that none of your clients
905 * implements a fallback strategy.
906 *
907 * For clients, you only need this if you're using a fallback strategy, which
908 * is not recommended in the first place, unless you absolutely need it to
909 * interoperate with buggy (version-intolerant) servers.
910 *
911 * Comment this macro to disable support for FALLBACK_SCSV
912 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200913#define MBEDTLS_SSL_FALLBACK_SCSV
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200914
915/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200916 * \def MBEDTLS_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000917 *
918 * Enable hooking functions in SSL module for hardware acceleration of
919 * individual records.
920 *
921 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000922 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200923//#define MBEDTLS_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000924
925/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200926 * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100927 *
928 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
929 *
930 * This is a countermeasure to the BEAST attack, which also minimizes the risk
931 * of interoperability issues compared to sending 0-length records.
932 *
933 * Comment this macro to disable 1/n-1 record splitting.
934 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200935#define MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100936
937/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200938 * \def MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100939 *
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100940 * Disable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100941 *
942 * The two main uses of renegotiation are (1) refresh keys on long-lived
943 * connections and (2) client authentication after the initial handshake.
944 * If you don't need renegotiation, it's probably better to disable it, since
945 * it has been associated with security issues in the past and is easy to
946 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100947 *
Manuel Pégourié-Gonnard55f968b2015-03-09 16:23:15 +0000948 * Comment this to disable support for renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100949 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200950#define MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100951
952/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200953 * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
Paul Bakker78a8c712013-03-06 17:01:52 +0100954 *
955 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200956 * SSL Server module (MBEDTLS_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100957 *
Manuel Pégourié-Gonnard265dd5c2015-03-10 13:48:34 +0000958 * Uncomment this macro to enable support for SSLv2 Client Hello messages.
Paul Bakker78a8c712013-03-06 17:01:52 +0100959 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200960//#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
Paul Bakker78a8c712013-03-06 17:01:52 +0100961
962/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200963 * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100964 *
965 * Pick the ciphersuite according to the client's preferences rather than ours
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200966 * in the SSL Server module (MBEDTLS_SSL_SRV_C).
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100967 *
968 * Uncomment this macro to respect client's ciphersuite order
969 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200970//#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100971
972/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200973 * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +0200974 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200975 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200976 *
977 * Comment this macro to disable support for the max_fragment_length extension
978 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200979#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +0200980
981/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200982 * \def MBEDTLS_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200983 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200984 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200985 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200986 * Requires: MBEDTLS_MD5_C
987 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200988 *
989 * Comment this macro to disable support for SSL 3.0
990 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200991#define MBEDTLS_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200992
993/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200994 * \def MBEDTLS_SSL_PROTO_TLS1
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200995 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200996 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200997 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200998 * Requires: MBEDTLS_MD5_C
999 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001000 *
1001 * Comment this macro to disable support for TLS 1.0
1002 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001003#define MBEDTLS_SSL_PROTO_TLS1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001004
1005/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001006 * \def MBEDTLS_SSL_PROTO_TLS1_1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001007 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001008 * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001009 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001010 * Requires: MBEDTLS_MD5_C
1011 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001012 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001013 * Comment this macro to disable support for TLS 1.1 / DTLS 1.0
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001014 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001015#define MBEDTLS_SSL_PROTO_TLS1_1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001016
1017/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001018 * \def MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001019 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001020 * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001021 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001022 * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001023 * (Depends on ciphersuites)
1024 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001025 * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001026 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001027#define MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001028
1029/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001030 * \def MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001031 *
1032 * Enable support for DTLS (all available versions).
1033 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001034 * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0,
1035 * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001036 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001037 * Requires: MBEDTLS_SSL_PROTO_TLS1_1
1038 * or MBEDTLS_SSL_PROTO_TLS1_2
1039 * MBEDTLS_TIMING_C
Manuel Pégourié-Gonnard8e704f02014-10-14 20:03:35 +02001040 *
1041 * \note Dependency on TIMING_C may be replaced by something more flexible
1042 * (callbacks or abstraction layer in the next major version). Please contact
1043 * us if you're having issues with this dependency.
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001044 *
1045 * Comment this macro to disable support for DTLS
1046 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001047#define MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001048
1049/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001050 * \def MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001051 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +01001052 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001053 *
Paul Bakker27e36d32014-04-08 12:33:37 +02001054 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001055 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001056#define MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001057
1058/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001059 * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001060 *
1061 * Enable support for the anti-replay mechanism in DTLS.
1062 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001063 * Requires: MBEDTLS_SSL_TLS_C
1064 * MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001065 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001066 * \warning Disabling this is often a security risk!
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001067 * See mbedtls_ssl_conf_dtls_anti_replay() for details.
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001068 *
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001069 * Comment this to disable anti-replay in DTLS.
1070 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001071#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001072
1073/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001074 * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001075 *
1076 * Enable support for HelloVerifyRequest on DTLS servers.
1077 *
1078 * This feature is highly recommended to prevent DTLS servers being used as
1079 * amplifiers in DoS attacks against other hosts. It should always be enabled
1080 * unless you know for sure amplification cannot be a problem in the
1081 * environment in which your server operates.
1082 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001083 * \warning Disabling this can ba a security risk! (see above)
1084 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001085 * Requires: MBEDTLS_SSL_SRV_C
1086 * MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001087 *
1088 * Comment this to disable support for HelloVerifyRequest.
1089 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001090#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001091
1092/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001093 * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001094 *
1095 * Enable support for a limit of records with bad MAC.
1096 *
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001097 * See mbedtls_ssl_conf_dtls_badmac_limit().
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001098 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001099 * Requires: MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001100 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001101#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001102
1103/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001104 * \def MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +02001105 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001106 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +02001107 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001108 * Requires: MBEDTLS_AES_C
1109 * MBEDTLS_SHA256_C
1110 * MBEDTLS_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +02001111 *
1112 * Comment this macro to disable support for SSL session tickets
1113 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001114#define MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +02001115
1116/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001117 * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +02001118 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001119 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +02001120 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001121 * Requires: MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +00001122 *
Paul Bakker0be444a2013-08-27 21:55:01 +02001123 * Comment this macro to disable support for server name indication in SSL
1124 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001125#define MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +02001126
1127/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001128 * \def MBEDTLS_SSL_TRUNCATED_HMAC
Paul Bakker1f2bc622013-08-15 13:45:55 +02001129 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001130 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +02001131 *
1132 * Comment this macro to disable support for truncated HMAC in SSL
1133 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001134#define MBEDTLS_SSL_TRUNCATED_HMAC
Paul Bakker1f2bc622013-08-15 13:45:55 +02001135
1136/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001137 * \def MBEDTLS_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001138 *
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001139 * Enable mbedtls_ssl_conf_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001140 *
1141 * This is disabled by default since it breaks binary compatibility with the
1142 * 1.3.x line. If you choose to enable it, you will need to rebuild your
1143 * application against the new header files, relinking will not be enough.
1144 * It will be enabled by default, or no longer an option, in the 1.4 branch.
1145 *
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001146 * Uncomment to make mbedtls_ssl_conf_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001147 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001148//#define MBEDTLS_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001149
1150/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001151 * \def MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001152 *
1153 * Provide your own alternate threading implementation.
1154 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001155 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001156 *
1157 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +02001158 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001159//#define MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001160
1161/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001162 * \def MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001163 *
1164 * Enable the pthread wrapper layer for the threading layer.
1165 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001166 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001167 *
1168 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +02001169 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001170//#define MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001171
1172/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001173 * \def MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001174 *
1175 * Allow run-time checking of compile-time enabled features. Thus allowing users
1176 * to check at run-time if the library is for instance compiled with threading
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001177 * support via mbedtls_version_check_feature().
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001178 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001179 * Requires: MBEDTLS_VERSION_C
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001180 *
1181 * Comment this to disable run-time checking and save ROM space
1182 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001183#define MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001184
1185/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001186 * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001187 *
1188 * If set, the X509 parser will not break-off when parsing an X509 certificate
1189 * and encountering an extension in a v1 or v2 certificate.
1190 *
1191 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001192 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001193//#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001194
1195/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001196 * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker5c721f92011-07-27 16:51:09 +00001197 *
1198 * If set, the X509 parser will not break-off when parsing an X509 certificate
1199 * and encountering an unknown critical extension.
1200 *
1201 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +00001202 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001203//#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +00001204
1205/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001206 * \def MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001207 *
1208 * Enable verification of the keyUsage extension (CA and leaf certificates).
1209 *
1210 * Disabling this avoids problems with mis-issued and/or misused
1211 * (intermediate) CA and leaf certificates.
1212 *
1213 * \warning Depending on your PKI use, disabling this can be a security risk!
1214 *
1215 * Comment to skip keyUsage checking for both CA and leaf certificates.
1216 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001217#define MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001218
1219/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001220 * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001221 *
1222 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1223 *
1224 * Disabling this avoids problems with mis-issued and/or misused certificates.
1225 *
1226 * \warning Depending on your PKI use, disabling this can be a security risk!
1227 *
1228 * Comment to skip extendedKeyUsage checking for certificates.
1229 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001230#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001231
1232/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001233 * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001234 *
1235 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1236 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1237 *
1238 * Comment this macro to disallow using RSASSA-PSS in certificates.
1239 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001240#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001241
1242/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001243 * \def MBEDTLS_ZLIB_SUPPORT
Paul Bakker2770fbd2012-07-03 13:30:23 +00001244 *
1245 * If set, the SSL/TLS module uses ZLIB to support compression and
1246 * decompression of packet data.
1247 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001248 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1249 * CRIME attack. Before enabling this option, you should examine with care if
1250 * CRIME or similar exploits may be a applicable to your use case.
1251 *
Manuel Pégourié-Gonnarda0e16322014-07-14 17:38:41 +02001252 * \note Currently compression can't bu used with DTLS.
1253 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001254 * Used in: library/ssl_tls.c
1255 * library/ssl_cli.c
1256 * library/ssl_srv.c
1257 *
1258 * This feature requires zlib library and headers to be present.
1259 *
1260 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001261 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001262//#define MBEDTLS_ZLIB_SUPPORT
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001263/* \} name SECTION: mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001264
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001265/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001266 * \name SECTION: mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +00001267 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001268 * This section enables or disables entire modules in mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +00001269 * \{
1270 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001271
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001272/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001273 * \def MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001274 *
1275 * Enable AES-NI support on x86-64.
1276 *
1277 * Module: library/aesni.c
1278 * Caller: library/aes.c
1279 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001280 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001281 *
1282 * This modules adds support for the AES-NI instructions on x86-64
1283 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001284#define MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001285
1286/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001287 * \def MBEDTLS_AES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001288 *
1289 * Enable the AES block cipher.
1290 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001291 * Module: library/aes.c
1292 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001293 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001294 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001295 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001296 * This module enables the following ciphersuites (if other requisites are
1297 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001298 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1299 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1300 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1301 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1302 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1303 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1304 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1305 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1306 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1307 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1308 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1309 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
1310 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1311 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1312 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1313 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1314 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
1315 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
1316 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
1317 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
1318 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1319 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1320 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1321 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1322 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1323 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1324 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1325 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1326 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1327 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1328 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1329 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1330 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1331 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1332 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1333 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1334 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1335 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1336 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1337 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1338 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
1339 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
1340 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
1341 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
1342 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
1343 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
1344 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1345 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1346 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1347 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1348 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1349 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1350 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
1351 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
1352 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
1353 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
1354 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
1355 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001356 *
Paul Bakkercff68422013-09-15 20:43:33 +02001357 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001358 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001359#define MBEDTLS_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001360
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001361/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001362 * \def MBEDTLS_ARC4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001363 *
1364 * Enable the ARCFOUR stream cipher.
1365 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001366 * Module: library/arc4.c
1367 * Caller: library/ssl_tls.c
1368 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001369 * This module enables the following ciphersuites (if other requisites are
1370 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001371 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1372 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
1373 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
1374 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
1375 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
1376 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
1377 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
1378 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
1379 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
1380 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001381 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001382#define MBEDTLS_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001383
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001384/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001385 * \def MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001386 *
1387 * Enable the generic ASN1 parser.
1388 *
1389 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001390 * Caller: library/x509.c
1391 * library/dhm.c
1392 * library/pkcs12.c
1393 * library/pkcs5.c
1394 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001395 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001396#define MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001397
1398/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001399 * \def MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001400 *
1401 * Enable the generic ASN1 writer.
1402 *
1403 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001404 * Caller: library/ecdsa.c
1405 * library/pkwrite.c
1406 * library/x509_create.c
1407 * library/x509write_crt.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001408 * library/mbedtls_x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001409 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001410#define MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001411
1412/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001413 * \def MBEDTLS_BASE64_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001414 *
1415 * Enable the Base64 module.
1416 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001417 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001418 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001419 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001420 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001421 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001422#define MBEDTLS_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001423
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001424/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001425 * \def MBEDTLS_BIGNUM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001426 *
Paul Bakker9a736322012-11-14 12:39:52 +00001427 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001428 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001429 * Module: library/bignum.c
1430 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001431 * library/ecp.c
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001432 * library/ecdsa.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001433 * library/rsa.c
1434 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001435 *
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001436 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
Paul Bakker5121ce52009-01-03 21:22:43 +00001437 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001438#define MBEDTLS_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001439
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001440/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001441 * \def MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001442 *
1443 * Enable the Blowfish block cipher.
1444 *
1445 * Module: library/blowfish.c
1446 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001447#define MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001448
1449/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001450 * \def MBEDTLS_CAMELLIA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001451 *
1452 * Enable the Camellia block cipher.
1453 *
Paul Bakker38119b12009-01-10 23:31:23 +00001454 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001455 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001456 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001457 * This module enables the following ciphersuites (if other requisites are
1458 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001459 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1460 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1461 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1462 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1463 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1464 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1465 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1466 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
1467 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1468 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1469 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1470 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1471 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
1472 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
1473 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1474 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1475 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1476 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1477 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1478 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1479 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1480 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1481 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1482 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1483 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1484 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1485 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1486 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1487 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1488 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1489 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1490 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1491 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1492 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1493 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1494 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1495 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1496 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1497 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1498 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1499 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1500 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001501 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001502#define MBEDTLS_CAMELLIA_C
Paul Bakker38119b12009-01-10 23:31:23 +00001503
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001504/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001505 * \def MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001506 *
1507 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1508 *
1509 * Module: library/ccm.c
1510 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001511 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001512 *
1513 * This module enables the AES-CCM ciphersuites, if other requisites are
1514 * enabled as well.
1515 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001516#define MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001517
1518/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001519 * \def MBEDTLS_CERTS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001520 *
1521 * Enable the test certificates.
1522 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001523 * Module: library/certs.c
1524 * Caller:
1525 *
1526 * This module is used for testing (ssl_client/server).
1527 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001528#define MBEDTLS_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001529
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001530/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001531 * \def MBEDTLS_CIPHER_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001532 *
1533 * Enable the generic cipher layer.
1534 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001535 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001536 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001537 *
1538 * Uncomment to enable generic cipher wrappers.
1539 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001540#define MBEDTLS_CIPHER_C
Paul Bakker8123e9d2011-01-06 15:37:30 +00001541
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001542/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001543 * \def MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001544 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001545 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001546 *
1547 * Module: library/ctr_drbg.c
1548 * Caller:
1549 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001550 * Requires: MBEDTLS_AES_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001551 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001552 * This module provides the CTR_DRBG AES-256 random number generator.
1553 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001554#define MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001555
1556/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001557 * \def MBEDTLS_DEBUG_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001558 *
1559 * Enable the debug functions.
1560 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001561 * Module: library/debug.c
1562 * Caller: library/ssl_cli.c
1563 * library/ssl_srv.c
1564 * library/ssl_tls.c
1565 *
1566 * This module provides debugging functions.
1567 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001568#define MBEDTLS_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001569
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001570/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001571 * \def MBEDTLS_DES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001572 *
1573 * Enable the DES block cipher.
1574 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001575 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001576 * Caller: library/pem.c
1577 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001578 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001579 * This module enables the following ciphersuites (if other requisites are
1580 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001581 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1582 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
1583 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
1584 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1585 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1586 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1587 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1588 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
1589 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
1590 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001591 *
Paul Bakkercff68422013-09-15 20:43:33 +02001592 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001593 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001594#define MBEDTLS_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001595
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001596/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001597 * \def MBEDTLS_DHM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001598 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001599 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001600 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001601 * Module: library/dhm.c
1602 * Caller: library/ssl_cli.c
1603 * library/ssl_srv.c
1604 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001605 * This module is used by the following key exchanges:
1606 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001607 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001608#define MBEDTLS_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001609
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001610/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001611 * \def MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001612 *
1613 * Enable the elliptic curve Diffie-Hellman library.
1614 *
1615 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001616 * Caller: library/ssl_cli.c
1617 * library/ssl_srv.c
1618 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001619 * This module is used by the following key exchanges:
1620 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001621 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001622 * Requires: MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001623 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001624#define MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001625
1626/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001627 * \def MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001628 *
1629 * Enable the elliptic curve DSA library.
1630 *
1631 * Module: library/ecdsa.c
1632 * Caller:
1633 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001634 * This module is used by the following key exchanges:
1635 * ECDHE-ECDSA
1636 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001637 * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001638 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001639#define MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001640
1641/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001642 * \def MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001643 *
1644 * Enable the elliptic curve over GF(p) library.
1645 *
1646 * Module: library/ecp.c
1647 * Caller: library/ecdh.c
1648 * library/ecdsa.c
1649 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001650 * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001651 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001652#define MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001653
1654/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001655 * \def MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001656 *
1657 * Enable the platform-specific entropy code.
1658 *
1659 * Module: library/entropy.c
1660 * Caller:
1661 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001662 * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001663 *
1664 * This module provides a generic entropy pool
1665 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001666#define MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001667
1668/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001669 * \def MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001670 *
1671 * Enable error code to error string conversion.
1672 *
1673 * Module: library/error.c
1674 * Caller:
1675 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001676 * This module enables mbedtls_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001677 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001678#define MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001679
1680/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001681 * \def MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001682 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001683 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001684 *
1685 * Module: library/gcm.c
1686 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001687 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001688 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001689 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1690 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001691 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001692#define MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001693
1694/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001695 * \def MBEDTLS_HAVEGE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001696 *
1697 * Enable the HAVEGE random generator.
1698 *
Paul Bakker2a844242013-06-24 13:01:53 +02001699 * Warning: the HAVEGE random generator is not suitable for virtualized
1700 * environments
1701 *
1702 * Warning: the HAVEGE random generator is dependent on timing and specific
1703 * processor traits. It is therefore not advised to use HAVEGE as
1704 * your applications primary random generator or primary entropy pool
1705 * input. As a secondary input to your entropy pool, it IS able add
1706 * the (limited) extra entropy it provides.
1707 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001708 * Module: library/havege.c
1709 * Caller:
1710 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001711 * Requires: MBEDTLS_TIMING_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001712 *
Paul Bakker2a844242013-06-24 13:01:53 +02001713 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001714 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001715//#define MBEDTLS_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001716
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001717/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001718 * \def MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001719 *
1720 * Enable the HMAC_DRBG random generator.
1721 *
1722 * Module: library/hmac_drbg.c
1723 * Caller:
1724 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001725 * Requires: MBEDTLS_MD_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001726 *
1727 * Uncomment to enable the HMAC_DRBG random number geerator.
1728 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001729#define MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001730
1731/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001732 * \def MBEDTLS_MD_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001733 *
1734 * Enable the generic message digest layer.
1735 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001736 * Module: library/mbedtls_md.c
Paul Bakker17373852011-01-06 14:20:01 +00001737 * Caller:
1738 *
1739 * Uncomment to enable generic message digest wrappers.
1740 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001741#define MBEDTLS_MD_C
Paul Bakker17373852011-01-06 14:20:01 +00001742
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001743/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001744 * \def MBEDTLS_MD2_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001745 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001746 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001747 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001748 * Module: library/mbedtls_md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001749 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001750 *
1751 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001752 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001753//#define MBEDTLS_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001754
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001755/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001756 * \def MBEDTLS_MD4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001757 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001758 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001759 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001760 * Module: library/mbedtls_md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001761 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001762 *
1763 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001764 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001765//#define MBEDTLS_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001766
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001767/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001768 * \def MBEDTLS_MD5_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001769 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001770 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001771 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001772 * Module: library/mbedtls_md5.c
1773 * Caller: library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001774 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001775 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001776 *
1777 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001778 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001779 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001780#define MBEDTLS_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001781
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001782/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001783 * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001784 *
1785 * Enable the buffer allocator implementation that makes use of a (stack)
1786 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1787 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001788 *
1789 * Module: library/memory_buffer_alloc.c
1790 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001791 * Requires: MBEDTLS_PLATFORM_C
1792 * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
Paul Bakker6e339b52013-07-03 13:37:05 +02001793 *
1794 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001795 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001796//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001797
1798/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001799 * \def MBEDTLS_NET_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001800 *
1801 * Enable the TCP/IP networking routines.
1802 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001803 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001804 *
1805 * This module provides TCP/IP networking routines.
1806 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001807#define MBEDTLS_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001808
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001809/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001810 * \def MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001811 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001812 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001813 *
1814 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001815 * Caller: library/asn1write.c
1816 * library/pkcs5.c
1817 * library/pkparse.c
1818 * library/pkwrite.c
1819 * library/rsa.c
1820 * library/x509.c
1821 * library/x509_create.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001822 * library/mbedtls_x509_crl.c
1823 * library/mbedtls_x509_crt.c
1824 * library/mbedtls_x509_csr.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001825 * library/x509write_crt.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001826 * library/mbedtls_x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001827 *
1828 * This modules translates between OIDs and internal values.
1829 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001830#define MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001831
1832/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001833 * \def MBEDTLS_PADLOCK_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001834 *
1835 * Enable VIA Padlock support on x86.
1836 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001837 * Module: library/padlock.c
1838 * Caller: library/aes.c
1839 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001840 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001841 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001842 * This modules adds support for the VIA PadLock on x86.
1843 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001844#define MBEDTLS_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001845
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001846/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001847 * \def MBEDTLS_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001848 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001849 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001850 *
1851 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001852 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001853 * library/pkparse.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001854 * library/mbedtls_x509_crl.c
1855 * library/mbedtls_x509_crt.c
1856 * library/mbedtls_x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001857 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001858 * Requires: MBEDTLS_BASE64_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001859 *
Paul Bakkercff68422013-09-15 20:43:33 +02001860 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001861 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001862#define MBEDTLS_PEM_PARSE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001863
1864/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001865 * \def MBEDTLS_PEM_WRITE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001866 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001867 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001868 *
1869 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001870 * Caller: library/pkwrite.c
1871 * library/x509write_crt.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001872 * library/mbedtls_x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001873 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001874 * Requires: MBEDTLS_BASE64_C
Paul Bakkercff68422013-09-15 20:43:33 +02001875 *
1876 * This modules adds support for encoding / writing PEM files.
1877 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001878#define MBEDTLS_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001879
1880/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001881 * \def MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001882 *
1883 * Enable the generic public (asymetric) key layer.
1884 *
1885 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001886 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001887 * library/ssl_cli.c
1888 * library/ssl_srv.c
1889 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001890 * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001891 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001892 * Uncomment to enable generic public key wrappers.
1893 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001894#define MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001895
1896/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001897 * \def MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001898 *
1899 * Enable the generic public (asymetric) key parser.
1900 *
1901 * Module: library/pkparse.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001902 * Caller: library/mbedtls_x509_crt.c
1903 * library/mbedtls_x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001904 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001905 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02001906 *
1907 * Uncomment to enable generic public key parse functions.
1908 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001909#define MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001910
1911/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001912 * \def MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001913 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001914 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001915 *
1916 * Module: library/pkwrite.c
1917 * Caller: library/x509write.c
1918 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001919 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02001920 *
1921 * Uncomment to enable generic public key write functions.
1922 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001923#define MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001924
1925/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001926 * \def MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001927 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001928 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001929 *
1930 * Module: library/pkcs5.c
1931 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001932 * Requires: MBEDTLS_MD_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001933 *
1934 * This module adds support for the PKCS#5 functions.
1935 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001936#define MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001937
1938/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001939 * \def MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001940 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001941 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001942 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001943 * Module: library/pkcs11.c
1944 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001945 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001946 * Requires: MBEDTLS_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001947 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001948 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001949 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001950 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001951//#define MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001952
1953/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001954 * \def MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001955 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001956 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001957 * Adds algorithms for parsing PKCS#8 encrypted private keys
1958 *
1959 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001960 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001961 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001962 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
1963 * Can use: MBEDTLS_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001964 *
1965 * This module enables PKCS#12 functions.
1966 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001967#define MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001968
1969/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001970 * \def MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01001971 *
1972 * Enable the platform abstraction layer that allows you to re-assign
Rich Evansc39cb492015-01-30 12:01:34 +00001973 * functions like malloc(), free(), snprintf(), printf(), fprintf(), exit()
Paul Bakker747a83a2014-02-01 22:50:07 +01001974 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001975 * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
1976 * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
Rich Evans16f8cd82015-02-06 16:14:34 +00001977 * above to be specified at runtime or compile time respectively.
Paul Bakker747a83a2014-02-01 22:50:07 +01001978 *
1979 * Module: library/platform.c
1980 * Caller: Most other .c files
1981 *
1982 * This module enables abstraction of common (libc) functions.
1983 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001984#define MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01001985
1986/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001987 * \def MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001988 *
1989 * Enable the RIPEMD-160 hash algorithm.
1990 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001991 * Module: library/mbedtls_ripemd160.c
1992 * Caller: library/mbedtls_md.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001993 *
1994 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001995#define MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001996
1997/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001998 * \def MBEDTLS_RSA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001999 *
2000 * Enable the RSA public-key cryptosystem.
2001 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002002 * Module: library/rsa.c
2003 * Caller: library/ssl_cli.c
2004 * library/ssl_srv.c
2005 * library/ssl_tls.c
2006 * library/x509.c
2007 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02002008 * This module is used by the following key exchanges:
2009 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00002010 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002011 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002012 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002013#define MBEDTLS_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002014
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002015/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002016 * \def MBEDTLS_SHA1_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002017 *
2018 * Enable the SHA1 cryptographic hash algorithm.
2019 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002020 * Module: library/mbedtls_sha1.c
2021 * Caller: library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002022 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002023 * library/ssl_srv.c
2024 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002025 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002026 *
2027 * This module is required for SSL/TLS and SHA1-signed certificates.
2028 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002029#define MBEDTLS_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002030
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002031/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002032 * \def MBEDTLS_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002033 *
2034 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
2035 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002036 * Module: library/mbedtls_sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002037 * Caller: library/entropy.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002038 * library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002039 * library/ssl_cli.c
2040 * library/ssl_srv.c
2041 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002042 *
2043 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01002044 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00002045 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002046#define MBEDTLS_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002047
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002048/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002049 * \def MBEDTLS_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002050 *
2051 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
2052 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002053 * Module: library/mbedtls_sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002054 * Caller: library/entropy.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002055 * library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002056 * library/ssl_cli.c
2057 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002058 *
2059 * This module adds support for SHA-384 and SHA-512.
2060 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002061#define MBEDTLS_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002062
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002063/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002064 * \def MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002065 *
2066 * Enable simple SSL cache implementation.
2067 *
2068 * Module: library/ssl_cache.c
2069 * Caller:
2070 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002071 * Requires: MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002072 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002073#define MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002074
2075/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002076 * \def MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002077 *
2078 * Enable basic implementation of DTLS cookies for hello verification.
2079 *
2080 * Module: library/ssl_cookie.c
2081 * Caller:
2082 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002083 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002084 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002085#define MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002086
2087/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002088 * \def MBEDTLS_SSL_CLI_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002089 *
2090 * Enable the SSL/TLS client code.
2091 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002092 * Module: library/ssl_cli.c
2093 * Caller:
2094 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002095 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002096 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002097 * This module is required for SSL/TLS client support.
2098 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002099#define MBEDTLS_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002100
Paul Bakker9a736322012-11-14 12:39:52 +00002101/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002102 * \def MBEDTLS_SSL_SRV_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002103 *
2104 * Enable the SSL/TLS server code.
2105 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002106 * Module: library/ssl_srv.c
2107 * Caller:
2108 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002109 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002110 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002111 * This module is required for SSL/TLS server support.
2112 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002113#define MBEDTLS_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002114
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002115/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002116 * \def MBEDTLS_SSL_TLS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002117 *
Paul Bakkere29ab062011-05-18 13:26:54 +00002118 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002119 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002120 * Module: library/ssl_tls.c
2121 * Caller: library/ssl_cli.c
2122 * library/ssl_srv.c
2123 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002124 * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2125 * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
Paul Bakker5690efc2011-05-26 13:16:06 +00002126 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002127 * This module is required for SSL/TLS.
2128 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002129#define MBEDTLS_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002130
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002131/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002132 * \def MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002133 *
2134 * Enable the threading abstraction layer.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002135 * By default mbed TLS assumes it is used in a non-threaded environment or that
Paul Bakker2466d932013-09-28 14:40:38 +02002136 * contexts are not shared between threads. If you do intend to use contexts
2137 * between threads, you will need to enable this layer to prevent race
2138 * conditions.
2139 *
2140 * Module: library/threading.c
2141 *
2142 * This allows different threading implementations (self-implemented or
2143 * provided).
2144 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002145 * You will have to enable either MBEDTLS_THREADING_ALT or
2146 * MBEDTLS_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02002147 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002148 * Enable this layer to allow use of mutexes within mbed TLS
Paul Bakker2466d932013-09-28 14:40:38 +02002149 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002150//#define MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002151
2152/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002153 * \def MBEDTLS_TIMING_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002154 *
2155 * Enable the portable timing interface.
2156 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002157 * Module: library/timing.c
2158 * Caller: library/havege.c
2159 *
2160 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002161 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002162#define MBEDTLS_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002163
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002164/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002165 * \def MBEDTLS_VERSION_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002166 *
2167 * Enable run-time version information.
2168 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00002169 * Module: library/version.c
2170 *
2171 * This module provides run-time version information.
2172 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002173#define MBEDTLS_VERSION_C
Paul Bakker0a62cd12011-01-21 11:00:08 +00002174
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002175/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002176 * \def MBEDTLS_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002177 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002178 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002179 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002180 * Module: library/x509.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002181 * Caller: library/mbedtls_x509_crl.c
2182 * library/mbedtls_x509_crt.c
2183 * library/mbedtls_x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002184 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002185 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
2186 * MBEDTLS_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002187 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002188 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00002189 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002190#define MBEDTLS_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002191
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002192/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002193 * \def MBEDTLS_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002194 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002195 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002196 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002197 * Module: library/mbedtls_x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002198 * Caller: library/ssl_cli.c
2199 * library/ssl_srv.c
2200 * library/ssl_tls.c
2201 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002202 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002203 *
2204 * This module is required for X.509 certificate parsing.
2205 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002206#define MBEDTLS_X509_CRT_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002207
2208/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002209 * \def MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002210 *
2211 * Enable X.509 CRL parsing.
2212 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002213 * Module: library/mbedtls_x509_crl.c
2214 * Caller: library/mbedtls_x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002215 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002216 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002217 *
2218 * This module is required for X.509 CRL parsing.
2219 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002220#define MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002221
2222/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002223 * \def MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002224 *
2225 * Enable X.509 Certificate Signing Request (CSR) parsing.
2226 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002227 * Module: library/mbedtls_x509_csr.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002228 * Caller: library/x509_crt_write.c
2229 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002230 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002231 *
2232 * This module is used for reading X.509 certificate request.
2233 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002234#define MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002235
2236/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002237 * \def MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002238 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002239 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002240 *
2241 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002242 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002243 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002244 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002245 * This module is the basis for creating X.509 certificates and CSRs.
2246 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002247#define MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002248
2249/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002250 * \def MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002251 *
2252 * Enable creating X.509 certificates.
2253 *
2254 * Module: library/x509_crt_write.c
2255 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002256 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002257 *
2258 * This module is required for X.509 certificate creation.
2259 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002260#define MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002261
2262/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002263 * \def MBEDTLS_X509_CSR_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002264 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002265 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002266 *
2267 * Module: library/x509_csr_write.c
2268 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002269 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002270 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002271 * This module is required for X.509 certificate request writing.
2272 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002273#define MBEDTLS_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002274
2275/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002276 * \def MBEDTLS_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002277 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002278 * Enable the XTEA block cipher.
2279 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002280 * Module: library/xtea.c
2281 * Caller:
2282 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002283#define MBEDTLS_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002284
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002285/* \} name SECTION: mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002286
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002287/**
2288 * \name SECTION: Module configuration options
2289 *
2290 * This section allows for the setting of module specific sizes and
2291 * configuration options. The default values are already present in the
2292 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002293 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002294 * Our advice is to enable options and change their values here
2295 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002296 *
2297 * Please check the respective header file for documentation on these
2298 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002299 * \{
2300 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002301
Paul Bakker088c5c52014-04-25 11:11:10 +02002302/* MPI / BIGNUM options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002303//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2304//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002305
Paul Bakker088c5c52014-04-25 11:11:10 +02002306/* CTR_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002307//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2308//#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2309//#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2310//#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2311//#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002312
Paul Bakker088c5c52014-04-25 11:11:10 +02002313/* HMAC_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002314//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2315//#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2316//#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2317//#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002318
Paul Bakker088c5c52014-04-25 11:11:10 +02002319/* ECP options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002320//#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2321//#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2322//#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002323
Paul Bakker088c5c52014-04-25 11:11:10 +02002324/* Entropy options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002325//#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2326//#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002327
Paul Bakker088c5c52014-04-25 11:11:10 +02002328/* Memory buffer allocator options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002329//#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002330
Paul Bakker088c5c52014-04-25 11:11:10 +02002331/* Platform options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002332//#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. */
2333//#define MBEDTLS_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2334//#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2335//#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2336//#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2337//#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2338//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002339
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002340/* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
2341/* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
2342//#define MBEDTLS_PLATFORM_MALLOC_MACRO malloc /**< Default allocator macro to use, can be undefined */
2343//#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2344//#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2345//#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2346//#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
2347//#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002348
Paul Bakker088c5c52014-04-25 11:11:10 +02002349/* SSL Cache options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002350//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2351//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002352
Paul Bakker088c5c52014-04-25 11:11:10 +02002353/* SSL options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002354//#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2355//#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
2356//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
2357//#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 +02002358
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002359/**
2360 * Complete list of ciphersuites to use, in order of preference.
2361 *
2362 * \warning No dependency checking is done on that field! This option can only
2363 * be used to restrict the set of available ciphersuites. It is your
2364 * responsibility to make sure the needed modules are active.
2365 *
2366 * Use this to save a few hundred bytes of ROM (default ordering of all
2367 * available ciphersuites) and a few to a few hundred bytes of RAM.
2368 *
2369 * The value below is only an example, not the default.
2370 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002371//#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 +02002372
Paul Bakkereaebbd52014-04-25 15:04:14 +02002373/* Debug options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002374//#define MBEDTLS_DEBUG_DFL_MODE MBEDTLS_DEBUG_LOG_FULL /**< Default log: Full or Raw */
Paul Bakkereaebbd52014-04-25 15:04:14 +02002375
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002376/* X509 options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002377//#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 +01002378
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002379/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002380
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002381#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002382
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002383#endif /* MBEDTLS_CONFIG_H */