blob: 220f74dcce13af3925c9f207dc8183142703eec8 [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 *
47 * Uncomment if native integers are 8-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000048 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020049//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000050
Paul Bakkerf3b86c12011-01-27 15:24:17 +000051/**
52 * \def POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000053 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000054 * The system uses 16-bit wide native integers.
55 *
56 * Uncomment if native integers are 16-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000057 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020058//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000059
Paul Bakkerf3b86c12011-01-27 15:24:17 +000060/**
Paul Bakker62261d62012-10-02 12:19:31 +000061 * \def POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000062 *
Paul Bakker62261d62012-10-02 12:19:31 +000063 * The compiler supports the 'long long' type.
64 * (Only used on 32-bit platforms)
Paul Bakker5121ce52009-01-03 21:22:43 +000065 */
Paul Bakker62261d62012-10-02 12:19:31 +000066#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000067
Paul Bakkerf3b86c12011-01-27 15:24:17 +000068/**
69 * \def POLARSSL_HAVE_ASM
70 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020071 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000072 *
73 * Requires support for asm() in compiler.
74 *
75 * Used in:
76 * library/timing.c
77 * library/padlock.c
78 * include/polarssl/bn_mul.h
79 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020080 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000081 */
Paul Bakker40e46942009-01-03 21:51:57 +000082#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000083
Paul Bakkerf3b86c12011-01-27 15:24:17 +000084/**
85 * \def POLARSSL_HAVE_SSE2
86 *
Paul Bakkere23c3152012-10-01 14:42:47 +000087 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000088 *
Paul Bakker5121ce52009-01-03 21:22:43 +000089 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000090 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020091//#define POLARSSL_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020092
93/**
94 * \def POLARSSL_HAVE_TIME
95 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020096 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +020097 *
98 * Comment if your system does not support time functions
99 */
100#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100101
102/**
103 * \def POLARSSL_HAVE_IPV6
104 *
105 * System supports the basic socket interface for IPv6 (RFC 3493),
Manuel Pégourié-Gonnard767f02c2013-12-13 16:23:39 +0100106 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100107 *
Manuel Pégourié-Gonnard13211352013-12-17 17:38:55 +0100108 * Note: on Windows/MingW, XP or higher is required.
109 *
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100110 * Comment if your system does not support the IPv6 socket interface
111 */
112#define POLARSSL_HAVE_IPV6
Paul Bakker747a83a2014-02-01 22:50:07 +0100113
114/**
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100115 * \def POLARSSL_PLATFORM_MEMORY
116 *
117 * Enable the memory allocation layer.
118 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000119 * By default mbed TLS uses the system-provided malloc() and free().
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100120 * This allows different allocators (self-implemented or provided) to be
121 * provided to the platform abstraction layer.
122 *
Rich Evans16f8cd82015-02-06 16:14:34 +0000123 * Enabling POLARSSL_PLATFORM_MEMORY without the
124 * POLARSSL_PLATFORM_{FREE,MALLOC}_MACROs will provide
125 * "platform_set_malloc_free()" allowing you to set an alternative malloc() and
126 * free() function pointer at runtime.
127 *
128 * Enabling POLARSSL_PLATFORM_MEMORY and specifying
129 * POLARSSL_PLATFORM_{MALLOC,FREE}_MACROs will allow you to specify the
130 * alternate function at compile time.
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100131 *
132 * Requires: POLARSSL_PLATFORM_C
133 *
134 * Enable this layer to allow use of alternative memory allocators.
135 */
136//#define POLARSSL_PLATFORM_MEMORY
137
138/**
Paul Bakker088c5c52014-04-25 11:11:10 +0200139 * \def POLARSSL_PLATFORM_NO_STD_FUNCTIONS
140 *
141 * Do not assign standard functions in the platform layer (e.g. malloc() to
142 * POLARSSL_PLATFORM_STD_MALLOC and printf() to POLARSSL_PLATFORM_STD_PRINTF)
143 *
144 * This makes sure there are no linking errors on platforms that do not support
145 * these functions. You will HAVE to provide alternatives, either at runtime
146 * via the platform_set_xxx() functions or at compile time by setting
Rich Evans16f8cd82015-02-06 16:14:34 +0000147 * the POLARSSL_PLATFORM_STD_XXX defines, or enabling a
148 * POLARSSL_PLATFORM_XXX_MACRO.
Paul Bakker088c5c52014-04-25 11:11:10 +0200149 *
150 * Requires: POLARSSL_PLATFORM_C
151 *
152 * Uncomment to prevent default assignment of standard functions in the
153 * platform layer.
154 */
155//#define POLARSSL_PLATFORM_NO_STD_FUNCTIONS
156
157/**
Paul Bakker747a83a2014-02-01 22:50:07 +0100158 * \def POLARSSL_PLATFORM_XXX_ALT
159 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000160 * Uncomment a macro to let mbed TLS support the function in the platform
Paul Bakker747a83a2014-02-01 22:50:07 +0100161 * abstraction layer.
162 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000163 * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, mbed TLS will
Paul Bakker747a83a2014-02-01 22:50:07 +0100164 * provide a function "platform_set_printf()" that allows you to set an
165 * alternative printf function pointer.
166 *
167 * All these define require POLARSSL_PLATFORM_C to be defined!
168 *
Rich Evans46b0a8d2015-01-30 10:47:32 +0000169 * WARNING: POLARSSL_PLATFORM_SNPRINTF_ALT is not available on Windows
170 * for compatibility reasons.
171 *
Rich Evans16f8cd82015-02-06 16:14:34 +0000172 * WARNING: POLARSSL_PLATFORM_XXX_ALT cannot be defined at the same time as
173 * POLARSSL_PLATFORM_XXX_MACRO!
174 *
Paul Bakker747a83a2014-02-01 22:50:07 +0100175 * Uncomment a macro to enable alternate implementation of specific base
176 * platform function
177 */
Rich Evansc39cb492015-01-30 12:01:34 +0000178//#define POLARSSL_PLATFORM_EXIT_ALT
Rich Evans98081c52015-02-03 11:00:54 +0000179//#define POLARSSL_PLATFORM_FPRINTF_ALT
180//#define POLARSSL_PLATFORM_PRINTF_ALT
181//#define POLARSSL_PLATFORM_SNPRINTF_ALT
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100182
183/**
184 * \def POLARSSL_DEPRECATED_WARNING
185 *
186 * Mark deprecated functions so that they generate a warning if used.
187 * Functions deprecated in one version will usually be removed in the next
188 * version. You can enable this to help you prepare the transition to a new
189 * major version by making sure your code is not using these functions.
190 *
191 * This only works with GCC and Clang. With other compilers, you may want to
192 * use POLARSSL_DEPRECATED_REMOVED
193 *
194 * Uncomment to get warnings on using deprecated functions.
195 */
196//#define POLARSSL_DEPRECATED_WARNING
197
198/**
199 * \def POLARSSL_DEPRECATED_REMOVED
200 *
201 * Remove deprecated functions so that they generate an error if used.
202 * Functions deprecated in one version will usually be removed in the next
203 * version. You can enable this to help you prepare the transition to a new
204 * major version by making sure your code is not using these functions.
205 *
206 * Uncomment to get errors on using deprecated functions.
207 */
208//#define POLARSSL_DEPRECATED_REMOVED
209
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200210/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000211
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000212/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000213 * \name SECTION: mbed TLS feature support
Paul Bakker0a62cd12011-01-21 11:00:08 +0000214 *
215 * This section sets support for features that are or are not needed
216 * within the modules that are enabled.
217 * \{
218 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000219
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000220/**
Paul Bakkerf2561b32014-02-06 15:11:55 +0100221 * \def POLARSSL_TIMING_ALT
222 *
223 * Uncomment to provide your own alternate implementation for hardclock(),
224 * get_timer(), set_alarm() and m_sleep().
225 *
226 * Only works if you have POLARSSL_TIMING_C enabled.
227 *
228 * You will need to provide a header "timing_alt.h" and an implementation at
229 * compile time.
230 */
231//#define POLARSSL_TIMING_ALT
232
233/**
Paul Bakker90995b52013-06-24 19:20:35 +0200234 * \def POLARSSL_XXX_ALT
235 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000236 * Uncomment a macro to let mbed TLS use your alternate core implementation of
Paul Bakker90995b52013-06-24 19:20:35 +0200237 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
238 * implementations). Keep in mind that the function prototypes should remain
239 * the same.
240 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000241 * Example: In case you uncomment POLARSSL_AES_ALT, mbed TLS will no longer
Paul Bakker90995b52013-06-24 19:20:35 +0200242 * provide the "struct aes_context" definition and omit the base function
243 * declarations and implementations. "aes_alt.h" will be included from
244 * "aes.h" to include the new function definitions.
245 *
246 * Uncomment a macro to enable alternate implementation for core algorithm
247 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200248 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200249//#define POLARSSL_AES_ALT
250//#define POLARSSL_ARC4_ALT
251//#define POLARSSL_BLOWFISH_ALT
252//#define POLARSSL_CAMELLIA_ALT
253//#define POLARSSL_DES_ALT
254//#define POLARSSL_XTEA_ALT
255//#define POLARSSL_MD2_ALT
256//#define POLARSSL_MD4_ALT
257//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100258//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200259//#define POLARSSL_SHA1_ALT
260//#define POLARSSL_SHA256_ALT
261//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200262
263/**
Paul Bakker15566e42011-04-24 21:19:15 +0000264 * \def POLARSSL_AES_ROM_TABLES
265 *
266 * Store the AES tables in ROM.
267 *
268 * Uncomment this macro to store the AES tables in ROM.
Paul Bakker15566e42011-04-24 21:19:15 +0000269 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200270//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000271
272/**
Manuel Pégourié-Gonnarda82135c2015-04-03 16:28:19 +0200273 * \def POLARSSL_CAMELLIA_SMALL_MEMORY
274 *
275 * Use less ROM for the Camellia implementation (saves about 768 bytes).
276 *
277 * Uncomment this macro to use less memory for Camellia.
278 */
279//#define POLARSSL_CAMELLIA_SMALL_MEMORY
280
281/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200282 * \def POLARSSL_CIPHER_MODE_CBC
283 *
284 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
285 */
286#define POLARSSL_CIPHER_MODE_CBC
287
288/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000289 * \def POLARSSL_CIPHER_MODE_CFB
290 *
291 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
292 */
293#define POLARSSL_CIPHER_MODE_CFB
294
295/**
296 * \def POLARSSL_CIPHER_MODE_CTR
297 *
298 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
299 */
300#define POLARSSL_CIPHER_MODE_CTR
301
302/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000303 * \def POLARSSL_CIPHER_NULL_CIPHER
304 *
305 * Enable NULL cipher.
306 * Warning: Only do so when you know what you are doing. This allows for
307 * encryption or channels without any security!
308 *
309 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
310 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100311 * TLS_ECDH_ECDSA_WITH_NULL_SHA
312 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200313 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100314 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200315 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200316 * TLS_ECDHE_PSK_WITH_NULL_SHA256
317 * TLS_ECDHE_PSK_WITH_NULL_SHA
318 * TLS_DHE_PSK_WITH_NULL_SHA384
319 * TLS_DHE_PSK_WITH_NULL_SHA256
320 * TLS_DHE_PSK_WITH_NULL_SHA
321 * TLS_RSA_WITH_NULL_SHA256
322 * TLS_RSA_WITH_NULL_SHA
323 * TLS_RSA_WITH_NULL_MD5
324 * TLS_RSA_PSK_WITH_NULL_SHA384
325 * TLS_RSA_PSK_WITH_NULL_SHA256
326 * TLS_RSA_PSK_WITH_NULL_SHA
327 * TLS_PSK_WITH_NULL_SHA384
328 * TLS_PSK_WITH_NULL_SHA256
329 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000330 *
331 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000332 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200333//#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000334
335/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200336 * \def POLARSSL_CIPHER_PADDING_XXX
337 *
338 * Uncomment or comment macros to add support for specific padding modes
339 * in the cipher layer with cipher modes that support padding (e.g. CBC)
340 *
341 * If you disable all padding modes, only full blocks can be used with CBC.
342 *
343 * Enable padding modes in the cipher layer.
344 */
345#define POLARSSL_CIPHER_PADDING_PKCS7
346#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
347#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
348#define POLARSSL_CIPHER_PADDING_ZEROS
349
350/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000351 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
352 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200353 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000354 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000355 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000356 *
357 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000358 * TLS_RSA_WITH_DES_CBC_SHA
359 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000360 *
361 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000362 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200363//#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000364
365/**
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200366 * \def POLARSSL_REMOVE_ARC4_CIPHERSUITES
367 *
368 * Remove RC4 ciphersuites by default in SSL / TLS.
369 * This flag removes the ciphersuites based on RC4 from the default list as
370 * returned by ssl_list_ciphersuites(). However, it is still possible to
371 * enable (some of) them with ssl_set_ciphersuites() by including them
372 * explicitly.
373 *
374 * Uncomment this macro to remove RC4 ciphersuites by default.
375 */
376//#define POLARSSL_REMOVE_ARC4_CIPHERSUITES
377
378/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200379 * \def POLARSSL_ECP_XXXX_ENABLED
380 *
381 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200382 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200383 *
384 * Comment macros to disable the curve and functions for it
385 */
386#define POLARSSL_ECP_DP_SECP192R1_ENABLED
387#define POLARSSL_ECP_DP_SECP224R1_ENABLED
388#define POLARSSL_ECP_DP_SECP256R1_ENABLED
389#define POLARSSL_ECP_DP_SECP384R1_ENABLED
390#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100391#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100392#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100393#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200394#define POLARSSL_ECP_DP_BP256R1_ENABLED
395#define POLARSSL_ECP_DP_BP384R1_ENABLED
396#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100397//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
398#define POLARSSL_ECP_DP_M255_ENABLED
399//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
400//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200401
402/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200403 * \def POLARSSL_ECP_NIST_OPTIM
404 *
405 * Enable specific 'modulo p' routines for each NIST prime.
406 * Depending on the prime and architecture, makes operations 4 to 8 times
407 * faster on the corresponding curve.
408 *
409 * Comment this macro to disable NIST curves optimisation.
410 */
411#define POLARSSL_ECP_NIST_OPTIM
412
413/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100414 * \def POLARSSL_ECDSA_DETERMINISTIC
415 *
416 * Enable deterministic ECDSA (RFC 6979).
417 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
418 * may result in a compromise of the long-term signing key. This is avoided by
419 * the deterministic variant.
420 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100421 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100422 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100423 * Comment this macro to disable deterministic ECDSA.
424 */
425#define POLARSSL_ECDSA_DETERMINISTIC
426
427/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200428 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
429 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200430 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200431 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200432 * This enables the following ciphersuites (if other requisites are
433 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200434 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200435 * TLS_PSK_WITH_AES_256_CBC_SHA384
436 * TLS_PSK_WITH_AES_256_CBC_SHA
437 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
438 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
439 * TLS_PSK_WITH_AES_128_GCM_SHA256
440 * TLS_PSK_WITH_AES_128_CBC_SHA256
441 * TLS_PSK_WITH_AES_128_CBC_SHA
442 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
443 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
444 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
445 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200446 */
447#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
448
449/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200450 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
451 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200452 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200453 *
454 * Requires: POLARSSL_DHM_C
455 *
456 * This enables the following ciphersuites (if other requisites are
457 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200458 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200459 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
460 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
461 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
462 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
463 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
464 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
465 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
466 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
467 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
468 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
469 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200470 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200471#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200472
473/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200474 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
475 *
476 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
477 *
478 * Requires: POLARSSL_ECDH_C
479 *
480 * This enables the following ciphersuites (if other requisites are
481 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200482 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200483 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200484 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200485 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
486 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
487 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
488 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
489 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200490 */
491#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
492
493/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200494 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
495 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200496 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200497 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200498 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200499 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200500 *
501 * This enables the following ciphersuites (if other requisites are
502 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200503 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200504 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
505 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
506 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
507 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
508 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
509 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
510 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
511 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
512 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
513 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
514 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200515 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200516#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200517
518/**
519 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
520 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200521 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200522 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200523 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200524 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200525 *
526 * This enables the following ciphersuites (if other requisites are
527 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200528 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200529 * TLS_RSA_WITH_AES_256_CBC_SHA256
530 * TLS_RSA_WITH_AES_256_CBC_SHA
531 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200532 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200533 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
534 * TLS_RSA_WITH_AES_128_GCM_SHA256
535 * TLS_RSA_WITH_AES_128_CBC_SHA256
536 * TLS_RSA_WITH_AES_128_CBC_SHA
537 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
538 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
539 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200540 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200541 * TLS_RSA_WITH_RC4_128_SHA
542 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200543 */
544#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
545
546/**
547 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
548 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200549 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200550 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200551 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200552 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200553 *
554 * This enables the following ciphersuites (if other requisites are
555 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200556 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200557 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200558 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
559 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200560 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200561 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
562 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
563 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
564 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
565 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
566 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
567 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200568 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
569 */
570#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
571
572/**
573 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
574 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200575 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200576 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200577 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200578 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200579 *
580 * This enables the following ciphersuites (if other requisites are
581 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200582 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200583 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
584 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
585 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200586 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200587 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
588 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
589 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
590 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
591 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
592 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
593 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200594 */
595#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
596
597/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200598 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
599 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200600 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200601 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200602 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200603 *
604 * This enables the following ciphersuites (if other requisites are
605 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200606 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
607 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
608 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
609 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
610 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
611 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
612 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
613 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
614 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
615 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
616 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
617 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200618 */
619#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
620
621/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100622 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
623 *
624 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
625 *
626 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
627 *
628 * This enables the following ciphersuites (if other requisites are
629 * enabled as well):
630 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
631 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
632 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
633 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
634 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
635 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
636 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
637 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
638 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
639 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
640 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
641 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
642 */
643#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
644
645/**
646 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
647 *
648 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
649 *
650 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
651 *
652 * This enables the following ciphersuites (if other requisites are
653 * enabled as well):
654 * TLS_ECDH_RSA_WITH_RC4_128_SHA
655 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
656 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
657 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
658 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
659 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
660 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
661 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
662 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
663 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
664 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
665 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
666 */
667#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
668
669/**
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100670 * \def POLARSSL_PK_PARSE_EC_EXTENDED
671 *
672 * Enhance support for reading EC keys using variants of SEC1 not allowed by
673 * RFC 5915 and RFC 5480.
674 *
675 * Currently this means parsing the SpecifiedECDomain choice of EC
676 * parameters (only known groups are supported, not arbitrary domains, to
677 * avoid validation issues).
678 *
679 * Disable if you only need to support RFC 5915 + 5480 key formats.
680 */
681#define POLARSSL_PK_PARSE_EC_EXTENDED
682
683/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200684 * \def POLARSSL_ERROR_STRERROR_BC
685 *
686 * Make available the backward compatible error_strerror() next to the
687 * current polarssl_strerror().
688 *
Manuel Pégourié-Gonnarde6581762015-03-20 17:21:21 +0000689 * \deprecated Do not define this and use polarssl_strerror() instead
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200690 *
Manuel Pégourié-Gonnarde6581762015-03-20 17:21:21 +0000691 * Disable if you want to really remove the error_strerror() name
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200692 */
693#define POLARSSL_ERROR_STRERROR_BC
694
695/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100696 * \def POLARSSL_ERROR_STRERROR_DUMMY
697 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200698 * Enable a dummy error function to make use of polarssl_strerror() in
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200699 * third party libraries easier when POLARSSL_ERROR_C is disabled
700 * (no effect when POLARSSL_ERROR_C is enabled).
701 *
702 * You can safely disable this if POLARSSL_ERROR_C is enabled, or if you're
703 * not using polarssl_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100704 *
705 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200706 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100707 */
708#define POLARSSL_ERROR_STRERROR_DUMMY
709
710/**
Paul Bakker15566e42011-04-24 21:19:15 +0000711 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000712 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200713 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200714 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200715 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000716 */
Paul Bakker15566e42011-04-24 21:19:15 +0000717#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000718
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000719/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000720 * \def POLARSSL_FS_IO
721 *
722 * Enable functions that use the filesystem.
723 */
724#define POLARSSL_FS_IO
725
726/**
Paul Bakker43655f42011-12-15 20:11:16 +0000727 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
728 *
729 * Do not add default entropy sources. These are the platform specific,
730 * hardclock and HAVEGE based poll functions.
731 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700732 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000733 * application.
734 *
735 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000736 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200737//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000738
739/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000740 * \def POLARSSL_NO_PLATFORM_ENTROPY
741 *
742 * Do not use built-in platform entropy functions.
743 * This is useful if your platform does not support
744 * standards like the /dev/urandom or Windows CryptoAPI.
745 *
746 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000747 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200748//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000749
750/**
Paul Bakker2ceda572014-02-06 15:55:25 +0100751 * \def POLARSSL_ENTROPY_FORCE_SHA256
752 *
753 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
754 * default SHA-512 based one (if both are available).
755 *
756 * Requires: POLARSSL_SHA256_C
757 *
758 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
759 * if you have performance concerns.
760 *
761 * This option is only useful if both POLARSSL_SHA256_C and
762 * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used.
763 */
764//#define POLARSSL_ENTROPY_FORCE_SHA256
765
766/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200767 * \def POLARSSL_MEMORY_DEBUG
768 *
769 * Enable debugging of buffer allocator memory issues. Automatically prints
770 * (to stderr) all (fatal) messages on memory allocation issues. Enables
771 * function for 'debug output' of allocated memory.
772 *
773 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200774 *
775 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200776 */
777//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200778
779/**
780 * \def POLARSSL_MEMORY_BACKTRACE
781 *
782 * Include backtrace information with each allocated block.
783 *
784 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
785 * GLIBC-compatible backtrace() an backtrace_symbols() support
786 *
787 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200788 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200789//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200790
791/**
Paul Bakker48377d92013-08-30 12:06:24 +0200792 * \def POLARSSL_PKCS1_V15
793 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200794 * Enable support for PKCS#1 v1.5 encoding.
795 *
Paul Bakker48377d92013-08-30 12:06:24 +0200796 * Requires: POLARSSL_RSA_C
797 *
Paul Bakker48377d92013-08-30 12:06:24 +0200798 * This enables support for PKCS#1 v1.5 operations.
799 */
800#define POLARSSL_PKCS1_V15
801
802/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000803 * \def POLARSSL_PKCS1_V21
804 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200805 * Enable support for PKCS#1 v2.1 encoding.
806 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000807 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
808 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000809 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
810 */
811#define POLARSSL_PKCS1_V21
812
813/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000814 * \def POLARSSL_RSA_NO_CRT
815 *
816 * Do not use the Chinese Remainder Theorem for the RSA private operation.
817 *
818 * Uncomment this macro to disable the use of CRT in RSA.
819 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000820 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200821//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000822
823/**
824 * \def POLARSSL_SELF_TEST
825 *
826 * Enable the checkup functions (*_self_test).
827 */
828#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000829
830/**
Manuel Pégourié-Gonnardd056ce02014-10-29 22:29:20 +0100831 * \def POLARSSL_SSL_AEAD_RANDOM_IV
832 *
833 * Generate a random IV rather than using the record sequence number as a
834 * nonce for ciphersuites using and AEAD algorithm (GCM or CCM).
835 *
836 * Using the sequence number is generally recommended.
837 *
838 * Uncomment this macro to always use random IVs with AEAD ciphersuites.
839 */
840//#define POLARSSL_SSL_AEAD_RANDOM_IV
841
842/**
Paul Bakker40865c82013-01-31 17:13:13 +0100843 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
844 *
845 * Enable sending of alert messages in case of encountered errors as per RFC.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000846 * If you choose not to send the alert messages, mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100847 * with other servers, only debugging of failures is harder.
848 *
849 * The advantage of not sending alert messages, is that no information is given
850 * about reasons for failures thus preventing adversaries of gaining intel.
851 *
852 * Enable sending of all alert messages
853 */
854#define POLARSSL_SSL_ALERT_MESSAGES
855
856/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100857 * \def POLARSSL_SSL_DEBUG_ALL
858 *
859 * Enable the debug messages in SSL module for all issues.
860 * Debug messages have been disabled in some places to prevent timing
861 * attacks due to (unbalanced) debugging function calls.
862 *
863 * If you need all error reporting you should enable this during debugging,
864 * but remove this for production servers that should log as well.
865 *
866 * Uncomment this macro to report all debug messages on errors introducing
867 * a timing side-channel.
868 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100869 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200870//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100871
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100872/** \def POLARSSL_SSL_ENCRYPT_THEN_MAC
873 *
874 * Enable support for Encrypt-then-MAC, RFC 7366.
875 *
876 * This allows peers that both support it to use a more robust protection for
877 * ciphersuites using CBC, providing deep resistance against timing attacks
878 * on the padding or underlying cipher.
879 *
880 * This only affects CBC ciphersuites, and is useless if none is defined.
881 *
882 * Requires: POLARSSL_SSL_PROTO_TLS1 or
883 * POLARSSL_SSL_PROTO_TLS1_1 or
884 * POLARSSL_SSL_PROTO_TLS1_2
885 *
886 * Comment this macro to disable support for Encrypt-then-MAC
887 */
888#define POLARSSL_SSL_ENCRYPT_THEN_MAC
889
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200890/** \def POLARSSL_SSL_EXTENDED_MASTER_SECRET
891 *
892 * Enable support for Extended Master Secret, aka Session Hash
893 * (draft-ietf-tls-session-hash-02).
894 *
895 * This was introduced as "the proper fix" to the Triple Handshake familiy of
896 * attacks, but it is recommended to always use it (even if you disable
897 * renegotiation), since it actually fixes a more fundamental issue in the
898 * original SSL/TLS design, and has implications beyond Triple Handshake.
899 *
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100900 * Requires: POLARSSL_SSL_PROTO_TLS1 or
901 * POLARSSL_SSL_PROTO_TLS1_1 or
902 * POLARSSL_SSL_PROTO_TLS1_2
903 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200904 * Comment this macro to disable support for Extended Master Secret.
905 */
906#define POLARSSL_SSL_EXTENDED_MASTER_SECRET
907
Paul Bakkerd66f0702013-01-31 16:57:45 +0100908/**
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200909 * \def POLARSSL_SSL_FALLBACK_SCSV
910 *
911 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
912 *
913 * For servers, it is recommended to always enable this, unless you support
914 * only one version of TLS, or know for sure that none of your clients
915 * implements a fallback strategy.
916 *
917 * For clients, you only need this if you're using a fallback strategy, which
918 * is not recommended in the first place, unless you absolutely need it to
919 * interoperate with buggy (version-intolerant) servers.
920 *
921 * Comment this macro to disable support for FALLBACK_SCSV
922 */
923#define POLARSSL_SSL_FALLBACK_SCSV
924
925/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000926 * \def POLARSSL_SSL_HW_RECORD_ACCEL
927 *
928 * Enable hooking functions in SSL module for hardware acceleration of
929 * individual records.
930 *
931 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000932 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200933//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000934
935/**
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100936 * \def POLARSSL_SSL_CBC_RECORD_SPLITTING
937 *
938 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
939 *
940 * This is a countermeasure to the BEAST attack, which also minimizes the risk
941 * of interoperability issues compared to sending 0-length records.
942 *
943 * Comment this macro to disable 1/n-1 record splitting.
944 */
945#define POLARSSL_SSL_CBC_RECORD_SPLITTING
946
947/**
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100948 * \def POLARSSL_SSL_DISABLE_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100949 *
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100950 * Disable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100951 *
952 * The two main uses of renegotiation are (1) refresh keys on long-lived
953 * connections and (2) client authentication after the initial handshake.
954 * If you don't need renegotiation, it's probably better to disable it, since
955 * it has been associated with security issues in the past and is easy to
956 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100957 *
958 * Warning: in the next stable branch, this switch will be replaced by
959 * POLARSSL_SSL_RENEGOTIATION to enable support for renegotiation.
960 *
961 * Uncomment this to disable support for renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100962 */
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100963//#define POLARSSL_SSL_DISABLE_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100964
965/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100966 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
967 *
968 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200969 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100970 *
971 * Comment this macro to disable support for SSLv2 Client Hello messages.
972 */
973#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
974
975/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100976 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
977 *
978 * Pick the ciphersuite according to the client's preferences rather than ours
979 * in the SSL Server module (POLARSSL_SSL_SRV_C).
980 *
981 * Uncomment this macro to respect client's ciphersuite order
982 */
983//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
984
985/**
Paul Bakker05decb22013-08-15 13:33:48 +0200986 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
987 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200988 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200989 *
990 * Comment this macro to disable support for the max_fragment_length extension
991 */
992#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
993
994/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200995 * \def POLARSSL_SSL_PROTO_SSL3
996 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200997 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200998 *
999 * Requires: POLARSSL_MD5_C
1000 * POLARSSL_SHA1_C
1001 *
1002 * Comment this macro to disable support for SSL 3.0
1003 */
1004#define POLARSSL_SSL_PROTO_SSL3
1005
1006/**
1007 * \def POLARSSL_SSL_PROTO_TLS1
1008 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001009 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001010 *
1011 * Requires: POLARSSL_MD5_C
1012 * POLARSSL_SHA1_C
1013 *
1014 * Comment this macro to disable support for TLS 1.0
1015 */
1016#define POLARSSL_SSL_PROTO_TLS1
1017
1018/**
1019 * \def POLARSSL_SSL_PROTO_TLS1_1
1020 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001021 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001022 *
1023 * Requires: POLARSSL_MD5_C
1024 * POLARSSL_SHA1_C
1025 *
1026 * Comment this macro to disable support for TLS 1.1
1027 */
1028#define POLARSSL_SSL_PROTO_TLS1_1
1029
1030/**
1031 * \def POLARSSL_SSL_PROTO_TLS1_2
1032 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001033 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001034 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01001035 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001036 * (Depends on ciphersuites)
1037 *
1038 * Comment this macro to disable support for TLS 1.2
1039 */
1040#define POLARSSL_SSL_PROTO_TLS1_2
1041
1042/**
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001043 * \def POLARSSL_SSL_ALPN
1044 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +01001045 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001046 *
Paul Bakker27e36d32014-04-08 12:33:37 +02001047 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001048 */
Paul Bakker27e36d32014-04-08 12:33:37 +02001049#define POLARSSL_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001050
1051/**
Paul Bakkera503a632013-08-14 13:48:06 +02001052 * \def POLARSSL_SSL_SESSION_TICKETS
1053 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001054 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +02001055 *
1056 * Requires: POLARSSL_AES_C
1057 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001058 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +02001059 *
1060 * Comment this macro to disable support for SSL session tickets
1061 */
1062#define POLARSSL_SSL_SESSION_TICKETS
1063
1064/**
Paul Bakker0be444a2013-08-27 21:55:01 +02001065 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
1066 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001067 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +02001068 *
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +00001069 * Requires: POLARSSL_X509_CRT_PARSE_C
1070 *
Paul Bakker0be444a2013-08-27 21:55:01 +02001071 * Comment this macro to disable support for server name indication in SSL
1072 */
1073#define POLARSSL_SSL_SERVER_NAME_INDICATION
1074
1075/**
Paul Bakker1f2bc622013-08-15 13:45:55 +02001076 * \def POLARSSL_SSL_TRUNCATED_HMAC
1077 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001078 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +02001079 *
1080 * Comment this macro to disable support for truncated HMAC in SSL
1081 */
1082#define POLARSSL_SSL_TRUNCATED_HMAC
1083
1084/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001085 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001086 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001087 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001088 *
1089 * This is disabled by default since it breaks binary compatibility with the
1090 * 1.3.x line. If you choose to enable it, you will need to rebuild your
1091 * application against the new header files, relinking will not be enough.
1092 * It will be enabled by default, or no longer an option, in the 1.4 branch.
1093 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001094 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001095 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +01001096//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001097
1098/**
Paul Bakker2466d932013-09-28 14:40:38 +02001099 * \def POLARSSL_THREADING_ALT
1100 *
1101 * Provide your own alternate threading implementation.
1102 *
1103 * Requires: POLARSSL_THREADING_C
1104 *
1105 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +02001106 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001107//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001108
1109/**
Paul Bakker2466d932013-09-28 14:40:38 +02001110 * \def POLARSSL_THREADING_PTHREAD
1111 *
1112 * Enable the pthread wrapper layer for the threading layer.
1113 *
1114 * Requires: POLARSSL_THREADING_C
1115 *
1116 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +02001117 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001118//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001119
1120/**
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001121 * \def POLARSSL_VERSION_FEATURES
1122 *
1123 * Allow run-time checking of compile-time enabled features. Thus allowing users
1124 * to check at run-time if the library is for instance compiled with threading
1125 * support via version_check_feature().
1126 *
1127 * Requires: POLARSSL_VERSION_C
1128 *
1129 * Comment this to disable run-time checking and save ROM space
1130 */
1131#define POLARSSL_VERSION_FEATURES
1132
1133/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001134 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
1135 *
1136 * If set, the X509 parser will not break-off when parsing an X509 certificate
1137 * and encountering an extension in a v1 or v2 certificate.
1138 *
1139 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001140 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001141//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001142
1143/**
Paul Bakker5c721f92011-07-27 16:51:09 +00001144 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1145 *
1146 * If set, the X509 parser will not break-off when parsing an X509 certificate
1147 * and encountering an unknown critical extension.
1148 *
1149 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +00001150 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001151//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +00001152
1153/**
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001154 * \def POLARSSL_X509_CHECK_KEY_USAGE
1155 *
1156 * Enable verification of the keyUsage extension (CA and leaf certificates).
1157 *
1158 * Disabling this avoids problems with mis-issued and/or misused
1159 * (intermediate) CA and leaf certificates.
1160 *
1161 * \warning Depending on your PKI use, disabling this can be a security risk!
1162 *
1163 * Comment to skip keyUsage checking for both CA and leaf certificates.
1164 */
1165#define POLARSSL_X509_CHECK_KEY_USAGE
1166
1167/**
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001168 * \def POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1169 *
1170 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1171 *
1172 * Disabling this avoids problems with mis-issued and/or misused certificates.
1173 *
1174 * \warning Depending on your PKI use, disabling this can be a security risk!
1175 *
1176 * Comment to skip extendedKeyUsage checking for certificates.
1177 */
1178#define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1179
1180/**
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001181 * \def POLARSSL_X509_RSASSA_PSS_SUPPORT
1182 *
1183 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1184 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1185 *
1186 * Comment this macro to disallow using RSASSA-PSS in certificates.
1187 */
1188#define POLARSSL_X509_RSASSA_PSS_SUPPORT
1189
1190/**
Paul Bakker2770fbd2012-07-03 13:30:23 +00001191 * \def POLARSSL_ZLIB_SUPPORT
1192 *
1193 * If set, the SSL/TLS module uses ZLIB to support compression and
1194 * decompression of packet data.
1195 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001196 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1197 * CRIME attack. Before enabling this option, you should examine with care if
1198 * CRIME or similar exploits may be a applicable to your use case.
1199 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001200 * Used in: library/ssl_tls.c
1201 * library/ssl_cli.c
1202 * library/ssl_srv.c
1203 *
1204 * This feature requires zlib library and headers to be present.
1205 *
1206 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001207 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001208//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001209/* \} name SECTION: mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001210
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001211/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001212 * \name SECTION: mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +00001213 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001214 * This section enables or disables entire modules in mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +00001215 * \{
1216 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001217
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001218/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001219 * \def POLARSSL_AESNI_C
1220 *
1221 * Enable AES-NI support on x86-64.
1222 *
1223 * Module: library/aesni.c
1224 * Caller: library/aes.c
1225 *
1226 * Requires: POLARSSL_HAVE_ASM
1227 *
1228 * This modules adds support for the AES-NI instructions on x86-64
1229 */
1230#define POLARSSL_AESNI_C
1231
1232/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001233 * \def POLARSSL_AES_C
1234 *
1235 * Enable the AES block cipher.
1236 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001237 * Module: library/aes.c
1238 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001239 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001240 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001241 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001242 * This module enables the following ciphersuites (if other requisites are
1243 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001244 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1245 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1246 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1247 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1248 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1249 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1250 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1251 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1252 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1253 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1254 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1255 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001256 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1257 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1258 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1259 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1260 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001261 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001262 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001263 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001264 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1265 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1266 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1267 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1268 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1269 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1270 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1271 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1272 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1273 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1274 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1275 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1276 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1277 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1278 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1279 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1280 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1281 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1282 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1283 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1284 * TLS_RSA_WITH_AES_256_GCM_SHA384
1285 * TLS_RSA_WITH_AES_256_CBC_SHA256
1286 * TLS_RSA_WITH_AES_256_CBC_SHA
1287 * TLS_RSA_WITH_AES_128_GCM_SHA256
1288 * TLS_RSA_WITH_AES_128_CBC_SHA256
1289 * TLS_RSA_WITH_AES_128_CBC_SHA
1290 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1291 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1292 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1293 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1294 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1295 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1296 * TLS_PSK_WITH_AES_256_GCM_SHA384
1297 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001298 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001299 * TLS_PSK_WITH_AES_128_GCM_SHA256
1300 * TLS_PSK_WITH_AES_128_CBC_SHA256
1301 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001302 *
Paul Bakkercff68422013-09-15 20:43:33 +02001303 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001304 */
Paul Bakker40e46942009-01-03 21:51:57 +00001305#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001306
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001307/**
1308 * \def POLARSSL_ARC4_C
1309 *
1310 * Enable the ARCFOUR stream cipher.
1311 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001312 * Module: library/arc4.c
1313 * Caller: library/ssl_tls.c
1314 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001315 * This module enables the following ciphersuites (if other requisites are
1316 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001317 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1318 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001319 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001320 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001321 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1322 * TLS_DHE_PSK_WITH_RC4_128_SHA
1323 * TLS_RSA_WITH_RC4_128_SHA
1324 * TLS_RSA_WITH_RC4_128_MD5
1325 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001326 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001327 */
Paul Bakker40e46942009-01-03 21:51:57 +00001328#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001329
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001330/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001331 * \def POLARSSL_ASN1_PARSE_C
1332 *
1333 * Enable the generic ASN1 parser.
1334 *
1335 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001336 * Caller: library/x509.c
1337 * library/dhm.c
1338 * library/pkcs12.c
1339 * library/pkcs5.c
1340 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001341 */
1342#define POLARSSL_ASN1_PARSE_C
1343
1344/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001345 * \def POLARSSL_ASN1_WRITE_C
1346 *
1347 * Enable the generic ASN1 writer.
1348 *
1349 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001350 * Caller: library/ecdsa.c
1351 * library/pkwrite.c
1352 * library/x509_create.c
1353 * library/x509write_crt.c
1354 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001355 */
1356#define POLARSSL_ASN1_WRITE_C
1357
1358/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001359 * \def POLARSSL_BASE64_C
1360 *
1361 * Enable the Base64 module.
1362 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001363 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001364 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001365 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001366 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001367 */
Paul Bakker40e46942009-01-03 21:51:57 +00001368#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001369
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001370/**
1371 * \def POLARSSL_BIGNUM_C
1372 *
Paul Bakker9a736322012-11-14 12:39:52 +00001373 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001374 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001375 * Module: library/bignum.c
1376 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001377 * library/ecp.c
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001378 * library/ecdsa.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001379 * library/rsa.c
1380 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001381 *
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001382 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
Paul Bakker5121ce52009-01-03 21:22:43 +00001383 */
Paul Bakker40e46942009-01-03 21:51:57 +00001384#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001385
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001386/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001387 * \def POLARSSL_BLOWFISH_C
1388 *
1389 * Enable the Blowfish block cipher.
1390 *
1391 * Module: library/blowfish.c
1392 */
1393#define POLARSSL_BLOWFISH_C
1394
1395/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001396 * \def POLARSSL_CAMELLIA_C
1397 *
1398 * Enable the Camellia block cipher.
1399 *
Paul Bakker38119b12009-01-10 23:31:23 +00001400 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001401 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001402 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001403 * This module enables the following ciphersuites (if other requisites are
1404 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001405 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1406 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1407 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1408 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1409 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1410 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1411 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1412 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001413 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1414 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1415 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1416 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1417 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001418 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001419 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1420 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1421 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1422 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1423 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1424 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1425 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1426 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1427 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1428 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1429 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1430 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1431 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1432 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1433 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1434 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1435 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1436 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1437 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1438 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1439 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1440 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1441 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1442 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1443 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1444 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1445 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1446 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001447 */
1448#define POLARSSL_CAMELLIA_C
1449
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001450/**
Paul Bakker64a96ea2014-05-22 15:13:02 +02001451 * \def POLARSSL_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001452 *
1453 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1454 *
1455 * Module: library/ccm.c
1456 *
1457 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
1458 *
1459 * This module enables the AES-CCM ciphersuites, if other requisites are
1460 * enabled as well.
1461 */
1462#define POLARSSL_CCM_C
1463
1464/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001465 * \def POLARSSL_CERTS_C
1466 *
1467 * Enable the test certificates.
1468 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001469 * Module: library/certs.c
1470 * Caller:
1471 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001472 * Requires: POLARSSL_PEM_PARSE_C
1473 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001474 * This module is used for testing (ssl_client/server).
1475 */
Paul Bakker40e46942009-01-03 21:51:57 +00001476#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001477
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001478/**
1479 * \def POLARSSL_CIPHER_C
1480 *
1481 * Enable the generic cipher layer.
1482 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001483 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001484 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001485 *
1486 * Uncomment to enable generic cipher wrappers.
1487 */
1488#define POLARSSL_CIPHER_C
1489
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001490/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001491 * \def POLARSSL_CTR_DRBG_C
1492 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001493 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001494 *
1495 * Module: library/ctr_drbg.c
1496 * Caller:
1497 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001498 * Requires: POLARSSL_AES_C
1499 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001500 * This module provides the CTR_DRBG AES-256 random number generator.
1501 */
1502#define POLARSSL_CTR_DRBG_C
1503
1504/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001505 * \def POLARSSL_DEBUG_C
1506 *
1507 * Enable the debug functions.
1508 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001509 * Module: library/debug.c
1510 * Caller: library/ssl_cli.c
1511 * library/ssl_srv.c
1512 * library/ssl_tls.c
1513 *
1514 * This module provides debugging functions.
1515 */
Paul Bakker40e46942009-01-03 21:51:57 +00001516#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001517
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001518/**
1519 * \def POLARSSL_DES_C
1520 *
1521 * Enable the DES block cipher.
1522 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001523 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001524 * Caller: library/pem.c
1525 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001526 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001527 * This module enables the following ciphersuites (if other requisites are
1528 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001529 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1530 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001531 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001532 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001533 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1534 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1535 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1536 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1537 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001538 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001539 *
Paul Bakkercff68422013-09-15 20:43:33 +02001540 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001541 */
Paul Bakker40e46942009-01-03 21:51:57 +00001542#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001543
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001544/**
1545 * \def POLARSSL_DHM_C
1546 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001547 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001548 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001549 * Module: library/dhm.c
1550 * Caller: library/ssl_cli.c
1551 * library/ssl_srv.c
1552 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001553 * This module is used by the following key exchanges:
1554 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001555 */
Paul Bakker40e46942009-01-03 21:51:57 +00001556#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001557
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001558/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001559 * \def POLARSSL_ECDH_C
1560 *
1561 * Enable the elliptic curve Diffie-Hellman library.
1562 *
1563 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001564 * Caller: library/ssl_cli.c
1565 * library/ssl_srv.c
1566 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001567 * This module is used by the following key exchanges:
1568 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001569 *
1570 * Requires: POLARSSL_ECP_C
1571 */
1572#define POLARSSL_ECDH_C
1573
1574/**
1575 * \def POLARSSL_ECDSA_C
1576 *
1577 * Enable the elliptic curve DSA library.
1578 *
1579 * Module: library/ecdsa.c
1580 * Caller:
1581 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001582 * This module is used by the following key exchanges:
1583 * ECDHE-ECDSA
1584 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001585 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001586 */
1587#define POLARSSL_ECDSA_C
1588
1589/**
1590 * \def POLARSSL_ECP_C
1591 *
1592 * Enable the elliptic curve over GF(p) library.
1593 *
1594 * Module: library/ecp.c
1595 * Caller: library/ecdh.c
1596 * library/ecdsa.c
1597 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001598 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001599 */
1600#define POLARSSL_ECP_C
1601
1602/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001603 * \def POLARSSL_ENTROPY_C
1604 *
1605 * Enable the platform-specific entropy code.
1606 *
1607 * Module: library/entropy.c
1608 * Caller:
1609 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001610 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001611 *
1612 * This module provides a generic entropy pool
1613 */
1614#define POLARSSL_ENTROPY_C
1615
1616/**
Paul Bakker9d781402011-05-09 16:17:09 +00001617 * \def POLARSSL_ERROR_C
1618 *
1619 * Enable error code to error string conversion.
1620 *
1621 * Module: library/error.c
1622 * Caller:
1623 *
Shuo Chen95a0d112014-04-04 21:04:40 -07001624 * This module enables polarssl_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001625 */
1626#define POLARSSL_ERROR_C
1627
1628/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001629 * \def POLARSSL_GCM_C
1630 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001631 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001632 *
1633 * Module: library/gcm.c
1634 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001635 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001636 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001637 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1638 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001639 */
1640#define POLARSSL_GCM_C
1641
1642/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001643 * \def POLARSSL_HAVEGE_C
1644 *
1645 * Enable the HAVEGE random generator.
1646 *
Paul Bakker2a844242013-06-24 13:01:53 +02001647 * Warning: the HAVEGE random generator is not suitable for virtualized
1648 * environments
1649 *
1650 * Warning: the HAVEGE random generator is dependent on timing and specific
1651 * processor traits. It is therefore not advised to use HAVEGE as
1652 * your applications primary random generator or primary entropy pool
1653 * input. As a secondary input to your entropy pool, it IS able add
1654 * the (limited) extra entropy it provides.
1655 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001656 * Module: library/havege.c
1657 * Caller:
1658 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001659 * Requires: POLARSSL_TIMING_C
1660 *
Paul Bakker2a844242013-06-24 13:01:53 +02001661 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001662 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001663//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001664
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001665/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001666 * \def POLARSSL_HMAC_DRBG_C
1667 *
1668 * Enable the HMAC_DRBG random generator.
1669 *
1670 * Module: library/hmac_drbg.c
1671 * Caller:
1672 *
1673 * Requires: POLARSSL_MD_C
1674 *
1675 * Uncomment to enable the HMAC_DRBG random number geerator.
1676 */
1677#define POLARSSL_HMAC_DRBG_C
1678
1679/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001680 * \def POLARSSL_MD_C
1681 *
1682 * Enable the generic message digest layer.
1683 *
Paul Bakker17373852011-01-06 14:20:01 +00001684 * Module: library/md.c
1685 * Caller:
1686 *
1687 * Uncomment to enable generic message digest wrappers.
1688 */
1689#define POLARSSL_MD_C
1690
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001691/**
1692 * \def POLARSSL_MD2_C
1693 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001694 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001695 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001696 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001697 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001698 *
1699 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001700 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001701//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001702
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001703/**
1704 * \def POLARSSL_MD4_C
1705 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001706 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001707 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001708 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001709 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001710 *
1711 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001712 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001713//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001714
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001715/**
1716 * \def POLARSSL_MD5_C
1717 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001718 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001719 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001720 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001721 * Caller: library/md.c
1722 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001723 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001724 *
1725 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001726 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001727 */
Paul Bakker40e46942009-01-03 21:51:57 +00001728#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001729
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001730/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001731 * \def POLARSSL_MEMORY_C
Manuel Pégourié-Gonnard71432842015-03-20 16:19:35 +00001732 *
1733 * \deprecated Use POLARSSL_PLATFORM_MEMORY instead.
1734 *
Manuel Pégourié-Gonnard0a155b82015-01-23 17:28:27 +00001735 * Depends on: POLARSSL_PLATFORM_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001736 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001737//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001738
1739/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001740 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1741 *
1742 * Enable the buffer allocator implementation that makes use of a (stack)
1743 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1744 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001745 *
1746 * Module: library/memory_buffer_alloc.c
1747 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001748 * Requires: POLARSSL_PLATFORM_C
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001749 * POLARSSL_PLATFORM_MEMORY (to use it within mbed TLS)
Paul Bakker6e339b52013-07-03 13:37:05 +02001750 *
1751 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001752 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001753//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001754
1755/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001756 * \def POLARSSL_NET_C
1757 *
1758 * Enable the TCP/IP networking routines.
1759 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001760 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001761 *
1762 * This module provides TCP/IP networking routines.
1763 */
Paul Bakker40e46942009-01-03 21:51:57 +00001764#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001765
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001766/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001767 * \def POLARSSL_OID_C
1768 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001769 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001770 *
1771 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001772 * Caller: library/asn1write.c
1773 * library/pkcs5.c
1774 * library/pkparse.c
1775 * library/pkwrite.c
1776 * library/rsa.c
1777 * library/x509.c
1778 * library/x509_create.c
1779 * library/x509_crl.c
1780 * library/x509_crt.c
1781 * library/x509_csr.c
1782 * library/x509write_crt.c
1783 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001784 *
1785 * This modules translates between OIDs and internal values.
1786 */
1787#define POLARSSL_OID_C
1788
1789/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001790 * \def POLARSSL_PADLOCK_C
1791 *
1792 * Enable VIA Padlock support on x86.
1793 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001794 * Module: library/padlock.c
1795 * Caller: library/aes.c
1796 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001797 * Requires: POLARSSL_HAVE_ASM
1798 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001799 * This modules adds support for the VIA PadLock on x86.
1800 */
Paul Bakker40e46942009-01-03 21:51:57 +00001801#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001802
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001803/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001804 * \def POLARSSL_PBKDF2_C
1805 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001806 * Enable PKCS#5 PBKDF2 key derivation function.
Manuel Pégourié-Gonnard71432842015-03-20 16:19:35 +00001807 *
1808 * \deprecated Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001809 *
1810 * Module: library/pbkdf2.c
1811 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001812 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001813 *
1814 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001815 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001816#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001817
1818/**
Paul Bakkercff68422013-09-15 20:43:33 +02001819 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001820 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001821 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001822 *
1823 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001824 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001825 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001826 * library/x509_crl.c
1827 * library/x509_crt.c
1828 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001829 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001830 * Requires: POLARSSL_BASE64_C
1831 *
Paul Bakkercff68422013-09-15 20:43:33 +02001832 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001833 */
Paul Bakkercff68422013-09-15 20:43:33 +02001834#define POLARSSL_PEM_PARSE_C
1835
1836/**
1837 * \def POLARSSL_PEM_WRITE_C
1838 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001839 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001840 *
1841 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001842 * Caller: library/pkwrite.c
1843 * library/x509write_crt.c
1844 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001845 *
1846 * Requires: POLARSSL_BASE64_C
1847 *
1848 * This modules adds support for encoding / writing PEM files.
1849 */
1850#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001851
1852/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001853 * \def POLARSSL_PK_C
1854 *
1855 * Enable the generic public (asymetric) key layer.
1856 *
1857 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001858 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001859 * library/ssl_cli.c
1860 * library/ssl_srv.c
1861 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001862 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1863 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001864 * Uncomment to enable generic public key wrappers.
1865 */
1866#define POLARSSL_PK_C
1867
1868/**
Paul Bakker4606c732013-09-15 17:04:23 +02001869 * \def POLARSSL_PK_PARSE_C
1870 *
1871 * Enable the generic public (asymetric) key parser.
1872 *
1873 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001874 * Caller: library/x509_crt.c
1875 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001876 *
1877 * Requires: POLARSSL_PK_C
1878 *
1879 * Uncomment to enable generic public key parse functions.
1880 */
1881#define POLARSSL_PK_PARSE_C
1882
1883/**
1884 * \def POLARSSL_PK_WRITE_C
1885 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001886 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001887 *
1888 * Module: library/pkwrite.c
1889 * Caller: library/x509write.c
1890 *
1891 * Requires: POLARSSL_PK_C
1892 *
1893 * Uncomment to enable generic public key write functions.
1894 */
1895#define POLARSSL_PK_WRITE_C
1896
1897/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001898 * \def POLARSSL_PKCS5_C
1899 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001900 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001901 *
1902 * Module: library/pkcs5.c
1903 *
1904 * Requires: POLARSSL_MD_C
1905 *
1906 * This module adds support for the PKCS#5 functions.
1907 */
1908#define POLARSSL_PKCS5_C
1909
1910/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001911 * \def POLARSSL_PKCS11_C
1912 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001913 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001914 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001915 * Module: library/pkcs11.c
1916 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001917 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001918 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001919 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001920 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001921 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001922 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001923//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001924
1925/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001926 * \def POLARSSL_PKCS12_C
1927 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001928 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001929 * Adds algorithms for parsing PKCS#8 encrypted private keys
1930 *
1931 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001932 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001933 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001934 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1935 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001936 *
1937 * This module enables PKCS#12 functions.
1938 */
1939#define POLARSSL_PKCS12_C
1940
1941/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001942 * \def POLARSSL_PLATFORM_C
1943 *
1944 * Enable the platform abstraction layer that allows you to re-assign
Rich Evansc39cb492015-01-30 12:01:34 +00001945 * functions like malloc(), free(), snprintf(), printf(), fprintf(), exit()
Paul Bakker747a83a2014-02-01 22:50:07 +01001946 *
Rich Evans16f8cd82015-02-06 16:14:34 +00001947 * Enabling POLARSSL_PLATFORM_C enables to use of POLARSSL_PLATFORM_XXX_ALT
1948 * or POLARSSL_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
1949 * above to be specified at runtime or compile time respectively.
1950 *
Paul Bakker747a83a2014-02-01 22:50:07 +01001951 * Module: library/platform.c
1952 * Caller: Most other .c files
1953 *
1954 * This module enables abstraction of common (libc) functions.
1955 */
1956#define POLARSSL_PLATFORM_C
1957
1958/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001959 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001960 *
1961 * Enable the RIPEMD-160 hash algorithm.
1962 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001963 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001964 * Caller: library/md.c
1965 *
1966 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001967#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001968
1969/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001970 * \def POLARSSL_RSA_C
1971 *
1972 * Enable the RSA public-key cryptosystem.
1973 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001974 * Module: library/rsa.c
1975 * Caller: library/ssl_cli.c
1976 * library/ssl_srv.c
1977 * library/ssl_tls.c
1978 * library/x509.c
1979 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001980 * This module is used by the following key exchanges:
1981 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001982 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001983 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001984 */
Paul Bakker40e46942009-01-03 21:51:57 +00001985#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001986
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001987/**
1988 * \def POLARSSL_SHA1_C
1989 *
1990 * Enable the SHA1 cryptographic hash algorithm.
1991 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001992 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001993 * Caller: library/md.c
1994 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001995 * library/ssl_srv.c
1996 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001997 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001998 *
1999 * This module is required for SSL/TLS and SHA1-signed certificates.
2000 */
Paul Bakker40e46942009-01-03 21:51:57 +00002001#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002002
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002003/**
Paul Bakker9e36f042013-06-30 14:34:05 +02002004 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002005 *
2006 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02002007 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002008 *
Paul Bakker9e36f042013-06-30 14:34:05 +02002009 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002010 * Caller: library/entropy.c
2011 * library/md.c
2012 * library/ssl_cli.c
2013 * library/ssl_srv.c
2014 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002015 *
2016 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01002017 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00002018 */
Paul Bakker9e36f042013-06-30 14:34:05 +02002019#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002020
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002021/**
Paul Bakker9e36f042013-06-30 14:34:05 +02002022 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002023 *
2024 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02002025 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002026 *
Paul Bakker9e36f042013-06-30 14:34:05 +02002027 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002028 * Caller: library/entropy.c
2029 * library/md.c
2030 * library/ssl_cli.c
2031 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002032 *
2033 * This module adds support for SHA-384 and SHA-512.
2034 */
Paul Bakker9e36f042013-06-30 14:34:05 +02002035#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002036
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002037/**
Paul Bakker0a597072012-09-25 21:55:46 +00002038 * \def POLARSSL_SSL_CACHE_C
2039 *
2040 * Enable simple SSL cache implementation.
2041 *
2042 * Module: library/ssl_cache.c
2043 * Caller:
2044 *
2045 * Requires: POLARSSL_SSL_CACHE_C
2046 */
2047#define POLARSSL_SSL_CACHE_C
2048
2049/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002050 * \def POLARSSL_SSL_CLI_C
2051 *
2052 * Enable the SSL/TLS client code.
2053 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002054 * Module: library/ssl_cli.c
2055 * Caller:
2056 *
Paul Bakker5690efc2011-05-26 13:16:06 +00002057 * Requires: POLARSSL_SSL_TLS_C
2058 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002059 * This module is required for SSL/TLS client support.
2060 */
Paul Bakker40e46942009-01-03 21:51:57 +00002061#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002062
Paul Bakker9a736322012-11-14 12:39:52 +00002063/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002064 * \def POLARSSL_SSL_SRV_C
2065 *
2066 * Enable the SSL/TLS server code.
2067 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002068 * Module: library/ssl_srv.c
2069 * Caller:
2070 *
Paul Bakker5690efc2011-05-26 13:16:06 +00002071 * Requires: POLARSSL_SSL_TLS_C
2072 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002073 * This module is required for SSL/TLS server support.
2074 */
Paul Bakker40e46942009-01-03 21:51:57 +00002075#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002076
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002077/**
2078 * \def POLARSSL_SSL_TLS_C
2079 *
Paul Bakkere29ab062011-05-18 13:26:54 +00002080 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002081 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002082 * Module: library/ssl_tls.c
2083 * Caller: library/ssl_cli.c
2084 * library/ssl_srv.c
2085 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002086 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02002087 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00002088 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002089 * This module is required for SSL/TLS.
2090 */
Paul Bakker40e46942009-01-03 21:51:57 +00002091#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002092
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002093/**
Paul Bakker2466d932013-09-28 14:40:38 +02002094 * \def POLARSSL_THREADING_C
2095 *
2096 * Enable the threading abstraction layer.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002097 * By default mbed TLS assumes it is used in a non-threaded environment or that
Paul Bakker2466d932013-09-28 14:40:38 +02002098 * contexts are not shared between threads. If you do intend to use contexts
2099 * between threads, you will need to enable this layer to prevent race
2100 * conditions.
2101 *
2102 * Module: library/threading.c
2103 *
2104 * This allows different threading implementations (self-implemented or
2105 * provided).
2106 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01002107 * You will have to enable either POLARSSL_THREADING_ALT or
2108 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02002109 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002110 * Enable this layer to allow use of mutexes within mbed TLS
Paul Bakker2466d932013-09-28 14:40:38 +02002111 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02002112//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002113
2114/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002115 * \def POLARSSL_TIMING_C
2116 *
2117 * Enable the portable timing interface.
2118 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002119 * Module: library/timing.c
2120 * Caller: library/havege.c
2121 *
2122 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002123 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02002124#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002125
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002126/**
2127 * \def POLARSSL_VERSION_C
2128 *
2129 * Enable run-time version information.
2130 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00002131 * Module: library/version.c
2132 *
2133 * This module provides run-time version information.
2134 */
2135#define POLARSSL_VERSION_C
2136
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002137/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002138 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002139 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002140 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002141 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002142 * Module: library/x509.c
2143 * Caller: library/x509_crl.c
2144 * library/x509_crt.c
2145 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002146 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02002147 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02002148 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002149 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002150 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00002151 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002152#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002153
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002154/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002155 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002156 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002157 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002158 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002159 * Module: library/x509_crt.c
2160 * Caller: library/ssl_cli.c
2161 * library/ssl_srv.c
2162 * library/ssl_tls.c
2163 *
2164 * Requires: POLARSSL_X509_USE_C
2165 *
2166 * This module is required for X.509 certificate parsing.
2167 */
2168#define POLARSSL_X509_CRT_PARSE_C
2169
2170/**
2171 * \def POLARSSL_X509_CRL_PARSE_C
2172 *
2173 * Enable X.509 CRL parsing.
2174 *
2175 * Module: library/x509_crl.c
2176 * Caller: library/x509_crt.c
2177 *
2178 * Requires: POLARSSL_X509_USE_C
2179 *
2180 * This module is required for X.509 CRL parsing.
2181 */
2182#define POLARSSL_X509_CRL_PARSE_C
2183
2184/**
2185 * \def POLARSSL_X509_CSR_PARSE_C
2186 *
2187 * Enable X.509 Certificate Signing Request (CSR) parsing.
2188 *
2189 * Module: library/x509_csr.c
2190 * Caller: library/x509_crt_write.c
2191 *
2192 * Requires: POLARSSL_X509_USE_C
2193 *
2194 * This module is used for reading X.509 certificate request.
2195 */
2196#define POLARSSL_X509_CSR_PARSE_C
2197
2198/**
2199 * \def POLARSSL_X509_CREATE_C
2200 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002201 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002202 *
2203 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002204 *
Paul Bakker4606c732013-09-15 17:04:23 +02002205 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002206 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002207 * This module is the basis for creating X.509 certificates and CSRs.
2208 */
2209#define POLARSSL_X509_CREATE_C
2210
2211/**
2212 * \def POLARSSL_X509_CRT_WRITE_C
2213 *
2214 * Enable creating X.509 certificates.
2215 *
2216 * Module: library/x509_crt_write.c
2217 *
2218 * Requires: POLARSSL_CREATE_C
2219 *
2220 * This module is required for X.509 certificate creation.
2221 */
2222#define POLARSSL_X509_CRT_WRITE_C
2223
2224/**
2225 * \def POLARSSL_X509_CSR_WRITE_C
2226 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002227 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002228 *
2229 * Module: library/x509_csr_write.c
2230 *
2231 * Requires: POLARSSL_CREATE_C
2232 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002233 * This module is required for X.509 certificate request writing.
2234 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002235#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002236
2237/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002238 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002239 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002240 * Enable the XTEA block cipher.
2241 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002242 * Module: library/xtea.c
2243 * Caller:
2244 */
2245#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002246
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002247/* \} name SECTION: mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002248
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002249/**
2250 * \name SECTION: Module configuration options
2251 *
2252 * This section allows for the setting of module specific sizes and
2253 * configuration options. The default values are already present in the
2254 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002255 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002256 * Our advice is to enable options and change their values here
2257 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002258 *
2259 * Please check the respective header file for documentation on these
2260 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002261 * \{
2262 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002263
Paul Bakker088c5c52014-04-25 11:11:10 +02002264/* MPI / BIGNUM options */
2265//#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
Manuel Pégourié-Gonnardda1b4de2014-09-08 17:03:50 +02002266//#define POLARSSL_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002267
Paul Bakker088c5c52014-04-25 11:11:10 +02002268/* CTR_DRBG options */
2269//#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2270//#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2271//#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2272//#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2273//#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002274
Paul Bakker088c5c52014-04-25 11:11:10 +02002275/* HMAC_DRBG options */
2276//#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2277//#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2278//#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2279//#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002280
Paul Bakker088c5c52014-04-25 11:11:10 +02002281/* ECP options */
2282//#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2283//#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2284//#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002285
Paul Bakker088c5c52014-04-25 11:11:10 +02002286/* Entropy options */
2287//#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2288//#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002289
Paul Bakker088c5c52014-04-25 11:11:10 +02002290/* Memory buffer allocator options */
Manuel Pégourié-Gonnard4d8db4a2014-05-05 14:04:28 +02002291//#define POLARSSL_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002292
Paul Bakker088c5c52014-04-25 11:11:10 +02002293/* Platform options */
Rich Evans98081c52015-02-03 11:00:54 +00002294//#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. */
2295//#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2296//#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2297//#define POLARSSL_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2298//#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2299//#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
Rich Evansc39cb492015-01-30 12:01:34 +00002300//#define POLARSSL_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002301
Manuel Pégourié-Gonnardfb57e642015-03-05 13:38:29 +00002302/* To Use Function Macros POLARSSL_PLATFORM_C must be enabled */
2303/* POLARSSL_PLATFORM_XXX_MACRO and POLARSSL_PLATFORM_XXX_ALT cannot both be defined */
Rich Evans4cc8a222015-02-03 11:26:31 +00002304//#define POLARSSL_PLATFORM_MALLOC_MACRO malloc /**< Default allocator macro to use, can be undefined */
2305//#define POLARSSL_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2306//#define POLARSSL_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2307//#define POLARSSL_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2308//#define POLARSSL_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
2309//#define POLARSSL_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
2310
Paul Bakker088c5c52014-04-25 11:11:10 +02002311/* SSL Cache options */
2312//#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2313//#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002314
Paul Bakker088c5c52014-04-25 11:11:10 +02002315/* SSL options */
2316//#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2317//#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Manuel Pégourié-Gonnard481fcfd2014-07-03 16:12:50 +02002318//#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 +02002319
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002320/**
2321 * Complete list of ciphersuites to use, in order of preference.
2322 *
2323 * \warning No dependency checking is done on that field! This option can only
2324 * be used to restrict the set of available ciphersuites. It is your
2325 * responsibility to make sure the needed modules are active.
2326 *
2327 * Use this to save a few hundred bytes of ROM (default ordering of all
2328 * available ciphersuites) and a few to a few hundred bytes of RAM.
2329 *
2330 * The value below is only an example, not the default.
2331 */
2332//#define SSL_CIPHERSUITES TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
2333
Paul Bakkereaebbd52014-04-25 15:04:14 +02002334/* Debug options */
2335//#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */
2336
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002337/* X509 options */
2338//#define POLARSSL_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
2339
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002340/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002341
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002342#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002343
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002344#endif /* POLARSSL_CONFIG_H */