blob: d805624e6f2d14ec3010af38840ee4fcdfe6459d [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakker37ca75d2011-01-06 12:28:03 +00004 * \brief Configuration options (set of defines)
5 *
Manuel Pégourié-Gonnarda658a402015-01-23 09:45:19 +00006 * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
Manuel Pégourié-Gonnardfe446432015-03-06 13:17:10 +00008 * This file is part of mbed TLS (https://tls.mbed.org)
Paul Bakkerb96f1542010-07-18 20:36:00 +00009 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000010 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 *
Paul Bakker5121ce52009-01-03 21:22:43 +000024 * This set of compile-time options may be used to enable
25 * or disable features selectively, and reduce the global
26 * memory footprint.
27 */
Paul Bakker40e46942009-01-03 21:51:57 +000028#ifndef POLARSSL_CONFIG_H
29#define POLARSSL_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/**
43 * \def POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000044 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000045 * The system uses 8-bit wide native integers.
46 *
Manuel Pégourié-Gonnard23ce09b2015-04-09 14:51:51 +020047 * \deprecated The compiler should be able to generate code for 32-bit
48 * arithmetic (required by C89). This code is likely to be at least as
49 * efficient as ours.
50 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000051 * Uncomment if native integers are 8-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000052 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020053//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000054
Paul Bakkerf3b86c12011-01-27 15:24:17 +000055/**
56 * \def POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000057 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000058 * The system uses 16-bit wide native integers.
59 *
Manuel Pégourié-Gonnard23ce09b2015-04-09 14:51:51 +020060 * \deprecated The compiler should be able to generate code for 32-bit
61 * arithmetic (required by C89). This code is likely to be at least as
62 * efficient as ours.
63 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000064 * Uncomment if native integers are 16-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000065 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020066//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000067
Paul Bakkerf3b86c12011-01-27 15:24:17 +000068/**
Paul Bakker62261d62012-10-02 12:19:31 +000069 * \def POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000070 *
Paul Bakker62261d62012-10-02 12:19:31 +000071 * The compiler supports the 'long long' type.
72 * (Only used on 32-bit platforms)
Paul Bakker5121ce52009-01-03 21:22:43 +000073 */
Paul Bakker62261d62012-10-02 12:19:31 +000074#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000075
Paul Bakkerf3b86c12011-01-27 15:24:17 +000076/**
77 * \def POLARSSL_HAVE_ASM
78 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020079 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000080 *
81 * Requires support for asm() in compiler.
82 *
83 * Used in:
84 * library/timing.c
85 * library/padlock.c
86 * include/polarssl/bn_mul.h
87 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020088 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000089 */
Paul Bakker40e46942009-01-03 21:51:57 +000090#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000091
Paul Bakkerf3b86c12011-01-27 15:24:17 +000092/**
93 * \def POLARSSL_HAVE_SSE2
94 *
Paul Bakkere23c3152012-10-01 14:42:47 +000095 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000096 *
Paul Bakker5121ce52009-01-03 21:22:43 +000097 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000098 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020099//#define POLARSSL_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200100
101/**
102 * \def POLARSSL_HAVE_TIME
103 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200104 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200105 *
106 * Comment if your system does not support time functions
107 */
108#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100109
110/**
111 * \def POLARSSL_HAVE_IPV6
112 *
113 * System supports the basic socket interface for IPv6 (RFC 3493),
Manuel Pégourié-Gonnard767f02c2013-12-13 16:23:39 +0100114 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100115 *
Manuel Pégourié-Gonnard13211352013-12-17 17:38:55 +0100116 * Note: on Windows/MingW, XP or higher is required.
117 *
Manuel Pégourié-Gonnarda98af5e2015-04-09 14:40:46 +0200118 * \warning As of 1.3.11, *not* using this flag when POLARSSL_NET_C is
119 * defined, is deprecated. The alternative legacy code will be removed in 2.0.
120 *
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100121 * Comment if your system does not support the IPv6 socket interface
122 */
123#define POLARSSL_HAVE_IPV6
Paul Bakker747a83a2014-02-01 22:50:07 +0100124
125/**
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100126 * \def POLARSSL_PLATFORM_MEMORY
127 *
128 * Enable the memory allocation layer.
129 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000130 * By default mbed TLS uses the system-provided malloc() and free().
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100131 * This allows different allocators (self-implemented or provided) to be
132 * provided to the platform abstraction layer.
133 *
Rich Evans16f8cd82015-02-06 16:14:34 +0000134 * Enabling POLARSSL_PLATFORM_MEMORY without the
135 * POLARSSL_PLATFORM_{FREE,MALLOC}_MACROs will provide
136 * "platform_set_malloc_free()" allowing you to set an alternative malloc() and
137 * free() function pointer at runtime.
138 *
139 * Enabling POLARSSL_PLATFORM_MEMORY and specifying
140 * POLARSSL_PLATFORM_{MALLOC,FREE}_MACROs will allow you to specify the
141 * alternate function at compile time.
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100142 *
143 * Requires: POLARSSL_PLATFORM_C
144 *
145 * Enable this layer to allow use of alternative memory allocators.
146 */
147//#define POLARSSL_PLATFORM_MEMORY
148
149/**
Paul Bakker088c5c52014-04-25 11:11:10 +0200150 * \def POLARSSL_PLATFORM_NO_STD_FUNCTIONS
151 *
152 * Do not assign standard functions in the platform layer (e.g. malloc() to
153 * POLARSSL_PLATFORM_STD_MALLOC and printf() to POLARSSL_PLATFORM_STD_PRINTF)
154 *
155 * This makes sure there are no linking errors on platforms that do not support
156 * these functions. You will HAVE to provide alternatives, either at runtime
157 * via the platform_set_xxx() functions or at compile time by setting
Rich Evans16f8cd82015-02-06 16:14:34 +0000158 * the POLARSSL_PLATFORM_STD_XXX defines, or enabling a
159 * POLARSSL_PLATFORM_XXX_MACRO.
Paul Bakker088c5c52014-04-25 11:11:10 +0200160 *
161 * Requires: POLARSSL_PLATFORM_C
162 *
163 * Uncomment to prevent default assignment of standard functions in the
164 * platform layer.
165 */
166//#define POLARSSL_PLATFORM_NO_STD_FUNCTIONS
167
168/**
Paul Bakker747a83a2014-02-01 22:50:07 +0100169 * \def POLARSSL_PLATFORM_XXX_ALT
170 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000171 * Uncomment a macro to let mbed TLS support the function in the platform
Paul Bakker747a83a2014-02-01 22:50:07 +0100172 * abstraction layer.
173 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000174 * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, mbed TLS will
Paul Bakker747a83a2014-02-01 22:50:07 +0100175 * provide a function "platform_set_printf()" that allows you to set an
176 * alternative printf function pointer.
177 *
178 * All these define require POLARSSL_PLATFORM_C to be defined!
179 *
Rich Evans46b0a8d2015-01-30 10:47:32 +0000180 * WARNING: POLARSSL_PLATFORM_SNPRINTF_ALT is not available on Windows
181 * for compatibility reasons.
182 *
Rich Evans16f8cd82015-02-06 16:14:34 +0000183 * WARNING: POLARSSL_PLATFORM_XXX_ALT cannot be defined at the same time as
184 * POLARSSL_PLATFORM_XXX_MACRO!
185 *
Paul Bakker747a83a2014-02-01 22:50:07 +0100186 * Uncomment a macro to enable alternate implementation of specific base
187 * platform function
188 */
Rich Evansc39cb492015-01-30 12:01:34 +0000189//#define POLARSSL_PLATFORM_EXIT_ALT
Rich Evans98081c52015-02-03 11:00:54 +0000190//#define POLARSSL_PLATFORM_FPRINTF_ALT
191//#define POLARSSL_PLATFORM_PRINTF_ALT
192//#define POLARSSL_PLATFORM_SNPRINTF_ALT
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100193
194/**
195 * \def POLARSSL_DEPRECATED_WARNING
196 *
197 * Mark deprecated functions so that they generate a warning if used.
198 * Functions deprecated in one version will usually be removed in the next
199 * version. You can enable this to help you prepare the transition to a new
200 * major version by making sure your code is not using these functions.
201 *
202 * This only works with GCC and Clang. With other compilers, you may want to
203 * use POLARSSL_DEPRECATED_REMOVED
204 *
205 * Uncomment to get warnings on using deprecated functions.
206 */
207//#define POLARSSL_DEPRECATED_WARNING
208
209/**
210 * \def POLARSSL_DEPRECATED_REMOVED
211 *
212 * Remove deprecated functions so that they generate an error if used.
213 * Functions deprecated in one version will usually be removed in the next
214 * version. You can enable this to help you prepare the transition to a new
215 * major version by making sure your code is not using these functions.
216 *
217 * Uncomment to get errors on using deprecated functions.
218 */
219//#define POLARSSL_DEPRECATED_REMOVED
220
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200221/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000222
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000223/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000224 * \name SECTION: mbed TLS feature support
Paul Bakker0a62cd12011-01-21 11:00:08 +0000225 *
226 * This section sets support for features that are or are not needed
227 * within the modules that are enabled.
228 * \{
229 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000230
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000231/**
Paul Bakkerf2561b32014-02-06 15:11:55 +0100232 * \def POLARSSL_TIMING_ALT
233 *
234 * Uncomment to provide your own alternate implementation for hardclock(),
235 * get_timer(), set_alarm() and m_sleep().
236 *
237 * Only works if you have POLARSSL_TIMING_C enabled.
238 *
239 * You will need to provide a header "timing_alt.h" and an implementation at
240 * compile time.
241 */
242//#define POLARSSL_TIMING_ALT
243
244/**
Paul Bakker90995b52013-06-24 19:20:35 +0200245 * \def POLARSSL_XXX_ALT
246 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000247 * Uncomment a macro to let mbed TLS use your alternate core implementation of
Paul Bakker90995b52013-06-24 19:20:35 +0200248 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
249 * implementations). Keep in mind that the function prototypes should remain
250 * the same.
251 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000252 * Example: In case you uncomment POLARSSL_AES_ALT, mbed TLS will no longer
Paul Bakker90995b52013-06-24 19:20:35 +0200253 * provide the "struct aes_context" definition and omit the base function
254 * declarations and implementations. "aes_alt.h" will be included from
255 * "aes.h" to include the new function definitions.
256 *
257 * Uncomment a macro to enable alternate implementation for core algorithm
258 * functions
Hanno Beckerce0c9db2017-09-28 15:39:45 +0100259 *
260 * \warning MD2, MD4, MD5, ARC4, DES and SHA-1 are considered weak and their
261 * use constitutes a security risk. If possible, we recommend
262 * avoiding dependencies on them, and considering stronger message
263 * digests and ciphers instead.
264 *
Paul Bakker90995b52013-06-24 19:20:35 +0200265 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200266//#define POLARSSL_AES_ALT
267//#define POLARSSL_ARC4_ALT
268//#define POLARSSL_BLOWFISH_ALT
269//#define POLARSSL_CAMELLIA_ALT
270//#define POLARSSL_DES_ALT
271//#define POLARSSL_XTEA_ALT
272//#define POLARSSL_MD2_ALT
273//#define POLARSSL_MD4_ALT
274//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100275//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200276//#define POLARSSL_SHA1_ALT
277//#define POLARSSL_SHA256_ALT
278//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200279
280/**
Paul Bakker15566e42011-04-24 21:19:15 +0000281 * \def POLARSSL_AES_ROM_TABLES
282 *
283 * Store the AES tables in ROM.
284 *
285 * Uncomment this macro to store the AES tables in ROM.
Paul Bakker15566e42011-04-24 21:19:15 +0000286 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200287//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000288
289/**
Manuel Pégourié-Gonnarda82135c2015-04-03 16:28:19 +0200290 * \def POLARSSL_CAMELLIA_SMALL_MEMORY
291 *
292 * Use less ROM for the Camellia implementation (saves about 768 bytes).
293 *
294 * Uncomment this macro to use less memory for Camellia.
295 */
296//#define POLARSSL_CAMELLIA_SMALL_MEMORY
297
298/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200299 * \def POLARSSL_CIPHER_MODE_CBC
300 *
301 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
302 */
303#define POLARSSL_CIPHER_MODE_CBC
304
305/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000306 * \def POLARSSL_CIPHER_MODE_CFB
307 *
308 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
309 */
310#define POLARSSL_CIPHER_MODE_CFB
311
312/**
313 * \def POLARSSL_CIPHER_MODE_CTR
314 *
315 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
316 */
317#define POLARSSL_CIPHER_MODE_CTR
318
319/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000320 * \def POLARSSL_CIPHER_NULL_CIPHER
321 *
322 * Enable NULL cipher.
323 * Warning: Only do so when you know what you are doing. This allows for
324 * encryption or channels without any security!
325 *
326 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
327 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100328 * TLS_ECDH_ECDSA_WITH_NULL_SHA
329 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200330 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100331 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200332 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200333 * TLS_ECDHE_PSK_WITH_NULL_SHA256
334 * TLS_ECDHE_PSK_WITH_NULL_SHA
335 * TLS_DHE_PSK_WITH_NULL_SHA384
336 * TLS_DHE_PSK_WITH_NULL_SHA256
337 * TLS_DHE_PSK_WITH_NULL_SHA
338 * TLS_RSA_WITH_NULL_SHA256
339 * TLS_RSA_WITH_NULL_SHA
340 * TLS_RSA_WITH_NULL_MD5
341 * TLS_RSA_PSK_WITH_NULL_SHA384
342 * TLS_RSA_PSK_WITH_NULL_SHA256
343 * TLS_RSA_PSK_WITH_NULL_SHA
344 * TLS_PSK_WITH_NULL_SHA384
345 * TLS_PSK_WITH_NULL_SHA256
346 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000347 *
348 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000349 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200350//#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000351
352/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200353 * \def POLARSSL_CIPHER_PADDING_XXX
354 *
355 * Uncomment or comment macros to add support for specific padding modes
356 * in the cipher layer with cipher modes that support padding (e.g. CBC)
357 *
358 * If you disable all padding modes, only full blocks can be used with CBC.
359 *
360 * Enable padding modes in the cipher layer.
361 */
362#define POLARSSL_CIPHER_PADDING_PKCS7
363#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
364#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
365#define POLARSSL_CIPHER_PADDING_ZEROS
366
367/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000368 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
369 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200370 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000371 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000372 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000373 *
374 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000375 * TLS_RSA_WITH_DES_CBC_SHA
376 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000377 *
378 * Uncomment this macro to enable weak ciphersuites
Hanno Beckerce0c9db2017-09-28 15:39:45 +0100379 *
380 * \warning DES is considered a weak cipher and its use constitutes a
381 * security risk. We recommend considering stronger ciphers instead.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000382 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200383//#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000384
385/**
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200386 * \def POLARSSL_REMOVE_ARC4_CIPHERSUITES
387 *
388 * Remove RC4 ciphersuites by default in SSL / TLS.
389 * This flag removes the ciphersuites based on RC4 from the default list as
390 * returned by ssl_list_ciphersuites(). However, it is still possible to
391 * enable (some of) them with ssl_set_ciphersuites() by including them
392 * explicitly.
393 *
394 * Uncomment this macro to remove RC4 ciphersuites by default.
395 */
396//#define POLARSSL_REMOVE_ARC4_CIPHERSUITES
397
398/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200399 * \def POLARSSL_ECP_XXXX_ENABLED
400 *
401 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200402 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200403 *
404 * Comment macros to disable the curve and functions for it
405 */
406#define POLARSSL_ECP_DP_SECP192R1_ENABLED
407#define POLARSSL_ECP_DP_SECP224R1_ENABLED
408#define POLARSSL_ECP_DP_SECP256R1_ENABLED
409#define POLARSSL_ECP_DP_SECP384R1_ENABLED
410#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100411#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100412#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100413#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200414#define POLARSSL_ECP_DP_BP256R1_ENABLED
415#define POLARSSL_ECP_DP_BP384R1_ENABLED
416#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100417//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
418#define POLARSSL_ECP_DP_M255_ENABLED
419//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
420//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200421
422/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200423 * \def POLARSSL_ECP_NIST_OPTIM
424 *
425 * Enable specific 'modulo p' routines for each NIST prime.
426 * Depending on the prime and architecture, makes operations 4 to 8 times
427 * faster on the corresponding curve.
428 *
429 * Comment this macro to disable NIST curves optimisation.
430 */
431#define POLARSSL_ECP_NIST_OPTIM
432
433/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100434 * \def POLARSSL_ECDSA_DETERMINISTIC
435 *
436 * Enable deterministic ECDSA (RFC 6979).
437 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
438 * may result in a compromise of the long-term signing key. This is avoided by
439 * the deterministic variant.
440 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100441 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100442 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100443 * Comment this macro to disable deterministic ECDSA.
444 */
445#define POLARSSL_ECDSA_DETERMINISTIC
446
447/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200448 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
449 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200450 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200451 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200452 * This enables the following ciphersuites (if other requisites are
453 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200454 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200455 * TLS_PSK_WITH_AES_256_CBC_SHA384
456 * TLS_PSK_WITH_AES_256_CBC_SHA
457 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
458 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
459 * TLS_PSK_WITH_AES_128_GCM_SHA256
460 * TLS_PSK_WITH_AES_128_CBC_SHA256
461 * TLS_PSK_WITH_AES_128_CBC_SHA
462 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
463 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
464 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
465 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200466 */
467#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
468
469/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200470 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
471 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200472 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200473 *
474 * Requires: POLARSSL_DHM_C
475 *
476 * This enables the following ciphersuites (if other requisites are
477 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200478 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200479 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
480 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
481 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
482 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
483 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
484 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
485 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
486 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
487 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
488 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
489 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200490 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200491#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200492
493/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200494 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
495 *
496 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
497 *
498 * Requires: POLARSSL_ECDH_C
499 *
500 * This enables the following ciphersuites (if other requisites are
501 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200502 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200503 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200504 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200505 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
506 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
507 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
508 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
509 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200510 */
511#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
512
513/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200514 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
515 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200516 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200517 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200518 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200519 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200520 *
521 * This enables the following ciphersuites (if other requisites are
522 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200523 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200524 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
525 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
526 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
527 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
528 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
529 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
530 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
531 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
532 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
533 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
534 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200535 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200536#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200537
538/**
539 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
540 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200541 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200542 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200543 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200544 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200545 *
546 * This enables the following ciphersuites (if other requisites are
547 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200548 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200549 * TLS_RSA_WITH_AES_256_CBC_SHA256
550 * TLS_RSA_WITH_AES_256_CBC_SHA
551 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200552 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200553 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
554 * TLS_RSA_WITH_AES_128_GCM_SHA256
555 * TLS_RSA_WITH_AES_128_CBC_SHA256
556 * TLS_RSA_WITH_AES_128_CBC_SHA
557 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
558 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
559 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200560 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200561 * TLS_RSA_WITH_RC4_128_SHA
562 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200563 */
564#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
565
566/**
567 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
568 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200569 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200570 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200571 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200572 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200573 *
574 * This enables the following ciphersuites (if other requisites are
575 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200576 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200577 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200578 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
579 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200580 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200581 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
582 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
583 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
584 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
585 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
586 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
587 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200588 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
589 */
590#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
591
592/**
593 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
594 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200595 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200596 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200597 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200598 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200599 *
600 * This enables the following ciphersuites (if other requisites are
601 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200602 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200603 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
604 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
605 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200606 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200607 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
608 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
609 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
610 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
611 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
612 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
613 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200614 */
615#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
616
617/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200618 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
619 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200620 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200621 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200622 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200623 *
624 * This enables the following ciphersuites (if other requisites are
625 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200626 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
627 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
628 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
629 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
630 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
631 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
632 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
633 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
634 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
635 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
636 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
637 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200638 */
639#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
640
641/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100642 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
643 *
644 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
645 *
646 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
647 *
648 * This enables the following ciphersuites (if other requisites are
649 * enabled as well):
650 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
651 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
652 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
653 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
654 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
655 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
656 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
657 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
658 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
659 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
660 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
661 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
662 */
663#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
664
665/**
666 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
667 *
668 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
669 *
670 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
671 *
672 * This enables the following ciphersuites (if other requisites are
673 * enabled as well):
674 * TLS_ECDH_RSA_WITH_RC4_128_SHA
675 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
676 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
677 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
678 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
679 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
680 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
681 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
682 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
683 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
684 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
685 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
686 */
687#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
688
689/**
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100690 * \def POLARSSL_PK_PARSE_EC_EXTENDED
691 *
692 * Enhance support for reading EC keys using variants of SEC1 not allowed by
693 * RFC 5915 and RFC 5480.
694 *
695 * Currently this means parsing the SpecifiedECDomain choice of EC
696 * parameters (only known groups are supported, not arbitrary domains, to
697 * avoid validation issues).
698 *
699 * Disable if you only need to support RFC 5915 + 5480 key formats.
700 */
701#define POLARSSL_PK_PARSE_EC_EXTENDED
702
703/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200704 * \def POLARSSL_ERROR_STRERROR_BC
705 *
706 * Make available the backward compatible error_strerror() next to the
707 * current polarssl_strerror().
708 *
Manuel Pégourié-Gonnarde6581762015-03-20 17:21:21 +0000709 * \deprecated Do not define this and use polarssl_strerror() instead
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200710 *
Manuel Pégourié-Gonnarde6581762015-03-20 17:21:21 +0000711 * Disable if you want to really remove the error_strerror() name
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200712 */
713#define POLARSSL_ERROR_STRERROR_BC
714
715/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100716 * \def POLARSSL_ERROR_STRERROR_DUMMY
717 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200718 * Enable a dummy error function to make use of polarssl_strerror() in
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200719 * third party libraries easier when POLARSSL_ERROR_C is disabled
720 * (no effect when POLARSSL_ERROR_C is enabled).
721 *
722 * You can safely disable this if POLARSSL_ERROR_C is enabled, or if you're
723 * not using polarssl_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100724 *
725 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200726 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100727 */
728#define POLARSSL_ERROR_STRERROR_DUMMY
729
730/**
Paul Bakker15566e42011-04-24 21:19:15 +0000731 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000732 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200733 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200734 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200735 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000736 */
Paul Bakker15566e42011-04-24 21:19:15 +0000737#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000738
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000739/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000740 * \def POLARSSL_FS_IO
741 *
742 * Enable functions that use the filesystem.
743 */
744#define POLARSSL_FS_IO
745
746/**
Paul Bakker43655f42011-12-15 20:11:16 +0000747 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
748 *
749 * Do not add default entropy sources. These are the platform specific,
750 * hardclock and HAVEGE based poll functions.
751 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700752 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000753 * application.
754 *
755 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000756 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200757//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000758
759/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000760 * \def POLARSSL_NO_PLATFORM_ENTROPY
761 *
762 * Do not use built-in platform entropy functions.
763 * This is useful if your platform does not support
764 * standards like the /dev/urandom or Windows CryptoAPI.
765 *
766 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000767 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200768//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000769
770/**
Paul Bakker2ceda572014-02-06 15:55:25 +0100771 * \def POLARSSL_ENTROPY_FORCE_SHA256
772 *
773 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
774 * default SHA-512 based one (if both are available).
775 *
776 * Requires: POLARSSL_SHA256_C
777 *
778 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
779 * if you have performance concerns.
780 *
781 * This option is only useful if both POLARSSL_SHA256_C and
782 * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used.
783 */
784//#define POLARSSL_ENTROPY_FORCE_SHA256
785
786/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200787 * \def POLARSSL_MEMORY_DEBUG
788 *
789 * Enable debugging of buffer allocator memory issues. Automatically prints
790 * (to stderr) all (fatal) messages on memory allocation issues. Enables
791 * function for 'debug output' of allocated memory.
792 *
793 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200794 *
795 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200796 */
797//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200798
799/**
800 * \def POLARSSL_MEMORY_BACKTRACE
801 *
802 * Include backtrace information with each allocated block.
803 *
804 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
805 * GLIBC-compatible backtrace() an backtrace_symbols() support
806 *
807 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200808 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200809//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200810
811/**
Paul Bakker48377d92013-08-30 12:06:24 +0200812 * \def POLARSSL_PKCS1_V15
813 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200814 * Enable support for PKCS#1 v1.5 encoding.
815 *
Paul Bakker48377d92013-08-30 12:06:24 +0200816 * Requires: POLARSSL_RSA_C
817 *
Paul Bakker48377d92013-08-30 12:06:24 +0200818 * This enables support for PKCS#1 v1.5 operations.
819 */
820#define POLARSSL_PKCS1_V15
821
822/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000823 * \def POLARSSL_PKCS1_V21
824 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200825 * Enable support for PKCS#1 v2.1 encoding.
826 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000827 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
828 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000829 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
830 */
831#define POLARSSL_PKCS1_V21
832
833/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000834 * \def POLARSSL_RSA_NO_CRT
835 *
836 * Do not use the Chinese Remainder Theorem for the RSA private operation.
837 *
838 * Uncomment this macro to disable the use of CRT in RSA.
839 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000840 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200841//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000842
843/**
844 * \def POLARSSL_SELF_TEST
845 *
846 * Enable the checkup functions (*_self_test).
847 */
848#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000849
850/**
Paul Bakker40865c82013-01-31 17:13:13 +0100851 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
852 *
853 * Enable sending of alert messages in case of encountered errors as per RFC.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000854 * If you choose not to send the alert messages, mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100855 * with other servers, only debugging of failures is harder.
856 *
857 * The advantage of not sending alert messages, is that no information is given
858 * about reasons for failures thus preventing adversaries of gaining intel.
859 *
860 * Enable sending of all alert messages
861 */
862#define POLARSSL_SSL_ALERT_MESSAGES
863
864/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100865 * \def POLARSSL_SSL_DEBUG_ALL
866 *
867 * Enable the debug messages in SSL module for all issues.
868 * Debug messages have been disabled in some places to prevent timing
869 * attacks due to (unbalanced) debugging function calls.
870 *
871 * If you need all error reporting you should enable this during debugging,
872 * but remove this for production servers that should log as well.
873 *
874 * Uncomment this macro to report all debug messages on errors introducing
875 * a timing side-channel.
876 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100877 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200878//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100879
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100880/** \def POLARSSL_SSL_ENCRYPT_THEN_MAC
881 *
882 * Enable support for Encrypt-then-MAC, RFC 7366.
883 *
884 * This allows peers that both support it to use a more robust protection for
885 * ciphersuites using CBC, providing deep resistance against timing attacks
886 * on the padding or underlying cipher.
887 *
888 * This only affects CBC ciphersuites, and is useless if none is defined.
889 *
890 * Requires: POLARSSL_SSL_PROTO_TLS1 or
891 * POLARSSL_SSL_PROTO_TLS1_1 or
892 * POLARSSL_SSL_PROTO_TLS1_2
893 *
894 * Comment this macro to disable support for Encrypt-then-MAC
895 */
896#define POLARSSL_SSL_ENCRYPT_THEN_MAC
897
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200898/** \def POLARSSL_SSL_EXTENDED_MASTER_SECRET
899 *
900 * Enable support for Extended Master Secret, aka Session Hash
901 * (draft-ietf-tls-session-hash-02).
902 *
903 * This was introduced as "the proper fix" to the Triple Handshake familiy of
904 * attacks, but it is recommended to always use it (even if you disable
905 * renegotiation), since it actually fixes a more fundamental issue in the
906 * original SSL/TLS design, and has implications beyond Triple Handshake.
907 *
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100908 * Requires: POLARSSL_SSL_PROTO_TLS1 or
909 * POLARSSL_SSL_PROTO_TLS1_1 or
910 * POLARSSL_SSL_PROTO_TLS1_2
911 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200912 * Comment this macro to disable support for Extended Master Secret.
913 */
914#define POLARSSL_SSL_EXTENDED_MASTER_SECRET
915
Paul Bakkerd66f0702013-01-31 16:57:45 +0100916/**
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200917 * \def POLARSSL_SSL_FALLBACK_SCSV
918 *
919 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
920 *
921 * For servers, it is recommended to always enable this, unless you support
922 * only one version of TLS, or know for sure that none of your clients
923 * implements a fallback strategy.
924 *
925 * For clients, you only need this if you're using a fallback strategy, which
926 * is not recommended in the first place, unless you absolutely need it to
927 * interoperate with buggy (version-intolerant) servers.
928 *
929 * Comment this macro to disable support for FALLBACK_SCSV
930 */
931#define POLARSSL_SSL_FALLBACK_SCSV
932
933/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000934 * \def POLARSSL_SSL_HW_RECORD_ACCEL
935 *
936 * Enable hooking functions in SSL module for hardware acceleration of
937 * individual records.
938 *
939 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000940 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200941//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000942
943/**
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100944 * \def POLARSSL_SSL_CBC_RECORD_SPLITTING
945 *
946 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
947 *
948 * This is a countermeasure to the BEAST attack, which also minimizes the risk
949 * of interoperability issues compared to sending 0-length records.
950 *
951 * Comment this macro to disable 1/n-1 record splitting.
952 */
953#define POLARSSL_SSL_CBC_RECORD_SPLITTING
954
955/**
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100956 * \def POLARSSL_SSL_DISABLE_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100957 *
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100958 * Disable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100959 *
960 * The two main uses of renegotiation are (1) refresh keys on long-lived
961 * connections and (2) client authentication after the initial handshake.
962 * If you don't need renegotiation, it's probably better to disable it, since
963 * it has been associated with security issues in the past and is easy to
964 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100965 *
966 * Warning: in the next stable branch, this switch will be replaced by
967 * POLARSSL_SSL_RENEGOTIATION to enable support for renegotiation.
968 *
969 * Uncomment this to disable support for renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100970 */
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100971//#define POLARSSL_SSL_DISABLE_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100972
973/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100974 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
975 *
976 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200977 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100978 *
979 * Comment this macro to disable support for SSLv2 Client Hello messages.
980 */
981#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
982
983/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100984 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
985 *
986 * Pick the ciphersuite according to the client's preferences rather than ours
987 * in the SSL Server module (POLARSSL_SSL_SRV_C).
988 *
989 * Uncomment this macro to respect client's ciphersuite order
990 */
991//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
992
993/**
Paul Bakker05decb22013-08-15 13:33:48 +0200994 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
995 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200996 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200997 *
998 * Comment this macro to disable support for the max_fragment_length extension
999 */
1000#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
1001
1002/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001003 * \def POLARSSL_SSL_PROTO_SSL3
1004 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001005 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001006 *
1007 * Requires: POLARSSL_MD5_C
1008 * POLARSSL_SHA1_C
1009 *
1010 * Comment this macro to disable support for SSL 3.0
1011 */
Janos Follath4dfecab2016-03-14 13:40:43 +00001012//#define POLARSSL_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001013
1014/**
1015 * \def POLARSSL_SSL_PROTO_TLS1
1016 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001017 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001018 *
1019 * Requires: POLARSSL_MD5_C
1020 * POLARSSL_SHA1_C
1021 *
1022 * Comment this macro to disable support for TLS 1.0
1023 */
1024#define POLARSSL_SSL_PROTO_TLS1
1025
1026/**
1027 * \def POLARSSL_SSL_PROTO_TLS1_1
1028 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001029 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001030 *
1031 * Requires: POLARSSL_MD5_C
1032 * POLARSSL_SHA1_C
1033 *
1034 * Comment this macro to disable support for TLS 1.1
1035 */
1036#define POLARSSL_SSL_PROTO_TLS1_1
1037
1038/**
1039 * \def POLARSSL_SSL_PROTO_TLS1_2
1040 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001041 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001042 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01001043 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001044 * (Depends on ciphersuites)
1045 *
1046 * Comment this macro to disable support for TLS 1.2
1047 */
1048#define POLARSSL_SSL_PROTO_TLS1_2
1049
1050/**
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001051 * \def POLARSSL_SSL_ALPN
1052 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +01001053 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001054 *
Paul Bakker27e36d32014-04-08 12:33:37 +02001055 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001056 */
Paul Bakker27e36d32014-04-08 12:33:37 +02001057#define POLARSSL_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001058
1059/**
Paul Bakkera503a632013-08-14 13:48:06 +02001060 * \def POLARSSL_SSL_SESSION_TICKETS
1061 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001062 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +02001063 *
1064 * Requires: POLARSSL_AES_C
1065 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001066 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +02001067 *
1068 * Comment this macro to disable support for SSL session tickets
1069 */
1070#define POLARSSL_SSL_SESSION_TICKETS
1071
1072/**
Paul Bakker0be444a2013-08-27 21:55:01 +02001073 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
1074 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001075 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +02001076 *
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +00001077 * Requires: POLARSSL_X509_CRT_PARSE_C
1078 *
Paul Bakker0be444a2013-08-27 21:55:01 +02001079 * Comment this macro to disable support for server name indication in SSL
1080 */
1081#define POLARSSL_SSL_SERVER_NAME_INDICATION
1082
1083/**
Paul Bakker1f2bc622013-08-15 13:45:55 +02001084 * \def POLARSSL_SSL_TRUNCATED_HMAC
1085 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001086 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +02001087 *
1088 * Comment this macro to disable support for truncated HMAC in SSL
1089 */
1090#define POLARSSL_SSL_TRUNCATED_HMAC
1091
1092/**
Simon Butcher14400c82016-01-02 00:08:13 +00001093 * \def POLARSSL_SSL_ENABLE_MD5_SIGNATURES
1094 *
1095 * Offer, accept and do MD5-based signatures in the TLS 1.2 handshake.
1096 * Has no effect on which algorithms are accepted for certificates.
1097 * Has no effect on other SSL/TLS versions.
1098 *
1099 * \warning Enabling this could be a security risk!
1100 *
1101 * Uncomment to enable MD5 signatures in TLS 1.2
1102 */
1103//#define POLARSSL_SSL_ENABLE_MD5_SIGNATURES
1104
1105/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001106 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001107 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001108 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001109 *
1110 * This is disabled by default since it breaks binary compatibility with the
1111 * 1.3.x line. If you choose to enable it, you will need to rebuild your
1112 * application against the new header files, relinking will not be enough.
1113 * It will be enabled by default, or no longer an option, in the 1.4 branch.
1114 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001115 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001116 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +01001117//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001118
1119/**
Paul Bakker2466d932013-09-28 14:40:38 +02001120 * \def POLARSSL_THREADING_ALT
1121 *
1122 * Provide your own alternate threading implementation.
1123 *
1124 * Requires: POLARSSL_THREADING_C
1125 *
1126 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +02001127 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001128//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001129
1130/**
Paul Bakker2466d932013-09-28 14:40:38 +02001131 * \def POLARSSL_THREADING_PTHREAD
1132 *
1133 * Enable the pthread wrapper layer for the threading layer.
1134 *
1135 * Requires: POLARSSL_THREADING_C
1136 *
1137 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +02001138 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001139//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001140
1141/**
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001142 * \def POLARSSL_VERSION_FEATURES
1143 *
1144 * Allow run-time checking of compile-time enabled features. Thus allowing users
1145 * to check at run-time if the library is for instance compiled with threading
1146 * support via version_check_feature().
1147 *
1148 * Requires: POLARSSL_VERSION_C
1149 *
1150 * Comment this to disable run-time checking and save ROM space
1151 */
1152#define POLARSSL_VERSION_FEATURES
1153
1154/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001155 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
1156 *
1157 * If set, the X509 parser will not break-off when parsing an X509 certificate
1158 * and encountering an extension in a v1 or v2 certificate.
1159 *
1160 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001161 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001162//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001163
1164/**
Paul Bakker5c721f92011-07-27 16:51:09 +00001165 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1166 *
1167 * If set, the X509 parser will not break-off when parsing an X509 certificate
1168 * and encountering an unknown critical extension.
1169 *
Manuel Pégourié-Gonnardded3ae52015-10-05 12:12:39 +01001170 * \warning Depending on your PKI use, enabling this can be a security risk!
1171 *
Paul Bakker5c721f92011-07-27 16:51:09 +00001172 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +00001173 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001174//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +00001175
1176/**
Janos Follath17da9dd2016-09-19 09:35:18 +01001177 * \def POLARSSL_X509_ALLOW_RELAXED_DATE
1178 *
1179 * If set, the X509 parser will not break-off when parsing an X509 certificate
1180 * and encountering ASN.1 UTCTime or ASN.1 GeneralizedTime without seconds or
1181 * with a time zone.
1182 *
1183 * Uncomment to prevent an error.
1184 */
1185//#define POLARSSL_X509_ALLOW_RELAXED_DATE
1186
1187/**
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001188 * \def POLARSSL_X509_CHECK_KEY_USAGE
1189 *
1190 * Enable verification of the keyUsage extension (CA and leaf certificates).
1191 *
1192 * Disabling this avoids problems with mis-issued and/or misused
1193 * (intermediate) CA and leaf certificates.
1194 *
1195 * \warning Depending on your PKI use, disabling this can be a security risk!
1196 *
1197 * Comment to skip keyUsage checking for both CA and leaf certificates.
1198 */
1199#define POLARSSL_X509_CHECK_KEY_USAGE
1200
1201/**
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001202 * \def POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1203 *
1204 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1205 *
1206 * Disabling this avoids problems with mis-issued and/or misused certificates.
1207 *
1208 * \warning Depending on your PKI use, disabling this can be a security risk!
1209 *
1210 * Comment to skip extendedKeyUsage checking for certificates.
1211 */
1212#define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1213
1214/**
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001215 * \def POLARSSL_X509_RSASSA_PSS_SUPPORT
1216 *
1217 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1218 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1219 *
1220 * Comment this macro to disallow using RSASSA-PSS in certificates.
1221 */
1222#define POLARSSL_X509_RSASSA_PSS_SUPPORT
1223
1224/**
Paul Bakker2770fbd2012-07-03 13:30:23 +00001225 * \def POLARSSL_ZLIB_SUPPORT
1226 *
1227 * If set, the SSL/TLS module uses ZLIB to support compression and
1228 * decompression of packet data.
1229 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001230 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1231 * CRIME attack. Before enabling this option, you should examine with care if
1232 * CRIME or similar exploits may be a applicable to your use case.
1233 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001234 * Used in: library/ssl_tls.c
1235 * library/ssl_cli.c
1236 * library/ssl_srv.c
1237 *
1238 * This feature requires zlib library and headers to be present.
1239 *
1240 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001241 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001242//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001243/* \} name SECTION: mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001244
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001245/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001246 * \name SECTION: mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +00001247 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001248 * This section enables or disables entire modules in mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +00001249 * \{
1250 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001251
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001252/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001253 * \def POLARSSL_AESNI_C
1254 *
1255 * Enable AES-NI support on x86-64.
1256 *
1257 * Module: library/aesni.c
1258 * Caller: library/aes.c
1259 *
1260 * Requires: POLARSSL_HAVE_ASM
1261 *
1262 * This modules adds support for the AES-NI instructions on x86-64
1263 */
1264#define POLARSSL_AESNI_C
1265
1266/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001267 * \def POLARSSL_AES_C
1268 *
1269 * Enable the AES block cipher.
1270 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001271 * Module: library/aes.c
1272 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001273 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001274 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001275 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001276 * This module enables the following ciphersuites (if other requisites are
1277 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001278 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1279 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1280 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1281 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1282 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1283 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1284 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1285 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1286 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1287 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1288 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1289 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001290 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1291 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1292 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1293 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1294 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001295 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001296 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001297 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001298 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1299 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1300 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1301 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1302 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1303 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1304 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1305 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1306 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1307 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1308 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1309 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1310 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1311 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1312 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1313 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1314 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1315 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1316 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1317 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1318 * TLS_RSA_WITH_AES_256_GCM_SHA384
1319 * TLS_RSA_WITH_AES_256_CBC_SHA256
1320 * TLS_RSA_WITH_AES_256_CBC_SHA
1321 * TLS_RSA_WITH_AES_128_GCM_SHA256
1322 * TLS_RSA_WITH_AES_128_CBC_SHA256
1323 * TLS_RSA_WITH_AES_128_CBC_SHA
1324 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1325 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1326 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1327 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1328 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1329 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1330 * TLS_PSK_WITH_AES_256_GCM_SHA384
1331 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001332 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001333 * TLS_PSK_WITH_AES_128_GCM_SHA256
1334 * TLS_PSK_WITH_AES_128_CBC_SHA256
1335 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001336 *
Paul Bakkercff68422013-09-15 20:43:33 +02001337 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001338 */
Paul Bakker40e46942009-01-03 21:51:57 +00001339#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001340
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001341/**
1342 * \def POLARSSL_ARC4_C
1343 *
1344 * Enable the ARCFOUR stream cipher.
1345 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001346 * Module: library/arc4.c
1347 * Caller: library/ssl_tls.c
1348 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001349 * This module enables the following ciphersuites (if other requisites are
1350 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001351 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1352 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001353 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001354 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001355 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1356 * TLS_DHE_PSK_WITH_RC4_128_SHA
1357 * TLS_RSA_WITH_RC4_128_SHA
1358 * TLS_RSA_WITH_RC4_128_MD5
1359 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001360 * TLS_PSK_WITH_RC4_128_SHA
Hanno Beckerce0c9db2017-09-28 15:39:45 +01001361 *
1362 * \warning ARC4 is considered a weak cipher and its use constitutes a
1363 * security risk. If possible, we recommend avoiding dependencies on
1364 * it, and considering stronger ciphers instead.
1365 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001366 */
Paul Bakker40e46942009-01-03 21:51:57 +00001367#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001368
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001369/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001370 * \def POLARSSL_ASN1_PARSE_C
1371 *
1372 * Enable the generic ASN1 parser.
1373 *
1374 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001375 * Caller: library/x509.c
1376 * library/dhm.c
1377 * library/pkcs12.c
1378 * library/pkcs5.c
1379 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001380 */
1381#define POLARSSL_ASN1_PARSE_C
1382
1383/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001384 * \def POLARSSL_ASN1_WRITE_C
1385 *
1386 * Enable the generic ASN1 writer.
1387 *
1388 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001389 * Caller: library/ecdsa.c
1390 * library/pkwrite.c
1391 * library/x509_create.c
1392 * library/x509write_crt.c
1393 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001394 */
1395#define POLARSSL_ASN1_WRITE_C
1396
1397/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001398 * \def POLARSSL_BASE64_C
1399 *
1400 * Enable the Base64 module.
1401 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001402 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001403 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001404 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001405 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001406 */
Paul Bakker40e46942009-01-03 21:51:57 +00001407#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001408
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001409/**
1410 * \def POLARSSL_BIGNUM_C
1411 *
Paul Bakker9a736322012-11-14 12:39:52 +00001412 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001413 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001414 * Module: library/bignum.c
1415 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001416 * library/ecp.c
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001417 * library/ecdsa.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001418 * library/rsa.c
1419 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001420 *
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001421 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
Paul Bakker5121ce52009-01-03 21:22:43 +00001422 */
Paul Bakker40e46942009-01-03 21:51:57 +00001423#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001424
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001425/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001426 * \def POLARSSL_BLOWFISH_C
1427 *
1428 * Enable the Blowfish block cipher.
1429 *
1430 * Module: library/blowfish.c
1431 */
1432#define POLARSSL_BLOWFISH_C
1433
1434/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001435 * \def POLARSSL_CAMELLIA_C
1436 *
1437 * Enable the Camellia block cipher.
1438 *
Paul Bakker38119b12009-01-10 23:31:23 +00001439 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001440 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001441 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001442 * This module enables the following ciphersuites (if other requisites are
1443 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001444 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1445 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1446 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1447 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1448 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1449 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1450 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1451 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001452 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1453 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1454 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1455 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1456 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001457 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001458 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1459 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1460 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1461 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1462 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1463 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1464 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1465 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1466 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1467 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1468 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1469 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1470 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1471 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1472 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1473 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1474 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1475 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1476 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1477 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1478 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1479 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1480 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1481 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1482 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1483 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1484 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1485 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001486 */
1487#define POLARSSL_CAMELLIA_C
1488
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001489/**
Paul Bakker64a96ea2014-05-22 15:13:02 +02001490 * \def POLARSSL_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001491 *
1492 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1493 *
1494 * Module: library/ccm.c
1495 *
1496 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
1497 *
1498 * This module enables the AES-CCM ciphersuites, if other requisites are
1499 * enabled as well.
1500 */
1501#define POLARSSL_CCM_C
1502
1503/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001504 * \def POLARSSL_CERTS_C
1505 *
1506 * Enable the test certificates.
1507 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001508 * Module: library/certs.c
1509 * Caller:
1510 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001511 * Requires: POLARSSL_PEM_PARSE_C
1512 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001513 * This module is used for testing (ssl_client/server).
1514 */
Paul Bakker40e46942009-01-03 21:51:57 +00001515#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001516
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001517/**
1518 * \def POLARSSL_CIPHER_C
1519 *
1520 * Enable the generic cipher layer.
1521 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001522 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001523 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001524 *
1525 * Uncomment to enable generic cipher wrappers.
1526 */
1527#define POLARSSL_CIPHER_C
1528
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001529/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001530 * \def POLARSSL_CTR_DRBG_C
1531 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001532 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001533 *
1534 * Module: library/ctr_drbg.c
1535 * Caller:
1536 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001537 * Requires: POLARSSL_AES_C
1538 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001539 * This module provides the CTR_DRBG AES-256 random number generator.
1540 */
1541#define POLARSSL_CTR_DRBG_C
1542
1543/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001544 * \def POLARSSL_DEBUG_C
1545 *
1546 * Enable the debug functions.
1547 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001548 * Module: library/debug.c
1549 * Caller: library/ssl_cli.c
1550 * library/ssl_srv.c
1551 * library/ssl_tls.c
1552 *
1553 * This module provides debugging functions.
1554 */
Paul Bakker40e46942009-01-03 21:51:57 +00001555#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001556
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001557/**
1558 * \def POLARSSL_DES_C
1559 *
1560 * Enable the DES block cipher.
1561 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001562 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001563 * Caller: library/pem.c
1564 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001565 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001566 * This module enables the following ciphersuites (if other requisites are
1567 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001568 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1569 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001570 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001571 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001572 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1573 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1574 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1575 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1576 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001577 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001578 *
Paul Bakkercff68422013-09-15 20:43:33 +02001579 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Hanno Beckerce0c9db2017-09-28 15:39:45 +01001580 *
1581 * \warning DES is considered a weak cipher and its use constitutes a
1582 * security risk. We recommend considering stronger ciphers instead.
Paul Bakker5121ce52009-01-03 21:22:43 +00001583 */
Paul Bakker40e46942009-01-03 21:51:57 +00001584#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001585
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001586/**
1587 * \def POLARSSL_DHM_C
1588 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001589 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001590 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001591 * Module: library/dhm.c
1592 * Caller: library/ssl_cli.c
1593 * library/ssl_srv.c
1594 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001595 * This module is used by the following key exchanges:
1596 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001597 */
Paul Bakker40e46942009-01-03 21:51:57 +00001598#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001599
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001600/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001601 * \def POLARSSL_ECDH_C
1602 *
1603 * Enable the elliptic curve Diffie-Hellman library.
1604 *
1605 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001606 * Caller: library/ssl_cli.c
1607 * library/ssl_srv.c
1608 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001609 * This module is used by the following key exchanges:
1610 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001611 *
1612 * Requires: POLARSSL_ECP_C
1613 */
1614#define POLARSSL_ECDH_C
1615
1616/**
1617 * \def POLARSSL_ECDSA_C
1618 *
1619 * Enable the elliptic curve DSA library.
1620 *
1621 * Module: library/ecdsa.c
1622 * Caller:
1623 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001624 * This module is used by the following key exchanges:
1625 * ECDHE-ECDSA
1626 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001627 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001628 */
1629#define POLARSSL_ECDSA_C
1630
1631/**
1632 * \def POLARSSL_ECP_C
1633 *
1634 * Enable the elliptic curve over GF(p) library.
1635 *
1636 * Module: library/ecp.c
1637 * Caller: library/ecdh.c
1638 * library/ecdsa.c
1639 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001640 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001641 */
1642#define POLARSSL_ECP_C
1643
1644/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001645 * \def POLARSSL_ENTROPY_C
1646 *
1647 * Enable the platform-specific entropy code.
1648 *
1649 * Module: library/entropy.c
1650 * Caller:
1651 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001652 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001653 *
1654 * This module provides a generic entropy pool
1655 */
1656#define POLARSSL_ENTROPY_C
1657
1658/**
Paul Bakker9d781402011-05-09 16:17:09 +00001659 * \def POLARSSL_ERROR_C
1660 *
1661 * Enable error code to error string conversion.
1662 *
1663 * Module: library/error.c
1664 * Caller:
1665 *
Shuo Chen95a0d112014-04-04 21:04:40 -07001666 * This module enables polarssl_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001667 */
1668#define POLARSSL_ERROR_C
1669
1670/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001671 * \def POLARSSL_GCM_C
1672 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001673 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001674 *
1675 * Module: library/gcm.c
1676 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001677 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001678 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001679 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1680 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001681 */
1682#define POLARSSL_GCM_C
1683
1684/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001685 * \def POLARSSL_HAVEGE_C
1686 *
1687 * Enable the HAVEGE random generator.
1688 *
Paul Bakker2a844242013-06-24 13:01:53 +02001689 * Warning: the HAVEGE random generator is not suitable for virtualized
1690 * environments
1691 *
1692 * Warning: the HAVEGE random generator is dependent on timing and specific
1693 * processor traits. It is therefore not advised to use HAVEGE as
1694 * your applications primary random generator or primary entropy pool
1695 * input. As a secondary input to your entropy pool, it IS able add
1696 * the (limited) extra entropy it provides.
1697 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001698 * Module: library/havege.c
1699 * Caller:
1700 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001701 * Requires: POLARSSL_TIMING_C
1702 *
Paul Bakker2a844242013-06-24 13:01:53 +02001703 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001704 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001705//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001706
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001707/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001708 * \def POLARSSL_HMAC_DRBG_C
1709 *
1710 * Enable the HMAC_DRBG random generator.
1711 *
1712 * Module: library/hmac_drbg.c
1713 * Caller:
1714 *
1715 * Requires: POLARSSL_MD_C
1716 *
1717 * Uncomment to enable the HMAC_DRBG random number geerator.
1718 */
1719#define POLARSSL_HMAC_DRBG_C
1720
1721/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001722 * \def POLARSSL_MD_C
1723 *
1724 * Enable the generic message digest layer.
1725 *
Paul Bakker17373852011-01-06 14:20:01 +00001726 * Module: library/md.c
1727 * Caller:
1728 *
1729 * Uncomment to enable generic message digest wrappers.
1730 */
1731#define POLARSSL_MD_C
1732
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001733/**
1734 * \def POLARSSL_MD2_C
1735 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001736 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001737 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001738 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001739 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001740 *
1741 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Hanno Beckerce0c9db2017-09-28 15:39:45 +01001742 *
1743 * \warning MD2 is considered a weak message digest and its use constitutes a
1744 * security risk. If possible, we recommend avoiding dependencies on
1745 * it, and considering stronger message digests instead.
1746 *
Paul Bakker6506aff2009-07-28 20:52:02 +00001747 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001748//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001749
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001750/**
1751 * \def POLARSSL_MD4_C
1752 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001753 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001754 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001755 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001756 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001757 *
1758 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Hanno Beckerce0c9db2017-09-28 15:39:45 +01001759 *
1760 * \warning MD4 is considered a weak message digest and its use constitutes a
1761 * security risk. If possible, we recommend avoiding dependencies on
1762 * it, and considering stronger message digests instead.
1763 *
Paul Bakker6506aff2009-07-28 20:52:02 +00001764 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001765//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001766
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001767/**
1768 * \def POLARSSL_MD5_C
1769 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001770 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001771 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001772 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001773 * Caller: library/md.c
1774 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001775 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001776 *
Hanno Beckerce0c9db2017-09-28 15:39:45 +01001777 * This module is required for SSL/TLS up to version 1.1, and it can be used in
1778 * TLS 1.2 through the choice on handshake parameters. Further, it is used for
1779 * checking MD5-signed certificates, and for PBKDF1 when decrypting PEM-encoded
1780 * encrypted keys.
1781 *
1782 * \warning MD5 is considered a weak message digest and its use constitutes a
1783 * security risk. If possible, we recommend avoiding dependencies on
1784 * it, and considering stronger message digests instead.
1785 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001786 */
Paul Bakker40e46942009-01-03 21:51:57 +00001787#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001788
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001789/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001790 * \def POLARSSL_MEMORY_C
Manuel Pégourié-Gonnard71432842015-03-20 16:19:35 +00001791 *
1792 * \deprecated Use POLARSSL_PLATFORM_MEMORY instead.
1793 *
Manuel Pégourié-Gonnard0a155b82015-01-23 17:28:27 +00001794 * Depends on: POLARSSL_PLATFORM_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001795 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001796//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001797
1798/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001799 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1800 *
1801 * Enable the buffer allocator implementation that makes use of a (stack)
1802 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1803 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001804 *
1805 * Module: library/memory_buffer_alloc.c
1806 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001807 * Requires: POLARSSL_PLATFORM_C
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001808 * POLARSSL_PLATFORM_MEMORY (to use it within mbed TLS)
Paul Bakker6e339b52013-07-03 13:37:05 +02001809 *
1810 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001811 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001812//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001813
1814/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001815 * \def POLARSSL_NET_C
1816 *
1817 * Enable the TCP/IP networking routines.
1818 *
Manuel Pégourié-Gonnarda98af5e2015-04-09 14:40:46 +02001819 * \warning As of 1.3.11, it is deprecated to enable this module without
1820 * POLARSSL_HAVE_IPV6. The alternative legacy code will be removed in 2.0.
1821 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001822 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001823 *
1824 * This module provides TCP/IP networking routines.
1825 */
Paul Bakker40e46942009-01-03 21:51:57 +00001826#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001827
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001828/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001829 * \def POLARSSL_OID_C
1830 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001831 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001832 *
1833 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001834 * Caller: library/asn1write.c
1835 * library/pkcs5.c
1836 * library/pkparse.c
1837 * library/pkwrite.c
1838 * library/rsa.c
1839 * library/x509.c
1840 * library/x509_create.c
1841 * library/x509_crl.c
1842 * library/x509_crt.c
1843 * library/x509_csr.c
1844 * library/x509write_crt.c
1845 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001846 *
1847 * This modules translates between OIDs and internal values.
1848 */
1849#define POLARSSL_OID_C
1850
1851/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001852 * \def POLARSSL_PADLOCK_C
1853 *
1854 * Enable VIA Padlock support on x86.
1855 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001856 * Module: library/padlock.c
1857 * Caller: library/aes.c
1858 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001859 * Requires: POLARSSL_HAVE_ASM
1860 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001861 * This modules adds support for the VIA PadLock on x86.
1862 */
Paul Bakker40e46942009-01-03 21:51:57 +00001863#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001864
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001865/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001866 * \def POLARSSL_PBKDF2_C
1867 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001868 * Enable PKCS#5 PBKDF2 key derivation function.
Manuel Pégourié-Gonnard71432842015-03-20 16:19:35 +00001869 *
1870 * \deprecated Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001871 *
1872 * Module: library/pbkdf2.c
1873 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001874 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001875 *
1876 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001877 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001878#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001879
1880/**
Paul Bakkercff68422013-09-15 20:43:33 +02001881 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001882 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001883 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001884 *
1885 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001886 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001887 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001888 * library/x509_crl.c
1889 * library/x509_crt.c
1890 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001891 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001892 * Requires: POLARSSL_BASE64_C
1893 *
Paul Bakkercff68422013-09-15 20:43:33 +02001894 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001895 */
Paul Bakkercff68422013-09-15 20:43:33 +02001896#define POLARSSL_PEM_PARSE_C
1897
1898/**
1899 * \def POLARSSL_PEM_WRITE_C
1900 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001901 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001902 *
1903 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001904 * Caller: library/pkwrite.c
1905 * library/x509write_crt.c
1906 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001907 *
1908 * Requires: POLARSSL_BASE64_C
1909 *
1910 * This modules adds support for encoding / writing PEM files.
1911 */
1912#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001913
1914/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001915 * \def POLARSSL_PK_C
1916 *
1917 * Enable the generic public (asymetric) key layer.
1918 *
1919 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001920 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001921 * library/ssl_cli.c
1922 * library/ssl_srv.c
1923 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001924 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1925 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001926 * Uncomment to enable generic public key wrappers.
1927 */
1928#define POLARSSL_PK_C
1929
1930/**
Paul Bakker4606c732013-09-15 17:04:23 +02001931 * \def POLARSSL_PK_PARSE_C
1932 *
1933 * Enable the generic public (asymetric) key parser.
1934 *
1935 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001936 * Caller: library/x509_crt.c
1937 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001938 *
1939 * Requires: POLARSSL_PK_C
1940 *
1941 * Uncomment to enable generic public key parse functions.
1942 */
1943#define POLARSSL_PK_PARSE_C
1944
1945/**
1946 * \def POLARSSL_PK_WRITE_C
1947 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001948 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001949 *
1950 * Module: library/pkwrite.c
1951 * Caller: library/x509write.c
1952 *
1953 * Requires: POLARSSL_PK_C
1954 *
1955 * Uncomment to enable generic public key write functions.
1956 */
1957#define POLARSSL_PK_WRITE_C
1958
1959/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001960 * \def POLARSSL_PKCS5_C
1961 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001962 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001963 *
1964 * Module: library/pkcs5.c
1965 *
1966 * Requires: POLARSSL_MD_C
1967 *
1968 * This module adds support for the PKCS#5 functions.
1969 */
1970#define POLARSSL_PKCS5_C
1971
1972/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001973 * \def POLARSSL_PKCS11_C
1974 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001975 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001976 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001977 * Module: library/pkcs11.c
1978 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001979 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001980 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001981 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001982 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001983 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001984 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001985//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001986
1987/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001988 * \def POLARSSL_PKCS12_C
1989 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001990 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001991 * Adds algorithms for parsing PKCS#8 encrypted private keys
1992 *
1993 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001994 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001995 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001996 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1997 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001998 *
1999 * This module enables PKCS#12 functions.
2000 */
2001#define POLARSSL_PKCS12_C
2002
2003/**
Paul Bakker747a83a2014-02-01 22:50:07 +01002004 * \def POLARSSL_PLATFORM_C
2005 *
2006 * Enable the platform abstraction layer that allows you to re-assign
Rich Evansc39cb492015-01-30 12:01:34 +00002007 * functions like malloc(), free(), snprintf(), printf(), fprintf(), exit()
Paul Bakker747a83a2014-02-01 22:50:07 +01002008 *
Rich Evans16f8cd82015-02-06 16:14:34 +00002009 * Enabling POLARSSL_PLATFORM_C enables to use of POLARSSL_PLATFORM_XXX_ALT
2010 * or POLARSSL_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
2011 * above to be specified at runtime or compile time respectively.
2012 *
Paul Bakker747a83a2014-02-01 22:50:07 +01002013 * Module: library/platform.c
2014 * Caller: Most other .c files
2015 *
2016 * This module enables abstraction of common (libc) functions.
2017 */
2018#define POLARSSL_PLATFORM_C
2019
2020/**
Paul Bakker61b699e2014-01-22 13:35:29 +01002021 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002022 *
2023 * Enable the RIPEMD-160 hash algorithm.
2024 *
Paul Bakker61b699e2014-01-22 13:35:29 +01002025 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002026 * Caller: library/md.c
2027 *
2028 */
Paul Bakker61b699e2014-01-22 13:35:29 +01002029#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01002030
2031/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002032 * \def POLARSSL_RSA_C
2033 *
2034 * Enable the RSA public-key cryptosystem.
2035 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002036 * Module: library/rsa.c
2037 * Caller: library/ssl_cli.c
2038 * library/ssl_srv.c
2039 * library/ssl_tls.c
2040 * library/x509.c
2041 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02002042 * This module is used by the following key exchanges:
2043 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00002044 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02002045 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002046 */
Paul Bakker40e46942009-01-03 21:51:57 +00002047#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002048
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002049/**
2050 * \def POLARSSL_SHA1_C
2051 *
2052 * Enable the SHA1 cryptographic hash algorithm.
2053 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002054 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002055 * Caller: library/md.c
2056 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002057 * library/ssl_srv.c
2058 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002059 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002060 *
2061 * This module is required for SSL/TLS and SHA1-signed certificates.
Hanno Beckerce0c9db2017-09-28 15:39:45 +01002062 *
2063 * \warning SHA-1 is considered a weak message digest and its use constitutes
2064 * a security risk. If possible, we recommend avoiding dependencies
2065 * on it, and considering stronger message digests instead.
2066 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002067 */
Paul Bakker40e46942009-01-03 21:51:57 +00002068#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002069
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002070/**
Paul Bakker9e36f042013-06-30 14:34:05 +02002071 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002072 *
2073 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02002074 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002075 *
Paul Bakker9e36f042013-06-30 14:34:05 +02002076 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002077 * Caller: library/entropy.c
2078 * library/md.c
2079 * library/ssl_cli.c
2080 * library/ssl_srv.c
2081 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002082 *
2083 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01002084 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00002085 */
Paul Bakker9e36f042013-06-30 14:34:05 +02002086#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002087
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002088/**
Paul Bakker9e36f042013-06-30 14:34:05 +02002089 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002090 *
2091 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02002092 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002093 *
Paul Bakker9e36f042013-06-30 14:34:05 +02002094 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002095 * Caller: library/entropy.c
2096 * library/md.c
2097 * library/ssl_cli.c
2098 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002099 *
2100 * This module adds support for SHA-384 and SHA-512.
2101 */
Paul Bakker9e36f042013-06-30 14:34:05 +02002102#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002103
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002104/**
Paul Bakker0a597072012-09-25 21:55:46 +00002105 * \def POLARSSL_SSL_CACHE_C
2106 *
2107 * Enable simple SSL cache implementation.
2108 *
2109 * Module: library/ssl_cache.c
2110 * Caller:
2111 *
2112 * Requires: POLARSSL_SSL_CACHE_C
2113 */
2114#define POLARSSL_SSL_CACHE_C
2115
2116/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002117 * \def POLARSSL_SSL_CLI_C
2118 *
2119 * Enable the SSL/TLS client code.
2120 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002121 * Module: library/ssl_cli.c
2122 * Caller:
2123 *
Paul Bakker5690efc2011-05-26 13:16:06 +00002124 * Requires: POLARSSL_SSL_TLS_C
2125 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002126 * This module is required for SSL/TLS client support.
2127 */
Paul Bakker40e46942009-01-03 21:51:57 +00002128#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002129
Paul Bakker9a736322012-11-14 12:39:52 +00002130/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002131 * \def POLARSSL_SSL_SRV_C
2132 *
2133 * Enable the SSL/TLS server code.
2134 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002135 * Module: library/ssl_srv.c
2136 * Caller:
2137 *
Paul Bakker5690efc2011-05-26 13:16:06 +00002138 * Requires: POLARSSL_SSL_TLS_C
2139 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002140 * This module is required for SSL/TLS server support.
2141 */
Paul Bakker40e46942009-01-03 21:51:57 +00002142#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002143
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002144/**
2145 * \def POLARSSL_SSL_TLS_C
2146 *
Paul Bakkere29ab062011-05-18 13:26:54 +00002147 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002148 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002149 * Module: library/ssl_tls.c
2150 * Caller: library/ssl_cli.c
2151 * library/ssl_srv.c
2152 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002153 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02002154 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00002155 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002156 * This module is required for SSL/TLS.
2157 */
Paul Bakker40e46942009-01-03 21:51:57 +00002158#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002159
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002160/**
Paul Bakker2466d932013-09-28 14:40:38 +02002161 * \def POLARSSL_THREADING_C
2162 *
2163 * Enable the threading abstraction layer.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002164 * By default mbed TLS assumes it is used in a non-threaded environment or that
Paul Bakker2466d932013-09-28 14:40:38 +02002165 * contexts are not shared between threads. If you do intend to use contexts
2166 * between threads, you will need to enable this layer to prevent race
2167 * conditions.
2168 *
2169 * Module: library/threading.c
2170 *
2171 * This allows different threading implementations (self-implemented or
2172 * provided).
2173 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01002174 * You will have to enable either POLARSSL_THREADING_ALT or
2175 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02002176 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002177 * Enable this layer to allow use of mutexes within mbed TLS
Paul Bakker2466d932013-09-28 14:40:38 +02002178 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02002179//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002180
2181/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002182 * \def POLARSSL_TIMING_C
2183 *
2184 * Enable the portable timing interface.
2185 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002186 * Module: library/timing.c
2187 * Caller: library/havege.c
2188 *
2189 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002190 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02002191#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002192
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002193/**
2194 * \def POLARSSL_VERSION_C
2195 *
2196 * Enable run-time version information.
2197 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00002198 * Module: library/version.c
2199 *
2200 * This module provides run-time version information.
2201 */
2202#define POLARSSL_VERSION_C
2203
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002204/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002205 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002206 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002207 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002208 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002209 * Module: library/x509.c
2210 * Caller: library/x509_crl.c
2211 * library/x509_crt.c
2212 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002213 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02002214 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02002215 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002216 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002217 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00002218 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002219#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002220
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002221/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002222 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002223 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002224 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002225 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002226 * Module: library/x509_crt.c
2227 * Caller: library/ssl_cli.c
2228 * library/ssl_srv.c
2229 * library/ssl_tls.c
2230 *
2231 * Requires: POLARSSL_X509_USE_C
2232 *
2233 * This module is required for X.509 certificate parsing.
2234 */
2235#define POLARSSL_X509_CRT_PARSE_C
2236
2237/**
2238 * \def POLARSSL_X509_CRL_PARSE_C
2239 *
2240 * Enable X.509 CRL parsing.
2241 *
2242 * Module: library/x509_crl.c
2243 * Caller: library/x509_crt.c
2244 *
2245 * Requires: POLARSSL_X509_USE_C
2246 *
2247 * This module is required for X.509 CRL parsing.
2248 */
2249#define POLARSSL_X509_CRL_PARSE_C
2250
2251/**
2252 * \def POLARSSL_X509_CSR_PARSE_C
2253 *
2254 * Enable X.509 Certificate Signing Request (CSR) parsing.
2255 *
2256 * Module: library/x509_csr.c
2257 * Caller: library/x509_crt_write.c
2258 *
2259 * Requires: POLARSSL_X509_USE_C
2260 *
2261 * This module is used for reading X.509 certificate request.
2262 */
2263#define POLARSSL_X509_CSR_PARSE_C
2264
2265/**
2266 * \def POLARSSL_X509_CREATE_C
2267 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002268 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002269 *
2270 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002271 *
Paul Bakker4606c732013-09-15 17:04:23 +02002272 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002273 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002274 * This module is the basis for creating X.509 certificates and CSRs.
2275 */
2276#define POLARSSL_X509_CREATE_C
2277
2278/**
2279 * \def POLARSSL_X509_CRT_WRITE_C
2280 *
2281 * Enable creating X.509 certificates.
2282 *
2283 * Module: library/x509_crt_write.c
2284 *
2285 * Requires: POLARSSL_CREATE_C
2286 *
2287 * This module is required for X.509 certificate creation.
2288 */
2289#define POLARSSL_X509_CRT_WRITE_C
2290
2291/**
2292 * \def POLARSSL_X509_CSR_WRITE_C
2293 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002294 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002295 *
2296 * Module: library/x509_csr_write.c
2297 *
2298 * Requires: POLARSSL_CREATE_C
2299 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002300 * This module is required for X.509 certificate request writing.
2301 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002302#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002303
2304/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002305 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002306 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002307 * Enable the XTEA block cipher.
2308 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002309 * Module: library/xtea.c
2310 * Caller:
2311 */
2312#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002313
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002314/* \} name SECTION: mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002315
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002316/**
2317 * \name SECTION: Module configuration options
2318 *
2319 * This section allows for the setting of module specific sizes and
2320 * configuration options. The default values are already present in the
2321 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002322 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002323 * Our advice is to enable options and change their values here
2324 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002325 *
2326 * Please check the respective header file for documentation on these
2327 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002328 * \{
2329 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002330
Paul Bakker088c5c52014-04-25 11:11:10 +02002331/* MPI / BIGNUM options */
2332//#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
Manuel Pégourié-Gonnardda1b4de2014-09-08 17:03:50 +02002333//#define POLARSSL_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002334
Paul Bakker088c5c52014-04-25 11:11:10 +02002335/* CTR_DRBG options */
2336//#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2337//#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2338//#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2339//#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2340//#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002341
Paul Bakker088c5c52014-04-25 11:11:10 +02002342/* HMAC_DRBG options */
2343//#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2344//#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2345//#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2346//#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002347
Paul Bakker088c5c52014-04-25 11:11:10 +02002348/* ECP options */
2349//#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2350//#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2351//#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002352
Paul Bakker088c5c52014-04-25 11:11:10 +02002353/* Entropy options */
2354//#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2355//#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002356
Paul Bakker088c5c52014-04-25 11:11:10 +02002357/* Memory buffer allocator options */
Manuel Pégourié-Gonnard4d8db4a2014-05-05 14:04:28 +02002358//#define POLARSSL_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002359
Paul Bakker088c5c52014-04-25 11:11:10 +02002360/* Platform options */
Rich Evans98081c52015-02-03 11:00:54 +00002361//#define POLARSSL_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if POLARSSL_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */
2362//#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2363//#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2364//#define POLARSSL_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2365//#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2366//#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
Rich Evansc39cb492015-01-30 12:01:34 +00002367//#define POLARSSL_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002368
Manuel Pégourié-Gonnardfb57e642015-03-05 13:38:29 +00002369/* To Use Function Macros POLARSSL_PLATFORM_C must be enabled */
2370/* POLARSSL_PLATFORM_XXX_MACRO and POLARSSL_PLATFORM_XXX_ALT cannot both be defined */
Rich Evans4cc8a222015-02-03 11:26:31 +00002371//#define POLARSSL_PLATFORM_MALLOC_MACRO malloc /**< Default allocator macro to use, can be undefined */
2372//#define POLARSSL_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2373//#define POLARSSL_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2374//#define POLARSSL_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2375//#define POLARSSL_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
2376//#define POLARSSL_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
2377
Paul Bakker088c5c52014-04-25 11:11:10 +02002378/* SSL Cache options */
2379//#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2380//#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002381
Paul Bakker088c5c52014-04-25 11:11:10 +02002382/* SSL options */
2383//#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Manuel Pégourié-Gonnard9ea1b232015-06-29 15:27:52 +02002384//#define SSL_MIN_DHM_BYTES 128 /**< Min size of the Diffie-Hellman prime */
Paul Bakker088c5c52014-04-25 11:11:10 +02002385//#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Manuel Pégourié-Gonnard481fcfd2014-07-03 16:12:50 +02002386//#define POLARSSL_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002387
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002388/**
2389 * Complete list of ciphersuites to use, in order of preference.
2390 *
2391 * \warning No dependency checking is done on that field! This option can only
2392 * be used to restrict the set of available ciphersuites. It is your
2393 * responsibility to make sure the needed modules are active.
2394 *
2395 * Use this to save a few hundred bytes of ROM (default ordering of all
2396 * available ciphersuites) and a few to a few hundred bytes of RAM.
2397 *
2398 * The value below is only an example, not the default.
2399 */
2400//#define SSL_CIPHERSUITES TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
2401
Paul Bakkereaebbd52014-04-25 15:04:14 +02002402/* Debug options */
2403//#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */
2404
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002405/* X509 options */
2406//#define POLARSSL_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
2407
Manuel Pégourié-Gonnard48ed5502017-06-08 17:27:20 +02002408/**
2409 * \def POLARSSL_X509_MIN_VERIFY_MD_ALG
2410 *
2411 * Minimal hash algorithm accepted in X.509 chain verification.
2412 *
2413 * The value should be one of the enumerations in md_type_t defined in md.h
2414 * Only algorithms with a value equal or higher are accepted.
2415 *
2416 * typedef enum {
2417 * POLARSSL_MD_NONE=0,
2418 * POLARSSL_MD_MD2,
2419 * POLARSSL_MD_MD4,
2420 * POLARSSL_MD_MD5,
2421 * POLARSSL_MD_SHA1,
2422 * POLARSSL_MD_SHA224,
2423 * POLARSSL_MD_SHA256,
2424 * POLARSSL_MD_SHA384,
2425 * POLARSSL_MD_SHA512,
2426 * POLARSSL_MD_RIPEMD160,
2427 * } md_type_t;
2428 */
2429//#define POLARSSL_X509_MIN_VERIFY_MD_ALG POLARSSL_MD_SHA1
2430
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002431/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002432
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002433#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002434
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002435#endif /* POLARSSL_CONFIG_H */