blob: 60d96ec6568a94f04ed534e7fa77cabcaadfd9ed [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
Paul Bakker90995b52013-06-24 19:20:35 +0200259 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200260//#define POLARSSL_AES_ALT
261//#define POLARSSL_ARC4_ALT
262//#define POLARSSL_BLOWFISH_ALT
263//#define POLARSSL_CAMELLIA_ALT
264//#define POLARSSL_DES_ALT
265//#define POLARSSL_XTEA_ALT
266//#define POLARSSL_MD2_ALT
267//#define POLARSSL_MD4_ALT
268//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100269//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200270//#define POLARSSL_SHA1_ALT
271//#define POLARSSL_SHA256_ALT
272//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200273
274/**
Paul Bakker15566e42011-04-24 21:19:15 +0000275 * \def POLARSSL_AES_ROM_TABLES
276 *
277 * Store the AES tables in ROM.
278 *
279 * Uncomment this macro to store the AES tables in ROM.
Paul Bakker15566e42011-04-24 21:19:15 +0000280 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200281//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000282
283/**
Manuel Pégourié-Gonnarda82135c2015-04-03 16:28:19 +0200284 * \def POLARSSL_CAMELLIA_SMALL_MEMORY
285 *
286 * Use less ROM for the Camellia implementation (saves about 768 bytes).
287 *
288 * Uncomment this macro to use less memory for Camellia.
289 */
290//#define POLARSSL_CAMELLIA_SMALL_MEMORY
291
292/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200293 * \def POLARSSL_CIPHER_MODE_CBC
294 *
295 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
296 */
297#define POLARSSL_CIPHER_MODE_CBC
298
299/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000300 * \def POLARSSL_CIPHER_MODE_CFB
301 *
302 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
303 */
304#define POLARSSL_CIPHER_MODE_CFB
305
306/**
307 * \def POLARSSL_CIPHER_MODE_CTR
308 *
309 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
310 */
311#define POLARSSL_CIPHER_MODE_CTR
312
313/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000314 * \def POLARSSL_CIPHER_NULL_CIPHER
315 *
316 * Enable NULL cipher.
317 * Warning: Only do so when you know what you are doing. This allows for
318 * encryption or channels without any security!
319 *
320 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
321 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100322 * TLS_ECDH_ECDSA_WITH_NULL_SHA
323 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200324 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100325 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200326 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200327 * TLS_ECDHE_PSK_WITH_NULL_SHA256
328 * TLS_ECDHE_PSK_WITH_NULL_SHA
329 * TLS_DHE_PSK_WITH_NULL_SHA384
330 * TLS_DHE_PSK_WITH_NULL_SHA256
331 * TLS_DHE_PSK_WITH_NULL_SHA
332 * TLS_RSA_WITH_NULL_SHA256
333 * TLS_RSA_WITH_NULL_SHA
334 * TLS_RSA_WITH_NULL_MD5
335 * TLS_RSA_PSK_WITH_NULL_SHA384
336 * TLS_RSA_PSK_WITH_NULL_SHA256
337 * TLS_RSA_PSK_WITH_NULL_SHA
338 * TLS_PSK_WITH_NULL_SHA384
339 * TLS_PSK_WITH_NULL_SHA256
340 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000341 *
342 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000343 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200344//#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000345
346/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200347 * \def POLARSSL_CIPHER_PADDING_XXX
348 *
349 * Uncomment or comment macros to add support for specific padding modes
350 * in the cipher layer with cipher modes that support padding (e.g. CBC)
351 *
352 * If you disable all padding modes, only full blocks can be used with CBC.
353 *
354 * Enable padding modes in the cipher layer.
355 */
356#define POLARSSL_CIPHER_PADDING_PKCS7
357#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
358#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
359#define POLARSSL_CIPHER_PADDING_ZEROS
360
361/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000362 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
363 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200364 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000365 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000366 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000367 *
368 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000369 * TLS_RSA_WITH_DES_CBC_SHA
370 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000371 *
372 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000373 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200374//#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000375
376/**
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200377 * \def POLARSSL_REMOVE_ARC4_CIPHERSUITES
378 *
379 * Remove RC4 ciphersuites by default in SSL / TLS.
380 * This flag removes the ciphersuites based on RC4 from the default list as
381 * returned by ssl_list_ciphersuites(). However, it is still possible to
382 * enable (some of) them with ssl_set_ciphersuites() by including them
383 * explicitly.
384 *
385 * Uncomment this macro to remove RC4 ciphersuites by default.
386 */
387//#define POLARSSL_REMOVE_ARC4_CIPHERSUITES
388
389/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200390 * \def POLARSSL_ECP_XXXX_ENABLED
391 *
392 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200393 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200394 *
395 * Comment macros to disable the curve and functions for it
396 */
397#define POLARSSL_ECP_DP_SECP192R1_ENABLED
398#define POLARSSL_ECP_DP_SECP224R1_ENABLED
399#define POLARSSL_ECP_DP_SECP256R1_ENABLED
400#define POLARSSL_ECP_DP_SECP384R1_ENABLED
401#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100402#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100403#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100404#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200405#define POLARSSL_ECP_DP_BP256R1_ENABLED
406#define POLARSSL_ECP_DP_BP384R1_ENABLED
407#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100408//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
409#define POLARSSL_ECP_DP_M255_ENABLED
410//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
411//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200412
413/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200414 * \def POLARSSL_ECP_NIST_OPTIM
415 *
416 * Enable specific 'modulo p' routines for each NIST prime.
417 * Depending on the prime and architecture, makes operations 4 to 8 times
418 * faster on the corresponding curve.
419 *
420 * Comment this macro to disable NIST curves optimisation.
421 */
422#define POLARSSL_ECP_NIST_OPTIM
423
424/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100425 * \def POLARSSL_ECDSA_DETERMINISTIC
426 *
427 * Enable deterministic ECDSA (RFC 6979).
428 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
429 * may result in a compromise of the long-term signing key. This is avoided by
430 * the deterministic variant.
431 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100432 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100433 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100434 * Comment this macro to disable deterministic ECDSA.
435 */
436#define POLARSSL_ECDSA_DETERMINISTIC
437
438/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200439 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
440 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200441 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200442 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200443 * This enables the following ciphersuites (if other requisites are
444 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200445 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200446 * TLS_PSK_WITH_AES_256_CBC_SHA384
447 * TLS_PSK_WITH_AES_256_CBC_SHA
448 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
449 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
450 * TLS_PSK_WITH_AES_128_GCM_SHA256
451 * TLS_PSK_WITH_AES_128_CBC_SHA256
452 * TLS_PSK_WITH_AES_128_CBC_SHA
453 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
454 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
455 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
456 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200457 */
458#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
459
460/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200461 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
462 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200463 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200464 *
465 * Requires: POLARSSL_DHM_C
466 *
467 * This enables the following ciphersuites (if other requisites are
468 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200469 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200470 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
471 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
472 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
473 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
474 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
475 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
476 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
477 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
478 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
479 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
480 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200481 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200482#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200483
484/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200485 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
486 *
487 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
488 *
489 * Requires: POLARSSL_ECDH_C
490 *
491 * This enables the following ciphersuites (if other requisites are
492 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200493 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200494 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200495 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200496 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
497 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
498 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
499 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
500 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200501 */
502#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
503
504/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200505 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
506 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200507 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200508 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200509 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200510 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200511 *
512 * This enables the following ciphersuites (if other requisites are
513 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200514 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200515 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
516 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
517 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
518 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
519 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
520 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
521 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
522 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
523 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
524 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
525 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200526 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200527#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200528
529/**
530 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
531 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200532 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200533 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200534 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200535 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200536 *
537 * This enables the following ciphersuites (if other requisites are
538 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200539 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200540 * TLS_RSA_WITH_AES_256_CBC_SHA256
541 * TLS_RSA_WITH_AES_256_CBC_SHA
542 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200543 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200544 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
545 * TLS_RSA_WITH_AES_128_GCM_SHA256
546 * TLS_RSA_WITH_AES_128_CBC_SHA256
547 * TLS_RSA_WITH_AES_128_CBC_SHA
548 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
549 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
550 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200551 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200552 * TLS_RSA_WITH_RC4_128_SHA
553 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200554 */
555#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
556
557/**
558 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
559 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200560 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200561 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200562 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200563 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200564 *
565 * This enables the following ciphersuites (if other requisites are
566 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200567 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200568 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200569 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
570 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200571 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200572 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
573 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
574 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
575 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
576 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
577 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
578 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200579 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
580 */
581#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
582
583/**
584 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
585 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200586 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200587 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200588 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200589 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200590 *
591 * This enables the following ciphersuites (if other requisites are
592 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200593 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200594 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
595 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
596 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200597 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200598 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
599 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
600 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
601 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
602 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
603 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
604 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200605 */
606#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
607
608/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200609 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
610 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200611 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200612 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200613 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200614 *
615 * This enables the following ciphersuites (if other requisites are
616 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200617 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
618 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
619 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
620 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
621 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
622 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
623 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
624 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
625 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
626 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
627 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
628 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200629 */
630#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
631
632/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100633 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
634 *
635 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
636 *
637 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
638 *
639 * This enables the following ciphersuites (if other requisites are
640 * enabled as well):
641 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
642 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
643 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
644 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
645 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
646 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
647 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
648 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
649 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
650 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
651 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
652 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
653 */
654#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
655
656/**
657 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
658 *
659 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
660 *
661 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
662 *
663 * This enables the following ciphersuites (if other requisites are
664 * enabled as well):
665 * TLS_ECDH_RSA_WITH_RC4_128_SHA
666 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
667 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
668 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
669 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
670 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
671 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
672 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
673 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
674 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
675 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
676 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
677 */
678#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
679
680/**
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100681 * \def POLARSSL_PK_PARSE_EC_EXTENDED
682 *
683 * Enhance support for reading EC keys using variants of SEC1 not allowed by
684 * RFC 5915 and RFC 5480.
685 *
686 * Currently this means parsing the SpecifiedECDomain choice of EC
687 * parameters (only known groups are supported, not arbitrary domains, to
688 * avoid validation issues).
689 *
690 * Disable if you only need to support RFC 5915 + 5480 key formats.
691 */
692#define POLARSSL_PK_PARSE_EC_EXTENDED
693
694/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200695 * \def POLARSSL_ERROR_STRERROR_BC
696 *
697 * Make available the backward compatible error_strerror() next to the
698 * current polarssl_strerror().
699 *
Manuel Pégourié-Gonnarde6581762015-03-20 17:21:21 +0000700 * \deprecated Do not define this and use polarssl_strerror() instead
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200701 *
Manuel Pégourié-Gonnarde6581762015-03-20 17:21:21 +0000702 * Disable if you want to really remove the error_strerror() name
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200703 */
704#define POLARSSL_ERROR_STRERROR_BC
705
706/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100707 * \def POLARSSL_ERROR_STRERROR_DUMMY
708 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200709 * Enable a dummy error function to make use of polarssl_strerror() in
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200710 * third party libraries easier when POLARSSL_ERROR_C is disabled
711 * (no effect when POLARSSL_ERROR_C is enabled).
712 *
713 * You can safely disable this if POLARSSL_ERROR_C is enabled, or if you're
714 * not using polarssl_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100715 *
716 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200717 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100718 */
719#define POLARSSL_ERROR_STRERROR_DUMMY
720
721/**
Paul Bakker15566e42011-04-24 21:19:15 +0000722 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000723 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200724 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200725 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200726 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000727 */
Paul Bakker15566e42011-04-24 21:19:15 +0000728#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000729
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000730/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000731 * \def POLARSSL_FS_IO
732 *
733 * Enable functions that use the filesystem.
734 */
735#define POLARSSL_FS_IO
736
737/**
Paul Bakker43655f42011-12-15 20:11:16 +0000738 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
739 *
740 * Do not add default entropy sources. These are the platform specific,
741 * hardclock and HAVEGE based poll functions.
742 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700743 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000744 * application.
745 *
746 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000747 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200748//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000749
750/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000751 * \def POLARSSL_NO_PLATFORM_ENTROPY
752 *
753 * Do not use built-in platform entropy functions.
754 * This is useful if your platform does not support
755 * standards like the /dev/urandom or Windows CryptoAPI.
756 *
757 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000758 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200759//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000760
761/**
Paul Bakker2ceda572014-02-06 15:55:25 +0100762 * \def POLARSSL_ENTROPY_FORCE_SHA256
763 *
764 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
765 * default SHA-512 based one (if both are available).
766 *
767 * Requires: POLARSSL_SHA256_C
768 *
769 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
770 * if you have performance concerns.
771 *
772 * This option is only useful if both POLARSSL_SHA256_C and
773 * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used.
774 */
775//#define POLARSSL_ENTROPY_FORCE_SHA256
776
777/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200778 * \def POLARSSL_MEMORY_DEBUG
779 *
780 * Enable debugging of buffer allocator memory issues. Automatically prints
781 * (to stderr) all (fatal) messages on memory allocation issues. Enables
782 * function for 'debug output' of allocated memory.
783 *
784 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200785 *
786 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200787 */
788//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200789
790/**
791 * \def POLARSSL_MEMORY_BACKTRACE
792 *
793 * Include backtrace information with each allocated block.
794 *
795 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
796 * GLIBC-compatible backtrace() an backtrace_symbols() support
797 *
798 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200799 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200800//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200801
802/**
Paul Bakker48377d92013-08-30 12:06:24 +0200803 * \def POLARSSL_PKCS1_V15
804 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200805 * Enable support for PKCS#1 v1.5 encoding.
806 *
Paul Bakker48377d92013-08-30 12:06:24 +0200807 * Requires: POLARSSL_RSA_C
808 *
Paul Bakker48377d92013-08-30 12:06:24 +0200809 * This enables support for PKCS#1 v1.5 operations.
810 */
811#define POLARSSL_PKCS1_V15
812
813/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000814 * \def POLARSSL_PKCS1_V21
815 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200816 * Enable support for PKCS#1 v2.1 encoding.
817 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000818 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
819 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000820 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
821 */
822#define POLARSSL_PKCS1_V21
823
824/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000825 * \def POLARSSL_RSA_NO_CRT
826 *
827 * Do not use the Chinese Remainder Theorem for the RSA private operation.
828 *
829 * Uncomment this macro to disable the use of CRT in RSA.
830 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000831 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200832//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000833
834/**
835 * \def POLARSSL_SELF_TEST
836 *
837 * Enable the checkup functions (*_self_test).
838 */
839#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000840
841/**
Paul Bakker40865c82013-01-31 17:13:13 +0100842 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
843 *
844 * Enable sending of alert messages in case of encountered errors as per RFC.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000845 * If you choose not to send the alert messages, mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100846 * with other servers, only debugging of failures is harder.
847 *
848 * The advantage of not sending alert messages, is that no information is given
849 * about reasons for failures thus preventing adversaries of gaining intel.
850 *
851 * Enable sending of all alert messages
852 */
853#define POLARSSL_SSL_ALERT_MESSAGES
854
855/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100856 * \def POLARSSL_SSL_DEBUG_ALL
857 *
858 * Enable the debug messages in SSL module for all issues.
859 * Debug messages have been disabled in some places to prevent timing
860 * attacks due to (unbalanced) debugging function calls.
861 *
862 * If you need all error reporting you should enable this during debugging,
863 * but remove this for production servers that should log as well.
864 *
865 * Uncomment this macro to report all debug messages on errors introducing
866 * a timing side-channel.
867 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100868 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200869//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100870
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100871/** \def POLARSSL_SSL_ENCRYPT_THEN_MAC
872 *
873 * Enable support for Encrypt-then-MAC, RFC 7366.
874 *
875 * This allows peers that both support it to use a more robust protection for
876 * ciphersuites using CBC, providing deep resistance against timing attacks
877 * on the padding or underlying cipher.
878 *
879 * This only affects CBC ciphersuites, and is useless if none is defined.
880 *
881 * Requires: POLARSSL_SSL_PROTO_TLS1 or
882 * POLARSSL_SSL_PROTO_TLS1_1 or
883 * POLARSSL_SSL_PROTO_TLS1_2
884 *
885 * Comment this macro to disable support for Encrypt-then-MAC
886 */
887#define POLARSSL_SSL_ENCRYPT_THEN_MAC
888
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200889/** \def POLARSSL_SSL_EXTENDED_MASTER_SECRET
890 *
891 * Enable support for Extended Master Secret, aka Session Hash
892 * (draft-ietf-tls-session-hash-02).
893 *
894 * This was introduced as "the proper fix" to the Triple Handshake familiy of
895 * attacks, but it is recommended to always use it (even if you disable
896 * renegotiation), since it actually fixes a more fundamental issue in the
897 * original SSL/TLS design, and has implications beyond Triple Handshake.
898 *
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100899 * Requires: POLARSSL_SSL_PROTO_TLS1 or
900 * POLARSSL_SSL_PROTO_TLS1_1 or
901 * POLARSSL_SSL_PROTO_TLS1_2
902 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200903 * Comment this macro to disable support for Extended Master Secret.
904 */
905#define POLARSSL_SSL_EXTENDED_MASTER_SECRET
906
Paul Bakkerd66f0702013-01-31 16:57:45 +0100907/**
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200908 * \def POLARSSL_SSL_FALLBACK_SCSV
909 *
910 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
911 *
912 * For servers, it is recommended to always enable this, unless you support
913 * only one version of TLS, or know for sure that none of your clients
914 * implements a fallback strategy.
915 *
916 * For clients, you only need this if you're using a fallback strategy, which
917 * is not recommended in the first place, unless you absolutely need it to
918 * interoperate with buggy (version-intolerant) servers.
919 *
920 * Comment this macro to disable support for FALLBACK_SCSV
921 */
922#define POLARSSL_SSL_FALLBACK_SCSV
923
924/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000925 * \def POLARSSL_SSL_HW_RECORD_ACCEL
926 *
927 * Enable hooking functions in SSL module for hardware acceleration of
928 * individual records.
929 *
930 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000931 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200932//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000933
934/**
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100935 * \def POLARSSL_SSL_CBC_RECORD_SPLITTING
936 *
937 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
938 *
939 * This is a countermeasure to the BEAST attack, which also minimizes the risk
940 * of interoperability issues compared to sending 0-length records.
941 *
942 * Comment this macro to disable 1/n-1 record splitting.
943 */
944#define POLARSSL_SSL_CBC_RECORD_SPLITTING
945
946/**
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100947 * \def POLARSSL_SSL_DISABLE_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100948 *
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100949 * Disable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100950 *
951 * The two main uses of renegotiation are (1) refresh keys on long-lived
952 * connections and (2) client authentication after the initial handshake.
953 * If you don't need renegotiation, it's probably better to disable it, since
954 * it has been associated with security issues in the past and is easy to
955 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100956 *
957 * Warning: in the next stable branch, this switch will be replaced by
958 * POLARSSL_SSL_RENEGOTIATION to enable support for renegotiation.
959 *
960 * Uncomment this to disable support for renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100961 */
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100962//#define POLARSSL_SSL_DISABLE_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100963
964/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100965 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
966 *
967 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200968 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100969 *
970 * Comment this macro to disable support for SSLv2 Client Hello messages.
971 */
972#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
973
974/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100975 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
976 *
977 * Pick the ciphersuite according to the client's preferences rather than ours
978 * in the SSL Server module (POLARSSL_SSL_SRV_C).
979 *
980 * Uncomment this macro to respect client's ciphersuite order
981 */
982//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
983
984/**
Paul Bakker05decb22013-08-15 13:33:48 +0200985 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
986 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200987 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200988 *
989 * Comment this macro to disable support for the max_fragment_length extension
990 */
991#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
992
993/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200994 * \def POLARSSL_SSL_PROTO_SSL3
995 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200996 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200997 *
998 * Requires: POLARSSL_MD5_C
999 * POLARSSL_SHA1_C
1000 *
1001 * Comment this macro to disable support for SSL 3.0
1002 */
Janos Follath4dfecab2016-03-14 13:40:43 +00001003//#define POLARSSL_SSL_PROTO_SSL3
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001004
1005/**
1006 * \def POLARSSL_SSL_PROTO_TLS1
1007 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001008 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001009 *
1010 * Requires: POLARSSL_MD5_C
1011 * POLARSSL_SHA1_C
1012 *
1013 * Comment this macro to disable support for TLS 1.0
1014 */
1015#define POLARSSL_SSL_PROTO_TLS1
1016
1017/**
1018 * \def POLARSSL_SSL_PROTO_TLS1_1
1019 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001020 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001021 *
1022 * Requires: POLARSSL_MD5_C
1023 * POLARSSL_SHA1_C
1024 *
1025 * Comment this macro to disable support for TLS 1.1
1026 */
1027#define POLARSSL_SSL_PROTO_TLS1_1
1028
1029/**
1030 * \def POLARSSL_SSL_PROTO_TLS1_2
1031 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001032 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001033 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01001034 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001035 * (Depends on ciphersuites)
1036 *
1037 * Comment this macro to disable support for TLS 1.2
1038 */
1039#define POLARSSL_SSL_PROTO_TLS1_2
1040
1041/**
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001042 * \def POLARSSL_SSL_ALPN
1043 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +01001044 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001045 *
Paul Bakker27e36d32014-04-08 12:33:37 +02001046 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001047 */
Paul Bakker27e36d32014-04-08 12:33:37 +02001048#define POLARSSL_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001049
1050/**
Paul Bakkera503a632013-08-14 13:48:06 +02001051 * \def POLARSSL_SSL_SESSION_TICKETS
1052 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001053 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +02001054 *
1055 * Requires: POLARSSL_AES_C
1056 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001057 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +02001058 *
1059 * Comment this macro to disable support for SSL session tickets
1060 */
1061#define POLARSSL_SSL_SESSION_TICKETS
1062
1063/**
Paul Bakker0be444a2013-08-27 21:55:01 +02001064 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
1065 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001066 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +02001067 *
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +00001068 * Requires: POLARSSL_X509_CRT_PARSE_C
1069 *
Paul Bakker0be444a2013-08-27 21:55:01 +02001070 * Comment this macro to disable support for server name indication in SSL
1071 */
1072#define POLARSSL_SSL_SERVER_NAME_INDICATION
1073
1074/**
Paul Bakker1f2bc622013-08-15 13:45:55 +02001075 * \def POLARSSL_SSL_TRUNCATED_HMAC
1076 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001077 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +02001078 *
1079 * Comment this macro to disable support for truncated HMAC in SSL
1080 */
1081#define POLARSSL_SSL_TRUNCATED_HMAC
1082
1083/**
Simon Butcher14400c82016-01-02 00:08:13 +00001084 * \def POLARSSL_SSL_ENABLE_MD5_SIGNATURES
1085 *
1086 * Offer, accept and do MD5-based signatures in the TLS 1.2 handshake.
1087 * Has no effect on which algorithms are accepted for certificates.
1088 * Has no effect on other SSL/TLS versions.
1089 *
1090 * \warning Enabling this could be a security risk!
1091 *
1092 * Uncomment to enable MD5 signatures in TLS 1.2
1093 */
1094//#define POLARSSL_SSL_ENABLE_MD5_SIGNATURES
1095
1096/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001097 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001098 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001099 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001100 *
1101 * This is disabled by default since it breaks binary compatibility with the
1102 * 1.3.x line. If you choose to enable it, you will need to rebuild your
1103 * application against the new header files, relinking will not be enough.
1104 * It will be enabled by default, or no longer an option, in the 1.4 branch.
1105 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001106 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001107 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +01001108//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001109
1110/**
Paul Bakker2466d932013-09-28 14:40:38 +02001111 * \def POLARSSL_THREADING_ALT
1112 *
1113 * Provide your own alternate threading implementation.
1114 *
1115 * Requires: POLARSSL_THREADING_C
1116 *
1117 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +02001118 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001119//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001120
1121/**
Paul Bakker2466d932013-09-28 14:40:38 +02001122 * \def POLARSSL_THREADING_PTHREAD
1123 *
1124 * Enable the pthread wrapper layer for the threading layer.
1125 *
1126 * Requires: POLARSSL_THREADING_C
1127 *
1128 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +02001129 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001130//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001131
1132/**
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001133 * \def POLARSSL_VERSION_FEATURES
1134 *
1135 * Allow run-time checking of compile-time enabled features. Thus allowing users
1136 * to check at run-time if the library is for instance compiled with threading
1137 * support via version_check_feature().
1138 *
1139 * Requires: POLARSSL_VERSION_C
1140 *
1141 * Comment this to disable run-time checking and save ROM space
1142 */
1143#define POLARSSL_VERSION_FEATURES
1144
1145/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001146 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
1147 *
1148 * If set, the X509 parser will not break-off when parsing an X509 certificate
1149 * and encountering an extension in a v1 or v2 certificate.
1150 *
1151 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001152 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001153//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001154
1155/**
Paul Bakker5c721f92011-07-27 16:51:09 +00001156 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1157 *
1158 * If set, the X509 parser will not break-off when parsing an X509 certificate
1159 * and encountering an unknown critical extension.
1160 *
Manuel Pégourié-Gonnardded3ae52015-10-05 12:12:39 +01001161 * \warning Depending on your PKI use, enabling this can be a security risk!
1162 *
Paul Bakker5c721f92011-07-27 16:51:09 +00001163 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +00001164 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001165//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +00001166
1167/**
Janos Follath17da9dd2016-09-19 09:35:18 +01001168 * \def POLARSSL_X509_ALLOW_RELAXED_DATE
1169 *
1170 * If set, the X509 parser will not break-off when parsing an X509 certificate
1171 * and encountering ASN.1 UTCTime or ASN.1 GeneralizedTime without seconds or
1172 * with a time zone.
1173 *
1174 * Uncomment to prevent an error.
1175 */
1176//#define POLARSSL_X509_ALLOW_RELAXED_DATE
1177
1178/**
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001179 * \def POLARSSL_X509_CHECK_KEY_USAGE
1180 *
1181 * Enable verification of the keyUsage extension (CA and leaf certificates).
1182 *
1183 * Disabling this avoids problems with mis-issued and/or misused
1184 * (intermediate) CA and leaf certificates.
1185 *
1186 * \warning Depending on your PKI use, disabling this can be a security risk!
1187 *
1188 * Comment to skip keyUsage checking for both CA and leaf certificates.
1189 */
1190#define POLARSSL_X509_CHECK_KEY_USAGE
1191
1192/**
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001193 * \def POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1194 *
1195 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1196 *
1197 * Disabling this avoids problems with mis-issued and/or misused certificates.
1198 *
1199 * \warning Depending on your PKI use, disabling this can be a security risk!
1200 *
1201 * Comment to skip extendedKeyUsage checking for certificates.
1202 */
1203#define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1204
1205/**
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001206 * \def POLARSSL_X509_RSASSA_PSS_SUPPORT
1207 *
1208 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1209 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1210 *
1211 * Comment this macro to disallow using RSASSA-PSS in certificates.
1212 */
1213#define POLARSSL_X509_RSASSA_PSS_SUPPORT
1214
1215/**
Paul Bakker2770fbd2012-07-03 13:30:23 +00001216 * \def POLARSSL_ZLIB_SUPPORT
1217 *
1218 * If set, the SSL/TLS module uses ZLIB to support compression and
1219 * decompression of packet data.
1220 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001221 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1222 * CRIME attack. Before enabling this option, you should examine with care if
1223 * CRIME or similar exploits may be a applicable to your use case.
1224 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001225 * Used in: library/ssl_tls.c
1226 * library/ssl_cli.c
1227 * library/ssl_srv.c
1228 *
1229 * This feature requires zlib library and headers to be present.
1230 *
1231 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001232 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001233//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001234/* \} name SECTION: mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001235
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001236/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001237 * \name SECTION: mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +00001238 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001239 * This section enables or disables entire modules in mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +00001240 * \{
1241 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001242
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001243/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001244 * \def POLARSSL_AESNI_C
1245 *
1246 * Enable AES-NI support on x86-64.
1247 *
1248 * Module: library/aesni.c
1249 * Caller: library/aes.c
1250 *
1251 * Requires: POLARSSL_HAVE_ASM
1252 *
1253 * This modules adds support for the AES-NI instructions on x86-64
1254 */
1255#define POLARSSL_AESNI_C
1256
1257/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001258 * \def POLARSSL_AES_C
1259 *
1260 * Enable the AES block cipher.
1261 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001262 * Module: library/aes.c
1263 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001264 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001265 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001266 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001267 * This module enables the following ciphersuites (if other requisites are
1268 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001269 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1270 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1271 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1272 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1273 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1274 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1275 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1276 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1277 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1278 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1279 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1280 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001281 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1282 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1283 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1284 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1285 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001286 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001287 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001288 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001289 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1290 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1291 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1292 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1293 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1294 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1295 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1296 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1297 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1298 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1299 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1300 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1301 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1302 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1303 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1304 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1305 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1306 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1307 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1308 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1309 * TLS_RSA_WITH_AES_256_GCM_SHA384
1310 * TLS_RSA_WITH_AES_256_CBC_SHA256
1311 * TLS_RSA_WITH_AES_256_CBC_SHA
1312 * TLS_RSA_WITH_AES_128_GCM_SHA256
1313 * TLS_RSA_WITH_AES_128_CBC_SHA256
1314 * TLS_RSA_WITH_AES_128_CBC_SHA
1315 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1316 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1317 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1318 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1319 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1320 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1321 * TLS_PSK_WITH_AES_256_GCM_SHA384
1322 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001323 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001324 * TLS_PSK_WITH_AES_128_GCM_SHA256
1325 * TLS_PSK_WITH_AES_128_CBC_SHA256
1326 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001327 *
Paul Bakkercff68422013-09-15 20:43:33 +02001328 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001329 */
Paul Bakker40e46942009-01-03 21:51:57 +00001330#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001331
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001332/**
1333 * \def POLARSSL_ARC4_C
1334 *
1335 * Enable the ARCFOUR stream cipher.
1336 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001337 * Module: library/arc4.c
1338 * Caller: library/ssl_tls.c
1339 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001340 * This module enables the following ciphersuites (if other requisites are
1341 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001342 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1343 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001344 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001345 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001346 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1347 * TLS_DHE_PSK_WITH_RC4_128_SHA
1348 * TLS_RSA_WITH_RC4_128_SHA
1349 * TLS_RSA_WITH_RC4_128_MD5
1350 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001351 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001352 */
Paul Bakker40e46942009-01-03 21:51:57 +00001353#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001354
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001355/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001356 * \def POLARSSL_ASN1_PARSE_C
1357 *
1358 * Enable the generic ASN1 parser.
1359 *
1360 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001361 * Caller: library/x509.c
1362 * library/dhm.c
1363 * library/pkcs12.c
1364 * library/pkcs5.c
1365 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001366 */
1367#define POLARSSL_ASN1_PARSE_C
1368
1369/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001370 * \def POLARSSL_ASN1_WRITE_C
1371 *
1372 * Enable the generic ASN1 writer.
1373 *
1374 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001375 * Caller: library/ecdsa.c
1376 * library/pkwrite.c
1377 * library/x509_create.c
1378 * library/x509write_crt.c
1379 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001380 */
1381#define POLARSSL_ASN1_WRITE_C
1382
1383/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001384 * \def POLARSSL_BASE64_C
1385 *
1386 * Enable the Base64 module.
1387 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001388 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001389 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001390 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001391 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001392 */
Paul Bakker40e46942009-01-03 21:51:57 +00001393#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001394
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001395/**
1396 * \def POLARSSL_BIGNUM_C
1397 *
Paul Bakker9a736322012-11-14 12:39:52 +00001398 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001399 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001400 * Module: library/bignum.c
1401 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001402 * library/ecp.c
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001403 * library/ecdsa.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001404 * library/rsa.c
1405 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001406 *
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001407 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
Paul Bakker5121ce52009-01-03 21:22:43 +00001408 */
Paul Bakker40e46942009-01-03 21:51:57 +00001409#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001410
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001411/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001412 * \def POLARSSL_BLOWFISH_C
1413 *
1414 * Enable the Blowfish block cipher.
1415 *
1416 * Module: library/blowfish.c
1417 */
1418#define POLARSSL_BLOWFISH_C
1419
1420/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001421 * \def POLARSSL_CAMELLIA_C
1422 *
1423 * Enable the Camellia block cipher.
1424 *
Paul Bakker38119b12009-01-10 23:31:23 +00001425 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001426 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001427 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001428 * This module enables the following ciphersuites (if other requisites are
1429 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001430 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1431 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1432 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1433 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1434 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1435 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1436 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1437 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001438 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1439 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1440 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1441 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1442 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001443 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001444 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1445 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1446 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1447 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1448 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1449 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1450 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1451 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1452 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1453 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1454 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1455 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1456 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1457 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1458 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1459 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1460 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1461 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1462 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1463 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1464 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1465 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1466 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1467 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1468 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1469 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1470 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1471 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001472 */
1473#define POLARSSL_CAMELLIA_C
1474
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001475/**
Paul Bakker64a96ea2014-05-22 15:13:02 +02001476 * \def POLARSSL_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001477 *
1478 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1479 *
1480 * Module: library/ccm.c
1481 *
1482 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
1483 *
1484 * This module enables the AES-CCM ciphersuites, if other requisites are
1485 * enabled as well.
1486 */
1487#define POLARSSL_CCM_C
1488
1489/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001490 * \def POLARSSL_CERTS_C
1491 *
1492 * Enable the test certificates.
1493 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001494 * Module: library/certs.c
1495 * Caller:
1496 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001497 * Requires: POLARSSL_PEM_PARSE_C
1498 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001499 * This module is used for testing (ssl_client/server).
1500 */
Paul Bakker40e46942009-01-03 21:51:57 +00001501#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001502
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001503/**
1504 * \def POLARSSL_CIPHER_C
1505 *
1506 * Enable the generic cipher layer.
1507 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001508 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001509 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001510 *
1511 * Uncomment to enable generic cipher wrappers.
1512 */
1513#define POLARSSL_CIPHER_C
1514
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001515/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001516 * \def POLARSSL_CTR_DRBG_C
1517 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001518 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001519 *
1520 * Module: library/ctr_drbg.c
1521 * Caller:
1522 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001523 * Requires: POLARSSL_AES_C
1524 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001525 * This module provides the CTR_DRBG AES-256 random number generator.
1526 */
1527#define POLARSSL_CTR_DRBG_C
1528
1529/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001530 * \def POLARSSL_DEBUG_C
1531 *
1532 * Enable the debug functions.
1533 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001534 * Module: library/debug.c
1535 * Caller: library/ssl_cli.c
1536 * library/ssl_srv.c
1537 * library/ssl_tls.c
1538 *
1539 * This module provides debugging functions.
1540 */
Paul Bakker40e46942009-01-03 21:51:57 +00001541#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001542
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001543/**
1544 * \def POLARSSL_DES_C
1545 *
1546 * Enable the DES block cipher.
1547 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001548 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001549 * Caller: library/pem.c
1550 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001551 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001552 * This module enables the following ciphersuites (if other requisites are
1553 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001554 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1555 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001556 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001557 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001558 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1559 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1560 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1561 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1562 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001563 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001564 *
Paul Bakkercff68422013-09-15 20:43:33 +02001565 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001566 */
Paul Bakker40e46942009-01-03 21:51:57 +00001567#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001568
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001569/**
1570 * \def POLARSSL_DHM_C
1571 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001572 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001573 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001574 * Module: library/dhm.c
1575 * Caller: library/ssl_cli.c
1576 * library/ssl_srv.c
1577 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001578 * This module is used by the following key exchanges:
1579 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001580 */
Paul Bakker40e46942009-01-03 21:51:57 +00001581#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001582
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001583/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001584 * \def POLARSSL_ECDH_C
1585 *
1586 * Enable the elliptic curve Diffie-Hellman library.
1587 *
1588 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001589 * Caller: library/ssl_cli.c
1590 * library/ssl_srv.c
1591 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001592 * This module is used by the following key exchanges:
1593 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001594 *
1595 * Requires: POLARSSL_ECP_C
1596 */
1597#define POLARSSL_ECDH_C
1598
1599/**
1600 * \def POLARSSL_ECDSA_C
1601 *
1602 * Enable the elliptic curve DSA library.
1603 *
1604 * Module: library/ecdsa.c
1605 * Caller:
1606 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001607 * This module is used by the following key exchanges:
1608 * ECDHE-ECDSA
1609 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001610 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001611 */
1612#define POLARSSL_ECDSA_C
1613
1614/**
1615 * \def POLARSSL_ECP_C
1616 *
1617 * Enable the elliptic curve over GF(p) library.
1618 *
1619 * Module: library/ecp.c
1620 * Caller: library/ecdh.c
1621 * library/ecdsa.c
1622 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001623 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001624 */
1625#define POLARSSL_ECP_C
1626
1627/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001628 * \def POLARSSL_ENTROPY_C
1629 *
1630 * Enable the platform-specific entropy code.
1631 *
1632 * Module: library/entropy.c
1633 * Caller:
1634 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001635 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001636 *
1637 * This module provides a generic entropy pool
1638 */
1639#define POLARSSL_ENTROPY_C
1640
1641/**
Paul Bakker9d781402011-05-09 16:17:09 +00001642 * \def POLARSSL_ERROR_C
1643 *
1644 * Enable error code to error string conversion.
1645 *
1646 * Module: library/error.c
1647 * Caller:
1648 *
Shuo Chen95a0d112014-04-04 21:04:40 -07001649 * This module enables polarssl_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001650 */
1651#define POLARSSL_ERROR_C
1652
1653/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001654 * \def POLARSSL_GCM_C
1655 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001656 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001657 *
1658 * Module: library/gcm.c
1659 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001660 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001661 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001662 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1663 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001664 */
1665#define POLARSSL_GCM_C
1666
1667/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001668 * \def POLARSSL_HAVEGE_C
1669 *
1670 * Enable the HAVEGE random generator.
1671 *
Paul Bakker2a844242013-06-24 13:01:53 +02001672 * Warning: the HAVEGE random generator is not suitable for virtualized
1673 * environments
1674 *
1675 * Warning: the HAVEGE random generator is dependent on timing and specific
1676 * processor traits. It is therefore not advised to use HAVEGE as
1677 * your applications primary random generator or primary entropy pool
1678 * input. As a secondary input to your entropy pool, it IS able add
1679 * the (limited) extra entropy it provides.
1680 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001681 * Module: library/havege.c
1682 * Caller:
1683 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001684 * Requires: POLARSSL_TIMING_C
1685 *
Paul Bakker2a844242013-06-24 13:01:53 +02001686 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001687 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001688//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001689
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001690/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001691 * \def POLARSSL_HMAC_DRBG_C
1692 *
1693 * Enable the HMAC_DRBG random generator.
1694 *
1695 * Module: library/hmac_drbg.c
1696 * Caller:
1697 *
1698 * Requires: POLARSSL_MD_C
1699 *
1700 * Uncomment to enable the HMAC_DRBG random number geerator.
1701 */
1702#define POLARSSL_HMAC_DRBG_C
1703
1704/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001705 * \def POLARSSL_MD_C
1706 *
1707 * Enable the generic message digest layer.
1708 *
Paul Bakker17373852011-01-06 14:20:01 +00001709 * Module: library/md.c
1710 * Caller:
1711 *
1712 * Uncomment to enable generic message digest wrappers.
1713 */
1714#define POLARSSL_MD_C
1715
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001716/**
1717 * \def POLARSSL_MD2_C
1718 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001719 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001720 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001721 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001722 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001723 *
1724 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001725 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001726//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001727
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001728/**
1729 * \def POLARSSL_MD4_C
1730 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001731 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001732 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001733 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001734 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001735 *
1736 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001737 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001738//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001739
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001740/**
1741 * \def POLARSSL_MD5_C
1742 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001743 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001744 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001745 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001746 * Caller: library/md.c
1747 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001748 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001749 *
1750 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001751 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001752 */
Paul Bakker40e46942009-01-03 21:51:57 +00001753#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001754
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001755/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001756 * \def POLARSSL_MEMORY_C
Manuel Pégourié-Gonnard71432842015-03-20 16:19:35 +00001757 *
1758 * \deprecated Use POLARSSL_PLATFORM_MEMORY instead.
1759 *
Manuel Pégourié-Gonnard0a155b82015-01-23 17:28:27 +00001760 * Depends on: POLARSSL_PLATFORM_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001761 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001762//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001763
1764/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001765 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1766 *
1767 * Enable the buffer allocator implementation that makes use of a (stack)
1768 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1769 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001770 *
1771 * Module: library/memory_buffer_alloc.c
1772 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001773 * Requires: POLARSSL_PLATFORM_C
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001774 * POLARSSL_PLATFORM_MEMORY (to use it within mbed TLS)
Paul Bakker6e339b52013-07-03 13:37:05 +02001775 *
1776 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001777 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001778//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001779
1780/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001781 * \def POLARSSL_NET_C
1782 *
1783 * Enable the TCP/IP networking routines.
1784 *
Manuel Pégourié-Gonnarda98af5e2015-04-09 14:40:46 +02001785 * \warning As of 1.3.11, it is deprecated to enable this module without
1786 * POLARSSL_HAVE_IPV6. The alternative legacy code will be removed in 2.0.
1787 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001788 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001789 *
1790 * This module provides TCP/IP networking routines.
1791 */
Paul Bakker40e46942009-01-03 21:51:57 +00001792#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001793
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001794/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001795 * \def POLARSSL_OID_C
1796 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001797 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001798 *
1799 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001800 * Caller: library/asn1write.c
1801 * library/pkcs5.c
1802 * library/pkparse.c
1803 * library/pkwrite.c
1804 * library/rsa.c
1805 * library/x509.c
1806 * library/x509_create.c
1807 * library/x509_crl.c
1808 * library/x509_crt.c
1809 * library/x509_csr.c
1810 * library/x509write_crt.c
1811 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001812 *
1813 * This modules translates between OIDs and internal values.
1814 */
1815#define POLARSSL_OID_C
1816
1817/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001818 * \def POLARSSL_PADLOCK_C
1819 *
1820 * Enable VIA Padlock support on x86.
1821 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001822 * Module: library/padlock.c
1823 * Caller: library/aes.c
1824 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001825 * Requires: POLARSSL_HAVE_ASM
1826 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001827 * This modules adds support for the VIA PadLock on x86.
1828 */
Paul Bakker40e46942009-01-03 21:51:57 +00001829#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001830
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001831/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001832 * \def POLARSSL_PBKDF2_C
1833 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001834 * Enable PKCS#5 PBKDF2 key derivation function.
Manuel Pégourié-Gonnard71432842015-03-20 16:19:35 +00001835 *
1836 * \deprecated Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001837 *
1838 * Module: library/pbkdf2.c
1839 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001840 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001841 *
1842 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001843 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001844#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001845
1846/**
Paul Bakkercff68422013-09-15 20:43:33 +02001847 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001848 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001849 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001850 *
1851 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001852 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001853 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001854 * library/x509_crl.c
1855 * library/x509_crt.c
1856 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001857 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001858 * Requires: POLARSSL_BASE64_C
1859 *
Paul Bakkercff68422013-09-15 20:43:33 +02001860 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001861 */
Paul Bakkercff68422013-09-15 20:43:33 +02001862#define POLARSSL_PEM_PARSE_C
1863
1864/**
1865 * \def POLARSSL_PEM_WRITE_C
1866 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001867 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001868 *
1869 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001870 * Caller: library/pkwrite.c
1871 * library/x509write_crt.c
1872 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001873 *
1874 * Requires: POLARSSL_BASE64_C
1875 *
1876 * This modules adds support for encoding / writing PEM files.
1877 */
1878#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001879
1880/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001881 * \def POLARSSL_PK_C
1882 *
1883 * Enable the generic public (asymetric) key layer.
1884 *
1885 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001886 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001887 * library/ssl_cli.c
1888 * library/ssl_srv.c
1889 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001890 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1891 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001892 * Uncomment to enable generic public key wrappers.
1893 */
1894#define POLARSSL_PK_C
1895
1896/**
Paul Bakker4606c732013-09-15 17:04:23 +02001897 * \def POLARSSL_PK_PARSE_C
1898 *
1899 * Enable the generic public (asymetric) key parser.
1900 *
1901 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001902 * Caller: library/x509_crt.c
1903 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001904 *
1905 * Requires: POLARSSL_PK_C
1906 *
1907 * Uncomment to enable generic public key parse functions.
1908 */
1909#define POLARSSL_PK_PARSE_C
1910
1911/**
1912 * \def POLARSSL_PK_WRITE_C
1913 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001914 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001915 *
1916 * Module: library/pkwrite.c
1917 * Caller: library/x509write.c
1918 *
1919 * Requires: POLARSSL_PK_C
1920 *
1921 * Uncomment to enable generic public key write functions.
1922 */
1923#define POLARSSL_PK_WRITE_C
1924
1925/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001926 * \def POLARSSL_PKCS5_C
1927 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001928 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001929 *
1930 * Module: library/pkcs5.c
1931 *
1932 * Requires: POLARSSL_MD_C
1933 *
1934 * This module adds support for the PKCS#5 functions.
1935 */
1936#define POLARSSL_PKCS5_C
1937
1938/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001939 * \def POLARSSL_PKCS11_C
1940 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001941 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001942 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001943 * Module: library/pkcs11.c
1944 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001945 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001946 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001947 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001948 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001949 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001950 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001951//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001952
1953/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001954 * \def POLARSSL_PKCS12_C
1955 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001956 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001957 * Adds algorithms for parsing PKCS#8 encrypted private keys
1958 *
1959 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001960 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001961 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001962 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1963 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001964 *
1965 * This module enables PKCS#12 functions.
1966 */
1967#define POLARSSL_PKCS12_C
1968
1969/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001970 * \def POLARSSL_PLATFORM_C
1971 *
1972 * Enable the platform abstraction layer that allows you to re-assign
Rich Evansc39cb492015-01-30 12:01:34 +00001973 * functions like malloc(), free(), snprintf(), printf(), fprintf(), exit()
Paul Bakker747a83a2014-02-01 22:50:07 +01001974 *
Rich Evans16f8cd82015-02-06 16:14:34 +00001975 * Enabling POLARSSL_PLATFORM_C enables to use of POLARSSL_PLATFORM_XXX_ALT
1976 * or POLARSSL_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
1977 * above to be specified at runtime or compile time respectively.
1978 *
Paul Bakker747a83a2014-02-01 22:50:07 +01001979 * Module: library/platform.c
1980 * Caller: Most other .c files
1981 *
1982 * This module enables abstraction of common (libc) functions.
1983 */
1984#define POLARSSL_PLATFORM_C
1985
1986/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001987 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001988 *
1989 * Enable the RIPEMD-160 hash algorithm.
1990 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001991 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001992 * Caller: library/md.c
1993 *
1994 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001995#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001996
1997/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001998 * \def POLARSSL_RSA_C
1999 *
2000 * Enable the RSA public-key cryptosystem.
2001 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002002 * Module: library/rsa.c
2003 * Caller: library/ssl_cli.c
2004 * library/ssl_srv.c
2005 * library/ssl_tls.c
2006 * library/x509.c
2007 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02002008 * This module is used by the following key exchanges:
2009 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00002010 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02002011 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002012 */
Paul Bakker40e46942009-01-03 21:51:57 +00002013#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002014
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002015/**
2016 * \def POLARSSL_SHA1_C
2017 *
2018 * Enable the SHA1 cryptographic hash algorithm.
2019 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002020 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002021 * Caller: library/md.c
2022 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002023 * library/ssl_srv.c
2024 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002025 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002026 *
2027 * This module is required for SSL/TLS and SHA1-signed certificates.
2028 */
Paul Bakker40e46942009-01-03 21:51:57 +00002029#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002030
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002031/**
Paul Bakker9e36f042013-06-30 14:34:05 +02002032 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002033 *
2034 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02002035 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002036 *
Paul Bakker9e36f042013-06-30 14:34:05 +02002037 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002038 * Caller: library/entropy.c
2039 * library/md.c
2040 * library/ssl_cli.c
2041 * library/ssl_srv.c
2042 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002043 *
2044 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01002045 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00002046 */
Paul Bakker9e36f042013-06-30 14:34:05 +02002047#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002048
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002049/**
Paul Bakker9e36f042013-06-30 14:34:05 +02002050 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002051 *
2052 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02002053 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002054 *
Paul Bakker9e36f042013-06-30 14:34:05 +02002055 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002056 * Caller: library/entropy.c
2057 * library/md.c
2058 * library/ssl_cli.c
2059 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002060 *
2061 * This module adds support for SHA-384 and SHA-512.
2062 */
Paul Bakker9e36f042013-06-30 14:34:05 +02002063#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002064
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002065/**
Paul Bakker0a597072012-09-25 21:55:46 +00002066 * \def POLARSSL_SSL_CACHE_C
2067 *
2068 * Enable simple SSL cache implementation.
2069 *
2070 * Module: library/ssl_cache.c
2071 * Caller:
2072 *
2073 * Requires: POLARSSL_SSL_CACHE_C
2074 */
2075#define POLARSSL_SSL_CACHE_C
2076
2077/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002078 * \def POLARSSL_SSL_CLI_C
2079 *
2080 * Enable the SSL/TLS client code.
2081 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002082 * Module: library/ssl_cli.c
2083 * Caller:
2084 *
Paul Bakker5690efc2011-05-26 13:16:06 +00002085 * Requires: POLARSSL_SSL_TLS_C
2086 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002087 * This module is required for SSL/TLS client support.
2088 */
Paul Bakker40e46942009-01-03 21:51:57 +00002089#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002090
Paul Bakker9a736322012-11-14 12:39:52 +00002091/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002092 * \def POLARSSL_SSL_SRV_C
2093 *
2094 * Enable the SSL/TLS server code.
2095 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002096 * Module: library/ssl_srv.c
2097 * Caller:
2098 *
Paul Bakker5690efc2011-05-26 13:16:06 +00002099 * Requires: POLARSSL_SSL_TLS_C
2100 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002101 * This module is required for SSL/TLS server support.
2102 */
Paul Bakker40e46942009-01-03 21:51:57 +00002103#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002104
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002105/**
2106 * \def POLARSSL_SSL_TLS_C
2107 *
Paul Bakkere29ab062011-05-18 13:26:54 +00002108 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002109 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002110 * Module: library/ssl_tls.c
2111 * Caller: library/ssl_cli.c
2112 * library/ssl_srv.c
2113 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002114 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02002115 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00002116 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002117 * This module is required for SSL/TLS.
2118 */
Paul Bakker40e46942009-01-03 21:51:57 +00002119#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002120
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002121/**
Paul Bakker2466d932013-09-28 14:40:38 +02002122 * \def POLARSSL_THREADING_C
2123 *
2124 * Enable the threading abstraction layer.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002125 * By default mbed TLS assumes it is used in a non-threaded environment or that
Paul Bakker2466d932013-09-28 14:40:38 +02002126 * contexts are not shared between threads. If you do intend to use contexts
2127 * between threads, you will need to enable this layer to prevent race
2128 * conditions.
2129 *
2130 * Module: library/threading.c
2131 *
2132 * This allows different threading implementations (self-implemented or
2133 * provided).
2134 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01002135 * You will have to enable either POLARSSL_THREADING_ALT or
2136 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02002137 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002138 * Enable this layer to allow use of mutexes within mbed TLS
Paul Bakker2466d932013-09-28 14:40:38 +02002139 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02002140//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002141
2142/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002143 * \def POLARSSL_TIMING_C
2144 *
2145 * Enable the portable timing interface.
2146 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002147 * Module: library/timing.c
2148 * Caller: library/havege.c
2149 *
2150 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002151 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02002152#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002153
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002154/**
2155 * \def POLARSSL_VERSION_C
2156 *
2157 * Enable run-time version information.
2158 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00002159 * Module: library/version.c
2160 *
2161 * This module provides run-time version information.
2162 */
2163#define POLARSSL_VERSION_C
2164
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002165/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002166 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002167 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002168 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002169 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002170 * Module: library/x509.c
2171 * Caller: library/x509_crl.c
2172 * library/x509_crt.c
2173 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002174 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02002175 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02002176 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002177 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002178 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00002179 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002180#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002181
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002182/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002183 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002184 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002185 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002186 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002187 * Module: library/x509_crt.c
2188 * Caller: library/ssl_cli.c
2189 * library/ssl_srv.c
2190 * library/ssl_tls.c
2191 *
2192 * Requires: POLARSSL_X509_USE_C
2193 *
2194 * This module is required for X.509 certificate parsing.
2195 */
2196#define POLARSSL_X509_CRT_PARSE_C
2197
2198/**
2199 * \def POLARSSL_X509_CRL_PARSE_C
2200 *
2201 * Enable X.509 CRL parsing.
2202 *
2203 * Module: library/x509_crl.c
2204 * Caller: library/x509_crt.c
2205 *
2206 * Requires: POLARSSL_X509_USE_C
2207 *
2208 * This module is required for X.509 CRL parsing.
2209 */
2210#define POLARSSL_X509_CRL_PARSE_C
2211
2212/**
2213 * \def POLARSSL_X509_CSR_PARSE_C
2214 *
2215 * Enable X.509 Certificate Signing Request (CSR) parsing.
2216 *
2217 * Module: library/x509_csr.c
2218 * Caller: library/x509_crt_write.c
2219 *
2220 * Requires: POLARSSL_X509_USE_C
2221 *
2222 * This module is used for reading X.509 certificate request.
2223 */
2224#define POLARSSL_X509_CSR_PARSE_C
2225
2226/**
2227 * \def POLARSSL_X509_CREATE_C
2228 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002229 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002230 *
2231 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002232 *
Paul Bakker4606c732013-09-15 17:04:23 +02002233 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002234 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002235 * This module is the basis for creating X.509 certificates and CSRs.
2236 */
2237#define POLARSSL_X509_CREATE_C
2238
2239/**
2240 * \def POLARSSL_X509_CRT_WRITE_C
2241 *
2242 * Enable creating X.509 certificates.
2243 *
2244 * Module: library/x509_crt_write.c
2245 *
2246 * Requires: POLARSSL_CREATE_C
2247 *
2248 * This module is required for X.509 certificate creation.
2249 */
2250#define POLARSSL_X509_CRT_WRITE_C
2251
2252/**
2253 * \def POLARSSL_X509_CSR_WRITE_C
2254 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002255 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002256 *
2257 * Module: library/x509_csr_write.c
2258 *
2259 * Requires: POLARSSL_CREATE_C
2260 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002261 * This module is required for X.509 certificate request writing.
2262 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002263#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002264
2265/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002266 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002267 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002268 * Enable the XTEA block cipher.
2269 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002270 * Module: library/xtea.c
2271 * Caller:
2272 */
2273#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002274
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002275/* \} name SECTION: mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002276
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002277/**
2278 * \name SECTION: Module configuration options
2279 *
2280 * This section allows for the setting of module specific sizes and
2281 * configuration options. The default values are already present in the
2282 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002283 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002284 * Our advice is to enable options and change their values here
2285 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002286 *
2287 * Please check the respective header file for documentation on these
2288 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002289 * \{
2290 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002291
Paul Bakker088c5c52014-04-25 11:11:10 +02002292/* MPI / BIGNUM options */
2293//#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
Manuel Pégourié-Gonnardda1b4de2014-09-08 17:03:50 +02002294//#define POLARSSL_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002295
Paul Bakker088c5c52014-04-25 11:11:10 +02002296/* CTR_DRBG options */
2297//#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2298//#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2299//#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2300//#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2301//#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002302
Paul Bakker088c5c52014-04-25 11:11:10 +02002303/* HMAC_DRBG options */
2304//#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2305//#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2306//#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2307//#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002308
Paul Bakker088c5c52014-04-25 11:11:10 +02002309/* ECP options */
2310//#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2311//#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2312//#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002313
Paul Bakker088c5c52014-04-25 11:11:10 +02002314/* Entropy options */
2315//#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2316//#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002317
Paul Bakker088c5c52014-04-25 11:11:10 +02002318/* Memory buffer allocator options */
Manuel Pégourié-Gonnard4d8db4a2014-05-05 14:04:28 +02002319//#define POLARSSL_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002320
Paul Bakker088c5c52014-04-25 11:11:10 +02002321/* Platform options */
Rich Evans98081c52015-02-03 11:00:54 +00002322//#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. */
2323//#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2324//#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2325//#define POLARSSL_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2326//#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2327//#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
Rich Evansc39cb492015-01-30 12:01:34 +00002328//#define POLARSSL_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002329
Manuel Pégourié-Gonnardfb57e642015-03-05 13:38:29 +00002330/* To Use Function Macros POLARSSL_PLATFORM_C must be enabled */
2331/* POLARSSL_PLATFORM_XXX_MACRO and POLARSSL_PLATFORM_XXX_ALT cannot both be defined */
Rich Evans4cc8a222015-02-03 11:26:31 +00002332//#define POLARSSL_PLATFORM_MALLOC_MACRO malloc /**< Default allocator macro to use, can be undefined */
2333//#define POLARSSL_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2334//#define POLARSSL_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2335//#define POLARSSL_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2336//#define POLARSSL_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
2337//#define POLARSSL_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
2338
Paul Bakker088c5c52014-04-25 11:11:10 +02002339/* SSL Cache options */
2340//#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2341//#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002342
Paul Bakker088c5c52014-04-25 11:11:10 +02002343/* SSL options */
2344//#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Manuel Pégourié-Gonnard9ea1b232015-06-29 15:27:52 +02002345//#define SSL_MIN_DHM_BYTES 128 /**< Min size of the Diffie-Hellman prime */
Paul Bakker088c5c52014-04-25 11:11:10 +02002346//#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Manuel Pégourié-Gonnard481fcfd2014-07-03 16:12:50 +02002347//#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 +02002348
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002349/**
2350 * Complete list of ciphersuites to use, in order of preference.
2351 *
2352 * \warning No dependency checking is done on that field! This option can only
2353 * be used to restrict the set of available ciphersuites. It is your
2354 * responsibility to make sure the needed modules are active.
2355 *
2356 * Use this to save a few hundred bytes of ROM (default ordering of all
2357 * available ciphersuites) and a few to a few hundred bytes of RAM.
2358 *
2359 * The value below is only an example, not the default.
2360 */
2361//#define SSL_CIPHERSUITES TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
2362
Paul Bakkereaebbd52014-04-25 15:04:14 +02002363/* Debug options */
2364//#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */
2365
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002366/* X509 options */
2367//#define POLARSSL_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
2368
Manuel Pégourié-Gonnard48ed5502017-06-08 17:27:20 +02002369/**
2370 * \def POLARSSL_X509_MIN_VERIFY_MD_ALG
2371 *
2372 * Minimal hash algorithm accepted in X.509 chain verification.
2373 *
2374 * The value should be one of the enumerations in md_type_t defined in md.h
2375 * Only algorithms with a value equal or higher are accepted.
2376 *
2377 * typedef enum {
2378 * POLARSSL_MD_NONE=0,
2379 * POLARSSL_MD_MD2,
2380 * POLARSSL_MD_MD4,
2381 * POLARSSL_MD_MD5,
2382 * POLARSSL_MD_SHA1,
2383 * POLARSSL_MD_SHA224,
2384 * POLARSSL_MD_SHA256,
2385 * POLARSSL_MD_SHA384,
2386 * POLARSSL_MD_SHA512,
2387 * POLARSSL_MD_RIPEMD160,
2388 * } md_type_t;
2389 */
2390//#define POLARSSL_X509_MIN_VERIFY_MD_ALG POLARSSL_MD_SHA1
2391
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002392/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002393
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002394#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002395
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002396#endif /* POLARSSL_CONFIG_H */