blob: ce76ad37a8904eba8b7a1f15b2d754b3fb3b9162 [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 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01006 * Copyright (C) 2006-2014, Brainspark B.V.
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
8 * This file is part of PolarSSL (http://www.polarssl.org)
Paul Bakker84f12b72010-07-18 10:13:04 +00009 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakkerb96f1542010-07-18 20:36:00 +000010 *
Paul Bakker77b385e2009-07-28 17:23:11 +000011 * All rights reserved.
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000012 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000013 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
Paul Bakker5121ce52009-01-03 21:22:43 +000027 * This set of compile-time options may be used to enable
28 * or disable features selectively, and reduce the global
29 * memory footprint.
30 */
Paul Bakker40e46942009-01-03 21:51:57 +000031#ifndef POLARSSL_CONFIG_H
32#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000033
Paul Bakkercce9d772011-11-18 14:26:47 +000034#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
Paul Bakker5121ce52009-01-03 21:22:43 +000035#define _CRT_SECURE_NO_DEPRECATE 1
36#endif
37
Paul Bakkerf3b86c12011-01-27 15:24:17 +000038/**
Paul Bakker0a62cd12011-01-21 11:00:08 +000039 * \name SECTION: System support
40 *
41 * This section sets system specific settings.
42 * \{
43 */
44
Paul Bakkerf3b86c12011-01-27 15:24:17 +000045/**
46 * \def POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000047 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000048 * The system uses 8-bit wide native integers.
49 *
50 * Uncomment if native integers are 8-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000051 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020052//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000053
Paul Bakkerf3b86c12011-01-27 15:24:17 +000054/**
55 * \def POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000056 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000057 * The system uses 16-bit wide native integers.
58 *
59 * Uncomment if native integers are 16-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000060 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020061//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000062
Paul Bakkerf3b86c12011-01-27 15:24:17 +000063/**
Paul Bakker62261d62012-10-02 12:19:31 +000064 * \def POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000065 *
Paul Bakker62261d62012-10-02 12:19:31 +000066 * The compiler supports the 'long long' type.
67 * (Only used on 32-bit platforms)
Paul Bakker5121ce52009-01-03 21:22:43 +000068 */
Paul Bakker62261d62012-10-02 12:19:31 +000069#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000070
Paul Bakkerf3b86c12011-01-27 15:24:17 +000071/**
72 * \def POLARSSL_HAVE_ASM
73 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020074 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000075 *
76 * Requires support for asm() in compiler.
77 *
78 * Used in:
79 * library/timing.c
80 * library/padlock.c
81 * include/polarssl/bn_mul.h
82 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020083 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000084 */
Paul Bakker40e46942009-01-03 21:51:57 +000085#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000086
Paul Bakkerf3b86c12011-01-27 15:24:17 +000087/**
88 * \def POLARSSL_HAVE_SSE2
89 *
Paul Bakkere23c3152012-10-01 14:42:47 +000090 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000091 *
Paul Bakker5121ce52009-01-03 21:22:43 +000092 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000093 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020094//#define POLARSSL_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020095
96/**
97 * \def POLARSSL_HAVE_TIME
98 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020099 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200100 *
101 * Comment if your system does not support time functions
102 */
103#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100104
105/**
106 * \def POLARSSL_HAVE_IPV6
107 *
108 * System supports the basic socket interface for IPv6 (RFC 3493),
Manuel Pégourié-Gonnard767f02c2013-12-13 16:23:39 +0100109 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100110 *
Manuel Pégourié-Gonnard13211352013-12-17 17:38:55 +0100111 * Note: on Windows/MingW, XP or higher is required.
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 *
122 * By default PolarSSL uses the system-provided malloc() and free().
123 * This allows different allocators (self-implemented or provided) to be
124 * provided to the platform abstraction layer.
125 *
126 * Enabling POLARSSL_PLATFORM_MEMORY will provide "platform_set_malloc_free()"
127 * to allow you to set an alternative malloc() and free() function pointer.
128 *
129 * Requires: POLARSSL_PLATFORM_C
130 *
131 * Enable this layer to allow use of alternative memory allocators.
132 */
133//#define POLARSSL_PLATFORM_MEMORY
134
135/**
Paul Bakker088c5c52014-04-25 11:11:10 +0200136 * \def POLARSSL_PLATFORM_NO_STD_FUNCTIONS
137 *
138 * Do not assign standard functions in the platform layer (e.g. malloc() to
139 * POLARSSL_PLATFORM_STD_MALLOC and printf() to POLARSSL_PLATFORM_STD_PRINTF)
140 *
141 * This makes sure there are no linking errors on platforms that do not support
142 * these functions. You will HAVE to provide alternatives, either at runtime
143 * via the platform_set_xxx() functions or at compile time by setting
144 * the POLARSSL_PLATFORM_STD_XXX defines.
145 *
146 * Requires: POLARSSL_PLATFORM_C
147 *
148 * Uncomment to prevent default assignment of standard functions in the
149 * platform layer.
150 */
151//#define POLARSSL_PLATFORM_NO_STD_FUNCTIONS
152
153/**
Paul Bakker747a83a2014-02-01 22:50:07 +0100154 * \def POLARSSL_PLATFORM_XXX_ALT
155 *
156 * Uncomment a macro to let PolarSSL support the function in the platform
157 * abstraction layer.
158 *
159 * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, PolarSSL will
160 * provide a function "platform_set_printf()" that allows you to set an
161 * alternative printf function pointer.
162 *
163 * All these define require POLARSSL_PLATFORM_C to be defined!
164 *
165 * Uncomment a macro to enable alternate implementation of specific base
166 * platform function
167 */
168//#define POLARSSL_PLATFORM_PRINTF_ALT
169//#define POLARSSL_PLATFORM_FPRINTF_ALT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200170/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000171
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000172/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000173 * \name SECTION: PolarSSL feature support
174 *
175 * This section sets support for features that are or are not needed
176 * within the modules that are enabled.
177 * \{
178 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000179
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000180/**
Paul Bakkerf2561b32014-02-06 15:11:55 +0100181 * \def POLARSSL_TIMING_ALT
182 *
183 * Uncomment to provide your own alternate implementation for hardclock(),
184 * get_timer(), set_alarm() and m_sleep().
185 *
186 * Only works if you have POLARSSL_TIMING_C enabled.
187 *
188 * You will need to provide a header "timing_alt.h" and an implementation at
189 * compile time.
190 */
191//#define POLARSSL_TIMING_ALT
192
193/**
Paul Bakker90995b52013-06-24 19:20:35 +0200194 * \def POLARSSL_XXX_ALT
195 *
196 * Uncomment a macro to let PolarSSL use your alternate core implementation of
197 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
198 * implementations). Keep in mind that the function prototypes should remain
199 * the same.
200 *
201 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
202 * provide the "struct aes_context" definition and omit the base function
203 * declarations and implementations. "aes_alt.h" will be included from
204 * "aes.h" to include the new function definitions.
205 *
206 * Uncomment a macro to enable alternate implementation for core algorithm
207 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200208 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200209//#define POLARSSL_AES_ALT
210//#define POLARSSL_ARC4_ALT
211//#define POLARSSL_BLOWFISH_ALT
212//#define POLARSSL_CAMELLIA_ALT
213//#define POLARSSL_DES_ALT
214//#define POLARSSL_XTEA_ALT
215//#define POLARSSL_MD2_ALT
216//#define POLARSSL_MD4_ALT
217//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100218//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200219//#define POLARSSL_SHA1_ALT
220//#define POLARSSL_SHA256_ALT
221//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200222
223/**
Paul Bakker15566e42011-04-24 21:19:15 +0000224 * \def POLARSSL_AES_ROM_TABLES
225 *
226 * Store the AES tables in ROM.
227 *
228 * Uncomment this macro to store the AES tables in ROM.
229 *
Paul Bakker15566e42011-04-24 21:19:15 +0000230 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200231//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000232
233/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200234 * \def POLARSSL_CIPHER_MODE_CBC
235 *
236 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
237 */
238#define POLARSSL_CIPHER_MODE_CBC
239
240/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000241 * \def POLARSSL_CIPHER_MODE_CFB
242 *
243 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
244 */
245#define POLARSSL_CIPHER_MODE_CFB
246
247/**
248 * \def POLARSSL_CIPHER_MODE_CTR
249 *
250 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
251 */
252#define POLARSSL_CIPHER_MODE_CTR
253
254/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000255 * \def POLARSSL_CIPHER_NULL_CIPHER
256 *
257 * Enable NULL cipher.
258 * Warning: Only do so when you know what you are doing. This allows for
259 * encryption or channels without any security!
260 *
261 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
262 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100263 * TLS_ECDH_ECDSA_WITH_NULL_SHA
264 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200265 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100266 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200267 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200268 * TLS_ECDHE_PSK_WITH_NULL_SHA256
269 * TLS_ECDHE_PSK_WITH_NULL_SHA
270 * TLS_DHE_PSK_WITH_NULL_SHA384
271 * TLS_DHE_PSK_WITH_NULL_SHA256
272 * TLS_DHE_PSK_WITH_NULL_SHA
273 * TLS_RSA_WITH_NULL_SHA256
274 * TLS_RSA_WITH_NULL_SHA
275 * TLS_RSA_WITH_NULL_MD5
276 * TLS_RSA_PSK_WITH_NULL_SHA384
277 * TLS_RSA_PSK_WITH_NULL_SHA256
278 * TLS_RSA_PSK_WITH_NULL_SHA
279 * TLS_PSK_WITH_NULL_SHA384
280 * TLS_PSK_WITH_NULL_SHA256
281 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000282 *
283 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000284 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200285//#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000286
287/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200288 * \def POLARSSL_CIPHER_PADDING_XXX
289 *
290 * Uncomment or comment macros to add support for specific padding modes
291 * in the cipher layer with cipher modes that support padding (e.g. CBC)
292 *
293 * If you disable all padding modes, only full blocks can be used with CBC.
294 *
295 * Enable padding modes in the cipher layer.
296 */
297#define POLARSSL_CIPHER_PADDING_PKCS7
298#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
299#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
300#define POLARSSL_CIPHER_PADDING_ZEROS
301
302/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000303 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
304 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200305 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000306 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000307 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000308 *
309 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000310 * TLS_RSA_WITH_DES_CBC_SHA
311 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000312 *
313 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000314 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200315//#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000316
317/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200318 * \def POLARSSL_ECP_XXXX_ENABLED
319 *
320 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200321 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200322 *
323 * Comment macros to disable the curve and functions for it
324 */
325#define POLARSSL_ECP_DP_SECP192R1_ENABLED
326#define POLARSSL_ECP_DP_SECP224R1_ENABLED
327#define POLARSSL_ECP_DP_SECP256R1_ENABLED
328#define POLARSSL_ECP_DP_SECP384R1_ENABLED
329#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100330#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100331#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100332#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200333#define POLARSSL_ECP_DP_BP256R1_ENABLED
334#define POLARSSL_ECP_DP_BP384R1_ENABLED
335#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100336//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
337#define POLARSSL_ECP_DP_M255_ENABLED
338//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
339//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200340
341/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200342 * \def POLARSSL_ECP_NIST_OPTIM
343 *
344 * Enable specific 'modulo p' routines for each NIST prime.
345 * Depending on the prime and architecture, makes operations 4 to 8 times
346 * faster on the corresponding curve.
347 *
348 * Comment this macro to disable NIST curves optimisation.
349 */
350#define POLARSSL_ECP_NIST_OPTIM
351
352/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100353 * \def POLARSSL_ECDSA_DETERMINISTIC
354 *
355 * Enable deterministic ECDSA (RFC 6979).
356 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
357 * may result in a compromise of the long-term signing key. This is avoided by
358 * the deterministic variant.
359 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100360 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100361 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100362 * Comment this macro to disable deterministic ECDSA.
363 */
364#define POLARSSL_ECDSA_DETERMINISTIC
365
366/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200367 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
368 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200369 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200370 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200371 * This enables the following ciphersuites (if other requisites are
372 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200373 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200374 * TLS_PSK_WITH_AES_256_CBC_SHA384
375 * TLS_PSK_WITH_AES_256_CBC_SHA
376 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
377 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
378 * TLS_PSK_WITH_AES_128_GCM_SHA256
379 * TLS_PSK_WITH_AES_128_CBC_SHA256
380 * TLS_PSK_WITH_AES_128_CBC_SHA
381 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
382 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
383 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
384 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200385 */
386#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
387
388/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200389 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
390 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200391 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200392 *
393 * Requires: POLARSSL_DHM_C
394 *
395 * This enables the following ciphersuites (if other requisites are
396 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200397 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200398 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
399 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
400 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
401 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
402 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
403 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
404 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
405 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
406 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
407 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
408 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200409 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200410#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200411
412/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200413 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
414 *
415 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
416 *
417 * Requires: POLARSSL_ECDH_C
418 *
419 * This enables the following ciphersuites (if other requisites are
420 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200421 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200422 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200423 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200424 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
425 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
426 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
427 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
428 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200429 */
430#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
431
432/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200433 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
434 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200435 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200436 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200437 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200438 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200439 *
440 * This enables the following ciphersuites (if other requisites are
441 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200442 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200443 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
444 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
445 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
446 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
447 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
448 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
449 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
450 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
451 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
452 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
453 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200454 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200455#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200456
457/**
458 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
459 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200460 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200461 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200462 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200463 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200464 *
465 * This enables the following ciphersuites (if other requisites are
466 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200467 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200468 * TLS_RSA_WITH_AES_256_CBC_SHA256
469 * TLS_RSA_WITH_AES_256_CBC_SHA
470 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200471 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200472 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
473 * TLS_RSA_WITH_AES_128_GCM_SHA256
474 * TLS_RSA_WITH_AES_128_CBC_SHA256
475 * TLS_RSA_WITH_AES_128_CBC_SHA
476 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
477 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
478 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200479 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200480 * TLS_RSA_WITH_RC4_128_SHA
481 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200482 */
483#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
484
485/**
486 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
487 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200488 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200489 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200490 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200491 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200492 *
493 * This enables the following ciphersuites (if other requisites are
494 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200495 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200496 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200497 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
498 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200499 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200500 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
501 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
502 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
503 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
504 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
505 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
506 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200507 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
508 */
509#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
510
511/**
512 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
513 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200514 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200515 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200516 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200517 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200518 *
519 * This enables the following ciphersuites (if other requisites are
520 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200521 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200522 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
523 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
524 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200525 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200526 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
527 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
528 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
529 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
530 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
531 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
532 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200533 */
534#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
535
536/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200537 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
538 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200539 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200540 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200541 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200542 *
543 * This enables the following ciphersuites (if other requisites are
544 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200545 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
546 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
547 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
548 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
549 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
550 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
551 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
552 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
553 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
554 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
555 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
556 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200557 */
558#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
559
560/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100561 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
562 *
563 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
564 *
565 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
566 *
567 * This enables the following ciphersuites (if other requisites are
568 * enabled as well):
569 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
570 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
571 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
572 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
573 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
574 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
575 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
576 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
577 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
578 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
579 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
580 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
581 */
582#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
583
584/**
585 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
586 *
587 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
588 *
589 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
590 *
591 * This enables the following ciphersuites (if other requisites are
592 * enabled as well):
593 * TLS_ECDH_RSA_WITH_RC4_128_SHA
594 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
595 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
596 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
597 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
598 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
599 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
600 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
601 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
602 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
603 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
604 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
605 */
606#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
607
608/**
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100609 * \def POLARSSL_PK_PARSE_EC_EXTENDED
610 *
611 * Enhance support for reading EC keys using variants of SEC1 not allowed by
612 * RFC 5915 and RFC 5480.
613 *
614 * Currently this means parsing the SpecifiedECDomain choice of EC
615 * parameters (only known groups are supported, not arbitrary domains, to
616 * avoid validation issues).
617 *
618 * Disable if you only need to support RFC 5915 + 5480 key formats.
619 */
620#define POLARSSL_PK_PARSE_EC_EXTENDED
621
622/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200623 * \def POLARSSL_ERROR_STRERROR_BC
624 *
625 * Make available the backward compatible error_strerror() next to the
626 * current polarssl_strerror().
627 *
628 * Disable if you run into name conflicts and want to really remove the
629 * error_strerror()
630 */
631#define POLARSSL_ERROR_STRERROR_BC
632
633/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100634 * \def POLARSSL_ERROR_STRERROR_DUMMY
635 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200636 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100637 * third party libraries easier.
638 *
639 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200640 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100641 */
642#define POLARSSL_ERROR_STRERROR_DUMMY
643
644/**
Paul Bakker15566e42011-04-24 21:19:15 +0000645 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000646 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200647 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200648 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200649 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000650 */
Paul Bakker15566e42011-04-24 21:19:15 +0000651#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000652
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000653/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000654 * \def POLARSSL_FS_IO
655 *
656 * Enable functions that use the filesystem.
657 */
658#define POLARSSL_FS_IO
659
660/**
Paul Bakker43655f42011-12-15 20:11:16 +0000661 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
662 *
663 * Do not add default entropy sources. These are the platform specific,
664 * hardclock and HAVEGE based poll functions.
665 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700666 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000667 * application.
668 *
669 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000670 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200671//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000672
673/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000674 * \def POLARSSL_NO_PLATFORM_ENTROPY
675 *
676 * Do not use built-in platform entropy functions.
677 * This is useful if your platform does not support
678 * standards like the /dev/urandom or Windows CryptoAPI.
679 *
680 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000681 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200682//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000683
684/**
Paul Bakker2ceda572014-02-06 15:55:25 +0100685 * \def POLARSSL_ENTROPY_FORCE_SHA256
686 *
687 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
688 * default SHA-512 based one (if both are available).
689 *
690 * Requires: POLARSSL_SHA256_C
691 *
692 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
693 * if you have performance concerns.
694 *
695 * This option is only useful if both POLARSSL_SHA256_C and
696 * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used.
697 */
698//#define POLARSSL_ENTROPY_FORCE_SHA256
699
700/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200701 * \def POLARSSL_MEMORY_DEBUG
702 *
703 * Enable debugging of buffer allocator memory issues. Automatically prints
704 * (to stderr) all (fatal) messages on memory allocation issues. Enables
705 * function for 'debug output' of allocated memory.
706 *
707 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200708 *
709 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200710 */
711//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200712
713/**
714 * \def POLARSSL_MEMORY_BACKTRACE
715 *
716 * Include backtrace information with each allocated block.
717 *
718 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
719 * GLIBC-compatible backtrace() an backtrace_symbols() support
720 *
721 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200722 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200723//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200724
725/**
Paul Bakker48377d92013-08-30 12:06:24 +0200726 * \def POLARSSL_PKCS1_V15
727 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200728 * Enable support for PKCS#1 v1.5 encoding.
729 *
Paul Bakker48377d92013-08-30 12:06:24 +0200730 * Requires: POLARSSL_RSA_C
731 *
Paul Bakker48377d92013-08-30 12:06:24 +0200732 * This enables support for PKCS#1 v1.5 operations.
733 */
734#define POLARSSL_PKCS1_V15
735
736/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000737 * \def POLARSSL_PKCS1_V21
738 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200739 * Enable support for PKCS#1 v2.1 encoding.
740 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000741 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
742 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000743 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
744 */
745#define POLARSSL_PKCS1_V21
746
747/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000748 * \def POLARSSL_RSA_NO_CRT
749 *
750 * Do not use the Chinese Remainder Theorem for the RSA private operation.
751 *
752 * Uncomment this macro to disable the use of CRT in RSA.
753 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000754 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200755//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000756
757/**
758 * \def POLARSSL_SELF_TEST
759 *
760 * Enable the checkup functions (*_self_test).
761 */
762#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000763
764/**
Paul Bakker40865c82013-01-31 17:13:13 +0100765 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
766 *
767 * Enable sending of alert messages in case of encountered errors as per RFC.
768 * If you choose not to send the alert messages, PolarSSL can still communicate
769 * with other servers, only debugging of failures is harder.
770 *
771 * The advantage of not sending alert messages, is that no information is given
772 * about reasons for failures thus preventing adversaries of gaining intel.
773 *
774 * Enable sending of all alert messages
775 */
776#define POLARSSL_SSL_ALERT_MESSAGES
777
778/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100779 * \def POLARSSL_SSL_DEBUG_ALL
780 *
781 * Enable the debug messages in SSL module for all issues.
782 * Debug messages have been disabled in some places to prevent timing
783 * attacks due to (unbalanced) debugging function calls.
784 *
785 * If you need all error reporting you should enable this during debugging,
786 * but remove this for production servers that should log as well.
787 *
788 * Uncomment this macro to report all debug messages on errors introducing
789 * a timing side-channel.
790 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100791 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200792//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100793
794/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000795 * \def POLARSSL_SSL_HW_RECORD_ACCEL
796 *
797 * Enable hooking functions in SSL module for hardware acceleration of
798 * individual records.
799 *
800 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000801 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200802//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000803
804/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100805 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
806 *
807 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200808 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100809 *
810 * Comment this macro to disable support for SSLv2 Client Hello messages.
811 */
812#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
813
814/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100815 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
816 *
817 * Pick the ciphersuite according to the client's preferences rather than ours
818 * in the SSL Server module (POLARSSL_SSL_SRV_C).
819 *
820 * Uncomment this macro to respect client's ciphersuite order
821 */
822//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
823
824/**
Paul Bakker05decb22013-08-15 13:33:48 +0200825 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
826 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200827 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200828 *
829 * Comment this macro to disable support for the max_fragment_length extension
830 */
831#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
832
833/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200834 * \def POLARSSL_SSL_PROTO_SSL3
835 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200836 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200837 *
838 * Requires: POLARSSL_MD5_C
839 * POLARSSL_SHA1_C
840 *
841 * Comment this macro to disable support for SSL 3.0
842 */
843#define POLARSSL_SSL_PROTO_SSL3
844
845/**
846 * \def POLARSSL_SSL_PROTO_TLS1
847 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200848 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200849 *
850 * Requires: POLARSSL_MD5_C
851 * POLARSSL_SHA1_C
852 *
853 * Comment this macro to disable support for TLS 1.0
854 */
855#define POLARSSL_SSL_PROTO_TLS1
856
857/**
858 * \def POLARSSL_SSL_PROTO_TLS1_1
859 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200860 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200861 *
862 * Requires: POLARSSL_MD5_C
863 * POLARSSL_SHA1_C
864 *
865 * Comment this macro to disable support for TLS 1.1
866 */
867#define POLARSSL_SSL_PROTO_TLS1_1
868
869/**
870 * \def POLARSSL_SSL_PROTO_TLS1_2
871 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200872 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200873 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100874 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200875 * (Depends on ciphersuites)
876 *
877 * Comment this macro to disable support for TLS 1.2
878 */
879#define POLARSSL_SSL_PROTO_TLS1_2
880
881/**
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200882 * \def POLARSSL_SSL_ALPN
883 *
884 * Enable support for Application Layer Protocol Negotiation.
885 * draft-ietf-tls-applayerprotoneg-05
886 *
Paul Bakker27e36d32014-04-08 12:33:37 +0200887 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200888 */
Paul Bakker27e36d32014-04-08 12:33:37 +0200889#define POLARSSL_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200890
891/**
Paul Bakkera503a632013-08-14 13:48:06 +0200892 * \def POLARSSL_SSL_SESSION_TICKETS
893 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200894 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200895 *
896 * Requires: POLARSSL_AES_C
897 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200898 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200899 *
900 * Comment this macro to disable support for SSL session tickets
901 */
902#define POLARSSL_SSL_SESSION_TICKETS
903
904/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200905 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
906 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200907 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200908 *
909 * Comment this macro to disable support for server name indication in SSL
910 */
911#define POLARSSL_SSL_SERVER_NAME_INDICATION
912
913/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200914 * \def POLARSSL_SSL_TRUNCATED_HMAC
915 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200916 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200917 *
918 * Comment this macro to disable support for truncated HMAC in SSL
919 */
920#define POLARSSL_SSL_TRUNCATED_HMAC
921
922/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100923 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100924 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100925 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100926 *
927 * This is disabled by default since it breaks binary compatibility with the
928 * 1.3.x line. If you choose to enable it, you will need to rebuild your
929 * application against the new header files, relinking will not be enough.
930 * It will be enabled by default, or no longer an option, in the 1.4 branch.
931 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100932 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100933 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +0100934//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100935
936/**
Paul Bakker2466d932013-09-28 14:40:38 +0200937 * \def POLARSSL_THREADING_ALT
938 *
939 * Provide your own alternate threading implementation.
940 *
941 * Requires: POLARSSL_THREADING_C
942 *
943 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200944 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200945//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200946
947/**
Paul Bakker2466d932013-09-28 14:40:38 +0200948 * \def POLARSSL_THREADING_PTHREAD
949 *
950 * Enable the pthread wrapper layer for the threading layer.
951 *
952 * Requires: POLARSSL_THREADING_C
953 *
954 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200955 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200956//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200957
958/**
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200959 * \def POLARSSL_VERSION_FEATURES
960 *
961 * Allow run-time checking of compile-time enabled features. Thus allowing users
962 * to check at run-time if the library is for instance compiled with threading
963 * support via version_check_feature().
964 *
965 * Requires: POLARSSL_VERSION_C
966 *
967 * Comment this to disable run-time checking and save ROM space
968 */
969#define POLARSSL_VERSION_FEATURES
970
971/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200972 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
973 *
974 * If set, the X509 parser will not break-off when parsing an X509 certificate
975 * and encountering an extension in a v1 or v2 certificate.
976 *
977 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200978 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200979//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200980
981/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000982 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
983 *
984 * If set, the X509 parser will not break-off when parsing an X509 certificate
985 * and encountering an unknown critical extension.
986 *
987 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000988 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200989//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000990
991/**
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +0200992 * \def POLARSSL_X509_CHECK_KEY_USAGE
993 *
994 * Enable verification of the keyUsage extension (CA and leaf certificates).
995 *
996 * Disabling this avoids problems with mis-issued and/or misused
997 * (intermediate) CA and leaf certificates.
998 *
999 * \warning Depending on your PKI use, disabling this can be a security risk!
1000 *
1001 * Comment to skip keyUsage checking for both CA and leaf certificates.
1002 */
1003#define POLARSSL_X509_CHECK_KEY_USAGE
1004
1005/**
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001006 * \def POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1007 *
1008 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1009 *
1010 * Disabling this avoids problems with mis-issued and/or misused certificates.
1011 *
1012 * \warning Depending on your PKI use, disabling this can be a security risk!
1013 *
1014 * Comment to skip extendedKeyUsage checking for certificates.
1015 */
1016#define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1017
1018/**
Paul Bakker2770fbd2012-07-03 13:30:23 +00001019 * \def POLARSSL_ZLIB_SUPPORT
1020 *
1021 * If set, the SSL/TLS module uses ZLIB to support compression and
1022 * decompression of packet data.
1023 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001024 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1025 * CRIME attack. Before enabling this option, you should examine with care if
1026 * CRIME or similar exploits may be a applicable to your use case.
1027 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001028 * Used in: library/ssl_tls.c
1029 * library/ssl_cli.c
1030 * library/ssl_srv.c
1031 *
1032 * This feature requires zlib library and headers to be present.
1033 *
1034 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001035 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001036//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001037/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001038
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001039/**
Paul Bakker0a62cd12011-01-21 11:00:08 +00001040 * \name SECTION: PolarSSL modules
1041 *
1042 * This section enables or disables entire modules in PolarSSL
1043 * \{
1044 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001045
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001046/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001047 * \def POLARSSL_AESNI_C
1048 *
1049 * Enable AES-NI support on x86-64.
1050 *
1051 * Module: library/aesni.c
1052 * Caller: library/aes.c
1053 *
1054 * Requires: POLARSSL_HAVE_ASM
1055 *
1056 * This modules adds support for the AES-NI instructions on x86-64
1057 */
1058#define POLARSSL_AESNI_C
1059
1060/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001061 * \def POLARSSL_AES_C
1062 *
1063 * Enable the AES block cipher.
1064 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001065 * Module: library/aes.c
1066 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001067 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001068 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001069 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001070 * This module enables the following ciphersuites (if other requisites are
1071 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001072 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1073 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1074 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1075 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1076 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1077 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1078 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1079 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1080 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1081 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1082 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1083 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001084 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1085 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1086 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1087 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1088 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001089 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001090 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001091 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001092 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1093 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1094 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1095 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1096 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1097 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1098 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1099 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1100 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1101 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1102 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1103 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1104 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1105 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1106 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1107 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1108 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1109 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1110 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1111 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1112 * TLS_RSA_WITH_AES_256_GCM_SHA384
1113 * TLS_RSA_WITH_AES_256_CBC_SHA256
1114 * TLS_RSA_WITH_AES_256_CBC_SHA
1115 * TLS_RSA_WITH_AES_128_GCM_SHA256
1116 * TLS_RSA_WITH_AES_128_CBC_SHA256
1117 * TLS_RSA_WITH_AES_128_CBC_SHA
1118 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1119 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1120 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1121 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1122 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1123 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1124 * TLS_PSK_WITH_AES_256_GCM_SHA384
1125 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001126 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001127 * TLS_PSK_WITH_AES_128_GCM_SHA256
1128 * TLS_PSK_WITH_AES_128_CBC_SHA256
1129 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001130 *
Paul Bakkercff68422013-09-15 20:43:33 +02001131 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001132 */
Paul Bakker40e46942009-01-03 21:51:57 +00001133#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001134
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001135/**
1136 * \def POLARSSL_ARC4_C
1137 *
1138 * Enable the ARCFOUR stream cipher.
1139 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001140 * Module: library/arc4.c
1141 * Caller: library/ssl_tls.c
1142 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001143 * This module enables the following ciphersuites (if other requisites are
1144 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001145 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1146 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001147 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001148 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001149 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1150 * TLS_DHE_PSK_WITH_RC4_128_SHA
1151 * TLS_RSA_WITH_RC4_128_SHA
1152 * TLS_RSA_WITH_RC4_128_MD5
1153 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001154 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001155 */
Paul Bakker40e46942009-01-03 21:51:57 +00001156#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001157
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001158/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001159 * \def POLARSSL_ASN1_PARSE_C
1160 *
1161 * Enable the generic ASN1 parser.
1162 *
1163 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001164 * Caller: library/x509.c
1165 * library/dhm.c
1166 * library/pkcs12.c
1167 * library/pkcs5.c
1168 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001169 */
1170#define POLARSSL_ASN1_PARSE_C
1171
1172/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001173 * \def POLARSSL_ASN1_WRITE_C
1174 *
1175 * Enable the generic ASN1 writer.
1176 *
1177 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001178 * Caller: library/ecdsa.c
1179 * library/pkwrite.c
1180 * library/x509_create.c
1181 * library/x509write_crt.c
1182 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001183 */
1184#define POLARSSL_ASN1_WRITE_C
1185
1186/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001187 * \def POLARSSL_BASE64_C
1188 *
1189 * Enable the Base64 module.
1190 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001191 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001192 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001193 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001194 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001195 */
Paul Bakker40e46942009-01-03 21:51:57 +00001196#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001197
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001198/**
1199 * \def POLARSSL_BIGNUM_C
1200 *
Paul Bakker9a736322012-11-14 12:39:52 +00001201 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001202 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001203 * Module: library/bignum.c
1204 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001205 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001206 * library/rsa.c
1207 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001208 *
1209 * This module is required for RSA and DHM support.
1210 */
Paul Bakker40e46942009-01-03 21:51:57 +00001211#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001212
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001213/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001214 * \def POLARSSL_BLOWFISH_C
1215 *
1216 * Enable the Blowfish block cipher.
1217 *
1218 * Module: library/blowfish.c
1219 */
1220#define POLARSSL_BLOWFISH_C
1221
1222/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001223 * \def POLARSSL_CAMELLIA_C
1224 *
1225 * Enable the Camellia block cipher.
1226 *
Paul Bakker38119b12009-01-10 23:31:23 +00001227 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001228 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001229 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001230 * This module enables the following ciphersuites (if other requisites are
1231 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001232 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1233 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1234 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1235 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1236 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1237 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1238 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1239 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001240 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1241 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1242 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1243 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1244 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001245 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001246 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1247 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1248 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1249 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1250 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1251 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1252 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1253 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1254 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1255 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1256 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1257 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1258 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1259 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1260 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1261 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1262 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1263 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1264 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1265 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1266 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1267 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1268 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1269 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1270 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1271 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1272 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1273 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001274 */
1275#define POLARSSL_CAMELLIA_C
1276
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001277/**
1278 * \def POLARSSL_CERTS_C
1279 *
1280 * Enable the test certificates.
1281 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001282 * Module: library/certs.c
1283 * Caller:
1284 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001285 * Requires: POLARSSL_PEM_PARSE_C
1286 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001287 * This module is used for testing (ssl_client/server).
1288 */
Paul Bakker40e46942009-01-03 21:51:57 +00001289#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001290
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001291/**
1292 * \def POLARSSL_CIPHER_C
1293 *
1294 * Enable the generic cipher layer.
1295 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001296 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001297 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001298 *
1299 * Uncomment to enable generic cipher wrappers.
1300 */
1301#define POLARSSL_CIPHER_C
1302
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001303/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001304 * \def POLARSSL_CTR_DRBG_C
1305 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001306 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001307 *
1308 * Module: library/ctr_drbg.c
1309 * Caller:
1310 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001311 * Requires: POLARSSL_AES_C
1312 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001313 * This module provides the CTR_DRBG AES-256 random number generator.
1314 */
1315#define POLARSSL_CTR_DRBG_C
1316
1317/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001318 * \def POLARSSL_DEBUG_C
1319 *
1320 * Enable the debug functions.
1321 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001322 * Module: library/debug.c
1323 * Caller: library/ssl_cli.c
1324 * library/ssl_srv.c
1325 * library/ssl_tls.c
1326 *
1327 * This module provides debugging functions.
1328 */
Paul Bakker40e46942009-01-03 21:51:57 +00001329#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001330
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001331/**
1332 * \def POLARSSL_DES_C
1333 *
1334 * Enable the DES block cipher.
1335 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001336 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001337 * Caller: library/pem.c
1338 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001339 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001340 * This module enables the following ciphersuites (if other requisites are
1341 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001342 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1343 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001344 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001345 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001346 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1347 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1348 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1349 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1350 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001351 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001352 *
Paul Bakkercff68422013-09-15 20:43:33 +02001353 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001354 */
Paul Bakker40e46942009-01-03 21:51:57 +00001355#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001356
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001357/**
1358 * \def POLARSSL_DHM_C
1359 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001360 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001361 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001362 * Module: library/dhm.c
1363 * Caller: library/ssl_cli.c
1364 * library/ssl_srv.c
1365 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001366 * This module is used by the following key exchanges:
1367 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001368 */
Paul Bakker40e46942009-01-03 21:51:57 +00001369#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001370
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001371/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001372 * \def POLARSSL_ECDH_C
1373 *
1374 * Enable the elliptic curve Diffie-Hellman library.
1375 *
1376 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001377 * Caller: library/ssl_cli.c
1378 * library/ssl_srv.c
1379 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001380 * This module is used by the following key exchanges:
1381 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001382 *
1383 * Requires: POLARSSL_ECP_C
1384 */
1385#define POLARSSL_ECDH_C
1386
1387/**
1388 * \def POLARSSL_ECDSA_C
1389 *
1390 * Enable the elliptic curve DSA library.
1391 *
1392 * Module: library/ecdsa.c
1393 * Caller:
1394 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001395 * This module is used by the following key exchanges:
1396 * ECDHE-ECDSA
1397 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001398 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001399 */
1400#define POLARSSL_ECDSA_C
1401
1402/**
1403 * \def POLARSSL_ECP_C
1404 *
1405 * Enable the elliptic curve over GF(p) library.
1406 *
1407 * Module: library/ecp.c
1408 * Caller: library/ecdh.c
1409 * library/ecdsa.c
1410 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001411 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001412 */
1413#define POLARSSL_ECP_C
1414
1415/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001416 * \def POLARSSL_ENTROPY_C
1417 *
1418 * Enable the platform-specific entropy code.
1419 *
1420 * Module: library/entropy.c
1421 * Caller:
1422 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001423 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001424 *
1425 * This module provides a generic entropy pool
1426 */
1427#define POLARSSL_ENTROPY_C
1428
1429/**
Paul Bakker9d781402011-05-09 16:17:09 +00001430 * \def POLARSSL_ERROR_C
1431 *
1432 * Enable error code to error string conversion.
1433 *
1434 * Module: library/error.c
1435 * Caller:
1436 *
Shuo Chen95a0d112014-04-04 21:04:40 -07001437 * This module enables polarssl_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001438 */
1439#define POLARSSL_ERROR_C
1440
1441/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001442 * \def POLARSSL_GCM_C
1443 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001444 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001445 *
1446 * Module: library/gcm.c
1447 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001448 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001449 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001450 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1451 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001452 */
1453#define POLARSSL_GCM_C
1454
1455/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001456 * \def POLARSSL_HAVEGE_C
1457 *
1458 * Enable the HAVEGE random generator.
1459 *
Paul Bakker2a844242013-06-24 13:01:53 +02001460 * Warning: the HAVEGE random generator is not suitable for virtualized
1461 * environments
1462 *
1463 * Warning: the HAVEGE random generator is dependent on timing and specific
1464 * processor traits. It is therefore not advised to use HAVEGE as
1465 * your applications primary random generator or primary entropy pool
1466 * input. As a secondary input to your entropy pool, it IS able add
1467 * the (limited) extra entropy it provides.
1468 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001469 * Module: library/havege.c
1470 * Caller:
1471 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001472 * Requires: POLARSSL_TIMING_C
1473 *
Paul Bakker2a844242013-06-24 13:01:53 +02001474 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001475 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001476//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001477
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001478/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001479 * \def POLARSSL_HMAC_DRBG_C
1480 *
1481 * Enable the HMAC_DRBG random generator.
1482 *
1483 * Module: library/hmac_drbg.c
1484 * Caller:
1485 *
1486 * Requires: POLARSSL_MD_C
1487 *
1488 * Uncomment to enable the HMAC_DRBG random number geerator.
1489 */
1490#define POLARSSL_HMAC_DRBG_C
1491
1492/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001493 * \def POLARSSL_MD_C
1494 *
1495 * Enable the generic message digest layer.
1496 *
Paul Bakker17373852011-01-06 14:20:01 +00001497 * Module: library/md.c
1498 * Caller:
1499 *
1500 * Uncomment to enable generic message digest wrappers.
1501 */
1502#define POLARSSL_MD_C
1503
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001504/**
1505 * \def POLARSSL_MD2_C
1506 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001507 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001508 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001509 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001510 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001511 *
1512 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001513 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001514//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001515
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001516/**
1517 * \def POLARSSL_MD4_C
1518 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001519 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001520 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001521 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001522 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001523 *
1524 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001525 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001526//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001527
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001528/**
1529 * \def POLARSSL_MD5_C
1530 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001531 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001532 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001533 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001534 * Caller: library/md.c
1535 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001536 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001537 *
1538 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001539 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001540 */
Paul Bakker40e46942009-01-03 21:51:57 +00001541#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001542
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001543/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001544 * \def POLARSSL_MEMORY_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001545 * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead.
Paul Bakker6e339b52013-07-03 13:37:05 +02001546 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001547//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001548
1549/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001550 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1551 *
1552 * Enable the buffer allocator implementation that makes use of a (stack)
1553 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1554 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001555 *
1556 * Module: library/memory_buffer_alloc.c
1557 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001558 * Requires: POLARSSL_PLATFORM_C
1559 * POLARSSL_PLATFORM_MEMORY (to use it within PolarSSL)
Paul Bakker6e339b52013-07-03 13:37:05 +02001560 *
1561 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001562 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001563//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001564
1565/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001566 * \def POLARSSL_NET_C
1567 *
1568 * Enable the TCP/IP networking routines.
1569 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001570 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001571 *
1572 * This module provides TCP/IP networking routines.
1573 */
Paul Bakker40e46942009-01-03 21:51:57 +00001574#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001575
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001576/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001577 * \def POLARSSL_OID_C
1578 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001579 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001580 *
1581 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001582 * Caller: library/asn1write.c
1583 * library/pkcs5.c
1584 * library/pkparse.c
1585 * library/pkwrite.c
1586 * library/rsa.c
1587 * library/x509.c
1588 * library/x509_create.c
1589 * library/x509_crl.c
1590 * library/x509_crt.c
1591 * library/x509_csr.c
1592 * library/x509write_crt.c
1593 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001594 *
1595 * This modules translates between OIDs and internal values.
1596 */
1597#define POLARSSL_OID_C
1598
1599/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001600 * \def POLARSSL_PADLOCK_C
1601 *
1602 * Enable VIA Padlock support on x86.
1603 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001604 * Module: library/padlock.c
1605 * Caller: library/aes.c
1606 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001607 * Requires: POLARSSL_HAVE_ASM
1608 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001609 * This modules adds support for the VIA PadLock on x86.
1610 */
Paul Bakker40e46942009-01-03 21:51:57 +00001611#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001612
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001613/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001614 * \def POLARSSL_PBKDF2_C
1615 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001616 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001617 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001618 *
1619 * Module: library/pbkdf2.c
1620 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001621 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001622 *
1623 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001624 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001625#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001626
1627/**
Paul Bakkercff68422013-09-15 20:43:33 +02001628 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001629 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001630 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001631 *
1632 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001633 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001634 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001635 * library/x509_crl.c
1636 * library/x509_crt.c
1637 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001638 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001639 * Requires: POLARSSL_BASE64_C
1640 *
Paul Bakkercff68422013-09-15 20:43:33 +02001641 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001642 */
Paul Bakkercff68422013-09-15 20:43:33 +02001643#define POLARSSL_PEM_PARSE_C
1644
1645/**
1646 * \def POLARSSL_PEM_WRITE_C
1647 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001648 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001649 *
1650 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001651 * Caller: library/pkwrite.c
1652 * library/x509write_crt.c
1653 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001654 *
1655 * Requires: POLARSSL_BASE64_C
1656 *
1657 * This modules adds support for encoding / writing PEM files.
1658 */
1659#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001660
1661/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001662 * \def POLARSSL_PK_C
1663 *
1664 * Enable the generic public (asymetric) key layer.
1665 *
1666 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001667 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001668 * library/ssl_cli.c
1669 * library/ssl_srv.c
1670 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001671 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1672 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001673 * Uncomment to enable generic public key wrappers.
1674 */
1675#define POLARSSL_PK_C
1676
1677/**
Paul Bakker4606c732013-09-15 17:04:23 +02001678 * \def POLARSSL_PK_PARSE_C
1679 *
1680 * Enable the generic public (asymetric) key parser.
1681 *
1682 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001683 * Caller: library/x509_crt.c
1684 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001685 *
1686 * Requires: POLARSSL_PK_C
1687 *
1688 * Uncomment to enable generic public key parse functions.
1689 */
1690#define POLARSSL_PK_PARSE_C
1691
1692/**
1693 * \def POLARSSL_PK_WRITE_C
1694 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001695 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001696 *
1697 * Module: library/pkwrite.c
1698 * Caller: library/x509write.c
1699 *
1700 * Requires: POLARSSL_PK_C
1701 *
1702 * Uncomment to enable generic public key write functions.
1703 */
1704#define POLARSSL_PK_WRITE_C
1705
1706/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001707 * \def POLARSSL_PKCS5_C
1708 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001709 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001710 *
1711 * Module: library/pkcs5.c
1712 *
1713 * Requires: POLARSSL_MD_C
1714 *
1715 * This module adds support for the PKCS#5 functions.
1716 */
1717#define POLARSSL_PKCS5_C
1718
1719/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001720 * \def POLARSSL_PKCS11_C
1721 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001722 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001723 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001724 * Module: library/pkcs11.c
1725 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001726 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001727 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001728 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001729 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001730 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001731 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001732//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001733
1734/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001735 * \def POLARSSL_PKCS12_C
1736 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001737 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001738 * Adds algorithms for parsing PKCS#8 encrypted private keys
1739 *
1740 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001741 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001742 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001743 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1744 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001745 *
1746 * This module enables PKCS#12 functions.
1747 */
1748#define POLARSSL_PKCS12_C
1749
1750/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001751 * \def POLARSSL_PLATFORM_C
1752 *
1753 * Enable the platform abstraction layer that allows you to re-assign
1754 * functions like malloc(), free(), printf(), fprintf()
1755 *
1756 * Module: library/platform.c
1757 * Caller: Most other .c files
1758 *
1759 * This module enables abstraction of common (libc) functions.
1760 */
1761#define POLARSSL_PLATFORM_C
1762
1763/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001764 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001765 *
1766 * Enable the RIPEMD-160 hash algorithm.
1767 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001768 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001769 * Caller: library/md.c
1770 *
1771 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001772#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001773
1774/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001775 * \def POLARSSL_RSA_C
1776 *
1777 * Enable the RSA public-key cryptosystem.
1778 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001779 * Module: library/rsa.c
1780 * Caller: library/ssl_cli.c
1781 * library/ssl_srv.c
1782 * library/ssl_tls.c
1783 * library/x509.c
1784 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001785 * This module is used by the following key exchanges:
1786 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001787 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001788 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001789 */
Paul Bakker40e46942009-01-03 21:51:57 +00001790#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001791
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001792/**
1793 * \def POLARSSL_SHA1_C
1794 *
1795 * Enable the SHA1 cryptographic hash algorithm.
1796 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001797 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001798 * Caller: library/md.c
1799 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001800 * library/ssl_srv.c
1801 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001802 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001803 *
1804 * This module is required for SSL/TLS and SHA1-signed certificates.
1805 */
Paul Bakker40e46942009-01-03 21:51:57 +00001806#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001807
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001808/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001809 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001810 *
1811 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001812 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001813 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001814 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001815 * Caller: library/entropy.c
1816 * library/md.c
1817 * library/ssl_cli.c
1818 * library/ssl_srv.c
1819 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001820 *
1821 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001822 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001823 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001824#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001825
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001826/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001827 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001828 *
1829 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001830 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001831 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001832 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001833 * Caller: library/entropy.c
1834 * library/md.c
1835 * library/ssl_cli.c
1836 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001837 *
1838 * This module adds support for SHA-384 and SHA-512.
1839 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001840#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001841
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001842/**
Paul Bakker0a597072012-09-25 21:55:46 +00001843 * \def POLARSSL_SSL_CACHE_C
1844 *
1845 * Enable simple SSL cache implementation.
1846 *
1847 * Module: library/ssl_cache.c
1848 * Caller:
1849 *
1850 * Requires: POLARSSL_SSL_CACHE_C
1851 */
1852#define POLARSSL_SSL_CACHE_C
1853
1854/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001855 * \def POLARSSL_SSL_CLI_C
1856 *
1857 * Enable the SSL/TLS client code.
1858 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001859 * Module: library/ssl_cli.c
1860 * Caller:
1861 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001862 * Requires: POLARSSL_SSL_TLS_C
1863 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001864 * This module is required for SSL/TLS client support.
1865 */
Paul Bakker40e46942009-01-03 21:51:57 +00001866#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001867
Paul Bakker9a736322012-11-14 12:39:52 +00001868/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001869 * \def POLARSSL_SSL_SRV_C
1870 *
1871 * Enable the SSL/TLS server code.
1872 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001873 * Module: library/ssl_srv.c
1874 * Caller:
1875 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001876 * Requires: POLARSSL_SSL_TLS_C
1877 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001878 * This module is required for SSL/TLS server support.
1879 */
Paul Bakker40e46942009-01-03 21:51:57 +00001880#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001881
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001882/**
1883 * \def POLARSSL_SSL_TLS_C
1884 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001885 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001886 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001887 * Module: library/ssl_tls.c
1888 * Caller: library/ssl_cli.c
1889 * library/ssl_srv.c
1890 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001891 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001892 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001893 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001894 * This module is required for SSL/TLS.
1895 */
Paul Bakker40e46942009-01-03 21:51:57 +00001896#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001897
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001898/**
Paul Bakker2466d932013-09-28 14:40:38 +02001899 * \def POLARSSL_THREADING_C
1900 *
1901 * Enable the threading abstraction layer.
1902 * By default PolarSSL assumes it is used in a non-threaded environment or that
1903 * contexts are not shared between threads. If you do intend to use contexts
1904 * between threads, you will need to enable this layer to prevent race
1905 * conditions.
1906 *
1907 * Module: library/threading.c
1908 *
1909 * This allows different threading implementations (self-implemented or
1910 * provided).
1911 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001912 * You will have to enable either POLARSSL_THREADING_ALT or
1913 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001914 *
1915 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001916 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001917//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001918
1919/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001920 * \def POLARSSL_TIMING_C
1921 *
1922 * Enable the portable timing interface.
1923 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001924 * Module: library/timing.c
1925 * Caller: library/havege.c
1926 *
1927 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001928 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001929#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001930
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001931/**
1932 * \def POLARSSL_VERSION_C
1933 *
1934 * Enable run-time version information.
1935 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001936 * Module: library/version.c
1937 *
1938 * This module provides run-time version information.
1939 */
1940#define POLARSSL_VERSION_C
1941
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001942/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001943 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001944 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001945 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001946 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001947 * Module: library/x509.c
1948 * Caller: library/x509_crl.c
1949 * library/x509_crt.c
1950 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001951 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001952 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001953 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001954 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001955 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001956 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001957#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001958
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001959/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001960 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001961 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001962 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001963 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001964 * Module: library/x509_crt.c
1965 * Caller: library/ssl_cli.c
1966 * library/ssl_srv.c
1967 * library/ssl_tls.c
1968 *
1969 * Requires: POLARSSL_X509_USE_C
1970 *
1971 * This module is required for X.509 certificate parsing.
1972 */
1973#define POLARSSL_X509_CRT_PARSE_C
1974
1975/**
1976 * \def POLARSSL_X509_CRL_PARSE_C
1977 *
1978 * Enable X.509 CRL parsing.
1979 *
1980 * Module: library/x509_crl.c
1981 * Caller: library/x509_crt.c
1982 *
1983 * Requires: POLARSSL_X509_USE_C
1984 *
1985 * This module is required for X.509 CRL parsing.
1986 */
1987#define POLARSSL_X509_CRL_PARSE_C
1988
1989/**
1990 * \def POLARSSL_X509_CSR_PARSE_C
1991 *
1992 * Enable X.509 Certificate Signing Request (CSR) parsing.
1993 *
1994 * Module: library/x509_csr.c
1995 * Caller: library/x509_crt_write.c
1996 *
1997 * Requires: POLARSSL_X509_USE_C
1998 *
1999 * This module is used for reading X.509 certificate request.
2000 */
2001#define POLARSSL_X509_CSR_PARSE_C
2002
2003/**
2004 * \def POLARSSL_X509_CREATE_C
2005 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002006 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002007 *
2008 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002009 *
Paul Bakker4606c732013-09-15 17:04:23 +02002010 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002011 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002012 * This module is the basis for creating X.509 certificates and CSRs.
2013 */
2014#define POLARSSL_X509_CREATE_C
2015
2016/**
2017 * \def POLARSSL_X509_CRT_WRITE_C
2018 *
2019 * Enable creating X.509 certificates.
2020 *
2021 * Module: library/x509_crt_write.c
2022 *
2023 * Requires: POLARSSL_CREATE_C
2024 *
2025 * This module is required for X.509 certificate creation.
2026 */
2027#define POLARSSL_X509_CRT_WRITE_C
2028
2029/**
2030 * \def POLARSSL_X509_CSR_WRITE_C
2031 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002032 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002033 *
2034 * Module: library/x509_csr_write.c
2035 *
2036 * Requires: POLARSSL_CREATE_C
2037 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002038 * This module is required for X.509 certificate request writing.
2039 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002040#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002041
2042/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002043 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002044 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002045 * Enable the XTEA block cipher.
2046 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002047 * Module: library/xtea.c
2048 * Caller:
2049 */
2050#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002051
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002052/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002053
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002054/**
2055 * \name SECTION: Module configuration options
2056 *
2057 * This section allows for the setting of module specific sizes and
2058 * configuration options. The default values are already present in the
2059 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002060 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002061 * Our advice is to enable options and change their values here
2062 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002063 *
2064 * Please check the respective header file for documentation on these
2065 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002066 * \{
2067 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002068
Paul Bakker088c5c52014-04-25 11:11:10 +02002069/* MPI / BIGNUM options */
2070//#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2071//#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002072
Paul Bakker088c5c52014-04-25 11:11:10 +02002073/* CTR_DRBG options */
2074//#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2075//#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2076//#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2077//#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2078//#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002079
Paul Bakker088c5c52014-04-25 11:11:10 +02002080/* HMAC_DRBG options */
2081//#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2082//#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2083//#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2084//#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002085
Paul Bakker088c5c52014-04-25 11:11:10 +02002086/* ECP options */
2087//#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2088//#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2089//#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002090
Paul Bakker088c5c52014-04-25 11:11:10 +02002091/* Entropy options */
2092//#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2093//#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002094
Paul Bakker088c5c52014-04-25 11:11:10 +02002095/* Memory buffer allocator options */
Manuel Pégourié-Gonnard4d8db4a2014-05-05 14:04:28 +02002096//#define POLARSSL_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002097
Paul Bakker088c5c52014-04-25 11:11:10 +02002098/* Platform options */
2099//#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. */
2100//#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2101//#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2102//#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2103//#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002104
Paul Bakker088c5c52014-04-25 11:11:10 +02002105/* SSL Cache options */
2106//#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2107//#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002108
Paul Bakker088c5c52014-04-25 11:11:10 +02002109/* SSL options */
2110//#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2111//#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002112
Paul Bakkereaebbd52014-04-25 15:04:14 +02002113/* Debug options */
2114//#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */
2115
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002116/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002117
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002118#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002119
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002120#endif /* POLARSSL_CONFIG_H */