blob: b33282235544fa3a835aedc7e1c97889a6b05840 [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 Bakkerc27c4e22013-09-23 15:01:36 +0200959 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
960 *
961 * If set, the X509 parser will not break-off when parsing an X509 certificate
962 * and encountering an extension in a v1 or v2 certificate.
963 *
964 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200965 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200966//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200967
968/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000969 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
970 *
971 * If set, the X509 parser will not break-off when parsing an X509 certificate
972 * and encountering an unknown critical extension.
973 *
974 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000975 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200976//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000977
978/**
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +0200979 * \def POLARSSL_X509_CHECK_KEY_USAGE
980 *
981 * Enable verification of the keyUsage extension (CA and leaf certificates).
982 *
983 * Disabling this avoids problems with mis-issued and/or misused
984 * (intermediate) CA and leaf certificates.
985 *
986 * \warning Depending on your PKI use, disabling this can be a security risk!
987 *
988 * Comment to skip keyUsage checking for both CA and leaf certificates.
989 */
990#define POLARSSL_X509_CHECK_KEY_USAGE
991
992/**
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +0200993 * \def POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
994 *
995 * Enable verification of the extendedKeyUsage extension (leaf certificates).
996 *
997 * Disabling this avoids problems with mis-issued and/or misused certificates.
998 *
999 * \warning Depending on your PKI use, disabling this can be a security risk!
1000 *
1001 * Comment to skip extendedKeyUsage checking for certificates.
1002 */
1003#define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1004
1005/**
Paul Bakker2770fbd2012-07-03 13:30:23 +00001006 * \def POLARSSL_ZLIB_SUPPORT
1007 *
1008 * If set, the SSL/TLS module uses ZLIB to support compression and
1009 * decompression of packet data.
1010 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +01001011 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
1012 * CRIME attack. Before enabling this option, you should examine with care if
1013 * CRIME or similar exploits may be a applicable to your use case.
1014 *
Paul Bakker2770fbd2012-07-03 13:30:23 +00001015 * Used in: library/ssl_tls.c
1016 * library/ssl_cli.c
1017 * library/ssl_srv.c
1018 *
1019 * This feature requires zlib library and headers to be present.
1020 *
1021 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001022 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001023//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001024/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001025
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001026/**
Paul Bakker0a62cd12011-01-21 11:00:08 +00001027 * \name SECTION: PolarSSL modules
1028 *
1029 * This section enables or disables entire modules in PolarSSL
1030 * \{
1031 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001032
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001033/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001034 * \def POLARSSL_AESNI_C
1035 *
1036 * Enable AES-NI support on x86-64.
1037 *
1038 * Module: library/aesni.c
1039 * Caller: library/aes.c
1040 *
1041 * Requires: POLARSSL_HAVE_ASM
1042 *
1043 * This modules adds support for the AES-NI instructions on x86-64
1044 */
1045#define POLARSSL_AESNI_C
1046
1047/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001048 * \def POLARSSL_AES_C
1049 *
1050 * Enable the AES block cipher.
1051 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001052 * Module: library/aes.c
1053 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001054 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001055 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001056 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001057 * This module enables the following ciphersuites (if other requisites are
1058 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001059 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1060 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1061 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1062 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1063 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1064 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1065 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1066 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1067 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1068 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1069 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1070 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001071 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1072 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1073 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1074 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1075 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001076 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001077 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001078 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001079 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1080 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1081 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1082 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1083 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1084 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1085 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1086 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1087 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1088 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1089 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1090 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1091 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1092 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1093 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1094 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1095 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1096 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1097 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1098 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1099 * TLS_RSA_WITH_AES_256_GCM_SHA384
1100 * TLS_RSA_WITH_AES_256_CBC_SHA256
1101 * TLS_RSA_WITH_AES_256_CBC_SHA
1102 * TLS_RSA_WITH_AES_128_GCM_SHA256
1103 * TLS_RSA_WITH_AES_128_CBC_SHA256
1104 * TLS_RSA_WITH_AES_128_CBC_SHA
1105 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1106 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1107 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1108 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1109 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1110 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1111 * TLS_PSK_WITH_AES_256_GCM_SHA384
1112 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001113 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001114 * TLS_PSK_WITH_AES_128_GCM_SHA256
1115 * TLS_PSK_WITH_AES_128_CBC_SHA256
1116 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001117 *
Paul Bakkercff68422013-09-15 20:43:33 +02001118 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001119 */
Paul Bakker40e46942009-01-03 21:51:57 +00001120#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001121
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001122/**
1123 * \def POLARSSL_ARC4_C
1124 *
1125 * Enable the ARCFOUR stream cipher.
1126 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001127 * Module: library/arc4.c
1128 * Caller: library/ssl_tls.c
1129 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001130 * This module enables the following ciphersuites (if other requisites are
1131 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001132 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1133 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001134 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001135 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001136 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1137 * TLS_DHE_PSK_WITH_RC4_128_SHA
1138 * TLS_RSA_WITH_RC4_128_SHA
1139 * TLS_RSA_WITH_RC4_128_MD5
1140 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001141 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001142 */
Paul Bakker40e46942009-01-03 21:51:57 +00001143#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001144
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001145/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001146 * \def POLARSSL_ASN1_PARSE_C
1147 *
1148 * Enable the generic ASN1 parser.
1149 *
1150 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001151 * Caller: library/x509.c
1152 * library/dhm.c
1153 * library/pkcs12.c
1154 * library/pkcs5.c
1155 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001156 */
1157#define POLARSSL_ASN1_PARSE_C
1158
1159/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001160 * \def POLARSSL_ASN1_WRITE_C
1161 *
1162 * Enable the generic ASN1 writer.
1163 *
1164 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001165 * Caller: library/ecdsa.c
1166 * library/pkwrite.c
1167 * library/x509_create.c
1168 * library/x509write_crt.c
1169 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001170 */
1171#define POLARSSL_ASN1_WRITE_C
1172
1173/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001174 * \def POLARSSL_BASE64_C
1175 *
1176 * Enable the Base64 module.
1177 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001178 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001179 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001180 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001181 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001182 */
Paul Bakker40e46942009-01-03 21:51:57 +00001183#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001184
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001185/**
1186 * \def POLARSSL_BIGNUM_C
1187 *
Paul Bakker9a736322012-11-14 12:39:52 +00001188 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001189 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001190 * Module: library/bignum.c
1191 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001192 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001193 * library/rsa.c
1194 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001195 *
1196 * This module is required for RSA and DHM support.
1197 */
Paul Bakker40e46942009-01-03 21:51:57 +00001198#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001199
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001200/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001201 * \def POLARSSL_BLOWFISH_C
1202 *
1203 * Enable the Blowfish block cipher.
1204 *
1205 * Module: library/blowfish.c
1206 */
1207#define POLARSSL_BLOWFISH_C
1208
1209/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001210 * \def POLARSSL_CAMELLIA_C
1211 *
1212 * Enable the Camellia block cipher.
1213 *
Paul Bakker38119b12009-01-10 23:31:23 +00001214 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001215 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001216 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001217 * This module enables the following ciphersuites (if other requisites are
1218 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001219 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1220 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1221 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1222 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1223 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1224 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1225 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1226 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001227 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1228 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1229 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1230 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1231 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001232 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001233 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1234 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1235 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1236 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1237 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1238 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1239 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1240 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1241 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1242 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1243 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1244 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1245 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1246 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1247 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1248 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1249 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1250 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1251 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1252 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1253 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1254 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1255 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1256 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1257 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1258 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1259 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1260 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001261 */
1262#define POLARSSL_CAMELLIA_C
1263
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001264/**
1265 * \def POLARSSL_CERTS_C
1266 *
1267 * Enable the test certificates.
1268 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001269 * Module: library/certs.c
1270 * Caller:
1271 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001272 * Requires: POLARSSL_PEM_PARSE_C
1273 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001274 * This module is used for testing (ssl_client/server).
1275 */
Paul Bakker40e46942009-01-03 21:51:57 +00001276#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001277
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001278/**
1279 * \def POLARSSL_CIPHER_C
1280 *
1281 * Enable the generic cipher layer.
1282 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001283 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001284 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001285 *
1286 * Uncomment to enable generic cipher wrappers.
1287 */
1288#define POLARSSL_CIPHER_C
1289
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001290/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001291 * \def POLARSSL_CTR_DRBG_C
1292 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001293 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001294 *
1295 * Module: library/ctr_drbg.c
1296 * Caller:
1297 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001298 * Requires: POLARSSL_AES_C
1299 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001300 * This module provides the CTR_DRBG AES-256 random number generator.
1301 */
1302#define POLARSSL_CTR_DRBG_C
1303
1304/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001305 * \def POLARSSL_DEBUG_C
1306 *
1307 * Enable the debug functions.
1308 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001309 * Module: library/debug.c
1310 * Caller: library/ssl_cli.c
1311 * library/ssl_srv.c
1312 * library/ssl_tls.c
1313 *
1314 * This module provides debugging functions.
1315 */
Paul Bakker40e46942009-01-03 21:51:57 +00001316#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001317
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001318/**
1319 * \def POLARSSL_DES_C
1320 *
1321 * Enable the DES block cipher.
1322 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001323 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001324 * Caller: library/pem.c
1325 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001326 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001327 * This module enables the following ciphersuites (if other requisites are
1328 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001329 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1330 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001331 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001332 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001333 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1334 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1335 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1336 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1337 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001338 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001339 *
Paul Bakkercff68422013-09-15 20:43:33 +02001340 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001341 */
Paul Bakker40e46942009-01-03 21:51:57 +00001342#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001343
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001344/**
1345 * \def POLARSSL_DHM_C
1346 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001347 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001348 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001349 * Module: library/dhm.c
1350 * Caller: library/ssl_cli.c
1351 * library/ssl_srv.c
1352 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001353 * This module is used by the following key exchanges:
1354 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001355 */
Paul Bakker40e46942009-01-03 21:51:57 +00001356#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001357
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001358/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001359 * \def POLARSSL_ECDH_C
1360 *
1361 * Enable the elliptic curve Diffie-Hellman library.
1362 *
1363 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001364 * Caller: library/ssl_cli.c
1365 * library/ssl_srv.c
1366 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001367 * This module is used by the following key exchanges:
1368 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001369 *
1370 * Requires: POLARSSL_ECP_C
1371 */
1372#define POLARSSL_ECDH_C
1373
1374/**
1375 * \def POLARSSL_ECDSA_C
1376 *
1377 * Enable the elliptic curve DSA library.
1378 *
1379 * Module: library/ecdsa.c
1380 * Caller:
1381 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001382 * This module is used by the following key exchanges:
1383 * ECDHE-ECDSA
1384 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001385 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001386 */
1387#define POLARSSL_ECDSA_C
1388
1389/**
1390 * \def POLARSSL_ECP_C
1391 *
1392 * Enable the elliptic curve over GF(p) library.
1393 *
1394 * Module: library/ecp.c
1395 * Caller: library/ecdh.c
1396 * library/ecdsa.c
1397 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001398 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001399 */
1400#define POLARSSL_ECP_C
1401
1402/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001403 * \def POLARSSL_ENTROPY_C
1404 *
1405 * Enable the platform-specific entropy code.
1406 *
1407 * Module: library/entropy.c
1408 * Caller:
1409 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001410 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001411 *
1412 * This module provides a generic entropy pool
1413 */
1414#define POLARSSL_ENTROPY_C
1415
1416/**
Paul Bakker9d781402011-05-09 16:17:09 +00001417 * \def POLARSSL_ERROR_C
1418 *
1419 * Enable error code to error string conversion.
1420 *
1421 * Module: library/error.c
1422 * Caller:
1423 *
Shuo Chen95a0d112014-04-04 21:04:40 -07001424 * This module enables polarssl_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001425 */
1426#define POLARSSL_ERROR_C
1427
1428/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001429 * \def POLARSSL_GCM_C
1430 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001431 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001432 *
1433 * Module: library/gcm.c
1434 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001435 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001436 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001437 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1438 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001439 */
1440#define POLARSSL_GCM_C
1441
1442/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001443 * \def POLARSSL_HAVEGE_C
1444 *
1445 * Enable the HAVEGE random generator.
1446 *
Paul Bakker2a844242013-06-24 13:01:53 +02001447 * Warning: the HAVEGE random generator is not suitable for virtualized
1448 * environments
1449 *
1450 * Warning: the HAVEGE random generator is dependent on timing and specific
1451 * processor traits. It is therefore not advised to use HAVEGE as
1452 * your applications primary random generator or primary entropy pool
1453 * input. As a secondary input to your entropy pool, it IS able add
1454 * the (limited) extra entropy it provides.
1455 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001456 * Module: library/havege.c
1457 * Caller:
1458 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001459 * Requires: POLARSSL_TIMING_C
1460 *
Paul Bakker2a844242013-06-24 13:01:53 +02001461 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001462 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001463//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001464
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001465/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001466 * \def POLARSSL_HMAC_DRBG_C
1467 *
1468 * Enable the HMAC_DRBG random generator.
1469 *
1470 * Module: library/hmac_drbg.c
1471 * Caller:
1472 *
1473 * Requires: POLARSSL_MD_C
1474 *
1475 * Uncomment to enable the HMAC_DRBG random number geerator.
1476 */
1477#define POLARSSL_HMAC_DRBG_C
1478
1479/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001480 * \def POLARSSL_MD_C
1481 *
1482 * Enable the generic message digest layer.
1483 *
Paul Bakker17373852011-01-06 14:20:01 +00001484 * Module: library/md.c
1485 * Caller:
1486 *
1487 * Uncomment to enable generic message digest wrappers.
1488 */
1489#define POLARSSL_MD_C
1490
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001491/**
1492 * \def POLARSSL_MD2_C
1493 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001494 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001495 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001496 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001497 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001498 *
1499 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001500 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001501//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001502
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001503/**
1504 * \def POLARSSL_MD4_C
1505 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001506 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001507 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001508 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001509 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001510 *
1511 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001512 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001513//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001514
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001515/**
1516 * \def POLARSSL_MD5_C
1517 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001518 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001519 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001520 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001521 * Caller: library/md.c
1522 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001523 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001524 *
1525 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001526 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001527 */
Paul Bakker40e46942009-01-03 21:51:57 +00001528#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001529
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001530/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001531 * \def POLARSSL_MEMORY_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001532 * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead.
Paul Bakker6e339b52013-07-03 13:37:05 +02001533 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001534//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001535
1536/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001537 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1538 *
1539 * Enable the buffer allocator implementation that makes use of a (stack)
1540 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1541 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001542 *
1543 * Module: library/memory_buffer_alloc.c
1544 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001545 * Requires: POLARSSL_PLATFORM_C
1546 * POLARSSL_PLATFORM_MEMORY (to use it within PolarSSL)
Paul Bakker6e339b52013-07-03 13:37:05 +02001547 *
1548 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001549 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001550//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001551
1552/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001553 * \def POLARSSL_NET_C
1554 *
1555 * Enable the TCP/IP networking routines.
1556 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001557 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001558 *
1559 * This module provides TCP/IP networking routines.
1560 */
Paul Bakker40e46942009-01-03 21:51:57 +00001561#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001562
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001563/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001564 * \def POLARSSL_OID_C
1565 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001566 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001567 *
1568 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001569 * Caller: library/asn1write.c
1570 * library/pkcs5.c
1571 * library/pkparse.c
1572 * library/pkwrite.c
1573 * library/rsa.c
1574 * library/x509.c
1575 * library/x509_create.c
1576 * library/x509_crl.c
1577 * library/x509_crt.c
1578 * library/x509_csr.c
1579 * library/x509write_crt.c
1580 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001581 *
1582 * This modules translates between OIDs and internal values.
1583 */
1584#define POLARSSL_OID_C
1585
1586/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001587 * \def POLARSSL_PADLOCK_C
1588 *
1589 * Enable VIA Padlock support on x86.
1590 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001591 * Module: library/padlock.c
1592 * Caller: library/aes.c
1593 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001594 * Requires: POLARSSL_HAVE_ASM
1595 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001596 * This modules adds support for the VIA PadLock on x86.
1597 */
Paul Bakker40e46942009-01-03 21:51:57 +00001598#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001599
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001600/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001601 * \def POLARSSL_PBKDF2_C
1602 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001603 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001604 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001605 *
1606 * Module: library/pbkdf2.c
1607 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001608 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001609 *
1610 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001611 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001612#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001613
1614/**
Paul Bakkercff68422013-09-15 20:43:33 +02001615 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001616 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001617 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001618 *
1619 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001620 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001621 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001622 * library/x509_crl.c
1623 * library/x509_crt.c
1624 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001625 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001626 * Requires: POLARSSL_BASE64_C
1627 *
Paul Bakkercff68422013-09-15 20:43:33 +02001628 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001629 */
Paul Bakkercff68422013-09-15 20:43:33 +02001630#define POLARSSL_PEM_PARSE_C
1631
1632/**
1633 * \def POLARSSL_PEM_WRITE_C
1634 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001635 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001636 *
1637 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001638 * Caller: library/pkwrite.c
1639 * library/x509write_crt.c
1640 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001641 *
1642 * Requires: POLARSSL_BASE64_C
1643 *
1644 * This modules adds support for encoding / writing PEM files.
1645 */
1646#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001647
1648/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001649 * \def POLARSSL_PK_C
1650 *
1651 * Enable the generic public (asymetric) key layer.
1652 *
1653 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001654 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001655 * library/ssl_cli.c
1656 * library/ssl_srv.c
1657 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001658 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1659 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001660 * Uncomment to enable generic public key wrappers.
1661 */
1662#define POLARSSL_PK_C
1663
1664/**
Paul Bakker4606c732013-09-15 17:04:23 +02001665 * \def POLARSSL_PK_PARSE_C
1666 *
1667 * Enable the generic public (asymetric) key parser.
1668 *
1669 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001670 * Caller: library/x509_crt.c
1671 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001672 *
1673 * Requires: POLARSSL_PK_C
1674 *
1675 * Uncomment to enable generic public key parse functions.
1676 */
1677#define POLARSSL_PK_PARSE_C
1678
1679/**
1680 * \def POLARSSL_PK_WRITE_C
1681 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001682 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001683 *
1684 * Module: library/pkwrite.c
1685 * Caller: library/x509write.c
1686 *
1687 * Requires: POLARSSL_PK_C
1688 *
1689 * Uncomment to enable generic public key write functions.
1690 */
1691#define POLARSSL_PK_WRITE_C
1692
1693/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001694 * \def POLARSSL_PKCS5_C
1695 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001696 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001697 *
1698 * Module: library/pkcs5.c
1699 *
1700 * Requires: POLARSSL_MD_C
1701 *
1702 * This module adds support for the PKCS#5 functions.
1703 */
1704#define POLARSSL_PKCS5_C
1705
1706/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001707 * \def POLARSSL_PKCS11_C
1708 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001709 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001710 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001711 * Module: library/pkcs11.c
1712 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001713 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001714 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001715 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001716 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001717 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001718 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001719//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001720
1721/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001722 * \def POLARSSL_PKCS12_C
1723 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001724 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001725 * Adds algorithms for parsing PKCS#8 encrypted private keys
1726 *
1727 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001728 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001729 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001730 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1731 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001732 *
1733 * This module enables PKCS#12 functions.
1734 */
1735#define POLARSSL_PKCS12_C
1736
1737/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001738 * \def POLARSSL_PLATFORM_C
1739 *
1740 * Enable the platform abstraction layer that allows you to re-assign
1741 * functions like malloc(), free(), printf(), fprintf()
1742 *
1743 * Module: library/platform.c
1744 * Caller: Most other .c files
1745 *
1746 * This module enables abstraction of common (libc) functions.
1747 */
1748#define POLARSSL_PLATFORM_C
1749
1750/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001751 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001752 *
1753 * Enable the RIPEMD-160 hash algorithm.
1754 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001755 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001756 * Caller: library/md.c
1757 *
1758 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001759#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001760
1761/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001762 * \def POLARSSL_RSA_C
1763 *
1764 * Enable the RSA public-key cryptosystem.
1765 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001766 * Module: library/rsa.c
1767 * Caller: library/ssl_cli.c
1768 * library/ssl_srv.c
1769 * library/ssl_tls.c
1770 * library/x509.c
1771 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001772 * This module is used by the following key exchanges:
1773 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001774 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001775 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001776 */
Paul Bakker40e46942009-01-03 21:51:57 +00001777#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001778
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001779/**
1780 * \def POLARSSL_SHA1_C
1781 *
1782 * Enable the SHA1 cryptographic hash algorithm.
1783 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001784 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001785 * Caller: library/md.c
1786 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001787 * library/ssl_srv.c
1788 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001789 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001790 *
1791 * This module is required for SSL/TLS and SHA1-signed certificates.
1792 */
Paul Bakker40e46942009-01-03 21:51:57 +00001793#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001794
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001795/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001796 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001797 *
1798 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001799 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001800 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001801 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001802 * Caller: library/entropy.c
1803 * library/md.c
1804 * library/ssl_cli.c
1805 * library/ssl_srv.c
1806 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001807 *
1808 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001809 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001810 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001811#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001812
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001813/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001814 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001815 *
1816 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001817 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001818 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001819 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001820 * Caller: library/entropy.c
1821 * library/md.c
1822 * library/ssl_cli.c
1823 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001824 *
1825 * This module adds support for SHA-384 and SHA-512.
1826 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001827#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001828
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001829/**
Paul Bakker0a597072012-09-25 21:55:46 +00001830 * \def POLARSSL_SSL_CACHE_C
1831 *
1832 * Enable simple SSL cache implementation.
1833 *
1834 * Module: library/ssl_cache.c
1835 * Caller:
1836 *
1837 * Requires: POLARSSL_SSL_CACHE_C
1838 */
1839#define POLARSSL_SSL_CACHE_C
1840
1841/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001842 * \def POLARSSL_SSL_CLI_C
1843 *
1844 * Enable the SSL/TLS client code.
1845 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001846 * Module: library/ssl_cli.c
1847 * Caller:
1848 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001849 * Requires: POLARSSL_SSL_TLS_C
1850 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001851 * This module is required for SSL/TLS client support.
1852 */
Paul Bakker40e46942009-01-03 21:51:57 +00001853#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001854
Paul Bakker9a736322012-11-14 12:39:52 +00001855/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001856 * \def POLARSSL_SSL_SRV_C
1857 *
1858 * Enable the SSL/TLS server code.
1859 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001860 * Module: library/ssl_srv.c
1861 * Caller:
1862 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001863 * Requires: POLARSSL_SSL_TLS_C
1864 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001865 * This module is required for SSL/TLS server support.
1866 */
Paul Bakker40e46942009-01-03 21:51:57 +00001867#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001868
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001869/**
1870 * \def POLARSSL_SSL_TLS_C
1871 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001872 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001873 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001874 * Module: library/ssl_tls.c
1875 * Caller: library/ssl_cli.c
1876 * library/ssl_srv.c
1877 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001878 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001879 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001880 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001881 * This module is required for SSL/TLS.
1882 */
Paul Bakker40e46942009-01-03 21:51:57 +00001883#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001884
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001885/**
Paul Bakker2466d932013-09-28 14:40:38 +02001886 * \def POLARSSL_THREADING_C
1887 *
1888 * Enable the threading abstraction layer.
1889 * By default PolarSSL assumes it is used in a non-threaded environment or that
1890 * contexts are not shared between threads. If you do intend to use contexts
1891 * between threads, you will need to enable this layer to prevent race
1892 * conditions.
1893 *
1894 * Module: library/threading.c
1895 *
1896 * This allows different threading implementations (self-implemented or
1897 * provided).
1898 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001899 * You will have to enable either POLARSSL_THREADING_ALT or
1900 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001901 *
1902 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001903 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001904//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001905
1906/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001907 * \def POLARSSL_TIMING_C
1908 *
1909 * Enable the portable timing interface.
1910 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001911 * Module: library/timing.c
1912 * Caller: library/havege.c
1913 *
1914 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001915 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001916#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001917
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001918/**
1919 * \def POLARSSL_VERSION_C
1920 *
1921 * Enable run-time version information.
1922 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001923 * Module: library/version.c
1924 *
1925 * This module provides run-time version information.
1926 */
1927#define POLARSSL_VERSION_C
1928
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001929/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001930 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001931 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001932 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001933 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001934 * Module: library/x509.c
1935 * Caller: library/x509_crl.c
1936 * library/x509_crt.c
1937 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001938 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001939 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001940 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001941 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001942 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001943 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001944#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001945
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001946/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001947 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001948 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001949 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001950 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001951 * Module: library/x509_crt.c
1952 * Caller: library/ssl_cli.c
1953 * library/ssl_srv.c
1954 * library/ssl_tls.c
1955 *
1956 * Requires: POLARSSL_X509_USE_C
1957 *
1958 * This module is required for X.509 certificate parsing.
1959 */
1960#define POLARSSL_X509_CRT_PARSE_C
1961
1962/**
1963 * \def POLARSSL_X509_CRL_PARSE_C
1964 *
1965 * Enable X.509 CRL parsing.
1966 *
1967 * Module: library/x509_crl.c
1968 * Caller: library/x509_crt.c
1969 *
1970 * Requires: POLARSSL_X509_USE_C
1971 *
1972 * This module is required for X.509 CRL parsing.
1973 */
1974#define POLARSSL_X509_CRL_PARSE_C
1975
1976/**
1977 * \def POLARSSL_X509_CSR_PARSE_C
1978 *
1979 * Enable X.509 Certificate Signing Request (CSR) parsing.
1980 *
1981 * Module: library/x509_csr.c
1982 * Caller: library/x509_crt_write.c
1983 *
1984 * Requires: POLARSSL_X509_USE_C
1985 *
1986 * This module is used for reading X.509 certificate request.
1987 */
1988#define POLARSSL_X509_CSR_PARSE_C
1989
1990/**
1991 * \def POLARSSL_X509_CREATE_C
1992 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001993 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001994 *
1995 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001996 *
Paul Bakker4606c732013-09-15 17:04:23 +02001997 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001998 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001999 * This module is the basis for creating X.509 certificates and CSRs.
2000 */
2001#define POLARSSL_X509_CREATE_C
2002
2003/**
2004 * \def POLARSSL_X509_CRT_WRITE_C
2005 *
2006 * Enable creating X.509 certificates.
2007 *
2008 * Module: library/x509_crt_write.c
2009 *
2010 * Requires: POLARSSL_CREATE_C
2011 *
2012 * This module is required for X.509 certificate creation.
2013 */
2014#define POLARSSL_X509_CRT_WRITE_C
2015
2016/**
2017 * \def POLARSSL_X509_CSR_WRITE_C
2018 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002019 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002020 *
2021 * Module: library/x509_csr_write.c
2022 *
2023 * Requires: POLARSSL_CREATE_C
2024 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002025 * This module is required for X.509 certificate request writing.
2026 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002027#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002028
2029/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002030 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002031 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002032 * Enable the XTEA block cipher.
2033 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002034 * Module: library/xtea.c
2035 * Caller:
2036 */
2037#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002038
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002039/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002040
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002041/**
2042 * \name SECTION: Module configuration options
2043 *
2044 * This section allows for the setting of module specific sizes and
2045 * configuration options. The default values are already present in the
2046 * relevant header files and should suffice for the regular use cases.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002047 *
Paul Bakker088c5c52014-04-25 11:11:10 +02002048 * Our advice is to enable options and change their values here
2049 * only if you have a good reason and know the consequences.
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002050 *
2051 * Please check the respective header file for documentation on these
2052 * parameters (to prevent duplicate documentation).
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002053 * \{
2054 */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002055
Paul Bakker088c5c52014-04-25 11:11:10 +02002056/* MPI / BIGNUM options */
2057//#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2058//#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002059
Paul Bakker088c5c52014-04-25 11:11:10 +02002060/* CTR_DRBG options */
2061//#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2062//#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2063//#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2064//#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2065//#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002066
Paul Bakker088c5c52014-04-25 11:11:10 +02002067/* HMAC_DRBG options */
2068//#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2069//#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2070//#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2071//#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002072
Paul Bakker088c5c52014-04-25 11:11:10 +02002073/* ECP options */
2074//#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2075//#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2076//#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002077
Paul Bakker088c5c52014-04-25 11:11:10 +02002078/* Entropy options */
2079//#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2080//#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002081
Paul Bakker088c5c52014-04-25 11:11:10 +02002082/* Memory buffer allocator options */
2083//#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002084
Paul Bakker088c5c52014-04-25 11:11:10 +02002085/* Platform options */
2086//#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. */
2087//#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2088//#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2089//#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2090//#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
Paul Bakker6e339b52013-07-03 13:37:05 +02002091
Paul Bakker088c5c52014-04-25 11:11:10 +02002092/* SSL Cache options */
2093//#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2094//#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002095
Paul Bakker088c5c52014-04-25 11:11:10 +02002096/* SSL options */
2097//#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2098//#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002099
Paul Bakkereaebbd52014-04-25 15:04:14 +02002100/* Debug options */
2101//#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */
2102
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002103/* \} name */
2104
Paul Bakker7ad00f92013-04-18 23:05:25 +02002105/*
2106 * Sanity checks on defines and dependencies
2107 */
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002108#if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
2109#error "POLARSSL_AESNI_C defined, but not all prerequisites"
2110#endif
2111
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002112#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
2113#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002114#endif
2115
2116#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
2117#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
2118#endif
2119
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002120#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
2121#error "POLARSSL_DHM_C defined, but not all prerequisites"
2122#endif
2123
Paul Bakker7ad00f92013-04-18 23:05:25 +02002124#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
2125#error "POLARSSL_ECDH_C defined, but not all prerequisites"
2126#endif
2127
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02002128#if defined(POLARSSL_ECDSA_C) && \
2129 ( !defined(POLARSSL_ECP_C) || \
2130 !defined(POLARSSL_ASN1_PARSE_C) || \
2131 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002132#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
2133#endif
2134
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +01002135#if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C)
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +01002136#error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
2137#endif
2138
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01002139#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
2140 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
2141 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
2142 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
2143 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
2144 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
2145 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
2146 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
Manuel Pégourié-Gonnardffd94cc2014-01-28 20:11:07 +01002147 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \
2148 !defined(POLARSSL_ECP_DP_M255_ENABLED) && \
2149 !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \
2150 !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \
2151 !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002152#error "POLARSSL_ECP_C defined, but not all prerequisites"
2153#endif
2154
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002155#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
2156 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02002157#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
2158#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002159#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
2160 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
2161#error "CTR_DRBG_ENTROPY_LEN value too high"
2162#endif
Manuel Pégourié-Gonnarda27cd4c2014-04-02 13:46:29 +02002163#if defined(POLARSSL_ENTROPY_C) && \
2164 ( !defined(POLARSSL_SHA512_C) || defined(POLARSSL_ENTROPY_FORCE_SHA256) ) \
2165 && defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002166#error "CTR_DRBG_ENTROPY_LEN value too high"
2167#endif
Paul Bakker2ceda572014-02-06 15:55:25 +01002168#if defined(POLARSSL_ENTROPY_C) && \
2169 defined(POLARSSL_ENTROPY_FORCE_SHA256) && !defined(POLARSSL_SHA256_C)
2170#error "POLARSSL_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
2171#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02002172
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02002173#if defined(POLARSSL_GCM_C) && ( \
2174 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002175#error "POLARSSL_GCM_C defined, but not all prerequisites"
2176#endif
2177
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002178#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
2179#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
2180#endif
2181
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01002182#if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C)
2183#error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites"
2184#endif
2185
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01002186#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
2187 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2188#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
2189#endif
2190
2191#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
2192 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2193#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
2194#endif
2195
Paul Bakkere07f41d2013-04-19 09:08:57 +02002196#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
2197#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
2198#endif
2199
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02002200#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
2201 !defined(POLARSSL_ECDH_C)
2202#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
2203#endif
2204
Paul Bakkere07f41d2013-04-19 09:08:57 +02002205#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2206 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002207 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002208#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2209#endif
2210
2211#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2212 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002213 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002214#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2215#endif
2216
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002217#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2218 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002219 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002220#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2221#endif
2222
Paul Bakkere07f41d2013-04-19 09:08:57 +02002223#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002224 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002225 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002226#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2227#endif
2228
2229#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002230 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002231 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002232#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2233#endif
2234
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002235#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \
2236 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
Paul Bakker6e339b52013-07-03 13:37:05 +02002237#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2238#endif
2239
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002240#if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2241#error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2242#endif
2243
Paul Bakker7ad00f92013-04-18 23:05:25 +02002244#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2245#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2246#endif
2247
Paul Bakkercff68422013-09-15 20:43:33 +02002248#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2249#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2250#endif
2251
2252#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2253#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002254#endif
2255
Paul Bakker4606c732013-09-15 17:04:23 +02002256#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2257#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2258#endif
2259
2260#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2261#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2262#endif
2263
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002264#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002265#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2266#endif
2267
2268#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2269 !defined(POLARSSL_OID_C) )
2270#error "POLARSSL_RSA_C defined, but not all prerequisites"
2271#endif
2272
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002273#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2274 !defined(POLARSSL_SHA1_C) )
2275#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2276#endif
2277
2278#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2279 !defined(POLARSSL_SHA1_C) )
2280#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2281#endif
2282
2283#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2284 !defined(POLARSSL_SHA1_C) )
2285#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2286#endif
2287
2288#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2289 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2290#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2291#endif
2292
Paul Bakker7ad00f92013-04-18 23:05:25 +02002293#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2294#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2295#endif
2296
Paul Bakker577e0062013-08-28 11:57:20 +02002297#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002298 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002299#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2300#endif
2301
2302#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2303#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2304#endif
2305
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002306#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2307 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2308 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2309#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2310#endif
2311
2312#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2313 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2314#error "Illegal protocol selection"
2315#endif
2316
2317#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2318 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2319#error "Illegal protocol selection"
2320#endif
2321
2322#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2323 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2324 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2325#error "Illegal protocol selection"
2326#endif
2327
Paul Bakker59da0a42013-08-19 13:27:17 +02002328#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002329 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2330 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002331#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2332#endif
2333
Manuel Pégourié-Gonnard5d917ff2014-02-21 16:52:06 +01002334#if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) && \
2335 !defined(POLARSSL_X509_CRT_PARSE_C)
2336#error "POLARSSL_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites"
2337#endif
2338
Paul Bakker2466d932013-09-28 14:40:38 +02002339#if defined(POLARSSL_THREADING_PTHREAD)
2340#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2341#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2342#endif
2343#define POLARSSL_THREADING_IMPL
2344#endif
2345
2346#if defined(POLARSSL_THREADING_ALT)
2347#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2348#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2349#endif
2350#define POLARSSL_THREADING_IMPL
2351#endif
2352
2353#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2354#error "POLARSSL_THREADING_C defined, single threading implementation required"
2355#endif
2356#undef POLARSSL_THREADING_IMPL
2357
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002358#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002359 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002360 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002361#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002362#endif
2363
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002364#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2365 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2366 !defined(POLARSSL_PK_WRITE_C) )
2367#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2368#endif
2369
2370#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2371#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2372#endif
2373
2374#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2375#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2376#endif
2377
2378#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2379#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2380#endif
2381
2382#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2383#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2384#endif
2385
2386#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2387#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002388#endif
2389
Paul Bakker5121ce52009-01-03 21:22:43 +00002390#endif /* config.h */