blob: 76972dd02c706f132535316a6626ea98043d2c58 [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é-Gonnarda98af5e2015-04-09 14:40:46 +0200110 * \warning As of 1.3.11, *not* using this flag when POLARSSL_NET_C is
111 * defined, is deprecated. The alternative legacy code will be removed in 2.0.
112 *
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100113 * Comment if your system does not support the IPv6 socket interface
114 */
115#define POLARSSL_HAVE_IPV6
Paul Bakker747a83a2014-02-01 22:50:07 +0100116
117/**
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100118 * \def POLARSSL_PLATFORM_MEMORY
119 *
120 * Enable the memory allocation layer.
121 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000122 * By default mbed TLS uses the system-provided malloc() and free().
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100123 * This allows different allocators (self-implemented or provided) to be
124 * provided to the platform abstraction layer.
125 *
Rich Evans16f8cd82015-02-06 16:14:34 +0000126 * Enabling POLARSSL_PLATFORM_MEMORY without the
127 * POLARSSL_PLATFORM_{FREE,MALLOC}_MACROs will provide
128 * "platform_set_malloc_free()" allowing you to set an alternative malloc() and
129 * free() function pointer at runtime.
130 *
131 * Enabling POLARSSL_PLATFORM_MEMORY and specifying
132 * POLARSSL_PLATFORM_{MALLOC,FREE}_MACROs will allow you to specify the
133 * alternate function at compile time.
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100134 *
135 * Requires: POLARSSL_PLATFORM_C
136 *
137 * Enable this layer to allow use of alternative memory allocators.
138 */
139//#define POLARSSL_PLATFORM_MEMORY
140
141/**
Paul Bakker088c5c52014-04-25 11:11:10 +0200142 * \def POLARSSL_PLATFORM_NO_STD_FUNCTIONS
143 *
144 * Do not assign standard functions in the platform layer (e.g. malloc() to
145 * POLARSSL_PLATFORM_STD_MALLOC and printf() to POLARSSL_PLATFORM_STD_PRINTF)
146 *
147 * This makes sure there are no linking errors on platforms that do not support
148 * these functions. You will HAVE to provide alternatives, either at runtime
149 * via the platform_set_xxx() functions or at compile time by setting
Rich Evans16f8cd82015-02-06 16:14:34 +0000150 * the POLARSSL_PLATFORM_STD_XXX defines, or enabling a
151 * POLARSSL_PLATFORM_XXX_MACRO.
Paul Bakker088c5c52014-04-25 11:11:10 +0200152 *
153 * Requires: POLARSSL_PLATFORM_C
154 *
155 * Uncomment to prevent default assignment of standard functions in the
156 * platform layer.
157 */
158//#define POLARSSL_PLATFORM_NO_STD_FUNCTIONS
159
160/**
Paul Bakker747a83a2014-02-01 22:50:07 +0100161 * \def POLARSSL_PLATFORM_XXX_ALT
162 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000163 * Uncomment a macro to let mbed TLS support the function in the platform
Paul Bakker747a83a2014-02-01 22:50:07 +0100164 * abstraction layer.
165 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000166 * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, mbed TLS will
Paul Bakker747a83a2014-02-01 22:50:07 +0100167 * provide a function "platform_set_printf()" that allows you to set an
168 * alternative printf function pointer.
169 *
170 * All these define require POLARSSL_PLATFORM_C to be defined!
171 *
Rich Evans46b0a8d2015-01-30 10:47:32 +0000172 * WARNING: POLARSSL_PLATFORM_SNPRINTF_ALT is not available on Windows
173 * for compatibility reasons.
174 *
Rich Evans16f8cd82015-02-06 16:14:34 +0000175 * WARNING: POLARSSL_PLATFORM_XXX_ALT cannot be defined at the same time as
176 * POLARSSL_PLATFORM_XXX_MACRO!
177 *
Paul Bakker747a83a2014-02-01 22:50:07 +0100178 * Uncomment a macro to enable alternate implementation of specific base
179 * platform function
180 */
Rich Evansc39cb492015-01-30 12:01:34 +0000181//#define POLARSSL_PLATFORM_EXIT_ALT
Rich Evans98081c52015-02-03 11:00:54 +0000182//#define POLARSSL_PLATFORM_FPRINTF_ALT
183//#define POLARSSL_PLATFORM_PRINTF_ALT
184//#define POLARSSL_PLATFORM_SNPRINTF_ALT
Manuel Pégourié-Gonnardc70581c2015-03-23 13:58:27 +0100185
186/**
187 * \def POLARSSL_DEPRECATED_WARNING
188 *
189 * Mark deprecated functions so that they generate a warning if used.
190 * Functions deprecated in one version will usually be removed in the next
191 * version. You can enable this to help you prepare the transition to a new
192 * major version by making sure your code is not using these functions.
193 *
194 * This only works with GCC and Clang. With other compilers, you may want to
195 * use POLARSSL_DEPRECATED_REMOVED
196 *
197 * Uncomment to get warnings on using deprecated functions.
198 */
199//#define POLARSSL_DEPRECATED_WARNING
200
201/**
202 * \def POLARSSL_DEPRECATED_REMOVED
203 *
204 * Remove deprecated functions so that they generate an error if used.
205 * Functions deprecated in one version will usually be removed in the next
206 * version. You can enable this to help you prepare the transition to a new
207 * major version by making sure your code is not using these functions.
208 *
209 * Uncomment to get errors on using deprecated functions.
210 */
211//#define POLARSSL_DEPRECATED_REMOVED
212
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200213/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000214
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000215/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000216 * \name SECTION: mbed TLS feature support
Paul Bakker0a62cd12011-01-21 11:00:08 +0000217 *
218 * This section sets support for features that are or are not needed
219 * within the modules that are enabled.
220 * \{
221 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000222
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000223/**
Paul Bakkerf2561b32014-02-06 15:11:55 +0100224 * \def POLARSSL_TIMING_ALT
225 *
226 * Uncomment to provide your own alternate implementation for hardclock(),
227 * get_timer(), set_alarm() and m_sleep().
228 *
229 * Only works if you have POLARSSL_TIMING_C enabled.
230 *
231 * You will need to provide a header "timing_alt.h" and an implementation at
232 * compile time.
233 */
234//#define POLARSSL_TIMING_ALT
235
236/**
Paul Bakker90995b52013-06-24 19:20:35 +0200237 * \def POLARSSL_XXX_ALT
238 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000239 * Uncomment a macro to let mbed TLS use your alternate core implementation of
Paul Bakker90995b52013-06-24 19:20:35 +0200240 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
241 * implementations). Keep in mind that the function prototypes should remain
242 * the same.
243 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000244 * Example: In case you uncomment POLARSSL_AES_ALT, mbed TLS will no longer
Paul Bakker90995b52013-06-24 19:20:35 +0200245 * provide the "struct aes_context" definition and omit the base function
246 * declarations and implementations. "aes_alt.h" will be included from
247 * "aes.h" to include the new function definitions.
248 *
249 * Uncomment a macro to enable alternate implementation for core algorithm
250 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200251 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200252//#define POLARSSL_AES_ALT
253//#define POLARSSL_ARC4_ALT
254//#define POLARSSL_BLOWFISH_ALT
255//#define POLARSSL_CAMELLIA_ALT
256//#define POLARSSL_DES_ALT
257//#define POLARSSL_XTEA_ALT
258//#define POLARSSL_MD2_ALT
259//#define POLARSSL_MD4_ALT
260//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100261//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200262//#define POLARSSL_SHA1_ALT
263//#define POLARSSL_SHA256_ALT
264//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200265
266/**
Paul Bakker15566e42011-04-24 21:19:15 +0000267 * \def POLARSSL_AES_ROM_TABLES
268 *
269 * Store the AES tables in ROM.
270 *
271 * Uncomment this macro to store the AES tables in ROM.
Paul Bakker15566e42011-04-24 21:19:15 +0000272 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200273//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000274
275/**
Manuel Pégourié-Gonnarda82135c2015-04-03 16:28:19 +0200276 * \def POLARSSL_CAMELLIA_SMALL_MEMORY
277 *
278 * Use less ROM for the Camellia implementation (saves about 768 bytes).
279 *
280 * Uncomment this macro to use less memory for Camellia.
281 */
282//#define POLARSSL_CAMELLIA_SMALL_MEMORY
283
284/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200285 * \def POLARSSL_CIPHER_MODE_CBC
286 *
287 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
288 */
289#define POLARSSL_CIPHER_MODE_CBC
290
291/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000292 * \def POLARSSL_CIPHER_MODE_CFB
293 *
294 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
295 */
296#define POLARSSL_CIPHER_MODE_CFB
297
298/**
299 * \def POLARSSL_CIPHER_MODE_CTR
300 *
301 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
302 */
303#define POLARSSL_CIPHER_MODE_CTR
304
305/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000306 * \def POLARSSL_CIPHER_NULL_CIPHER
307 *
308 * Enable NULL cipher.
309 * Warning: Only do so when you know what you are doing. This allows for
310 * encryption or channels without any security!
311 *
312 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
313 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100314 * TLS_ECDH_ECDSA_WITH_NULL_SHA
315 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200316 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100317 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200318 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200319 * TLS_ECDHE_PSK_WITH_NULL_SHA256
320 * TLS_ECDHE_PSK_WITH_NULL_SHA
321 * TLS_DHE_PSK_WITH_NULL_SHA384
322 * TLS_DHE_PSK_WITH_NULL_SHA256
323 * TLS_DHE_PSK_WITH_NULL_SHA
324 * TLS_RSA_WITH_NULL_SHA256
325 * TLS_RSA_WITH_NULL_SHA
326 * TLS_RSA_WITH_NULL_MD5
327 * TLS_RSA_PSK_WITH_NULL_SHA384
328 * TLS_RSA_PSK_WITH_NULL_SHA256
329 * TLS_RSA_PSK_WITH_NULL_SHA
330 * TLS_PSK_WITH_NULL_SHA384
331 * TLS_PSK_WITH_NULL_SHA256
332 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000333 *
334 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000335 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200336//#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000337
338/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200339 * \def POLARSSL_CIPHER_PADDING_XXX
340 *
341 * Uncomment or comment macros to add support for specific padding modes
342 * in the cipher layer with cipher modes that support padding (e.g. CBC)
343 *
344 * If you disable all padding modes, only full blocks can be used with CBC.
345 *
346 * Enable padding modes in the cipher layer.
347 */
348#define POLARSSL_CIPHER_PADDING_PKCS7
349#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
350#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
351#define POLARSSL_CIPHER_PADDING_ZEROS
352
353/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000354 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
355 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200356 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000357 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000358 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000359 *
360 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000361 * TLS_RSA_WITH_DES_CBC_SHA
362 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000363 *
364 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000365 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200366//#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000367
368/**
Manuel Pégourié-Gonnard01edb102014-06-24 22:42:34 +0200369 * \def POLARSSL_REMOVE_ARC4_CIPHERSUITES
370 *
371 * Remove RC4 ciphersuites by default in SSL / TLS.
372 * This flag removes the ciphersuites based on RC4 from the default list as
373 * returned by ssl_list_ciphersuites(). However, it is still possible to
374 * enable (some of) them with ssl_set_ciphersuites() by including them
375 * explicitly.
376 *
377 * Uncomment this macro to remove RC4 ciphersuites by default.
378 */
379//#define POLARSSL_REMOVE_ARC4_CIPHERSUITES
380
381/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200382 * \def POLARSSL_ECP_XXXX_ENABLED
383 *
384 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200385 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200386 *
387 * Comment macros to disable the curve and functions for it
388 */
389#define POLARSSL_ECP_DP_SECP192R1_ENABLED
390#define POLARSSL_ECP_DP_SECP224R1_ENABLED
391#define POLARSSL_ECP_DP_SECP256R1_ENABLED
392#define POLARSSL_ECP_DP_SECP384R1_ENABLED
393#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100394#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100395#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100396#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200397#define POLARSSL_ECP_DP_BP256R1_ENABLED
398#define POLARSSL_ECP_DP_BP384R1_ENABLED
399#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100400//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
401#define POLARSSL_ECP_DP_M255_ENABLED
402//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
403//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200404
405/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200406 * \def POLARSSL_ECP_NIST_OPTIM
407 *
408 * Enable specific 'modulo p' routines for each NIST prime.
409 * Depending on the prime and architecture, makes operations 4 to 8 times
410 * faster on the corresponding curve.
411 *
412 * Comment this macro to disable NIST curves optimisation.
413 */
414#define POLARSSL_ECP_NIST_OPTIM
415
416/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100417 * \def POLARSSL_ECDSA_DETERMINISTIC
418 *
419 * Enable deterministic ECDSA (RFC 6979).
420 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
421 * may result in a compromise of the long-term signing key. This is avoided by
422 * the deterministic variant.
423 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100424 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100425 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100426 * Comment this macro to disable deterministic ECDSA.
427 */
428#define POLARSSL_ECDSA_DETERMINISTIC
429
430/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200431 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
432 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200433 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200434 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200435 * This enables the following ciphersuites (if other requisites are
436 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200437 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200438 * TLS_PSK_WITH_AES_256_CBC_SHA384
439 * TLS_PSK_WITH_AES_256_CBC_SHA
440 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
441 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
442 * TLS_PSK_WITH_AES_128_GCM_SHA256
443 * TLS_PSK_WITH_AES_128_CBC_SHA256
444 * TLS_PSK_WITH_AES_128_CBC_SHA
445 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
446 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
447 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
448 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200449 */
450#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
451
452/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200453 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
454 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200455 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200456 *
457 * Requires: POLARSSL_DHM_C
458 *
459 * This enables the following ciphersuites (if other requisites are
460 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200461 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200462 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
463 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
464 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
465 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
466 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
467 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
468 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
469 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
470 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
471 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
472 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200473 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200474#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200475
476/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200477 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
478 *
479 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
480 *
481 * Requires: POLARSSL_ECDH_C
482 *
483 * This enables the following ciphersuites (if other requisites are
484 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200485 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200486 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200487 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200488 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
489 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
490 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
491 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
492 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200493 */
494#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
495
496/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200497 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
498 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200499 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200500 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200501 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200502 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200503 *
504 * This enables the following ciphersuites (if other requisites are
505 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200506 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200507 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
508 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
509 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
510 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
511 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
512 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
513 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
514 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
515 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
516 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
517 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200518 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200519#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200520
521/**
522 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
523 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200524 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200525 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200526 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200527 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200528 *
529 * This enables the following ciphersuites (if other requisites are
530 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200531 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200532 * TLS_RSA_WITH_AES_256_CBC_SHA256
533 * TLS_RSA_WITH_AES_256_CBC_SHA
534 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200535 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200536 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
537 * TLS_RSA_WITH_AES_128_GCM_SHA256
538 * TLS_RSA_WITH_AES_128_CBC_SHA256
539 * TLS_RSA_WITH_AES_128_CBC_SHA
540 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
541 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
542 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200543 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200544 * TLS_RSA_WITH_RC4_128_SHA
545 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200546 */
547#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
548
549/**
550 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
551 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200552 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200553 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200554 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200555 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200556 *
557 * This enables the following ciphersuites (if other requisites are
558 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200559 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200560 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200561 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
562 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200563 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200564 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
565 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
566 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
567 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
568 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
569 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
570 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200571 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
572 */
573#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
574
575/**
576 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
577 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200578 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200579 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200580 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200581 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200582 *
583 * This enables the following ciphersuites (if other requisites are
584 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200585 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200586 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
587 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
588 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200589 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200590 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
591 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
592 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
593 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
594 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
595 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
596 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200597 */
598#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
599
600/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200601 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
602 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200603 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200604 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200605 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200606 *
607 * This enables the following ciphersuites (if other requisites are
608 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200609 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
610 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
611 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
612 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
613 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
614 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
615 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
616 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
617 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
618 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
619 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
620 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200621 */
622#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
623
624/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100625 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
626 *
627 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
628 *
629 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
630 *
631 * This enables the following ciphersuites (if other requisites are
632 * enabled as well):
633 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
634 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
635 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
636 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
637 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
638 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
639 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
640 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
641 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
642 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
643 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
644 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
645 */
646#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
647
648/**
649 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
650 *
651 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
652 *
653 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
654 *
655 * This enables the following ciphersuites (if other requisites are
656 * enabled as well):
657 * TLS_ECDH_RSA_WITH_RC4_128_SHA
658 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
659 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
660 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
661 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
662 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
663 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
664 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
665 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
666 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
667 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
668 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
669 */
670#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
671
672/**
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100673 * \def POLARSSL_PK_PARSE_EC_EXTENDED
674 *
675 * Enhance support for reading EC keys using variants of SEC1 not allowed by
676 * RFC 5915 and RFC 5480.
677 *
678 * Currently this means parsing the SpecifiedECDomain choice of EC
679 * parameters (only known groups are supported, not arbitrary domains, to
680 * avoid validation issues).
681 *
682 * Disable if you only need to support RFC 5915 + 5480 key formats.
683 */
684#define POLARSSL_PK_PARSE_EC_EXTENDED
685
686/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200687 * \def POLARSSL_ERROR_STRERROR_BC
688 *
689 * Make available the backward compatible error_strerror() next to the
690 * current polarssl_strerror().
691 *
Manuel Pégourié-Gonnarde6581762015-03-20 17:21:21 +0000692 * \deprecated Do not define this and use polarssl_strerror() instead
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200693 *
Manuel Pégourié-Gonnarde6581762015-03-20 17:21:21 +0000694 * Disable if you want to really remove the error_strerror() name
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200695 */
696#define POLARSSL_ERROR_STRERROR_BC
697
698/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100699 * \def POLARSSL_ERROR_STRERROR_DUMMY
700 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200701 * Enable a dummy error function to make use of polarssl_strerror() in
Manuel Pégourié-Gonnarddc16aa72014-06-25 12:55:12 +0200702 * third party libraries easier when POLARSSL_ERROR_C is disabled
703 * (no effect when POLARSSL_ERROR_C is enabled).
704 *
705 * You can safely disable this if POLARSSL_ERROR_C is enabled, or if you're
706 * not using polarssl_strerror() or error_strerror() in your application.
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100707 *
708 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200709 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100710 */
711#define POLARSSL_ERROR_STRERROR_DUMMY
712
713/**
Paul Bakker15566e42011-04-24 21:19:15 +0000714 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000715 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200716 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200717 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200718 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000719 */
Paul Bakker15566e42011-04-24 21:19:15 +0000720#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000721
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000722/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000723 * \def POLARSSL_FS_IO
724 *
725 * Enable functions that use the filesystem.
726 */
727#define POLARSSL_FS_IO
728
729/**
Paul Bakker43655f42011-12-15 20:11:16 +0000730 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
731 *
732 * Do not add default entropy sources. These are the platform specific,
733 * hardclock and HAVEGE based poll functions.
734 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700735 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000736 * application.
737 *
738 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000739 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200740//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000741
742/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000743 * \def POLARSSL_NO_PLATFORM_ENTROPY
744 *
745 * Do not use built-in platform entropy functions.
746 * This is useful if your platform does not support
747 * standards like the /dev/urandom or Windows CryptoAPI.
748 *
749 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000750 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200751//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000752
753/**
Paul Bakker2ceda572014-02-06 15:55:25 +0100754 * \def POLARSSL_ENTROPY_FORCE_SHA256
755 *
756 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
757 * default SHA-512 based one (if both are available).
758 *
759 * Requires: POLARSSL_SHA256_C
760 *
761 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
762 * if you have performance concerns.
763 *
764 * This option is only useful if both POLARSSL_SHA256_C and
765 * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used.
766 */
767//#define POLARSSL_ENTROPY_FORCE_SHA256
768
769/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200770 * \def POLARSSL_MEMORY_DEBUG
771 *
772 * Enable debugging of buffer allocator memory issues. Automatically prints
773 * (to stderr) all (fatal) messages on memory allocation issues. Enables
774 * function for 'debug output' of allocated memory.
775 *
776 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200777 *
778 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200779 */
780//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200781
782/**
783 * \def POLARSSL_MEMORY_BACKTRACE
784 *
785 * Include backtrace information with each allocated block.
786 *
787 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
788 * GLIBC-compatible backtrace() an backtrace_symbols() support
789 *
790 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200791 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200792//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200793
794/**
Paul Bakker48377d92013-08-30 12:06:24 +0200795 * \def POLARSSL_PKCS1_V15
796 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200797 * Enable support for PKCS#1 v1.5 encoding.
798 *
Paul Bakker48377d92013-08-30 12:06:24 +0200799 * Requires: POLARSSL_RSA_C
800 *
Paul Bakker48377d92013-08-30 12:06:24 +0200801 * This enables support for PKCS#1 v1.5 operations.
802 */
803#define POLARSSL_PKCS1_V15
804
805/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000806 * \def POLARSSL_PKCS1_V21
807 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200808 * Enable support for PKCS#1 v2.1 encoding.
809 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000810 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
811 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000812 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
813 */
814#define POLARSSL_PKCS1_V21
815
816/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000817 * \def POLARSSL_RSA_NO_CRT
818 *
819 * Do not use the Chinese Remainder Theorem for the RSA private operation.
820 *
821 * Uncomment this macro to disable the use of CRT in RSA.
822 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000823 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200824//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000825
826/**
827 * \def POLARSSL_SELF_TEST
828 *
829 * Enable the checkup functions (*_self_test).
830 */
831#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000832
833/**
Manuel Pégourié-Gonnardd056ce02014-10-29 22:29:20 +0100834 * \def POLARSSL_SSL_AEAD_RANDOM_IV
835 *
836 * Generate a random IV rather than using the record sequence number as a
837 * nonce for ciphersuites using and AEAD algorithm (GCM or CCM).
838 *
839 * Using the sequence number is generally recommended.
840 *
841 * Uncomment this macro to always use random IVs with AEAD ciphersuites.
842 */
843//#define POLARSSL_SSL_AEAD_RANDOM_IV
844
845/**
Paul Bakker40865c82013-01-31 17:13:13 +0100846 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
847 *
848 * Enable sending of alert messages in case of encountered errors as per RFC.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +0000849 * If you choose not to send the alert messages, mbed TLS can still communicate
Paul Bakker40865c82013-01-31 17:13:13 +0100850 * with other servers, only debugging of failures is harder.
851 *
852 * The advantage of not sending alert messages, is that no information is given
853 * about reasons for failures thus preventing adversaries of gaining intel.
854 *
855 * Enable sending of all alert messages
856 */
857#define POLARSSL_SSL_ALERT_MESSAGES
858
859/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100860 * \def POLARSSL_SSL_DEBUG_ALL
861 *
862 * Enable the debug messages in SSL module for all issues.
863 * Debug messages have been disabled in some places to prevent timing
864 * attacks due to (unbalanced) debugging function calls.
865 *
866 * If you need all error reporting you should enable this during debugging,
867 * but remove this for production servers that should log as well.
868 *
869 * Uncomment this macro to report all debug messages on errors introducing
870 * a timing side-channel.
871 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100872 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200873//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100874
Manuel Pégourié-Gonnard699cafa2014-10-27 13:57:03 +0100875/** \def POLARSSL_SSL_ENCRYPT_THEN_MAC
876 *
877 * Enable support for Encrypt-then-MAC, RFC 7366.
878 *
879 * This allows peers that both support it to use a more robust protection for
880 * ciphersuites using CBC, providing deep resistance against timing attacks
881 * on the padding or underlying cipher.
882 *
883 * This only affects CBC ciphersuites, and is useless if none is defined.
884 *
885 * Requires: POLARSSL_SSL_PROTO_TLS1 or
886 * POLARSSL_SSL_PROTO_TLS1_1 or
887 * POLARSSL_SSL_PROTO_TLS1_2
888 *
889 * Comment this macro to disable support for Encrypt-then-MAC
890 */
891#define POLARSSL_SSL_ENCRYPT_THEN_MAC
892
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200893/** \def POLARSSL_SSL_EXTENDED_MASTER_SECRET
894 *
895 * Enable support for Extended Master Secret, aka Session Hash
896 * (draft-ietf-tls-session-hash-02).
897 *
898 * This was introduced as "the proper fix" to the Triple Handshake familiy of
899 * attacks, but it is recommended to always use it (even if you disable
900 * renegotiation), since it actually fixes a more fundamental issue in the
901 * original SSL/TLS design, and has implications beyond Triple Handshake.
902 *
Manuel Pégourié-Gonnard769c6b62014-10-28 14:13:55 +0100903 * Requires: POLARSSL_SSL_PROTO_TLS1 or
904 * POLARSSL_SSL_PROTO_TLS1_1 or
905 * POLARSSL_SSL_PROTO_TLS1_2
906 *
Manuel Pégourié-Gonnard367381f2014-10-20 18:40:56 +0200907 * Comment this macro to disable support for Extended Master Secret.
908 */
909#define POLARSSL_SSL_EXTENDED_MASTER_SECRET
910
Paul Bakkerd66f0702013-01-31 16:57:45 +0100911/**
Manuel Pégourié-Gonnard1cbd39d2014-10-20 13:34:59 +0200912 * \def POLARSSL_SSL_FALLBACK_SCSV
913 *
914 * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
915 *
916 * For servers, it is recommended to always enable this, unless you support
917 * only one version of TLS, or know for sure that none of your clients
918 * implements a fallback strategy.
919 *
920 * For clients, you only need this if you're using a fallback strategy, which
921 * is not recommended in the first place, unless you absolutely need it to
922 * interoperate with buggy (version-intolerant) servers.
923 *
924 * Comment this macro to disable support for FALLBACK_SCSV
925 */
926#define POLARSSL_SSL_FALLBACK_SCSV
927
928/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000929 * \def POLARSSL_SSL_HW_RECORD_ACCEL
930 *
931 * Enable hooking functions in SSL module for hardware acceleration of
932 * individual records.
933 *
934 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000935 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200936//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000937
938/**
Manuel Pégourié-Gonnardd76314c2015-01-07 12:39:44 +0100939 * \def POLARSSL_SSL_CBC_RECORD_SPLITTING
940 *
941 * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
942 *
943 * This is a countermeasure to the BEAST attack, which also minimizes the risk
944 * of interoperability issues compared to sending 0-length records.
945 *
946 * Comment this macro to disable 1/n-1 record splitting.
947 */
948#define POLARSSL_SSL_CBC_RECORD_SPLITTING
949
950/**
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100951 * \def POLARSSL_SSL_DISABLE_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100952 *
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100953 * Disable support for TLS renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100954 *
955 * The two main uses of renegotiation are (1) refresh keys on long-lived
956 * connections and (2) client authentication after the initial handshake.
957 * If you don't need renegotiation, it's probably better to disable it, since
958 * it has been associated with security issues in the past and is easy to
959 * misuse/misunderstand.
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100960 *
961 * Warning: in the next stable branch, this switch will be replaced by
962 * POLARSSL_SSL_RENEGOTIATION to enable support for renegotiation.
963 *
964 * Uncomment this to disable support for renegotiation.
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100965 */
Manuel Pégourié-Gonnard03717042014-11-04 19:52:10 +0100966//#define POLARSSL_SSL_DISABLE_RENEGOTIATION
Manuel Pégourié-Gonnard615e6772014-11-03 08:23:14 +0100967
968/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100969 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
970 *
971 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200972 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100973 *
974 * Comment this macro to disable support for SSLv2 Client Hello messages.
975 */
976#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
977
978/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100979 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
980 *
981 * Pick the ciphersuite according to the client's preferences rather than ours
982 * in the SSL Server module (POLARSSL_SSL_SRV_C).
983 *
984 * Uncomment this macro to respect client's ciphersuite order
985 */
986//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
987
988/**
Paul Bakker05decb22013-08-15 13:33:48 +0200989 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
990 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200991 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200992 *
993 * Comment this macro to disable support for the max_fragment_length extension
994 */
995#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
996
997/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200998 * \def POLARSSL_SSL_PROTO_SSL3
999 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001000 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001001 *
1002 * Requires: POLARSSL_MD5_C
1003 * POLARSSL_SHA1_C
1004 *
1005 * Comment this macro to disable support for SSL 3.0
1006 */
1007#define POLARSSL_SSL_PROTO_SSL3
1008
1009/**
1010 * \def POLARSSL_SSL_PROTO_TLS1
1011 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001012 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001013 *
1014 * Requires: POLARSSL_MD5_C
1015 * POLARSSL_SHA1_C
1016 *
1017 * Comment this macro to disable support for TLS 1.0
1018 */
1019#define POLARSSL_SSL_PROTO_TLS1
1020
1021/**
1022 * \def POLARSSL_SSL_PROTO_TLS1_1
1023 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001024 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001025 *
1026 * Requires: POLARSSL_MD5_C
1027 * POLARSSL_SHA1_C
1028 *
1029 * Comment this macro to disable support for TLS 1.1
1030 */
1031#define POLARSSL_SSL_PROTO_TLS1_1
1032
1033/**
1034 * \def POLARSSL_SSL_PROTO_TLS1_2
1035 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001036 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001037 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01001038 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001039 * (Depends on ciphersuites)
1040 *
1041 * Comment this macro to disable support for TLS 1.2
1042 */
1043#define POLARSSL_SSL_PROTO_TLS1_2
1044
1045/**
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001046 * \def POLARSSL_SSL_ALPN
1047 *
Manuel Pégourié-Gonnard6b298e62014-11-20 18:28:50 +01001048 * Enable support for RFC 7301 Application Layer Protocol Negotiation.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001049 *
Paul Bakker27e36d32014-04-08 12:33:37 +02001050 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001051 */
Paul Bakker27e36d32014-04-08 12:33:37 +02001052#define POLARSSL_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +02001053
1054/**
Paul Bakkera503a632013-08-14 13:48:06 +02001055 * \def POLARSSL_SSL_SESSION_TICKETS
1056 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001057 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +02001058 *
1059 * Requires: POLARSSL_AES_C
1060 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001061 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +02001062 *
1063 * Comment this macro to disable support for SSL session tickets
1064 */
1065#define POLARSSL_SSL_SESSION_TICKETS
1066
1067/**
Paul Bakker0be444a2013-08-27 21:55:01 +02001068 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
1069 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001070 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +02001071 *
Manuel Pégourié-Gonnardbbbb3cf2015-01-28 16:44:37 +00001072 * Requires: POLARSSL_X509_CRT_PARSE_C
1073 *
Paul Bakker0be444a2013-08-27 21:55:01 +02001074 * Comment this macro to disable support for server name indication in SSL
1075 */
1076#define POLARSSL_SSL_SERVER_NAME_INDICATION
1077
1078/**
Paul Bakker1f2bc622013-08-15 13:45:55 +02001079 * \def POLARSSL_SSL_TRUNCATED_HMAC
1080 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001081 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +02001082 *
1083 * Comment this macro to disable support for truncated HMAC in SSL
1084 */
1085#define POLARSSL_SSL_TRUNCATED_HMAC
1086
1087/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001088 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001089 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001090 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001091 *
1092 * This is disabled by default since it breaks binary compatibility with the
1093 * 1.3.x line. If you choose to enable it, you will need to rebuild your
1094 * application against the new header files, relinking will not be enough.
1095 * It will be enabled by default, or no longer an option, in the 1.4 branch.
1096 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +01001097 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001098 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +01001099//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +01001100
1101/**
Paul Bakker2466d932013-09-28 14:40:38 +02001102 * \def POLARSSL_THREADING_ALT
1103 *
1104 * Provide your own alternate threading implementation.
1105 *
1106 * Requires: POLARSSL_THREADING_C
1107 *
1108 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +02001109 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001110//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +02001111
1112/**
Paul Bakker2466d932013-09-28 14:40:38 +02001113 * \def POLARSSL_THREADING_PTHREAD
1114 *
1115 * Enable the pthread wrapper layer for the threading layer.
1116 *
1117 * Requires: POLARSSL_THREADING_C
1118 *
1119 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +02001120 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001121//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +02001122
1123/**
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001124 * \def POLARSSL_VERSION_FEATURES
1125 *
1126 * Allow run-time checking of compile-time enabled features. Thus allowing users
1127 * to check at run-time if the library is for instance compiled with threading
1128 * support via version_check_feature().
1129 *
1130 * Requires: POLARSSL_VERSION_C
1131 *
1132 * Comment this to disable run-time checking and save ROM space
1133 */
1134#define POLARSSL_VERSION_FEATURES
1135
1136/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001137 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
1138 *
1139 * If set, the X509 parser will not break-off when parsing an X509 certificate
1140 * and encountering an extension in a v1 or v2 certificate.
1141 *
1142 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001143 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001144//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +02001145
1146/**
Paul Bakker5c721f92011-07-27 16:51:09 +00001147 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1148 *
1149 * If set, the X509 parser will not break-off when parsing an X509 certificate
1150 * and encountering an unknown critical extension.
1151 *
1152 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +00001153 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001154//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +00001155
1156/**
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +02001157 * \def POLARSSL_X509_CHECK_KEY_USAGE
1158 *
1159 * Enable verification of the keyUsage extension (CA and leaf certificates).
1160 *
1161 * Disabling this avoids problems with mis-issued and/or misused
1162 * (intermediate) CA and leaf certificates.
1163 *
1164 * \warning Depending on your PKI use, disabling this can be a security risk!
1165 *
1166 * Comment to skip keyUsage checking for both CA and leaf certificates.
1167 */
1168#define POLARSSL_X509_CHECK_KEY_USAGE
1169
1170/**
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001171 * \def POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1172 *
1173 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1174 *
1175 * Disabling this avoids problems with mis-issued and/or misused certificates.
1176 *
1177 * \warning Depending on your PKI use, disabling this can be a security risk!
1178 *
1179 * Comment to skip extendedKeyUsage checking for certificates.
1180 */
1181#define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1182
1183/**
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001184 * \def POLARSSL_X509_RSASSA_PSS_SUPPORT
1185 *
1186 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1187 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1188 *
1189 * Comment this macro to disallow using RSASSA-PSS in certificates.
1190 */
1191#define POLARSSL_X509_RSASSA_PSS_SUPPORT
1192
1193/**
Paul Bakker2770fbd2012-07-03 13:30:23 +00001194 * \def POLARSSL_ZLIB_SUPPORT
1195 *
1196 * If set, the SSL/TLS module uses ZLIB to support compression and
1197 * decompression of packet data.
1198 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001199 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1200 * CRIME attack. Before enabling this option, you should examine with care if
1201 * CRIME or similar exploits may be a applicable to your use case.
1202 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001203 * Used in: library/ssl_tls.c
1204 * library/ssl_cli.c
1205 * library/ssl_srv.c
1206 *
1207 * This feature requires zlib library and headers to be present.
1208 *
1209 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001210 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001211//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001212/* \} name SECTION: mbed TLS feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001213
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001214/**
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001215 * \name SECTION: mbed TLS modules
Paul Bakker0a62cd12011-01-21 11:00:08 +00001216 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001217 * This section enables or disables entire modules in mbed TLS
Paul Bakker0a62cd12011-01-21 11:00:08 +00001218 * \{
1219 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001220
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001221/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001222 * \def POLARSSL_AESNI_C
1223 *
1224 * Enable AES-NI support on x86-64.
1225 *
1226 * Module: library/aesni.c
1227 * Caller: library/aes.c
1228 *
1229 * Requires: POLARSSL_HAVE_ASM
1230 *
1231 * This modules adds support for the AES-NI instructions on x86-64
1232 */
1233#define POLARSSL_AESNI_C
1234
1235/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001236 * \def POLARSSL_AES_C
1237 *
1238 * Enable the AES block cipher.
1239 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001240 * Module: library/aes.c
1241 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001242 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001243 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001244 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001245 * This module enables the following ciphersuites (if other requisites are
1246 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001247 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1248 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1249 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1250 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1251 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1252 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1253 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1254 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1255 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1256 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1257 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1258 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001259 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1260 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1261 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1262 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1263 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001264 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001265 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001266 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001267 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1268 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1269 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1270 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1271 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1272 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1273 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1274 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1275 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1276 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1277 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1278 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1279 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1280 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1281 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1282 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1283 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1284 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1285 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1286 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1287 * TLS_RSA_WITH_AES_256_GCM_SHA384
1288 * TLS_RSA_WITH_AES_256_CBC_SHA256
1289 * TLS_RSA_WITH_AES_256_CBC_SHA
1290 * TLS_RSA_WITH_AES_128_GCM_SHA256
1291 * TLS_RSA_WITH_AES_128_CBC_SHA256
1292 * TLS_RSA_WITH_AES_128_CBC_SHA
1293 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1294 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1295 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1296 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1297 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1298 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1299 * TLS_PSK_WITH_AES_256_GCM_SHA384
1300 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001301 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001302 * TLS_PSK_WITH_AES_128_GCM_SHA256
1303 * TLS_PSK_WITH_AES_128_CBC_SHA256
1304 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001305 *
Paul Bakkercff68422013-09-15 20:43:33 +02001306 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001307 */
Paul Bakker40e46942009-01-03 21:51:57 +00001308#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001309
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001310/**
1311 * \def POLARSSL_ARC4_C
1312 *
1313 * Enable the ARCFOUR stream cipher.
1314 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001315 * Module: library/arc4.c
1316 * Caller: library/ssl_tls.c
1317 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001318 * This module enables the following ciphersuites (if other requisites are
1319 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001320 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1321 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001322 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001323 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001324 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1325 * TLS_DHE_PSK_WITH_RC4_128_SHA
1326 * TLS_RSA_WITH_RC4_128_SHA
1327 * TLS_RSA_WITH_RC4_128_MD5
1328 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001329 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001330 */
Paul Bakker40e46942009-01-03 21:51:57 +00001331#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001332
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001333/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001334 * \def POLARSSL_ASN1_PARSE_C
1335 *
1336 * Enable the generic ASN1 parser.
1337 *
1338 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001339 * Caller: library/x509.c
1340 * library/dhm.c
1341 * library/pkcs12.c
1342 * library/pkcs5.c
1343 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001344 */
1345#define POLARSSL_ASN1_PARSE_C
1346
1347/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001348 * \def POLARSSL_ASN1_WRITE_C
1349 *
1350 * Enable the generic ASN1 writer.
1351 *
1352 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001353 * Caller: library/ecdsa.c
1354 * library/pkwrite.c
1355 * library/x509_create.c
1356 * library/x509write_crt.c
1357 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001358 */
1359#define POLARSSL_ASN1_WRITE_C
1360
1361/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001362 * \def POLARSSL_BASE64_C
1363 *
1364 * Enable the Base64 module.
1365 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001366 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001367 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001368 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001369 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001370 */
Paul Bakker40e46942009-01-03 21:51:57 +00001371#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001372
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001373/**
1374 * \def POLARSSL_BIGNUM_C
1375 *
Paul Bakker9a736322012-11-14 12:39:52 +00001376 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001377 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001378 * Module: library/bignum.c
1379 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001380 * library/ecp.c
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001381 * library/ecdsa.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001382 * library/rsa.c
1383 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001384 *
Manuel Pégourié-Gonnardbf319772014-06-25 13:00:17 +02001385 * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
Paul Bakker5121ce52009-01-03 21:22:43 +00001386 */
Paul Bakker40e46942009-01-03 21:51:57 +00001387#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001388
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001389/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001390 * \def POLARSSL_BLOWFISH_C
1391 *
1392 * Enable the Blowfish block cipher.
1393 *
1394 * Module: library/blowfish.c
1395 */
1396#define POLARSSL_BLOWFISH_C
1397
1398/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001399 * \def POLARSSL_CAMELLIA_C
1400 *
1401 * Enable the Camellia block cipher.
1402 *
Paul Bakker38119b12009-01-10 23:31:23 +00001403 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001404 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001405 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001406 * This module enables the following ciphersuites (if other requisites are
1407 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001408 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1409 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1410 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1411 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1412 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1413 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1414 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1415 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001416 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1417 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1418 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1419 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1420 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001421 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001422 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1423 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1424 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1425 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1426 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1427 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1428 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1429 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1430 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1431 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1432 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1433 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1434 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1435 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1436 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1437 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1438 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1439 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1440 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1441 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1442 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1443 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1444 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1445 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1446 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1447 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1448 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1449 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001450 */
1451#define POLARSSL_CAMELLIA_C
1452
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001453/**
Paul Bakker64a96ea2014-05-22 15:13:02 +02001454 * \def POLARSSL_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001455 *
1456 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1457 *
1458 * Module: library/ccm.c
1459 *
1460 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
1461 *
1462 * This module enables the AES-CCM ciphersuites, if other requisites are
1463 * enabled as well.
1464 */
1465#define POLARSSL_CCM_C
1466
1467/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001468 * \def POLARSSL_CERTS_C
1469 *
1470 * Enable the test certificates.
1471 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001472 * Module: library/certs.c
1473 * Caller:
1474 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001475 * Requires: POLARSSL_PEM_PARSE_C
1476 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001477 * This module is used for testing (ssl_client/server).
1478 */
Paul Bakker40e46942009-01-03 21:51:57 +00001479#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001480
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001481/**
1482 * \def POLARSSL_CIPHER_C
1483 *
1484 * Enable the generic cipher layer.
1485 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001486 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001487 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001488 *
1489 * Uncomment to enable generic cipher wrappers.
1490 */
1491#define POLARSSL_CIPHER_C
1492
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001493/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001494 * \def POLARSSL_CTR_DRBG_C
1495 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001496 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001497 *
1498 * Module: library/ctr_drbg.c
1499 * Caller:
1500 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001501 * Requires: POLARSSL_AES_C
1502 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001503 * This module provides the CTR_DRBG AES-256 random number generator.
1504 */
1505#define POLARSSL_CTR_DRBG_C
1506
1507/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001508 * \def POLARSSL_DEBUG_C
1509 *
1510 * Enable the debug functions.
1511 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001512 * Module: library/debug.c
1513 * Caller: library/ssl_cli.c
1514 * library/ssl_srv.c
1515 * library/ssl_tls.c
1516 *
1517 * This module provides debugging functions.
1518 */
Paul Bakker40e46942009-01-03 21:51:57 +00001519#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001520
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001521/**
1522 * \def POLARSSL_DES_C
1523 *
1524 * Enable the DES block cipher.
1525 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001526 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001527 * Caller: library/pem.c
1528 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001529 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001530 * This module enables the following ciphersuites (if other requisites are
1531 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001532 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1533 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001534 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001535 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001536 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1537 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1538 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1539 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1540 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001541 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001542 *
Paul Bakkercff68422013-09-15 20:43:33 +02001543 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001544 */
Paul Bakker40e46942009-01-03 21:51:57 +00001545#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001546
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001547/**
1548 * \def POLARSSL_DHM_C
1549 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001550 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001551 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001552 * Module: library/dhm.c
1553 * Caller: library/ssl_cli.c
1554 * library/ssl_srv.c
1555 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001556 * This module is used by the following key exchanges:
1557 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001558 */
Paul Bakker40e46942009-01-03 21:51:57 +00001559#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001560
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001561/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001562 * \def POLARSSL_ECDH_C
1563 *
1564 * Enable the elliptic curve Diffie-Hellman library.
1565 *
1566 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001567 * Caller: library/ssl_cli.c
1568 * library/ssl_srv.c
1569 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001570 * This module is used by the following key exchanges:
1571 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001572 *
1573 * Requires: POLARSSL_ECP_C
1574 */
1575#define POLARSSL_ECDH_C
1576
1577/**
1578 * \def POLARSSL_ECDSA_C
1579 *
1580 * Enable the elliptic curve DSA library.
1581 *
1582 * Module: library/ecdsa.c
1583 * Caller:
1584 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001585 * This module is used by the following key exchanges:
1586 * ECDHE-ECDSA
1587 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001588 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001589 */
1590#define POLARSSL_ECDSA_C
1591
1592/**
1593 * \def POLARSSL_ECP_C
1594 *
1595 * Enable the elliptic curve over GF(p) library.
1596 *
1597 * Module: library/ecp.c
1598 * Caller: library/ecdh.c
1599 * library/ecdsa.c
1600 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001601 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001602 */
1603#define POLARSSL_ECP_C
1604
1605/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001606 * \def POLARSSL_ENTROPY_C
1607 *
1608 * Enable the platform-specific entropy code.
1609 *
1610 * Module: library/entropy.c
1611 * Caller:
1612 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001613 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001614 *
1615 * This module provides a generic entropy pool
1616 */
1617#define POLARSSL_ENTROPY_C
1618
1619/**
Paul Bakker9d781402011-05-09 16:17:09 +00001620 * \def POLARSSL_ERROR_C
1621 *
1622 * Enable error code to error string conversion.
1623 *
1624 * Module: library/error.c
1625 * Caller:
1626 *
Shuo Chen95a0d112014-04-04 21:04:40 -07001627 * This module enables polarssl_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001628 */
1629#define POLARSSL_ERROR_C
1630
1631/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001632 * \def POLARSSL_GCM_C
1633 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001634 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001635 *
1636 * Module: library/gcm.c
1637 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001638 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001639 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001640 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1641 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001642 */
1643#define POLARSSL_GCM_C
1644
1645/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001646 * \def POLARSSL_HAVEGE_C
1647 *
1648 * Enable the HAVEGE random generator.
1649 *
Paul Bakker2a844242013-06-24 13:01:53 +02001650 * Warning: the HAVEGE random generator is not suitable for virtualized
1651 * environments
1652 *
1653 * Warning: the HAVEGE random generator is dependent on timing and specific
1654 * processor traits. It is therefore not advised to use HAVEGE as
1655 * your applications primary random generator or primary entropy pool
1656 * input. As a secondary input to your entropy pool, it IS able add
1657 * the (limited) extra entropy it provides.
1658 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001659 * Module: library/havege.c
1660 * Caller:
1661 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001662 * Requires: POLARSSL_TIMING_C
1663 *
Paul Bakker2a844242013-06-24 13:01:53 +02001664 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001665 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001666//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001667
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001668/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001669 * \def POLARSSL_HMAC_DRBG_C
1670 *
1671 * Enable the HMAC_DRBG random generator.
1672 *
1673 * Module: library/hmac_drbg.c
1674 * Caller:
1675 *
1676 * Requires: POLARSSL_MD_C
1677 *
1678 * Uncomment to enable the HMAC_DRBG random number geerator.
1679 */
1680#define POLARSSL_HMAC_DRBG_C
1681
1682/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001683 * \def POLARSSL_MD_C
1684 *
1685 * Enable the generic message digest layer.
1686 *
Paul Bakker17373852011-01-06 14:20:01 +00001687 * Module: library/md.c
1688 * Caller:
1689 *
1690 * Uncomment to enable generic message digest wrappers.
1691 */
1692#define POLARSSL_MD_C
1693
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001694/**
1695 * \def POLARSSL_MD2_C
1696 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001697 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001698 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001699 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001700 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001701 *
1702 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001703 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001704//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001705
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001706/**
1707 * \def POLARSSL_MD4_C
1708 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001709 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001710 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001711 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001712 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001713 *
1714 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001715 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001716//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001717
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001718/**
1719 * \def POLARSSL_MD5_C
1720 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001721 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001722 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001723 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001724 * Caller: library/md.c
1725 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001726 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001727 *
1728 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001729 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001730 */
Paul Bakker40e46942009-01-03 21:51:57 +00001731#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001732
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001733/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001734 * \def POLARSSL_MEMORY_C
Manuel Pégourié-Gonnard71432842015-03-20 16:19:35 +00001735 *
1736 * \deprecated Use POLARSSL_PLATFORM_MEMORY instead.
1737 *
Manuel Pégourié-Gonnard0a155b82015-01-23 17:28:27 +00001738 * Depends on: POLARSSL_PLATFORM_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001739 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001740//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001741
1742/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001743 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1744 *
1745 * Enable the buffer allocator implementation that makes use of a (stack)
1746 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1747 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001748 *
1749 * Module: library/memory_buffer_alloc.c
1750 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001751 * Requires: POLARSSL_PLATFORM_C
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00001752 * POLARSSL_PLATFORM_MEMORY (to use it within mbed TLS)
Paul Bakker6e339b52013-07-03 13:37:05 +02001753 *
1754 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001755 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001756//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001757
1758/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001759 * \def POLARSSL_NET_C
1760 *
1761 * Enable the TCP/IP networking routines.
1762 *
Manuel Pégourié-Gonnarda98af5e2015-04-09 14:40:46 +02001763 * \warning As of 1.3.11, it is deprecated to enable this module without
1764 * POLARSSL_HAVE_IPV6. The alternative legacy code will be removed in 2.0.
1765 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001766 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001767 *
1768 * This module provides TCP/IP networking routines.
1769 */
Paul Bakker40e46942009-01-03 21:51:57 +00001770#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001771
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001772/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001773 * \def POLARSSL_OID_C
1774 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001775 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001776 *
1777 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001778 * Caller: library/asn1write.c
1779 * library/pkcs5.c
1780 * library/pkparse.c
1781 * library/pkwrite.c
1782 * library/rsa.c
1783 * library/x509.c
1784 * library/x509_create.c
1785 * library/x509_crl.c
1786 * library/x509_crt.c
1787 * library/x509_csr.c
1788 * library/x509write_crt.c
1789 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001790 *
1791 * This modules translates between OIDs and internal values.
1792 */
1793#define POLARSSL_OID_C
1794
1795/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001796 * \def POLARSSL_PADLOCK_C
1797 *
1798 * Enable VIA Padlock support on x86.
1799 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001800 * Module: library/padlock.c
1801 * Caller: library/aes.c
1802 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001803 * Requires: POLARSSL_HAVE_ASM
1804 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001805 * This modules adds support for the VIA PadLock on x86.
1806 */
Paul Bakker40e46942009-01-03 21:51:57 +00001807#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001808
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001809/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001810 * \def POLARSSL_PBKDF2_C
1811 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001812 * Enable PKCS#5 PBKDF2 key derivation function.
Manuel Pégourié-Gonnard71432842015-03-20 16:19:35 +00001813 *
1814 * \deprecated Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001815 *
1816 * Module: library/pbkdf2.c
1817 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001818 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001819 *
1820 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001821 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001822#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001823
1824/**
Paul Bakkercff68422013-09-15 20:43:33 +02001825 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001826 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001827 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001828 *
1829 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001830 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001831 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001832 * library/x509_crl.c
1833 * library/x509_crt.c
1834 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001835 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001836 * Requires: POLARSSL_BASE64_C
1837 *
Paul Bakkercff68422013-09-15 20:43:33 +02001838 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001839 */
Paul Bakkercff68422013-09-15 20:43:33 +02001840#define POLARSSL_PEM_PARSE_C
1841
1842/**
1843 * \def POLARSSL_PEM_WRITE_C
1844 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001845 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001846 *
1847 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001848 * Caller: library/pkwrite.c
1849 * library/x509write_crt.c
1850 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001851 *
1852 * Requires: POLARSSL_BASE64_C
1853 *
1854 * This modules adds support for encoding / writing PEM files.
1855 */
1856#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001857
1858/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001859 * \def POLARSSL_PK_C
1860 *
1861 * Enable the generic public (asymetric) key layer.
1862 *
1863 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001864 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001865 * library/ssl_cli.c
1866 * library/ssl_srv.c
1867 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001868 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1869 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001870 * Uncomment to enable generic public key wrappers.
1871 */
1872#define POLARSSL_PK_C
1873
1874/**
Paul Bakker4606c732013-09-15 17:04:23 +02001875 * \def POLARSSL_PK_PARSE_C
1876 *
1877 * Enable the generic public (asymetric) key parser.
1878 *
1879 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001880 * Caller: library/x509_crt.c
1881 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001882 *
1883 * Requires: POLARSSL_PK_C
1884 *
1885 * Uncomment to enable generic public key parse functions.
1886 */
1887#define POLARSSL_PK_PARSE_C
1888
1889/**
1890 * \def POLARSSL_PK_WRITE_C
1891 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001892 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001893 *
1894 * Module: library/pkwrite.c
1895 * Caller: library/x509write.c
1896 *
1897 * Requires: POLARSSL_PK_C
1898 *
1899 * Uncomment to enable generic public key write functions.
1900 */
1901#define POLARSSL_PK_WRITE_C
1902
1903/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001904 * \def POLARSSL_PKCS5_C
1905 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001906 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001907 *
1908 * Module: library/pkcs5.c
1909 *
1910 * Requires: POLARSSL_MD_C
1911 *
1912 * This module adds support for the PKCS#5 functions.
1913 */
1914#define POLARSSL_PKCS5_C
1915
1916/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001917 * \def POLARSSL_PKCS11_C
1918 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001919 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001920 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001921 * Module: library/pkcs11.c
1922 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001923 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001924 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001925 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001926 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001927 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001928 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001929//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001930
1931/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001932 * \def POLARSSL_PKCS12_C
1933 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001934 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001935 * Adds algorithms for parsing PKCS#8 encrypted private keys
1936 *
1937 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001938 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001939 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001940 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1941 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001942 *
1943 * This module enables PKCS#12 functions.
1944 */
1945#define POLARSSL_PKCS12_C
1946
1947/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001948 * \def POLARSSL_PLATFORM_C
1949 *
1950 * Enable the platform abstraction layer that allows you to re-assign
Rich Evansc39cb492015-01-30 12:01:34 +00001951 * functions like malloc(), free(), snprintf(), printf(), fprintf(), exit()
Paul Bakker747a83a2014-02-01 22:50:07 +01001952 *
Rich Evans16f8cd82015-02-06 16:14:34 +00001953 * Enabling POLARSSL_PLATFORM_C enables to use of POLARSSL_PLATFORM_XXX_ALT
1954 * or POLARSSL_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
1955 * above to be specified at runtime or compile time respectively.
1956 *
Paul Bakker747a83a2014-02-01 22:50:07 +01001957 * Module: library/platform.c
1958 * Caller: Most other .c files
1959 *
1960 * This module enables abstraction of common (libc) functions.
1961 */
1962#define POLARSSL_PLATFORM_C
1963
1964/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001965 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001966 *
1967 * Enable the RIPEMD-160 hash algorithm.
1968 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001969 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001970 * Caller: library/md.c
1971 *
1972 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001973#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001974
1975/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001976 * \def POLARSSL_RSA_C
1977 *
1978 * Enable the RSA public-key cryptosystem.
1979 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001980 * Module: library/rsa.c
1981 * Caller: library/ssl_cli.c
1982 * library/ssl_srv.c
1983 * library/ssl_tls.c
1984 * library/x509.c
1985 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001986 * This module is used by the following key exchanges:
1987 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001988 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001989 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001990 */
Paul Bakker40e46942009-01-03 21:51:57 +00001991#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001992
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001993/**
1994 * \def POLARSSL_SHA1_C
1995 *
1996 * Enable the SHA1 cryptographic hash algorithm.
1997 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001998 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001999 * Caller: library/md.c
2000 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002001 * library/ssl_srv.c
2002 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002003 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002004 *
2005 * This module is required for SSL/TLS and SHA1-signed certificates.
2006 */
Paul Bakker40e46942009-01-03 21:51:57 +00002007#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002008
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002009/**
Paul Bakker9e36f042013-06-30 14:34:05 +02002010 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002011 *
2012 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02002013 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002014 *
Paul Bakker9e36f042013-06-30 14:34:05 +02002015 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002016 * Caller: library/entropy.c
2017 * library/md.c
2018 * library/ssl_cli.c
2019 * library/ssl_srv.c
2020 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002021 *
2022 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01002023 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00002024 */
Paul Bakker9e36f042013-06-30 14:34:05 +02002025#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002026
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002027/**
Paul Bakker9e36f042013-06-30 14:34:05 +02002028 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002029 *
2030 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02002031 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002032 *
Paul Bakker9e36f042013-06-30 14:34:05 +02002033 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02002034 * Caller: library/entropy.c
2035 * library/md.c
2036 * library/ssl_cli.c
2037 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002038 *
2039 * This module adds support for SHA-384 and SHA-512.
2040 */
Paul Bakker9e36f042013-06-30 14:34:05 +02002041#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002042
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002043/**
Paul Bakker0a597072012-09-25 21:55:46 +00002044 * \def POLARSSL_SSL_CACHE_C
2045 *
2046 * Enable simple SSL cache implementation.
2047 *
2048 * Module: library/ssl_cache.c
2049 * Caller:
2050 *
2051 * Requires: POLARSSL_SSL_CACHE_C
2052 */
2053#define POLARSSL_SSL_CACHE_C
2054
2055/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002056 * \def POLARSSL_SSL_CLI_C
2057 *
2058 * Enable the SSL/TLS client code.
2059 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002060 * Module: library/ssl_cli.c
2061 * Caller:
2062 *
Paul Bakker5690efc2011-05-26 13:16:06 +00002063 * Requires: POLARSSL_SSL_TLS_C
2064 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002065 * This module is required for SSL/TLS client support.
2066 */
Paul Bakker40e46942009-01-03 21:51:57 +00002067#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002068
Paul Bakker9a736322012-11-14 12:39:52 +00002069/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002070 * \def POLARSSL_SSL_SRV_C
2071 *
2072 * Enable the SSL/TLS server code.
2073 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002074 * Module: library/ssl_srv.c
2075 * Caller:
2076 *
Paul Bakker5690efc2011-05-26 13:16:06 +00002077 * Requires: POLARSSL_SSL_TLS_C
2078 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002079 * This module is required for SSL/TLS server support.
2080 */
Paul Bakker40e46942009-01-03 21:51:57 +00002081#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002082
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002083/**
2084 * \def POLARSSL_SSL_TLS_C
2085 *
Paul Bakkere29ab062011-05-18 13:26:54 +00002086 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002087 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002088 * Module: library/ssl_tls.c
2089 * Caller: library/ssl_cli.c
2090 * library/ssl_srv.c
2091 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002092 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02002093 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00002094 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002095 * This module is required for SSL/TLS.
2096 */
Paul Bakker40e46942009-01-03 21:51:57 +00002097#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002098
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002099/**
Paul Bakker2466d932013-09-28 14:40:38 +02002100 * \def POLARSSL_THREADING_C
2101 *
2102 * Enable the threading abstraction layer.
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002103 * By default mbed TLS assumes it is used in a non-threaded environment or that
Paul Bakker2466d932013-09-28 14:40:38 +02002104 * contexts are not shared between threads. If you do intend to use contexts
2105 * between threads, you will need to enable this layer to prevent race
2106 * conditions.
2107 *
2108 * Module: library/threading.c
2109 *
2110 * This allows different threading implementations (self-implemented or
2111 * provided).
2112 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01002113 * You will have to enable either POLARSSL_THREADING_ALT or
2114 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02002115 *
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002116 * Enable this layer to allow use of mutexes within mbed TLS
Paul Bakker2466d932013-09-28 14:40:38 +02002117 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02002118//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02002119
2120/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002121 * \def POLARSSL_TIMING_C
2122 *
2123 * Enable the portable timing interface.
2124 *
Paul Bakker5121ce52009-01-03 21:22:43 +00002125 * Module: library/timing.c
2126 * Caller: library/havege.c
2127 *
2128 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002129 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02002130#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002131
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002132/**
2133 * \def POLARSSL_VERSION_C
2134 *
2135 * Enable run-time version information.
2136 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00002137 * Module: library/version.c
2138 *
2139 * This module provides run-time version information.
2140 */
2141#define POLARSSL_VERSION_C
2142
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002143/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002144 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002145 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002146 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002147 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002148 * Module: library/x509.c
2149 * Caller: library/x509_crl.c
2150 * library/x509_crt.c
2151 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00002152 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02002153 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02002154 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00002155 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002156 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00002157 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002158#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002159
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002160/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002161 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002162 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002163 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002164 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002165 * Module: library/x509_crt.c
2166 * Caller: library/ssl_cli.c
2167 * library/ssl_srv.c
2168 * library/ssl_tls.c
2169 *
2170 * Requires: POLARSSL_X509_USE_C
2171 *
2172 * This module is required for X.509 certificate parsing.
2173 */
2174#define POLARSSL_X509_CRT_PARSE_C
2175
2176/**
2177 * \def POLARSSL_X509_CRL_PARSE_C
2178 *
2179 * Enable X.509 CRL parsing.
2180 *
2181 * Module: library/x509_crl.c
2182 * Caller: library/x509_crt.c
2183 *
2184 * Requires: POLARSSL_X509_USE_C
2185 *
2186 * This module is required for X.509 CRL parsing.
2187 */
2188#define POLARSSL_X509_CRL_PARSE_C
2189
2190/**
2191 * \def POLARSSL_X509_CSR_PARSE_C
2192 *
2193 * Enable X.509 Certificate Signing Request (CSR) parsing.
2194 *
2195 * Module: library/x509_csr.c
2196 * Caller: library/x509_crt_write.c
2197 *
2198 * Requires: POLARSSL_X509_USE_C
2199 *
2200 * This module is used for reading X.509 certificate request.
2201 */
2202#define POLARSSL_X509_CSR_PARSE_C
2203
2204/**
2205 * \def POLARSSL_X509_CREATE_C
2206 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002207 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002208 *
2209 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002210 *
Paul Bakker4606c732013-09-15 17:04:23 +02002211 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002212 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002213 * This module is the basis for creating X.509 certificates and CSRs.
2214 */
2215#define POLARSSL_X509_CREATE_C
2216
2217/**
2218 * \def POLARSSL_X509_CRT_WRITE_C
2219 *
2220 * Enable creating X.509 certificates.
2221 *
2222 * Module: library/x509_crt_write.c
2223 *
2224 * Requires: POLARSSL_CREATE_C
2225 *
2226 * This module is required for X.509 certificate creation.
2227 */
2228#define POLARSSL_X509_CRT_WRITE_C
2229
2230/**
2231 * \def POLARSSL_X509_CSR_WRITE_C
2232 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002233 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002234 *
2235 * Module: library/x509_csr_write.c
2236 *
2237 * Requires: POLARSSL_CREATE_C
2238 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002239 * This module is required for X.509 certificate request writing.
2240 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002241#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002242
2243/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002244 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002245 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002246 * Enable the XTEA block cipher.
2247 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002248 * Module: library/xtea.c
2249 * Caller:
2250 */
2251#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002252
Manuel Pégourié-Gonnardb4fe3cb2015-01-22 16:11:05 +00002253/* \} name SECTION: mbed TLS modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002254
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002255/**
2256 * \name SECTION: Module configuration options
2257 *
2258 * This section allows for the setting of module specific sizes and
2259 * configuration options. The default values are already present in the
2260 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002261 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002262 * Our advice is to enable options and change their values here
2263 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002264 *
2265 * Please check the respective header file for documentation on these
2266 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002267 * \{
2268 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002269
Paul Bakker088c5c52014-04-25 11:11:10 +02002270/* MPI / BIGNUM options */
2271//#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
Manuel Pégourié-Gonnardda1b4de2014-09-08 17:03:50 +02002272//#define POLARSSL_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002273
Paul Bakker088c5c52014-04-25 11:11:10 +02002274/* CTR_DRBG options */
2275//#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2276//#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2277//#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2278//#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2279//#define CTR_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/* HMAC_DRBG options */
2282//#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2283//#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2284//#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2285//#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002286
Paul Bakker088c5c52014-04-25 11:11:10 +02002287/* ECP options */
2288//#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2289//#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2290//#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002291
Paul Bakker088c5c52014-04-25 11:11:10 +02002292/* Entropy options */
2293//#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2294//#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002295
Paul Bakker088c5c52014-04-25 11:11:10 +02002296/* Memory buffer allocator options */
Manuel Pégourié-Gonnard4d8db4a2014-05-05 14:04:28 +02002297//#define POLARSSL_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002298
Paul Bakker088c5c52014-04-25 11:11:10 +02002299/* Platform options */
Rich Evans98081c52015-02-03 11:00:54 +00002300//#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. */
2301//#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2302//#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2303//#define POLARSSL_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2304//#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2305//#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
Rich Evansc39cb492015-01-30 12:01:34 +00002306//#define POLARSSL_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002307
Manuel Pégourié-Gonnardfb57e642015-03-05 13:38:29 +00002308/* To Use Function Macros POLARSSL_PLATFORM_C must be enabled */
2309/* POLARSSL_PLATFORM_XXX_MACRO and POLARSSL_PLATFORM_XXX_ALT cannot both be defined */
Rich Evans4cc8a222015-02-03 11:26:31 +00002310//#define POLARSSL_PLATFORM_MALLOC_MACRO malloc /**< Default allocator macro to use, can be undefined */
2311//#define POLARSSL_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2312//#define POLARSSL_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2313//#define POLARSSL_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2314//#define POLARSSL_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
2315//#define POLARSSL_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
2316
Paul Bakker088c5c52014-04-25 11:11:10 +02002317/* SSL Cache options */
2318//#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2319//#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002320
Paul Bakker088c5c52014-04-25 11:11:10 +02002321/* SSL options */
2322//#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2323//#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Manuel Pégourié-Gonnard481fcfd2014-07-03 16:12:50 +02002324//#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 +02002325
Manuel Pégourié-Gonnarddfc7df02014-06-30 17:59:55 +02002326/**
2327 * Complete list of ciphersuites to use, in order of preference.
2328 *
2329 * \warning No dependency checking is done on that field! This option can only
2330 * be used to restrict the set of available ciphersuites. It is your
2331 * responsibility to make sure the needed modules are active.
2332 *
2333 * Use this to save a few hundred bytes of ROM (default ordering of all
2334 * available ciphersuites) and a few to a few hundred bytes of RAM.
2335 *
2336 * The value below is only an example, not the default.
2337 */
2338//#define SSL_CIPHERSUITES TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
2339
Paul Bakkereaebbd52014-04-25 15:04:14 +02002340/* Debug options */
2341//#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */
2342
Manuel Pégourié-Gonnardfd6c85c2014-11-20 16:34:20 +01002343/* X509 options */
2344//#define POLARSSL_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
2345
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002346/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002347
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002348#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002349
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002350#endif /* POLARSSL_CONFIG_H */