blob: 22faf0438b87daf37268c6ab2ee296eeebacdf15 [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 Bakker9bcf16c2013-06-24 19:31:17 +02006 * Copyright (C) 2006-2013, 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 Bakker40e46942009-01-03 21:51:57 +000051#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000052 */
53
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 Bakker40e46942009-01-03 21:51:57 +000060#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000061 */
62
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 *
74 * The compiler has support for asm()
75 *
Paul Bakker5121ce52009-01-03 21:22:43 +000076 * Uncomment to enable the use of assembly code.
Paul Bakker68041ec2009-04-19 21:17:55 +000077 *
78 * Requires support for asm() in compiler.
79 *
80 * Used in:
81 * library/timing.c
82 * library/padlock.c
83 * include/polarssl/bn_mul.h
84 *
Paul Bakker5121ce52009-01-03 21:22:43 +000085 */
Paul Bakker40e46942009-01-03 21:51:57 +000086#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000087
Paul Bakkerf3b86c12011-01-27 15:24:17 +000088/**
89 * \def POLARSSL_HAVE_SSE2
90 *
Paul Bakkere23c3152012-10-01 14:42:47 +000091 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000092 *
Paul Bakker5121ce52009-01-03 21:22:43 +000093 * Uncomment if the CPU supports SSE2 (IA-32 specific).
94 *
Paul Bakker40e46942009-01-03 21:51:57 +000095#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000096 */
Paul Bakkerfa9b1002013-07-03 15:31:03 +020097
98/**
99 * \def POLARSSL_HAVE_TIME
100 *
101 * System has time.h and time() / localtime() / gettimeofday()
102 *
103 * Comment if your system does not support time functions
104 */
105#define POLARSSL_HAVE_TIME
Paul Bakker0a62cd12011-01-21 11:00:08 +0000106/* \} name */
107
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000108/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000109 * \name SECTION: PolarSSL feature support
110 *
111 * This section sets support for features that are or are not needed
112 * within the modules that are enabled.
113 * \{
114 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000115
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000116/**
Paul Bakker90995b52013-06-24 19:20:35 +0200117 * \def POLARSSL_XXX_ALT
118 *
119 * Uncomment a macro to let PolarSSL use your alternate core implementation of
120 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
121 * implementations). Keep in mind that the function prototypes should remain
122 * the same.
123 *
124 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
125 * provide the "struct aes_context" definition and omit the base function
126 * declarations and implementations. "aes_alt.h" will be included from
127 * "aes.h" to include the new function definitions.
128 *
129 * Uncomment a macro to enable alternate implementation for core algorithm
130 * functions
131#define POLARSSL_AES_ALT
132#define POLARSSL_ARC4_ALT
133#define POLARSSL_BLOWFISH_ALT
134#define POLARSSL_CAMELLIA_ALT
135#define POLARSSL_DES_ALT
136#define POLARSSL_XTEA_ALT
137#define POLARSSL_MD2_ALT
138#define POLARSSL_MD4_ALT
139#define POLARSSL_MD5_ALT
140#define POLARSSL_SHA1_ALT
Paul Bakker9e36f042013-06-30 14:34:05 +0200141#define POLARSSL_SHA256_ALT
142#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200143 */
144
145/**
Paul Bakker15566e42011-04-24 21:19:15 +0000146 * \def POLARSSL_AES_ROM_TABLES
147 *
148 * Store the AES tables in ROM.
149 *
150 * Uncomment this macro to store the AES tables in ROM.
151 *
152#define POLARSSL_AES_ROM_TABLES
153 */
154
155/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000156 * \def POLARSSL_CIPHER_MODE_CFB
157 *
158 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
159 */
160#define POLARSSL_CIPHER_MODE_CFB
161
162/**
163 * \def POLARSSL_CIPHER_MODE_CTR
164 *
165 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
166 */
167#define POLARSSL_CIPHER_MODE_CTR
168
169/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000170 * \def POLARSSL_CIPHER_NULL_CIPHER
171 *
172 * Enable NULL cipher.
173 * Warning: Only do so when you know what you are doing. This allows for
174 * encryption or channels without any security!
175 *
176 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
177 * the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000178 * TLS_RSA_WITH_NULL_MD5
179 * TLS_RSA_WITH_NULL_SHA
180 * TLS_RSA_WITH_NULL_SHA256
Paul Bakker41c83d32013-03-20 14:39:14 +0100181 * TLS_ECDHE_RSA_WITH_NULL_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200182 * TLS_PSK_WITH_NULL
183 * TLS_PSK_WITH_NULL256
184 * TLS_PSK_WITH_NULL384
185 * TLS_DHE_PSK_WITH_NULL
186 * TLS_DHE_PSK_WITH_NULL256
187 * TLS_DHE_PSK_WITH_NULL384
188 * TLS_RSA_PSK_WITH_NULL
189 * TLS_RSA_PSK_WITH_NULL256
190 * TLS_RSA_PSK_WITH_NULL384
Paul Bakkerfab5c822012-02-06 16:45:10 +0000191 *
192 * Uncomment this macro to enable the NULL cipher and ciphersuites
193#define POLARSSL_CIPHER_NULL_CIPHER
194 */
195
196/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200197 * \def POLARSSL_CIPHER_PADDING_XXX
198 *
199 * Uncomment or comment macros to add support for specific padding modes
200 * in the cipher layer with cipher modes that support padding (e.g. CBC)
201 *
202 * If you disable all padding modes, only full blocks can be used with CBC.
203 *
204 * Enable padding modes in the cipher layer.
205 */
206#define POLARSSL_CIPHER_PADDING_PKCS7
207#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
208#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
209#define POLARSSL_CIPHER_PADDING_ZEROS
210
211/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000212 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
213 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000214 * Enable weak ciphersuites in SSL / TLS
Paul Bakkerfab5c822012-02-06 16:45:10 +0000215 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000216 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000217 *
218 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000219 * TLS_RSA_WITH_DES_CBC_SHA
220 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000221 *
222 * Uncomment this macro to enable weak ciphersuites
223#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
224 */
225
226/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200227 * \def POLARSSL_ECP_XXXX_ENABLED
228 *
229 * Enables specific curves within the Elliptic Curve module.
230 * By default all supported curves are enables.
231 *
232 * Comment macros to disable the curve and functions for it
233 */
234#define POLARSSL_ECP_DP_SECP192R1_ENABLED
235#define POLARSSL_ECP_DP_SECP224R1_ENABLED
236#define POLARSSL_ECP_DP_SECP256R1_ENABLED
237#define POLARSSL_ECP_DP_SECP384R1_ENABLED
238#define POLARSSL_ECP_DP_SECP521R1_ENABLED
239
240/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200241 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
242 *
243 * Enable the PSK based ciphersuite modes in SSL / TLS
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200244 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200245 * This enables the following ciphersuites (if other requisites are
246 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200247 * TLS_PSK_WITH_RC4_128_SHA
248 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
249 * TLS_PSK_WITH_AES_128_CBC_SHA
250 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200251 * TLS_PSK_WITH_AES_128_CBC_SHA256
252 * TLS_PSK_WITH_AES_256_CBC_SHA384
253 * TLS_PSK_WITH_AES_128_GCM_SHA256
254 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200255 */
256#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
257
258/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200259 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
260 *
261 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS
262 *
263 * Requires: POLARSSL_DHM_C
264 *
265 * This enables the following ciphersuites (if other requisites are
266 * enabled as well):
267 * TLS_DHE_PSK_WITH_RC4_128_SHA
268 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
269 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
270 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200271 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
272 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
273 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
274 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200275 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200276#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200277
278/**
279 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
280 *
281 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS
Paul Bakker45bda902013-04-19 22:28:21 +0200282 * (NOT YET IMPLEMENTED)
Paul Bakkere07f41d2013-04-19 09:08:57 +0200283 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
284 *
285 * This enables the following ciphersuites (if other requisites are
286 * enabled as well):
287 * TLS_RSA_PSK_WITH_RC4_128_SHA
288 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
289 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
290 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200291 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
292 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
293 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
294 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200295#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
296 */
297
298/**
299 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
300 *
301 * Enable the RSA-only based ciphersuite modes in SSL / TLS
302 *
303 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
304 *
305 * This enables the following ciphersuites (if other requisites are
306 * enabled as well):
307 * TLS_RSA_WITH_AES_128_CBC_SHA
308 * TLS_RSA_WITH_AES_256_CBC_SHA
309 * TLS_RSA_WITH_AES_128_CBC_SHA256
310 * TLS_RSA_WITH_AES_256_CBC_SHA256
311 * TLS_RSA_WITH_AES_128_GCM_SHA256
312 * TLS_RSA_WITH_AES_256_GCM_SHA384
313 * TLS_RSA_WITH_RC4_128_MD5
314 * TLS_RSA_WITH_RC4_128_SHA
315 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
316 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
317 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
318 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
319 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
320 */
321#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
322
323/**
324 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
325 *
326 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS
327 *
328 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
329 *
330 * This enables the following ciphersuites (if other requisites are
331 * enabled as well):
332 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
333 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
334 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
335 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
336 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
337 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
338 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
339 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
340 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
341 */
342#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
343
344/**
345 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
346 *
347 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS
348 *
349 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
350 *
351 * This enables the following ciphersuites (if other requisites are
352 * enabled as well):
353 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
354 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
355 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
356 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
357 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
358 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
359 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
360 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
361 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
362 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
363 */
364#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
365
366/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200367 * \def POLARSSL_ERROR_STRERROR_BC
368 *
369 * Make available the backward compatible error_strerror() next to the
370 * current polarssl_strerror().
371 *
372 * Disable if you run into name conflicts and want to really remove the
373 * error_strerror()
374 */
375#define POLARSSL_ERROR_STRERROR_BC
376
377/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100378 * \def POLARSSL_ERROR_STRERROR_DUMMY
379 *
380 * Enable a dummy error function to make use of error_strerror() in
381 * third party libraries easier.
382 *
383 * Disable if you run into name conflicts and want to really remove the
384 * error_strerror()
385 */
386#define POLARSSL_ERROR_STRERROR_DUMMY
387
388/**
Paul Bakker15566e42011-04-24 21:19:15 +0000389 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000390 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000391 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
392 *
Paul Bakker15566e42011-04-24 21:19:15 +0000393 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000394 */
Paul Bakker15566e42011-04-24 21:19:15 +0000395#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000396
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000397/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000398 * \def POLARSSL_FS_IO
399 *
400 * Enable functions that use the filesystem.
401 */
402#define POLARSSL_FS_IO
403
404/**
Paul Bakker43655f42011-12-15 20:11:16 +0000405 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
406 *
407 * Do not add default entropy sources. These are the platform specific,
408 * hardclock and HAVEGE based poll functions.
409 *
410 * This is useful to have more control over the added entropy sources in an
411 * application.
412 *
413 * Uncomment this macro to prevent loading of default entropy functions.
414#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
415 */
416
417/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000418 * \def POLARSSL_NO_PLATFORM_ENTROPY
419 *
420 * Do not use built-in platform entropy functions.
421 * This is useful if your platform does not support
422 * standards like the /dev/urandom or Windows CryptoAPI.
423 *
424 * Uncomment this macro to disable the built-in platform entropy functions.
425#define POLARSSL_NO_PLATFORM_ENTROPY
426 */
427
428/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200429 * \def POLARSSL_MEMORY_DEBUG
430 *
431 * Enable debugging of buffer allocator memory issues. Automatically prints
432 * (to stderr) all (fatal) messages on memory allocation issues. Enables
433 * function for 'debug output' of allocated memory.
434 *
435 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
436 * fprintf()
437 *
438 * Uncomment this macro to let the buffer allocator print out error messages.
439#define POLARSSL_MEMORY_DEBUG
440*/
441
442/**
443 * \def POLARSSL_MEMORY_BACKTRACE
444 *
445 * Include backtrace information with each allocated block.
446 *
447 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
448 * GLIBC-compatible backtrace() an backtrace_symbols() support
449 *
450 * Uncomment this macro to include backtrace information
451#define POLARSSL_MEMORY_BACKTRACE
452 */
453
454/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000455 * \def POLARSSL_PKCS1_V21
456 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000457 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
458 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000459 * Enable support for PKCS#1 v2.1 encoding.
460 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
461 */
462#define POLARSSL_PKCS1_V21
463
464/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000465 * \def POLARSSL_RSA_NO_CRT
466 *
467 * Do not use the Chinese Remainder Theorem for the RSA private operation.
468 *
469 * Uncomment this macro to disable the use of CRT in RSA.
470 *
471#define POLARSSL_RSA_NO_CRT
472 */
Paul Bakker15566e42011-04-24 21:19:15 +0000473
474/**
475 * \def POLARSSL_SELF_TEST
476 *
477 * Enable the checkup functions (*_self_test).
478 */
479#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000480
481/**
Paul Bakker40865c82013-01-31 17:13:13 +0100482 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
483 *
484 * Enable sending of alert messages in case of encountered errors as per RFC.
485 * If you choose not to send the alert messages, PolarSSL can still communicate
486 * with other servers, only debugging of failures is harder.
487 *
488 * The advantage of not sending alert messages, is that no information is given
489 * about reasons for failures thus preventing adversaries of gaining intel.
490 *
491 * Enable sending of all alert messages
492 */
493#define POLARSSL_SSL_ALERT_MESSAGES
494
495/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100496 * \def POLARSSL_SSL_DEBUG_ALL
497 *
498 * Enable the debug messages in SSL module for all issues.
499 * Debug messages have been disabled in some places to prevent timing
500 * attacks due to (unbalanced) debugging function calls.
501 *
502 * If you need all error reporting you should enable this during debugging,
503 * but remove this for production servers that should log as well.
504 *
505 * Uncomment this macro to report all debug messages on errors introducing
506 * a timing side-channel.
507 *
508#define POLARSSL_SSL_DEBUG_ALL
509 */
510
511/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000512 * \def POLARSSL_SSL_HW_RECORD_ACCEL
513 *
514 * Enable hooking functions in SSL module for hardware acceleration of
515 * individual records.
516 *
517 * Uncomment this macro to enable hooking functions.
518#define POLARSSL_SSL_HW_RECORD_ACCEL
519 */
520
521/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100522 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
523 *
524 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
525 * SSL Server module (POLARSSL_SSL_SRV_C)
526 *
527 * Comment this macro to disable support for SSLv2 Client Hello messages.
528 */
529#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
530
531/**
Paul Bakkera503a632013-08-14 13:48:06 +0200532 * \def POLARSSL_SSL_SESSION_TICKETS
533 *
534 * Enable support for RFC 5077 session tickets in SSL
535 *
536 * Requires: POLARSSL_AES_C
537 * POLARSSL_SHA256_C
538 *
539 * Comment this macro to disable support for SSL session tickets
540 */
541#define POLARSSL_SSL_SESSION_TICKETS
542
543/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000544 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
545 *
546 * If set, the X509 parser will not break-off when parsing an X509 certificate
547 * and encountering an unknown critical extension.
548 *
549 * Uncomment to prevent an error.
550 *
551#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
552 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000553
554/**
555 * \def POLARSSL_ZLIB_SUPPORT
556 *
557 * If set, the SSL/TLS module uses ZLIB to support compression and
558 * decompression of packet data.
559 *
560 * Used in: library/ssl_tls.c
561 * library/ssl_cli.c
562 * library/ssl_srv.c
563 *
564 * This feature requires zlib library and headers to be present.
565 *
566 * Uncomment to enable use of ZLIB
567#define POLARSSL_ZLIB_SUPPORT
568 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000569/* \} name */
570
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000571/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000572 * \name SECTION: PolarSSL modules
573 *
574 * This section enables or disables entire modules in PolarSSL
575 * \{
576 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000577
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000578/**
579 * \def POLARSSL_AES_C
580 *
581 * Enable the AES block cipher.
582 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000583 * Module: library/aes.c
584 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000585 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000586 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000587 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000588 * This module enables the following ciphersuites (if other requisites are
589 * enabled as well):
590 * TLS_RSA_WITH_AES_128_CBC_SHA
591 * TLS_RSA_WITH_AES_256_CBC_SHA
592 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
593 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
594 * TLS_RSA_WITH_AES_128_CBC_SHA256
595 * TLS_RSA_WITH_AES_256_CBC_SHA256
596 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
597 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
598 * TLS_RSA_WITH_AES_128_GCM_SHA256
599 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100600 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
601 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200602 * TLS_PSK_WITH_AES_128_CBC_SHA
603 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100604 *
605 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000606 */
Paul Bakker40e46942009-01-03 21:51:57 +0000607#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000608
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000609/**
610 * \def POLARSSL_ARC4_C
611 *
612 * Enable the ARCFOUR stream cipher.
613 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000614 * Module: library/arc4.c
615 * Caller: library/ssl_tls.c
616 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100617 * This module enables the following ciphersuites (if other requisites are
618 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000619 * TLS_RSA_WITH_RC4_128_MD5
620 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100621 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200622 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000623 */
Paul Bakker40e46942009-01-03 21:51:57 +0000624#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000625
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000626/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000627 * \def POLARSSL_ASN1_PARSE_C
628 *
629 * Enable the generic ASN1 parser.
630 *
631 * Module: library/asn1.c
632 * Caller: library/x509parse.c
633 */
634#define POLARSSL_ASN1_PARSE_C
635
636/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000637 * \def POLARSSL_ASN1_WRITE_C
638 *
639 * Enable the generic ASN1 writer.
640 *
641 * Module: library/asn1write.c
642 */
643#define POLARSSL_ASN1_WRITE_C
644
645/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000646 * \def POLARSSL_BASE64_C
647 *
648 * Enable the Base64 module.
649 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000650 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000651 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000652 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000653 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000654 */
Paul Bakker40e46942009-01-03 21:51:57 +0000655#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000656
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000657/**
658 * \def POLARSSL_BIGNUM_C
659 *
Paul Bakker9a736322012-11-14 12:39:52 +0000660 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000661 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000662 * Module: library/bignum.c
663 * Caller: library/dhm.c
664 * library/rsa.c
665 * library/ssl_tls.c
666 * library/x509parse.c
667 *
668 * This module is required for RSA and DHM support.
669 */
Paul Bakker40e46942009-01-03 21:51:57 +0000670#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000671
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000672/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000673 * \def POLARSSL_BLOWFISH_C
674 *
675 * Enable the Blowfish block cipher.
676 *
677 * Module: library/blowfish.c
678 */
679#define POLARSSL_BLOWFISH_C
680
681/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000682 * \def POLARSSL_CAMELLIA_C
683 *
684 * Enable the Camellia block cipher.
685 *
Paul Bakker38119b12009-01-10 23:31:23 +0000686 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000687 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000688 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000689 * This module enables the following ciphersuites (if other requisites are
690 * enabled as well):
691 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
692 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
693 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
694 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
695 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
696 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
697 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
698 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000699 */
700#define POLARSSL_CAMELLIA_C
701
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000702/**
703 * \def POLARSSL_CERTS_C
704 *
705 * Enable the test certificates.
706 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000707 * Module: library/certs.c
708 * Caller:
709 *
710 * This module is used for testing (ssl_client/server).
711 */
Paul Bakker40e46942009-01-03 21:51:57 +0000712#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000713
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000714/**
715 * \def POLARSSL_CIPHER_C
716 *
717 * Enable the generic cipher layer.
718 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000719 * Module: library/cipher.c
720 * Caller:
721 *
722 * Uncomment to enable generic cipher wrappers.
723 */
724#define POLARSSL_CIPHER_C
725
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000726/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000727 * \def POLARSSL_CTR_DRBG_C
728 *
729 * Enable the CTR_DRBG AES-256-based random generator
730 *
731 * Module: library/ctr_drbg.c
732 * Caller:
733 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000734 * Requires: POLARSSL_AES_C
735 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000736 * This module provides the CTR_DRBG AES-256 random number generator.
737 */
738#define POLARSSL_CTR_DRBG_C
739
740/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000741 * \def POLARSSL_DEBUG_C
742 *
743 * Enable the debug functions.
744 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000745 * Module: library/debug.c
746 * Caller: library/ssl_cli.c
747 * library/ssl_srv.c
748 * library/ssl_tls.c
749 *
750 * This module provides debugging functions.
751 */
Paul Bakker40e46942009-01-03 21:51:57 +0000752#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000753
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000754/**
755 * \def POLARSSL_DES_C
756 *
757 * Enable the DES block cipher.
758 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000759 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100760 * Caller: library/pem.c
761 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000762 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000763 * This module enables the following ciphersuites (if other requisites are
764 * enabled as well):
765 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
766 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100767 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200768 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100769 *
770 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000771 */
Paul Bakker40e46942009-01-03 21:51:57 +0000772#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000773
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000774/**
775 * \def POLARSSL_DHM_C
776 *
777 * Enable the Diffie-Hellman-Merkle key exchange.
778 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000779 * Module: library/dhm.c
780 * Caller: library/ssl_cli.c
781 * library/ssl_srv.c
782 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000783 * This module enables the following ciphersuites (if other requisites are
784 * enabled as well):
785 * TLS_DHE_RSA_WITH_DES_CBC_SHA
786 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
787 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
788 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
789 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
790 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
791 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
792 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
793 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
794 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
795 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
796 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000797 */
Paul Bakker40e46942009-01-03 21:51:57 +0000798#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000799
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000800/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100801 * \def POLARSSL_ECDH_C
802 *
803 * Enable the elliptic curve Diffie-Hellman library.
804 *
805 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100806 * Caller: library/ssl_cli.c
807 * library/ssl_srv.c
808 *
809 * This module enables the following ciphersuites (if other requisites are
810 * enabled as well):
811 * TLS_ECDHE_RSA_WITH_NULL_SHA
812 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
813 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
814 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
815 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100816 *
817 * Requires: POLARSSL_ECP_C
818 */
819#define POLARSSL_ECDH_C
820
821/**
822 * \def POLARSSL_ECDSA_C
823 *
824 * Enable the elliptic curve DSA library.
825 *
826 * Module: library/ecdsa.c
827 * Caller:
828 *
829 * Requires: POLARSSL_ECP_C
830 */
831#define POLARSSL_ECDSA_C
832
833/**
834 * \def POLARSSL_ECP_C
835 *
836 * Enable the elliptic curve over GF(p) library.
837 *
838 * Module: library/ecp.c
839 * Caller: library/ecdh.c
840 * library/ecdsa.c
841 *
842 * Requires: POLARSSL_BIGNUM_C
843 */
844#define POLARSSL_ECP_C
845
846/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000847 * \def POLARSSL_ENTROPY_C
848 *
849 * Enable the platform-specific entropy code.
850 *
851 * Module: library/entropy.c
852 * Caller:
853 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200854 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000855 *
856 * This module provides a generic entropy pool
857 */
858#define POLARSSL_ENTROPY_C
859
860/**
Paul Bakker9d781402011-05-09 16:17:09 +0000861 * \def POLARSSL_ERROR_C
862 *
863 * Enable error code to error string conversion.
864 *
865 * Module: library/error.c
866 * Caller:
867 *
868 * This module enables err_strerror().
869 */
870#define POLARSSL_ERROR_C
871
872/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000873 * \def POLARSSL_GCM_C
874 *
875 * Enable the Galois/Counter Mode (GCM) for AES
876 *
877 * Module: library/gcm.c
878 *
879 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000880 *
881 * This module enables the following ciphersuites (if other requisites are
882 * enabled as well):
883 * TLS_RSA_WITH_AES_128_GCM_SHA256
884 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000885 */
886#define POLARSSL_GCM_C
887
888/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000889 * \def POLARSSL_HAVEGE_C
890 *
891 * Enable the HAVEGE random generator.
892 *
Paul Bakker2a844242013-06-24 13:01:53 +0200893 * Warning: the HAVEGE random generator is not suitable for virtualized
894 * environments
895 *
896 * Warning: the HAVEGE random generator is dependent on timing and specific
897 * processor traits. It is therefore not advised to use HAVEGE as
898 * your applications primary random generator or primary entropy pool
899 * input. As a secondary input to your entropy pool, it IS able add
900 * the (limited) extra entropy it provides.
901 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000902 * Module: library/havege.c
903 * Caller:
904 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000905 * Requires: POLARSSL_TIMING_C
906 *
Paul Bakker2a844242013-06-24 13:01:53 +0200907 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +0000908#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +0200909 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000910
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000911/**
912 * \def POLARSSL_MD_C
913 *
914 * Enable the generic message digest layer.
915 *
Paul Bakker17373852011-01-06 14:20:01 +0000916 * Module: library/md.c
917 * Caller:
918 *
919 * Uncomment to enable generic message digest wrappers.
920 */
921#define POLARSSL_MD_C
922
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000923/**
924 * \def POLARSSL_MD2_C
925 *
926 * Enable the MD2 hash algorithm
927 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000928 * Module: library/md2.c
929 * Caller: library/x509parse.c
930 *
931 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
932 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000933#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000934 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000935
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000936/**
937 * \def POLARSSL_MD4_C
938 *
939 * Enable the MD4 hash algorithm
940 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000941 * Module: library/md4.c
942 * Caller: library/x509parse.c
943 *
944 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
945 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000946#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000947 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000948
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000949/**
950 * \def POLARSSL_MD5_C
951 *
952 * Enable the MD5 hash algorithm
953 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000954 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100955 * Caller: library/pem.c
956 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000957 * library/x509parse.c
958 *
959 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100960 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000961 */
Paul Bakker40e46942009-01-03 21:51:57 +0000962#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000963
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000964/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200965 * \def POLARSSL_MEMORY_C
966 *
967 * Enable the memory allocation layer.
968 * By default PolarSSL uses the system-provided malloc() and free().
969 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
970 * are defined and unmodified)
971 *
972 * This allows different allocators (self-implemented or provided)
973 *
974 * Enable this layer to allow use of alternative memory allocators.
975#define POLARSSL_MEMORY_C
976 */
977
978/**
979 * The buffer allocator implementation that makes use of a (stack) based
980 * buffer to 'allocate' dynamic memory. (replaces malloc() and free() calls)
981 *
982 * Module: library/memory_buffer_alloc.c
983 *
984 * Requires: POLARSSL_MEMORY_C
985 *
986 * Enable this module to enable the buffer memory allocator.
987#define POLARSSL_MEMORY_BUFFER_ALLOC_C
988 */
989
990/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000991 * \def POLARSSL_NET_C
992 *
993 * Enable the TCP/IP networking routines.
994 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000995 * Module: library/net.c
996 * Caller:
997 *
998 * This module provides TCP/IP networking routines.
999 */
Paul Bakker40e46942009-01-03 21:51:57 +00001000#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001001
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001002/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001003 * \def POLARSSL_OID_C
1004 *
1005 * Enable the OID database
1006 *
1007 * Module: library/oid.c
1008 * Caller: library/rsa.c
1009 * library/x509parse.c
1010 * library/x509write.c
1011 *
1012 * This modules translates between OIDs and internal values.
1013 */
1014#define POLARSSL_OID_C
1015
1016/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001017 * \def POLARSSL_PADLOCK_C
1018 *
1019 * Enable VIA Padlock support on x86.
1020 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001021 * Module: library/padlock.c
1022 * Caller: library/aes.c
1023 *
1024 * This modules adds support for the VIA PadLock on x86.
1025 */
Paul Bakker40e46942009-01-03 21:51:57 +00001026#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001027
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001028/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001029 * \def POLARSSL_PBKDF2_C
1030 *
1031 * Enable PKCS#5 PBKDF2 key derivation function
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001032 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001033 *
1034 * Module: library/pbkdf2.c
1035 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001036 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001037 *
1038 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001039 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001040#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001041
1042/**
Paul Bakker96743fc2011-02-12 14:30:57 +00001043 * \def POLARSSL_PEM_C
1044 *
1045 * Enable PEM decoding
1046 *
1047 * Module: library/pem.c
1048 * Caller: library/x509parse.c
1049 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001050 * Requires: POLARSSL_BASE64_C
1051 *
Paul Bakker96743fc2011-02-12 14:30:57 +00001052 * This modules adds support for decoding PEM files.
1053 */
1054#define POLARSSL_PEM_C
1055
1056/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001057 * \def POLARSSL_PKCS5_C
1058 *
1059 * Enable PKCS#5 functions
1060 *
1061 * Module: library/pkcs5.c
1062 *
1063 * Requires: POLARSSL_MD_C
1064 *
1065 * This module adds support for the PKCS#5 functions.
1066 */
1067#define POLARSSL_PKCS5_C
1068
1069/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001070 * \def POLARSSL_PKCS11_C
1071 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001072 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001073 *
1074 * Module: library/ssl_srv.c
1075 * Caller: library/ssl_cli.c
1076 * library/ssl_srv.c
1077 *
1078 * Requires: POLARSSL_SSL_TLS_C
1079 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001080 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001081 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1082#define POLARSSL_PKCS11_C
1083 */
1084
1085/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001086 * \def POLARSSL_PKCS12_C
1087 *
1088 * Enable PKCS#12 PBE functions
1089 * Adds algorithms for parsing PKCS#8 encrypted private keys
1090 *
1091 * Module: library/pkcs12.c
1092 * Caller: library/x509parse.c
1093 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001094 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1095 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001096 *
1097 * This module enables PKCS#12 functions.
1098 */
1099#define POLARSSL_PKCS12_C
1100
1101/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001102 * \def POLARSSL_RSA_C
1103 *
1104 * Enable the RSA public-key cryptosystem.
1105 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001106 * Module: library/rsa.c
1107 * Caller: library/ssl_cli.c
1108 * library/ssl_srv.c
1109 * library/ssl_tls.c
1110 * library/x509.c
1111 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001112 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001113 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001114 * This module is required for SSL/TLS and MD5-signed certificates.
1115 */
Paul Bakker40e46942009-01-03 21:51:57 +00001116#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001117
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001118/**
1119 * \def POLARSSL_SHA1_C
1120 *
1121 * Enable the SHA1 cryptographic hash algorithm.
1122 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001123 * Module: library/sha1.c
1124 * Caller: library/ssl_cli.c
1125 * library/ssl_srv.c
1126 * library/ssl_tls.c
1127 * library/x509parse.c
1128 *
1129 * This module is required for SSL/TLS and SHA1-signed certificates.
1130 */
Paul Bakker40e46942009-01-03 21:51:57 +00001131#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001132
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001133/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001134 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001135 *
1136 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001137 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001138 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001139 * Module: library/sha256.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001140 * Caller: library/md_wrap.c
1141 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001142 *
1143 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001144 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001145 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001146#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001147
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001148/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001149 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001150 *
1151 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001152 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001153 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001154 * Module: library/sha512.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001155 * Caller: library/md_wrap.c
1156 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001157 *
1158 * This module adds support for SHA-384 and SHA-512.
1159 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001160#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001161
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001162/**
Paul Bakker0a597072012-09-25 21:55:46 +00001163 * \def POLARSSL_SSL_CACHE_C
1164 *
1165 * Enable simple SSL cache implementation.
1166 *
1167 * Module: library/ssl_cache.c
1168 * Caller:
1169 *
1170 * Requires: POLARSSL_SSL_CACHE_C
1171 */
1172#define POLARSSL_SSL_CACHE_C
1173
1174/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001175 * \def POLARSSL_SSL_CLI_C
1176 *
1177 * Enable the SSL/TLS client code.
1178 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001179 * Module: library/ssl_cli.c
1180 * Caller:
1181 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001182 * Requires: POLARSSL_SSL_TLS_C
1183 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001184 * This module is required for SSL/TLS client support.
1185 */
Paul Bakker40e46942009-01-03 21:51:57 +00001186#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001187
Paul Bakker9a736322012-11-14 12:39:52 +00001188/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001189 * \def POLARSSL_SSL_SRV_C
1190 *
1191 * Enable the SSL/TLS server code.
1192 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001193 * Module: library/ssl_srv.c
1194 * Caller:
1195 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001196 * Requires: POLARSSL_SSL_TLS_C
1197 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001198 * This module is required for SSL/TLS server support.
1199 */
Paul Bakker40e46942009-01-03 21:51:57 +00001200#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001201
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001202/**
1203 * \def POLARSSL_SSL_TLS_C
1204 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001205 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001206 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001207 * Module: library/ssl_tls.c
1208 * Caller: library/ssl_cli.c
1209 * library/ssl_srv.c
1210 *
Paul Bakker7ad00f92013-04-18 23:05:25 +02001211 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001212 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001213 * This module is required for SSL/TLS.
1214 */
Paul Bakker40e46942009-01-03 21:51:57 +00001215#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001216
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001217/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001218 * \def POLARSSL_TIMING_C
1219 *
1220 * Enable the portable timing interface.
1221 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001222 * Module: library/timing.c
1223 * Caller: library/havege.c
1224 *
1225 * This module is used by the HAVEGE random number generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001226#define POLARSSL_TIMING_C
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001227 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001228
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001229/**
1230 * \def POLARSSL_VERSION_C
1231 *
1232 * Enable run-time version information.
1233 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001234 * Module: library/version.c
1235 *
1236 * This module provides run-time version information.
1237 */
1238#define POLARSSL_VERSION_C
1239
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001240/**
1241 * \def POLARSSL_X509_PARSE_C
1242 *
1243 * Enable X.509 certificate parsing.
1244 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001245 * Module: library/x509parse.c
1246 * Caller: library/ssl_cli.c
1247 * library/ssl_srv.c
1248 * library/ssl_tls.c
1249 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001250 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
1251 * POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001252 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001253 * This module is required for X.509 certificate parsing.
1254 */
Paul Bakker40e46942009-01-03 21:51:57 +00001255#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001256
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001257/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001258 * \def POLARSSL_X509_WRITE_C
1259 *
1260 * Enable X.509 buffer writing.
1261 *
1262 * Module: library/x509write.c
1263 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001264 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001265 *
1266 * This module is required for X.509 certificate request writing.
1267 */
1268#define POLARSSL_X509_WRITE_C
1269
1270/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001271 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001272 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001273 * Enable the XTEA block cipher.
1274 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001275 * Module: library/xtea.c
1276 * Caller:
1277 */
1278#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001279
Paul Bakker0a62cd12011-01-21 11:00:08 +00001280/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001281
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001282/**
1283 * \name SECTION: Module configuration options
1284 *
1285 * This section allows for the setting of module specific sizes and
1286 * configuration options. The default values are already present in the
1287 * relevant header files and should suffice for the regular use cases.
1288 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1289 * only if you have a good reason and know the consequences.
1290 *
1291 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1292 * header file take precedence.
1293 *
1294 * Please check the respective header file for documentation on these
1295 * parameters (to prevent duplicate documentation).
1296 *
1297 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1298 * \{
1299 */
1300//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1301
1302#if defined(POLARSSL_CONFIG_OPTIONS)
1303
1304// MPI / BIGNUM options
1305//
1306#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1307#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1308
1309// CTR_DRBG options
1310//
1311#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default */
1312#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1313#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1314#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1315#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1316
1317// Entropy options
1318//
1319#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1320#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1321
Paul Bakker6e339b52013-07-03 13:37:05 +02001322// Memory options
1323#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1324#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1325#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1326
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001327// SSL Cache options
1328//
1329#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1330#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1331
1332// SSL options
1333//
1334#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001335#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001336
1337#endif /* POLARSSL_CONFIG_OPTIONS */
1338
1339/* \} name */
1340
Paul Bakker7ad00f92013-04-18 23:05:25 +02001341/*
1342 * Sanity checks on defines and dependencies
1343 */
1344#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1345#error "POLARSSL_DHM_C defined, but not all prerequisites"
1346#endif
1347
1348#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1349#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1350#endif
1351
1352#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1353#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1354#endif
1355
1356#if defined(POLARSSL_ECDSA_C) && !defined(POLARSSL_ECP_C)
1357#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1358#endif
1359
1360#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1361#error "POLARSSL_ECP_C defined, but not all prerequisites"
1362#endif
1363
Paul Bakker9e36f042013-06-30 14:34:05 +02001364#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001365#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1366#endif
1367
1368#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1369#error "POLARSSL_GCM_C defined, but not all prerequisites"
1370#endif
1371
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001372#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1373#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1374#endif
1375
Paul Bakkere07f41d2013-04-19 09:08:57 +02001376#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1377#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1378#endif
1379
1380#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1381 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
1382 !defined(POLARSSL_X509_PARSE_C) )
1383#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1384#endif
1385
1386#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1387 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
1388 !defined(POLARSSL_X509_PARSE_C) )
1389#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1390#endif
1391
1392#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
1393 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1394#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1395#endif
1396
1397#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
1398 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1399#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1400#endif
1401
Paul Bakker6e339b52013-07-03 13:37:05 +02001402#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1403#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1404#endif
1405
Paul Bakker7ad00f92013-04-18 23:05:25 +02001406#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1407#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1408#endif
1409
1410#if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C)
1411#error "POLARSSL_PEM_C defined, but not all prerequisites"
1412#endif
1413
1414#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_SSL_TLS_C)
1415#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1416#endif
1417
1418#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1419 !defined(POLARSSL_OID_C) )
1420#error "POLARSSL_RSA_C defined, but not all prerequisites"
1421#endif
1422
1423#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1424#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1425#endif
1426
1427#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_MD5_C) || \
1428 !defined(POLARSSL_SHA1_C) )
1429#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1430#endif
1431
1432#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1433#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1434#endif
1435
1436#if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1437 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
1438 !defined(POLARSSL_RSA_C) )
1439#error "POLARSSL_X509_PARSE_C defined, but not all prerequisites"
1440#endif
1441
1442#if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1443 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1444 !defined(POLARSSL_RSA_C) )
1445#error "POLARSSL_X509_WRITE_C defined, but not all prerequisites"
1446#endif
1447
Paul Bakker5121ce52009-01-03 21:22:43 +00001448#endif /* config.h */