blob: 5742fe59bebcf68193a66b410cb05a3727cc2f3f [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 Bakkerfab5c822012-02-06 16:45:10 +0000197 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
198 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000199 * Enable weak ciphersuites in SSL / TLS
Paul Bakkerfab5c822012-02-06 16:45:10 +0000200 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000201 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000202 *
203 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000204 * TLS_RSA_WITH_DES_CBC_SHA
205 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000206 *
207 * Uncomment this macro to enable weak ciphersuites
208#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
209 */
210
211/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200212 * \def POLARSSL_ECP_XXXX_ENABLED
213 *
214 * Enables specific curves within the Elliptic Curve module.
215 * By default all supported curves are enables.
216 *
217 * Comment macros to disable the curve and functions for it
218 */
219#define POLARSSL_ECP_DP_SECP192R1_ENABLED
220#define POLARSSL_ECP_DP_SECP224R1_ENABLED
221#define POLARSSL_ECP_DP_SECP256R1_ENABLED
222#define POLARSSL_ECP_DP_SECP384R1_ENABLED
223#define POLARSSL_ECP_DP_SECP521R1_ENABLED
224
225/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200226 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
227 *
228 * Enable the PSK based ciphersuite modes in SSL / TLS
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200229 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200230 * This enables the following ciphersuites (if other requisites are
231 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200232 * TLS_PSK_WITH_RC4_128_SHA
233 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
234 * TLS_PSK_WITH_AES_128_CBC_SHA
235 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200236 * TLS_PSK_WITH_AES_128_CBC_SHA256
237 * TLS_PSK_WITH_AES_256_CBC_SHA384
238 * TLS_PSK_WITH_AES_128_GCM_SHA256
239 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200240 */
241#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
242
243/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200244 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
245 *
246 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS
247 *
248 * Requires: POLARSSL_DHM_C
249 *
250 * This enables the following ciphersuites (if other requisites are
251 * enabled as well):
252 * TLS_DHE_PSK_WITH_RC4_128_SHA
253 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
254 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
255 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200256 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
257 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
258 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
259 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200260 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200261#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200262
263/**
264 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
265 *
266 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS
Paul Bakker45bda902013-04-19 22:28:21 +0200267 * (NOT YET IMPLEMENTED)
Paul Bakkere07f41d2013-04-19 09:08:57 +0200268 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
269 *
270 * This enables the following ciphersuites (if other requisites are
271 * enabled as well):
272 * TLS_RSA_PSK_WITH_RC4_128_SHA
273 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
274 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
275 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200276 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
277 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
278 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
279 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200280#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
281 */
282
283/**
284 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
285 *
286 * Enable the RSA-only based ciphersuite modes in SSL / TLS
287 *
288 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
289 *
290 * This enables the following ciphersuites (if other requisites are
291 * enabled as well):
292 * TLS_RSA_WITH_AES_128_CBC_SHA
293 * TLS_RSA_WITH_AES_256_CBC_SHA
294 * TLS_RSA_WITH_AES_128_CBC_SHA256
295 * TLS_RSA_WITH_AES_256_CBC_SHA256
296 * TLS_RSA_WITH_AES_128_GCM_SHA256
297 * TLS_RSA_WITH_AES_256_GCM_SHA384
298 * TLS_RSA_WITH_RC4_128_MD5
299 * TLS_RSA_WITH_RC4_128_SHA
300 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
301 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
302 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
303 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
304 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
305 */
306#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
307
308/**
309 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
310 *
311 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS
312 *
313 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
314 *
315 * This enables the following ciphersuites (if other requisites are
316 * enabled as well):
317 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
318 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
319 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
320 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
321 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
322 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
323 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
324 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
325 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
326 */
327#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
328
329/**
330 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
331 *
332 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS
333 *
334 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
335 *
336 * This enables the following ciphersuites (if other requisites are
337 * enabled as well):
338 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
339 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
340 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
341 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
342 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
343 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
344 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
345 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
346 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
347 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
348 */
349#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
350
351/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200352 * \def POLARSSL_ERROR_STRERROR_BC
353 *
354 * Make available the backward compatible error_strerror() next to the
355 * current polarssl_strerror().
356 *
357 * Disable if you run into name conflicts and want to really remove the
358 * error_strerror()
359 */
360#define POLARSSL_ERROR_STRERROR_BC
361
362/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100363 * \def POLARSSL_ERROR_STRERROR_DUMMY
364 *
365 * Enable a dummy error function to make use of error_strerror() in
366 * third party libraries easier.
367 *
368 * Disable if you run into name conflicts and want to really remove the
369 * error_strerror()
370 */
371#define POLARSSL_ERROR_STRERROR_DUMMY
372
373/**
Paul Bakker15566e42011-04-24 21:19:15 +0000374 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000375 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000376 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
377 *
Paul Bakker15566e42011-04-24 21:19:15 +0000378 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000379 */
Paul Bakker15566e42011-04-24 21:19:15 +0000380#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000381
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000382/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000383 * \def POLARSSL_FS_IO
384 *
385 * Enable functions that use the filesystem.
386 */
387#define POLARSSL_FS_IO
388
389/**
Paul Bakker43655f42011-12-15 20:11:16 +0000390 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
391 *
392 * Do not add default entropy sources. These are the platform specific,
393 * hardclock and HAVEGE based poll functions.
394 *
395 * This is useful to have more control over the added entropy sources in an
396 * application.
397 *
398 * Uncomment this macro to prevent loading of default entropy functions.
399#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
400 */
401
402/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000403 * \def POLARSSL_NO_PLATFORM_ENTROPY
404 *
405 * Do not use built-in platform entropy functions.
406 * This is useful if your platform does not support
407 * standards like the /dev/urandom or Windows CryptoAPI.
408 *
409 * Uncomment this macro to disable the built-in platform entropy functions.
410#define POLARSSL_NO_PLATFORM_ENTROPY
411 */
412
413/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200414 * \def POLARSSL_MEMORY_DEBUG
415 *
416 * Enable debugging of buffer allocator memory issues. Automatically prints
417 * (to stderr) all (fatal) messages on memory allocation issues. Enables
418 * function for 'debug output' of allocated memory.
419 *
420 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
421 * fprintf()
422 *
423 * Uncomment this macro to let the buffer allocator print out error messages.
424#define POLARSSL_MEMORY_DEBUG
425*/
426
427/**
428 * \def POLARSSL_MEMORY_BACKTRACE
429 *
430 * Include backtrace information with each allocated block.
431 *
432 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
433 * GLIBC-compatible backtrace() an backtrace_symbols() support
434 *
435 * Uncomment this macro to include backtrace information
436#define POLARSSL_MEMORY_BACKTRACE
437 */
438
439/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000440 * \def POLARSSL_PKCS1_V21
441 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000442 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
443 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000444 * Enable support for PKCS#1 v2.1 encoding.
445 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
446 */
447#define POLARSSL_PKCS1_V21
448
449/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000450 * \def POLARSSL_RSA_NO_CRT
451 *
452 * Do not use the Chinese Remainder Theorem for the RSA private operation.
453 *
454 * Uncomment this macro to disable the use of CRT in RSA.
455 *
456#define POLARSSL_RSA_NO_CRT
457 */
Paul Bakker15566e42011-04-24 21:19:15 +0000458
459/**
460 * \def POLARSSL_SELF_TEST
461 *
462 * Enable the checkup functions (*_self_test).
463 */
464#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000465
466/**
Paul Bakker40865c82013-01-31 17:13:13 +0100467 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
468 *
469 * Enable sending of alert messages in case of encountered errors as per RFC.
470 * If you choose not to send the alert messages, PolarSSL can still communicate
471 * with other servers, only debugging of failures is harder.
472 *
473 * The advantage of not sending alert messages, is that no information is given
474 * about reasons for failures thus preventing adversaries of gaining intel.
475 *
476 * Enable sending of all alert messages
477 */
478#define POLARSSL_SSL_ALERT_MESSAGES
479
480/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100481 * \def POLARSSL_SSL_DEBUG_ALL
482 *
483 * Enable the debug messages in SSL module for all issues.
484 * Debug messages have been disabled in some places to prevent timing
485 * attacks due to (unbalanced) debugging function calls.
486 *
487 * If you need all error reporting you should enable this during debugging,
488 * but remove this for production servers that should log as well.
489 *
490 * Uncomment this macro to report all debug messages on errors introducing
491 * a timing side-channel.
492 *
493#define POLARSSL_SSL_DEBUG_ALL
494 */
495
496/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000497 * \def POLARSSL_SSL_HW_RECORD_ACCEL
498 *
499 * Enable hooking functions in SSL module for hardware acceleration of
500 * individual records.
501 *
502 * Uncomment this macro to enable hooking functions.
503#define POLARSSL_SSL_HW_RECORD_ACCEL
504 */
505
506/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100507 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
508 *
509 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
510 * SSL Server module (POLARSSL_SSL_SRV_C)
511 *
512 * Comment this macro to disable support for SSLv2 Client Hello messages.
513 */
514#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
515
516/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000517 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
518 *
519 * If set, the X509 parser will not break-off when parsing an X509 certificate
520 * and encountering an unknown critical extension.
521 *
522 * Uncomment to prevent an error.
523 *
524#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
525 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000526
527/**
528 * \def POLARSSL_ZLIB_SUPPORT
529 *
530 * If set, the SSL/TLS module uses ZLIB to support compression and
531 * decompression of packet data.
532 *
533 * Used in: library/ssl_tls.c
534 * library/ssl_cli.c
535 * library/ssl_srv.c
536 *
537 * This feature requires zlib library and headers to be present.
538 *
539 * Uncomment to enable use of ZLIB
540#define POLARSSL_ZLIB_SUPPORT
541 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000542/* \} name */
543
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000544/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000545 * \name SECTION: PolarSSL modules
546 *
547 * This section enables or disables entire modules in PolarSSL
548 * \{
549 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000550
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000551/**
552 * \def POLARSSL_AES_C
553 *
554 * Enable the AES block cipher.
555 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000556 * Module: library/aes.c
557 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000558 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000559 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000560 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000561 * This module enables the following ciphersuites (if other requisites are
562 * enabled as well):
563 * TLS_RSA_WITH_AES_128_CBC_SHA
564 * TLS_RSA_WITH_AES_256_CBC_SHA
565 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
566 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
567 * TLS_RSA_WITH_AES_128_CBC_SHA256
568 * TLS_RSA_WITH_AES_256_CBC_SHA256
569 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
570 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
571 * TLS_RSA_WITH_AES_128_GCM_SHA256
572 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100573 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
574 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200575 * TLS_PSK_WITH_AES_128_CBC_SHA
576 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100577 *
578 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000579 */
Paul Bakker40e46942009-01-03 21:51:57 +0000580#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000581
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000582/**
583 * \def POLARSSL_ARC4_C
584 *
585 * Enable the ARCFOUR stream cipher.
586 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000587 * Module: library/arc4.c
588 * Caller: library/ssl_tls.c
589 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100590 * This module enables the following ciphersuites (if other requisites are
591 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000592 * TLS_RSA_WITH_RC4_128_MD5
593 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100594 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200595 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000596 */
Paul Bakker40e46942009-01-03 21:51:57 +0000597#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000598
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000599/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000600 * \def POLARSSL_ASN1_PARSE_C
601 *
602 * Enable the generic ASN1 parser.
603 *
604 * Module: library/asn1.c
605 * Caller: library/x509parse.c
606 */
607#define POLARSSL_ASN1_PARSE_C
608
609/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000610 * \def POLARSSL_ASN1_WRITE_C
611 *
612 * Enable the generic ASN1 writer.
613 *
614 * Module: library/asn1write.c
615 */
616#define POLARSSL_ASN1_WRITE_C
617
618/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000619 * \def POLARSSL_BASE64_C
620 *
621 * Enable the Base64 module.
622 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000623 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000624 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000625 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000626 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000627 */
Paul Bakker40e46942009-01-03 21:51:57 +0000628#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000629
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000630/**
631 * \def POLARSSL_BIGNUM_C
632 *
Paul Bakker9a736322012-11-14 12:39:52 +0000633 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000634 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000635 * Module: library/bignum.c
636 * Caller: library/dhm.c
637 * library/rsa.c
638 * library/ssl_tls.c
639 * library/x509parse.c
640 *
641 * This module is required for RSA and DHM support.
642 */
Paul Bakker40e46942009-01-03 21:51:57 +0000643#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000644
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000645/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000646 * \def POLARSSL_BLOWFISH_C
647 *
648 * Enable the Blowfish block cipher.
649 *
650 * Module: library/blowfish.c
651 */
652#define POLARSSL_BLOWFISH_C
653
654/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000655 * \def POLARSSL_CAMELLIA_C
656 *
657 * Enable the Camellia block cipher.
658 *
Paul Bakker38119b12009-01-10 23:31:23 +0000659 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000660 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000661 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000662 * This module enables the following ciphersuites (if other requisites are
663 * enabled as well):
664 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
665 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
666 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
667 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
668 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
669 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
670 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
671 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000672 */
673#define POLARSSL_CAMELLIA_C
674
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000675/**
676 * \def POLARSSL_CERTS_C
677 *
678 * Enable the test certificates.
679 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000680 * Module: library/certs.c
681 * Caller:
682 *
683 * This module is used for testing (ssl_client/server).
684 */
Paul Bakker40e46942009-01-03 21:51:57 +0000685#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000686
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000687/**
688 * \def POLARSSL_CIPHER_C
689 *
690 * Enable the generic cipher layer.
691 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000692 * Module: library/cipher.c
693 * Caller:
694 *
695 * Uncomment to enable generic cipher wrappers.
696 */
697#define POLARSSL_CIPHER_C
698
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000699/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000700 * \def POLARSSL_CTR_DRBG_C
701 *
702 * Enable the CTR_DRBG AES-256-based random generator
703 *
704 * Module: library/ctr_drbg.c
705 * Caller:
706 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000707 * Requires: POLARSSL_AES_C
708 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000709 * This module provides the CTR_DRBG AES-256 random number generator.
710 */
711#define POLARSSL_CTR_DRBG_C
712
713/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000714 * \def POLARSSL_DEBUG_C
715 *
716 * Enable the debug functions.
717 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000718 * Module: library/debug.c
719 * Caller: library/ssl_cli.c
720 * library/ssl_srv.c
721 * library/ssl_tls.c
722 *
723 * This module provides debugging functions.
724 */
Paul Bakker40e46942009-01-03 21:51:57 +0000725#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000726
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000727/**
728 * \def POLARSSL_DES_C
729 *
730 * Enable the DES block cipher.
731 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000732 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100733 * Caller: library/pem.c
734 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000735 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000736 * This module enables the following ciphersuites (if other requisites are
737 * enabled as well):
738 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
739 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100740 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200741 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100742 *
743 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000744 */
Paul Bakker40e46942009-01-03 21:51:57 +0000745#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000746
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000747/**
748 * \def POLARSSL_DHM_C
749 *
750 * Enable the Diffie-Hellman-Merkle key exchange.
751 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000752 * Module: library/dhm.c
753 * Caller: library/ssl_cli.c
754 * library/ssl_srv.c
755 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000756 * This module enables the following ciphersuites (if other requisites are
757 * enabled as well):
758 * TLS_DHE_RSA_WITH_DES_CBC_SHA
759 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
760 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
761 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
762 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
763 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
764 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
765 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
766 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
767 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
768 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
769 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000770 */
Paul Bakker40e46942009-01-03 21:51:57 +0000771#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000772
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000773/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100774 * \def POLARSSL_ECDH_C
775 *
776 * Enable the elliptic curve Diffie-Hellman library.
777 *
778 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100779 * Caller: library/ssl_cli.c
780 * library/ssl_srv.c
781 *
782 * This module enables the following ciphersuites (if other requisites are
783 * enabled as well):
784 * TLS_ECDHE_RSA_WITH_NULL_SHA
785 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
786 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
787 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
788 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100789 *
790 * Requires: POLARSSL_ECP_C
791 */
792#define POLARSSL_ECDH_C
793
794/**
795 * \def POLARSSL_ECDSA_C
796 *
797 * Enable the elliptic curve DSA library.
798 *
799 * Module: library/ecdsa.c
800 * Caller:
801 *
802 * Requires: POLARSSL_ECP_C
803 */
804#define POLARSSL_ECDSA_C
805
806/**
807 * \def POLARSSL_ECP_C
808 *
809 * Enable the elliptic curve over GF(p) library.
810 *
811 * Module: library/ecp.c
812 * Caller: library/ecdh.c
813 * library/ecdsa.c
814 *
815 * Requires: POLARSSL_BIGNUM_C
816 */
817#define POLARSSL_ECP_C
818
819/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000820 * \def POLARSSL_ENTROPY_C
821 *
822 * Enable the platform-specific entropy code.
823 *
824 * Module: library/entropy.c
825 * Caller:
826 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200827 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000828 *
829 * This module provides a generic entropy pool
830 */
831#define POLARSSL_ENTROPY_C
832
833/**
Paul Bakker9d781402011-05-09 16:17:09 +0000834 * \def POLARSSL_ERROR_C
835 *
836 * Enable error code to error string conversion.
837 *
838 * Module: library/error.c
839 * Caller:
840 *
841 * This module enables err_strerror().
842 */
843#define POLARSSL_ERROR_C
844
845/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000846 * \def POLARSSL_GCM_C
847 *
848 * Enable the Galois/Counter Mode (GCM) for AES
849 *
850 * Module: library/gcm.c
851 *
852 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000853 *
854 * This module enables the following ciphersuites (if other requisites are
855 * enabled as well):
856 * TLS_RSA_WITH_AES_128_GCM_SHA256
857 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000858 */
859#define POLARSSL_GCM_C
860
861/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000862 * \def POLARSSL_HAVEGE_C
863 *
864 * Enable the HAVEGE random generator.
865 *
Paul Bakker2a844242013-06-24 13:01:53 +0200866 * Warning: the HAVEGE random generator is not suitable for virtualized
867 * environments
868 *
869 * Warning: the HAVEGE random generator is dependent on timing and specific
870 * processor traits. It is therefore not advised to use HAVEGE as
871 * your applications primary random generator or primary entropy pool
872 * input. As a secondary input to your entropy pool, it IS able add
873 * the (limited) extra entropy it provides.
874 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000875 * Module: library/havege.c
876 * Caller:
877 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000878 * Requires: POLARSSL_TIMING_C
879 *
Paul Bakker2a844242013-06-24 13:01:53 +0200880 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +0000881#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +0200882 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000883
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000884/**
885 * \def POLARSSL_MD_C
886 *
887 * Enable the generic message digest layer.
888 *
Paul Bakker17373852011-01-06 14:20:01 +0000889 * Module: library/md.c
890 * Caller:
891 *
892 * Uncomment to enable generic message digest wrappers.
893 */
894#define POLARSSL_MD_C
895
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000896/**
897 * \def POLARSSL_MD2_C
898 *
899 * Enable the MD2 hash algorithm
900 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000901 * Module: library/md2.c
902 * Caller: library/x509parse.c
903 *
904 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
905 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000906#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000907 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000908
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000909/**
910 * \def POLARSSL_MD4_C
911 *
912 * Enable the MD4 hash algorithm
913 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000914 * Module: library/md4.c
915 * Caller: library/x509parse.c
916 *
917 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
918 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000919#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000920 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000921
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000922/**
923 * \def POLARSSL_MD5_C
924 *
925 * Enable the MD5 hash algorithm
926 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000927 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100928 * Caller: library/pem.c
929 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000930 * library/x509parse.c
931 *
932 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100933 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000934 */
Paul Bakker40e46942009-01-03 21:51:57 +0000935#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000936
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000937/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200938 * \def POLARSSL_MEMORY_C
939 *
940 * Enable the memory allocation layer.
941 * By default PolarSSL uses the system-provided malloc() and free().
942 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
943 * are defined and unmodified)
944 *
945 * This allows different allocators (self-implemented or provided)
946 *
947 * Enable this layer to allow use of alternative memory allocators.
948#define POLARSSL_MEMORY_C
949 */
950
951/**
952 * The buffer allocator implementation that makes use of a (stack) based
953 * buffer to 'allocate' dynamic memory. (replaces malloc() and free() calls)
954 *
955 * Module: library/memory_buffer_alloc.c
956 *
957 * Requires: POLARSSL_MEMORY_C
958 *
959 * Enable this module to enable the buffer memory allocator.
960#define POLARSSL_MEMORY_BUFFER_ALLOC_C
961 */
962
963/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000964 * \def POLARSSL_NET_C
965 *
966 * Enable the TCP/IP networking routines.
967 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000968 * Module: library/net.c
969 * Caller:
970 *
971 * This module provides TCP/IP networking routines.
972 */
Paul Bakker40e46942009-01-03 21:51:57 +0000973#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000974
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000975/**
Paul Bakkerc70b9822013-04-07 22:00:46 +0200976 * \def POLARSSL_OID_C
977 *
978 * Enable the OID database
979 *
980 * Module: library/oid.c
981 * Caller: library/rsa.c
982 * library/x509parse.c
983 * library/x509write.c
984 *
985 * This modules translates between OIDs and internal values.
986 */
987#define POLARSSL_OID_C
988
989/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000990 * \def POLARSSL_PADLOCK_C
991 *
992 * Enable VIA Padlock support on x86.
993 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000994 * Module: library/padlock.c
995 * Caller: library/aes.c
996 *
997 * This modules adds support for the VIA PadLock on x86.
998 */
Paul Bakker40e46942009-01-03 21:51:57 +0000999#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001000
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001001/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001002 * \def POLARSSL_PBKDF2_C
1003 *
1004 * Enable PKCS#5 PBKDF2 key derivation function
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001005 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001006 *
1007 * Module: library/pbkdf2.c
1008 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001009 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001010 *
1011 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001012 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001013#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001014
1015/**
Paul Bakker96743fc2011-02-12 14:30:57 +00001016 * \def POLARSSL_PEM_C
1017 *
1018 * Enable PEM decoding
1019 *
1020 * Module: library/pem.c
1021 * Caller: library/x509parse.c
1022 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001023 * Requires: POLARSSL_BASE64_C
1024 *
Paul Bakker96743fc2011-02-12 14:30:57 +00001025 * This modules adds support for decoding PEM files.
1026 */
1027#define POLARSSL_PEM_C
1028
1029/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001030 * \def POLARSSL_PKCS5_C
1031 *
1032 * Enable PKCS#5 functions
1033 *
1034 * Module: library/pkcs5.c
1035 *
1036 * Requires: POLARSSL_MD_C
1037 *
1038 * This module adds support for the PKCS#5 functions.
1039 */
1040#define POLARSSL_PKCS5_C
1041
1042/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001043 * \def POLARSSL_PKCS11_C
1044 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001045 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001046 *
1047 * Module: library/ssl_srv.c
1048 * Caller: library/ssl_cli.c
1049 * library/ssl_srv.c
1050 *
1051 * Requires: POLARSSL_SSL_TLS_C
1052 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001053 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001054 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1055#define POLARSSL_PKCS11_C
1056 */
1057
1058/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001059 * \def POLARSSL_PKCS12_C
1060 *
1061 * Enable PKCS#12 PBE functions
1062 * Adds algorithms for parsing PKCS#8 encrypted private keys
1063 *
1064 * Module: library/pkcs12.c
1065 * Caller: library/x509parse.c
1066 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001067 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1068 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001069 *
1070 * This module enables PKCS#12 functions.
1071 */
1072#define POLARSSL_PKCS12_C
1073
1074/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001075 * \def POLARSSL_RSA_C
1076 *
1077 * Enable the RSA public-key cryptosystem.
1078 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001079 * Module: library/rsa.c
1080 * Caller: library/ssl_cli.c
1081 * library/ssl_srv.c
1082 * library/ssl_tls.c
1083 * library/x509.c
1084 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001085 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001086 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001087 * This module is required for SSL/TLS and MD5-signed certificates.
1088 */
Paul Bakker40e46942009-01-03 21:51:57 +00001089#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001090
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001091/**
1092 * \def POLARSSL_SHA1_C
1093 *
1094 * Enable the SHA1 cryptographic hash algorithm.
1095 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001096 * Module: library/sha1.c
1097 * Caller: library/ssl_cli.c
1098 * library/ssl_srv.c
1099 * library/ssl_tls.c
1100 * library/x509parse.c
1101 *
1102 * This module is required for SSL/TLS and SHA1-signed certificates.
1103 */
Paul Bakker40e46942009-01-03 21:51:57 +00001104#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001105
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001106/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001107 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001108 *
1109 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001110 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001111 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001112 * Module: library/sha256.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001113 * Caller: library/md_wrap.c
1114 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001115 *
1116 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001117 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001118 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001119#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001120
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001121/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001122 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001123 *
1124 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001125 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001126 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001127 * Module: library/sha512.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001128 * Caller: library/md_wrap.c
1129 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001130 *
1131 * This module adds support for SHA-384 and SHA-512.
1132 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001133#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001134
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001135/**
Paul Bakker0a597072012-09-25 21:55:46 +00001136 * \def POLARSSL_SSL_CACHE_C
1137 *
1138 * Enable simple SSL cache implementation.
1139 *
1140 * Module: library/ssl_cache.c
1141 * Caller:
1142 *
1143 * Requires: POLARSSL_SSL_CACHE_C
1144 */
1145#define POLARSSL_SSL_CACHE_C
1146
1147/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001148 * \def POLARSSL_SSL_CLI_C
1149 *
1150 * Enable the SSL/TLS client code.
1151 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001152 * Module: library/ssl_cli.c
1153 * Caller:
1154 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001155 * Requires: POLARSSL_SSL_TLS_C
1156 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001157 * This module is required for SSL/TLS client support.
1158 */
Paul Bakker40e46942009-01-03 21:51:57 +00001159#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001160
Paul Bakker9a736322012-11-14 12:39:52 +00001161/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001162 * \def POLARSSL_SSL_SRV_C
1163 *
1164 * Enable the SSL/TLS server code.
1165 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001166 * Module: library/ssl_srv.c
1167 * Caller:
1168 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001169 * Requires: POLARSSL_SSL_TLS_C
1170 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001171 * This module is required for SSL/TLS server support.
1172 */
Paul Bakker40e46942009-01-03 21:51:57 +00001173#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001174
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001175/**
1176 * \def POLARSSL_SSL_TLS_C
1177 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001178 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001179 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001180 * Module: library/ssl_tls.c
1181 * Caller: library/ssl_cli.c
1182 * library/ssl_srv.c
1183 *
Paul Bakker7ad00f92013-04-18 23:05:25 +02001184 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001185 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001186 * This module is required for SSL/TLS.
1187 */
Paul Bakker40e46942009-01-03 21:51:57 +00001188#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001189
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001190/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001191 * \def POLARSSL_TIMING_C
1192 *
1193 * Enable the portable timing interface.
1194 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001195 * Module: library/timing.c
1196 * Caller: library/havege.c
1197 *
1198 * This module is used by the HAVEGE random number generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001199#define POLARSSL_TIMING_C
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001200 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001201
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001202/**
1203 * \def POLARSSL_VERSION_C
1204 *
1205 * Enable run-time version information.
1206 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001207 * Module: library/version.c
1208 *
1209 * This module provides run-time version information.
1210 */
1211#define POLARSSL_VERSION_C
1212
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001213/**
1214 * \def POLARSSL_X509_PARSE_C
1215 *
1216 * Enable X.509 certificate parsing.
1217 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001218 * Module: library/x509parse.c
1219 * Caller: library/ssl_cli.c
1220 * library/ssl_srv.c
1221 * library/ssl_tls.c
1222 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001223 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
1224 * POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001225 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001226 * This module is required for X.509 certificate parsing.
1227 */
Paul Bakker40e46942009-01-03 21:51:57 +00001228#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001229
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001230/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001231 * \def POLARSSL_X509_WRITE_C
1232 *
1233 * Enable X.509 buffer writing.
1234 *
1235 * Module: library/x509write.c
1236 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001237 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001238 *
1239 * This module is required for X.509 certificate request writing.
1240 */
1241#define POLARSSL_X509_WRITE_C
1242
1243/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001244 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001245 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001246 * Enable the XTEA block cipher.
1247 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001248 * Module: library/xtea.c
1249 * Caller:
1250 */
1251#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001252
Paul Bakker0a62cd12011-01-21 11:00:08 +00001253/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001254
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001255/**
1256 * \name SECTION: Module configuration options
1257 *
1258 * This section allows for the setting of module specific sizes and
1259 * configuration options. The default values are already present in the
1260 * relevant header files and should suffice for the regular use cases.
1261 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1262 * only if you have a good reason and know the consequences.
1263 *
1264 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1265 * header file take precedence.
1266 *
1267 * Please check the respective header file for documentation on these
1268 * parameters (to prevent duplicate documentation).
1269 *
1270 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1271 * \{
1272 */
1273//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1274
1275#if defined(POLARSSL_CONFIG_OPTIONS)
1276
1277// MPI / BIGNUM options
1278//
1279#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1280#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1281
1282// CTR_DRBG options
1283//
1284#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default */
1285#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1286#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1287#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1288#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1289
1290// Entropy options
1291//
1292#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1293#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1294
Paul Bakker6e339b52013-07-03 13:37:05 +02001295// Memory options
1296#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1297#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1298#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1299
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001300// SSL Cache options
1301//
1302#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1303#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1304
1305// SSL options
1306//
1307#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
1308
1309#endif /* POLARSSL_CONFIG_OPTIONS */
1310
1311/* \} name */
1312
Paul Bakker7ad00f92013-04-18 23:05:25 +02001313/*
1314 * Sanity checks on defines and dependencies
1315 */
1316#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1317#error "POLARSSL_DHM_C defined, but not all prerequisites"
1318#endif
1319
1320#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1321#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1322#endif
1323
1324#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1325#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1326#endif
1327
1328#if defined(POLARSSL_ECDSA_C) && !defined(POLARSSL_ECP_C)
1329#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1330#endif
1331
1332#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1333#error "POLARSSL_ECP_C defined, but not all prerequisites"
1334#endif
1335
Paul Bakker9e36f042013-06-30 14:34:05 +02001336#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001337#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1338#endif
1339
1340#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1341#error "POLARSSL_GCM_C defined, but not all prerequisites"
1342#endif
1343
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001344#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1345#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1346#endif
1347
Paul Bakkere07f41d2013-04-19 09:08:57 +02001348#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1349#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1350#endif
1351
1352#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1353 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
1354 !defined(POLARSSL_X509_PARSE_C) )
1355#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1356#endif
1357
1358#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1359 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
1360 !defined(POLARSSL_X509_PARSE_C) )
1361#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1362#endif
1363
1364#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
1365 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1366#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1367#endif
1368
1369#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
1370 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1371#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1372#endif
1373
Paul Bakker6e339b52013-07-03 13:37:05 +02001374#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1375#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1376#endif
1377
Paul Bakker7ad00f92013-04-18 23:05:25 +02001378#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1379#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1380#endif
1381
1382#if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C)
1383#error "POLARSSL_PEM_C defined, but not all prerequisites"
1384#endif
1385
1386#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_SSL_TLS_C)
1387#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1388#endif
1389
1390#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1391 !defined(POLARSSL_OID_C) )
1392#error "POLARSSL_RSA_C defined, but not all prerequisites"
1393#endif
1394
1395#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1396#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1397#endif
1398
1399#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_MD5_C) || \
1400 !defined(POLARSSL_SHA1_C) )
1401#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1402#endif
1403
1404#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1405#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1406#endif
1407
1408#if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1409 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
1410 !defined(POLARSSL_RSA_C) )
1411#error "POLARSSL_X509_PARSE_C defined, but not all prerequisites"
1412#endif
1413
1414#if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1415 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1416 !defined(POLARSSL_RSA_C) )
1417#error "POLARSSL_X509_WRITE_C defined, but not all prerequisites"
1418#endif
1419
Paul Bakker5121ce52009-01-03 21:22:43 +00001420#endif /* config.h */