blob: d2387b051d1f59bdcb7c1ec9d0fe5862314d6f68 [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 Bakker0a62cd12011-01-21 11:00:08 +000097/* \} name */
98
Paul Bakkerf3b86c12011-01-27 15:24:17 +000099/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000100 * \name SECTION: PolarSSL feature support
101 *
102 * This section sets support for features that are or are not needed
103 * within the modules that are enabled.
104 * \{
105 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000106
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000107/**
Paul Bakker90995b52013-06-24 19:20:35 +0200108 * \def POLARSSL_XXX_ALT
109 *
110 * Uncomment a macro to let PolarSSL use your alternate core implementation of
111 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
112 * implementations). Keep in mind that the function prototypes should remain
113 * the same.
114 *
115 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
116 * provide the "struct aes_context" definition and omit the base function
117 * declarations and implementations. "aes_alt.h" will be included from
118 * "aes.h" to include the new function definitions.
119 *
120 * Uncomment a macro to enable alternate implementation for core algorithm
121 * functions
122#define POLARSSL_AES_ALT
123#define POLARSSL_ARC4_ALT
124#define POLARSSL_BLOWFISH_ALT
125#define POLARSSL_CAMELLIA_ALT
126#define POLARSSL_DES_ALT
127#define POLARSSL_XTEA_ALT
128#define POLARSSL_MD2_ALT
129#define POLARSSL_MD4_ALT
130#define POLARSSL_MD5_ALT
131#define POLARSSL_SHA1_ALT
Paul Bakker9e36f042013-06-30 14:34:05 +0200132#define POLARSSL_SHA256_ALT
133#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200134 */
135
136/**
Paul Bakker15566e42011-04-24 21:19:15 +0000137 * \def POLARSSL_AES_ROM_TABLES
138 *
139 * Store the AES tables in ROM.
140 *
141 * Uncomment this macro to store the AES tables in ROM.
142 *
143#define POLARSSL_AES_ROM_TABLES
144 */
145
146/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000147 * \def POLARSSL_CIPHER_MODE_CFB
148 *
149 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
150 */
151#define POLARSSL_CIPHER_MODE_CFB
152
153/**
154 * \def POLARSSL_CIPHER_MODE_CTR
155 *
156 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
157 */
158#define POLARSSL_CIPHER_MODE_CTR
159
160/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000161 * \def POLARSSL_CIPHER_NULL_CIPHER
162 *
163 * Enable NULL cipher.
164 * Warning: Only do so when you know what you are doing. This allows for
165 * encryption or channels without any security!
166 *
167 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
168 * the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000169 * TLS_RSA_WITH_NULL_MD5
170 * TLS_RSA_WITH_NULL_SHA
171 * TLS_RSA_WITH_NULL_SHA256
Paul Bakker41c83d32013-03-20 14:39:14 +0100172 * TLS_ECDHE_RSA_WITH_NULL_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200173 * TLS_PSK_WITH_NULL
174 * TLS_PSK_WITH_NULL256
175 * TLS_PSK_WITH_NULL384
176 * TLS_DHE_PSK_WITH_NULL
177 * TLS_DHE_PSK_WITH_NULL256
178 * TLS_DHE_PSK_WITH_NULL384
179 * TLS_RSA_PSK_WITH_NULL
180 * TLS_RSA_PSK_WITH_NULL256
181 * TLS_RSA_PSK_WITH_NULL384
Paul Bakkerfab5c822012-02-06 16:45:10 +0000182 *
183 * Uncomment this macro to enable the NULL cipher and ciphersuites
184#define POLARSSL_CIPHER_NULL_CIPHER
185 */
186
187/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000188 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
189 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000190 * Enable weak ciphersuites in SSL / TLS
Paul Bakkerfab5c822012-02-06 16:45:10 +0000191 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000192 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000193 *
194 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000195 * TLS_RSA_WITH_DES_CBC_SHA
196 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000197 *
198 * Uncomment this macro to enable weak ciphersuites
199#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
200 */
201
202/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200203 * \def POLARSSL_ECP_XXXX_ENABLED
204 *
205 * Enables specific curves within the Elliptic Curve module.
206 * By default all supported curves are enables.
207 *
208 * Comment macros to disable the curve and functions for it
209 */
210#define POLARSSL_ECP_DP_SECP192R1_ENABLED
211#define POLARSSL_ECP_DP_SECP224R1_ENABLED
212#define POLARSSL_ECP_DP_SECP256R1_ENABLED
213#define POLARSSL_ECP_DP_SECP384R1_ENABLED
214#define POLARSSL_ECP_DP_SECP521R1_ENABLED
215
216/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200217 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
218 *
219 * Enable the PSK based ciphersuite modes in SSL / TLS
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200220 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200221 * This enables the following ciphersuites (if other requisites are
222 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200223 * TLS_PSK_WITH_RC4_128_SHA
224 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
225 * TLS_PSK_WITH_AES_128_CBC_SHA
226 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200227 * TLS_PSK_WITH_AES_128_CBC_SHA256
228 * TLS_PSK_WITH_AES_256_CBC_SHA384
229 * TLS_PSK_WITH_AES_128_GCM_SHA256
230 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200231 */
232#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
233
234/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200235 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
236 *
237 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS
238 *
239 * Requires: POLARSSL_DHM_C
240 *
241 * This enables the following ciphersuites (if other requisites are
242 * enabled as well):
243 * TLS_DHE_PSK_WITH_RC4_128_SHA
244 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
245 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
246 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200247 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
248 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
249 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
250 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200251 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200252#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200253
254/**
255 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
256 *
257 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS
Paul Bakker45bda902013-04-19 22:28:21 +0200258 * (NOT YET IMPLEMENTED)
Paul Bakkere07f41d2013-04-19 09:08:57 +0200259 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
260 *
261 * This enables the following ciphersuites (if other requisites are
262 * enabled as well):
263 * TLS_RSA_PSK_WITH_RC4_128_SHA
264 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
265 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
266 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200267 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
268 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
269 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
270 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200271#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
272 */
273
274/**
275 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
276 *
277 * Enable the RSA-only based ciphersuite modes in SSL / TLS
278 *
279 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
280 *
281 * This enables the following ciphersuites (if other requisites are
282 * enabled as well):
283 * TLS_RSA_WITH_AES_128_CBC_SHA
284 * TLS_RSA_WITH_AES_256_CBC_SHA
285 * TLS_RSA_WITH_AES_128_CBC_SHA256
286 * TLS_RSA_WITH_AES_256_CBC_SHA256
287 * TLS_RSA_WITH_AES_128_GCM_SHA256
288 * TLS_RSA_WITH_AES_256_GCM_SHA384
289 * TLS_RSA_WITH_RC4_128_MD5
290 * TLS_RSA_WITH_RC4_128_SHA
291 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
292 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
293 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
294 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
295 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
296 */
297#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
298
299/**
300 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
301 *
302 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS
303 *
304 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
305 *
306 * This enables the following ciphersuites (if other requisites are
307 * enabled as well):
308 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
309 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
310 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
311 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
312 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
313 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
314 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
315 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
316 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
317 */
318#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
319
320/**
321 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
322 *
323 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS
324 *
325 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
326 *
327 * This enables the following ciphersuites (if other requisites are
328 * enabled as well):
329 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
330 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
331 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
332 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
333 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
334 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
335 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
336 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
337 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
338 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
339 */
340#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
341
342/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200343 * \def POLARSSL_ERROR_STRERROR_BC
344 *
345 * Make available the backward compatible error_strerror() next to the
346 * current polarssl_strerror().
347 *
348 * Disable if you run into name conflicts and want to really remove the
349 * error_strerror()
350 */
351#define POLARSSL_ERROR_STRERROR_BC
352
353/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100354 * \def POLARSSL_ERROR_STRERROR_DUMMY
355 *
356 * Enable a dummy error function to make use of error_strerror() in
357 * third party libraries easier.
358 *
359 * Disable if you run into name conflicts and want to really remove the
360 * error_strerror()
361 */
362#define POLARSSL_ERROR_STRERROR_DUMMY
363
364/**
Paul Bakker15566e42011-04-24 21:19:15 +0000365 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000366 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000367 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
368 *
Paul Bakker15566e42011-04-24 21:19:15 +0000369 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000370 */
Paul Bakker15566e42011-04-24 21:19:15 +0000371#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000372
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000373/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000374 * \def POLARSSL_FS_IO
375 *
376 * Enable functions that use the filesystem.
377 */
378#define POLARSSL_FS_IO
379
380/**
Paul Bakker43655f42011-12-15 20:11:16 +0000381 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
382 *
383 * Do not add default entropy sources. These are the platform specific,
384 * hardclock and HAVEGE based poll functions.
385 *
386 * This is useful to have more control over the added entropy sources in an
387 * application.
388 *
389 * Uncomment this macro to prevent loading of default entropy functions.
390#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
391 */
392
393/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000394 * \def POLARSSL_NO_PLATFORM_ENTROPY
395 *
396 * Do not use built-in platform entropy functions.
397 * This is useful if your platform does not support
398 * standards like the /dev/urandom or Windows CryptoAPI.
399 *
400 * Uncomment this macro to disable the built-in platform entropy functions.
401#define POLARSSL_NO_PLATFORM_ENTROPY
402 */
403
404/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200405 * \def POLARSSL_MEMORY_DEBUG
406 *
407 * Enable debugging of buffer allocator memory issues. Automatically prints
408 * (to stderr) all (fatal) messages on memory allocation issues. Enables
409 * function for 'debug output' of allocated memory.
410 *
411 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
412 * fprintf()
413 *
414 * Uncomment this macro to let the buffer allocator print out error messages.
415#define POLARSSL_MEMORY_DEBUG
416*/
417
418/**
419 * \def POLARSSL_MEMORY_BACKTRACE
420 *
421 * Include backtrace information with each allocated block.
422 *
423 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
424 * GLIBC-compatible backtrace() an backtrace_symbols() support
425 *
426 * Uncomment this macro to include backtrace information
427#define POLARSSL_MEMORY_BACKTRACE
428 */
429
430/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000431 * \def POLARSSL_PKCS1_V21
432 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000433 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
434 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000435 * Enable support for PKCS#1 v2.1 encoding.
436 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
437 */
438#define POLARSSL_PKCS1_V21
439
440/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000441 * \def POLARSSL_RSA_NO_CRT
442 *
443 * Do not use the Chinese Remainder Theorem for the RSA private operation.
444 *
445 * Uncomment this macro to disable the use of CRT in RSA.
446 *
447#define POLARSSL_RSA_NO_CRT
448 */
Paul Bakker15566e42011-04-24 21:19:15 +0000449
450/**
451 * \def POLARSSL_SELF_TEST
452 *
453 * Enable the checkup functions (*_self_test).
454 */
455#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000456
457/**
Paul Bakker40865c82013-01-31 17:13:13 +0100458 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
459 *
460 * Enable sending of alert messages in case of encountered errors as per RFC.
461 * If you choose not to send the alert messages, PolarSSL can still communicate
462 * with other servers, only debugging of failures is harder.
463 *
464 * The advantage of not sending alert messages, is that no information is given
465 * about reasons for failures thus preventing adversaries of gaining intel.
466 *
467 * Enable sending of all alert messages
468 */
469#define POLARSSL_SSL_ALERT_MESSAGES
470
471/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100472 * \def POLARSSL_SSL_DEBUG_ALL
473 *
474 * Enable the debug messages in SSL module for all issues.
475 * Debug messages have been disabled in some places to prevent timing
476 * attacks due to (unbalanced) debugging function calls.
477 *
478 * If you need all error reporting you should enable this during debugging,
479 * but remove this for production servers that should log as well.
480 *
481 * Uncomment this macro to report all debug messages on errors introducing
482 * a timing side-channel.
483 *
484#define POLARSSL_SSL_DEBUG_ALL
485 */
486
487/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000488 * \def POLARSSL_SSL_HW_RECORD_ACCEL
489 *
490 * Enable hooking functions in SSL module for hardware acceleration of
491 * individual records.
492 *
493 * Uncomment this macro to enable hooking functions.
494#define POLARSSL_SSL_HW_RECORD_ACCEL
495 */
496
497/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100498 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
499 *
500 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
501 * SSL Server module (POLARSSL_SSL_SRV_C)
502 *
503 * Comment this macro to disable support for SSLv2 Client Hello messages.
504 */
505#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
506
507/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000508 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
509 *
510 * If set, the X509 parser will not break-off when parsing an X509 certificate
511 * and encountering an unknown critical extension.
512 *
513 * Uncomment to prevent an error.
514 *
515#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
516 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000517
518/**
519 * \def POLARSSL_ZLIB_SUPPORT
520 *
521 * If set, the SSL/TLS module uses ZLIB to support compression and
522 * decompression of packet data.
523 *
524 * Used in: library/ssl_tls.c
525 * library/ssl_cli.c
526 * library/ssl_srv.c
527 *
528 * This feature requires zlib library and headers to be present.
529 *
530 * Uncomment to enable use of ZLIB
531#define POLARSSL_ZLIB_SUPPORT
532 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000533/* \} name */
534
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000535/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000536 * \name SECTION: PolarSSL modules
537 *
538 * This section enables or disables entire modules in PolarSSL
539 * \{
540 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000541
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000542/**
543 * \def POLARSSL_AES_C
544 *
545 * Enable the AES block cipher.
546 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000547 * Module: library/aes.c
548 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000549 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000550 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000551 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000552 * This module enables the following ciphersuites (if other requisites are
553 * enabled as well):
554 * TLS_RSA_WITH_AES_128_CBC_SHA
555 * TLS_RSA_WITH_AES_256_CBC_SHA
556 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
557 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
558 * TLS_RSA_WITH_AES_128_CBC_SHA256
559 * TLS_RSA_WITH_AES_256_CBC_SHA256
560 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
561 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
562 * TLS_RSA_WITH_AES_128_GCM_SHA256
563 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100564 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
565 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200566 * TLS_PSK_WITH_AES_128_CBC_SHA
567 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100568 *
569 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000570 */
Paul Bakker40e46942009-01-03 21:51:57 +0000571#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000572
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000573/**
574 * \def POLARSSL_ARC4_C
575 *
576 * Enable the ARCFOUR stream cipher.
577 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000578 * Module: library/arc4.c
579 * Caller: library/ssl_tls.c
580 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100581 * This module enables the following ciphersuites (if other requisites are
582 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000583 * TLS_RSA_WITH_RC4_128_MD5
584 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100585 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200586 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000587 */
Paul Bakker40e46942009-01-03 21:51:57 +0000588#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000589
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000590/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000591 * \def POLARSSL_ASN1_PARSE_C
592 *
593 * Enable the generic ASN1 parser.
594 *
595 * Module: library/asn1.c
596 * Caller: library/x509parse.c
597 */
598#define POLARSSL_ASN1_PARSE_C
599
600/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000601 * \def POLARSSL_ASN1_WRITE_C
602 *
603 * Enable the generic ASN1 writer.
604 *
605 * Module: library/asn1write.c
606 */
607#define POLARSSL_ASN1_WRITE_C
608
609/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000610 * \def POLARSSL_BASE64_C
611 *
612 * Enable the Base64 module.
613 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000614 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000615 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000616 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000617 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000618 */
Paul Bakker40e46942009-01-03 21:51:57 +0000619#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000620
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000621/**
622 * \def POLARSSL_BIGNUM_C
623 *
Paul Bakker9a736322012-11-14 12:39:52 +0000624 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000625 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000626 * Module: library/bignum.c
627 * Caller: library/dhm.c
628 * library/rsa.c
629 * library/ssl_tls.c
630 * library/x509parse.c
631 *
632 * This module is required for RSA and DHM support.
633 */
Paul Bakker40e46942009-01-03 21:51:57 +0000634#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000635
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000636/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000637 * \def POLARSSL_BLOWFISH_C
638 *
639 * Enable the Blowfish block cipher.
640 *
641 * Module: library/blowfish.c
642 */
643#define POLARSSL_BLOWFISH_C
644
645/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000646 * \def POLARSSL_CAMELLIA_C
647 *
648 * Enable the Camellia block cipher.
649 *
Paul Bakker38119b12009-01-10 23:31:23 +0000650 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000651 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000652 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000653 * This module enables the following ciphersuites (if other requisites are
654 * enabled as well):
655 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
656 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
657 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
658 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
659 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
660 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
661 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
662 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000663 */
664#define POLARSSL_CAMELLIA_C
665
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000666/**
667 * \def POLARSSL_CERTS_C
668 *
669 * Enable the test certificates.
670 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000671 * Module: library/certs.c
672 * Caller:
673 *
674 * This module is used for testing (ssl_client/server).
675 */
Paul Bakker40e46942009-01-03 21:51:57 +0000676#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000677
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000678/**
679 * \def POLARSSL_CIPHER_C
680 *
681 * Enable the generic cipher layer.
682 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000683 * Module: library/cipher.c
684 * Caller:
685 *
686 * Uncomment to enable generic cipher wrappers.
687 */
688#define POLARSSL_CIPHER_C
689
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000690/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000691 * \def POLARSSL_CTR_DRBG_C
692 *
693 * Enable the CTR_DRBG AES-256-based random generator
694 *
695 * Module: library/ctr_drbg.c
696 * Caller:
697 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000698 * Requires: POLARSSL_AES_C
699 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000700 * This module provides the CTR_DRBG AES-256 random number generator.
701 */
702#define POLARSSL_CTR_DRBG_C
703
704/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000705 * \def POLARSSL_DEBUG_C
706 *
707 * Enable the debug functions.
708 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000709 * Module: library/debug.c
710 * Caller: library/ssl_cli.c
711 * library/ssl_srv.c
712 * library/ssl_tls.c
713 *
714 * This module provides debugging functions.
715 */
Paul Bakker40e46942009-01-03 21:51:57 +0000716#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000717
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000718/**
719 * \def POLARSSL_DES_C
720 *
721 * Enable the DES block cipher.
722 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000723 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100724 * Caller: library/pem.c
725 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000726 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000727 * This module enables the following ciphersuites (if other requisites are
728 * enabled as well):
729 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
730 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100731 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200732 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100733 *
734 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000735 */
Paul Bakker40e46942009-01-03 21:51:57 +0000736#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000737
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000738/**
739 * \def POLARSSL_DHM_C
740 *
741 * Enable the Diffie-Hellman-Merkle key exchange.
742 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000743 * Module: library/dhm.c
744 * Caller: library/ssl_cli.c
745 * library/ssl_srv.c
746 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000747 * This module enables the following ciphersuites (if other requisites are
748 * enabled as well):
749 * TLS_DHE_RSA_WITH_DES_CBC_SHA
750 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
751 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
752 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
753 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
754 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
755 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
756 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
757 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
758 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
759 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
760 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000761 */
Paul Bakker40e46942009-01-03 21:51:57 +0000762#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000763
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000764/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100765 * \def POLARSSL_ECDH_C
766 *
767 * Enable the elliptic curve Diffie-Hellman library.
768 *
769 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100770 * Caller: library/ssl_cli.c
771 * library/ssl_srv.c
772 *
773 * This module enables the following ciphersuites (if other requisites are
774 * enabled as well):
775 * TLS_ECDHE_RSA_WITH_NULL_SHA
776 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
777 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
778 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
779 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100780 *
781 * Requires: POLARSSL_ECP_C
782 */
783#define POLARSSL_ECDH_C
784
785/**
786 * \def POLARSSL_ECDSA_C
787 *
788 * Enable the elliptic curve DSA library.
789 *
790 * Module: library/ecdsa.c
791 * Caller:
792 *
793 * Requires: POLARSSL_ECP_C
794 */
795#define POLARSSL_ECDSA_C
796
797/**
798 * \def POLARSSL_ECP_C
799 *
800 * Enable the elliptic curve over GF(p) library.
801 *
802 * Module: library/ecp.c
803 * Caller: library/ecdh.c
804 * library/ecdsa.c
805 *
806 * Requires: POLARSSL_BIGNUM_C
807 */
808#define POLARSSL_ECP_C
809
810/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000811 * \def POLARSSL_ENTROPY_C
812 *
813 * Enable the platform-specific entropy code.
814 *
815 * Module: library/entropy.c
816 * Caller:
817 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200818 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000819 *
820 * This module provides a generic entropy pool
821 */
822#define POLARSSL_ENTROPY_C
823
824/**
Paul Bakker9d781402011-05-09 16:17:09 +0000825 * \def POLARSSL_ERROR_C
826 *
827 * Enable error code to error string conversion.
828 *
829 * Module: library/error.c
830 * Caller:
831 *
832 * This module enables err_strerror().
833 */
834#define POLARSSL_ERROR_C
835
836/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000837 * \def POLARSSL_GCM_C
838 *
839 * Enable the Galois/Counter Mode (GCM) for AES
840 *
841 * Module: library/gcm.c
842 *
843 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000844 *
845 * This module enables the following ciphersuites (if other requisites are
846 * enabled as well):
847 * TLS_RSA_WITH_AES_128_GCM_SHA256
848 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000849 */
850#define POLARSSL_GCM_C
851
852/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000853 * \def POLARSSL_HAVEGE_C
854 *
855 * Enable the HAVEGE random generator.
856 *
Paul Bakker2a844242013-06-24 13:01:53 +0200857 * Warning: the HAVEGE random generator is not suitable for virtualized
858 * environments
859 *
860 * Warning: the HAVEGE random generator is dependent on timing and specific
861 * processor traits. It is therefore not advised to use HAVEGE as
862 * your applications primary random generator or primary entropy pool
863 * input. As a secondary input to your entropy pool, it IS able add
864 * the (limited) extra entropy it provides.
865 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000866 * Module: library/havege.c
867 * Caller:
868 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000869 * Requires: POLARSSL_TIMING_C
870 *
Paul Bakker2a844242013-06-24 13:01:53 +0200871 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +0000872#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +0200873 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000874
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000875/**
876 * \def POLARSSL_MD_C
877 *
878 * Enable the generic message digest layer.
879 *
Paul Bakker17373852011-01-06 14:20:01 +0000880 * Module: library/md.c
881 * Caller:
882 *
883 * Uncomment to enable generic message digest wrappers.
884 */
885#define POLARSSL_MD_C
886
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000887/**
888 * \def POLARSSL_MD2_C
889 *
890 * Enable the MD2 hash algorithm
891 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000892 * Module: library/md2.c
893 * Caller: library/x509parse.c
894 *
895 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
896 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000897#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000898 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000899
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000900/**
901 * \def POLARSSL_MD4_C
902 *
903 * Enable the MD4 hash algorithm
904 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000905 * Module: library/md4.c
906 * Caller: library/x509parse.c
907 *
908 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
909 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000910#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000911 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000912
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000913/**
914 * \def POLARSSL_MD5_C
915 *
916 * Enable the MD5 hash algorithm
917 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000918 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100919 * Caller: library/pem.c
920 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000921 * library/x509parse.c
922 *
923 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100924 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000925 */
Paul Bakker40e46942009-01-03 21:51:57 +0000926#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000927
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000928/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200929 * \def POLARSSL_MEMORY_C
930 *
931 * Enable the memory allocation layer.
932 * By default PolarSSL uses the system-provided malloc() and free().
933 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
934 * are defined and unmodified)
935 *
936 * This allows different allocators (self-implemented or provided)
937 *
938 * Enable this layer to allow use of alternative memory allocators.
939#define POLARSSL_MEMORY_C
940 */
941
942/**
943 * The buffer allocator implementation that makes use of a (stack) based
944 * buffer to 'allocate' dynamic memory. (replaces malloc() and free() calls)
945 *
946 * Module: library/memory_buffer_alloc.c
947 *
948 * Requires: POLARSSL_MEMORY_C
949 *
950 * Enable this module to enable the buffer memory allocator.
951#define POLARSSL_MEMORY_BUFFER_ALLOC_C
952 */
953
954/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000955 * \def POLARSSL_NET_C
956 *
957 * Enable the TCP/IP networking routines.
958 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000959 * Module: library/net.c
960 * Caller:
961 *
962 * This module provides TCP/IP networking routines.
963 */
Paul Bakker40e46942009-01-03 21:51:57 +0000964#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000965
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000966/**
Paul Bakkerc70b9822013-04-07 22:00:46 +0200967 * \def POLARSSL_OID_C
968 *
969 * Enable the OID database
970 *
971 * Module: library/oid.c
972 * Caller: library/rsa.c
973 * library/x509parse.c
974 * library/x509write.c
975 *
976 * This modules translates between OIDs and internal values.
977 */
978#define POLARSSL_OID_C
979
980/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000981 * \def POLARSSL_PADLOCK_C
982 *
983 * Enable VIA Padlock support on x86.
984 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000985 * Module: library/padlock.c
986 * Caller: library/aes.c
987 *
988 * This modules adds support for the VIA PadLock on x86.
989 */
Paul Bakker40e46942009-01-03 21:51:57 +0000990#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000991
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000992/**
Paul Bakkerf518b162012-08-23 13:03:18 +0000993 * \def POLARSSL_PBKDF2_C
994 *
995 * Enable PKCS#5 PBKDF2 key derivation function
Paul Bakkerb0c19a42013-06-24 19:26:38 +0200996 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +0000997 *
998 * Module: library/pbkdf2.c
999 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001000 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001001 *
1002 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001003 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001004#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001005
1006/**
Paul Bakker96743fc2011-02-12 14:30:57 +00001007 * \def POLARSSL_PEM_C
1008 *
1009 * Enable PEM decoding
1010 *
1011 * Module: library/pem.c
1012 * Caller: library/x509parse.c
1013 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001014 * Requires: POLARSSL_BASE64_C
1015 *
Paul Bakker96743fc2011-02-12 14:30:57 +00001016 * This modules adds support for decoding PEM files.
1017 */
1018#define POLARSSL_PEM_C
1019
1020/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001021 * \def POLARSSL_PKCS5_C
1022 *
1023 * Enable PKCS#5 functions
1024 *
1025 * Module: library/pkcs5.c
1026 *
1027 * Requires: POLARSSL_MD_C
1028 *
1029 * This module adds support for the PKCS#5 functions.
1030 */
1031#define POLARSSL_PKCS5_C
1032
1033/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001034 * \def POLARSSL_PKCS11_C
1035 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001036 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001037 *
1038 * Module: library/ssl_srv.c
1039 * Caller: library/ssl_cli.c
1040 * library/ssl_srv.c
1041 *
1042 * Requires: POLARSSL_SSL_TLS_C
1043 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001044 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001045 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1046#define POLARSSL_PKCS11_C
1047 */
1048
1049/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001050 * \def POLARSSL_PKCS12_C
1051 *
1052 * Enable PKCS#12 PBE functions
1053 * Adds algorithms for parsing PKCS#8 encrypted private keys
1054 *
1055 * Module: library/pkcs12.c
1056 * Caller: library/x509parse.c
1057 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001058 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1059 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001060 *
1061 * This module enables PKCS#12 functions.
1062 */
1063#define POLARSSL_PKCS12_C
1064
1065/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001066 * \def POLARSSL_RSA_C
1067 *
1068 * Enable the RSA public-key cryptosystem.
1069 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001070 * Module: library/rsa.c
1071 * Caller: library/ssl_cli.c
1072 * library/ssl_srv.c
1073 * library/ssl_tls.c
1074 * library/x509.c
1075 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001076 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001077 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001078 * This module is required for SSL/TLS and MD5-signed certificates.
1079 */
Paul Bakker40e46942009-01-03 21:51:57 +00001080#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001081
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001082/**
1083 * \def POLARSSL_SHA1_C
1084 *
1085 * Enable the SHA1 cryptographic hash algorithm.
1086 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001087 * Module: library/sha1.c
1088 * Caller: library/ssl_cli.c
1089 * library/ssl_srv.c
1090 * library/ssl_tls.c
1091 * library/x509parse.c
1092 *
1093 * This module is required for SSL/TLS and SHA1-signed certificates.
1094 */
Paul Bakker40e46942009-01-03 21:51:57 +00001095#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001096
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001097/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001098 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001099 *
1100 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001101 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001102 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001103 * Module: library/sha256.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001104 * Caller: library/md_wrap.c
1105 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001106 *
1107 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001108 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001109 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001110#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001111
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001112/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001113 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001114 *
1115 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001116 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001117 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001118 * Module: library/sha512.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001119 * Caller: library/md_wrap.c
1120 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001121 *
1122 * This module adds support for SHA-384 and SHA-512.
1123 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001124#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001125
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001126/**
Paul Bakker0a597072012-09-25 21:55:46 +00001127 * \def POLARSSL_SSL_CACHE_C
1128 *
1129 * Enable simple SSL cache implementation.
1130 *
1131 * Module: library/ssl_cache.c
1132 * Caller:
1133 *
1134 * Requires: POLARSSL_SSL_CACHE_C
1135 */
1136#define POLARSSL_SSL_CACHE_C
1137
1138/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001139 * \def POLARSSL_SSL_CLI_C
1140 *
1141 * Enable the SSL/TLS client code.
1142 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001143 * Module: library/ssl_cli.c
1144 * Caller:
1145 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001146 * Requires: POLARSSL_SSL_TLS_C
1147 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001148 * This module is required for SSL/TLS client support.
1149 */
Paul Bakker40e46942009-01-03 21:51:57 +00001150#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001151
Paul Bakker9a736322012-11-14 12:39:52 +00001152/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001153 * \def POLARSSL_SSL_SRV_C
1154 *
1155 * Enable the SSL/TLS server code.
1156 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001157 * Module: library/ssl_srv.c
1158 * Caller:
1159 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001160 * Requires: POLARSSL_SSL_TLS_C
1161 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001162 * This module is required for SSL/TLS server support.
1163 */
Paul Bakker40e46942009-01-03 21:51:57 +00001164#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001165
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001166/**
1167 * \def POLARSSL_SSL_TLS_C
1168 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001169 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001170 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001171 * Module: library/ssl_tls.c
1172 * Caller: library/ssl_cli.c
1173 * library/ssl_srv.c
1174 *
Paul Bakker7ad00f92013-04-18 23:05:25 +02001175 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001176 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001177 * This module is required for SSL/TLS.
1178 */
Paul Bakker40e46942009-01-03 21:51:57 +00001179#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001180
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001181/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001182 * \def POLARSSL_TIMING_C
1183 *
1184 * Enable the portable timing interface.
1185 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001186 * Module: library/timing.c
1187 * Caller: library/havege.c
1188 *
1189 * This module is used by the HAVEGE random number generator.
1190 */
Paul Bakker40e46942009-01-03 21:51:57 +00001191#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001192
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001193/**
1194 * \def POLARSSL_VERSION_C
1195 *
1196 * Enable run-time version information.
1197 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001198 * Module: library/version.c
1199 *
1200 * This module provides run-time version information.
1201 */
1202#define POLARSSL_VERSION_C
1203
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001204/**
1205 * \def POLARSSL_X509_PARSE_C
1206 *
1207 * Enable X.509 certificate parsing.
1208 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001209 * Module: library/x509parse.c
1210 * Caller: library/ssl_cli.c
1211 * library/ssl_srv.c
1212 * library/ssl_tls.c
1213 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001214 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
1215 * POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001216 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001217 * This module is required for X.509 certificate parsing.
1218 */
Paul Bakker40e46942009-01-03 21:51:57 +00001219#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001220
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001221/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001222 * \def POLARSSL_X509_WRITE_C
1223 *
1224 * Enable X.509 buffer writing.
1225 *
1226 * Module: library/x509write.c
1227 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001228 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001229 *
1230 * This module is required for X.509 certificate request writing.
1231 */
1232#define POLARSSL_X509_WRITE_C
1233
1234/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001235 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001236 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001237 * Enable the XTEA block cipher.
1238 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001239 * Module: library/xtea.c
1240 * Caller:
1241 */
1242#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001243
Paul Bakker0a62cd12011-01-21 11:00:08 +00001244/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001245
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001246/**
1247 * \name SECTION: Module configuration options
1248 *
1249 * This section allows for the setting of module specific sizes and
1250 * configuration options. The default values are already present in the
1251 * relevant header files and should suffice for the regular use cases.
1252 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1253 * only if you have a good reason and know the consequences.
1254 *
1255 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1256 * header file take precedence.
1257 *
1258 * Please check the respective header file for documentation on these
1259 * parameters (to prevent duplicate documentation).
1260 *
1261 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1262 * \{
1263 */
1264//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1265
1266#if defined(POLARSSL_CONFIG_OPTIONS)
1267
1268// MPI / BIGNUM options
1269//
1270#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1271#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1272
1273// CTR_DRBG options
1274//
1275#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default */
1276#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1277#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1278#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1279#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1280
1281// Entropy options
1282//
1283#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1284#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1285
Paul Bakker6e339b52013-07-03 13:37:05 +02001286// Memory options
1287#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1288#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1289#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1290
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001291// SSL Cache options
1292//
1293#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1294#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1295
1296// SSL options
1297//
1298#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
1299
1300#endif /* POLARSSL_CONFIG_OPTIONS */
1301
1302/* \} name */
1303
Paul Bakker7ad00f92013-04-18 23:05:25 +02001304/*
1305 * Sanity checks on defines and dependencies
1306 */
1307#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1308#error "POLARSSL_DHM_C defined, but not all prerequisites"
1309#endif
1310
1311#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1312#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1313#endif
1314
1315#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1316#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1317#endif
1318
1319#if defined(POLARSSL_ECDSA_C) && !defined(POLARSSL_ECP_C)
1320#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1321#endif
1322
1323#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1324#error "POLARSSL_ECP_C defined, but not all prerequisites"
1325#endif
1326
Paul Bakker9e36f042013-06-30 14:34:05 +02001327#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001328#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1329#endif
1330
1331#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1332#error "POLARSSL_GCM_C defined, but not all prerequisites"
1333#endif
1334
Paul Bakkere07f41d2013-04-19 09:08:57 +02001335#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1336#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1337#endif
1338
1339#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1340 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
1341 !defined(POLARSSL_X509_PARSE_C) )
1342#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1343#endif
1344
1345#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1346 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
1347 !defined(POLARSSL_X509_PARSE_C) )
1348#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1349#endif
1350
1351#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
1352 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1353#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1354#endif
1355
1356#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
1357 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1358#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1359#endif
1360
Paul Bakker6e339b52013-07-03 13:37:05 +02001361#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1362#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1363#endif
1364
Paul Bakker7ad00f92013-04-18 23:05:25 +02001365#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1366#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1367#endif
1368
1369#if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C)
1370#error "POLARSSL_PEM_C defined, but not all prerequisites"
1371#endif
1372
1373#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_SSL_TLS_C)
1374#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1375#endif
1376
1377#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1378 !defined(POLARSSL_OID_C) )
1379#error "POLARSSL_RSA_C defined, but not all prerequisites"
1380#endif
1381
1382#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1383#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1384#endif
1385
1386#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_MD5_C) || \
1387 !defined(POLARSSL_SHA1_C) )
1388#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1389#endif
1390
1391#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1392#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1393#endif
1394
1395#if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1396 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
1397 !defined(POLARSSL_RSA_C) )
1398#error "POLARSSL_X509_PARSE_C defined, but not all prerequisites"
1399#endif
1400
1401#if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1402 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1403 !defined(POLARSSL_RSA_C) )
1404#error "POLARSSL_X509_WRITE_C defined, but not all prerequisites"
1405#endif
1406
Paul Bakker5121ce52009-01-03 21:22:43 +00001407#endif /* config.h */