blob: 0dca560e2e5c85efacc3f2b474b4fb5038a60423 [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/**
Manuel Pégourié-Gonnardd1539b12014-06-06 16:42:37 +02001019 * \def POLARSSL_X509_RSASSA_PSS_SUPPORT
1020 *
1021 * Enable parsing and verification of X.509 certificates, CRLs and CSRS
1022 * signed with RSASSA-PSS (aka PKCS#1 v2.1).
1023 *
1024 * Comment this macro to disallow using RSASSA-PSS in certificates.
1025 */
1026#define POLARSSL_X509_RSASSA_PSS_SUPPORT
1027
1028/**
Paul Bakker2770fbd2012-07-03 13:30:23 +00001029 * \def POLARSSL_ZLIB_SUPPORT
1030 *
1031 * If set, the SSL/TLS module uses ZLIB to support compression and
1032 * decompression of packet data.
1033 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001034 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1035 * CRIME attack. Before enabling this option, you should examine with care if
1036 * CRIME or similar exploits may be a applicable to your use case.
1037 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001038 * Used in: library/ssl_tls.c
1039 * library/ssl_cli.c
1040 * library/ssl_srv.c
1041 *
1042 * This feature requires zlib library and headers to be present.
1043 *
1044 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001045 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001046//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001047/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001048
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001049/**
Paul Bakker0a62cd12011-01-21 11:00:08 +00001050 * \name SECTION: PolarSSL modules
1051 *
1052 * This section enables or disables entire modules in PolarSSL
1053 * \{
1054 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001055
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001056/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001057 * \def POLARSSL_AESNI_C
1058 *
1059 * Enable AES-NI support on x86-64.
1060 *
1061 * Module: library/aesni.c
1062 * Caller: library/aes.c
1063 *
1064 * Requires: POLARSSL_HAVE_ASM
1065 *
1066 * This modules adds support for the AES-NI instructions on x86-64
1067 */
1068#define POLARSSL_AESNI_C
1069
1070/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001071 * \def POLARSSL_AES_C
1072 *
1073 * Enable the AES block cipher.
1074 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001075 * Module: library/aes.c
1076 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001077 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001078 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001079 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001080 * This module enables the following ciphersuites (if other requisites are
1081 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001082 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1083 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1084 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1085 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1086 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1087 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1088 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1089 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1090 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1091 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1092 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1093 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001094 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1095 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1096 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1097 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1098 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001099 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001100 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001101 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001102 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1103 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1104 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1105 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1106 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1107 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1108 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1109 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1110 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1111 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1112 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1113 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1114 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1115 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1116 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1117 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1118 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1119 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1120 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1121 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1122 * TLS_RSA_WITH_AES_256_GCM_SHA384
1123 * TLS_RSA_WITH_AES_256_CBC_SHA256
1124 * TLS_RSA_WITH_AES_256_CBC_SHA
1125 * TLS_RSA_WITH_AES_128_GCM_SHA256
1126 * TLS_RSA_WITH_AES_128_CBC_SHA256
1127 * TLS_RSA_WITH_AES_128_CBC_SHA
1128 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1129 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1130 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1131 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1132 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1133 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1134 * TLS_PSK_WITH_AES_256_GCM_SHA384
1135 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001136 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001137 * TLS_PSK_WITH_AES_128_GCM_SHA256
1138 * TLS_PSK_WITH_AES_128_CBC_SHA256
1139 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001140 *
Paul Bakkercff68422013-09-15 20:43:33 +02001141 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001142 */
Paul Bakker40e46942009-01-03 21:51:57 +00001143#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001144
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001145/**
1146 * \def POLARSSL_ARC4_C
1147 *
1148 * Enable the ARCFOUR stream cipher.
1149 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001150 * Module: library/arc4.c
1151 * Caller: library/ssl_tls.c
1152 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001153 * This module enables the following ciphersuites (if other requisites are
1154 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001155 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1156 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001157 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001158 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001159 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1160 * TLS_DHE_PSK_WITH_RC4_128_SHA
1161 * TLS_RSA_WITH_RC4_128_SHA
1162 * TLS_RSA_WITH_RC4_128_MD5
1163 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001164 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001165 */
Paul Bakker40e46942009-01-03 21:51:57 +00001166#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001167
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001168/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001169 * \def POLARSSL_ASN1_PARSE_C
1170 *
1171 * Enable the generic ASN1 parser.
1172 *
1173 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001174 * Caller: library/x509.c
1175 * library/dhm.c
1176 * library/pkcs12.c
1177 * library/pkcs5.c
1178 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001179 */
1180#define POLARSSL_ASN1_PARSE_C
1181
1182/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001183 * \def POLARSSL_ASN1_WRITE_C
1184 *
1185 * Enable the generic ASN1 writer.
1186 *
1187 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001188 * Caller: library/ecdsa.c
1189 * library/pkwrite.c
1190 * library/x509_create.c
1191 * library/x509write_crt.c
1192 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001193 */
1194#define POLARSSL_ASN1_WRITE_C
1195
1196/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001197 * \def POLARSSL_BASE64_C
1198 *
1199 * Enable the Base64 module.
1200 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001201 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001202 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001203 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001204 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001205 */
Paul Bakker40e46942009-01-03 21:51:57 +00001206#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001207
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001208/**
1209 * \def POLARSSL_BIGNUM_C
1210 *
Paul Bakker9a736322012-11-14 12:39:52 +00001211 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001212 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001213 * Module: library/bignum.c
1214 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001215 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001216 * library/rsa.c
1217 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001218 *
1219 * This module is required for RSA and DHM support.
1220 */
Paul Bakker40e46942009-01-03 21:51:57 +00001221#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001222
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001223/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001224 * \def POLARSSL_BLOWFISH_C
1225 *
1226 * Enable the Blowfish block cipher.
1227 *
1228 * Module: library/blowfish.c
1229 */
1230#define POLARSSL_BLOWFISH_C
1231
1232/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001233 * \def POLARSSL_CAMELLIA_C
1234 *
1235 * Enable the Camellia block cipher.
1236 *
Paul Bakker38119b12009-01-10 23:31:23 +00001237 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001238 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001239 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001240 * This module enables the following ciphersuites (if other requisites are
1241 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001242 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1243 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1244 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1245 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1246 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1247 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1248 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1249 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001250 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1251 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1252 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1253 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1254 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001255 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001256 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1257 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1258 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1259 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1260 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1261 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1262 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1263 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1264 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1265 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1266 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1267 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1268 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1269 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1270 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1271 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1272 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1273 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1274 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1275 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1276 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1277 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1278 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1279 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1280 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1281 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1282 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1283 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001284 */
1285#define POLARSSL_CAMELLIA_C
1286
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001287/**
Paul Bakker64a96ea2014-05-22 15:13:02 +02001288 * \def POLARSSL_CCM_C
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001289 *
1290 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1291 *
1292 * Module: library/ccm.c
1293 *
1294 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
1295 *
1296 * This module enables the AES-CCM ciphersuites, if other requisites are
1297 * enabled as well.
1298 */
1299#define POLARSSL_CCM_C
1300
1301/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001302 * \def POLARSSL_CERTS_C
1303 *
1304 * Enable the test certificates.
1305 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001306 * Module: library/certs.c
1307 * Caller:
1308 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001309 * Requires: POLARSSL_PEM_PARSE_C
1310 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001311 * This module is used for testing (ssl_client/server).
1312 */
Paul Bakker40e46942009-01-03 21:51:57 +00001313#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001314
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001315/**
1316 * \def POLARSSL_CIPHER_C
1317 *
1318 * Enable the generic cipher layer.
1319 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001320 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001321 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001322 *
1323 * Uncomment to enable generic cipher wrappers.
1324 */
1325#define POLARSSL_CIPHER_C
1326
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001327/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001328 * \def POLARSSL_CTR_DRBG_C
1329 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001330 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001331 *
1332 * Module: library/ctr_drbg.c
1333 * Caller:
1334 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001335 * Requires: POLARSSL_AES_C
1336 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001337 * This module provides the CTR_DRBG AES-256 random number generator.
1338 */
1339#define POLARSSL_CTR_DRBG_C
1340
1341/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001342 * \def POLARSSL_DEBUG_C
1343 *
1344 * Enable the debug functions.
1345 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001346 * Module: library/debug.c
1347 * Caller: library/ssl_cli.c
1348 * library/ssl_srv.c
1349 * library/ssl_tls.c
1350 *
1351 * This module provides debugging functions.
1352 */
Paul Bakker40e46942009-01-03 21:51:57 +00001353#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001354
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001355/**
1356 * \def POLARSSL_DES_C
1357 *
1358 * Enable the DES block cipher.
1359 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001360 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001361 * Caller: library/pem.c
1362 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001363 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001364 * This module enables the following ciphersuites (if other requisites are
1365 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001366 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1367 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001368 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001369 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001370 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1371 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1372 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1373 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1374 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001375 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001376 *
Paul Bakkercff68422013-09-15 20:43:33 +02001377 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001378 */
Paul Bakker40e46942009-01-03 21:51:57 +00001379#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001380
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001381/**
1382 * \def POLARSSL_DHM_C
1383 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001384 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001385 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001386 * Module: library/dhm.c
1387 * Caller: library/ssl_cli.c
1388 * library/ssl_srv.c
1389 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001390 * This module is used by the following key exchanges:
1391 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001392 */
Paul Bakker40e46942009-01-03 21:51:57 +00001393#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001394
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001395/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001396 * \def POLARSSL_ECDH_C
1397 *
1398 * Enable the elliptic curve Diffie-Hellman library.
1399 *
1400 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001401 * Caller: library/ssl_cli.c
1402 * library/ssl_srv.c
1403 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001404 * This module is used by the following key exchanges:
1405 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001406 *
1407 * Requires: POLARSSL_ECP_C
1408 */
1409#define POLARSSL_ECDH_C
1410
1411/**
1412 * \def POLARSSL_ECDSA_C
1413 *
1414 * Enable the elliptic curve DSA library.
1415 *
1416 * Module: library/ecdsa.c
1417 * Caller:
1418 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001419 * This module is used by the following key exchanges:
1420 * ECDHE-ECDSA
1421 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001422 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001423 */
1424#define POLARSSL_ECDSA_C
1425
1426/**
1427 * \def POLARSSL_ECP_C
1428 *
1429 * Enable the elliptic curve over GF(p) library.
1430 *
1431 * Module: library/ecp.c
1432 * Caller: library/ecdh.c
1433 * library/ecdsa.c
1434 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001435 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001436 */
1437#define POLARSSL_ECP_C
1438
1439/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001440 * \def POLARSSL_ENTROPY_C
1441 *
1442 * Enable the platform-specific entropy code.
1443 *
1444 * Module: library/entropy.c
1445 * Caller:
1446 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001447 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001448 *
1449 * This module provides a generic entropy pool
1450 */
1451#define POLARSSL_ENTROPY_C
1452
1453/**
Paul Bakker9d781402011-05-09 16:17:09 +00001454 * \def POLARSSL_ERROR_C
1455 *
1456 * Enable error code to error string conversion.
1457 *
1458 * Module: library/error.c
1459 * Caller:
1460 *
Shuo Chen95a0d112014-04-04 21:04:40 -07001461 * This module enables polarssl_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001462 */
1463#define POLARSSL_ERROR_C
1464
1465/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001466 * \def POLARSSL_GCM_C
1467 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001468 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001469 *
1470 * Module: library/gcm.c
1471 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001472 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001473 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001474 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1475 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001476 */
1477#define POLARSSL_GCM_C
1478
1479/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001480 * \def POLARSSL_HAVEGE_C
1481 *
1482 * Enable the HAVEGE random generator.
1483 *
Paul Bakker2a844242013-06-24 13:01:53 +02001484 * Warning: the HAVEGE random generator is not suitable for virtualized
1485 * environments
1486 *
1487 * Warning: the HAVEGE random generator is dependent on timing and specific
1488 * processor traits. It is therefore not advised to use HAVEGE as
1489 * your applications primary random generator or primary entropy pool
1490 * input. As a secondary input to your entropy pool, it IS able add
1491 * the (limited) extra entropy it provides.
1492 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001493 * Module: library/havege.c
1494 * Caller:
1495 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001496 * Requires: POLARSSL_TIMING_C
1497 *
Paul Bakker2a844242013-06-24 13:01:53 +02001498 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001499 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001500//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001501
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001502/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001503 * \def POLARSSL_HMAC_DRBG_C
1504 *
1505 * Enable the HMAC_DRBG random generator.
1506 *
1507 * Module: library/hmac_drbg.c
1508 * Caller:
1509 *
1510 * Requires: POLARSSL_MD_C
1511 *
1512 * Uncomment to enable the HMAC_DRBG random number geerator.
1513 */
1514#define POLARSSL_HMAC_DRBG_C
1515
1516/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001517 * \def POLARSSL_MD_C
1518 *
1519 * Enable the generic message digest layer.
1520 *
Paul Bakker17373852011-01-06 14:20:01 +00001521 * Module: library/md.c
1522 * Caller:
1523 *
1524 * Uncomment to enable generic message digest wrappers.
1525 */
1526#define POLARSSL_MD_C
1527
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001528/**
1529 * \def POLARSSL_MD2_C
1530 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001531 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001532 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001533 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001534 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001535 *
1536 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001537 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001538//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001539
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001540/**
1541 * \def POLARSSL_MD4_C
1542 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001543 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001544 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001545 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001546 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001547 *
1548 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001549 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001550//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001551
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001552/**
1553 * \def POLARSSL_MD5_C
1554 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001555 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001556 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001557 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001558 * Caller: library/md.c
1559 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001560 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001561 *
1562 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001563 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001564 */
Paul Bakker40e46942009-01-03 21:51:57 +00001565#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001566
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001567/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001568 * \def POLARSSL_MEMORY_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001569 * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead.
Paul Bakker6e339b52013-07-03 13:37:05 +02001570 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001571//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001572
1573/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001574 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1575 *
1576 * Enable the buffer allocator implementation that makes use of a (stack)
1577 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1578 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001579 *
1580 * Module: library/memory_buffer_alloc.c
1581 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001582 * Requires: POLARSSL_PLATFORM_C
1583 * POLARSSL_PLATFORM_MEMORY (to use it within PolarSSL)
Paul Bakker6e339b52013-07-03 13:37:05 +02001584 *
1585 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001586 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001587//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001588
1589/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001590 * \def POLARSSL_NET_C
1591 *
1592 * Enable the TCP/IP networking routines.
1593 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001594 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001595 *
1596 * This module provides TCP/IP networking routines.
1597 */
Paul Bakker40e46942009-01-03 21:51:57 +00001598#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001599
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001600/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001601 * \def POLARSSL_OID_C
1602 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001603 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001604 *
1605 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001606 * Caller: library/asn1write.c
1607 * library/pkcs5.c
1608 * library/pkparse.c
1609 * library/pkwrite.c
1610 * library/rsa.c
1611 * library/x509.c
1612 * library/x509_create.c
1613 * library/x509_crl.c
1614 * library/x509_crt.c
1615 * library/x509_csr.c
1616 * library/x509write_crt.c
1617 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001618 *
1619 * This modules translates between OIDs and internal values.
1620 */
1621#define POLARSSL_OID_C
1622
1623/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001624 * \def POLARSSL_PADLOCK_C
1625 *
1626 * Enable VIA Padlock support on x86.
1627 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001628 * Module: library/padlock.c
1629 * Caller: library/aes.c
1630 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001631 * Requires: POLARSSL_HAVE_ASM
1632 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001633 * This modules adds support for the VIA PadLock on x86.
1634 */
Paul Bakker40e46942009-01-03 21:51:57 +00001635#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001636
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001637/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001638 * \def POLARSSL_PBKDF2_C
1639 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001640 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001641 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001642 *
1643 * Module: library/pbkdf2.c
1644 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001645 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001646 *
1647 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001648 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001649#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001650
1651/**
Paul Bakkercff68422013-09-15 20:43:33 +02001652 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001653 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001654 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001655 *
1656 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001657 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001658 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001659 * library/x509_crl.c
1660 * library/x509_crt.c
1661 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001662 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001663 * Requires: POLARSSL_BASE64_C
1664 *
Paul Bakkercff68422013-09-15 20:43:33 +02001665 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001666 */
Paul Bakkercff68422013-09-15 20:43:33 +02001667#define POLARSSL_PEM_PARSE_C
1668
1669/**
1670 * \def POLARSSL_PEM_WRITE_C
1671 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001672 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001673 *
1674 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001675 * Caller: library/pkwrite.c
1676 * library/x509write_crt.c
1677 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001678 *
1679 * Requires: POLARSSL_BASE64_C
1680 *
1681 * This modules adds support for encoding / writing PEM files.
1682 */
1683#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001684
1685/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001686 * \def POLARSSL_PK_C
1687 *
1688 * Enable the generic public (asymetric) key layer.
1689 *
1690 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001691 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001692 * library/ssl_cli.c
1693 * library/ssl_srv.c
1694 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001695 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1696 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001697 * Uncomment to enable generic public key wrappers.
1698 */
1699#define POLARSSL_PK_C
1700
1701/**
Paul Bakker4606c732013-09-15 17:04:23 +02001702 * \def POLARSSL_PK_PARSE_C
1703 *
1704 * Enable the generic public (asymetric) key parser.
1705 *
1706 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001707 * Caller: library/x509_crt.c
1708 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001709 *
1710 * Requires: POLARSSL_PK_C
1711 *
1712 * Uncomment to enable generic public key parse functions.
1713 */
1714#define POLARSSL_PK_PARSE_C
1715
1716/**
1717 * \def POLARSSL_PK_WRITE_C
1718 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001719 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001720 *
1721 * Module: library/pkwrite.c
1722 * Caller: library/x509write.c
1723 *
1724 * Requires: POLARSSL_PK_C
1725 *
1726 * Uncomment to enable generic public key write functions.
1727 */
1728#define POLARSSL_PK_WRITE_C
1729
1730/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001731 * \def POLARSSL_PKCS5_C
1732 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001733 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001734 *
1735 * Module: library/pkcs5.c
1736 *
1737 * Requires: POLARSSL_MD_C
1738 *
1739 * This module adds support for the PKCS#5 functions.
1740 */
1741#define POLARSSL_PKCS5_C
1742
1743/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001744 * \def POLARSSL_PKCS11_C
1745 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001746 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001747 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001748 * Module: library/pkcs11.c
1749 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001750 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001751 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001752 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001753 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001754 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001755 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001756//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001757
1758/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001759 * \def POLARSSL_PKCS12_C
1760 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001761 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001762 * Adds algorithms for parsing PKCS#8 encrypted private keys
1763 *
1764 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001765 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001766 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001767 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1768 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001769 *
1770 * This module enables PKCS#12 functions.
1771 */
1772#define POLARSSL_PKCS12_C
1773
1774/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001775 * \def POLARSSL_PLATFORM_C
1776 *
1777 * Enable the platform abstraction layer that allows you to re-assign
1778 * functions like malloc(), free(), printf(), fprintf()
1779 *
1780 * Module: library/platform.c
1781 * Caller: Most other .c files
1782 *
1783 * This module enables abstraction of common (libc) functions.
1784 */
1785#define POLARSSL_PLATFORM_C
1786
1787/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001788 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001789 *
1790 * Enable the RIPEMD-160 hash algorithm.
1791 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001792 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001793 * Caller: library/md.c
1794 *
1795 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001796#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001797
1798/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001799 * \def POLARSSL_RSA_C
1800 *
1801 * Enable the RSA public-key cryptosystem.
1802 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001803 * Module: library/rsa.c
1804 * Caller: library/ssl_cli.c
1805 * library/ssl_srv.c
1806 * library/ssl_tls.c
1807 * library/x509.c
1808 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001809 * This module is used by the following key exchanges:
1810 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001811 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001812 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001813 */
Paul Bakker40e46942009-01-03 21:51:57 +00001814#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001815
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001816/**
1817 * \def POLARSSL_SHA1_C
1818 *
1819 * Enable the SHA1 cryptographic hash algorithm.
1820 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001821 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001822 * Caller: library/md.c
1823 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001824 * library/ssl_srv.c
1825 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001826 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001827 *
1828 * This module is required for SSL/TLS and SHA1-signed certificates.
1829 */
Paul Bakker40e46942009-01-03 21:51:57 +00001830#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001831
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001832/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001833 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001834 *
1835 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001836 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001837 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001838 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001839 * Caller: library/entropy.c
1840 * library/md.c
1841 * library/ssl_cli.c
1842 * library/ssl_srv.c
1843 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001844 *
1845 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001846 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001847 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001848#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001849
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001850/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001851 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001852 *
1853 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001854 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001855 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001856 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001857 * Caller: library/entropy.c
1858 * library/md.c
1859 * library/ssl_cli.c
1860 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001861 *
1862 * This module adds support for SHA-384 and SHA-512.
1863 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001864#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001865
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001866/**
Paul Bakker0a597072012-09-25 21:55:46 +00001867 * \def POLARSSL_SSL_CACHE_C
1868 *
1869 * Enable simple SSL cache implementation.
1870 *
1871 * Module: library/ssl_cache.c
1872 * Caller:
1873 *
1874 * Requires: POLARSSL_SSL_CACHE_C
1875 */
1876#define POLARSSL_SSL_CACHE_C
1877
1878/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001879 * \def POLARSSL_SSL_CLI_C
1880 *
1881 * Enable the SSL/TLS client code.
1882 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001883 * Module: library/ssl_cli.c
1884 * Caller:
1885 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001886 * Requires: POLARSSL_SSL_TLS_C
1887 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001888 * This module is required for SSL/TLS client support.
1889 */
Paul Bakker40e46942009-01-03 21:51:57 +00001890#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001891
Paul Bakker9a736322012-11-14 12:39:52 +00001892/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001893 * \def POLARSSL_SSL_SRV_C
1894 *
1895 * Enable the SSL/TLS server code.
1896 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001897 * Module: library/ssl_srv.c
1898 * Caller:
1899 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001900 * Requires: POLARSSL_SSL_TLS_C
1901 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001902 * This module is required for SSL/TLS server support.
1903 */
Paul Bakker40e46942009-01-03 21:51:57 +00001904#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001905
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001906/**
1907 * \def POLARSSL_SSL_TLS_C
1908 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001909 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001910 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001911 * Module: library/ssl_tls.c
1912 * Caller: library/ssl_cli.c
1913 * library/ssl_srv.c
1914 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001915 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001916 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001917 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001918 * This module is required for SSL/TLS.
1919 */
Paul Bakker40e46942009-01-03 21:51:57 +00001920#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001921
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001922/**
Paul Bakker2466d932013-09-28 14:40:38 +02001923 * \def POLARSSL_THREADING_C
1924 *
1925 * Enable the threading abstraction layer.
1926 * By default PolarSSL assumes it is used in a non-threaded environment or that
1927 * contexts are not shared between threads. If you do intend to use contexts
1928 * between threads, you will need to enable this layer to prevent race
1929 * conditions.
1930 *
1931 * Module: library/threading.c
1932 *
1933 * This allows different threading implementations (self-implemented or
1934 * provided).
1935 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001936 * You will have to enable either POLARSSL_THREADING_ALT or
1937 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001938 *
1939 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001940 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001941//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001942
1943/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001944 * \def POLARSSL_TIMING_C
1945 *
1946 * Enable the portable timing interface.
1947 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001948 * Module: library/timing.c
1949 * Caller: library/havege.c
1950 *
1951 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001952 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001953#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001954
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001955/**
1956 * \def POLARSSL_VERSION_C
1957 *
1958 * Enable run-time version information.
1959 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001960 * Module: library/version.c
1961 *
1962 * This module provides run-time version information.
1963 */
1964#define POLARSSL_VERSION_C
1965
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001966/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001967 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001968 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001969 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001970 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001971 * Module: library/x509.c
1972 * Caller: library/x509_crl.c
1973 * library/x509_crt.c
1974 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001975 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001976 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001977 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001978 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001979 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001980 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001981#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001982
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001983/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001984 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001985 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001986 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001987 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001988 * Module: library/x509_crt.c
1989 * Caller: library/ssl_cli.c
1990 * library/ssl_srv.c
1991 * library/ssl_tls.c
1992 *
1993 * Requires: POLARSSL_X509_USE_C
1994 *
1995 * This module is required for X.509 certificate parsing.
1996 */
1997#define POLARSSL_X509_CRT_PARSE_C
1998
1999/**
2000 * \def POLARSSL_X509_CRL_PARSE_C
2001 *
2002 * Enable X.509 CRL parsing.
2003 *
2004 * Module: library/x509_crl.c
2005 * Caller: library/x509_crt.c
2006 *
2007 * Requires: POLARSSL_X509_USE_C
2008 *
2009 * This module is required for X.509 CRL parsing.
2010 */
2011#define POLARSSL_X509_CRL_PARSE_C
2012
2013/**
2014 * \def POLARSSL_X509_CSR_PARSE_C
2015 *
2016 * Enable X.509 Certificate Signing Request (CSR) parsing.
2017 *
2018 * Module: library/x509_csr.c
2019 * Caller: library/x509_crt_write.c
2020 *
2021 * Requires: POLARSSL_X509_USE_C
2022 *
2023 * This module is used for reading X.509 certificate request.
2024 */
2025#define POLARSSL_X509_CSR_PARSE_C
2026
2027/**
2028 * \def POLARSSL_X509_CREATE_C
2029 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002030 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002031 *
2032 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002033 *
Paul Bakker4606c732013-09-15 17:04:23 +02002034 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002035 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002036 * This module is the basis for creating X.509 certificates and CSRs.
2037 */
2038#define POLARSSL_X509_CREATE_C
2039
2040/**
2041 * \def POLARSSL_X509_CRT_WRITE_C
2042 *
2043 * Enable creating X.509 certificates.
2044 *
2045 * Module: library/x509_crt_write.c
2046 *
2047 * Requires: POLARSSL_CREATE_C
2048 *
2049 * This module is required for X.509 certificate creation.
2050 */
2051#define POLARSSL_X509_CRT_WRITE_C
2052
2053/**
2054 * \def POLARSSL_X509_CSR_WRITE_C
2055 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002056 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002057 *
2058 * Module: library/x509_csr_write.c
2059 *
2060 * Requires: POLARSSL_CREATE_C
2061 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002062 * This module is required for X.509 certificate request writing.
2063 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002064#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002065
2066/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002067 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002068 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002069 * Enable the XTEA block cipher.
2070 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002071 * Module: library/xtea.c
2072 * Caller:
2073 */
2074#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002075
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002076/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002077
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002078/**
2079 * \name SECTION: Module configuration options
2080 *
2081 * This section allows for the setting of module specific sizes and
2082 * configuration options. The default values are already present in the
2083 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002084 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002085 * Our advice is to enable options and change their values here
2086 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002087 *
2088 * Please check the respective header file for documentation on these
2089 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002090 * \{
2091 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002092
Paul Bakker088c5c52014-04-25 11:11:10 +02002093/* MPI / BIGNUM options */
2094//#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2095//#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002096
Paul Bakker088c5c52014-04-25 11:11:10 +02002097/* CTR_DRBG options */
2098//#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2099//#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2100//#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2101//#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2102//#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002103
Paul Bakker088c5c52014-04-25 11:11:10 +02002104/* HMAC_DRBG options */
2105//#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2106//#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2107//#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2108//#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002109
Paul Bakker088c5c52014-04-25 11:11:10 +02002110/* ECP options */
2111//#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2112//#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2113//#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002114
Paul Bakker088c5c52014-04-25 11:11:10 +02002115/* Entropy options */
2116//#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2117//#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002118
Paul Bakker088c5c52014-04-25 11:11:10 +02002119/* Memory buffer allocator options */
Manuel Pégourié-Gonnard4d8db4a2014-05-05 14:04:28 +02002120//#define POLARSSL_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002121
Paul Bakker088c5c52014-04-25 11:11:10 +02002122/* Platform options */
2123//#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. */
2124//#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2125//#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2126//#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2127//#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002128
Paul Bakker088c5c52014-04-25 11:11:10 +02002129/* SSL Cache options */
2130//#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2131//#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002132
Paul Bakker088c5c52014-04-25 11:11:10 +02002133/* SSL options */
2134//#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2135//#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002136
Paul Bakkereaebbd52014-04-25 15:04:14 +02002137/* Debug options */
2138//#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */
2139
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002140/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002141
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002142#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002143
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002144#endif /* POLARSSL_CONFIG_H */