blob: 119dc67eac5dce07f9540963de2d686fe0687c9b [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 Bakker05decb22013-08-15 13:33:48 +0200532 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
533 *
534 * Enable support for RFC 6066 max_fragment_length extension in SSL
535 *
536 * Comment this macro to disable support for the max_fragment_length extension
537 */
538#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
539
540/**
Paul Bakkera503a632013-08-14 13:48:06 +0200541 * \def POLARSSL_SSL_SESSION_TICKETS
542 *
543 * Enable support for RFC 5077 session tickets in SSL
544 *
545 * Requires: POLARSSL_AES_C
546 * POLARSSL_SHA256_C
547 *
548 * Comment this macro to disable support for SSL session tickets
549 */
550#define POLARSSL_SSL_SESSION_TICKETS
551
552/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200553 * \def POLARSSL_SSL_TRUNCATED_HMAC
554 *
555 * Enable support for RFC 6066 truncated HMAC in SSL
556 *
557 * Comment this macro to disable support for truncated HMAC in SSL
558 */
559#define POLARSSL_SSL_TRUNCATED_HMAC
560
561/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000562 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
563 *
564 * If set, the X509 parser will not break-off when parsing an X509 certificate
565 * and encountering an unknown critical extension.
566 *
567 * Uncomment to prevent an error.
568 *
569#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
570 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000571
572/**
573 * \def POLARSSL_ZLIB_SUPPORT
574 *
575 * If set, the SSL/TLS module uses ZLIB to support compression and
576 * decompression of packet data.
577 *
578 * Used in: library/ssl_tls.c
579 * library/ssl_cli.c
580 * library/ssl_srv.c
581 *
582 * This feature requires zlib library and headers to be present.
583 *
584 * Uncomment to enable use of ZLIB
585#define POLARSSL_ZLIB_SUPPORT
586 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000587/* \} name */
588
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000589/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000590 * \name SECTION: PolarSSL modules
591 *
592 * This section enables or disables entire modules in PolarSSL
593 * \{
594 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000595
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000596/**
597 * \def POLARSSL_AES_C
598 *
599 * Enable the AES block cipher.
600 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000601 * Module: library/aes.c
602 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000603 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000604 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000605 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000606 * This module enables the following ciphersuites (if other requisites are
607 * enabled as well):
608 * TLS_RSA_WITH_AES_128_CBC_SHA
609 * TLS_RSA_WITH_AES_256_CBC_SHA
610 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
611 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
612 * TLS_RSA_WITH_AES_128_CBC_SHA256
613 * TLS_RSA_WITH_AES_256_CBC_SHA256
614 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
615 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
616 * TLS_RSA_WITH_AES_128_GCM_SHA256
617 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100618 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
619 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200620 * TLS_PSK_WITH_AES_128_CBC_SHA
621 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100622 *
623 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000624 */
Paul Bakker40e46942009-01-03 21:51:57 +0000625#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000626
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000627/**
628 * \def POLARSSL_ARC4_C
629 *
630 * Enable the ARCFOUR stream cipher.
631 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000632 * Module: library/arc4.c
633 * Caller: library/ssl_tls.c
634 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100635 * This module enables the following ciphersuites (if other requisites are
636 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000637 * TLS_RSA_WITH_RC4_128_MD5
638 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100639 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200640 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000641 */
Paul Bakker40e46942009-01-03 21:51:57 +0000642#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000643
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000644/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000645 * \def POLARSSL_ASN1_PARSE_C
646 *
647 * Enable the generic ASN1 parser.
648 *
649 * Module: library/asn1.c
650 * Caller: library/x509parse.c
651 */
652#define POLARSSL_ASN1_PARSE_C
653
654/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000655 * \def POLARSSL_ASN1_WRITE_C
656 *
657 * Enable the generic ASN1 writer.
658 *
659 * Module: library/asn1write.c
660 */
661#define POLARSSL_ASN1_WRITE_C
662
663/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000664 * \def POLARSSL_BASE64_C
665 *
666 * Enable the Base64 module.
667 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000668 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000669 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000670 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000671 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000672 */
Paul Bakker40e46942009-01-03 21:51:57 +0000673#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000674
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000675/**
676 * \def POLARSSL_BIGNUM_C
677 *
Paul Bakker9a736322012-11-14 12:39:52 +0000678 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000679 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000680 * Module: library/bignum.c
681 * Caller: library/dhm.c
682 * library/rsa.c
683 * library/ssl_tls.c
684 * library/x509parse.c
685 *
686 * This module is required for RSA and DHM support.
687 */
Paul Bakker40e46942009-01-03 21:51:57 +0000688#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000689
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000690/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000691 * \def POLARSSL_BLOWFISH_C
692 *
693 * Enable the Blowfish block cipher.
694 *
695 * Module: library/blowfish.c
696 */
697#define POLARSSL_BLOWFISH_C
698
699/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000700 * \def POLARSSL_CAMELLIA_C
701 *
702 * Enable the Camellia block cipher.
703 *
Paul Bakker38119b12009-01-10 23:31:23 +0000704 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000705 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000706 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000707 * This module enables the following ciphersuites (if other requisites are
708 * enabled as well):
709 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
710 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
711 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
712 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
713 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
714 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
715 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
716 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000717 */
718#define POLARSSL_CAMELLIA_C
719
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000720/**
721 * \def POLARSSL_CERTS_C
722 *
723 * Enable the test certificates.
724 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000725 * Module: library/certs.c
726 * Caller:
727 *
728 * This module is used for testing (ssl_client/server).
729 */
Paul Bakker40e46942009-01-03 21:51:57 +0000730#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000731
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000732/**
733 * \def POLARSSL_CIPHER_C
734 *
735 * Enable the generic cipher layer.
736 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000737 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200738 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000739 *
740 * Uncomment to enable generic cipher wrappers.
741 */
742#define POLARSSL_CIPHER_C
743
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000744/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000745 * \def POLARSSL_CTR_DRBG_C
746 *
747 * Enable the CTR_DRBG AES-256-based random generator
748 *
749 * Module: library/ctr_drbg.c
750 * Caller:
751 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000752 * Requires: POLARSSL_AES_C
753 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000754 * This module provides the CTR_DRBG AES-256 random number generator.
755 */
756#define POLARSSL_CTR_DRBG_C
757
758/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000759 * \def POLARSSL_DEBUG_C
760 *
761 * Enable the debug functions.
762 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000763 * Module: library/debug.c
764 * Caller: library/ssl_cli.c
765 * library/ssl_srv.c
766 * library/ssl_tls.c
767 *
768 * This module provides debugging functions.
769 */
Paul Bakker40e46942009-01-03 21:51:57 +0000770#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000771
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000772/**
773 * \def POLARSSL_DES_C
774 *
775 * Enable the DES block cipher.
776 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000777 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100778 * Caller: library/pem.c
779 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000780 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000781 * This module enables the following ciphersuites (if other requisites are
782 * enabled as well):
783 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
784 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100785 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200786 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100787 *
788 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000789 */
Paul Bakker40e46942009-01-03 21:51:57 +0000790#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000791
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000792/**
793 * \def POLARSSL_DHM_C
794 *
795 * Enable the Diffie-Hellman-Merkle key exchange.
796 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000797 * Module: library/dhm.c
798 * Caller: library/ssl_cli.c
799 * library/ssl_srv.c
800 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000801 * This module enables the following ciphersuites (if other requisites are
802 * enabled as well):
803 * TLS_DHE_RSA_WITH_DES_CBC_SHA
804 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
805 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
806 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
807 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
808 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
809 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
810 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
811 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
812 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
813 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
814 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000815 */
Paul Bakker40e46942009-01-03 21:51:57 +0000816#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000817
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000818/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100819 * \def POLARSSL_ECDH_C
820 *
821 * Enable the elliptic curve Diffie-Hellman library.
822 *
823 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100824 * Caller: library/ssl_cli.c
825 * library/ssl_srv.c
826 *
827 * This module enables the following ciphersuites (if other requisites are
828 * enabled as well):
829 * TLS_ECDHE_RSA_WITH_NULL_SHA
830 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
831 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
832 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
833 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100834 *
835 * Requires: POLARSSL_ECP_C
836 */
837#define POLARSSL_ECDH_C
838
839/**
840 * \def POLARSSL_ECDSA_C
841 *
842 * Enable the elliptic curve DSA library.
843 *
844 * Module: library/ecdsa.c
845 * Caller:
846 *
847 * Requires: POLARSSL_ECP_C
848 */
849#define POLARSSL_ECDSA_C
850
851/**
852 * \def POLARSSL_ECP_C
853 *
854 * Enable the elliptic curve over GF(p) library.
855 *
856 * Module: library/ecp.c
857 * Caller: library/ecdh.c
858 * library/ecdsa.c
859 *
860 * Requires: POLARSSL_BIGNUM_C
861 */
862#define POLARSSL_ECP_C
863
864/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000865 * \def POLARSSL_ENTROPY_C
866 *
867 * Enable the platform-specific entropy code.
868 *
869 * Module: library/entropy.c
870 * Caller:
871 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200872 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000873 *
874 * This module provides a generic entropy pool
875 */
876#define POLARSSL_ENTROPY_C
877
878/**
Paul Bakker9d781402011-05-09 16:17:09 +0000879 * \def POLARSSL_ERROR_C
880 *
881 * Enable error code to error string conversion.
882 *
883 * Module: library/error.c
884 * Caller:
885 *
886 * This module enables err_strerror().
887 */
888#define POLARSSL_ERROR_C
889
890/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000891 * \def POLARSSL_GCM_C
892 *
893 * Enable the Galois/Counter Mode (GCM) for AES
894 *
895 * Module: library/gcm.c
896 *
897 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000898 *
899 * This module enables the following ciphersuites (if other requisites are
900 * enabled as well):
901 * TLS_RSA_WITH_AES_128_GCM_SHA256
902 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000903 */
904#define POLARSSL_GCM_C
905
906/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000907 * \def POLARSSL_HAVEGE_C
908 *
909 * Enable the HAVEGE random generator.
910 *
Paul Bakker2a844242013-06-24 13:01:53 +0200911 * Warning: the HAVEGE random generator is not suitable for virtualized
912 * environments
913 *
914 * Warning: the HAVEGE random generator is dependent on timing and specific
915 * processor traits. It is therefore not advised to use HAVEGE as
916 * your applications primary random generator or primary entropy pool
917 * input. As a secondary input to your entropy pool, it IS able add
918 * the (limited) extra entropy it provides.
919 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000920 * Module: library/havege.c
921 * Caller:
922 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000923 * Requires: POLARSSL_TIMING_C
924 *
Paul Bakker2a844242013-06-24 13:01:53 +0200925 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +0000926#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +0200927 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000928
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000929/**
930 * \def POLARSSL_MD_C
931 *
932 * Enable the generic message digest layer.
933 *
Paul Bakker17373852011-01-06 14:20:01 +0000934 * Module: library/md.c
935 * Caller:
936 *
937 * Uncomment to enable generic message digest wrappers.
938 */
939#define POLARSSL_MD_C
940
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000941/**
942 * \def POLARSSL_MD2_C
943 *
944 * Enable the MD2 hash algorithm
945 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000946 * Module: library/md2.c
947 * Caller: library/x509parse.c
948 *
949 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
950 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000951#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000952 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000953
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000954/**
955 * \def POLARSSL_MD4_C
956 *
957 * Enable the MD4 hash algorithm
958 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000959 * Module: library/md4.c
960 * Caller: library/x509parse.c
961 *
962 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
963 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000964#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000965 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000966
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000967/**
968 * \def POLARSSL_MD5_C
969 *
970 * Enable the MD5 hash algorithm
971 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000972 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100973 * Caller: library/pem.c
974 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000975 * library/x509parse.c
976 *
977 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100978 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000979 */
Paul Bakker40e46942009-01-03 21:51:57 +0000980#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000981
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000982/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200983 * \def POLARSSL_MEMORY_C
984 *
985 * Enable the memory allocation layer.
986 * By default PolarSSL uses the system-provided malloc() and free().
987 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
988 * are defined and unmodified)
989 *
990 * This allows different allocators (self-implemented or provided)
991 *
992 * Enable this layer to allow use of alternative memory allocators.
993#define POLARSSL_MEMORY_C
994 */
995
996/**
997 * The buffer allocator implementation that makes use of a (stack) based
998 * buffer to 'allocate' dynamic memory. (replaces malloc() and free() calls)
999 *
1000 * Module: library/memory_buffer_alloc.c
1001 *
1002 * Requires: POLARSSL_MEMORY_C
1003 *
1004 * Enable this module to enable the buffer memory allocator.
1005#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1006 */
1007
1008/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001009 * \def POLARSSL_NET_C
1010 *
1011 * Enable the TCP/IP networking routines.
1012 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001013 * Module: library/net.c
1014 * Caller:
1015 *
1016 * This module provides TCP/IP networking routines.
1017 */
Paul Bakker40e46942009-01-03 21:51:57 +00001018#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001019
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001020/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001021 * \def POLARSSL_OID_C
1022 *
1023 * Enable the OID database
1024 *
1025 * Module: library/oid.c
1026 * Caller: library/rsa.c
1027 * library/x509parse.c
1028 * library/x509write.c
1029 *
1030 * This modules translates between OIDs and internal values.
1031 */
1032#define POLARSSL_OID_C
1033
1034/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001035 * \def POLARSSL_PADLOCK_C
1036 *
1037 * Enable VIA Padlock support on x86.
1038 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001039 * Module: library/padlock.c
1040 * Caller: library/aes.c
1041 *
1042 * This modules adds support for the VIA PadLock on x86.
1043 */
Paul Bakker40e46942009-01-03 21:51:57 +00001044#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001045
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001046/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001047 * \def POLARSSL_PBKDF2_C
1048 *
1049 * Enable PKCS#5 PBKDF2 key derivation function
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001050 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001051 *
1052 * Module: library/pbkdf2.c
1053 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001054 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001055 *
1056 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001057 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001058#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001059
1060/**
Paul Bakker96743fc2011-02-12 14:30:57 +00001061 * \def POLARSSL_PEM_C
1062 *
1063 * Enable PEM decoding
1064 *
1065 * Module: library/pem.c
1066 * Caller: library/x509parse.c
1067 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001068 * Requires: POLARSSL_BASE64_C
1069 *
Paul Bakker96743fc2011-02-12 14:30:57 +00001070 * This modules adds support for decoding PEM files.
1071 */
1072#define POLARSSL_PEM_C
1073
1074/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001075 * \def POLARSSL_PKCS5_C
1076 *
1077 * Enable PKCS#5 functions
1078 *
1079 * Module: library/pkcs5.c
1080 *
1081 * Requires: POLARSSL_MD_C
1082 *
1083 * This module adds support for the PKCS#5 functions.
1084 */
1085#define POLARSSL_PKCS5_C
1086
1087/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001088 * \def POLARSSL_PKCS11_C
1089 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001090 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001091 *
1092 * Module: library/ssl_srv.c
1093 * Caller: library/ssl_cli.c
1094 * library/ssl_srv.c
1095 *
1096 * Requires: POLARSSL_SSL_TLS_C
1097 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001098 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001099 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1100#define POLARSSL_PKCS11_C
1101 */
1102
1103/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001104 * \def POLARSSL_PKCS12_C
1105 *
1106 * Enable PKCS#12 PBE functions
1107 * Adds algorithms for parsing PKCS#8 encrypted private keys
1108 *
1109 * Module: library/pkcs12.c
1110 * Caller: library/x509parse.c
1111 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001112 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1113 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001114 *
1115 * This module enables PKCS#12 functions.
1116 */
1117#define POLARSSL_PKCS12_C
1118
1119/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001120 * \def POLARSSL_RSA_C
1121 *
1122 * Enable the RSA public-key cryptosystem.
1123 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001124 * Module: library/rsa.c
1125 * Caller: library/ssl_cli.c
1126 * library/ssl_srv.c
1127 * library/ssl_tls.c
1128 * library/x509.c
1129 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001130 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001131 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001132 * This module is required for SSL/TLS and MD5-signed certificates.
1133 */
Paul Bakker40e46942009-01-03 21:51:57 +00001134#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001135
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001136/**
1137 * \def POLARSSL_SHA1_C
1138 *
1139 * Enable the SHA1 cryptographic hash algorithm.
1140 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001141 * Module: library/sha1.c
1142 * Caller: library/ssl_cli.c
1143 * library/ssl_srv.c
1144 * library/ssl_tls.c
1145 * library/x509parse.c
1146 *
1147 * This module is required for SSL/TLS and SHA1-signed certificates.
1148 */
Paul Bakker40e46942009-01-03 21:51:57 +00001149#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001150
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001151/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001152 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001153 *
1154 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001155 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001156 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001157 * Module: library/sha256.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001158 * Caller: library/md_wrap.c
1159 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001160 *
1161 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001162 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001163 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001164#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001165
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001166/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001167 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001168 *
1169 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001170 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001171 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001172 * Module: library/sha512.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001173 * Caller: library/md_wrap.c
1174 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001175 *
1176 * This module adds support for SHA-384 and SHA-512.
1177 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001178#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001179
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001180/**
Paul Bakker0a597072012-09-25 21:55:46 +00001181 * \def POLARSSL_SSL_CACHE_C
1182 *
1183 * Enable simple SSL cache implementation.
1184 *
1185 * Module: library/ssl_cache.c
1186 * Caller:
1187 *
1188 * Requires: POLARSSL_SSL_CACHE_C
1189 */
1190#define POLARSSL_SSL_CACHE_C
1191
1192/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001193 * \def POLARSSL_SSL_CLI_C
1194 *
1195 * Enable the SSL/TLS client code.
1196 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001197 * Module: library/ssl_cli.c
1198 * Caller:
1199 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001200 * Requires: POLARSSL_SSL_TLS_C
1201 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001202 * This module is required for SSL/TLS client support.
1203 */
Paul Bakker40e46942009-01-03 21:51:57 +00001204#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001205
Paul Bakker9a736322012-11-14 12:39:52 +00001206/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001207 * \def POLARSSL_SSL_SRV_C
1208 *
1209 * Enable the SSL/TLS server code.
1210 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001211 * Module: library/ssl_srv.c
1212 * Caller:
1213 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001214 * Requires: POLARSSL_SSL_TLS_C
1215 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001216 * This module is required for SSL/TLS server support.
1217 */
Paul Bakker40e46942009-01-03 21:51:57 +00001218#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001219
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001220/**
1221 * \def POLARSSL_SSL_TLS_C
1222 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001223 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001224 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001225 * Module: library/ssl_tls.c
1226 * Caller: library/ssl_cli.c
1227 * library/ssl_srv.c
1228 *
Paul Bakker04784f52013-08-19 13:30:57 +02001229 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C, POLARSSL_CIPHER_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001230 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001231 * This module is required for SSL/TLS.
1232 */
Paul Bakker40e46942009-01-03 21:51:57 +00001233#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001234
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001235/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001236 * \def POLARSSL_TIMING_C
1237 *
1238 * Enable the portable timing interface.
1239 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001240 * Module: library/timing.c
1241 * Caller: library/havege.c
1242 *
1243 * This module is used by the HAVEGE random number generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001244#define POLARSSL_TIMING_C
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001245 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001246
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001247/**
1248 * \def POLARSSL_VERSION_C
1249 *
1250 * Enable run-time version information.
1251 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001252 * Module: library/version.c
1253 *
1254 * This module provides run-time version information.
1255 */
1256#define POLARSSL_VERSION_C
1257
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001258/**
1259 * \def POLARSSL_X509_PARSE_C
1260 *
1261 * Enable X.509 certificate parsing.
1262 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001263 * Module: library/x509parse.c
1264 * Caller: library/ssl_cli.c
1265 * library/ssl_srv.c
1266 * library/ssl_tls.c
1267 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001268 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
1269 * POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001270 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001271 * This module is required for X.509 certificate parsing.
1272 */
Paul Bakker40e46942009-01-03 21:51:57 +00001273#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001274
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001275/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001276 * \def POLARSSL_X509_WRITE_C
1277 *
1278 * Enable X.509 buffer writing.
1279 *
1280 * Module: library/x509write.c
1281 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001282 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001283 *
1284 * This module is required for X.509 certificate request writing.
1285 */
1286#define POLARSSL_X509_WRITE_C
1287
1288/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001289 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001290 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001291 * Enable the XTEA block cipher.
1292 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001293 * Module: library/xtea.c
1294 * Caller:
1295 */
1296#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001297
Paul Bakker0a62cd12011-01-21 11:00:08 +00001298/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001299
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001300/**
1301 * \name SECTION: Module configuration options
1302 *
1303 * This section allows for the setting of module specific sizes and
1304 * configuration options. The default values are already present in the
1305 * relevant header files and should suffice for the regular use cases.
1306 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1307 * only if you have a good reason and know the consequences.
1308 *
1309 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1310 * header file take precedence.
1311 *
1312 * Please check the respective header file for documentation on these
1313 * parameters (to prevent duplicate documentation).
1314 *
1315 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1316 * \{
1317 */
1318//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1319
1320#if defined(POLARSSL_CONFIG_OPTIONS)
1321
1322// MPI / BIGNUM options
1323//
1324#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1325#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1326
1327// CTR_DRBG options
1328//
1329#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default */
1330#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1331#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1332#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1333#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1334
1335// Entropy options
1336//
1337#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1338#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1339
Paul Bakker6e339b52013-07-03 13:37:05 +02001340// Memory options
1341#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1342#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1343#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1344
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001345// SSL Cache options
1346//
1347#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1348#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1349
1350// SSL options
1351//
1352#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001353#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001354
1355#endif /* POLARSSL_CONFIG_OPTIONS */
1356
1357/* \} name */
1358
Paul Bakker7ad00f92013-04-18 23:05:25 +02001359/*
1360 * Sanity checks on defines and dependencies
1361 */
1362#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1363#error "POLARSSL_DHM_C defined, but not all prerequisites"
1364#endif
1365
1366#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1367#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1368#endif
1369
1370#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1371#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1372#endif
1373
1374#if defined(POLARSSL_ECDSA_C) && !defined(POLARSSL_ECP_C)
1375#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1376#endif
1377
1378#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1379#error "POLARSSL_ECP_C defined, but not all prerequisites"
1380#endif
1381
Paul Bakker9e36f042013-06-30 14:34:05 +02001382#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001383#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1384#endif
1385
1386#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1387#error "POLARSSL_GCM_C defined, but not all prerequisites"
1388#endif
1389
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001390#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1391#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1392#endif
1393
Paul Bakkere07f41d2013-04-19 09:08:57 +02001394#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1395#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1396#endif
1397
1398#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1399 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
1400 !defined(POLARSSL_X509_PARSE_C) )
1401#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1402#endif
1403
1404#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1405 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
1406 !defined(POLARSSL_X509_PARSE_C) )
1407#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1408#endif
1409
1410#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
1411 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1412#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1413#endif
1414
1415#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
1416 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1417#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1418#endif
1419
Paul Bakker6e339b52013-07-03 13:37:05 +02001420#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1421#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1422#endif
1423
Paul Bakker7ad00f92013-04-18 23:05:25 +02001424#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1425#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1426#endif
1427
1428#if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C)
1429#error "POLARSSL_PEM_C defined, but not all prerequisites"
1430#endif
1431
1432#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_SSL_TLS_C)
1433#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1434#endif
1435
1436#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1437 !defined(POLARSSL_OID_C) )
1438#error "POLARSSL_RSA_C defined, but not all prerequisites"
1439#endif
1440
1441#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1442#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1443#endif
1444
1445#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_MD5_C) || \
Paul Bakker04784f52013-08-19 13:30:57 +02001446 !defined(POLARSSL_SHA1_C) || !defined(POLARSSL_CIPHER_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001447#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1448#endif
1449
1450#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1451#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1452#endif
1453
Paul Bakker59da0a42013-08-19 13:27:17 +02001454#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
1455 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) )
1456#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1457#endif
1458
Paul Bakker7ad00f92013-04-18 23:05:25 +02001459#if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1460 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
1461 !defined(POLARSSL_RSA_C) )
1462#error "POLARSSL_X509_PARSE_C defined, but not all prerequisites"
1463#endif
1464
1465#if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1466 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1467 !defined(POLARSSL_RSA_C) )
1468#error "POLARSSL_X509_WRITE_C defined, but not all prerequisites"
1469#endif
1470
Paul Bakker5121ce52009-01-03 21:22:43 +00001471#endif /* config.h */