blob: 3cd2889f7ee1568c89169dc141230ae77c2fe0ff [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_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000044 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000045 * The system uses 8-bit wide native integers.
46 *
47 * Uncomment if native integers are 8-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000048 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020049//#define MBEDTLS_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000050
Paul Bakkerf3b86c12011-01-27 15:24:17 +000051/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020052 * \def MBEDTLS_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000053 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000054 * The system uses 16-bit wide native integers.
55 *
56 * Uncomment if native integers are 16-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000057 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020058//#define MBEDTLS_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000059
Paul Bakkerf3b86c12011-01-27 15:24:17 +000060/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020061 * \def MBEDTLS_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000062 *
Paul Bakker62261d62012-10-02 12:19:31 +000063 * The compiler supports the 'long long' type.
64 * (Only used on 32-bit platforms)
Paul Bakker5121ce52009-01-03 21:22:43 +000065 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020066#define MBEDTLS_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000067
Paul Bakkerf3b86c12011-01-27 15:24:17 +000068/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020069 * \def MBEDTLS_HAVE_ASM
Paul Bakkerf3b86c12011-01-27 15:24:17 +000070 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020071 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000072 *
73 * Requires support for asm() in compiler.
74 *
75 * Used in:
76 * library/timing.c
77 * library/padlock.c
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +000078 * include/mbedtls/bn_mul.h
Paul Bakker68041ec2009-04-19 21:17:55 +000079 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020080 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000081 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020082#define MBEDTLS_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000083
Paul Bakkerf3b86c12011-01-27 15:24:17 +000084/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020085 * \def MBEDTLS_HAVE_SSE2
Paul Bakkerf3b86c12011-01-27 15:24:17 +000086 *
Paul Bakkere23c3152012-10-01 14:42:47 +000087 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000088 *
Paul Bakker5121ce52009-01-03 21:22:43 +000089 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000090 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020091//#define MBEDTLS_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020092
93/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020094 * \def MBEDTLS_HAVE_TIME
Paul Bakkerfa9b1002013-07-03 15:31:03 +020095 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020096 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +020097 *
98 * Comment if your system does not support time functions
99 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200100#define MBEDTLS_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100101
102/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200103 * \def MBEDTLS_PLATFORM_MEMORY
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100104 *
105 * Enable the memory allocation layer.
106 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000107 * By default mbed TLS uses the system-provided malloc() and free().
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100108 * This allows different allocators (self-implemented or provided) to be
109 * provided to the platform abstraction layer.
110 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200111 * Enabling MBEDTLS_PLATFORM_MEMORY without the
112 * MBEDTLS_PLATFORM_{FREE,MALLOC}_MACROs will provide
113 * "mbedtls_platform_set_malloc_free()" allowing you to set an alternative malloc() and
Rich Evans16f8cd82015-02-06 16:14:34 +0000114 * free() function pointer at runtime.
115 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200116 * Enabling MBEDTLS_PLATFORM_MEMORY and specifying
117 * MBEDTLS_PLATFORM_{MALLOC,FREE}_MACROs will allow you to specify the
Rich Evans16f8cd82015-02-06 16:14:34 +0000118 * alternate function at compile time.
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100119 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200120 * Requires: MBEDTLS_PLATFORM_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100121 *
122 * Enable this layer to allow use of alternative memory allocators.
123 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200124//#define MBEDTLS_PLATFORM_MEMORY
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100125
126/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200127 * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
Paul Bakker088c5c52014-04-25 11:11:10 +0200128 *
129 * Do not assign standard functions in the platform layer (e.g. malloc() to
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200130 * MBEDTLS_PLATFORM_STD_MALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF)
Paul Bakker088c5c52014-04-25 11:11:10 +0200131 *
132 * This makes sure there are no linking errors on platforms that do not support
133 * these functions. You will HAVE to provide alternatives, either at runtime
134 * via the platform_set_xxx() functions or at compile time by setting
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200135 * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a
136 * MBEDTLS_PLATFORM_XXX_MACRO.
Paul Bakker088c5c52014-04-25 11:11:10 +0200137 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200138 * Requires: MBEDTLS_PLATFORM_C
Paul Bakker088c5c52014-04-25 11:11:10 +0200139 *
140 * Uncomment to prevent default assignment of standard functions in the
141 * platform layer.
142 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200143//#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
Paul Bakker088c5c52014-04-25 11:11:10 +0200144
145/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200146 * \def MBEDTLS_PLATFORM_XXX_ALT
Paul Bakker747a83a2014-02-01 22:50:07 +0100147 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000148 * Uncomment a macro to let mbed TLS support the function in the platform
Paul Bakker747a83a2014-02-01 22:50:07 +0100149 * abstraction layer.
150 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200151 * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will
152 * provide a function "mbedtls_platform_set_printf()" that allows you to set an
Paul Bakker747a83a2014-02-01 22:50:07 +0100153 * alternative printf function pointer.
154 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200155 * All these define require MBEDTLS_PLATFORM_C to be defined!
Paul Bakker747a83a2014-02-01 22:50:07 +0100156 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200157 * WARNING: MBEDTLS_PLATFORM_SNPRINTF_ALT is not available on Windows
Rich Evans46b0a8d2015-01-30 10:47:32 +0000158 * for compatibility reasons.
159 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200160 * WARNING: MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
161 * MBEDTLS_PLATFORM_XXX_MACRO!
Rich Evans16f8cd82015-02-06 16:14:34 +0000162 *
Paul Bakker747a83a2014-02-01 22:50:07 +0100163 * Uncomment a macro to enable alternate implementation of specific base
164 * platform function
165 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200166//#define MBEDTLS_PLATFORM_EXIT_ALT
167//#define MBEDTLS_PLATFORM_FPRINTF_ALT
168//#define MBEDTLS_PLATFORM_PRINTF_ALT
169//#define MBEDTLS_PLATFORM_SNPRINTF_ALT
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100170
171/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200172 * \def MBEDTLS_DEPRECATED_WARNING
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100173 *
174 * Mark deprecated functions so that they generate a warning if used.
175 * Functions deprecated in one version will usually be removed in the next
176 * version. You can enable this to help you prepare the transition to a new
177 * major version by making sure your code is not using these functions.
178 *
179 * This only works with GCC and Clang. With other compilers, you may want to
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200180 * use MBEDTLS_DEPRECATED_REMOVED
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100181 *
182 * Uncomment to get warnings on using deprecated functions.
183 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200184//#define MBEDTLS_DEPRECATED_WARNING
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100185
186/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200187 * \def MBEDTLS_DEPRECATED_REMOVED
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100188 *
189 * Remove deprecated functions so that they generate an error if used.
190 * Functions deprecated in one version will usually be removed in the next
191 * version. You can enable this to help you prepare the transition to a new
192 * major version by making sure your code is not using these functions.
193 *
194 * Uncomment to get errors on using deprecated functions.
195 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200196//#define MBEDTLS_DEPRECATED_REMOVED
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100197
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200198/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000199
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000200/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000201 * \name SECTION: mbed TLS feature support
Paul Bakker0a62cd12011-01-21 11:00:08 +0000202 *
203 * This section sets support for features that are or are not needed
204 * within the modules that are enabled.
205 * \{
206 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000207
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000208/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200209 * \def MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +0100210 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200211 * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(),
212 * mbedtls_timing_get_timer(), mbedtls_set_alarm() and mbedtls_timing_m_sleep().
Paul Bakkerf2561b32014-02-06 15:11:55 +0100213 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200214 * Only works if you have MBEDTLS_TIMING_C enabled.
Paul Bakkerf2561b32014-02-06 15:11:55 +0100215 *
216 * You will need to provide a header "timing_alt.h" and an implementation at
217 * compile time.
218 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200219//#define MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +0100220
221/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200222 * \def MBEDTLS__MODULE_NAME__ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200223 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000224 * Uncomment a macro to let mbed TLS use your alternate core implementation of
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200225 * a symmetric or hash module (e.g. platform specific assembly optimized
Paul Bakker90995b52013-06-24 19:20:35 +0200226 * implementations). Keep in mind that the function prototypes should remain
227 * the same.
228 *
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200229 * This replaces the whole module. If you only want to replace one of the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200230 * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags.
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200231 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200232 * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer
233 * provide the "struct mbedtls_aes_context" definition and omit the base function
Paul Bakker90995b52013-06-24 19:20:35 +0200234 * declarations and implementations. "aes_alt.h" will be included from
235 * "aes.h" to include the new function definitions.
236 *
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200237 * Uncomment a macro to enable alternate implementation of the corresponding
238 * module.
Paul Bakker90995b52013-06-24 19:20:35 +0200239 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200240//#define MBEDTLS_AES_ALT
241//#define MBEDTLS_ARC4_ALT
242//#define MBEDTLS_BLOWFISH_ALT
243//#define MBEDTLS_CAMELLIA_ALT
244//#define MBEDTLS_DES_ALT
245//#define MBEDTLS_XTEA_ALT
246//#define MBEDTLS_MD2_ALT
247//#define MBEDTLS_MD4_ALT
248//#define MBEDTLS_MD5_ALT
249//#define MBEDTLS_RIPEMD160_ALT
250//#define MBEDTLS_SHA1_ALT
251//#define MBEDTLS_SHA256_ALT
252//#define MBEDTLS_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200253
254/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200255 * \def MBEDTLS__FUNCTION_NAME__ALT
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200256 *
257 * Uncomment a macro to let mbed TLS use you alternate core implementation of
258 * symmetric of hash function. Keep in mind that function prototypes should
259 * remain the same.
260 *
261 * This replaces only one function. The header file from mbed TLS is still
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200262 * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags.
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200263 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200264 * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will
265 * no longer provide the mbedtls_sha1_process() function, but it will still provide
266 * the other function (using your mbedtls_sha1_process() function) and the definition
267 * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200268 * with this definition.
269 *
270 *
271 * Uncomment a macro to enable alternate implementation of the corresponding
272 * function.
273 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200274//#define MBEDTLS_MD2_PROCESS_ALT
275//#define MBEDTLS_MD4_PROCESS_ALT
276//#define MBEDTLS_MD5_PROCESS_ALT
277//#define MBEDTLS_RIPEMD160_PROCESS_ALT
278//#define MBEDTLS_SHA1_PROCESS_ALT
279//#define MBEDTLS_SHA256_PROCESS_ALT
280//#define MBEDTLS_SHA512_PROCESS_ALT
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200281
282/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200283 * \def MBEDTLS_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000284 *
285 * Store the AES tables in ROM.
286 *
287 * Uncomment this macro to store the AES tables in ROM.
Paul Bakker15566e42011-04-24 21:19:15 +0000288 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200289//#define MBEDTLS_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000290
291/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200292 * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
Manuel Pégourié-Gonnard62edcc82015-04-03 16:28:19 +0200293 *
294 * Use less ROM for the Camellia implementation (saves about 768 bytes).
295 *
296 * Uncomment this macro to use less memory for Camellia.
297 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200298//#define MBEDTLS_CAMELLIA_SMALL_MEMORY
Manuel Pégourié-Gonnard62edcc82015-04-03 16:28:19 +0200299
300/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200301 * \def MBEDTLS_CIPHER_MODE_CBC
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200302 *
303 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
304 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200305#define MBEDTLS_CIPHER_MODE_CBC
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200306
307/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200308 * \def MBEDTLS_CIPHER_MODE_CFB
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000309 *
310 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
311 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200312#define MBEDTLS_CIPHER_MODE_CFB
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000313
314/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200315 * \def MBEDTLS_CIPHER_MODE_CTR
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000316 *
317 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
318 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200319#define MBEDTLS_CIPHER_MODE_CTR
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000320
321/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200322 * \def MBEDTLS_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000323 *
324 * Enable NULL cipher.
325 * Warning: Only do so when you know what you are doing. This allows for
326 * encryption or channels without any security!
327 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200328 * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable
Paul Bakkerfab5c822012-02-06 16:45:10 +0000329 * the following ciphersuites:
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200330 * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA
331 * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA
332 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA
333 * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA
334 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384
335 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256
336 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA
337 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384
338 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256
339 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA
340 * MBEDTLS_TLS_RSA_WITH_NULL_SHA256
341 * MBEDTLS_TLS_RSA_WITH_NULL_SHA
342 * MBEDTLS_TLS_RSA_WITH_NULL_MD5
343 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384
344 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256
345 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA
346 * MBEDTLS_TLS_PSK_WITH_NULL_SHA384
347 * MBEDTLS_TLS_PSK_WITH_NULL_SHA256
348 * MBEDTLS_TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000349 *
350 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000351 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200352//#define MBEDTLS_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000353
354/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200355 * \def MBEDTLS_CIPHER_PADDING_XXX
Paul Bakker48e93c82013-08-14 12:21:18 +0200356 *
357 * Uncomment or comment macros to add support for specific padding modes
358 * in the cipher layer with cipher modes that support padding (e.g. CBC)
359 *
360 * If you disable all padding modes, only full blocks can be used with CBC.
361 *
362 * Enable padding modes in the cipher layer.
363 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200364#define MBEDTLS_CIPHER_PADDING_PKCS7
365#define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
366#define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
367#define MBEDTLS_CIPHER_PADDING_ZEROS
Paul Bakker48e93c82013-08-14 12:21:18 +0200368
369/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200370 * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000371 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200372 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000373 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000374 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000375 *
376 * This enables the following ciphersuites:
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200377 * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA
378 * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000379 *
380 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000381 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200382//#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000383
384/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200385 * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200386 *
387 * Remove RC4 ciphersuites by default in SSL / TLS.
388 * This flag removes the ciphersuites based on RC4 from the default list as
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200389 * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to
390 * enable (some of) them with mbedtls_ssl_set_ciphersuites() by including them
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200391 * explicitly.
392 *
393 * Uncomment this macro to remove RC4 ciphersuites by default.
394 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200395#define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200396
397/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200398 * \def MBEDTLS_ECP_XXXX_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200399 *
400 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200401 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200402 *
403 * Comment macros to disable the curve and functions for it
404 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200405#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
406#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
407#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
408#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
409#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
410#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
411#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
412#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
413#define MBEDTLS_ECP_DP_BP256R1_ENABLED
414#define MBEDTLS_ECP_DP_BP384R1_ENABLED
415#define MBEDTLS_ECP_DP_BP512R1_ENABLED
416//#define MBEDTLS_ECP_DP_M221_ENABLED // Not implemented yet!
417#define MBEDTLS_ECP_DP_M255_ENABLED
418//#define MBEDTLS_ECP_DP_M383_ENABLED // Not implemented yet!
419//#define MBEDTLS_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200420
421/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200422 * \def MBEDTLS_ECP_NIST_OPTIM
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200423 *
424 * Enable specific 'modulo p' routines for each NIST prime.
425 * Depending on the prime and architecture, makes operations 4 to 8 times
426 * faster on the corresponding curve.
427 *
428 * Comment this macro to disable NIST curves optimisation.
429 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200430#define MBEDTLS_ECP_NIST_OPTIM
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200431
432/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200433 * \def MBEDTLS_ECDSA_DETERMINISTIC
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100434 *
435 * Enable deterministic ECDSA (RFC 6979).
436 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
437 * may result in a compromise of the long-term signing key. This is avoided by
438 * the deterministic variant.
439 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200440 * Requires: MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100441 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100442 * Comment this macro to disable deterministic ECDSA.
443 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200444#define MBEDTLS_ECDSA_DETERMINISTIC
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100445
446/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200447 * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200448 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200449 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200450 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200451 * This enables the following ciphersuites (if other requisites are
452 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200453 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
454 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
455 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
456 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
457 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
458 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
459 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
460 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
461 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
462 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
463 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
464 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200465 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200466#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200467
468/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200469 * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200470 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200471 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200472 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200473 * Requires: MBEDTLS_DHM_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200474 *
475 * This enables the following ciphersuites (if other requisites are
476 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200477 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
478 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
479 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
480 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
481 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
482 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
483 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
484 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
485 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
486 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
487 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
488 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200489 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200490#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200491
492/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200493 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200494 *
495 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
496 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200497 * Requires: MBEDTLS_ECDH_C
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200498 *
499 * This enables the following ciphersuites (if other requisites are
500 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200501 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
502 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
503 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
504 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
505 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
506 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
507 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
508 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200509 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200510#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200511
512/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200513 * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200514 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200515 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200516 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200517 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
518 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200519 *
520 * This enables the following ciphersuites (if other requisites are
521 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200522 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
523 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
524 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
525 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
526 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
527 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
528 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
529 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
530 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
531 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
532 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
533 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200534 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200535#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200536
537/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200538 * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200539 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200540 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200541 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200542 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
543 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200544 *
545 * This enables the following ciphersuites (if other requisites are
546 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200547 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
548 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
549 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
550 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
551 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
552 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
553 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
554 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
555 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
556 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
557 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
558 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
559 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
560 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
561 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200562 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200563#define MBEDTLS_KEY_EXCHANGE_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_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200567 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200568 * Enable the DHE-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_DHM_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_DHE_RSA_WITH_AES_256_GCM_SHA384
576 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
577 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
578 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
579 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
580 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
581 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
582 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
583 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
584 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
585 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
586 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
587 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200588 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200589#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200590
591/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200592 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200593 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200594 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200595 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200596 * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
597 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200598 *
599 * This enables the following ciphersuites (if other requisites are
600 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200601 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
602 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
603 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
604 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
605 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
606 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
607 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
608 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
609 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
610 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
611 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
612 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200613 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200614#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200615
616/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200617 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200618 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200619 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200620 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200621 * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200622 *
623 * This enables the following ciphersuites (if other requisites are
624 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200625 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
626 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
627 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
628 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
629 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
630 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
631 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
632 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
633 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
634 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
635 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
636 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200637 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200638#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200639
640/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200641 * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100642 *
643 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
644 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200645 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100646 *
647 * This enables the following ciphersuites (if other requisites are
648 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200649 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
650 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
651 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
652 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
653 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
654 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
655 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
656 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
657 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
658 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
659 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
660 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100661 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200662#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100663
664/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200665 * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100666 *
667 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
668 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200669 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100670 *
671 * This enables the following ciphersuites (if other requisites are
672 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200673 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
674 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
675 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
676 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
677 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
678 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
679 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
680 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
681 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
682 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
683 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
684 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100685 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200686#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100687
688/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200689 * \def MBEDTLS_PK_PARSE_EC_EXTENDED
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100690 *
691 * Enhance support for reading EC keys using variants of SEC1 not allowed by
692 * RFC 5915 and RFC 5480.
693 *
694 * Currently this means parsing the SpecifiedECDomain choice of EC
695 * parameters (only known groups are supported, not arbitrary domains, to
696 * avoid validation issues).
697 *
698 * Disable if you only need to support RFC 5915 + 5480 key formats.
699 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200700#define MBEDTLS_PK_PARSE_EC_EXTENDED
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100701
702/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200703 * \def MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100704 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200705 * Enable a dummy error function to make use of mbedtls_strerror() in
706 * third party libraries easier when MBEDTLS_ERROR_C is disabled
707 * (no effect when MBEDTLS_ERROR_C is enabled).
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200708 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200709 * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
710 * not using mbedtls_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100711 *
712 * Disable if you run into name conflicts and want to really remove the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200713 * mbedtls_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100714 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200715#define MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100716
717/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200718 * \def MBEDTLS_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000719 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200720 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200721 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200722 * Requires: MBEDTLS_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000723 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200724#define MBEDTLS_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000725
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000726/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200727 * \def MBEDTLS_FS_IO
Paul Bakker335db3f2011-04-25 15:28:35 +0000728 *
729 * Enable functions that use the filesystem.
730 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200731#define MBEDTLS_FS_IO
Paul Bakker335db3f2011-04-25 15:28:35 +0000732
733/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200734 * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000735 *
736 * Do not add default entropy sources. These are the platform specific,
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200737 * mbedtls_timing_hardclock and HAVEGE based poll functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000738 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700739 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000740 * application.
741 *
742 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000743 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200744//#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000745
746/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200747 * \def MBEDTLS_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000748 *
749 * Do not use built-in platform entropy functions.
750 * This is useful if your platform does not support
751 * standards like the /dev/urandom or Windows CryptoAPI.
752 *
753 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000754 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200755//#define MBEDTLS_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000756
757/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200758 * \def MBEDTLS_ENTROPY_FORCE_SHA256
Paul Bakker2ceda572014-02-06 15:55:25 +0100759 *
760 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
761 * default SHA-512 based one (if both are available).
762 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200763 * Requires: MBEDTLS_SHA256_C
Paul Bakker2ceda572014-02-06 15:55:25 +0100764 *
765 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
766 * if you have performance concerns.
767 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200768 * This option is only useful if both MBEDTLS_SHA256_C and
769 * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
Paul Bakker2ceda572014-02-06 15:55:25 +0100770 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200771//#define MBEDTLS_ENTROPY_FORCE_SHA256
Paul Bakker2ceda572014-02-06 15:55:25 +0100772
773/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200774 * \def MBEDTLS_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200775 *
776 * Enable debugging of buffer allocator memory issues. Automatically prints
777 * (to stderr) all (fatal) messages on memory allocation issues. Enables
778 * function for 'debug output' of allocated memory.
779 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200780 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200781 *
782 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200783 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200784//#define MBEDTLS_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200785
786/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200787 * \def MBEDTLS_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200788 *
789 * Include backtrace information with each allocated block.
790 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200791 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200792 * GLIBC-compatible backtrace() an backtrace_symbols() support
793 *
794 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200795 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200796//#define MBEDTLS_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200797
798/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200799 * \def MBEDTLS_PK_RSA_ALT_SUPPORT
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +0200800 *
801 * Support external private RSA keys (eg from a HSM) in the PK layer.
802 *
803 * Comment this macro to disable support for external private RSA keys.
804 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200805#define MBEDTLS_PK_RSA_ALT_SUPPORT
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +0200806
807/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200808 * \def MBEDTLS_PKCS1_V15
Paul Bakker48377d92013-08-30 12:06:24 +0200809 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200810 * Enable support for PKCS#1 v1.5 encoding.
811 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200812 * Requires: MBEDTLS_RSA_C
Paul Bakker48377d92013-08-30 12:06:24 +0200813 *
Paul Bakker48377d92013-08-30 12:06:24 +0200814 * This enables support for PKCS#1 v1.5 operations.
815 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200816#define MBEDTLS_PKCS1_V15
Paul Bakker48377d92013-08-30 12:06:24 +0200817
818/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200819 * \def MBEDTLS_PKCS1_V21
Paul Bakker9dcc3222011-03-08 14:16:06 +0000820 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200821 * Enable support for PKCS#1 v2.1 encoding.
822 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200823 * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000824 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000825 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
826 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200827#define MBEDTLS_PKCS1_V21
Paul Bakker9dcc3222011-03-08 14:16:06 +0000828
829/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200830 * \def MBEDTLS_RSA_NO_CRT
Paul Bakker0216cc12011-03-26 13:40:23 +0000831 *
832 * Do not use the Chinese Remainder Theorem for the RSA private operation.
833 *
834 * Uncomment this macro to disable the use of CRT in RSA.
835 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000836 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200837//#define MBEDTLS_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000838
839/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200840 * \def MBEDTLS_SELF_TEST
Paul Bakker15566e42011-04-24 21:19:15 +0000841 *
842 * Enable the checkup functions (*_self_test).
843 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200844#define MBEDTLS_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000845
846/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200847 * \def MBEDTLS_SSL_AEAD_RANDOM_IV
Manuel Pégourié-Gonnardd056ce02014-10-29 22:29:20 +0100848 *
849 * Generate a random IV rather than using the record sequence number as a
850 * nonce for ciphersuites using and AEAD algorithm (GCM or CCM).
851 *
852 * Using the sequence number is generally recommended.
853 *
854 * Uncomment this macro to always use random IVs with AEAD ciphersuites.
855 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200856//#define MBEDTLS_SSL_AEAD_RANDOM_IV
Manuel Pégourié-Gonnardd056ce02014-10-29 22:29:20 +0100857
858/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200859 * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100860 *
861 * Enable sending of alert messages in case of encountered errors as per RFC.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000862 * If you choose not to send the alert messages, mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100863 * with other servers, only debugging of failures is harder.
864 *
865 * The advantage of not sending alert messages, is that no information is given
866 * about reasons for failures thus preventing adversaries of gaining intel.
867 *
868 * Enable sending of all alert messages
869 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200870#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100871
872/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200873 * \def MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100874 *
875 * Enable the debug messages in SSL module for all issues.
876 * Debug messages have been disabled in some places to prevent timing
877 * attacks due to (unbalanced) debugging function calls.
878 *
879 * If you need all error reporting you should enable this during debugging,
880 * but remove this for production servers that should log as well.
881 *
882 * Uncomment this macro to report all debug messages on errors introducing
883 * a timing side-channel.
884 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100885 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200886//#define MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100887
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200888/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100889 *
890 * Enable support for Encrypt-then-MAC, RFC 7366.
891 *
892 * This allows peers that both support it to use a more robust protection for
893 * ciphersuites using CBC, providing deep resistance against timing attacks
894 * on the padding or underlying cipher.
895 *
896 * This only affects CBC ciphersuites, and is useless if none is defined.
897 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200898 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
899 * MBEDTLS_SSL_PROTO_TLS1_1 or
900 * MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100901 *
902 * Comment this macro to disable support for Encrypt-then-MAC
903 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200904#define MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100905
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200906/** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200907 *
908 * Enable support for Extended Master Secret, aka Session Hash
909 * (draft-ietf-tls-session-hash-02).
910 *
911 * This was introduced as "the proper fix" to the Triple Handshake familiy of
912 * attacks, but it is recommended to always use it (even if you disable
913 * renegotiation), since it actually fixes a more fundamental issue in the
914 * original SSL/TLS design, and has implications beyond Triple Handshake.
915 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200916 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
917 * MBEDTLS_SSL_PROTO_TLS1_1 or
918 * MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100919 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200920 * Comment this macro to disable support for Extended Master Secret.
921 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200922#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200923
Paul Bakkerd66f0702013-01-31 16:57:45 +0100924/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200925 * \def MBEDTLS_SSL_FALLBACK_SCSV
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200926 *
927 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
928 *
929 * For servers, it is recommended to always enable this, unless you support
930 * only one version of TLS, or know for sure that none of your clients
931 * implements a fallback strategy.
932 *
933 * For clients, you only need this if you're using a fallback strategy, which
934 * is not recommended in the first place, unless you absolutely need it to
935 * interoperate with buggy (version-intolerant) servers.
936 *
937 * Comment this macro to disable support for FALLBACK_SCSV
938 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200939#define MBEDTLS_SSL_FALLBACK_SCSV
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200940
941/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200942 * \def MBEDTLS_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000943 *
944 * Enable hooking functions in SSL module for hardware acceleration of
945 * individual records.
946 *
947 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000948 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200949//#define MBEDTLS_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000950
951/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200952 * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100953 *
954 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
955 *
956 * This is a countermeasure to the BEAST attack, which also minimizes the risk
957 * of interoperability issues compared to sending 0-length records.
958 *
959 * Comment this macro to disable 1/n-1 record splitting.
960 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200961#define MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100962
963/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200964 * \def MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100965 *
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100966 * Disable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100967 *
968 * The two main uses of renegotiation are (1) refresh keys on long-lived
969 * connections and (2) client authentication after the initial handshake.
970 * If you don't need renegotiation, it's probably better to disable it, since
971 * it has been associated with security issues in the past and is easy to
972 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100973 *
Manuel Pégourié-Gonnard55f968b2015-03-09 16:23:15 +0000974 * Comment this to disable support for renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100975 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200976#define MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100977
978/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200979 * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
Paul Bakker78a8c712013-03-06 17:01:52 +0100980 *
981 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200982 * SSL Server module (MBEDTLS_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100983 *
Manuel Pégourié-Gonnard265dd5c2015-03-10 13:48:34 +0000984 * Uncomment this macro to enable support for SSLv2 Client Hello messages.
Paul Bakker78a8c712013-03-06 17:01:52 +0100985 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200986//#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
Paul Bakker78a8c712013-03-06 17:01:52 +0100987
988/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200989 * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100990 *
991 * Pick the ciphersuite according to the client's preferences rather than ours
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200992 * in the SSL Server module (MBEDTLS_SSL_SRV_C).
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100993 *
994 * Uncomment this macro to respect client's ciphersuite order
995 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200996//#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100997
998/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200999 * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +02001000 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001001 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +02001002 *
1003 * Comment this macro to disable support for the max_fragment_length extension
1004 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001005#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +02001006
1007/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001008 * \def MBEDTLS_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001009 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001010 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001011 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001012 * Requires: MBEDTLS_MD5_C
1013 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001014 *
1015 * Comment this macro to disable support for SSL 3.0
1016 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001017#define MBEDTLS_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001018
1019/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001020 * \def MBEDTLS_SSL_PROTO_TLS1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001021 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001022 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001023 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001024 * Requires: MBEDTLS_MD5_C
1025 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001026 *
1027 * Comment this macro to disable support for TLS 1.0
1028 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001029#define MBEDTLS_SSL_PROTO_TLS1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001030
1031/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001032 * \def MBEDTLS_SSL_PROTO_TLS1_1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001033 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001034 * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001035 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001036 * Requires: MBEDTLS_MD5_C
1037 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001038 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001039 * Comment this macro to disable support for TLS 1.1 / DTLS 1.0
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001040 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001041#define MBEDTLS_SSL_PROTO_TLS1_1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001042
1043/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001044 * \def MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001045 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001046 * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001047 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001048 * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001049 * (Depends on ciphersuites)
1050 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001051 * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001052 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001053#define MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001054
1055/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001056 * \def MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001057 *
1058 * Enable support for DTLS (all available versions).
1059 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001060 * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0,
1061 * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001062 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001063 * Requires: MBEDTLS_SSL_PROTO_TLS1_1
1064 * or MBEDTLS_SSL_PROTO_TLS1_2
1065 * MBEDTLS_TIMING_C
Manuel Pégourié-Gonnard8e704f02014-10-14 20:03:35 +02001066 *
1067 * \note Dependency on TIMING_C may be replaced by something more flexible
1068 * (callbacks or abstraction layer in the next major version). Please contact
1069 * us if you're having issues with this dependency.
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001070 *
1071 * Comment this macro to disable support for DTLS
1072 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001073#define MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001074
1075/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001076 * \def MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001077 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +01001078 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001079 *
Paul Bakker27e36d32014-04-08 12:33:37 +02001080 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001081 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001082#define MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001083
1084/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001085 * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001086 *
1087 * Enable support for the anti-replay mechanism in DTLS.
1088 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001089 * Requires: MBEDTLS_SSL_TLS_C
1090 * MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001091 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001092 * \warning Disabling this is often a security risk!
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001093 * See mbedtls_ssl_set_dtls_anti_replay() for details.
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001094 *
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001095 * Comment this to disable anti-replay in DTLS.
1096 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001097#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001098
1099/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001100 * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001101 *
1102 * Enable support for HelloVerifyRequest on DTLS servers.
1103 *
1104 * This feature is highly recommended to prevent DTLS servers being used as
1105 * amplifiers in DoS attacks against other hosts. It should always be enabled
1106 * unless you know for sure amplification cannot be a problem in the
1107 * environment in which your server operates.
1108 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001109 * \warning Disabling this can ba a security risk! (see above)
1110 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001111 * Requires: MBEDTLS_SSL_SRV_C
1112 * MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001113 *
1114 * Comment this to disable support for HelloVerifyRequest.
1115 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001116#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001117
1118/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001119 * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001120 *
1121 * Enable support for a limit of records with bad MAC.
1122 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001123 * See mbedtls_ssl_set_dtls_badmac_limit().
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001124 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001125 * Requires: MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001126 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001127#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001128
1129/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001130 * \def MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +02001131 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001132 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +02001133 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001134 * Requires: MBEDTLS_AES_C
1135 * MBEDTLS_SHA256_C
1136 * MBEDTLS_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +02001137 *
1138 * Comment this macro to disable support for SSL session tickets
1139 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001140#define MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +02001141
1142/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001143 * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +02001144 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001145 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +02001146 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001147 * Requires: MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +00001148 *
Paul Bakker0be444a2013-08-27 21:55:01 +02001149 * Comment this macro to disable support for server name indication in SSL
1150 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001151#define MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +02001152
1153/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001154 * \def MBEDTLS_SSL_TRUNCATED_HMAC
Paul Bakker1f2bc622013-08-15 13:45:55 +02001155 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001156 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +02001157 *
1158 * Comment this macro to disable support for truncated HMAC in SSL
1159 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001160#define MBEDTLS_SSL_TRUNCATED_HMAC
Paul Bakker1f2bc622013-08-15 13:45:55 +02001161
1162/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001163 * \def MBEDTLS_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001164 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001165 * Enable mbedtls_ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001166 *
1167 * This is disabled by default since it breaks binary compatibility with the
1168 * 1.3.x line. If you choose to enable it, you will need to rebuild your
1169 * application against the new header files, relinking will not be enough.
1170 * It will be enabled by default, or no longer an option, in the 1.4 branch.
1171 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001172 * Uncomment to make mbedtls_ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001173 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001174//#define MBEDTLS_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001175
1176/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001177 * \def MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001178 *
1179 * Provide your own alternate threading implementation.
1180 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001181 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001182 *
1183 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +02001184 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001185//#define MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001186
1187/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001188 * \def MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001189 *
1190 * Enable the pthread wrapper layer for the threading layer.
1191 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001192 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001193 *
1194 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +02001195 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001196//#define MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001197
1198/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001199 * \def MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001200 *
1201 * Allow run-time checking of compile-time enabled features. Thus allowing users
1202 * to check at run-time if the library is for instance compiled with threading
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001203 * support via mbedtls_version_check_feature().
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001204 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001205 * Requires: MBEDTLS_VERSION_C
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001206 *
1207 * Comment this to disable run-time checking and save ROM space
1208 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001209#define MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001210
1211/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001212 * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001213 *
1214 * If set, the X509 parser will not break-off when parsing an X509 certificate
1215 * and encountering an extension in a v1 or v2 certificate.
1216 *
1217 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001218 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001219//#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001220
1221/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001222 * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker5c721f92011-07-27 16:51:09 +00001223 *
1224 * If set, the X509 parser will not break-off when parsing an X509 certificate
1225 * and encountering an unknown critical extension.
1226 *
1227 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +00001228 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001229//#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +00001230
1231/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001232 * \def MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001233 *
1234 * Enable verification of the keyUsage extension (CA and leaf certificates).
1235 *
1236 * Disabling this avoids problems with mis-issued and/or misused
1237 * (intermediate) CA and leaf certificates.
1238 *
1239 * \warning Depending on your PKI use, disabling this can be a security risk!
1240 *
1241 * Comment to skip keyUsage checking for both CA and leaf certificates.
1242 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001243#define MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001244
1245/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001246 * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001247 *
1248 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1249 *
1250 * Disabling this avoids problems with mis-issued and/or misused certificates.
1251 *
1252 * \warning Depending on your PKI use, disabling this can be a security risk!
1253 *
1254 * Comment to skip extendedKeyUsage checking for certificates.
1255 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001256#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001257
1258/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001259 * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001260 *
1261 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1262 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1263 *
1264 * Comment this macro to disallow using RSASSA-PSS in certificates.
1265 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001266#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001267
1268/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001269 * \def MBEDTLS_ZLIB_SUPPORT
Paul Bakker2770fbd2012-07-03 13:30:23 +00001270 *
1271 * If set, the SSL/TLS module uses ZLIB to support compression and
1272 * decompression of packet data.
1273 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001274 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1275 * CRIME attack. Before enabling this option, you should examine with care if
1276 * CRIME or similar exploits may be a applicable to your use case.
1277 *
Manuel Pégourié-Gonnarda0e16322014-07-14 17:38:41 +02001278 * \note Currently compression can't bu used with DTLS.
1279 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001280 * Used in: library/ssl_tls.c
1281 * library/ssl_cli.c
1282 * library/ssl_srv.c
1283 *
1284 * This feature requires zlib library and headers to be present.
1285 *
1286 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001287 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001288//#define MBEDTLS_ZLIB_SUPPORT
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001289/* \} name SECTION: mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001290
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001291/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001292 * \name SECTION: mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +00001293 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001294 * This section enables or disables entire modules in mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +00001295 * \{
1296 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001297
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001298/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001299 * \def MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001300 *
1301 * Enable AES-NI support on x86-64.
1302 *
1303 * Module: library/aesni.c
1304 * Caller: library/aes.c
1305 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001306 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001307 *
1308 * This modules adds support for the AES-NI instructions on x86-64
1309 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001310#define MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001311
1312/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001313 * \def MBEDTLS_AES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001314 *
1315 * Enable the AES block cipher.
1316 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001317 * Module: library/aes.c
1318 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001319 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001320 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001321 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001322 * This module enables the following ciphersuites (if other requisites are
1323 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001324 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1325 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1326 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1327 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1328 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1329 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1330 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1331 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1332 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1333 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1334 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1335 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
1336 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1337 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1338 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1339 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1340 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
1341 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
1342 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
1343 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
1344 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1345 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1346 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1347 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1348 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1349 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1350 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1351 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1352 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1353 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1354 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1355 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1356 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1357 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1358 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1359 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1360 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1361 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1362 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1363 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1364 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
1365 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
1366 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
1367 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
1368 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
1369 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
1370 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1371 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1372 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1373 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1374 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1375 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1376 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
1377 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
1378 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
1379 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
1380 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
1381 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001382 *
Paul Bakkercff68422013-09-15 20:43:33 +02001383 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001384 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001385#define MBEDTLS_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001386
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001387/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001388 * \def MBEDTLS_ARC4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001389 *
1390 * Enable the ARCFOUR stream cipher.
1391 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001392 * Module: library/arc4.c
1393 * Caller: library/ssl_tls.c
1394 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001395 * This module enables the following ciphersuites (if other requisites are
1396 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001397 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1398 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
1399 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
1400 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
1401 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
1402 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
1403 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
1404 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
1405 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
1406 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001407 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001408#define MBEDTLS_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001409
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001410/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001411 * \def MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001412 *
1413 * Enable the generic ASN1 parser.
1414 *
1415 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001416 * Caller: library/x509.c
1417 * library/dhm.c
1418 * library/pkcs12.c
1419 * library/pkcs5.c
1420 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001421 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001422#define MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001423
1424/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001425 * \def MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001426 *
1427 * Enable the generic ASN1 writer.
1428 *
1429 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001430 * Caller: library/ecdsa.c
1431 * library/pkwrite.c
1432 * library/x509_create.c
1433 * library/x509write_crt.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001434 * library/mbedtls_x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001435 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001436#define MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001437
1438/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001439 * \def MBEDTLS_BASE64_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001440 *
1441 * Enable the Base64 module.
1442 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001443 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001444 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001445 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001446 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001447 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001448#define MBEDTLS_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001449
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001450/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001451 * \def MBEDTLS_BIGNUM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001452 *
Paul Bakker9a736322012-11-14 12:39:52 +00001453 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001454 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001455 * Module: library/bignum.c
1456 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001457 * library/ecp.c
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001458 * library/ecdsa.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001459 * library/rsa.c
1460 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001461 *
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001462 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
Paul Bakker5121ce52009-01-03 21:22:43 +00001463 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001464#define MBEDTLS_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001465
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001466/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001467 * \def MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001468 *
1469 * Enable the Blowfish block cipher.
1470 *
1471 * Module: library/blowfish.c
1472 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001473#define MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001474
1475/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001476 * \def MBEDTLS_CAMELLIA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001477 *
1478 * Enable the Camellia block cipher.
1479 *
Paul Bakker38119b12009-01-10 23:31:23 +00001480 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001481 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001482 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001483 * This module enables the following ciphersuites (if other requisites are
1484 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001485 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1486 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1487 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1488 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1489 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1490 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1491 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1492 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
1493 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1494 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1495 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1496 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1497 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
1498 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
1499 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1500 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1501 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1502 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1503 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1504 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1505 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1506 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1507 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1508 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1509 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1510 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1511 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1512 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1513 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1514 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1515 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1516 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1517 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1518 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1519 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1520 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1521 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1522 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1523 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1524 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1525 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1526 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001527 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001528#define MBEDTLS_CAMELLIA_C
Paul Bakker38119b12009-01-10 23:31:23 +00001529
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001530/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001531 * \def MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001532 *
1533 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1534 *
1535 * Module: library/ccm.c
1536 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001537 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001538 *
1539 * This module enables the AES-CCM ciphersuites, if other requisites are
1540 * enabled as well.
1541 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001542#define MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001543
1544/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001545 * \def MBEDTLS_CERTS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001546 *
1547 * Enable the test certificates.
1548 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001549 * Module: library/certs.c
1550 * Caller:
1551 *
1552 * This module is used for testing (ssl_client/server).
1553 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001554#define MBEDTLS_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001555
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001556/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001557 * \def MBEDTLS_CIPHER_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001558 *
1559 * Enable the generic cipher layer.
1560 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001561 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001562 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001563 *
1564 * Uncomment to enable generic cipher wrappers.
1565 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001566#define MBEDTLS_CIPHER_C
Paul Bakker8123e9d2011-01-06 15:37:30 +00001567
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001568/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001569 * \def MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001570 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001571 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001572 *
1573 * Module: library/ctr_drbg.c
1574 * Caller:
1575 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001576 * Requires: MBEDTLS_AES_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001577 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001578 * This module provides the CTR_DRBG AES-256 random number generator.
1579 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001580#define MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001581
1582/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001583 * \def MBEDTLS_DEBUG_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001584 *
1585 * Enable the debug functions.
1586 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001587 * Module: library/debug.c
1588 * Caller: library/ssl_cli.c
1589 * library/ssl_srv.c
1590 * library/ssl_tls.c
1591 *
1592 * This module provides debugging functions.
1593 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001594#define MBEDTLS_DEBUG_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_DES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001598 *
1599 * Enable the DES block cipher.
1600 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001601 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001602 * Caller: library/pem.c
1603 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001604 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001605 * This module enables the following ciphersuites (if other requisites are
1606 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001607 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1608 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
1609 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
1610 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1611 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1612 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1613 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1614 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
1615 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
1616 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001617 *
Paul Bakkercff68422013-09-15 20:43:33 +02001618 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001619 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001620#define MBEDTLS_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001621
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001622/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001623 * \def MBEDTLS_DHM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001624 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001625 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001626 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001627 * Module: library/dhm.c
1628 * Caller: library/ssl_cli.c
1629 * library/ssl_srv.c
1630 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001631 * This module is used by the following key exchanges:
1632 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001633 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001634#define MBEDTLS_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001635
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001636/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001637 * \def MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001638 *
1639 * Enable the elliptic curve Diffie-Hellman library.
1640 *
1641 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001642 * Caller: library/ssl_cli.c
1643 * library/ssl_srv.c
1644 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001645 * This module is used by the following key exchanges:
1646 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001647 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001648 * Requires: MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001649 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001650#define MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001651
1652/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001653 * \def MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001654 *
1655 * Enable the elliptic curve DSA library.
1656 *
1657 * Module: library/ecdsa.c
1658 * Caller:
1659 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001660 * This module is used by the following key exchanges:
1661 * ECDHE-ECDSA
1662 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001663 * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001664 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001665#define MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001666
1667/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001668 * \def MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001669 *
1670 * Enable the elliptic curve over GF(p) library.
1671 *
1672 * Module: library/ecp.c
1673 * Caller: library/ecdh.c
1674 * library/ecdsa.c
1675 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001676 * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001677 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001678#define MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001679
1680/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001681 * \def MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001682 *
1683 * Enable the platform-specific entropy code.
1684 *
1685 * Module: library/entropy.c
1686 * Caller:
1687 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001688 * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001689 *
1690 * This module provides a generic entropy pool
1691 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001692#define MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001693
1694/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001695 * \def MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001696 *
1697 * Enable error code to error string conversion.
1698 *
1699 * Module: library/error.c
1700 * Caller:
1701 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001702 * This module enables mbedtls_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001703 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001704#define MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001705
1706/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001707 * \def MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001708 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001709 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001710 *
1711 * Module: library/gcm.c
1712 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001713 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001714 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001715 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1716 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001717 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001718#define MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001719
1720/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001721 * \def MBEDTLS_HAVEGE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001722 *
1723 * Enable the HAVEGE random generator.
1724 *
Paul Bakker2a844242013-06-24 13:01:53 +02001725 * Warning: the HAVEGE random generator is not suitable for virtualized
1726 * environments
1727 *
1728 * Warning: the HAVEGE random generator is dependent on timing and specific
1729 * processor traits. It is therefore not advised to use HAVEGE as
1730 * your applications primary random generator or primary entropy pool
1731 * input. As a secondary input to your entropy pool, it IS able add
1732 * the (limited) extra entropy it provides.
1733 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001734 * Module: library/havege.c
1735 * Caller:
1736 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001737 * Requires: MBEDTLS_TIMING_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001738 *
Paul Bakker2a844242013-06-24 13:01:53 +02001739 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001740 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001741//#define MBEDTLS_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001742
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001743/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001744 * \def MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001745 *
1746 * Enable the HMAC_DRBG random generator.
1747 *
1748 * Module: library/hmac_drbg.c
1749 * Caller:
1750 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001751 * Requires: MBEDTLS_MD_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001752 *
1753 * Uncomment to enable the HMAC_DRBG random number geerator.
1754 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001755#define MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001756
1757/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001758 * \def MBEDTLS_MD_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001759 *
1760 * Enable the generic message digest layer.
1761 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001762 * Module: library/mbedtls_md.c
Paul Bakker17373852011-01-06 14:20:01 +00001763 * Caller:
1764 *
1765 * Uncomment to enable generic message digest wrappers.
1766 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001767#define MBEDTLS_MD_C
Paul Bakker17373852011-01-06 14:20:01 +00001768
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001769/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001770 * \def MBEDTLS_MD2_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001771 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001772 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001773 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001774 * Module: library/mbedtls_md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001775 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001776 *
1777 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001778 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001779//#define MBEDTLS_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001780
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001781/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001782 * \def MBEDTLS_MD4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001783 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001784 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001785 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001786 * Module: library/mbedtls_md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001787 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001788 *
1789 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001790 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001791//#define MBEDTLS_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001792
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001793/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001794 * \def MBEDTLS_MD5_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001795 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001796 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001797 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001798 * Module: library/mbedtls_md5.c
1799 * Caller: library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001800 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001801 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001802 *
1803 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001804 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001805 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001806#define MBEDTLS_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001807
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001808/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001809 * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001810 *
1811 * Enable the buffer allocator implementation that makes use of a (stack)
1812 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1813 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001814 *
1815 * Module: library/memory_buffer_alloc.c
1816 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001817 * Requires: MBEDTLS_PLATFORM_C
1818 * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
Paul Bakker6e339b52013-07-03 13:37:05 +02001819 *
1820 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001821 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001822//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001823
1824/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001825 * \def MBEDTLS_NET_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001826 *
1827 * Enable the TCP/IP networking routines.
1828 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001829 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001830 *
1831 * This module provides TCP/IP networking routines.
1832 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001833#define MBEDTLS_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001834
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001835/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001836 * \def MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001837 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001838 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001839 *
1840 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001841 * Caller: library/asn1write.c
1842 * library/pkcs5.c
1843 * library/pkparse.c
1844 * library/pkwrite.c
1845 * library/rsa.c
1846 * library/x509.c
1847 * library/x509_create.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001848 * library/mbedtls_x509_crl.c
1849 * library/mbedtls_x509_crt.c
1850 * library/mbedtls_x509_csr.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001851 * library/x509write_crt.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001852 * library/mbedtls_x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001853 *
1854 * This modules translates between OIDs and internal values.
1855 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001856#define MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001857
1858/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001859 * \def MBEDTLS_PADLOCK_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001860 *
1861 * Enable VIA Padlock support on x86.
1862 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001863 * Module: library/padlock.c
1864 * Caller: library/aes.c
1865 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001866 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001867 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001868 * This modules adds support for the VIA PadLock on x86.
1869 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001870#define MBEDTLS_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001871
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001872/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001873 * \def MBEDTLS_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001874 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001875 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001876 *
1877 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001878 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001879 * library/pkparse.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001880 * library/mbedtls_x509_crl.c
1881 * library/mbedtls_x509_crt.c
1882 * library/mbedtls_x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001883 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001884 * Requires: MBEDTLS_BASE64_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001885 *
Paul Bakkercff68422013-09-15 20:43:33 +02001886 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001887 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001888#define MBEDTLS_PEM_PARSE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001889
1890/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001891 * \def MBEDTLS_PEM_WRITE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001892 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001893 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001894 *
1895 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001896 * Caller: library/pkwrite.c
1897 * library/x509write_crt.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001898 * library/mbedtls_x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001899 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001900 * Requires: MBEDTLS_BASE64_C
Paul Bakkercff68422013-09-15 20:43:33 +02001901 *
1902 * This modules adds support for encoding / writing PEM files.
1903 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001904#define MBEDTLS_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001905
1906/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001907 * \def MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001908 *
1909 * Enable the generic public (asymetric) key layer.
1910 *
1911 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001912 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001913 * library/ssl_cli.c
1914 * library/ssl_srv.c
1915 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001916 * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001917 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001918 * Uncomment to enable generic public key wrappers.
1919 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001920#define MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001921
1922/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001923 * \def MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001924 *
1925 * Enable the generic public (asymetric) key parser.
1926 *
1927 * Module: library/pkparse.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001928 * Caller: library/mbedtls_x509_crt.c
1929 * library/mbedtls_x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001930 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001931 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02001932 *
1933 * Uncomment to enable generic public key parse functions.
1934 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001935#define MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001936
1937/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001938 * \def MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001939 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001940 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001941 *
1942 * Module: library/pkwrite.c
1943 * Caller: library/x509write.c
1944 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001945 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02001946 *
1947 * Uncomment to enable generic public key write functions.
1948 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001949#define MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001950
1951/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001952 * \def MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001953 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001954 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001955 *
1956 * Module: library/pkcs5.c
1957 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001958 * Requires: MBEDTLS_MD_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001959 *
1960 * This module adds support for the PKCS#5 functions.
1961 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001962#define MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001963
1964/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001965 * \def MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001966 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001967 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001968 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001969 * Module: library/pkcs11.c
1970 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001971 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001972 * Requires: MBEDTLS_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001973 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001974 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001975 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001976 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001977//#define MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001978
1979/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001980 * \def MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001981 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001982 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001983 * Adds algorithms for parsing PKCS#8 encrypted private keys
1984 *
1985 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001986 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001987 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001988 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
1989 * Can use: MBEDTLS_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001990 *
1991 * This module enables PKCS#12 functions.
1992 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001993#define MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001994
1995/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001996 * \def MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01001997 *
1998 * Enable the platform abstraction layer that allows you to re-assign
Rich Evansc39cb492015-01-30 12:01:34 +00001999 * functions like malloc(), free(), snprintf(), printf(), fprintf(), exit()
Paul Bakker747a83a2014-02-01 22:50:07 +01002000 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002001 * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
2002 * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
Rich Evans16f8cd82015-02-06 16:14:34 +00002003 * above to be specified at runtime or compile time respectively.
Paul Bakker747a83a2014-02-01 22:50:07 +01002004 *
2005 * Module: library/platform.c
2006 * Caller: Most other .c files
2007 *
2008 * This module enables abstraction of common (libc) functions.
2009 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002010#define MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01002011
2012/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002013 * \def MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002014 *
2015 * Enable the RIPEMD-160 hash algorithm.
2016 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002017 * Module: library/mbedtls_ripemd160.c
2018 * Caller: library/mbedtls_md.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002019 *
2020 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002021#define MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002022
2023/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002024 * \def MBEDTLS_RSA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002025 *
2026 * Enable the RSA public-key cryptosystem.
2027 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002028 * Module: library/rsa.c
2029 * Caller: library/ssl_cli.c
2030 * library/ssl_srv.c
2031 * library/ssl_tls.c
2032 * library/x509.c
2033 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02002034 * This module is used by the following key exchanges:
2035 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00002036 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002037 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002038 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002039#define MBEDTLS_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002040
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002041/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002042 * \def MBEDTLS_SHA1_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002043 *
2044 * Enable the SHA1 cryptographic hash algorithm.
2045 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002046 * Module: library/mbedtls_sha1.c
2047 * Caller: library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002048 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002049 * library/ssl_srv.c
2050 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002051 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002052 *
2053 * This module is required for SSL/TLS and SHA1-signed certificates.
2054 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002055#define MBEDTLS_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002056
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002057/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002058 * \def MBEDTLS_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002059 *
2060 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
2061 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002062 * Module: library/mbedtls_sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002063 * Caller: library/entropy.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002064 * library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002065 * library/ssl_cli.c
2066 * library/ssl_srv.c
2067 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002068 *
2069 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01002070 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00002071 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002072#define MBEDTLS_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002073
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002074/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002075 * \def MBEDTLS_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002076 *
2077 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
2078 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002079 * Module: library/mbedtls_sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002080 * Caller: library/entropy.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002081 * library/mbedtls_md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002082 * library/ssl_cli.c
2083 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002084 *
2085 * This module adds support for SHA-384 and SHA-512.
2086 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002087#define MBEDTLS_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002088
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002089/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002090 * \def MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002091 *
2092 * Enable simple SSL cache implementation.
2093 *
2094 * Module: library/ssl_cache.c
2095 * Caller:
2096 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002097 * Requires: MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002098 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002099#define MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002100
2101/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002102 * \def MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002103 *
2104 * Enable basic implementation of DTLS cookies for hello verification.
2105 *
2106 * Module: library/ssl_cookie.c
2107 * Caller:
2108 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002109 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002110 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002111#define MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002112
2113/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002114 * \def MBEDTLS_SSL_CLI_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002115 *
2116 * Enable the SSL/TLS client code.
2117 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002118 * Module: library/ssl_cli.c
2119 * Caller:
2120 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002121 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002122 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002123 * This module is required for SSL/TLS client support.
2124 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002125#define MBEDTLS_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002126
Paul Bakker9a736322012-11-14 12:39:52 +00002127/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002128 * \def MBEDTLS_SSL_SRV_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002129 *
2130 * Enable the SSL/TLS server code.
2131 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002132 * Module: library/ssl_srv.c
2133 * Caller:
2134 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002135 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002136 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002137 * This module is required for SSL/TLS server support.
2138 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002139#define MBEDTLS_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002140
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002141/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002142 * \def MBEDTLS_SSL_TLS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002143 *
Paul Bakkere29ab062011-05-18 13:26:54 +00002144 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002145 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002146 * Module: library/ssl_tls.c
2147 * Caller: library/ssl_cli.c
2148 * library/ssl_srv.c
2149 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002150 * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2151 * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
Paul Bakker5690efc2011-05-26 13:16:06 +00002152 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002153 * This module is required for SSL/TLS.
2154 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002155#define MBEDTLS_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002156
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002157/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002158 * \def MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002159 *
2160 * Enable the threading abstraction layer.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002161 * By default mbed TLS assumes it is used in a non-threaded environment or that
Paul Bakker2466d932013-09-28 14:40:38 +02002162 * contexts are not shared between threads. If you do intend to use contexts
2163 * between threads, you will need to enable this layer to prevent race
2164 * conditions.
2165 *
2166 * Module: library/threading.c
2167 *
2168 * This allows different threading implementations (self-implemented or
2169 * provided).
2170 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002171 * You will have to enable either MBEDTLS_THREADING_ALT or
2172 * MBEDTLS_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02002173 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002174 * Enable this layer to allow use of mutexes within mbed TLS
Paul Bakker2466d932013-09-28 14:40:38 +02002175 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002176//#define MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002177
2178/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002179 * \def MBEDTLS_TIMING_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002180 *
2181 * Enable the portable timing interface.
2182 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002183 * Module: library/timing.c
2184 * Caller: library/havege.c
2185 *
2186 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002187 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002188#define MBEDTLS_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002189
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002190/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002191 * \def MBEDTLS_VERSION_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002192 *
2193 * Enable run-time version information.
2194 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00002195 * Module: library/version.c
2196 *
2197 * This module provides run-time version information.
2198 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002199#define MBEDTLS_VERSION_C
Paul Bakker0a62cd12011-01-21 11:00:08 +00002200
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002201/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002202 * \def MBEDTLS_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002203 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002204 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002205 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002206 * Module: library/x509.c
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002207 * Caller: library/mbedtls_x509_crl.c
2208 * library/mbedtls_x509_crt.c
2209 * library/mbedtls_x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002210 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002211 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
2212 * MBEDTLS_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002213 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002214 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00002215 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002216#define MBEDTLS_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002217
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002218/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002219 * \def MBEDTLS_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002220 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002221 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002222 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002223 * Module: library/mbedtls_x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002224 * Caller: library/ssl_cli.c
2225 * library/ssl_srv.c
2226 * library/ssl_tls.c
2227 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002228 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002229 *
2230 * This module is required for X.509 certificate parsing.
2231 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002232#define MBEDTLS_X509_CRT_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002233
2234/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002235 * \def MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002236 *
2237 * Enable X.509 CRL parsing.
2238 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002239 * Module: library/mbedtls_x509_crl.c
2240 * Caller: library/mbedtls_x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002241 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002242 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002243 *
2244 * This module is required for X.509 CRL parsing.
2245 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002246#define MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002247
2248/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002249 * \def MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002250 *
2251 * Enable X.509 Certificate Signing Request (CSR) parsing.
2252 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002253 * Module: library/mbedtls_x509_csr.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002254 * Caller: library/x509_crt_write.c
2255 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002256 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002257 *
2258 * This module is used for reading X.509 certificate request.
2259 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002260#define MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002261
2262/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002263 * \def MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002264 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002265 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002266 *
2267 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002268 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002269 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002270 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002271 * This module is the basis for creating X.509 certificates and CSRs.
2272 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002273#define MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002274
2275/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002276 * \def MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002277 *
2278 * Enable creating X.509 certificates.
2279 *
2280 * Module: library/x509_crt_write.c
2281 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002282 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002283 *
2284 * This module is required for X.509 certificate creation.
2285 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002286#define MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002287
2288/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002289 * \def MBEDTLS_X509_CSR_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002290 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002291 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002292 *
2293 * Module: library/x509_csr_write.c
2294 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002295 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002296 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002297 * This module is required for X.509 certificate request writing.
2298 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002299#define MBEDTLS_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002300
2301/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002302 * \def MBEDTLS_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002303 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002304 * Enable the XTEA block cipher.
2305 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002306 * Module: library/xtea.c
2307 * Caller:
2308 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002309#define MBEDTLS_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002310
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002311/* \} name SECTION: mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002312
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002313/**
2314 * \name SECTION: Module configuration options
2315 *
2316 * This section allows for the setting of module specific sizes and
2317 * configuration options. The default values are already present in the
2318 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002319 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002320 * Our advice is to enable options and change their values here
2321 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002322 *
2323 * Please check the respective header file for documentation on these
2324 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002325 * \{
2326 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002327
Paul Bakker088c5c52014-04-25 11:11:10 +02002328/* MPI / BIGNUM options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002329//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2330//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002331
Paul Bakker088c5c52014-04-25 11:11:10 +02002332/* CTR_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002333//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2334//#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2335//#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2336//#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2337//#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002338
Paul Bakker088c5c52014-04-25 11:11:10 +02002339/* HMAC_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002340//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2341//#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2342//#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2343//#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002344
Paul Bakker088c5c52014-04-25 11:11:10 +02002345/* ECP options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002346//#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2347//#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2348//#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002349
Paul Bakker088c5c52014-04-25 11:11:10 +02002350/* Entropy options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002351//#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2352//#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002353
Paul Bakker088c5c52014-04-25 11:11:10 +02002354/* Memory buffer allocator options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002355//#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002356
Paul Bakker088c5c52014-04-25 11:11:10 +02002357/* Platform options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002358//#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. */
2359//#define MBEDTLS_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2360//#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2361//#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2362//#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2363//#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2364//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002365
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002366/* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
2367/* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
2368//#define MBEDTLS_PLATFORM_MALLOC_MACRO malloc /**< Default allocator macro to use, can be undefined */
2369//#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2370//#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2371//#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2372//#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
2373//#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002374
Paul Bakker088c5c52014-04-25 11:11:10 +02002375/* SSL Cache options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002376//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2377//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002378
Paul Bakker088c5c52014-04-25 11:11:10 +02002379/* SSL options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002380//#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2381//#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
2382//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
2383//#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 +02002384
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002385/**
2386 * Complete list of ciphersuites to use, in order of preference.
2387 *
2388 * \warning No dependency checking is done on that field! This option can only
2389 * be used to restrict the set of available ciphersuites. It is your
2390 * responsibility to make sure the needed modules are active.
2391 *
2392 * Use this to save a few hundred bytes of ROM (default ordering of all
2393 * available ciphersuites) and a few to a few hundred bytes of RAM.
2394 *
2395 * The value below is only an example, not the default.
2396 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002397//#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 +02002398
Paul Bakkereaebbd52014-04-25 15:04:14 +02002399/* Debug options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002400//#define MBEDTLS_DEBUG_DFL_MODE MBEDTLS_DEBUG_LOG_FULL /**< Default log: Full or Raw */
Paul Bakkereaebbd52014-04-25 15:04:14 +02002401
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002402/* X509 options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002403//#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 +01002404
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002405/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002406
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002407#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002408
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002409#endif /* MBEDTLS_CONFIG_H */