blob: 00589dd07d7a088c560cce93019dbf360bd7b9f9 [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/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001202 * \def MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001203 *
1204 * Provide your own alternate threading implementation.
1205 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001206 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001207 *
1208 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +02001209 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001210//#define MBEDTLS_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001211
1212/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001213 * \def MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001214 *
1215 * Enable the pthread wrapper layer for the threading layer.
1216 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001217 * Requires: MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001218 *
1219 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +02001220 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001221//#define MBEDTLS_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001222
1223/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001224 * \def MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001225 *
1226 * Allow run-time checking of compile-time enabled features. Thus allowing users
1227 * to check at run-time if the library is for instance compiled with threading
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001228 * support via mbedtls_version_check_feature().
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001229 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001230 * Requires: MBEDTLS_VERSION_C
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001231 *
1232 * Comment this to disable run-time checking and save ROM space
1233 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001234#define MBEDTLS_VERSION_FEATURES
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001235
1236/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001237 * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001238 *
1239 * If set, the X509 parser will not break-off when parsing an X509 certificate
1240 * and encountering an extension in a v1 or v2 certificate.
1241 *
1242 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001243 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001244//#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001245
1246/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001247 * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker5c721f92011-07-27 16:51:09 +00001248 *
1249 * If set, the X509 parser will not break-off when parsing an X509 certificate
1250 * and encountering an unknown critical extension.
1251 *
Manuel Pégourié-Gonnardcb6af002015-10-05 12:12:39 +01001252 * \warning Depending on your PKI use, enabling this can be a security risk!
1253 *
Paul Bakker5c721f92011-07-27 16:51:09 +00001254 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +00001255 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001256//#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +00001257
1258/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001259 * \def MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001260 *
1261 * Enable verification of the keyUsage extension (CA and leaf certificates).
1262 *
1263 * Disabling this avoids problems with mis-issued and/or misused
1264 * (intermediate) CA and leaf certificates.
1265 *
1266 * \warning Depending on your PKI use, disabling this can be a security risk!
1267 *
1268 * Comment to skip keyUsage checking for both CA and leaf certificates.
1269 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001270#define MBEDTLS_X509_CHECK_KEY_USAGE
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001271
1272/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001273 * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001274 *
1275 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1276 *
1277 * Disabling this avoids problems with mis-issued and/or misused certificates.
1278 *
1279 * \warning Depending on your PKI use, disabling this can be a security risk!
1280 *
1281 * Comment to skip extendedKeyUsage checking for certificates.
1282 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001283#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001284
1285/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001286 * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001287 *
1288 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1289 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1290 *
1291 * Comment this macro to disallow using RSASSA-PSS in certificates.
1292 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001293#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001294
1295/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001296 * \def MBEDTLS_ZLIB_SUPPORT
Paul Bakker2770fbd2012-07-03 13:30:23 +00001297 *
1298 * If set, the SSL/TLS module uses ZLIB to support compression and
1299 * decompression of packet data.
1300 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001301 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1302 * CRIME attack. Before enabling this option, you should examine with care if
1303 * CRIME or similar exploits may be a applicable to your use case.
1304 *
Manuel Pégourié-Gonnard7c3b4ab2015-07-02 17:59:52 +02001305 * \note Currently compression can't be used with DTLS.
Manuel Pégourié-Gonnarda0e16322014-07-14 17:38:41 +02001306 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001307 * Used in: library/ssl_tls.c
1308 * library/ssl_cli.c
1309 * library/ssl_srv.c
1310 *
1311 * This feature requires zlib library and headers to be present.
1312 *
1313 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001314 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001315//#define MBEDTLS_ZLIB_SUPPORT
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001316/* \} name SECTION: mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001317
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001318/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001319 * \name SECTION: mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +00001320 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001321 * This section enables or disables entire modules in mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +00001322 * \{
1323 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001324
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001325/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001326 * \def MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001327 *
1328 * Enable AES-NI support on x86-64.
1329 *
1330 * Module: library/aesni.c
1331 * Caller: library/aes.c
1332 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001333 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001334 *
1335 * This modules adds support for the AES-NI instructions on x86-64
1336 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001337#define MBEDTLS_AESNI_C
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001338
1339/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001340 * \def MBEDTLS_AES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001341 *
1342 * Enable the AES block cipher.
1343 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001344 * Module: library/aes.c
1345 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001346 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001347 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001348 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001349 * This module enables the following ciphersuites (if other requisites are
1350 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001351 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1352 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1353 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1354 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1355 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1356 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1357 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1358 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1359 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1360 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1361 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1362 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
1363 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1364 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1365 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1366 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1367 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
1368 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
1369 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
1370 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
1371 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1372 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1373 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1374 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1375 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1376 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1377 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1378 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1379 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1380 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1381 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1382 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1383 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1384 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1385 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1386 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1387 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1388 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1389 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1390 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1391 * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
1392 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
1393 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
1394 * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
1395 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
1396 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
1397 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1398 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1399 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1400 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1401 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1402 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1403 * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
1404 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
1405 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
1406 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
1407 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
1408 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001409 *
Paul Bakkercff68422013-09-15 20:43:33 +02001410 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001411 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001412#define MBEDTLS_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001413
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001414/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001415 * \def MBEDTLS_ARC4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001416 *
1417 * Enable the ARCFOUR stream cipher.
1418 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001419 * Module: library/arc4.c
1420 * Caller: library/ssl_tls.c
1421 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001422 * This module enables the following ciphersuites (if other requisites are
1423 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001424 * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1425 * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
1426 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
1427 * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
1428 * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
1429 * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
1430 * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
1431 * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
1432 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
1433 * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
Hanno Becker15e49512017-09-25 14:53:51 +01001434 *
1435 * \warning ARC4 is considered a weak cipher and its use constitutes a
1436 * security risk. If possible, we recommend avoidng dependencies on
1437 * it, and considering stronger ciphers instead.
1438 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001439 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001440#define MBEDTLS_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001441
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001442/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001443 * \def MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001444 *
1445 * Enable the generic ASN1 parser.
1446 *
1447 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001448 * Caller: library/x509.c
1449 * library/dhm.c
1450 * library/pkcs12.c
1451 * library/pkcs5.c
1452 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001453 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001454#define MBEDTLS_ASN1_PARSE_C
Paul Bakkerefc30292011-11-10 14:43:23 +00001455
1456/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001457 * \def MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001458 *
1459 * Enable the generic ASN1 writer.
1460 *
1461 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001462 * Caller: library/ecdsa.c
1463 * library/pkwrite.c
1464 * library/x509_create.c
1465 * library/x509write_crt.c
Simon Butcherf2678302016-11-04 12:23:11 +00001466 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001467 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001468#define MBEDTLS_ASN1_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001469
1470/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001471 * \def MBEDTLS_BASE64_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001472 *
1473 * Enable the Base64 module.
1474 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001475 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001476 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001477 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001478 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001479 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001480#define MBEDTLS_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001481
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001482/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001483 * \def MBEDTLS_BIGNUM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001484 *
Paul Bakker9a736322012-11-14 12:39:52 +00001485 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001486 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001487 * Module: library/bignum.c
1488 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001489 * library/ecp.c
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001490 * library/ecdsa.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001491 * library/rsa.c
1492 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001493 *
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001494 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
Paul Bakker5121ce52009-01-03 21:22:43 +00001495 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001496#define MBEDTLS_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001497
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001498/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001499 * \def MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001500 *
1501 * Enable the Blowfish block cipher.
1502 *
1503 * Module: library/blowfish.c
1504 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001505#define MBEDTLS_BLOWFISH_C
Paul Bakkera9379c02012-07-04 11:02:11 +00001506
1507/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001508 * \def MBEDTLS_CAMELLIA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001509 *
1510 * Enable the Camellia block cipher.
1511 *
Paul Bakker38119b12009-01-10 23:31:23 +00001512 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001513 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001514 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001515 * This module enables the following ciphersuites (if other requisites are
1516 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001517 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1518 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1519 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1520 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1521 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1522 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1523 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1524 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
1525 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1526 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1527 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1528 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1529 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
1530 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
1531 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1532 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1533 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1534 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1535 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1536 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1537 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1538 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1539 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1540 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1541 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1542 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1543 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1544 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1545 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1546 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1547 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1548 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1549 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1550 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1551 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1552 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1553 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1554 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1555 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1556 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1557 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1558 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001559 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001560#define MBEDTLS_CAMELLIA_C
Paul Bakker38119b12009-01-10 23:31:23 +00001561
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001562/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001563 * \def MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001564 *
1565 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1566 *
1567 * Module: library/ccm.c
1568 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001569 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001570 *
1571 * This module enables the AES-CCM ciphersuites, if other requisites are
1572 * enabled as well.
1573 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001574#define MBEDTLS_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001575
1576/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001577 * \def MBEDTLS_CERTS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001578 *
1579 * Enable the test certificates.
1580 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001581 * Module: library/certs.c
1582 * Caller:
1583 *
1584 * This module is used for testing (ssl_client/server).
1585 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001586#define MBEDTLS_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001587
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001588/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001589 * \def MBEDTLS_CIPHER_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001590 *
1591 * Enable the generic cipher layer.
1592 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001593 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001594 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001595 *
1596 * Uncomment to enable generic cipher wrappers.
1597 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001598#define MBEDTLS_CIPHER_C
Paul Bakker8123e9d2011-01-06 15:37:30 +00001599
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001600/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001601 * \def MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001602 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001603 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001604 *
1605 * Module: library/ctr_drbg.c
1606 * Caller:
1607 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001608 * Requires: MBEDTLS_AES_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001609 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001610 * This module provides the CTR_DRBG AES-256 random number generator.
1611 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001612#define MBEDTLS_CTR_DRBG_C
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001613
1614/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001615 * \def MBEDTLS_DEBUG_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001616 *
1617 * Enable the debug functions.
1618 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001619 * Module: library/debug.c
1620 * Caller: library/ssl_cli.c
1621 * library/ssl_srv.c
1622 * library/ssl_tls.c
1623 *
1624 * This module provides debugging functions.
1625 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001626#define MBEDTLS_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001627
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001628/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001629 * \def MBEDTLS_DES_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001630 *
1631 * Enable the DES block cipher.
1632 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001633 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001634 * Caller: library/pem.c
1635 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001636 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001637 * This module enables the following ciphersuites (if other requisites are
1638 * enabled as well):
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001639 * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1640 * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
1641 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
1642 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1643 * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1644 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1645 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1646 * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
1647 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
1648 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001649 *
Paul Bakkercff68422013-09-15 20:43:33 +02001650 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Hanno Becker15e49512017-09-25 14:53:51 +01001651 *
1652 * \warning DES is considered a weak cipher and its use constitutes a
1653 * security risk. We recommend considering stronger ciphers instead.
Paul Bakker5121ce52009-01-03 21:22:43 +00001654 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001655#define MBEDTLS_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001656
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001657/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001658 * \def MBEDTLS_DHM_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001659 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001660 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001661 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001662 * Module: library/dhm.c
1663 * Caller: library/ssl_cli.c
1664 * library/ssl_srv.c
1665 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001666 * This module is used by the following key exchanges:
1667 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001668 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001669#define MBEDTLS_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001670
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001671/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001672 * \def MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001673 *
1674 * Enable the elliptic curve Diffie-Hellman library.
1675 *
1676 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001677 * Caller: library/ssl_cli.c
1678 * library/ssl_srv.c
1679 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001680 * This module is used by the following key exchanges:
1681 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001682 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001683 * Requires: MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001684 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001685#define MBEDTLS_ECDH_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001686
1687/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001688 * \def MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001689 *
1690 * Enable the elliptic curve DSA library.
1691 *
1692 * Module: library/ecdsa.c
1693 * Caller:
1694 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001695 * This module is used by the following key exchanges:
1696 * ECDHE-ECDSA
1697 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001698 * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001699 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001700#define MBEDTLS_ECDSA_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001701
1702/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001703 * \def MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001704 *
1705 * Enable the elliptic curve over GF(p) library.
1706 *
1707 * Module: library/ecp.c
1708 * Caller: library/ecdh.c
1709 * library/ecdsa.c
1710 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001711 * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001712 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001713#define MBEDTLS_ECP_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001714
1715/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001716 * \def MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001717 *
1718 * Enable the platform-specific entropy code.
1719 *
1720 * Module: library/entropy.c
1721 * Caller:
1722 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001723 * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001724 *
1725 * This module provides a generic entropy pool
1726 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001727#define MBEDTLS_ENTROPY_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001728
1729/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001730 * \def MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001731 *
1732 * Enable error code to error string conversion.
1733 *
1734 * Module: library/error.c
1735 * Caller:
1736 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001737 * This module enables mbedtls_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001738 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001739#define MBEDTLS_ERROR_C
Paul Bakker9d781402011-05-09 16:17:09 +00001740
1741/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001742 * \def MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001743 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001744 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001745 *
1746 * Module: library/gcm.c
1747 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001748 * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001749 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001750 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1751 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001752 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001753#define MBEDTLS_GCM_C
Paul Bakker89e80c92012-03-20 13:50:09 +00001754
1755/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001756 * \def MBEDTLS_HAVEGE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001757 *
1758 * Enable the HAVEGE random generator.
1759 *
Paul Bakker2a844242013-06-24 13:01:53 +02001760 * Warning: the HAVEGE random generator is not suitable for virtualized
1761 * environments
1762 *
1763 * Warning: the HAVEGE random generator is dependent on timing and specific
1764 * processor traits. It is therefore not advised to use HAVEGE as
1765 * your applications primary random generator or primary entropy pool
1766 * input. As a secondary input to your entropy pool, it IS able add
1767 * the (limited) extra entropy it provides.
1768 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001769 * Module: library/havege.c
1770 * Caller:
1771 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001772 * Requires: MBEDTLS_TIMING_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001773 *
Paul Bakker2a844242013-06-24 13:01:53 +02001774 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001775 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001776//#define MBEDTLS_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001777
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001778/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001779 * \def MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001780 *
1781 * Enable the HMAC_DRBG random generator.
1782 *
1783 * Module: library/hmac_drbg.c
1784 * Caller:
1785 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001786 * Requires: MBEDTLS_MD_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001787 *
1788 * Uncomment to enable the HMAC_DRBG random number geerator.
1789 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001790#define MBEDTLS_HMAC_DRBG_C
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001791
1792/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001793 * \def MBEDTLS_MD_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001794 *
1795 * Enable the generic message digest layer.
1796 *
Simon Butcherf2678302016-11-04 12:23:11 +00001797 * Module: library/md.c
Paul Bakker17373852011-01-06 14:20:01 +00001798 * Caller:
1799 *
1800 * Uncomment to enable generic message digest wrappers.
1801 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001802#define MBEDTLS_MD_C
Paul Bakker17373852011-01-06 14:20:01 +00001803
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001804/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001805 * \def MBEDTLS_MD2_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001806 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001807 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001808 *
Simon Butcherf2678302016-11-04 12:23:11 +00001809 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001810 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001811 *
1812 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Hanno Becker15e49512017-09-25 14:53:51 +01001813 *
1814 * \warning MD2 is considered a weak message digest and its use constitutes a
1815 * security risk. If possible, we recommend avoiding dependencies on
1816 * it, and considering stronger message digests instead.
1817 *
Paul Bakker6506aff2009-07-28 20:52:02 +00001818 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001819//#define MBEDTLS_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001820
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001821/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001822 * \def MBEDTLS_MD4_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001823 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001824 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001825 *
Simon Butcherf2678302016-11-04 12:23:11 +00001826 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001827 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001828 *
1829 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Hanno Becker15e49512017-09-25 14:53:51 +01001830 *
1831 * \warning MD4 is considered a weak message digest and its use constitutes a
1832 * security risk. If possible, we recommend avoiding dependencies on
1833 * it, and considering stronger message digests instead.
1834 *
Paul Bakker6506aff2009-07-28 20:52:02 +00001835 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001836//#define MBEDTLS_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001837
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001838/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001839 * \def MBEDTLS_MD5_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001840 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001841 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001842 *
Simon Butcherf2678302016-11-04 12:23:11 +00001843 * Module: library/md5.c
1844 * Caller: library/md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001845 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001846 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001847 *
Hanno Becker15e49512017-09-25 14:53:51 +01001848 * This module is required for SSL/TLS up to version 1.1, and it can be used in
1849 * TLS 1.2 through the choice on handshake parameters. Further, it is used for
1850 * checking MD5-signed certificates, and for PBKDF1 when decrypting PEM-encoded
1851 * encrypted keys.
1852 *
1853 * \warning MD5 is considered a weak message digest and its use constitutes a
1854 * security risk. If possible, we recommend avoiding dependencies on
1855 * it, and considering stronger message digests instead.
1856 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001857 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001858#define MBEDTLS_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001859
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001860/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001861 * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001862 *
1863 * Enable the buffer allocator implementation that makes use of a (stack)
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +02001864 * based buffer to 'allocate' dynamic memory. (replaces calloc() and free()
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001865 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001866 *
1867 * Module: library/memory_buffer_alloc.c
1868 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001869 * Requires: MBEDTLS_PLATFORM_C
1870 * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
Paul Bakker6e339b52013-07-03 13:37:05 +02001871 *
1872 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001873 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001874//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001875
1876/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001877 * \def MBEDTLS_NET_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001878 *
1879 * Enable the TCP/IP networking routines.
1880 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001881 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001882 *
1883 * This module provides TCP/IP networking routines.
1884 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001885#define MBEDTLS_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001886
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001887/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001888 * \def MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001889 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001890 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001891 *
1892 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001893 * Caller: library/asn1write.c
1894 * library/pkcs5.c
1895 * library/pkparse.c
1896 * library/pkwrite.c
1897 * library/rsa.c
1898 * library/x509.c
1899 * library/x509_create.c
Simon Butcherf2678302016-11-04 12:23:11 +00001900 * library/x509_crl.c
1901 * library/x509_crt.c
1902 * library/x509_csr.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001903 * library/x509write_crt.c
Simon Butcherf2678302016-11-04 12:23:11 +00001904 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001905 *
1906 * This modules translates between OIDs and internal values.
1907 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001908#define MBEDTLS_OID_C
Paul Bakkerc70b9822013-04-07 22:00:46 +02001909
1910/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001911 * \def MBEDTLS_PADLOCK_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001912 *
1913 * Enable VIA Padlock support on x86.
1914 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001915 * Module: library/padlock.c
1916 * Caller: library/aes.c
1917 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001918 * Requires: MBEDTLS_HAVE_ASM
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001919 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001920 * This modules adds support for the VIA PadLock on x86.
1921 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001922#define MBEDTLS_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001923
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001924/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001925 * \def MBEDTLS_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001926 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001927 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001928 *
1929 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001930 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001931 * library/pkparse.c
Simon Butcherf2678302016-11-04 12:23:11 +00001932 * library/x509_crl.c
1933 * library/x509_crt.c
1934 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001935 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001936 * Requires: MBEDTLS_BASE64_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001937 *
Paul Bakkercff68422013-09-15 20:43:33 +02001938 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001939 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001940#define MBEDTLS_PEM_PARSE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001941
1942/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001943 * \def MBEDTLS_PEM_WRITE_C
Paul Bakkercff68422013-09-15 20:43:33 +02001944 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001945 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001946 *
1947 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001948 * Caller: library/pkwrite.c
1949 * library/x509write_crt.c
Simon Butcherf2678302016-11-04 12:23:11 +00001950 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001951 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001952 * Requires: MBEDTLS_BASE64_C
Paul Bakkercff68422013-09-15 20:43:33 +02001953 *
1954 * This modules adds support for encoding / writing PEM files.
1955 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001956#define MBEDTLS_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001957
1958/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001959 * \def MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001960 *
1961 * Enable the generic public (asymetric) key layer.
1962 *
1963 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001964 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001965 * library/ssl_cli.c
1966 * library/ssl_srv.c
1967 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001968 * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001969 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001970 * Uncomment to enable generic public key wrappers.
1971 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001972#define MBEDTLS_PK_C
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001973
1974/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001975 * \def MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001976 *
1977 * Enable the generic public (asymetric) key parser.
1978 *
1979 * Module: library/pkparse.c
Simon Butcherf2678302016-11-04 12:23:11 +00001980 * Caller: library/x509_crt.c
1981 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001982 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001983 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02001984 *
1985 * Uncomment to enable generic public key parse functions.
1986 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001987#define MBEDTLS_PK_PARSE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001988
1989/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001990 * \def MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02001991 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001992 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001993 *
1994 * Module: library/pkwrite.c
1995 * Caller: library/x509write.c
1996 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02001997 * Requires: MBEDTLS_PK_C
Paul Bakker4606c732013-09-15 17:04:23 +02001998 *
1999 * Uncomment to enable generic public key write functions.
2000 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002001#define MBEDTLS_PK_WRITE_C
Paul Bakker4606c732013-09-15 17:04:23 +02002002
2003/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002004 * \def MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02002005 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002006 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02002007 *
2008 * Module: library/pkcs5.c
2009 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002010 * Requires: MBEDTLS_MD_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02002011 *
2012 * This module adds support for the PKCS#5 functions.
2013 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002014#define MBEDTLS_PKCS5_C
Paul Bakkerb0c19a42013-06-24 19:26:38 +02002015
2016/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002017 * \def MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002018 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00002019 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00002020 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002021 * Module: library/pkcs11.c
2022 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00002023 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002024 * Requires: MBEDTLS_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002025 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00002026 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00002027 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00002028 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002029//#define MBEDTLS_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002030
2031/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002032 * \def MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002033 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002034 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002035 * Adds algorithms for parsing PKCS#8 encrypted private keys
2036 *
2037 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002038 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002039 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002040 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2041 * Can use: MBEDTLS_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002042 *
2043 * This module enables PKCS#12 functions.
2044 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002045#define MBEDTLS_PKCS12_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02002046
2047/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002048 * \def MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01002049 *
2050 * Enable the platform abstraction layer that allows you to re-assign
Manuel Pégourié-Gonnard6c0c8e02015-06-22 10:23:34 +02002051 * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
Paul Bakker747a83a2014-02-01 22:50:07 +01002052 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002053 * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
2054 * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
Rich Evans16f8cd82015-02-06 16:14:34 +00002055 * above to be specified at runtime or compile time respectively.
Paul Bakker747a83a2014-02-01 22:50:07 +01002056 *
Manuel Pégourié-Gonnard6c0c8e02015-06-22 10:23:34 +02002057 * \note This abstraction layer must be enabled on Windows (including MSYS2)
2058 * as other module rely on it for a fixed snprintf implementation.
2059 *
Paul Bakker747a83a2014-02-01 22:50:07 +01002060 * Module: library/platform.c
2061 * Caller: Most other .c files
2062 *
2063 * This module enables abstraction of common (libc) functions.
2064 */
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +02002065#define MBEDTLS_PLATFORM_C
Paul Bakker747a83a2014-02-01 22:50:07 +01002066
2067/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002068 * \def MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002069 *
2070 * Enable the RIPEMD-160 hash algorithm.
2071 *
Simon Butcherf2678302016-11-04 12:23:11 +00002072 * Module: library/ripemd160.c
2073 * Caller: library/md.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002074 *
2075 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002076#define MBEDTLS_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002077
2078/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002079 * \def MBEDTLS_RSA_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002080 *
2081 * Enable the RSA public-key cryptosystem.
2082 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002083 * Module: library/rsa.c
2084 * Caller: library/ssl_cli.c
2085 * library/ssl_srv.c
2086 * library/ssl_tls.c
2087 * library/x509.c
2088 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02002089 * This module is used by the following key exchanges:
2090 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00002091 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002092 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002093 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002094#define MBEDTLS_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002095
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002096/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002097 * \def MBEDTLS_SHA1_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002098 *
2099 * Enable the SHA1 cryptographic hash algorithm.
2100 *
Simon Butcherf2678302016-11-04 12:23:11 +00002101 * Module: library/sha1.c
2102 * Caller: library/md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002103 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002104 * library/ssl_srv.c
2105 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002106 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002107 *
Gilles Peskine955738a2017-05-04 16:17:21 +02002108 * This module is required for SSL/TLS up to version 1.1, for TLS 1.2
2109 * depending on the handshake parameters, and for SHA1-signed certificates.
Hanno Becker15e49512017-09-25 14:53:51 +01002110 *
2111 * \warning SHA-1 is considered a weak message digest and its use constitutes
2112 * a security risk. If possible, we recommend avoiding dependencies
2113 * on it, and considering stronger message digests instead.
2114 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002115 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002116#define MBEDTLS_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002117
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002118/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002119 * \def MBEDTLS_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002120 *
2121 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
2122 *
Simon Butcherf2678302016-11-04 12:23:11 +00002123 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002124 * Caller: library/entropy.c
Simon Butcherf2678302016-11-04 12:23:11 +00002125 * library/md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002126 * library/ssl_cli.c
2127 * library/ssl_srv.c
2128 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002129 *
2130 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01002131 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00002132 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002133#define MBEDTLS_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002134
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002135/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002136 * \def MBEDTLS_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002137 *
2138 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
2139 *
Simon Butcherf2678302016-11-04 12:23:11 +00002140 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002141 * Caller: library/entropy.c
Simon Butcherf2678302016-11-04 12:23:11 +00002142 * library/md.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002143 * library/ssl_cli.c
2144 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002145 *
2146 * This module adds support for SHA-384 and SHA-512.
2147 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002148#define MBEDTLS_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002149
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002150/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002151 * \def MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002152 *
2153 * Enable simple SSL cache implementation.
2154 *
2155 * Module: library/ssl_cache.c
2156 * Caller:
2157 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002158 * Requires: MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002159 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002160#define MBEDTLS_SSL_CACHE_C
Paul Bakker0a597072012-09-25 21:55:46 +00002161
2162/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002163 * \def MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002164 *
2165 * Enable basic implementation of DTLS cookies for hello verification.
2166 *
2167 * Module: library/ssl_cookie.c
2168 * Caller:
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002169 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002170#define MBEDTLS_SSL_COOKIE_C
Manuel Pégourié-Gonnarda64acd42014-07-23 18:30:45 +02002171
2172/**
Manuel Pégourié-Gonnardfd6d8972015-05-15 12:09:00 +02002173 * \def MBEDTLS_SSL_TICKET_C
2174 *
2175 * Enable an implementation of TLS server-side callbacks for session tickets.
2176 *
2177 * Module: library/ssl_ticket.c
2178 * Caller:
Manuel Pégourié-Gonnard0c0f11f2015-05-20 09:55:50 +02002179 *
Manuel Pégourié-Gonnard4214e3a2015-05-25 19:34:49 +02002180 * Requires: MBEDTLS_CIPHER_C
Manuel Pégourié-Gonnardfd6d8972015-05-15 12:09:00 +02002181 */
2182#define MBEDTLS_SSL_TICKET_C
2183
2184/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002185 * \def MBEDTLS_SSL_CLI_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002186 *
2187 * Enable the SSL/TLS client code.
2188 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002189 * Module: library/ssl_cli.c
2190 * Caller:
2191 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002192 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002193 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002194 * This module is required for SSL/TLS client support.
2195 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002196#define MBEDTLS_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002197
Paul Bakker9a736322012-11-14 12:39:52 +00002198/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002199 * \def MBEDTLS_SSL_SRV_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002200 *
2201 * Enable the SSL/TLS server code.
2202 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002203 * Module: library/ssl_srv.c
2204 * Caller:
2205 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002206 * Requires: MBEDTLS_SSL_TLS_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002207 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002208 * This module is required for SSL/TLS server support.
2209 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002210#define MBEDTLS_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002211
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002212/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002213 * \def MBEDTLS_SSL_TLS_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002214 *
Paul Bakkere29ab062011-05-18 13:26:54 +00002215 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002216 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002217 * Module: library/ssl_tls.c
2218 * Caller: library/ssl_cli.c
2219 * library/ssl_srv.c
2220 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002221 * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
2222 * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
Paul Bakker5690efc2011-05-26 13:16:06 +00002223 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002224 * This module is required for SSL/TLS.
2225 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002226#define MBEDTLS_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002227
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002228/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002229 * \def MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002230 *
2231 * Enable the threading abstraction layer.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002232 * By default mbed TLS assumes it is used in a non-threaded environment or that
Paul Bakker2466d932013-09-28 14:40:38 +02002233 * contexts are not shared between threads. If you do intend to use contexts
2234 * between threads, you will need to enable this layer to prevent race
2235 * conditions.
2236 *
2237 * Module: library/threading.c
2238 *
2239 * This allows different threading implementations (self-implemented or
2240 * provided).
2241 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002242 * You will have to enable either MBEDTLS_THREADING_ALT or
2243 * MBEDTLS_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02002244 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002245 * Enable this layer to allow use of mutexes within mbed TLS
Paul Bakker2466d932013-09-28 14:40:38 +02002246 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002247//#define MBEDTLS_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002248
2249/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002250 * \def MBEDTLS_TIMING_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002251 *
2252 * Enable the portable timing interface.
2253 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002254 * Module: library/timing.c
2255 * Caller: library/havege.c
2256 *
2257 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002258 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002259#define MBEDTLS_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002260
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002261/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002262 * \def MBEDTLS_VERSION_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002263 *
2264 * Enable run-time version information.
2265 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00002266 * Module: library/version.c
2267 *
2268 * This module provides run-time version information.
2269 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002270#define MBEDTLS_VERSION_C
Paul Bakker0a62cd12011-01-21 11:00:08 +00002271
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002272/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002273 * \def MBEDTLS_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002274 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002275 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002276 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002277 * Module: library/x509.c
Simon Butcherf2678302016-11-04 12:23:11 +00002278 * Caller: library/x509_crl.c
2279 * library/x509_crt.c
2280 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002281 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002282 * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
2283 * MBEDTLS_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002284 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002285 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00002286 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002287#define MBEDTLS_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002288
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002289/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002290 * \def MBEDTLS_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002291 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002292 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002293 *
Simon Butcherf2678302016-11-04 12:23:11 +00002294 * Module: library/x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002295 * Caller: library/ssl_cli.c
2296 * library/ssl_srv.c
2297 * library/ssl_tls.c
2298 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002299 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002300 *
2301 * This module is required for X.509 certificate parsing.
2302 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002303#define MBEDTLS_X509_CRT_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002304
2305/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002306 * \def MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002307 *
2308 * Enable X.509 CRL parsing.
2309 *
Simon Butcherf2678302016-11-04 12:23:11 +00002310 * Module: library/x509_crl.c
2311 * Caller: library/x509_crt.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002312 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002313 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002314 *
2315 * This module is required for X.509 CRL parsing.
2316 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002317#define MBEDTLS_X509_CRL_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002318
2319/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002320 * \def MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002321 *
2322 * Enable X.509 Certificate Signing Request (CSR) parsing.
2323 *
Simon Butcherf2678302016-11-04 12:23:11 +00002324 * Module: library/x509_csr.c
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002325 * Caller: library/x509_crt_write.c
2326 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002327 * Requires: MBEDTLS_X509_USE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002328 *
2329 * This module is used for reading X.509 certificate request.
2330 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002331#define MBEDTLS_X509_CSR_PARSE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002332
2333/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002334 * \def MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002335 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002336 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002337 *
2338 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002339 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002340 * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002341 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002342 * This module is the basis for creating X.509 certificates and CSRs.
2343 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002344#define MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002345
2346/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002347 * \def MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002348 *
2349 * Enable creating X.509 certificates.
2350 *
2351 * Module: library/x509_crt_write.c
2352 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002353 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002354 *
2355 * This module is required for X.509 certificate creation.
2356 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002357#define MBEDTLS_X509_CRT_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002358
2359/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002360 * \def MBEDTLS_X509_CSR_WRITE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002361 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002362 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002363 *
2364 * Module: library/x509_csr_write.c
2365 *
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002366 * Requires: MBEDTLS_X509_CREATE_C
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002367 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002368 * This module is required for X.509 certificate request writing.
2369 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002370#define MBEDTLS_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002371
2372/**
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002373 * \def MBEDTLS_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002374 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002375 * Enable the XTEA block cipher.
2376 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002377 * Module: library/xtea.c
2378 * Caller:
2379 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002380#define MBEDTLS_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002381
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002382/* \} name SECTION: mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002383
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002384/**
2385 * \name SECTION: Module configuration options
2386 *
2387 * This section allows for the setting of module specific sizes and
2388 * configuration options. The default values are already present in the
2389 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002390 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002391 * Our advice is to enable options and change their values here
2392 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002393 *
2394 * Please check the respective header file for documentation on these
2395 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002396 * \{
2397 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002398
Paul Bakker088c5c52014-04-25 11:11:10 +02002399/* MPI / BIGNUM options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002400//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2401//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002402
Paul Bakker088c5c52014-04-25 11:11:10 +02002403/* CTR_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002404//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2405//#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2406//#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2407//#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2408//#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002409
Paul Bakker088c5c52014-04-25 11:11:10 +02002410/* HMAC_DRBG options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002411//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2412//#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2413//#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2414//#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002415
Paul Bakker088c5c52014-04-25 11:11:10 +02002416/* ECP options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002417//#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2418//#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2419//#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002420
Paul Bakker088c5c52014-04-25 11:11:10 +02002421/* Entropy options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002422//#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2423//#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002424
Paul Bakker088c5c52014-04-25 11:11:10 +02002425/* Memory buffer allocator options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002426//#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002427
Paul Bakker088c5c52014-04-25 11:11:10 +02002428/* Platform options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002429//#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 +02002430//#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002431//#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2432//#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2433//#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2434//#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
Manuel Pégourié-Gonnard6c0c8e02015-06-22 10:23:34 +02002435/* Note: your snprintf must correclty zero-terminate the buffer! */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002436//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002437
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002438/* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
2439/* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
Manuel Pégourié-Gonnardb9ef1182015-05-26 16:15:20 +02002440//#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002441//#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2442//#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2443//#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2444//#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
Manuel Pégourié-Gonnard6c0c8e02015-06-22 10:23:34 +02002445/* Note: your snprintf must correclty zero-terminate the buffer! */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002446//#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002447
Paul Bakker088c5c52014-04-25 11:11:10 +02002448/* SSL Cache options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002449//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2450//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002451
Paul Bakker088c5c52014-04-25 11:11:10 +02002452/* SSL options */
Manuel Pégourié-Gonnardbb838442015-08-31 12:46:01 +02002453//#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 +02002454//#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
2455//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
2456//#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 +02002457
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002458/**
2459 * Complete list of ciphersuites to use, in order of preference.
2460 *
2461 * \warning No dependency checking is done on that field! This option can only
2462 * be used to restrict the set of available ciphersuites. It is your
2463 * responsibility to make sure the needed modules are active.
2464 *
2465 * Use this to save a few hundred bytes of ROM (default ordering of all
2466 * available ciphersuites) and a few to a few hundred bytes of RAM.
2467 *
2468 * The value below is only an example, not the default.
2469 */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002470//#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 +02002471
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002472/* X509 options */
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002473//#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002474
Gilles Peskine955738a2017-05-04 16:17:21 +02002475/**
Gilles Peskine7344e1b2017-05-12 13:16:40 +02002476 * Allow SHA-1 in the default TLS configuration for certificate signing.
2477 * Without this build-time option, SHA-1 support must be activated explicitly
2478 * through mbedtls_ssl_conf_cert_profile. Turning on this option is not
Hanno Becker15e49512017-09-25 14:53:51 +01002479 * recommended because of it is possible to generate SHA-1 collisions, however
Gilles Peskine7344e1b2017-05-12 13:16:40 +02002480 * this may be safe for legacy infrastructure where additional controls apply.
Hanno Becker15e49512017-09-25 14:53:51 +01002481 *
2482 * \warning SHA-1 is considered a weak message digest and its use constitutes
2483 * a security risk. If possible, we recommend avoiding dependencies
2484 * on it, and considering stronger message digests instead.
2485 *
Gilles Peskine955738a2017-05-04 16:17:21 +02002486 */
Gilles Peskine7344e1b2017-05-12 13:16:40 +02002487// #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES
2488
2489/**
2490 * Allow SHA-1 in the default TLS configuration for TLS 1.2 handshake
2491 * signature and ciphersuite selection. Without this build-time option, SHA-1
2492 * support must be activated explicitly through mbedtls_ssl_conf_sig_hashes.
2493 * The use of SHA-1 in TLS <= 1.1 and in HMAC-SHA-1 is always allowed by
2494 * default. At the time of writing, there is no practical attack on the use
2495 * of SHA-1 in handshake signatures, hence this option is turned on by default
Hanno Becker15e49512017-09-25 14:53:51 +01002496 * to preserve compatibility with existing peers, but the general
2497 * warning applies nonetheless:
2498 *
2499 * \warning SHA-1 is considered a weak message digest and its use constitutes
2500 * a security risk. If possible, we recommend avoiding dependencies
2501 * on it, and considering stronger message digests instead.
2502 *
Gilles Peskine7344e1b2017-05-12 13:16:40 +02002503 */
2504#define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
Gilles Peskine955738a2017-05-04 16:17:21 +02002505
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002506/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002507
Manuel Pégourié-Gonnard43569a92015-07-31 15:37:29 +02002508#if defined(TARGET_LIKE_MBED)
2509#include "mbedtls/target_config.h"
2510#endif
2511
Manuel Pégourié-Gonnard32da9f62015-07-31 15:52:30 +02002512/*
2513 * Allow user to override any previous default.
2514 *
2515 * Use two macro names for that, as:
2516 * - with yotta the prefix YOTTA_CFG_ is forced
2517 * - without yotta is looks weird to have a YOTTA prefix.
2518 */
2519#if defined(YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE)
2520#include YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE
2521#elif defined(MBEDTLS_USER_CONFIG_FILE)
2522#include MBEDTLS_USER_CONFIG_FILE
2523#endif
2524
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002525#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002526
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002527#endif /* MBEDTLS_CONFIG_H */