blob: 968964317c4c0d37de0d44ed5a024ea3f69cc9be [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 *
Simon Butchera02fe7c2016-01-03 16:14:14 +00006 * This set of compile-time options may be used to enable
7 * or disable features selectively, and reduce the global
8 * memory footprint.
9 *
Manuel Pégourié-Gonnard6fb81872015-07-27 11:11:48 +020010 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
Manuel Pégourié-Gonnard37ff1402015-09-04 14:21:07 +020011 * SPDX-License-Identifier: Apache-2.0
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License"); you may
14 * not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
21 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
Paul Bakkerb96f1542010-07-18 20:36:00 +000024 *
Manuel Pégourié-Gonnardfe446432015-03-06 13:17:10 +000025 * This file is part of mbed TLS (https://tls.mbed.org)
Manuel Pégourié-Gonnarde2b0efe2015-08-11 10:38:37 +020026 */
27
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020028#ifndef MBEDTLS_CONFIG_H
29#define MBEDTLS_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000030
Paul Bakkercce9d772011-11-18 14:26:47 +000031#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
Paul Bakker5121ce52009-01-03 21:22:43 +000032#define _CRT_SECURE_NO_DEPRECATE 1
33#endif
34
Paul Bakkerf3b86c12011-01-27 15:24:17 +000035/**
Paul Bakker0a62cd12011-01-21 11:00:08 +000036 * \name SECTION: System support
37 *
38 * This section sets system specific settings.
39 * \{
40 */
41
Paul Bakkerf3b86c12011-01-27 15:24:17 +000042/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020043 * \def MBEDTLS_HAVE_ASM
Paul Bakkerf3b86c12011-01-27 15:24:17 +000044 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020045 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000046 *
47 * Requires support for asm() in compiler.
48 *
49 * Used in:
50 * library/timing.c
51 * library/padlock.c
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +000052 * include/mbedtls/bn_mul.h
Paul Bakker68041ec2009-04-19 21:17:55 +000053 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020054 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000055 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020056#define MBEDTLS_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000057
Paul Bakkerf3b86c12011-01-27 15:24:17 +000058/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020059 * \def MBEDTLS_HAVE_SSE2
Paul Bakkerf3b86c12011-01-27 15:24:17 +000060 *
Paul Bakkere23c3152012-10-01 14:42:47 +000061 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000062 *
Paul Bakker5121ce52009-01-03 21:22:43 +000063 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000064 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020065//#define MBEDTLS_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020066
67/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020068 * \def MBEDTLS_HAVE_TIME
Paul Bakkerfa9b1002013-07-03 15:31:03 +020069 *
Manuel Pégourié-Gonnard60c793b2015-06-18 20:52:58 +020070 * System has time.h and time().
71 * The time does not need to be correct, only time differences are used,
72 * by contrast with MBEDTLS_HAVE_TIME_DATE
Paul Bakkerfa9b1002013-07-03 15:31:03 +020073 *
74 * Comment if your system does not support time functions
75 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020076#define MBEDTLS_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +010077
78/**
Manuel Pégourié-Gonnard60c793b2015-06-18 20:52:58 +020079 * \def MBEDTLS_HAVE_TIME_DATE
80 *
81 * System has time.h and time(), gmtime() and the clock is correct.
82 * The time needs to be correct (not necesarily very accurate, but at least
83 * the date should be correct). This is used to verify the validity period of
84 * X.509 certificates.
85 *
86 * Comment if your system does not have a correct clock.
87 */
88#define MBEDTLS_HAVE_TIME_DATE
89
90/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020091 * \def MBEDTLS_PLATFORM_MEMORY
Paul Bakkerdefc0ca2014-02-04 17:30:24 +010092 *
93 * Enable the memory allocation layer.
94 *
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +020095 * By default mbed TLS uses the system-provided calloc() and free().
Paul Bakkerdefc0ca2014-02-04 17:30:24 +010096 * This allows different allocators (self-implemented or provided) to be
97 * provided to the platform abstraction layer.
98 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020099 * Enabling MBEDTLS_PLATFORM_MEMORY without the
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +0200100 * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide
101 * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and
Rich Evans16f8cd82015-02-06 16:14:34 +0000102 * free() function pointer at runtime.
103 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200104 * Enabling MBEDTLS_PLATFORM_MEMORY and specifying
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +0200105 * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the
Rich Evans16f8cd82015-02-06 16:14:34 +0000106 * alternate function at compile time.
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100107 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200108 * Requires: MBEDTLS_PLATFORM_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100109 *
110 * Enable this layer to allow use of alternative memory allocators.
111 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200112//#define MBEDTLS_PLATFORM_MEMORY
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100113
114/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200115 * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
Paul Bakker088c5c52014-04-25 11:11:10 +0200116 *
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +0200117 * Do not assign standard functions in the platform layer (e.g. calloc() to
118 * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF)
Paul Bakker088c5c52014-04-25 11:11:10 +0200119 *
120 * This makes sure there are no linking errors on platforms that do not support
121 * these functions. You will HAVE to provide alternatives, either at runtime
122 * via the platform_set_xxx() functions or at compile time by setting
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200123 * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a
124 * MBEDTLS_PLATFORM_XXX_MACRO.
Paul Bakker088c5c52014-04-25 11:11:10 +0200125 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200126 * Requires: MBEDTLS_PLATFORM_C
Paul Bakker088c5c52014-04-25 11:11:10 +0200127 *
128 * Uncomment to prevent default assignment of standard functions in the
129 * platform layer.
130 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200131//#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
Paul Bakker088c5c52014-04-25 11:11:10 +0200132
133/**
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100134 * \def MBEDTLS_PLATFORM_EXIT_ALT
Paul Bakker747a83a2014-02-01 22:50:07 +0100135 *
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100136 * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the
137 * function in the platform abstraction layer.
Paul Bakker747a83a2014-02-01 22:50:07 +0100138 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200139 * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will
140 * provide a function "mbedtls_platform_set_printf()" that allows you to set an
Paul Bakker747a83a2014-02-01 22:50:07 +0100141 * alternative printf function pointer.
142 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200143 * All these define require MBEDTLS_PLATFORM_C to be defined!
Paul Bakker747a83a2014-02-01 22:50:07 +0100144 *
Manuel Pégourié-Gonnard9db28872015-06-26 10:52:01 +0200145 * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows;
146 * it will be enabled automatically by check_config.h
147 *
Manuel Pégourié-Gonnard6c0c8e02015-06-22 10:23:34 +0200148 * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200149 * MBEDTLS_PLATFORM_XXX_MACRO!
Rich Evans16f8cd82015-02-06 16:14:34 +0000150 *
Paul Bakker747a83a2014-02-01 22:50:07 +0100151 * Uncomment a macro to enable alternate implementation of specific base
152 * platform function
153 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200154//#define MBEDTLS_PLATFORM_EXIT_ALT
155//#define MBEDTLS_PLATFORM_FPRINTF_ALT
156//#define MBEDTLS_PLATFORM_PRINTF_ALT
157//#define MBEDTLS_PLATFORM_SNPRINTF_ALT
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100158
159/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200160 * \def MBEDTLS_DEPRECATED_WARNING
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100161 *
162 * Mark deprecated functions so that they generate a warning if used.
163 * Functions deprecated in one version will usually be removed in the next
164 * version. You can enable this to help you prepare the transition to a new
165 * major version by making sure your code is not using these functions.
166 *
167 * This only works with GCC and Clang. With other compilers, you may want to
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200168 * use MBEDTLS_DEPRECATED_REMOVED
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100169 *
170 * Uncomment to get warnings on using deprecated functions.
171 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200172//#define MBEDTLS_DEPRECATED_WARNING
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100173
174/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200175 * \def MBEDTLS_DEPRECATED_REMOVED
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100176 *
177 * Remove deprecated functions so that they generate an error if used.
178 * Functions deprecated in one version will usually be removed in the next
179 * version. You can enable this to help you prepare the transition to a new
180 * major version by making sure your code is not using these functions.
181 *
182 * Uncomment to get errors on using deprecated functions.
183 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200184//#define MBEDTLS_DEPRECATED_REMOVED
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100185
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200186/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000187
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000188/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000189 * \name SECTION: mbed TLS feature support
Paul Bakker0a62cd12011-01-21 11:00:08 +0000190 *
191 * This section sets support for features that are or are not needed
192 * within the modules that are enabled.
193 * \{
194 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000195
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000196/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200197 * \def MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +0100198 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200199 * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(),
Manuel Pégourié-Gonnarda63bc942015-05-14 18:22:47 +0200200 * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
Paul Bakkerf2561b32014-02-06 15:11:55 +0100201 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200202 * Only works if you have MBEDTLS_TIMING_C enabled.
Paul Bakkerf2561b32014-02-06 15:11:55 +0100203 *
204 * You will need to provide a header "timing_alt.h" and an implementation at
205 * compile time.
206 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200207//#define MBEDTLS_TIMING_ALT
Paul Bakkerf2561b32014-02-06 15:11:55 +0100208
209/**
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100210 * \def MBEDTLS_AES_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200211 *
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100212 * MBEDTLS__MODULE_NAME__ALT: Uncomment a macro to let mbed TLS use your
213 * alternate core implementation of a symmetric crypto or hash module (e.g.
214 * platform specific assembly optimized implementations). Keep in mind that
215 * the function prototypes should remain the same.
Paul Bakker90995b52013-06-24 19:20:35 +0200216 *
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200217 * This replaces the whole module. If you only want to replace one of the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200218 * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags.
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200219 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200220 * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer
221 * provide the "struct mbedtls_aes_context" definition and omit the base function
Paul Bakker90995b52013-06-24 19:20:35 +0200222 * declarations and implementations. "aes_alt.h" will be included from
223 * "aes.h" to include the new function definitions.
224 *
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200225 * Uncomment a macro to enable alternate implementation of the corresponding
226 * module.
Hanno Becker15e49512017-09-25 14:53:51 +0100227 *
228 * \warning MD2, MD4, MD5, ARC4, DES and SHA-1 are considered weak and their
229 * use constitutes a security risk. If possible, we recommend
230 * avoiding dependencies on them, and considering stronger message
231 * digests and ciphers instead.
232 *
Paul Bakker90995b52013-06-24 19:20:35 +0200233 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200234//#define MBEDTLS_AES_ALT
235//#define MBEDTLS_ARC4_ALT
236//#define MBEDTLS_BLOWFISH_ALT
237//#define MBEDTLS_CAMELLIA_ALT
238//#define MBEDTLS_DES_ALT
239//#define MBEDTLS_XTEA_ALT
240//#define MBEDTLS_MD2_ALT
241//#define MBEDTLS_MD4_ALT
242//#define MBEDTLS_MD5_ALT
243//#define MBEDTLS_RIPEMD160_ALT
244//#define MBEDTLS_SHA1_ALT
245//#define MBEDTLS_SHA256_ALT
246//#define MBEDTLS_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200247
248/**
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100249 * \def MBEDTLS_MD2_PROCESS_ALT
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200250 *
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100251 * MBEDTLS__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use you
252 * alternate core implementation of symmetric crypto or hash function. Keep in
253 * mind that function prototypes should remain the same.
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200254 *
255 * This replaces only one function. The header file from mbed TLS is still
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200256 * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags.
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200257 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200258 * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will
259 * no longer provide the mbedtls_sha1_process() function, but it will still provide
260 * the other function (using your mbedtls_sha1_process() function) and the definition
261 * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200262 * with this definition.
263 *
Manuel Pégourié-Gonnard31993f22015-05-12 15:41:08 +0200264 * Note: if you use the AES_xxx_ALT macros, then is is recommended to also set
265 * MBEDTLS_AES_ROM_TABLES in order to help the linker garbage-collect the AES
266 * tables.
267 *
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200268 * Uncomment a macro to enable alternate implementation of the corresponding
269 * function.
Hanno Becker15e49512017-09-25 14:53:51 +0100270 *
271 * \warning MD2, MD4, MD5, DES and SHA-1 are considered weak and their use
272 * constitutes a security risk. If possible, we recommend avoiding
273 * dependencies on them, and considering stronger message digests
274 * and ciphers instead.
275 *
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200276 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200277//#define MBEDTLS_MD2_PROCESS_ALT
278//#define MBEDTLS_MD4_PROCESS_ALT
279//#define MBEDTLS_MD5_PROCESS_ALT
280//#define MBEDTLS_RIPEMD160_PROCESS_ALT
281//#define MBEDTLS_SHA1_PROCESS_ALT
282//#define MBEDTLS_SHA256_PROCESS_ALT
283//#define MBEDTLS_SHA512_PROCESS_ALT
Manuel Pégourié-Gonnard70a50102015-05-12 15:02:45 +0200284//#define MBEDTLS_DES_SETKEY_ALT
285//#define MBEDTLS_DES_CRYPT_ECB_ALT
286//#define MBEDTLS_DES3_CRYPT_ECB_ALT
Manuel Pégourié-Gonnard31993f22015-05-12 15:41:08 +0200287//#define MBEDTLS_AES_SETKEY_ENC_ALT
288//#define MBEDTLS_AES_SETKEY_DEC_ALT
289//#define MBEDTLS_AES_ENCRYPT_ALT
290//#define MBEDTLS_AES_DECRYPT_ALT
Manuel Pégourié-Gonnard427b6722015-03-31 18:32:50 +0200291
292/**
Manuel Pégourié-Gonnard8ba88f02015-06-22 12:14:20 +0200293 * \def MBEDTLS_ENTROPY_HARDWARE_ALT
Manuel Pégourié-Gonnard3f77dfb2015-06-19 10:06:21 +0200294 *
295 * Uncomment this macro to let mbed TLS use your own implementation of a
296 * hardware entropy collector.
297 *
298 * Your function must be called \c mbedtls_hardware_poll(), have the same
299 * prototype as declared in entropy_poll.h, and accept NULL as first argument.
300 *
301 * Uncomment to use your own hardware entropy collector.
302 */
303//#define MBEDTLS_ENTROPY_HARDWARE_ALT
304
305/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200306 * \def MBEDTLS_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000307 *
308 * Store the AES tables in ROM.
309 *
310 * Uncomment this macro to store the AES tables in ROM.
Paul Bakker15566e42011-04-24 21:19:15 +0000311 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200312//#define MBEDTLS_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000313
314/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200315 * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
Manuel Pégourié-Gonnard62edcc82015-04-03 16:28:19 +0200316 *
317 * Use less ROM for the Camellia implementation (saves about 768 bytes).
318 *
319 * Uncomment this macro to use less memory for Camellia.
320 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200321//#define MBEDTLS_CAMELLIA_SMALL_MEMORY
Manuel Pégourié-Gonnard62edcc82015-04-03 16:28:19 +0200322
323/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200324 * \def MBEDTLS_CIPHER_MODE_CBC
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200325 *
326 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
327 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200328#define MBEDTLS_CIPHER_MODE_CBC
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200329
330/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200331 * \def MBEDTLS_CIPHER_MODE_CFB
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000332 *
333 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
334 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200335#define MBEDTLS_CIPHER_MODE_CFB
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000336
337/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200338 * \def MBEDTLS_CIPHER_MODE_CTR
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000339 *
340 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
341 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200342#define MBEDTLS_CIPHER_MODE_CTR
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000343
344/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200345 * \def MBEDTLS_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000346 *
347 * Enable NULL cipher.
348 * Warning: Only do so when you know what you are doing. This allows for
349 * encryption or channels without any security!
350 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200351 * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable
Paul Bakkerfab5c822012-02-06 16:45:10 +0000352 * the following ciphersuites:
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200353 * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA
354 * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA
355 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA
356 * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA
357 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384
358 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256
359 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA
360 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384
361 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256
362 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA
363 * MBEDTLS_TLS_RSA_WITH_NULL_SHA256
364 * MBEDTLS_TLS_RSA_WITH_NULL_SHA
365 * MBEDTLS_TLS_RSA_WITH_NULL_MD5
366 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384
367 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256
368 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA
369 * MBEDTLS_TLS_PSK_WITH_NULL_SHA384
370 * MBEDTLS_TLS_PSK_WITH_NULL_SHA256
371 * MBEDTLS_TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000372 *
373 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000374 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200375//#define MBEDTLS_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000376
377/**
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100378 * \def MBEDTLS_CIPHER_PADDING_PKCS7
Paul Bakker48e93c82013-08-14 12:21:18 +0200379 *
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100380 * MBEDTLS_CIPHER_PADDING_XXX: Uncomment or comment macros to add support for
381 * specific padding modes in the cipher layer with cipher modes that support
382 * padding (e.g. CBC)
Paul Bakker48e93c82013-08-14 12:21:18 +0200383 *
384 * If you disable all padding modes, only full blocks can be used with CBC.
385 *
386 * Enable padding modes in the cipher layer.
387 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200388#define MBEDTLS_CIPHER_PADDING_PKCS7
389#define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
390#define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
391#define MBEDTLS_CIPHER_PADDING_ZEROS
Paul Bakker48e93c82013-08-14 12:21:18 +0200392
393/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200394 * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000395 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200396 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000397 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000398 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000399 *
400 * This enables the following ciphersuites:
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200401 * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA
402 * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000403 *
404 * Uncomment this macro to enable weak ciphersuites
Hanno Becker15e49512017-09-25 14:53:51 +0100405 *
406 * \warning DES is considered a weak cipher and its use constitutes a
407 * security risk. We recommend considering stronger ciphers instead.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000408 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200409//#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000410
411/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200412 * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200413 *
414 * Remove RC4 ciphersuites by default in SSL / TLS.
415 * This flag removes the ciphersuites based on RC4 from the default list as
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200416 * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +0200417 * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200418 * explicitly.
419 *
420 * Uncomment this macro to remove RC4 ciphersuites by default.
421 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200422#define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200423
424/**
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100425 * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200426 *
Manuel Pégourié-Gonnard4c9916b2016-01-04 13:51:01 +0100427 * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve
428 * module. By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200429 *
430 * Comment macros to disable the curve and functions for it
431 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200432#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
433#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
434#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
435#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
436#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
437#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
438#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
439#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
440#define MBEDTLS_ECP_DP_BP256R1_ENABLED
441#define MBEDTLS_ECP_DP_BP384R1_ENABLED
442#define MBEDTLS_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard07894332015-06-23 00:18:41 +0200443#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200444
445/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200446 * \def MBEDTLS_ECP_NIST_OPTIM
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200447 *
448 * Enable specific 'modulo p' routines for each NIST prime.
449 * Depending on the prime and architecture, makes operations 4 to 8 times
450 * faster on the corresponding curve.
451 *
452 * Comment this macro to disable NIST curves optimisation.
453 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200454#define MBEDTLS_ECP_NIST_OPTIM
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200455
456/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200457 * \def MBEDTLS_ECDSA_DETERMINISTIC
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100458 *
459 * Enable deterministic ECDSA (RFC 6979).
460 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
461 * may result in a compromise of the long-term signing key. This is avoided by
462 * the deterministic variant.
463 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200464 * Requires: MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100465 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100466 * Comment this macro to disable deterministic ECDSA.
467 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200468#define MBEDTLS_ECDSA_DETERMINISTIC
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100469
470/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200471 * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200472 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200473 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200474 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200475 * 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_PSK_WITH_AES_256_GCM_SHA384
478 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
479 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
480 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
481 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
482 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
483 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
484 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
485 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
486 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
487 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
488 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200489 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200490#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200491
492/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200493 * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200494 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200495 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200496 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200497 * Requires: MBEDTLS_DHM_C
Paul Bakkere07f41d2013-04-19 09:08:57 +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_DHE_PSK_WITH_AES_256_GCM_SHA384
502 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
503 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
504 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
505 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
506 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
507 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
508 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
509 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
510 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
511 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
512 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200513 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200514#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200515
516/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200517 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200518 *
519 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
520 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200521 * Requires: MBEDTLS_ECDH_C
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200522 *
523 * This enables the following ciphersuites (if other requisites are
524 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200525 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
526 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
527 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
528 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
529 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
530 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
531 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
532 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200533 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200534#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200535
536/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200537 * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200538 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200539 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200540 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200541 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
542 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200543 *
544 * This enables the following ciphersuites (if other requisites are
545 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200546 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
547 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
548 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
549 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
550 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
551 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
552 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
553 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
554 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
555 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
556 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
557 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200558 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200559#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200560
561/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200562 * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200563 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200564 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200565 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200566 * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
567 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200568 *
569 * This enables the following ciphersuites (if other requisites are
570 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200571 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
572 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
573 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
574 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
575 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
576 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
577 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
578 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
579 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
580 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
581 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
582 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
583 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
584 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
585 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200586 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200587#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200588
589/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200590 * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200591 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200592 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200593 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200594 * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
595 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200596 *
597 * This enables the following ciphersuites (if other requisites are
598 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200599 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
600 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
601 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
602 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
603 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
604 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
605 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
606 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
607 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
608 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
609 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
610 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
611 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200612 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200613#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200614
615/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200616 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200617 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200618 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200619 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200620 * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
621 * MBEDTLS_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +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_RSA_WITH_AES_256_GCM_SHA384
626 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
627 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
628 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
629 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
630 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
631 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
632 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
633 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
634 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
635 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
636 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200637 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200638#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200639
640/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200641 * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200642 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200643 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200644 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200645 * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200646 *
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_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
650 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
651 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
652 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
653 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
654 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
655 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
656 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
657 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
658 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
659 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
660 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200661 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200662#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200663
664/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200665 * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100666 *
667 * Enable the ECDH-ECDSA 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_ECDSA_WITH_RC4_128_SHA
674 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
675 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
676 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
677 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
678 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
679 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
680 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
681 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
682 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
683 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
684 * MBEDTLS_TLS_ECDH_ECDSA_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_ECDSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100687
688/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200689 * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100690 *
691 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
692 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200693 * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100694 *
695 * This enables the following ciphersuites (if other requisites are
696 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200697 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
698 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
699 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
700 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
701 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
702 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
703 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
704 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
705 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
706 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
707 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
708 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100709 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200710#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100711
712/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200713 * \def MBEDTLS_PK_PARSE_EC_EXTENDED
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100714 *
715 * Enhance support for reading EC keys using variants of SEC1 not allowed by
716 * RFC 5915 and RFC 5480.
717 *
718 * Currently this means parsing the SpecifiedECDomain choice of EC
719 * parameters (only known groups are supported, not arbitrary domains, to
720 * avoid validation issues).
721 *
722 * Disable if you only need to support RFC 5915 + 5480 key formats.
723 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200724#define MBEDTLS_PK_PARSE_EC_EXTENDED
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100725
726/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200727 * \def MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100728 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200729 * Enable a dummy error function to make use of mbedtls_strerror() in
730 * third party libraries easier when MBEDTLS_ERROR_C is disabled
731 * (no effect when MBEDTLS_ERROR_C is enabled).
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200732 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200733 * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
734 * not using mbedtls_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100735 *
736 * Disable if you run into name conflicts and want to really remove the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200737 * mbedtls_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100738 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200739#define MBEDTLS_ERROR_STRERROR_DUMMY
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100740
741/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200742 * \def MBEDTLS_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000743 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200744 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200745 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200746 * Requires: MBEDTLS_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000747 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200748#define MBEDTLS_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000749
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000750/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200751 * \def MBEDTLS_FS_IO
Paul Bakker335db3f2011-04-25 15:28:35 +0000752 *
753 * Enable functions that use the filesystem.
754 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200755#define MBEDTLS_FS_IO
Paul Bakker335db3f2011-04-25 15:28:35 +0000756
757/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200758 * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000759 *
760 * Do not add default entropy sources. These are the platform specific,
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200761 * mbedtls_timing_hardclock and HAVEGE based poll functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000762 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700763 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000764 * application.
765 *
766 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000767 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200768//#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000769
770/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200771 * \def MBEDTLS_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000772 *
773 * Do not use built-in platform entropy functions.
774 * This is useful if your platform does not support
775 * standards like the /dev/urandom or Windows CryptoAPI.
776 *
777 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000778 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200779//#define MBEDTLS_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000780
781/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200782 * \def MBEDTLS_ENTROPY_FORCE_SHA256
Paul Bakker2ceda572014-02-06 15:55:25 +0100783 *
784 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
785 * default SHA-512 based one (if both are available).
786 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200787 * Requires: MBEDTLS_SHA256_C
Paul Bakker2ceda572014-02-06 15:55:25 +0100788 *
789 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
790 * if you have performance concerns.
791 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200792 * This option is only useful if both MBEDTLS_SHA256_C and
793 * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
Paul Bakker2ceda572014-02-06 15:55:25 +0100794 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200795//#define MBEDTLS_ENTROPY_FORCE_SHA256
Paul Bakker2ceda572014-02-06 15:55:25 +0100796
797/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200798 * \def MBEDTLS_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200799 *
800 * Enable debugging of buffer allocator memory issues. Automatically prints
801 * (to stderr) all (fatal) messages on memory allocation issues. Enables
802 * function for 'debug output' of allocated memory.
803 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200804 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200805 *
806 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200807 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200808//#define MBEDTLS_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200809
810/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200811 * \def MBEDTLS_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200812 *
813 * Include backtrace information with each allocated block.
814 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200815 * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200816 * GLIBC-compatible backtrace() an backtrace_symbols() support
817 *
818 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200819 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200820//#define MBEDTLS_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200821
822/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200823 * \def MBEDTLS_PK_RSA_ALT_SUPPORT
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +0200824 *
825 * Support external private RSA keys (eg from a HSM) in the PK layer.
826 *
827 * Comment this macro to disable support for external private RSA keys.
828 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200829#define MBEDTLS_PK_RSA_ALT_SUPPORT
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +0200830
831/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200832 * \def MBEDTLS_PKCS1_V15
Paul Bakker48377d92013-08-30 12:06:24 +0200833 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200834 * Enable support for PKCS#1 v1.5 encoding.
835 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200836 * Requires: MBEDTLS_RSA_C
Paul Bakker48377d92013-08-30 12:06:24 +0200837 *
Paul Bakker48377d92013-08-30 12:06:24 +0200838 * This enables support for PKCS#1 v1.5 operations.
839 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200840#define MBEDTLS_PKCS1_V15
Paul Bakker48377d92013-08-30 12:06:24 +0200841
842/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200843 * \def MBEDTLS_PKCS1_V21
Paul Bakker9dcc3222011-03-08 14:16:06 +0000844 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200845 * Enable support for PKCS#1 v2.1 encoding.
846 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200847 * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000848 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000849 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
850 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200851#define MBEDTLS_PKCS1_V21
Paul Bakker9dcc3222011-03-08 14:16:06 +0000852
853/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200854 * \def MBEDTLS_RSA_NO_CRT
Paul Bakker0216cc12011-03-26 13:40:23 +0000855 *
856 * Do not use the Chinese Remainder Theorem for the RSA private operation.
857 *
858 * Uncomment this macro to disable the use of CRT in RSA.
859 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000860 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200861//#define MBEDTLS_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000862
863/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200864 * \def MBEDTLS_SELF_TEST
Paul Bakker15566e42011-04-24 21:19:15 +0000865 *
866 * Enable the checkup functions (*_self_test).
867 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200868#define MBEDTLS_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000869
870/**
Manuel Pégourié-Gonnardeb0d8702015-05-28 12:54:04 +0200871 * \def MBEDTLS_SHA256_SMALLER
872 *
873 * Enable an implementation of SHA-256 that has lower ROM footprint but also
874 * lower performance.
875 *
876 * The default implementation is meant to be a reasonnable compromise between
877 * performance and size. This version optimizes more aggressively for size at
878 * the expense of performance. Eg on Cortex-M4 it reduces the size of
879 * mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of about
880 * 30%.
881 *
882 * Uncomment to enable the smaller implementation of SHA256.
883 */
884//#define MBEDTLS_SHA256_SMALLER
885
886/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200887 * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100888 *
889 * Enable sending of alert messages in case of encountered errors as per RFC.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000890 * If you choose not to send the alert messages, mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100891 * with other servers, only debugging of failures is harder.
892 *
893 * The advantage of not sending alert messages, is that no information is given
894 * about reasons for failures thus preventing adversaries of gaining intel.
895 *
896 * Enable sending of all alert messages
897 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200898#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
Paul Bakker40865c82013-01-31 17:13:13 +0100899
900/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200901 * \def MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100902 *
903 * Enable the debug messages in SSL module for all issues.
904 * Debug messages have been disabled in some places to prevent timing
905 * attacks due to (unbalanced) debugging function calls.
906 *
907 * If you need all error reporting you should enable this during debugging,
908 * but remove this for production servers that should log as well.
909 *
910 * Uncomment this macro to report all debug messages on errors introducing
911 * a timing side-channel.
912 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100913 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200914//#define MBEDTLS_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100915
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200916/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100917 *
918 * Enable support for Encrypt-then-MAC, RFC 7366.
919 *
920 * This allows peers that both support it to use a more robust protection for
921 * ciphersuites using CBC, providing deep resistance against timing attacks
922 * on the padding or underlying cipher.
923 *
924 * This only affects CBC ciphersuites, and is useless if none is defined.
925 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200926 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
927 * MBEDTLS_SSL_PROTO_TLS1_1 or
928 * MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100929 *
930 * Comment this macro to disable support for Encrypt-then-MAC
931 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200932#define MBEDTLS_SSL_ENCRYPT_THEN_MAC
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100933
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200934/** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200935 *
936 * Enable support for Extended Master Secret, aka Session Hash
937 * (draft-ietf-tls-session-hash-02).
938 *
939 * This was introduced as "the proper fix" to the Triple Handshake familiy of
940 * attacks, but it is recommended to always use it (even if you disable
941 * renegotiation), since it actually fixes a more fundamental issue in the
942 * original SSL/TLS design, and has implications beyond Triple Handshake.
943 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200944 * Requires: MBEDTLS_SSL_PROTO_TLS1 or
945 * MBEDTLS_SSL_PROTO_TLS1_1 or
946 * MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100947 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200948 * Comment this macro to disable support for Extended Master Secret.
949 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200950#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200951
Paul Bakkerd66f0702013-01-31 16:57:45 +0100952/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200953 * \def MBEDTLS_SSL_FALLBACK_SCSV
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200954 *
955 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
956 *
957 * For servers, it is recommended to always enable this, unless you support
958 * only one version of TLS, or know for sure that none of your clients
959 * implements a fallback strategy.
960 *
961 * For clients, you only need this if you're using a fallback strategy, which
962 * is not recommended in the first place, unless you absolutely need it to
963 * interoperate with buggy (version-intolerant) servers.
964 *
965 * Comment this macro to disable support for FALLBACK_SCSV
966 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200967#define MBEDTLS_SSL_FALLBACK_SCSV
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200968
969/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200970 * \def MBEDTLS_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000971 *
972 * Enable hooking functions in SSL module for hardware acceleration of
973 * individual records.
974 *
975 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000976 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200977//#define MBEDTLS_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000978
979/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200980 * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100981 *
982 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
983 *
984 * This is a countermeasure to the BEAST attack, which also minimizes the risk
985 * of interoperability issues compared to sending 0-length records.
986 *
987 * Comment this macro to disable 1/n-1 record splitting.
988 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200989#define MBEDTLS_SSL_CBC_RECORD_SPLITTING
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100990
991/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200992 * \def MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100993 *
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100994 * Disable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100995 *
996 * The two main uses of renegotiation are (1) refresh keys on long-lived
997 * connections and (2) client authentication after the initial handshake.
998 * If you don't need renegotiation, it's probably better to disable it, since
999 * it has been associated with security issues in the past and is easy to
1000 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +01001001 *
Manuel Pégourié-Gonnard55f968b2015-03-09 16:23:15 +00001002 * Comment this to disable support for renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +01001003 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001004#define MBEDTLS_SSL_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +01001005
1006/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001007 * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
Paul Bakker78a8c712013-03-06 17:01:52 +01001008 *
1009 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001010 * SSL Server module (MBEDTLS_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +01001011 *
Manuel Pégourié-Gonnard265dd5c2015-03-10 13:48:34 +00001012 * Uncomment this macro to enable support for SSLv2 Client Hello messages.
Paul Bakker78a8c712013-03-06 17:01:52 +01001013 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001014//#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
Paul Bakker78a8c712013-03-06 17:01:52 +01001015
1016/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001017 * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +01001018 *
1019 * Pick the ciphersuite according to the client's preferences rather than ours
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001020 * in the SSL Server module (MBEDTLS_SSL_SRV_C).
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +01001021 *
1022 * Uncomment this macro to respect client's ciphersuite order
1023 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001024//#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +01001025
1026/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001027 * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +02001028 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001029 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +02001030 *
1031 * Comment this macro to disable support for the max_fragment_length extension
1032 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001033#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
Paul Bakker05decb22013-08-15 13:33:48 +02001034
1035/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001036 * \def MBEDTLS_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001037 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001038 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001039 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001040 * Requires: MBEDTLS_MD5_C
1041 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001042 *
1043 * Comment this macro to disable support for SSL 3.0
1044 */
Janos Follath542ee5d2016-03-07 15:57:05 +00001045//#define MBEDTLS_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001046
1047/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001048 * \def MBEDTLS_SSL_PROTO_TLS1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001049 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001050 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001051 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001052 * Requires: MBEDTLS_MD5_C
1053 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001054 *
1055 * Comment this macro to disable support for TLS 1.0
1056 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001057#define MBEDTLS_SSL_PROTO_TLS1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001058
1059/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001060 * \def MBEDTLS_SSL_PROTO_TLS1_1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001061 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001062 * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001063 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001064 * Requires: MBEDTLS_MD5_C
1065 * MBEDTLS_SHA1_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001066 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001067 * Comment this macro to disable support for TLS 1.1 / DTLS 1.0
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001068 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001069#define MBEDTLS_SSL_PROTO_TLS1_1
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001070
1071/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001072 * \def MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001073 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001074 * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001075 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001076 * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001077 * (Depends on ciphersuites)
1078 *
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001079 * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001080 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001081#define MBEDTLS_SSL_PROTO_TLS1_2
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001082
1083/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001084 * \def MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001085 *
1086 * Enable support for DTLS (all available versions).
1087 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001088 * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0,
1089 * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001090 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001091 * Requires: MBEDTLS_SSL_PROTO_TLS1_1
1092 * or MBEDTLS_SSL_PROTO_TLS1_2
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001093 *
1094 * Comment this macro to disable support for DTLS
1095 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001096#define MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard0b1ff292014-02-06 13:04:16 +01001097
1098/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001099 * \def MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001100 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +01001101 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001102 *
Paul Bakker27e36d32014-04-08 12:33:37 +02001103 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001104 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001105#define MBEDTLS_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001106
1107/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001108 * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001109 *
1110 * Enable support for the anti-replay mechanism in DTLS.
1111 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001112 * Requires: MBEDTLS_SSL_TLS_C
1113 * MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001114 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001115 * \warning Disabling this is often a security risk!
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001116 * See mbedtls_ssl_conf_dtls_anti_replay() for details.
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001117 *
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001118 * Comment this to disable anti-replay in DTLS.
1119 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001120#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
Manuel Pégourié-Gonnard8464a462014-09-24 14:05:32 +02001121
1122/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001123 * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001124 *
1125 * Enable support for HelloVerifyRequest on DTLS servers.
1126 *
1127 * This feature is highly recommended to prevent DTLS servers being used as
1128 * amplifiers in DoS attacks against other hosts. It should always be enabled
1129 * unless you know for sure amplification cannot be a problem in the
1130 * environment in which your server operates.
1131 *
Manuel Pégourié-Gonnarda6fcffe2014-10-13 18:15:52 +02001132 * \warning Disabling this can ba a security risk! (see above)
1133 *
Manuel Pégourié-Gonnarde057d3b2015-05-20 10:59:43 +02001134 * Requires: MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001135 *
1136 * Comment this to disable support for HelloVerifyRequest.
1137 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001138#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard82202f02014-07-23 00:28:58 +02001139
1140/**
Manuel Pégourié-Gonnard26d227d2015-09-04 10:53:25 +02001141 * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
1142 *
1143 * Enable server-side support for clients that reconnect from the same port.
1144 *
1145 * Some clients unexpectedly close the connection and try to reconnect using the
1146 * same source port. This needs special support from the server to handle the
Simon Butcher4f6882a2015-09-11 17:12:46 +01001147 * new connection securely, as described in section 4.2.8 of RFC 6347. This
Manuel Pégourié-Gonnard26d227d2015-09-04 10:53:25 +02001148 * flag enables that support.
1149 *
Manuel Pégourié-Gonnard62c74bb2015-09-08 17:50:29 +02001150 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
Manuel Pégourié-Gonnard62c74bb2015-09-08 17:50:29 +02001151 *
Manuel Pégourié-Gonnard26d227d2015-09-04 10:53:25 +02001152 * Comment this to disable support for clients reusing the source port.
1153 */
1154#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
1155
1156/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001157 * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001158 *
1159 * Enable support for a limit of records with bad MAC.
1160 *
Manuel Pégourié-Gonnard6729e792015-05-11 09:50:24 +02001161 * See mbedtls_ssl_conf_dtls_badmac_limit().
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001162 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001163 * Requires: MBEDTLS_SSL_PROTO_DTLS
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001164 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001165#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
Manuel Pégourié-Gonnardb0643d12014-10-14 18:30:36 +02001166
1167/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001168 * \def MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +02001169 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001170 * Enable support for RFC 5077 session tickets in SSL.
Manuel Pégourié-Gonnard0c0f11f2015-05-20 09:55:50 +02001171 * Client-side, provides full support for session tickets (maintainance of a
1172 * session store remains the responsibility of the application, though).
1173 * Server-side, you also need to provide callbacks for writing and parsing
1174 * tickets, including authenticated encryption and key management. Example
1175 * callbacks are provided by MBEDTLS_SSL_TICKET_C.
Paul Bakkera503a632013-08-14 13:48:06 +02001176 *
1177 * Comment this macro to disable support for SSL session tickets
1178 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001179#define MBEDTLS_SSL_SESSION_TICKETS
Paul Bakkera503a632013-08-14 13:48:06 +02001180
1181/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001182 * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +02001183 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001184 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +02001185 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001186 * Requires: MBEDTLS_X509_CRT_PARSE_C
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +00001187 *
Paul Bakker0be444a2013-08-27 21:55:01 +02001188 * Comment this macro to disable support for server name indication in SSL
1189 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001190#define MBEDTLS_SSL_SERVER_NAME_INDICATION
Paul Bakker0be444a2013-08-27 21:55:01 +02001191
1192/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001193 * \def MBEDTLS_SSL_TRUNCATED_HMAC
Paul Bakker1f2bc622013-08-15 13:45:55 +02001194 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001195 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +02001196 *
1197 * Comment this macro to disable support for truncated HMAC in SSL
1198 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001199#define MBEDTLS_SSL_TRUNCATED_HMAC
Paul Bakker1f2bc622013-08-15 13:45:55 +02001200
1201/**
Hanno Becker053b3452017-11-20 16:36:41 +00001202 * \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
1203 *
Hanno Beckeradb30b92017-11-21 17:20:17 +00001204 * Fallback to old (pre-2.1.10), non-conforming implementation of the truncated
1205 * HMAC extension which also truncates the HMAC key. Note that this option is
1206 * only meant for a transitory upgrade period and is likely to be removed in
1207 * a future version of the library.
Hanno Becker053b3452017-11-20 16:36:41 +00001208 *
Hanno Beckeradb30b92017-11-21 17:20:17 +00001209 * \warning The old implementation is non-compliant and has a security weakness
1210 * (2^80 brute force attack on the HMAC key used for a single,
1211 * uninterrupted connection). This should only be enabled temporarily
1212 * when (1) the use of truncated HMAC is essential in order to save
1213 * bandwidth, and (2) the peer is an Mbed TLS stack that doesn't use
1214 * the fixed implementation yet (pre-2.1.10).
Hanno Becker053b3452017-11-20 16:36:41 +00001215 *
1216 * Uncomment to fallback to old, non-compliant truncated HMAC implementation.
1217 *
1218 * Requires: MBEDTLS_SSL_TRUNCATED_HMAC
1219 */
1220//#define MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
1221
1222/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001223 * \def MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001224 *
1225 * Provide your own alternate threading implementation.
1226 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001227 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001228 *
1229 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +02001230 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001231//#define MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001232
1233/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001234 * \def MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001235 *
1236 * Enable the pthread wrapper layer for the threading layer.
1237 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001238 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001239 *
1240 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +02001241 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001242//#define MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001243
1244/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001245 * \def MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001246 *
1247 * Allow run-time checking of compile-time enabled features. Thus allowing users
1248 * to check at run-time if the library is for instance compiled with threading
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001249 * support via mbedtls_version_check_feature().
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001250 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001251 * Requires: MBEDTLS_VERSION_C
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001252 *
1253 * Comment this to disable run-time checking and save ROM space
1254 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001255#define MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001256
1257/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001258 * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001259 *
1260 * If set, the X509 parser will not break-off when parsing an X509 certificate
1261 * and encountering an extension in a v1 or v2 certificate.
1262 *
1263 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001264 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001265//#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001266
1267/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001268 * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker5c721f92011-07-27 16:51:09 +00001269 *
1270 * If set, the X509 parser will not break-off when parsing an X509 certificate
1271 * and encountering an unknown critical extension.
1272 *
Manuel Pégourié-Gonnardcb6af002015-10-05 12:12:39 +01001273 * \warning Depending on your PKI use, enabling this can be a security risk!
1274 *
Paul Bakker5c721f92011-07-27 16:51:09 +00001275 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +00001276 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001277//#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +00001278
1279/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001280 * \def MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001281 *
1282 * Enable verification of the keyUsage extension (CA and leaf certificates).
1283 *
1284 * Disabling this avoids problems with mis-issued and/or misused
1285 * (intermediate) CA and leaf certificates.
1286 *
1287 * \warning Depending on your PKI use, disabling this can be a security risk!
1288 *
1289 * Comment to skip keyUsage checking for both CA and leaf certificates.
1290 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001291#define MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001292
1293/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001294 * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001295 *
1296 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1297 *
1298 * Disabling this avoids problems with mis-issued and/or misused certificates.
1299 *
1300 * \warning Depending on your PKI use, disabling this can be a security risk!
1301 *
1302 * Comment to skip extendedKeyUsage checking for certificates.
1303 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001304#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001305
1306/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001307 * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001308 *
1309 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1310 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1311 *
1312 * Comment this macro to disallow using RSASSA-PSS in certificates.
1313 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001314#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001315
1316/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001317 * \def MBEDTLS_ZLIB_SUPPORT
Paul Bakker2770fbd2012-07-03 13:30:23 +00001318 *
1319 * If set, the SSL/TLS module uses ZLIB to support compression and
1320 * decompression of packet data.
1321 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001322 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1323 * CRIME attack. Before enabling this option, you should examine with care if
1324 * CRIME or similar exploits may be a applicable to your use case.
1325 *
Manuel Pégourié-Gonnard7c3b4ab2015-07-02 17:59:52 +02001326 * \note Currently compression can't be used with DTLS.
Manuel Pégourié-Gonnarda0e16322014-07-14 17:38:41 +02001327 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001328 * Used in: library/ssl_tls.c
1329 * library/ssl_cli.c
1330 * library/ssl_srv.c
1331 *
1332 * This feature requires zlib library and headers to be present.
1333 *
1334 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001335 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001336//#define MBEDTLS_ZLIB_SUPPORT
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001337/* \} name SECTION: mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001338
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001339/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001340 * \name SECTION: mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +00001341 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001342 * This section enables or disables entire modules in mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +00001343 * \{
1344 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001345
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001346/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001347 * \def MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001348 *
1349 * Enable AES-NI support on x86-64.
1350 *
1351 * Module: library/aesni.c
1352 * Caller: library/aes.c
1353 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001354 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001355 *
1356 * This modules adds support for the AES-NI instructions on x86-64
1357 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001358#define MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001359
1360/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001361 * \def MBEDTLS_AES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001362 *
1363 * Enable the AES block cipher.
1364 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001365 * Module: library/aes.c
1366 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001367 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001368 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001369 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001370 * This module enables the following ciphersuites (if other requisites are
1371 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001372 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1373 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1374 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1375 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1376 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1377 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1378 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1379 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1380 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1381 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1382 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1383 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
1384 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1385 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1386 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1387 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1388 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
1389 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
1390 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
1391 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
1392 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1393 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1394 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1395 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1396 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1397 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1398 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1399 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1400 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1401 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1402 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1403 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1404 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1405 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1406 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1407 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1408 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1409 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1410 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1411 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1412 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
1413 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
1414 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
1415 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
1416 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
1417 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
1418 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1419 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1420 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1421 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1422 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1423 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1424 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
1425 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
1426 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
1427 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
1428 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
1429 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001430 *
Paul Bakkercff68422013-09-15 20:43:33 +02001431 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001432 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001433#define MBEDTLS_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001434
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001435/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001436 * \def MBEDTLS_ARC4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001437 *
1438 * Enable the ARCFOUR stream cipher.
1439 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001440 * Module: library/arc4.c
1441 * Caller: library/ssl_tls.c
1442 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001443 * This module enables the following ciphersuites (if other requisites are
1444 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001445 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1446 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
1447 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
1448 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
1449 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
1450 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
1451 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
1452 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
1453 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
1454 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
Hanno Becker15e49512017-09-25 14:53:51 +01001455 *
1456 * \warning ARC4 is considered a weak cipher and its use constitutes a
1457 * security risk. If possible, we recommend avoidng dependencies on
1458 * it, and considering stronger ciphers instead.
1459 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001460 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001461#define MBEDTLS_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001462
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001463/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001464 * \def MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001465 *
1466 * Enable the generic ASN1 parser.
1467 *
1468 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001469 * Caller: library/x509.c
1470 * library/dhm.c
1471 * library/pkcs12.c
1472 * library/pkcs5.c
1473 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001474 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001475#define MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001476
1477/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001478 * \def MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001479 *
1480 * Enable the generic ASN1 writer.
1481 *
1482 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001483 * Caller: library/ecdsa.c
1484 * library/pkwrite.c
1485 * library/x509_create.c
1486 * library/x509write_crt.c
Simon Butcherf2678302016-11-04 12:23:11 +00001487 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001488 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001489#define MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001490
1491/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001492 * \def MBEDTLS_BASE64_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001493 *
1494 * Enable the Base64 module.
1495 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001496 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001497 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001498 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001499 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001500 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001501#define MBEDTLS_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001502
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001503/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001504 * \def MBEDTLS_BIGNUM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001505 *
Paul Bakker9a736322012-11-14 12:39:52 +00001506 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001507 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001508 * Module: library/bignum.c
1509 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001510 * library/ecp.c
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001511 * library/ecdsa.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001512 * library/rsa.c
1513 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001514 *
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001515 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
Paul Bakker5121ce52009-01-03 21:22:43 +00001516 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001517#define MBEDTLS_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001518
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001519/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001520 * \def MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001521 *
1522 * Enable the Blowfish block cipher.
1523 *
1524 * Module: library/blowfish.c
1525 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001526#define MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001527
1528/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001529 * \def MBEDTLS_CAMELLIA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001530 *
1531 * Enable the Camellia block cipher.
1532 *
Paul Bakker38119b12009-01-10 23:31:23 +00001533 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001534 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001535 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001536 * This module enables the following ciphersuites (if other requisites are
1537 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001538 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1539 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1540 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1541 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1542 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1543 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1544 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1545 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
1546 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1547 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1548 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1549 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1550 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
1551 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
1552 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1553 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1554 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1555 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1556 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1557 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1558 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1559 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1560 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1561 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1562 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1563 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1564 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1565 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1566 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1567 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1568 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1569 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1570 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1571 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1572 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1573 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1574 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1575 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1576 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1577 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1578 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1579 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001580 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001581#define MBEDTLS_CAMELLIA_C
Paul Bakker38119b12009-01-10 23:31:23 +00001582
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001583/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001584 * \def MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001585 *
1586 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1587 *
1588 * Module: library/ccm.c
1589 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001590 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001591 *
1592 * This module enables the AES-CCM ciphersuites, if other requisites are
1593 * enabled as well.
1594 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001595#define MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001596
1597/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001598 * \def MBEDTLS_CERTS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001599 *
1600 * Enable the test certificates.
1601 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001602 * Module: library/certs.c
1603 * Caller:
1604 *
1605 * This module is used for testing (ssl_client/server).
1606 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001607#define MBEDTLS_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001608
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001609/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001610 * \def MBEDTLS_CIPHER_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001611 *
1612 * Enable the generic cipher layer.
1613 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001614 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001615 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001616 *
1617 * Uncomment to enable generic cipher wrappers.
1618 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001619#define MBEDTLS_CIPHER_C
Paul Bakker8123e9d2011-01-06 15:37:30 +00001620
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001621/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001622 * \def MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001623 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001624 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001625 *
1626 * Module: library/ctr_drbg.c
1627 * Caller:
1628 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001629 * Requires: MBEDTLS_AES_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001630 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001631 * This module provides the CTR_DRBG AES-256 random number generator.
1632 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001633#define MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001634
1635/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001636 * \def MBEDTLS_DEBUG_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001637 *
1638 * Enable the debug functions.
1639 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001640 * Module: library/debug.c
1641 * Caller: library/ssl_cli.c
1642 * library/ssl_srv.c
1643 * library/ssl_tls.c
1644 *
1645 * This module provides debugging functions.
1646 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001647#define MBEDTLS_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001648
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001649/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001650 * \def MBEDTLS_DES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001651 *
1652 * Enable the DES block cipher.
1653 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001654 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001655 * Caller: library/pem.c
1656 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001657 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001658 * This module enables the following ciphersuites (if other requisites are
1659 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001660 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1661 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
1662 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
1663 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1664 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1665 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1666 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1667 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
1668 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
1669 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001670 *
Paul Bakkercff68422013-09-15 20:43:33 +02001671 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Hanno Becker15e49512017-09-25 14:53:51 +01001672 *
1673 * \warning DES is considered a weak cipher and its use constitutes a
1674 * security risk. We recommend considering stronger ciphers instead.
Paul Bakker5121ce52009-01-03 21:22:43 +00001675 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001676#define MBEDTLS_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001677
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001678/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001679 * \def MBEDTLS_DHM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001680 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001681 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001682 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001683 * Module: library/dhm.c
1684 * Caller: library/ssl_cli.c
1685 * library/ssl_srv.c
1686 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001687 * This module is used by the following key exchanges:
1688 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001689 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001690#define MBEDTLS_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001691
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001692/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001693 * \def MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001694 *
1695 * Enable the elliptic curve Diffie-Hellman library.
1696 *
1697 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001698 * Caller: library/ssl_cli.c
1699 * library/ssl_srv.c
1700 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001701 * This module is used by the following key exchanges:
1702 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001703 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001704 * Requires: MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001705 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001706#define MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001707
1708/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001709 * \def MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001710 *
1711 * Enable the elliptic curve DSA library.
1712 *
1713 * Module: library/ecdsa.c
1714 * Caller:
1715 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001716 * This module is used by the following key exchanges:
1717 * ECDHE-ECDSA
1718 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001719 * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001720 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001721#define MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001722
1723/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001724 * \def MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001725 *
1726 * Enable the elliptic curve over GF(p) library.
1727 *
1728 * Module: library/ecp.c
1729 * Caller: library/ecdh.c
1730 * library/ecdsa.c
1731 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001732 * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001733 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001734#define MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001735
1736/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001737 * \def MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001738 *
1739 * Enable the platform-specific entropy code.
1740 *
1741 * Module: library/entropy.c
1742 * Caller:
1743 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001744 * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001745 *
1746 * This module provides a generic entropy pool
1747 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001748#define MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001749
1750/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001751 * \def MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001752 *
1753 * Enable error code to error string conversion.
1754 *
1755 * Module: library/error.c
1756 * Caller:
1757 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001758 * This module enables mbedtls_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001759 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001760#define MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001761
1762/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001763 * \def MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001764 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001765 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001766 *
1767 * Module: library/gcm.c
1768 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001769 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001770 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001771 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1772 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001773 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001774#define MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001775
1776/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001777 * \def MBEDTLS_HAVEGE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001778 *
1779 * Enable the HAVEGE random generator.
1780 *
Paul Bakker2a844242013-06-24 13:01:53 +02001781 * Warning: the HAVEGE random generator is not suitable for virtualized
1782 * environments
1783 *
1784 * Warning: the HAVEGE random generator is dependent on timing and specific
1785 * processor traits. It is therefore not advised to use HAVEGE as
1786 * your applications primary random generator or primary entropy pool
1787 * input. As a secondary input to your entropy pool, it IS able add
1788 * the (limited) extra entropy it provides.
1789 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001790 * Module: library/havege.c
1791 * Caller:
1792 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001793 * Requires: MBEDTLS_TIMING_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001794 *
Paul Bakker2a844242013-06-24 13:01:53 +02001795 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001796 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001797//#define MBEDTLS_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001798
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001799/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001800 * \def MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001801 *
1802 * Enable the HMAC_DRBG random generator.
1803 *
1804 * Module: library/hmac_drbg.c
1805 * Caller:
1806 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001807 * Requires: MBEDTLS_MD_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001808 *
1809 * Uncomment to enable the HMAC_DRBG random number geerator.
1810 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001811#define MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001812
1813/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001814 * \def MBEDTLS_MD_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001815 *
1816 * Enable the generic message digest layer.
1817 *
Simon Butcherf2678302016-11-04 12:23:11 +00001818 * Module: library/md.c
Paul Bakker17373852011-01-06 14:20:01 +00001819 * Caller:
1820 *
1821 * Uncomment to enable generic message digest wrappers.
1822 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001823#define MBEDTLS_MD_C
Paul Bakker17373852011-01-06 14:20:01 +00001824
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001825/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001826 * \def MBEDTLS_MD2_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001827 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001828 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001829 *
Simon Butcherf2678302016-11-04 12:23:11 +00001830 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001831 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001832 *
1833 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Hanno Becker15e49512017-09-25 14:53:51 +01001834 *
1835 * \warning MD2 is considered a weak message digest and its use constitutes a
1836 * security risk. If possible, we recommend avoiding dependencies on
1837 * it, and considering stronger message digests instead.
1838 *
Paul Bakker6506aff2009-07-28 20:52:02 +00001839 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001840//#define MBEDTLS_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001841
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001842/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001843 * \def MBEDTLS_MD4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001844 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001845 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001846 *
Simon Butcherf2678302016-11-04 12:23:11 +00001847 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001848 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001849 *
1850 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Hanno Becker15e49512017-09-25 14:53:51 +01001851 *
1852 * \warning MD4 is considered a weak message digest and its use constitutes a
1853 * security risk. If possible, we recommend avoiding dependencies on
1854 * it, and considering stronger message digests instead.
1855 *
Paul Bakker6506aff2009-07-28 20:52:02 +00001856 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001857//#define MBEDTLS_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001858
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001859/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001860 * \def MBEDTLS_MD5_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001861 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001862 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001863 *
Simon Butcherf2678302016-11-04 12:23:11 +00001864 * Module: library/md5.c
1865 * Caller: library/md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001866 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001867 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001868 *
Hanno Becker15e49512017-09-25 14:53:51 +01001869 * This module is required for SSL/TLS up to version 1.1, and it can be used in
1870 * TLS 1.2 through the choice on handshake parameters. Further, it is used for
1871 * checking MD5-signed certificates, and for PBKDF1 when decrypting PEM-encoded
1872 * encrypted keys.
1873 *
1874 * \warning MD5 is considered a weak message digest and its use constitutes a
1875 * security risk. If possible, we recommend avoiding dependencies on
1876 * it, and considering stronger message digests instead.
1877 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001878 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001879#define MBEDTLS_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001880
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001881/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001882 * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001883 *
1884 * Enable the buffer allocator implementation that makes use of a (stack)
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +02001885 * based buffer to 'allocate' dynamic memory. (replaces calloc() and free()
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001886 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001887 *
1888 * Module: library/memory_buffer_alloc.c
1889 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001890 * Requires: MBEDTLS_PLATFORM_C
1891 * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
Paul Bakker6e339b52013-07-03 13:37:05 +02001892 *
1893 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001894 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001895//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001896
1897/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001898 * \def MBEDTLS_NET_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001899 *
1900 * Enable the TCP/IP networking routines.
1901 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001902 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001903 *
1904 * This module provides TCP/IP networking routines.
1905 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001906#define MBEDTLS_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001907
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001908/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001909 * \def MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001910 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001911 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001912 *
1913 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001914 * Caller: library/asn1write.c
1915 * library/pkcs5.c
1916 * library/pkparse.c
1917 * library/pkwrite.c
1918 * library/rsa.c
1919 * library/x509.c
1920 * library/x509_create.c
Simon Butcherf2678302016-11-04 12:23:11 +00001921 * library/x509_crl.c
1922 * library/x509_crt.c
1923 * library/x509_csr.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001924 * library/x509write_crt.c
Simon Butcherf2678302016-11-04 12:23:11 +00001925 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001926 *
1927 * This modules translates between OIDs and internal values.
1928 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001929#define MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001930
1931/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001932 * \def MBEDTLS_PADLOCK_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001933 *
1934 * Enable VIA Padlock support on x86.
1935 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001936 * Module: library/padlock.c
1937 * Caller: library/aes.c
1938 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001939 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001940 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001941 * This modules adds support for the VIA PadLock on x86.
1942 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001943#define MBEDTLS_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001944
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001945/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001946 * \def MBEDTLS_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001947 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001948 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001949 *
1950 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001951 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001952 * library/pkparse.c
Simon Butcherf2678302016-11-04 12:23:11 +00001953 * library/x509_crl.c
1954 * library/x509_crt.c
1955 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001956 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001957 * Requires: MBEDTLS_BASE64_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001958 *
Paul Bakkercff68422013-09-15 20:43:33 +02001959 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001960 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001961#define MBEDTLS_PEM_PARSE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001962
1963/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001964 * \def MBEDTLS_PEM_WRITE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001965 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001966 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001967 *
1968 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001969 * Caller: library/pkwrite.c
1970 * library/x509write_crt.c
Simon Butcherf2678302016-11-04 12:23:11 +00001971 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001972 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001973 * Requires: MBEDTLS_BASE64_C
Paul Bakkercff68422013-09-15 20:43:33 +02001974 *
1975 * This modules adds support for encoding / writing PEM files.
1976 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001977#define MBEDTLS_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001978
1979/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001980 * \def MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001981 *
1982 * Enable the generic public (asymetric) key layer.
1983 *
1984 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001985 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001986 * library/ssl_cli.c
1987 * library/ssl_srv.c
1988 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001989 * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001990 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001991 * Uncomment to enable generic public key wrappers.
1992 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001993#define MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001994
1995/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001996 * \def MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001997 *
1998 * Enable the generic public (asymetric) key parser.
1999 *
2000 * Module: library/pkparse.c
Simon Butcherf2678302016-11-04 12:23:11 +00002001 * Caller: library/x509_crt.c
2002 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02002003 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002004 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02002005 *
2006 * Uncomment to enable generic public key parse functions.
2007 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002008#define MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02002009
2010/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002011 * \def MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02002012 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02002013 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02002014 *
2015 * Module: library/pkwrite.c
2016 * Caller: library/x509write.c
2017 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002018 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02002019 *
2020 * Uncomment to enable generic public key write functions.
2021 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002022#define MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02002023
2024/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002025 * \def MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02002026 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002027 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02002028 *
2029 * Module: library/pkcs5.c
2030 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002031 * Requires: MBEDTLS_MD_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02002032 *
2033 * This module adds support for the PKCS#5 functions.
2034 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002035#define MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02002036
2037/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002038 * \def MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002039 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00002040 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00002041 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002042 * Module: library/pkcs11.c
2043 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00002044 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002045 * Requires: MBEDTLS_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002046 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00002047 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00002048 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00002049 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002050//#define MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002051
2052/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002053 * \def MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002054 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002055 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002056 * Adds algorithms for parsing PKCS#8 encrypted private keys
2057 *
2058 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002059 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002060 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002061 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2062 * Can use: MBEDTLS_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002063 *
2064 * This module enables PKCS#12 functions.
2065 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002066#define MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002067
2068/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002069 * \def MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01002070 *
2071 * Enable the platform abstraction layer that allows you to re-assign
Manuel Pégourié-Gonnard6c0c8e02015-06-22 10:23:34 +02002072 * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
Paul Bakker747a83a2014-02-01 22:50:07 +01002073 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002074 * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
2075 * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
Rich Evans16f8cd82015-02-06 16:14:34 +00002076 * above to be specified at runtime or compile time respectively.
Paul Bakker747a83a2014-02-01 22:50:07 +01002077 *
Manuel Pégourié-Gonnard6c0c8e02015-06-22 10:23:34 +02002078 * \note This abstraction layer must be enabled on Windows (including MSYS2)
2079 * as other module rely on it for a fixed snprintf implementation.
2080 *
Paul Bakker747a83a2014-02-01 22:50:07 +01002081 * Module: library/platform.c
2082 * Caller: Most other .c files
2083 *
2084 * This module enables abstraction of common (libc) functions.
2085 */
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +02002086#define MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01002087
2088/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002089 * \def MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002090 *
2091 * Enable the RIPEMD-160 hash algorithm.
2092 *
Simon Butcherf2678302016-11-04 12:23:11 +00002093 * Module: library/ripemd160.c
2094 * Caller: library/md.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002095 *
2096 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002097#define MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002098
2099/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002100 * \def MBEDTLS_RSA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002101 *
2102 * Enable the RSA public-key cryptosystem.
2103 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002104 * Module: library/rsa.c
2105 * Caller: library/ssl_cli.c
2106 * library/ssl_srv.c
2107 * library/ssl_tls.c
2108 * library/x509.c
2109 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02002110 * This module is used by the following key exchanges:
2111 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00002112 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002113 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002114 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002115#define MBEDTLS_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002116
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002117/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002118 * \def MBEDTLS_SHA1_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002119 *
2120 * Enable the SHA1 cryptographic hash algorithm.
2121 *
Simon Butcherf2678302016-11-04 12:23:11 +00002122 * Module: library/sha1.c
2123 * Caller: library/md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002124 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002125 * library/ssl_srv.c
2126 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002127 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002128 *
Gilles Peskine955738a2017-05-04 16:17:21 +02002129 * This module is required for SSL/TLS up to version 1.1, for TLS 1.2
2130 * depending on the handshake parameters, and for SHA1-signed certificates.
Hanno Becker15e49512017-09-25 14:53:51 +01002131 *
2132 * \warning SHA-1 is considered a weak message digest and its use constitutes
2133 * a security risk. If possible, we recommend avoiding dependencies
2134 * on it, and considering stronger message digests instead.
2135 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002136 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002137#define MBEDTLS_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002138
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002139/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002140 * \def MBEDTLS_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002141 *
2142 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
2143 *
Simon Butcherf2678302016-11-04 12:23:11 +00002144 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002145 * Caller: library/entropy.c
Simon Butcherf2678302016-11-04 12:23:11 +00002146 * library/md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002147 * library/ssl_cli.c
2148 * library/ssl_srv.c
2149 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002150 *
2151 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01002152 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00002153 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002154#define MBEDTLS_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002155
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002156/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002157 * \def MBEDTLS_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002158 *
2159 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
2160 *
Simon Butcherf2678302016-11-04 12:23:11 +00002161 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002162 * Caller: library/entropy.c
Simon Butcherf2678302016-11-04 12:23:11 +00002163 * library/md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002164 * library/ssl_cli.c
2165 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002166 *
2167 * This module adds support for SHA-384 and SHA-512.
2168 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002169#define MBEDTLS_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002170
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002171/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002172 * \def MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002173 *
2174 * Enable simple SSL cache implementation.
2175 *
2176 * Module: library/ssl_cache.c
2177 * Caller:
2178 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002179 * Requires: MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002180 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002181#define MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002182
2183/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002184 * \def MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002185 *
2186 * Enable basic implementation of DTLS cookies for hello verification.
2187 *
2188 * Module: library/ssl_cookie.c
2189 * Caller:
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002190 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002191#define MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002192
2193/**
Manuel Pégourié-Gonnardfd6d8972015-05-15 12:09:00 +02002194 * \def MBEDTLS_SSL_TICKET_C
2195 *
2196 * Enable an implementation of TLS server-side callbacks for session tickets.
2197 *
2198 * Module: library/ssl_ticket.c
2199 * Caller:
Manuel Pégourié-Gonnard0c0f11f2015-05-20 09:55:50 +02002200 *
Manuel Pégourié-Gonnard4214e3a2015-05-25 19:34:49 +02002201 * Requires: MBEDTLS_CIPHER_C
Manuel Pégourié-Gonnardfd6d8972015-05-15 12:09:00 +02002202 */
2203#define MBEDTLS_SSL_TICKET_C
2204
2205/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002206 * \def MBEDTLS_SSL_CLI_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002207 *
2208 * Enable the SSL/TLS client code.
2209 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002210 * Module: library/ssl_cli.c
2211 * Caller:
2212 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002213 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002214 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002215 * This module is required for SSL/TLS client support.
2216 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002217#define MBEDTLS_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002218
Paul Bakker9a736322012-11-14 12:39:52 +00002219/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002220 * \def MBEDTLS_SSL_SRV_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002221 *
2222 * Enable the SSL/TLS server code.
2223 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002224 * Module: library/ssl_srv.c
2225 * Caller:
2226 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002227 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002228 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002229 * This module is required for SSL/TLS server support.
2230 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002231#define MBEDTLS_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002232
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002233/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002234 * \def MBEDTLS_SSL_TLS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002235 *
Paul Bakkere29ab062011-05-18 13:26:54 +00002236 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002237 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002238 * Module: library/ssl_tls.c
2239 * Caller: library/ssl_cli.c
2240 * library/ssl_srv.c
2241 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002242 * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2243 * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
Paul Bakker5690efc2011-05-26 13:16:06 +00002244 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002245 * This module is required for SSL/TLS.
2246 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002247#define MBEDTLS_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002248
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002249/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002250 * \def MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002251 *
2252 * Enable the threading abstraction layer.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002253 * By default mbed TLS assumes it is used in a non-threaded environment or that
Paul Bakker2466d932013-09-28 14:40:38 +02002254 * contexts are not shared between threads. If you do intend to use contexts
2255 * between threads, you will need to enable this layer to prevent race
2256 * conditions.
2257 *
2258 * Module: library/threading.c
2259 *
2260 * This allows different threading implementations (self-implemented or
2261 * provided).
2262 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002263 * You will have to enable either MBEDTLS_THREADING_ALT or
2264 * MBEDTLS_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02002265 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002266 * Enable this layer to allow use of mutexes within mbed TLS
Paul Bakker2466d932013-09-28 14:40:38 +02002267 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002268//#define MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002269
2270/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002271 * \def MBEDTLS_TIMING_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002272 *
2273 * Enable the portable timing interface.
2274 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002275 * Module: library/timing.c
2276 * Caller: library/havege.c
2277 *
2278 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002279 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002280#define MBEDTLS_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002281
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002282/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002283 * \def MBEDTLS_VERSION_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002284 *
2285 * Enable run-time version information.
2286 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00002287 * Module: library/version.c
2288 *
2289 * This module provides run-time version information.
2290 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002291#define MBEDTLS_VERSION_C
Paul Bakker0a62cd12011-01-21 11:00:08 +00002292
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002293/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002294 * \def MBEDTLS_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002295 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002296 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002297 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002298 * Module: library/x509.c
Simon Butcherf2678302016-11-04 12:23:11 +00002299 * Caller: library/x509_crl.c
2300 * library/x509_crt.c
2301 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002302 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002303 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
2304 * MBEDTLS_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002305 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002306 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00002307 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002308#define MBEDTLS_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002309
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002310/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002311 * \def MBEDTLS_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002312 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002313 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002314 *
Simon Butcherf2678302016-11-04 12:23:11 +00002315 * Module: library/x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002316 * Caller: library/ssl_cli.c
2317 * library/ssl_srv.c
2318 * library/ssl_tls.c
2319 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002320 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002321 *
2322 * This module is required for X.509 certificate parsing.
2323 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002324#define MBEDTLS_X509_CRT_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002325
2326/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002327 * \def MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002328 *
2329 * Enable X.509 CRL parsing.
2330 *
Simon Butcherf2678302016-11-04 12:23:11 +00002331 * Module: library/x509_crl.c
2332 * Caller: library/x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002333 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002334 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002335 *
2336 * This module is required for X.509 CRL parsing.
2337 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002338#define MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002339
2340/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002341 * \def MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002342 *
2343 * Enable X.509 Certificate Signing Request (CSR) parsing.
2344 *
Simon Butcherf2678302016-11-04 12:23:11 +00002345 * Module: library/x509_csr.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002346 * Caller: library/x509_crt_write.c
2347 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002348 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002349 *
2350 * This module is used for reading X.509 certificate request.
2351 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002352#define MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002353
2354/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002355 * \def MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002356 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002357 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002358 *
2359 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002360 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002361 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002362 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002363 * This module is the basis for creating X.509 certificates and CSRs.
2364 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002365#define MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002366
2367/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002368 * \def MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002369 *
2370 * Enable creating X.509 certificates.
2371 *
2372 * Module: library/x509_crt_write.c
2373 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002374 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002375 *
2376 * This module is required for X.509 certificate creation.
2377 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002378#define MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002379
2380/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002381 * \def MBEDTLS_X509_CSR_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002382 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002383 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002384 *
2385 * Module: library/x509_csr_write.c
2386 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002387 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002388 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002389 * This module is required for X.509 certificate request writing.
2390 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002391#define MBEDTLS_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002392
2393/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002394 * \def MBEDTLS_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002395 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002396 * Enable the XTEA block cipher.
2397 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002398 * Module: library/xtea.c
2399 * Caller:
2400 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002401#define MBEDTLS_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002402
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002403/* \} name SECTION: mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002404
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002405/**
2406 * \name SECTION: Module configuration options
2407 *
2408 * This section allows for the setting of module specific sizes and
2409 * configuration options. The default values are already present in the
2410 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002411 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002412 * Our advice is to enable options and change their values here
2413 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002414 *
2415 * Please check the respective header file for documentation on these
2416 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002417 * \{
2418 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002419
Paul Bakker088c5c52014-04-25 11:11:10 +02002420/* MPI / BIGNUM options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002421//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2422//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002423
Paul Bakker088c5c52014-04-25 11:11:10 +02002424/* CTR_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002425//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2426//#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2427//#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2428//#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2429//#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002430
Paul Bakker088c5c52014-04-25 11:11:10 +02002431/* HMAC_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002432//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2433//#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2434//#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2435//#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002436
Paul Bakker088c5c52014-04-25 11:11:10 +02002437/* ECP options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002438//#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2439//#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2440//#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002441
Paul Bakker088c5c52014-04-25 11:11:10 +02002442/* Entropy options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002443//#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2444//#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002445
Paul Bakker088c5c52014-04-25 11:11:10 +02002446/* Memory buffer allocator options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002447//#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002448
Paul Bakker088c5c52014-04-25 11:11:10 +02002449/* Platform options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002450//#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. */
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +02002451//#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002452//#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2453//#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2454//#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2455//#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
Manuel Pégourié-Gonnard6c0c8e02015-06-22 10:23:34 +02002456/* Note: your snprintf must correclty zero-terminate the buffer! */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002457//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002458
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002459/* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
2460/* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +02002461//#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002462//#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2463//#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2464//#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2465//#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
Manuel Pégourié-Gonnard6c0c8e02015-06-22 10:23:34 +02002466/* Note: your snprintf must correclty zero-terminate the buffer! */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002467//#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002468
Paul Bakker088c5c52014-04-25 11:11:10 +02002469/* SSL Cache options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002470//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2471//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002472
Paul Bakker088c5c52014-04-25 11:11:10 +02002473/* SSL options */
Manuel Pégourié-Gonnardbb838442015-08-31 12:46:01 +02002474//#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Maxium fragment length in bytes, determines the size of each of the two internal I/O buffers */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002475//#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
2476//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
2477//#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 +02002478
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002479/**
2480 * Complete list of ciphersuites to use, in order of preference.
2481 *
2482 * \warning No dependency checking is done on that field! This option can only
2483 * be used to restrict the set of available ciphersuites. It is your
2484 * responsibility to make sure the needed modules are active.
2485 *
2486 * Use this to save a few hundred bytes of ROM (default ordering of all
2487 * available ciphersuites) and a few to a few hundred bytes of RAM.
2488 *
2489 * The value below is only an example, not the default.
2490 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002491//#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 +02002492
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002493/* X509 options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002494//#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
Andres AG879e6262016-09-02 14:06:04 +01002495//#define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002496
Gilles Peskine955738a2017-05-04 16:17:21 +02002497/**
Gilles Peskine7344e1b2017-05-12 13:16:40 +02002498 * Allow SHA-1 in the default TLS configuration for certificate signing.
2499 * Without this build-time option, SHA-1 support must be activated explicitly
2500 * through mbedtls_ssl_conf_cert_profile. Turning on this option is not
Hanno Becker15e49512017-09-25 14:53:51 +01002501 * recommended because of it is possible to generate SHA-1 collisions, however
Gilles Peskine7344e1b2017-05-12 13:16:40 +02002502 * this may be safe for legacy infrastructure where additional controls apply.
Hanno Becker15e49512017-09-25 14:53:51 +01002503 *
2504 * \warning SHA-1 is considered a weak message digest and its use constitutes
2505 * a security risk. If possible, we recommend avoiding dependencies
2506 * on it, and considering stronger message digests instead.
2507 *
Gilles Peskine955738a2017-05-04 16:17:21 +02002508 */
Gilles Peskine7344e1b2017-05-12 13:16:40 +02002509// #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES
2510
2511/**
2512 * Allow SHA-1 in the default TLS configuration for TLS 1.2 handshake
2513 * signature and ciphersuite selection. Without this build-time option, SHA-1
2514 * support must be activated explicitly through mbedtls_ssl_conf_sig_hashes.
2515 * The use of SHA-1 in TLS <= 1.1 and in HMAC-SHA-1 is always allowed by
2516 * default. At the time of writing, there is no practical attack on the use
2517 * of SHA-1 in handshake signatures, hence this option is turned on by default
Hanno Becker15e49512017-09-25 14:53:51 +01002518 * to preserve compatibility with existing peers, but the general
2519 * warning applies nonetheless:
2520 *
2521 * \warning SHA-1 is considered a weak message digest and its use constitutes
2522 * a security risk. If possible, we recommend avoiding dependencies
2523 * on it, and considering stronger message digests instead.
2524 *
Gilles Peskine7344e1b2017-05-12 13:16:40 +02002525 */
2526#define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
Gilles Peskine955738a2017-05-04 16:17:21 +02002527
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002528/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002529
Manuel Pégourié-Gonnard43569a92015-07-31 15:37:29 +02002530#if defined(TARGET_LIKE_MBED)
2531#include "mbedtls/target_config.h"
2532#endif
2533
Manuel Pégourié-Gonnard32da9f62015-07-31 15:52:30 +02002534/*
2535 * Allow user to override any previous default.
2536 *
2537 * Use two macro names for that, as:
2538 * - with yotta the prefix YOTTA_CFG_ is forced
2539 * - without yotta is looks weird to have a YOTTA prefix.
2540 */
2541#if defined(YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE)
2542#include YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE
2543#elif defined(MBEDTLS_USER_CONFIG_FILE)
2544#include MBEDTLS_USER_CONFIG_FILE
2545#endif
2546
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002547#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002548
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002549#endif /* MBEDTLS_CONFIG_H */