blob: 5bfce9cc2e2075235c63d48854f6aa15bbd6ec22 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakker37ca75d2011-01-06 12:28:03 +00004 * \brief Configuration options (set of defines)
5 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01006 * Copyright (C) 2006-2014, Brainspark B.V.
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
8 * This file is part of PolarSSL (http://www.polarssl.org)
Paul Bakker84f12b72010-07-18 10:13:04 +00009 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakkerb96f1542010-07-18 20:36:00 +000010 *
Paul Bakker77b385e2009-07-28 17:23:11 +000011 * All rights reserved.
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000012 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000013 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
Paul Bakker5121ce52009-01-03 21:22:43 +000027 * This set of compile-time options may be used to enable
28 * or disable features selectively, and reduce the global
29 * memory footprint.
30 */
Paul Bakker40e46942009-01-03 21:51:57 +000031#ifndef POLARSSL_CONFIG_H
32#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000033
Paul Bakkercce9d772011-11-18 14:26:47 +000034#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
Paul Bakker5121ce52009-01-03 21:22:43 +000035#define _CRT_SECURE_NO_DEPRECATE 1
36#endif
37
Paul Bakkerf3b86c12011-01-27 15:24:17 +000038/**
Paul Bakker0a62cd12011-01-21 11:00:08 +000039 * \name SECTION: System support
40 *
41 * This section sets system specific settings.
42 * \{
43 */
44
Paul Bakkerf3b86c12011-01-27 15:24:17 +000045/**
46 * \def POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000047 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000048 * The system uses 8-bit wide native integers.
49 *
50 * Uncomment if native integers are 8-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000051 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020052//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000053
Paul Bakkerf3b86c12011-01-27 15:24:17 +000054/**
55 * \def POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000056 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000057 * The system uses 16-bit wide native integers.
58 *
59 * Uncomment if native integers are 16-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000060 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020061//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000062
Paul Bakkerf3b86c12011-01-27 15:24:17 +000063/**
Paul Bakker62261d62012-10-02 12:19:31 +000064 * \def POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000065 *
Paul Bakker62261d62012-10-02 12:19:31 +000066 * The compiler supports the 'long long' type.
67 * (Only used on 32-bit platforms)
Paul Bakker5121ce52009-01-03 21:22:43 +000068 */
Paul Bakker62261d62012-10-02 12:19:31 +000069#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000070
Paul Bakkerf3b86c12011-01-27 15:24:17 +000071/**
72 * \def POLARSSL_HAVE_ASM
73 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020074 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000075 *
76 * Requires support for asm() in compiler.
77 *
78 * Used in:
79 * library/timing.c
80 * library/padlock.c
81 * include/polarssl/bn_mul.h
82 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020083 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000084 */
Paul Bakker40e46942009-01-03 21:51:57 +000085#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000086
Paul Bakkerf3b86c12011-01-27 15:24:17 +000087/**
88 * \def POLARSSL_HAVE_SSE2
89 *
Paul Bakkere23c3152012-10-01 14:42:47 +000090 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000091 *
Paul Bakker5121ce52009-01-03 21:22:43 +000092 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000093 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020094//#define POLARSSL_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020095
96/**
97 * \def POLARSSL_HAVE_TIME
98 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020099 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200100 *
101 * Comment if your system does not support time functions
102 */
103#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100104
105/**
106 * \def POLARSSL_HAVE_IPV6
107 *
108 * System supports the basic socket interface for IPv6 (RFC 3493),
Manuel Pégourié-Gonnard767f02c2013-12-13 16:23:39 +0100109 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100110 *
Manuel Pégourié-Gonnard13211352013-12-17 17:38:55 +0100111 * Note: on Windows/MingW, XP or higher is required.
112 *
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100113 * Comment if your system does not support the IPv6 socket interface
114 */
115#define POLARSSL_HAVE_IPV6
Paul Bakker747a83a2014-02-01 22:50:07 +0100116
117/**
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100118 * \def POLARSSL_PLATFORM_MEMORY
119 *
120 * Enable the memory allocation layer.
121 *
122 * By default PolarSSL uses the system-provided malloc() and free().
123 * This allows different allocators (self-implemented or provided) to be
124 * provided to the platform abstraction layer.
125 *
126 * Enabling POLARSSL_PLATFORM_MEMORY will provide "platform_set_malloc_free()"
127 * to allow you to set an alternative malloc() and free() function pointer.
128 *
129 * Requires: POLARSSL_PLATFORM_C
130 *
131 * Enable this layer to allow use of alternative memory allocators.
132 */
133//#define POLARSSL_PLATFORM_MEMORY
134
135/**
Paul Bakker088c5c52014-04-25 11:11:10 +0200136 * \def POLARSSL_PLATFORM_NO_STD_FUNCTIONS
137 *
138 * Do not assign standard functions in the platform layer (e.g. malloc() to
139 * POLARSSL_PLATFORM_STD_MALLOC and printf() to POLARSSL_PLATFORM_STD_PRINTF)
140 *
141 * This makes sure there are no linking errors on platforms that do not support
142 * these functions. You will HAVE to provide alternatives, either at runtime
143 * via the platform_set_xxx() functions or at compile time by setting
144 * the POLARSSL_PLATFORM_STD_XXX defines.
145 *
146 * Requires: POLARSSL_PLATFORM_C
147 *
148 * Uncomment to prevent default assignment of standard functions in the
149 * platform layer.
150 */
151//#define POLARSSL_PLATFORM_NO_STD_FUNCTIONS
152
153/**
Paul Bakker747a83a2014-02-01 22:50:07 +0100154 * \def POLARSSL_PLATFORM_XXX_ALT
155 *
156 * Uncomment a macro to let PolarSSL support the function in the platform
157 * abstraction layer.
158 *
159 * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, PolarSSL will
160 * provide a function "platform_set_printf()" that allows you to set an
161 * alternative printf function pointer.
162 *
163 * All these define require POLARSSL_PLATFORM_C to be defined!
164 *
165 * Uncomment a macro to enable alternate implementation of specific base
166 * platform function
167 */
168//#define POLARSSL_PLATFORM_PRINTF_ALT
169//#define POLARSSL_PLATFORM_FPRINTF_ALT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200170/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000171
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000172/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000173 * \name SECTION: PolarSSL feature support
174 *
175 * This section sets support for features that are or are not needed
176 * within the modules that are enabled.
177 * \{
178 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000179
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000180/**
Paul Bakkerf2561b32014-02-06 15:11:55 +0100181 * \def POLARSSL_TIMING_ALT
182 *
183 * Uncomment to provide your own alternate implementation for hardclock(),
184 * get_timer(), set_alarm() and m_sleep().
185 *
186 * Only works if you have POLARSSL_TIMING_C enabled.
187 *
188 * You will need to provide a header "timing_alt.h" and an implementation at
189 * compile time.
190 */
191//#define POLARSSL_TIMING_ALT
192
193/**
Paul Bakker90995b52013-06-24 19:20:35 +0200194 * \def POLARSSL_XXX_ALT
195 *
196 * Uncomment a macro to let PolarSSL use your alternate core implementation of
197 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
198 * implementations). Keep in mind that the function prototypes should remain
199 * the same.
200 *
201 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
202 * provide the "struct aes_context" definition and omit the base function
203 * declarations and implementations. "aes_alt.h" will be included from
204 * "aes.h" to include the new function definitions.
205 *
206 * Uncomment a macro to enable alternate implementation for core algorithm
207 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200208 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200209//#define POLARSSL_AES_ALT
210//#define POLARSSL_ARC4_ALT
211//#define POLARSSL_BLOWFISH_ALT
212//#define POLARSSL_CAMELLIA_ALT
213//#define POLARSSL_DES_ALT
214//#define POLARSSL_XTEA_ALT
215//#define POLARSSL_MD2_ALT
216//#define POLARSSL_MD4_ALT
217//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100218//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200219//#define POLARSSL_SHA1_ALT
220//#define POLARSSL_SHA256_ALT
221//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200222
223/**
Paul Bakker15566e42011-04-24 21:19:15 +0000224 * \def POLARSSL_AES_ROM_TABLES
225 *
226 * Store the AES tables in ROM.
227 *
228 * Uncomment this macro to store the AES tables in ROM.
229 *
Paul Bakker15566e42011-04-24 21:19:15 +0000230 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200231//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000232
233/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200234 * \def POLARSSL_CIPHER_MODE_CBC
235 *
236 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
237 */
238#define POLARSSL_CIPHER_MODE_CBC
239
240/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000241 * \def POLARSSL_CIPHER_MODE_CFB
242 *
243 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
244 */
245#define POLARSSL_CIPHER_MODE_CFB
246
247/**
248 * \def POLARSSL_CIPHER_MODE_CTR
249 *
250 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
251 */
252#define POLARSSL_CIPHER_MODE_CTR
253
254/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000255 * \def POLARSSL_CIPHER_NULL_CIPHER
256 *
257 * Enable NULL cipher.
258 * Warning: Only do so when you know what you are doing. This allows for
259 * encryption or channels without any security!
260 *
261 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
262 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100263 * TLS_ECDH_ECDSA_WITH_NULL_SHA
264 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200265 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100266 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200267 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200268 * TLS_ECDHE_PSK_WITH_NULL_SHA256
269 * TLS_ECDHE_PSK_WITH_NULL_SHA
270 * TLS_DHE_PSK_WITH_NULL_SHA384
271 * TLS_DHE_PSK_WITH_NULL_SHA256
272 * TLS_DHE_PSK_WITH_NULL_SHA
273 * TLS_RSA_WITH_NULL_SHA256
274 * TLS_RSA_WITH_NULL_SHA
275 * TLS_RSA_WITH_NULL_MD5
276 * TLS_RSA_PSK_WITH_NULL_SHA384
277 * TLS_RSA_PSK_WITH_NULL_SHA256
278 * TLS_RSA_PSK_WITH_NULL_SHA
279 * TLS_PSK_WITH_NULL_SHA384
280 * TLS_PSK_WITH_NULL_SHA256
281 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000282 *
283 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000284 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200285//#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000286
287/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200288 * \def POLARSSL_CIPHER_PADDING_XXX
289 *
290 * Uncomment or comment macros to add support for specific padding modes
291 * in the cipher layer with cipher modes that support padding (e.g. CBC)
292 *
293 * If you disable all padding modes, only full blocks can be used with CBC.
294 *
295 * Enable padding modes in the cipher layer.
296 */
297#define POLARSSL_CIPHER_PADDING_PKCS7
298#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
299#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
300#define POLARSSL_CIPHER_PADDING_ZEROS
301
302/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000303 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
304 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200305 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000306 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000307 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000308 *
309 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000310 * TLS_RSA_WITH_DES_CBC_SHA
311 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000312 *
313 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000314 */
Paul Bakker03b6a462014-04-17 16:22:31 +0200315//#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000316
317/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200318 * \def POLARSSL_ECP_XXXX_ENABLED
319 *
320 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200321 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200322 *
323 * Comment macros to disable the curve and functions for it
324 */
325#define POLARSSL_ECP_DP_SECP192R1_ENABLED
326#define POLARSSL_ECP_DP_SECP224R1_ENABLED
327#define POLARSSL_ECP_DP_SECP256R1_ENABLED
328#define POLARSSL_ECP_DP_SECP384R1_ENABLED
329#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100330#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100331#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100332#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200333#define POLARSSL_ECP_DP_BP256R1_ENABLED
334#define POLARSSL_ECP_DP_BP384R1_ENABLED
335#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100336//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
337#define POLARSSL_ECP_DP_M255_ENABLED
338//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
339//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200340
341/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200342 * \def POLARSSL_ECP_NIST_OPTIM
343 *
344 * Enable specific 'modulo p' routines for each NIST prime.
345 * Depending on the prime and architecture, makes operations 4 to 8 times
346 * faster on the corresponding curve.
347 *
348 * Comment this macro to disable NIST curves optimisation.
349 */
350#define POLARSSL_ECP_NIST_OPTIM
351
352/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100353 * \def POLARSSL_ECDSA_DETERMINISTIC
354 *
355 * Enable deterministic ECDSA (RFC 6979).
356 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
357 * may result in a compromise of the long-term signing key. This is avoided by
358 * the deterministic variant.
359 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100360 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100361 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100362 * Comment this macro to disable deterministic ECDSA.
363 */
364#define POLARSSL_ECDSA_DETERMINISTIC
365
366/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200367 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
368 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200369 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200370 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200371 * This enables the following ciphersuites (if other requisites are
372 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200373 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200374 * TLS_PSK_WITH_AES_256_CBC_SHA384
375 * TLS_PSK_WITH_AES_256_CBC_SHA
376 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
377 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
378 * TLS_PSK_WITH_AES_128_GCM_SHA256
379 * TLS_PSK_WITH_AES_128_CBC_SHA256
380 * TLS_PSK_WITH_AES_128_CBC_SHA
381 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
382 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
383 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
384 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200385 */
386#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
387
388/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200389 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
390 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200391 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200392 *
393 * Requires: POLARSSL_DHM_C
394 *
395 * This enables the following ciphersuites (if other requisites are
396 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200397 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200398 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
399 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
400 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
401 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
402 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
403 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
404 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
405 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
406 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
407 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
408 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200409 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200410#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200411
412/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200413 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
414 *
415 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
416 *
417 * Requires: POLARSSL_ECDH_C
418 *
419 * This enables the following ciphersuites (if other requisites are
420 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200421 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200422 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200423 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200424 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
425 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
426 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
427 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
428 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200429 */
430#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
431
432/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200433 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
434 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200435 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200436 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200437 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200438 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200439 *
440 * This enables the following ciphersuites (if other requisites are
441 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200442 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200443 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
444 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
445 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
446 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
447 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
448 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
449 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
450 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
451 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
452 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
453 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200454 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200455#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200456
457/**
458 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
459 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200460 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200461 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200462 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200463 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200464 *
465 * This enables the following ciphersuites (if other requisites are
466 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200467 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200468 * TLS_RSA_WITH_AES_256_CBC_SHA256
469 * TLS_RSA_WITH_AES_256_CBC_SHA
470 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200471 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200472 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
473 * TLS_RSA_WITH_AES_128_GCM_SHA256
474 * TLS_RSA_WITH_AES_128_CBC_SHA256
475 * TLS_RSA_WITH_AES_128_CBC_SHA
476 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
477 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
478 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200479 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200480 * TLS_RSA_WITH_RC4_128_SHA
481 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200482 */
483#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
484
485/**
486 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
487 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200488 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200489 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200490 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200491 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200492 *
493 * This enables the following ciphersuites (if other requisites are
494 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200495 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200496 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200497 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
498 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200499 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200500 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
501 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
502 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
503 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
504 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
505 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
506 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200507 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
508 */
509#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
510
511/**
512 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
513 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200514 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200515 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200516 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200517 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200518 *
519 * This enables the following ciphersuites (if other requisites are
520 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200521 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200522 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
523 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
524 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200525 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200526 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
527 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
528 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
529 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
530 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
531 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
532 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200533 */
534#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
535
536/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200537 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
538 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200539 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200540 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200541 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200542 *
543 * This enables the following ciphersuites (if other requisites are
544 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200545 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
546 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
547 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
548 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
549 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
550 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
551 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
552 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
553 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
554 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
555 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
556 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200557 */
558#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
559
560/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100561 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
562 *
563 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
564 *
565 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
566 *
567 * This enables the following ciphersuites (if other requisites are
568 * enabled as well):
569 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
570 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
571 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
572 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
573 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
574 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
575 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
576 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
577 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
578 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
579 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
580 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
581 */
582#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
583
584/**
585 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
586 *
587 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
588 *
589 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
590 *
591 * This enables the following ciphersuites (if other requisites are
592 * enabled as well):
593 * TLS_ECDH_RSA_WITH_RC4_128_SHA
594 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
595 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
596 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
597 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
598 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
599 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
600 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
601 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
602 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
603 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
604 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
605 */
606#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
607
608/**
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100609 * \def POLARSSL_PK_PARSE_EC_EXTENDED
610 *
611 * Enhance support for reading EC keys using variants of SEC1 not allowed by
612 * RFC 5915 and RFC 5480.
613 *
614 * Currently this means parsing the SpecifiedECDomain choice of EC
615 * parameters (only known groups are supported, not arbitrary domains, to
616 * avoid validation issues).
617 *
618 * Disable if you only need to support RFC 5915 + 5480 key formats.
619 */
620#define POLARSSL_PK_PARSE_EC_EXTENDED
621
622/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200623 * \def POLARSSL_ERROR_STRERROR_BC
624 *
625 * Make available the backward compatible error_strerror() next to the
626 * current polarssl_strerror().
627 *
628 * Disable if you run into name conflicts and want to really remove the
629 * error_strerror()
630 */
631#define POLARSSL_ERROR_STRERROR_BC
632
633/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100634 * \def POLARSSL_ERROR_STRERROR_DUMMY
635 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200636 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100637 * third party libraries easier.
638 *
639 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200640 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100641 */
642#define POLARSSL_ERROR_STRERROR_DUMMY
643
644/**
Paul Bakker15566e42011-04-24 21:19:15 +0000645 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000646 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200647 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200648 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200649 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000650 */
Paul Bakker15566e42011-04-24 21:19:15 +0000651#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000652
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000653/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000654 * \def POLARSSL_FS_IO
655 *
656 * Enable functions that use the filesystem.
657 */
658#define POLARSSL_FS_IO
659
660/**
Paul Bakker43655f42011-12-15 20:11:16 +0000661 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
662 *
663 * Do not add default entropy sources. These are the platform specific,
664 * hardclock and HAVEGE based poll functions.
665 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700666 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000667 * application.
668 *
669 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000670 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200671//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000672
673/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000674 * \def POLARSSL_NO_PLATFORM_ENTROPY
675 *
676 * Do not use built-in platform entropy functions.
677 * This is useful if your platform does not support
678 * standards like the /dev/urandom or Windows CryptoAPI.
679 *
680 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000681 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200682//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000683
684/**
Paul Bakker2ceda572014-02-06 15:55:25 +0100685 * \def POLARSSL_ENTROPY_FORCE_SHA256
686 *
687 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
688 * default SHA-512 based one (if both are available).
689 *
690 * Requires: POLARSSL_SHA256_C
691 *
692 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
693 * if you have performance concerns.
694 *
695 * This option is only useful if both POLARSSL_SHA256_C and
696 * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used.
697 */
698//#define POLARSSL_ENTROPY_FORCE_SHA256
699
700/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200701 * \def POLARSSL_MEMORY_DEBUG
702 *
703 * Enable debugging of buffer allocator memory issues. Automatically prints
704 * (to stderr) all (fatal) messages on memory allocation issues. Enables
705 * function for 'debug output' of allocated memory.
706 *
707 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200708 *
709 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200710 */
711//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200712
713/**
714 * \def POLARSSL_MEMORY_BACKTRACE
715 *
716 * Include backtrace information with each allocated block.
717 *
718 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
719 * GLIBC-compatible backtrace() an backtrace_symbols() support
720 *
721 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200722 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200723//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200724
725/**
Paul Bakker48377d92013-08-30 12:06:24 +0200726 * \def POLARSSL_PKCS1_V15
727 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200728 * Enable support for PKCS#1 v1.5 encoding.
729 *
Paul Bakker48377d92013-08-30 12:06:24 +0200730 * Requires: POLARSSL_RSA_C
731 *
Paul Bakker48377d92013-08-30 12:06:24 +0200732 * This enables support for PKCS#1 v1.5 operations.
733 */
734#define POLARSSL_PKCS1_V15
735
736/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000737 * \def POLARSSL_PKCS1_V21
738 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200739 * Enable support for PKCS#1 v2.1 encoding.
740 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000741 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
742 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000743 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
744 */
745#define POLARSSL_PKCS1_V21
746
747/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000748 * \def POLARSSL_RSA_NO_CRT
749 *
750 * Do not use the Chinese Remainder Theorem for the RSA private operation.
751 *
752 * Uncomment this macro to disable the use of CRT in RSA.
753 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000754 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200755//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000756
757/**
758 * \def POLARSSL_SELF_TEST
759 *
760 * Enable the checkup functions (*_self_test).
761 */
762#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000763
764/**
Paul Bakker40865c82013-01-31 17:13:13 +0100765 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
766 *
767 * Enable sending of alert messages in case of encountered errors as per RFC.
768 * If you choose not to send the alert messages, PolarSSL can still communicate
769 * with other servers, only debugging of failures is harder.
770 *
771 * The advantage of not sending alert messages, is that no information is given
772 * about reasons for failures thus preventing adversaries of gaining intel.
773 *
774 * Enable sending of all alert messages
775 */
776#define POLARSSL_SSL_ALERT_MESSAGES
777
778/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100779 * \def POLARSSL_SSL_DEBUG_ALL
780 *
781 * Enable the debug messages in SSL module for all issues.
782 * Debug messages have been disabled in some places to prevent timing
783 * attacks due to (unbalanced) debugging function calls.
784 *
785 * If you need all error reporting you should enable this during debugging,
786 * but remove this for production servers that should log as well.
787 *
788 * Uncomment this macro to report all debug messages on errors introducing
789 * a timing side-channel.
790 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100791 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200792//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100793
794/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000795 * \def POLARSSL_SSL_HW_RECORD_ACCEL
796 *
797 * Enable hooking functions in SSL module for hardware acceleration of
798 * individual records.
799 *
800 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000801 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200802//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000803
804/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100805 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
806 *
807 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200808 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100809 *
810 * Comment this macro to disable support for SSLv2 Client Hello messages.
811 */
812#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
813
814/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100815 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
816 *
817 * Pick the ciphersuite according to the client's preferences rather than ours
818 * in the SSL Server module (POLARSSL_SSL_SRV_C).
819 *
820 * Uncomment this macro to respect client's ciphersuite order
821 */
822//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
823
824/**
Paul Bakker05decb22013-08-15 13:33:48 +0200825 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
826 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200827 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200828 *
829 * Comment this macro to disable support for the max_fragment_length extension
830 */
831#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
832
833/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200834 * \def POLARSSL_SSL_PROTO_SSL3
835 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200836 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200837 *
838 * Requires: POLARSSL_MD5_C
839 * POLARSSL_SHA1_C
840 *
841 * Comment this macro to disable support for SSL 3.0
842 */
843#define POLARSSL_SSL_PROTO_SSL3
844
845/**
846 * \def POLARSSL_SSL_PROTO_TLS1
847 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200848 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200849 *
850 * Requires: POLARSSL_MD5_C
851 * POLARSSL_SHA1_C
852 *
853 * Comment this macro to disable support for TLS 1.0
854 */
855#define POLARSSL_SSL_PROTO_TLS1
856
857/**
858 * \def POLARSSL_SSL_PROTO_TLS1_1
859 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200860 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200861 *
862 * Requires: POLARSSL_MD5_C
863 * POLARSSL_SHA1_C
864 *
865 * Comment this macro to disable support for TLS 1.1
866 */
867#define POLARSSL_SSL_PROTO_TLS1_1
868
869/**
870 * \def POLARSSL_SSL_PROTO_TLS1_2
871 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200872 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200873 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100874 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200875 * (Depends on ciphersuites)
876 *
877 * Comment this macro to disable support for TLS 1.2
878 */
879#define POLARSSL_SSL_PROTO_TLS1_2
880
881/**
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200882 * \def POLARSSL_SSL_ALPN
883 *
884 * Enable support for Application Layer Protocol Negotiation.
885 * draft-ietf-tls-applayerprotoneg-05
886 *
Paul Bakker27e36d32014-04-08 12:33:37 +0200887 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200888 */
Paul Bakker27e36d32014-04-08 12:33:37 +0200889#define POLARSSL_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200890
891/**
Paul Bakkera503a632013-08-14 13:48:06 +0200892 * \def POLARSSL_SSL_SESSION_TICKETS
893 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200894 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200895 *
896 * Requires: POLARSSL_AES_C
897 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200898 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200899 *
900 * Comment this macro to disable support for SSL session tickets
901 */
902#define POLARSSL_SSL_SESSION_TICKETS
903
904/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200905 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
906 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200907 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200908 *
909 * Comment this macro to disable support for server name indication in SSL
910 */
911#define POLARSSL_SSL_SERVER_NAME_INDICATION
912
913/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200914 * \def POLARSSL_SSL_TRUNCATED_HMAC
915 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200916 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200917 *
918 * Comment this macro to disable support for truncated HMAC in SSL
919 */
920#define POLARSSL_SSL_TRUNCATED_HMAC
921
922/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100923 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100924 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100925 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100926 *
927 * This is disabled by default since it breaks binary compatibility with the
928 * 1.3.x line. If you choose to enable it, you will need to rebuild your
929 * application against the new header files, relinking will not be enough.
930 * It will be enabled by default, or no longer an option, in the 1.4 branch.
931 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100932 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100933 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +0100934//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100935
936/**
Paul Bakker2466d932013-09-28 14:40:38 +0200937 * \def POLARSSL_THREADING_ALT
938 *
939 * Provide your own alternate threading implementation.
940 *
941 * Requires: POLARSSL_THREADING_C
942 *
943 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200944 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200945//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200946
947/**
Paul Bakker2466d932013-09-28 14:40:38 +0200948 * \def POLARSSL_THREADING_PTHREAD
949 *
950 * Enable the pthread wrapper layer for the threading layer.
951 *
952 * Requires: POLARSSL_THREADING_C
953 *
954 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200955 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200956//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200957
958/**
Paul Bakker0f90d7d2014-04-30 11:49:44 +0200959 * \def POLARSSL_VERSION_FEATURES
960 *
961 * Allow run-time checking of compile-time enabled features. Thus allowing users
962 * to check at run-time if the library is for instance compiled with threading
963 * support via version_check_feature().
964 *
965 * Requires: POLARSSL_VERSION_C
966 *
967 * Comment this to disable run-time checking and save ROM space
968 */
969#define POLARSSL_VERSION_FEATURES
970
971/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200972 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
973 *
974 * If set, the X509 parser will not break-off when parsing an X509 certificate
975 * and encountering an extension in a v1 or v2 certificate.
976 *
977 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200978 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200979//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200980
981/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000982 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
983 *
984 * If set, the X509 parser will not break-off when parsing an X509 certificate
985 * and encountering an unknown critical extension.
986 *
987 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000988 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200989//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000990
991/**
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +0200992 * \def POLARSSL_X509_CHECK_KEY_USAGE
993 *
994 * Enable verification of the keyUsage extension (CA and leaf certificates).
995 *
996 * Disabling this avoids problems with mis-issued and/or misused
997 * (intermediate) CA and leaf certificates.
998 *
999 * \warning Depending on your PKI use, disabling this can be a security risk!
1000 *
1001 * Comment to skip keyUsage checking for both CA and leaf certificates.
1002 */
1003#define POLARSSL_X509_CHECK_KEY_USAGE
1004
1005/**
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +02001006 * \def POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1007 *
1008 * Enable verification of the extendedKeyUsage extension (leaf certificates).
1009 *
1010 * Disabling this avoids problems with mis-issued and/or misused certificates.
1011 *
1012 * \warning Depending on your PKI use, disabling this can be a security risk!
1013 *
1014 * Comment to skip extendedKeyUsage checking for certificates.
1015 */
1016#define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1017
1018/**
Paul Bakker2770fbd2012-07-03 13:30:23 +00001019 * \def POLARSSL_ZLIB_SUPPORT
1020 *
1021 * If set, the SSL/TLS module uses ZLIB to support compression and
1022 * decompression of packet data.
1023 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001024 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1025 * CRIME attack. Before enabling this option, you should examine with care if
1026 * CRIME or similar exploits may be a applicable to your use case.
1027 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001028 * Used in: library/ssl_tls.c
1029 * library/ssl_cli.c
1030 * library/ssl_srv.c
1031 *
1032 * This feature requires zlib library and headers to be present.
1033 *
1034 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001035 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001036//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001037/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001038
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001039/**
Paul Bakker0a62cd12011-01-21 11:00:08 +00001040 * \name SECTION: PolarSSL modules
1041 *
1042 * This section enables or disables entire modules in PolarSSL
1043 * \{
1044 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001045
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001046/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001047 * \def POLARSSL_AESNI_C
1048 *
1049 * Enable AES-NI support on x86-64.
1050 *
1051 * Module: library/aesni.c
1052 * Caller: library/aes.c
1053 *
1054 * Requires: POLARSSL_HAVE_ASM
1055 *
1056 * This modules adds support for the AES-NI instructions on x86-64
1057 */
1058#define POLARSSL_AESNI_C
1059
1060/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001061 * \def POLARSSL_AES_C
1062 *
1063 * Enable the AES block cipher.
1064 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001065 * Module: library/aes.c
1066 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001067 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001068 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001069 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001070 * This module enables the following ciphersuites (if other requisites are
1071 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001072 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1073 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1074 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1075 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1076 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1077 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1078 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1079 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1080 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1081 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1082 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1083 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001084 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1085 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1086 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1087 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1088 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001089 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001090 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001091 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001092 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1093 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1094 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1095 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1096 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1097 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1098 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1099 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1100 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1101 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1102 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1103 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1104 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1105 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1106 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1107 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1108 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1109 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1110 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1111 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1112 * TLS_RSA_WITH_AES_256_GCM_SHA384
1113 * TLS_RSA_WITH_AES_256_CBC_SHA256
1114 * TLS_RSA_WITH_AES_256_CBC_SHA
1115 * TLS_RSA_WITH_AES_128_GCM_SHA256
1116 * TLS_RSA_WITH_AES_128_CBC_SHA256
1117 * TLS_RSA_WITH_AES_128_CBC_SHA
1118 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1119 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1120 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1121 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1122 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1123 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1124 * TLS_PSK_WITH_AES_256_GCM_SHA384
1125 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001126 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001127 * TLS_PSK_WITH_AES_128_GCM_SHA256
1128 * TLS_PSK_WITH_AES_128_CBC_SHA256
1129 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001130 *
Paul Bakkercff68422013-09-15 20:43:33 +02001131 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001132 */
Paul Bakker40e46942009-01-03 21:51:57 +00001133#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001134
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001135/**
1136 * \def POLARSSL_ARC4_C
1137 *
1138 * Enable the ARCFOUR stream cipher.
1139 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001140 * Module: library/arc4.c
1141 * Caller: library/ssl_tls.c
1142 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001143 * This module enables the following ciphersuites (if other requisites are
1144 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001145 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1146 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001147 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001148 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001149 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1150 * TLS_DHE_PSK_WITH_RC4_128_SHA
1151 * TLS_RSA_WITH_RC4_128_SHA
1152 * TLS_RSA_WITH_RC4_128_MD5
1153 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001154 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001155 */
Paul Bakker40e46942009-01-03 21:51:57 +00001156#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001157
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001158/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001159 * \def POLARSSL_ASN1_PARSE_C
1160 *
1161 * Enable the generic ASN1 parser.
1162 *
1163 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001164 * Caller: library/x509.c
1165 * library/dhm.c
1166 * library/pkcs12.c
1167 * library/pkcs5.c
1168 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001169 */
1170#define POLARSSL_ASN1_PARSE_C
1171
1172/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001173 * \def POLARSSL_ASN1_WRITE_C
1174 *
1175 * Enable the generic ASN1 writer.
1176 *
1177 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001178 * Caller: library/ecdsa.c
1179 * library/pkwrite.c
1180 * library/x509_create.c
1181 * library/x509write_crt.c
1182 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001183 */
1184#define POLARSSL_ASN1_WRITE_C
1185
1186/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001187 * \def POLARSSL_BASE64_C
1188 *
1189 * Enable the Base64 module.
1190 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001191 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001192 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001193 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001194 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001195 */
Paul Bakker40e46942009-01-03 21:51:57 +00001196#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001197
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001198/**
1199 * \def POLARSSL_BIGNUM_C
1200 *
Paul Bakker9a736322012-11-14 12:39:52 +00001201 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001202 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001203 * Module: library/bignum.c
1204 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001205 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001206 * library/rsa.c
1207 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001208 *
1209 * This module is required for RSA and DHM support.
1210 */
Paul Bakker40e46942009-01-03 21:51:57 +00001211#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001212
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001213/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001214 * \def POLARSSL_BLOWFISH_C
1215 *
1216 * Enable the Blowfish block cipher.
1217 *
1218 * Module: library/blowfish.c
1219 */
1220#define POLARSSL_BLOWFISH_C
1221
1222/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001223 * \def POLARSSL_CAMELLIA_C
1224 *
1225 * Enable the Camellia block cipher.
1226 *
Paul Bakker38119b12009-01-10 23:31:23 +00001227 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001228 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001229 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001230 * This module enables the following ciphersuites (if other requisites are
1231 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001232 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1233 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1234 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1235 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1236 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1237 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1238 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1239 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001240 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1241 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1242 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1243 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1244 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001245 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001246 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1247 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1248 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1249 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1250 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1251 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1252 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1253 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1254 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1255 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1256 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1257 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1258 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1259 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1260 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1261 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1262 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1263 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1264 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1265 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1266 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1267 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1268 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1269 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1270 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1271 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1272 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1273 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001274 */
1275#define POLARSSL_CAMELLIA_C
1276
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001277/**
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +02001278 * \def POLARSSL_GCM_C
1279 *
1280 * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
1281 *
1282 * Module: library/ccm.c
1283 *
1284 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
1285 *
1286 * This module enables the AES-CCM ciphersuites, if other requisites are
1287 * enabled as well.
1288 */
1289#define POLARSSL_CCM_C
1290
1291/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001292 * \def POLARSSL_CERTS_C
1293 *
1294 * Enable the test certificates.
1295 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001296 * Module: library/certs.c
1297 * Caller:
1298 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001299 * Requires: POLARSSL_PEM_PARSE_C
1300 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001301 * This module is used for testing (ssl_client/server).
1302 */
Paul Bakker40e46942009-01-03 21:51:57 +00001303#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001304
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001305/**
1306 * \def POLARSSL_CIPHER_C
1307 *
1308 * Enable the generic cipher layer.
1309 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001310 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001311 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001312 *
1313 * Uncomment to enable generic cipher wrappers.
1314 */
1315#define POLARSSL_CIPHER_C
1316
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001317/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001318 * \def POLARSSL_CTR_DRBG_C
1319 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001320 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001321 *
1322 * Module: library/ctr_drbg.c
1323 * Caller:
1324 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001325 * Requires: POLARSSL_AES_C
1326 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001327 * This module provides the CTR_DRBG AES-256 random number generator.
1328 */
1329#define POLARSSL_CTR_DRBG_C
1330
1331/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001332 * \def POLARSSL_DEBUG_C
1333 *
1334 * Enable the debug functions.
1335 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001336 * Module: library/debug.c
1337 * Caller: library/ssl_cli.c
1338 * library/ssl_srv.c
1339 * library/ssl_tls.c
1340 *
1341 * This module provides debugging functions.
1342 */
Paul Bakker40e46942009-01-03 21:51:57 +00001343#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001344
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001345/**
1346 * \def POLARSSL_DES_C
1347 *
1348 * Enable the DES block cipher.
1349 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001350 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001351 * Caller: library/pem.c
1352 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001353 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001354 * This module enables the following ciphersuites (if other requisites are
1355 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001356 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1357 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001358 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001359 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001360 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1361 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1362 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1363 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1364 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001365 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001366 *
Paul Bakkercff68422013-09-15 20:43:33 +02001367 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001368 */
Paul Bakker40e46942009-01-03 21:51:57 +00001369#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001370
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001371/**
1372 * \def POLARSSL_DHM_C
1373 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001374 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001375 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001376 * Module: library/dhm.c
1377 * Caller: library/ssl_cli.c
1378 * library/ssl_srv.c
1379 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001380 * This module is used by the following key exchanges:
1381 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001382 */
Paul Bakker40e46942009-01-03 21:51:57 +00001383#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001384
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001385/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001386 * \def POLARSSL_ECDH_C
1387 *
1388 * Enable the elliptic curve Diffie-Hellman library.
1389 *
1390 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001391 * Caller: library/ssl_cli.c
1392 * library/ssl_srv.c
1393 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001394 * This module is used by the following key exchanges:
1395 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001396 *
1397 * Requires: POLARSSL_ECP_C
1398 */
1399#define POLARSSL_ECDH_C
1400
1401/**
1402 * \def POLARSSL_ECDSA_C
1403 *
1404 * Enable the elliptic curve DSA library.
1405 *
1406 * Module: library/ecdsa.c
1407 * Caller:
1408 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001409 * This module is used by the following key exchanges:
1410 * ECDHE-ECDSA
1411 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001412 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001413 */
1414#define POLARSSL_ECDSA_C
1415
1416/**
1417 * \def POLARSSL_ECP_C
1418 *
1419 * Enable the elliptic curve over GF(p) library.
1420 *
1421 * Module: library/ecp.c
1422 * Caller: library/ecdh.c
1423 * library/ecdsa.c
1424 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001425 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001426 */
1427#define POLARSSL_ECP_C
1428
1429/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001430 * \def POLARSSL_ENTROPY_C
1431 *
1432 * Enable the platform-specific entropy code.
1433 *
1434 * Module: library/entropy.c
1435 * Caller:
1436 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001437 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001438 *
1439 * This module provides a generic entropy pool
1440 */
1441#define POLARSSL_ENTROPY_C
1442
1443/**
Paul Bakker9d781402011-05-09 16:17:09 +00001444 * \def POLARSSL_ERROR_C
1445 *
1446 * Enable error code to error string conversion.
1447 *
1448 * Module: library/error.c
1449 * Caller:
1450 *
Shuo Chen95a0d112014-04-04 21:04:40 -07001451 * This module enables polarssl_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001452 */
1453#define POLARSSL_ERROR_C
1454
1455/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001456 * \def POLARSSL_GCM_C
1457 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001458 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001459 *
1460 * Module: library/gcm.c
1461 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001462 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001463 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001464 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1465 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001466 */
1467#define POLARSSL_GCM_C
1468
1469/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001470 * \def POLARSSL_HAVEGE_C
1471 *
1472 * Enable the HAVEGE random generator.
1473 *
Paul Bakker2a844242013-06-24 13:01:53 +02001474 * Warning: the HAVEGE random generator is not suitable for virtualized
1475 * environments
1476 *
1477 * Warning: the HAVEGE random generator is dependent on timing and specific
1478 * processor traits. It is therefore not advised to use HAVEGE as
1479 * your applications primary random generator or primary entropy pool
1480 * input. As a secondary input to your entropy pool, it IS able add
1481 * the (limited) extra entropy it provides.
1482 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001483 * Module: library/havege.c
1484 * Caller:
1485 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001486 * Requires: POLARSSL_TIMING_C
1487 *
Paul Bakker2a844242013-06-24 13:01:53 +02001488 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001489 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001490//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001491
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001492/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001493 * \def POLARSSL_HMAC_DRBG_C
1494 *
1495 * Enable the HMAC_DRBG random generator.
1496 *
1497 * Module: library/hmac_drbg.c
1498 * Caller:
1499 *
1500 * Requires: POLARSSL_MD_C
1501 *
1502 * Uncomment to enable the HMAC_DRBG random number geerator.
1503 */
1504#define POLARSSL_HMAC_DRBG_C
1505
1506/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001507 * \def POLARSSL_MD_C
1508 *
1509 * Enable the generic message digest layer.
1510 *
Paul Bakker17373852011-01-06 14:20:01 +00001511 * Module: library/md.c
1512 * Caller:
1513 *
1514 * Uncomment to enable generic message digest wrappers.
1515 */
1516#define POLARSSL_MD_C
1517
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001518/**
1519 * \def POLARSSL_MD2_C
1520 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001521 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001522 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001523 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001524 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001525 *
1526 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001527 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001528//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001529
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001530/**
1531 * \def POLARSSL_MD4_C
1532 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001533 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001534 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001535 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001536 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001537 *
1538 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001539 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001540//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001541
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001542/**
1543 * \def POLARSSL_MD5_C
1544 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001545 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001546 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001547 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001548 * Caller: library/md.c
1549 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001550 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001551 *
1552 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001553 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001554 */
Paul Bakker40e46942009-01-03 21:51:57 +00001555#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001556
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001557/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001558 * \def POLARSSL_MEMORY_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001559 * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead.
Paul Bakker6e339b52013-07-03 13:37:05 +02001560 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001561//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001562
1563/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001564 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1565 *
1566 * Enable the buffer allocator implementation that makes use of a (stack)
1567 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1568 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001569 *
1570 * Module: library/memory_buffer_alloc.c
1571 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001572 * Requires: POLARSSL_PLATFORM_C
1573 * POLARSSL_PLATFORM_MEMORY (to use it within PolarSSL)
Paul Bakker6e339b52013-07-03 13:37:05 +02001574 *
1575 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001576 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001577//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001578
1579/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001580 * \def POLARSSL_NET_C
1581 *
1582 * Enable the TCP/IP networking routines.
1583 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001584 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001585 *
1586 * This module provides TCP/IP networking routines.
1587 */
Paul Bakker40e46942009-01-03 21:51:57 +00001588#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001589
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001590/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001591 * \def POLARSSL_OID_C
1592 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001593 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001594 *
1595 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001596 * Caller: library/asn1write.c
1597 * library/pkcs5.c
1598 * library/pkparse.c
1599 * library/pkwrite.c
1600 * library/rsa.c
1601 * library/x509.c
1602 * library/x509_create.c
1603 * library/x509_crl.c
1604 * library/x509_crt.c
1605 * library/x509_csr.c
1606 * library/x509write_crt.c
1607 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001608 *
1609 * This modules translates between OIDs and internal values.
1610 */
1611#define POLARSSL_OID_C
1612
1613/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001614 * \def POLARSSL_PADLOCK_C
1615 *
1616 * Enable VIA Padlock support on x86.
1617 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001618 * Module: library/padlock.c
1619 * Caller: library/aes.c
1620 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001621 * Requires: POLARSSL_HAVE_ASM
1622 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001623 * This modules adds support for the VIA PadLock on x86.
1624 */
Paul Bakker40e46942009-01-03 21:51:57 +00001625#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001626
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001627/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001628 * \def POLARSSL_PBKDF2_C
1629 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001630 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001631 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001632 *
1633 * Module: library/pbkdf2.c
1634 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001635 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001636 *
1637 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001638 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001639#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001640
1641/**
Paul Bakkercff68422013-09-15 20:43:33 +02001642 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001643 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001644 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001645 *
1646 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001647 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001648 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001649 * library/x509_crl.c
1650 * library/x509_crt.c
1651 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001652 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001653 * Requires: POLARSSL_BASE64_C
1654 *
Paul Bakkercff68422013-09-15 20:43:33 +02001655 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001656 */
Paul Bakkercff68422013-09-15 20:43:33 +02001657#define POLARSSL_PEM_PARSE_C
1658
1659/**
1660 * \def POLARSSL_PEM_WRITE_C
1661 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001662 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001663 *
1664 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001665 * Caller: library/pkwrite.c
1666 * library/x509write_crt.c
1667 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001668 *
1669 * Requires: POLARSSL_BASE64_C
1670 *
1671 * This modules adds support for encoding / writing PEM files.
1672 */
1673#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001674
1675/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001676 * \def POLARSSL_PK_C
1677 *
1678 * Enable the generic public (asymetric) key layer.
1679 *
1680 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001681 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001682 * library/ssl_cli.c
1683 * library/ssl_srv.c
1684 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001685 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1686 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001687 * Uncomment to enable generic public key wrappers.
1688 */
1689#define POLARSSL_PK_C
1690
1691/**
Paul Bakker4606c732013-09-15 17:04:23 +02001692 * \def POLARSSL_PK_PARSE_C
1693 *
1694 * Enable the generic public (asymetric) key parser.
1695 *
1696 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001697 * Caller: library/x509_crt.c
1698 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001699 *
1700 * Requires: POLARSSL_PK_C
1701 *
1702 * Uncomment to enable generic public key parse functions.
1703 */
1704#define POLARSSL_PK_PARSE_C
1705
1706/**
1707 * \def POLARSSL_PK_WRITE_C
1708 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001709 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001710 *
1711 * Module: library/pkwrite.c
1712 * Caller: library/x509write.c
1713 *
1714 * Requires: POLARSSL_PK_C
1715 *
1716 * Uncomment to enable generic public key write functions.
1717 */
1718#define POLARSSL_PK_WRITE_C
1719
1720/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001721 * \def POLARSSL_PKCS5_C
1722 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001723 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001724 *
1725 * Module: library/pkcs5.c
1726 *
1727 * Requires: POLARSSL_MD_C
1728 *
1729 * This module adds support for the PKCS#5 functions.
1730 */
1731#define POLARSSL_PKCS5_C
1732
1733/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001734 * \def POLARSSL_PKCS11_C
1735 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001736 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001737 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001738 * Module: library/pkcs11.c
1739 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001740 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001741 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001742 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001743 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001744 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001745 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001746//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001747
1748/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001749 * \def POLARSSL_PKCS12_C
1750 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001751 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001752 * Adds algorithms for parsing PKCS#8 encrypted private keys
1753 *
1754 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001755 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001756 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001757 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1758 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001759 *
1760 * This module enables PKCS#12 functions.
1761 */
1762#define POLARSSL_PKCS12_C
1763
1764/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001765 * \def POLARSSL_PLATFORM_C
1766 *
1767 * Enable the platform abstraction layer that allows you to re-assign
1768 * functions like malloc(), free(), printf(), fprintf()
1769 *
1770 * Module: library/platform.c
1771 * Caller: Most other .c files
1772 *
1773 * This module enables abstraction of common (libc) functions.
1774 */
1775#define POLARSSL_PLATFORM_C
1776
1777/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001778 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001779 *
1780 * Enable the RIPEMD-160 hash algorithm.
1781 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001782 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001783 * Caller: library/md.c
1784 *
1785 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001786#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001787
1788/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001789 * \def POLARSSL_RSA_C
1790 *
1791 * Enable the RSA public-key cryptosystem.
1792 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001793 * Module: library/rsa.c
1794 * Caller: library/ssl_cli.c
1795 * library/ssl_srv.c
1796 * library/ssl_tls.c
1797 * library/x509.c
1798 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001799 * This module is used by the following key exchanges:
1800 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001801 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001802 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001803 */
Paul Bakker40e46942009-01-03 21:51:57 +00001804#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001805
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001806/**
1807 * \def POLARSSL_SHA1_C
1808 *
1809 * Enable the SHA1 cryptographic hash algorithm.
1810 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001811 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001812 * Caller: library/md.c
1813 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001814 * library/ssl_srv.c
1815 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001816 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001817 *
1818 * This module is required for SSL/TLS and SHA1-signed certificates.
1819 */
Paul Bakker40e46942009-01-03 21:51:57 +00001820#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001821
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001822/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001823 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001824 *
1825 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001826 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001827 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001828 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001829 * Caller: library/entropy.c
1830 * library/md.c
1831 * library/ssl_cli.c
1832 * library/ssl_srv.c
1833 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001834 *
1835 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001836 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001837 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001838#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001839
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001840/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001841 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001842 *
1843 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001844 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001845 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001846 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001847 * Caller: library/entropy.c
1848 * library/md.c
1849 * library/ssl_cli.c
1850 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001851 *
1852 * This module adds support for SHA-384 and SHA-512.
1853 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001854#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001855
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001856/**
Paul Bakker0a597072012-09-25 21:55:46 +00001857 * \def POLARSSL_SSL_CACHE_C
1858 *
1859 * Enable simple SSL cache implementation.
1860 *
1861 * Module: library/ssl_cache.c
1862 * Caller:
1863 *
1864 * Requires: POLARSSL_SSL_CACHE_C
1865 */
1866#define POLARSSL_SSL_CACHE_C
1867
1868/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001869 * \def POLARSSL_SSL_CLI_C
1870 *
1871 * Enable the SSL/TLS client code.
1872 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001873 * Module: library/ssl_cli.c
1874 * Caller:
1875 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001876 * Requires: POLARSSL_SSL_TLS_C
1877 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001878 * This module is required for SSL/TLS client support.
1879 */
Paul Bakker40e46942009-01-03 21:51:57 +00001880#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001881
Paul Bakker9a736322012-11-14 12:39:52 +00001882/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001883 * \def POLARSSL_SSL_SRV_C
1884 *
1885 * Enable the SSL/TLS server code.
1886 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001887 * Module: library/ssl_srv.c
1888 * Caller:
1889 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001890 * Requires: POLARSSL_SSL_TLS_C
1891 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001892 * This module is required for SSL/TLS server support.
1893 */
Paul Bakker40e46942009-01-03 21:51:57 +00001894#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001895
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001896/**
1897 * \def POLARSSL_SSL_TLS_C
1898 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001899 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001900 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001901 * Module: library/ssl_tls.c
1902 * Caller: library/ssl_cli.c
1903 * library/ssl_srv.c
1904 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001905 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001906 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001907 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001908 * This module is required for SSL/TLS.
1909 */
Paul Bakker40e46942009-01-03 21:51:57 +00001910#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001911
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001912/**
Paul Bakker2466d932013-09-28 14:40:38 +02001913 * \def POLARSSL_THREADING_C
1914 *
1915 * Enable the threading abstraction layer.
1916 * By default PolarSSL assumes it is used in a non-threaded environment or that
1917 * contexts are not shared between threads. If you do intend to use contexts
1918 * between threads, you will need to enable this layer to prevent race
1919 * conditions.
1920 *
1921 * Module: library/threading.c
1922 *
1923 * This allows different threading implementations (self-implemented or
1924 * provided).
1925 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001926 * You will have to enable either POLARSSL_THREADING_ALT or
1927 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001928 *
1929 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001930 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001931//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001932
1933/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001934 * \def POLARSSL_TIMING_C
1935 *
1936 * Enable the portable timing interface.
1937 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001938 * Module: library/timing.c
1939 * Caller: library/havege.c
1940 *
1941 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001942 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001943#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001944
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001945/**
1946 * \def POLARSSL_VERSION_C
1947 *
1948 * Enable run-time version information.
1949 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001950 * Module: library/version.c
1951 *
1952 * This module provides run-time version information.
1953 */
1954#define POLARSSL_VERSION_C
1955
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001956/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001957 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001958 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001959 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001960 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001961 * Module: library/x509.c
1962 * Caller: library/x509_crl.c
1963 * library/x509_crt.c
1964 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001965 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001966 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001967 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001968 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001969 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001970 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001971#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001972
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001973/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001974 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001975 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001976 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001977 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001978 * Module: library/x509_crt.c
1979 * Caller: library/ssl_cli.c
1980 * library/ssl_srv.c
1981 * library/ssl_tls.c
1982 *
1983 * Requires: POLARSSL_X509_USE_C
1984 *
1985 * This module is required for X.509 certificate parsing.
1986 */
1987#define POLARSSL_X509_CRT_PARSE_C
1988
1989/**
1990 * \def POLARSSL_X509_CRL_PARSE_C
1991 *
1992 * Enable X.509 CRL parsing.
1993 *
1994 * Module: library/x509_crl.c
1995 * Caller: library/x509_crt.c
1996 *
1997 * Requires: POLARSSL_X509_USE_C
1998 *
1999 * This module is required for X.509 CRL parsing.
2000 */
2001#define POLARSSL_X509_CRL_PARSE_C
2002
2003/**
2004 * \def POLARSSL_X509_CSR_PARSE_C
2005 *
2006 * Enable X.509 Certificate Signing Request (CSR) parsing.
2007 *
2008 * Module: library/x509_csr.c
2009 * Caller: library/x509_crt_write.c
2010 *
2011 * Requires: POLARSSL_X509_USE_C
2012 *
2013 * This module is used for reading X.509 certificate request.
2014 */
2015#define POLARSSL_X509_CSR_PARSE_C
2016
2017/**
2018 * \def POLARSSL_X509_CREATE_C
2019 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002020 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002021 *
2022 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002023 *
Paul Bakker4606c732013-09-15 17:04:23 +02002024 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002025 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002026 * This module is the basis for creating X.509 certificates and CSRs.
2027 */
2028#define POLARSSL_X509_CREATE_C
2029
2030/**
2031 * \def POLARSSL_X509_CRT_WRITE_C
2032 *
2033 * Enable creating X.509 certificates.
2034 *
2035 * Module: library/x509_crt_write.c
2036 *
2037 * Requires: POLARSSL_CREATE_C
2038 *
2039 * This module is required for X.509 certificate creation.
2040 */
2041#define POLARSSL_X509_CRT_WRITE_C
2042
2043/**
2044 * \def POLARSSL_X509_CSR_WRITE_C
2045 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002046 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002047 *
2048 * Module: library/x509_csr_write.c
2049 *
2050 * Requires: POLARSSL_CREATE_C
2051 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002052 * This module is required for X.509 certificate request writing.
2053 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002054#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002055
2056/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002057 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002058 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002059 * Enable the XTEA block cipher.
2060 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002061 * Module: library/xtea.c
2062 * Caller:
2063 */
2064#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002065
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002066/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002067
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002068/**
2069 * \name SECTION: Module configuration options
2070 *
2071 * This section allows for the setting of module specific sizes and
2072 * configuration options. The default values are already present in the
2073 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002074 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002075 * Our advice is to enable options and change their values here
2076 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002077 *
2078 * Please check the respective header file for documentation on these
2079 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002080 * \{
2081 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002082
Paul Bakker088c5c52014-04-25 11:11:10 +02002083/* MPI / BIGNUM options */
2084//#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2085//#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002086
Paul Bakker088c5c52014-04-25 11:11:10 +02002087/* CTR_DRBG options */
2088//#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2089//#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2090//#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2091//#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2092//#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002093
Paul Bakker088c5c52014-04-25 11:11:10 +02002094/* HMAC_DRBG options */
2095//#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2096//#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2097//#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2098//#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002099
Paul Bakker088c5c52014-04-25 11:11:10 +02002100/* ECP options */
2101//#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2102//#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2103//#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002104
Paul Bakker088c5c52014-04-25 11:11:10 +02002105/* Entropy options */
2106//#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2107//#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002108
Paul Bakker088c5c52014-04-25 11:11:10 +02002109/* Memory buffer allocator options */
2110//#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002111
Paul Bakker088c5c52014-04-25 11:11:10 +02002112/* Platform options */
2113//#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. */
2114//#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2115//#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2116//#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2117//#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002118
Paul Bakker088c5c52014-04-25 11:11:10 +02002119/* SSL Cache options */
2120//#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2121//#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002122
Paul Bakker088c5c52014-04-25 11:11:10 +02002123/* SSL options */
2124//#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2125//#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002126
Paul Bakkereaebbd52014-04-25 15:04:14 +02002127/* Debug options */
2128//#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */
2129
Paul Bakker0f90d7d2014-04-30 11:49:44 +02002130/* \} name SECTION: Module configuration options */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002131
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002132#include "check_config.h"
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002133
Manuel Pégourié-Gonnard14d55952014-04-30 12:35:08 +02002134#endif /* POLARSSL_CONFIG_H */