blob: d83437e8aacfd4dbd559671cf4247505ede095cc [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 Bakker0a597072012-09-25 21:55:46 +00006 * Copyright (C) 2006-2012, 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
132#define POLARSSL_SHA2_ALT
133#define POLARSSL_SHA4_ALT
134 */
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 Bakkerd4a56ec2013-04-16 18:05:29 +0200203 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
204 *
205 * Enable the PSK based ciphersuite modes in SSL / TLS
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200206 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200207 * This enables the following ciphersuites (if other requisites are
208 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200209 * TLS_PSK_WITH_RC4_128_SHA
210 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
211 * TLS_PSK_WITH_AES_128_CBC_SHA
212 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200213 * TLS_PSK_WITH_AES_128_CBC_SHA256
214 * TLS_PSK_WITH_AES_256_CBC_SHA384
215 * TLS_PSK_WITH_AES_128_GCM_SHA256
216 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200217 */
218#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
219
220/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200221 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
222 *
223 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS
224 *
225 * Requires: POLARSSL_DHM_C
226 *
227 * This enables the following ciphersuites (if other requisites are
228 * enabled as well):
229 * TLS_DHE_PSK_WITH_RC4_128_SHA
230 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
231 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
232 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200233 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
234 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
235 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
236 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200237 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200238#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200239
240/**
241 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
242 *
243 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS
Paul Bakker45bda902013-04-19 22:28:21 +0200244 * (NOT YET IMPLEMENTED)
Paul Bakkere07f41d2013-04-19 09:08:57 +0200245 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
246 *
247 * This enables the following ciphersuites (if other requisites are
248 * enabled as well):
249 * TLS_RSA_PSK_WITH_RC4_128_SHA
250 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
251 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
252 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200253 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
254 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
255 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
256 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200257#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
258 */
259
260/**
261 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
262 *
263 * Enable the RSA-only based ciphersuite modes in SSL / TLS
264 *
265 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
266 *
267 * This enables the following ciphersuites (if other requisites are
268 * enabled as well):
269 * TLS_RSA_WITH_AES_128_CBC_SHA
270 * TLS_RSA_WITH_AES_256_CBC_SHA
271 * TLS_RSA_WITH_AES_128_CBC_SHA256
272 * TLS_RSA_WITH_AES_256_CBC_SHA256
273 * TLS_RSA_WITH_AES_128_GCM_SHA256
274 * TLS_RSA_WITH_AES_256_GCM_SHA384
275 * TLS_RSA_WITH_RC4_128_MD5
276 * TLS_RSA_WITH_RC4_128_SHA
277 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
278 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
279 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
280 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
281 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
282 */
283#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
284
285/**
286 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
287 *
288 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS
289 *
290 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
291 *
292 * This enables the following ciphersuites (if other requisites are
293 * enabled as well):
294 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
295 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
296 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
297 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
298 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
299 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
300 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
301 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
302 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
303 */
304#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
305
306/**
307 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
308 *
309 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS
310 *
311 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
312 *
313 * This enables the following ciphersuites (if other requisites are
314 * enabled as well):
315 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
316 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
317 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
318 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
319 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
320 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
321 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
322 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
323 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
324 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
325 */
326#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
327
328/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100329 * \def POLARSSL_ERROR_STRERROR_DUMMY
330 *
331 * Enable a dummy error function to make use of error_strerror() in
332 * third party libraries easier.
333 *
334 * Disable if you run into name conflicts and want to really remove the
335 * error_strerror()
336 */
337#define POLARSSL_ERROR_STRERROR_DUMMY
338
339/**
Paul Bakker15566e42011-04-24 21:19:15 +0000340 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000341 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000342 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
343 *
Paul Bakker15566e42011-04-24 21:19:15 +0000344 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000345 */
Paul Bakker15566e42011-04-24 21:19:15 +0000346#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000347
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000348/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000349 * \def POLARSSL_FS_IO
350 *
351 * Enable functions that use the filesystem.
352 */
353#define POLARSSL_FS_IO
354
355/**
Paul Bakker43655f42011-12-15 20:11:16 +0000356 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
357 *
358 * Do not add default entropy sources. These are the platform specific,
359 * hardclock and HAVEGE based poll functions.
360 *
361 * This is useful to have more control over the added entropy sources in an
362 * application.
363 *
364 * Uncomment this macro to prevent loading of default entropy functions.
365#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
366 */
367
368/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000369 * \def POLARSSL_NO_PLATFORM_ENTROPY
370 *
371 * Do not use built-in platform entropy functions.
372 * This is useful if your platform does not support
373 * standards like the /dev/urandom or Windows CryptoAPI.
374 *
375 * Uncomment this macro to disable the built-in platform entropy functions.
376#define POLARSSL_NO_PLATFORM_ENTROPY
377 */
378
379/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000380 * \def POLARSSL_PKCS1_V21
381 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000382 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
383 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000384 * Enable support for PKCS#1 v2.1 encoding.
385 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
386 */
387#define POLARSSL_PKCS1_V21
388
389/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000390 * \def POLARSSL_RSA_NO_CRT
391 *
392 * Do not use the Chinese Remainder Theorem for the RSA private operation.
393 *
394 * Uncomment this macro to disable the use of CRT in RSA.
395 *
396#define POLARSSL_RSA_NO_CRT
397 */
Paul Bakker15566e42011-04-24 21:19:15 +0000398
399/**
400 * \def POLARSSL_SELF_TEST
401 *
402 * Enable the checkup functions (*_self_test).
403 */
404#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000405
406/**
Paul Bakker40865c82013-01-31 17:13:13 +0100407 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
408 *
409 * Enable sending of alert messages in case of encountered errors as per RFC.
410 * If you choose not to send the alert messages, PolarSSL can still communicate
411 * with other servers, only debugging of failures is harder.
412 *
413 * The advantage of not sending alert messages, is that no information is given
414 * about reasons for failures thus preventing adversaries of gaining intel.
415 *
416 * Enable sending of all alert messages
417 */
418#define POLARSSL_SSL_ALERT_MESSAGES
419
420/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100421 * \def POLARSSL_SSL_DEBUG_ALL
422 *
423 * Enable the debug messages in SSL module for all issues.
424 * Debug messages have been disabled in some places to prevent timing
425 * attacks due to (unbalanced) debugging function calls.
426 *
427 * If you need all error reporting you should enable this during debugging,
428 * but remove this for production servers that should log as well.
429 *
430 * Uncomment this macro to report all debug messages on errors introducing
431 * a timing side-channel.
432 *
433#define POLARSSL_SSL_DEBUG_ALL
434 */
435
436/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000437 * \def POLARSSL_SSL_HW_RECORD_ACCEL
438 *
439 * Enable hooking functions in SSL module for hardware acceleration of
440 * individual records.
441 *
442 * Uncomment this macro to enable hooking functions.
443#define POLARSSL_SSL_HW_RECORD_ACCEL
444 */
445
446/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100447 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
448 *
449 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
450 * SSL Server module (POLARSSL_SSL_SRV_C)
451 *
452 * Comment this macro to disable support for SSLv2 Client Hello messages.
453 */
454#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
455
456/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000457 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
458 *
459 * If set, the X509 parser will not break-off when parsing an X509 certificate
460 * and encountering an unknown critical extension.
461 *
462 * Uncomment to prevent an error.
463 *
464#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
465 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000466
467/**
468 * \def POLARSSL_ZLIB_SUPPORT
469 *
470 * If set, the SSL/TLS module uses ZLIB to support compression and
471 * decompression of packet data.
472 *
473 * Used in: library/ssl_tls.c
474 * library/ssl_cli.c
475 * library/ssl_srv.c
476 *
477 * This feature requires zlib library and headers to be present.
478 *
479 * Uncomment to enable use of ZLIB
480#define POLARSSL_ZLIB_SUPPORT
481 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000482/* \} name */
483
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000484/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000485 * \name SECTION: PolarSSL modules
486 *
487 * This section enables or disables entire modules in PolarSSL
488 * \{
489 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000490
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000491/**
492 * \def POLARSSL_AES_C
493 *
494 * Enable the AES block cipher.
495 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000496 * Module: library/aes.c
497 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000498 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000499 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000500 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000501 * This module enables the following ciphersuites (if other requisites are
502 * enabled as well):
503 * TLS_RSA_WITH_AES_128_CBC_SHA
504 * TLS_RSA_WITH_AES_256_CBC_SHA
505 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
506 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
507 * TLS_RSA_WITH_AES_128_CBC_SHA256
508 * TLS_RSA_WITH_AES_256_CBC_SHA256
509 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
510 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
511 * TLS_RSA_WITH_AES_128_GCM_SHA256
512 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100513 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
514 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200515 * TLS_PSK_WITH_AES_128_CBC_SHA
516 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100517 *
518 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000519 */
Paul Bakker40e46942009-01-03 21:51:57 +0000520#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000521
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000522/**
523 * \def POLARSSL_ARC4_C
524 *
525 * Enable the ARCFOUR stream cipher.
526 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000527 * Module: library/arc4.c
528 * Caller: library/ssl_tls.c
529 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100530 * This module enables the following ciphersuites (if other requisites are
531 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000532 * TLS_RSA_WITH_RC4_128_MD5
533 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100534 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200535 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000536 */
Paul Bakker40e46942009-01-03 21:51:57 +0000537#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000538
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000539/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000540 * \def POLARSSL_ASN1_PARSE_C
541 *
542 * Enable the generic ASN1 parser.
543 *
544 * Module: library/asn1.c
545 * Caller: library/x509parse.c
546 */
547#define POLARSSL_ASN1_PARSE_C
548
549/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000550 * \def POLARSSL_ASN1_WRITE_C
551 *
552 * Enable the generic ASN1 writer.
553 *
554 * Module: library/asn1write.c
555 */
556#define POLARSSL_ASN1_WRITE_C
557
558/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000559 * \def POLARSSL_BASE64_C
560 *
561 * Enable the Base64 module.
562 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000563 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000564 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000565 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000566 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000567 */
Paul Bakker40e46942009-01-03 21:51:57 +0000568#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000569
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000570/**
571 * \def POLARSSL_BIGNUM_C
572 *
Paul Bakker9a736322012-11-14 12:39:52 +0000573 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000574 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000575 * Module: library/bignum.c
576 * Caller: library/dhm.c
577 * library/rsa.c
578 * library/ssl_tls.c
579 * library/x509parse.c
580 *
581 * This module is required for RSA and DHM support.
582 */
Paul Bakker40e46942009-01-03 21:51:57 +0000583#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000584
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000585/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000586 * \def POLARSSL_BLOWFISH_C
587 *
588 * Enable the Blowfish block cipher.
589 *
590 * Module: library/blowfish.c
591 */
592#define POLARSSL_BLOWFISH_C
593
594/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000595 * \def POLARSSL_CAMELLIA_C
596 *
597 * Enable the Camellia block cipher.
598 *
Paul Bakker38119b12009-01-10 23:31:23 +0000599 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000600 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000601 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000602 * This module enables the following ciphersuites (if other requisites are
603 * enabled as well):
604 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
605 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
606 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
607 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
608 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
609 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
610 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
611 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000612 */
613#define POLARSSL_CAMELLIA_C
614
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000615/**
616 * \def POLARSSL_CERTS_C
617 *
618 * Enable the test certificates.
619 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000620 * Module: library/certs.c
621 * Caller:
622 *
623 * This module is used for testing (ssl_client/server).
624 */
Paul Bakker40e46942009-01-03 21:51:57 +0000625#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000626
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000627/**
628 * \def POLARSSL_CIPHER_C
629 *
630 * Enable the generic cipher layer.
631 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000632 * Module: library/cipher.c
633 * Caller:
634 *
635 * Uncomment to enable generic cipher wrappers.
636 */
637#define POLARSSL_CIPHER_C
638
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000639/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000640 * \def POLARSSL_CTR_DRBG_C
641 *
642 * Enable the CTR_DRBG AES-256-based random generator
643 *
644 * Module: library/ctr_drbg.c
645 * Caller:
646 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000647 * Requires: POLARSSL_AES_C
648 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000649 * This module provides the CTR_DRBG AES-256 random number generator.
650 */
651#define POLARSSL_CTR_DRBG_C
652
653/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000654 * \def POLARSSL_DEBUG_C
655 *
656 * Enable the debug functions.
657 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000658 * Module: library/debug.c
659 * Caller: library/ssl_cli.c
660 * library/ssl_srv.c
661 * library/ssl_tls.c
662 *
663 * This module provides debugging functions.
664 */
Paul Bakker40e46942009-01-03 21:51:57 +0000665#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000666
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000667/**
668 * \def POLARSSL_DES_C
669 *
670 * Enable the DES block cipher.
671 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000672 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100673 * Caller: library/pem.c
674 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000675 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000676 * This module enables the following ciphersuites (if other requisites are
677 * enabled as well):
678 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
679 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100680 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200681 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100682 *
683 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000684 */
Paul Bakker40e46942009-01-03 21:51:57 +0000685#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000686
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000687/**
688 * \def POLARSSL_DHM_C
689 *
690 * Enable the Diffie-Hellman-Merkle key exchange.
691 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000692 * Module: library/dhm.c
693 * Caller: library/ssl_cli.c
694 * library/ssl_srv.c
695 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000696 * This module enables the following ciphersuites (if other requisites are
697 * enabled as well):
698 * TLS_DHE_RSA_WITH_DES_CBC_SHA
699 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
700 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
701 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
702 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
703 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
704 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
705 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
706 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
707 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
708 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
709 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000710 */
Paul Bakker40e46942009-01-03 21:51:57 +0000711#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000712
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000713/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100714 * \def POLARSSL_ECDH_C
715 *
716 * Enable the elliptic curve Diffie-Hellman library.
717 *
718 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100719 * Caller: library/ssl_cli.c
720 * library/ssl_srv.c
721 *
722 * This module enables the following ciphersuites (if other requisites are
723 * enabled as well):
724 * TLS_ECDHE_RSA_WITH_NULL_SHA
725 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
726 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
727 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
728 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100729 *
730 * Requires: POLARSSL_ECP_C
731 */
732#define POLARSSL_ECDH_C
733
734/**
735 * \def POLARSSL_ECDSA_C
736 *
737 * Enable the elliptic curve DSA library.
738 *
739 * Module: library/ecdsa.c
740 * Caller:
741 *
742 * Requires: POLARSSL_ECP_C
743 */
744#define POLARSSL_ECDSA_C
745
746/**
747 * \def POLARSSL_ECP_C
748 *
749 * Enable the elliptic curve over GF(p) library.
750 *
751 * Module: library/ecp.c
752 * Caller: library/ecdh.c
753 * library/ecdsa.c
754 *
755 * Requires: POLARSSL_BIGNUM_C
756 */
757#define POLARSSL_ECP_C
758
759/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000760 * \def POLARSSL_ENTROPY_C
761 *
762 * Enable the platform-specific entropy code.
763 *
764 * Module: library/entropy.c
765 * Caller:
766 *
767 * Requires: POLARSSL_SHA4_C
768 *
769 * This module provides a generic entropy pool
770 */
771#define POLARSSL_ENTROPY_C
772
773/**
Paul Bakker9d781402011-05-09 16:17:09 +0000774 * \def POLARSSL_ERROR_C
775 *
776 * Enable error code to error string conversion.
777 *
778 * Module: library/error.c
779 * Caller:
780 *
781 * This module enables err_strerror().
782 */
783#define POLARSSL_ERROR_C
784
785/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000786 * \def POLARSSL_GCM_C
787 *
788 * Enable the Galois/Counter Mode (GCM) for AES
789 *
790 * Module: library/gcm.c
791 *
792 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000793 *
794 * This module enables the following ciphersuites (if other requisites are
795 * enabled as well):
796 * TLS_RSA_WITH_AES_128_GCM_SHA256
797 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000798 */
799#define POLARSSL_GCM_C
800
801/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000802 * \def POLARSSL_HAVEGE_C
803 *
804 * Enable the HAVEGE random generator.
805 *
Paul Bakker2a844242013-06-24 13:01:53 +0200806 * Warning: the HAVEGE random generator is not suitable for virtualized
807 * environments
808 *
809 * Warning: the HAVEGE random generator is dependent on timing and specific
810 * processor traits. It is therefore not advised to use HAVEGE as
811 * your applications primary random generator or primary entropy pool
812 * input. As a secondary input to your entropy pool, it IS able add
813 * the (limited) extra entropy it provides.
814 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000815 * Module: library/havege.c
816 * Caller:
817 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000818 * Requires: POLARSSL_TIMING_C
819 *
Paul Bakker2a844242013-06-24 13:01:53 +0200820 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +0000821#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +0200822 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000823
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000824/**
825 * \def POLARSSL_MD_C
826 *
827 * Enable the generic message digest layer.
828 *
Paul Bakker17373852011-01-06 14:20:01 +0000829 * Module: library/md.c
830 * Caller:
831 *
832 * Uncomment to enable generic message digest wrappers.
833 */
834#define POLARSSL_MD_C
835
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000836/**
837 * \def POLARSSL_MD2_C
838 *
839 * Enable the MD2 hash algorithm
840 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000841 * Module: library/md2.c
842 * Caller: library/x509parse.c
843 *
844 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
845 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000846#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000847 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000848
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000849/**
850 * \def POLARSSL_MD4_C
851 *
852 * Enable the MD4 hash algorithm
853 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000854 * Module: library/md4.c
855 * Caller: library/x509parse.c
856 *
857 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
858 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000859#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000860 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000861
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000862/**
863 * \def POLARSSL_MD5_C
864 *
865 * Enable the MD5 hash algorithm
866 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000867 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100868 * Caller: library/pem.c
869 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000870 * library/x509parse.c
871 *
872 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100873 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000874 */
Paul Bakker40e46942009-01-03 21:51:57 +0000875#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000876
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000877/**
878 * \def POLARSSL_NET_C
879 *
880 * Enable the TCP/IP networking routines.
881 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000882 * Module: library/net.c
883 * Caller:
884 *
885 * This module provides TCP/IP networking routines.
886 */
Paul Bakker40e46942009-01-03 21:51:57 +0000887#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000888
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000889/**
Paul Bakkerc70b9822013-04-07 22:00:46 +0200890 * \def POLARSSL_OID_C
891 *
892 * Enable the OID database
893 *
894 * Module: library/oid.c
895 * Caller: library/rsa.c
896 * library/x509parse.c
897 * library/x509write.c
898 *
899 * This modules translates between OIDs and internal values.
900 */
901#define POLARSSL_OID_C
902
903/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000904 * \def POLARSSL_PADLOCK_C
905 *
906 * Enable VIA Padlock support on x86.
907 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000908 * Module: library/padlock.c
909 * Caller: library/aes.c
910 *
911 * This modules adds support for the VIA PadLock on x86.
912 */
Paul Bakker40e46942009-01-03 21:51:57 +0000913#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000914
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000915/**
Paul Bakkerf518b162012-08-23 13:03:18 +0000916 * \def POLARSSL_PBKDF2_C
917 *
918 * Enable PKCS#5 PBKDF2 key derivation function
Paul Bakkerb0c19a42013-06-24 19:26:38 +0200919 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +0000920 *
921 * Module: library/pbkdf2.c
922 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +0200923 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +0000924 *
925 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +0000926 */
Paul Bakker370e90c2013-04-08 15:19:43 +0200927#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +0000928
929/**
Paul Bakker96743fc2011-02-12 14:30:57 +0000930 * \def POLARSSL_PEM_C
931 *
932 * Enable PEM decoding
933 *
934 * Module: library/pem.c
935 * Caller: library/x509parse.c
936 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000937 * Requires: POLARSSL_BASE64_C
938 *
Paul Bakker96743fc2011-02-12 14:30:57 +0000939 * This modules adds support for decoding PEM files.
940 */
941#define POLARSSL_PEM_C
942
943/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +0200944 * \def POLARSSL_PKCS5_C
945 *
946 * Enable PKCS#5 functions
947 *
948 * Module: library/pkcs5.c
949 *
950 * Requires: POLARSSL_MD_C
951 *
952 * This module adds support for the PKCS#5 functions.
953 */
954#define POLARSSL_PKCS5_C
955
956/**
Paul Bakker5690efc2011-05-26 13:16:06 +0000957 * \def POLARSSL_PKCS11_C
958 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000959 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000960 *
961 * Module: library/ssl_srv.c
962 * Caller: library/ssl_cli.c
963 * library/ssl_srv.c
964 *
965 * Requires: POLARSSL_SSL_TLS_C
966 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000967 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000968 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
969#define POLARSSL_PKCS11_C
970 */
971
972/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +0200973 * \def POLARSSL_PKCS12_C
974 *
975 * Enable PKCS#12 PBE functions
976 * Adds algorithms for parsing PKCS#8 encrypted private keys
977 *
978 * Module: library/pkcs12.c
979 * Caller: library/x509parse.c
980 *
981 * Requires: POLARSSL_ASN1_PARSE_C
982 * Can use: POLARSSL_SHA1_C, POLARSSL_DES_C, POLARSSL_ARC4_C
983 *
984 * This module enables PKCS#12 functions.
985 */
986#define POLARSSL_PKCS12_C
987
988/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000989 * \def POLARSSL_RSA_C
990 *
991 * Enable the RSA public-key cryptosystem.
992 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000993 * Module: library/rsa.c
994 * Caller: library/ssl_cli.c
995 * library/ssl_srv.c
996 * library/ssl_tls.c
997 * library/x509.c
998 *
Paul Bakkerc70b9822013-04-07 22:00:46 +0200999 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001000 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001001 * This module is required for SSL/TLS and MD5-signed certificates.
1002 */
Paul Bakker40e46942009-01-03 21:51:57 +00001003#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001004
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001005/**
1006 * \def POLARSSL_SHA1_C
1007 *
1008 * Enable the SHA1 cryptographic hash algorithm.
1009 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001010 * Module: library/sha1.c
1011 * Caller: library/ssl_cli.c
1012 * library/ssl_srv.c
1013 * library/ssl_tls.c
1014 * library/x509parse.c
1015 *
1016 * This module is required for SSL/TLS and SHA1-signed certificates.
1017 */
Paul Bakker40e46942009-01-03 21:51:57 +00001018#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001019
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001020/**
1021 * \def POLARSSL_SHA2_C
1022 *
1023 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
1024 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001025 * Module: library/sha2.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001026 * Caller: library/md_wrap.c
1027 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001028 *
1029 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001030 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001031 */
Paul Bakker40e46942009-01-03 21:51:57 +00001032#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001033
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001034/**
1035 * \def POLARSSL_SHA4_C
1036 *
1037 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
1038 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001039 * Module: library/sha4.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001040 * Caller: library/md_wrap.c
1041 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001042 *
1043 * This module adds support for SHA-384 and SHA-512.
1044 */
Paul Bakker40e46942009-01-03 21:51:57 +00001045#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001046
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001047/**
Paul Bakker0a597072012-09-25 21:55:46 +00001048 * \def POLARSSL_SSL_CACHE_C
1049 *
1050 * Enable simple SSL cache implementation.
1051 *
1052 * Module: library/ssl_cache.c
1053 * Caller:
1054 *
1055 * Requires: POLARSSL_SSL_CACHE_C
1056 */
1057#define POLARSSL_SSL_CACHE_C
1058
1059/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001060 * \def POLARSSL_SSL_CLI_C
1061 *
1062 * Enable the SSL/TLS client code.
1063 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001064 * Module: library/ssl_cli.c
1065 * Caller:
1066 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001067 * Requires: POLARSSL_SSL_TLS_C
1068 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001069 * This module is required for SSL/TLS client support.
1070 */
Paul Bakker40e46942009-01-03 21:51:57 +00001071#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001072
Paul Bakker9a736322012-11-14 12:39:52 +00001073/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001074 * \def POLARSSL_SSL_SRV_C
1075 *
1076 * Enable the SSL/TLS server code.
1077 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001078 * Module: library/ssl_srv.c
1079 * Caller:
1080 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001081 * Requires: POLARSSL_SSL_TLS_C
1082 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001083 * This module is required for SSL/TLS server support.
1084 */
Paul Bakker40e46942009-01-03 21:51:57 +00001085#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001086
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001087/**
1088 * \def POLARSSL_SSL_TLS_C
1089 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001090 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001091 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001092 * Module: library/ssl_tls.c
1093 * Caller: library/ssl_cli.c
1094 * library/ssl_srv.c
1095 *
Paul Bakker7ad00f92013-04-18 23:05:25 +02001096 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001097 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001098 * This module is required for SSL/TLS.
1099 */
Paul Bakker40e46942009-01-03 21:51:57 +00001100#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001101
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001102/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001103 * \def POLARSSL_TIMING_C
1104 *
1105 * Enable the portable timing interface.
1106 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001107 * Module: library/timing.c
1108 * Caller: library/havege.c
1109 *
1110 * This module is used by the HAVEGE random number generator.
1111 */
Paul Bakker40e46942009-01-03 21:51:57 +00001112#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001113
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001114/**
1115 * \def POLARSSL_VERSION_C
1116 *
1117 * Enable run-time version information.
1118 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001119 * Module: library/version.c
1120 *
1121 * This module provides run-time version information.
1122 */
1123#define POLARSSL_VERSION_C
1124
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001125/**
1126 * \def POLARSSL_X509_PARSE_C
1127 *
1128 * Enable X.509 certificate parsing.
1129 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001130 * Module: library/x509parse.c
1131 * Caller: library/ssl_cli.c
1132 * library/ssl_srv.c
1133 * library/ssl_tls.c
1134 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001135 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
1136 * POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001137 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001138 * This module is required for X.509 certificate parsing.
1139 */
Paul Bakker40e46942009-01-03 21:51:57 +00001140#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001141
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001142/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001143 * \def POLARSSL_X509_WRITE_C
1144 *
1145 * Enable X.509 buffer writing.
1146 *
1147 * Module: library/x509write.c
1148 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001149 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001150 *
1151 * This module is required for X.509 certificate request writing.
1152 */
1153#define POLARSSL_X509_WRITE_C
1154
1155/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001156 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001157 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001158 * Enable the XTEA block cipher.
1159 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001160 * Module: library/xtea.c
1161 * Caller:
1162 */
1163#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001164
Paul Bakker0a62cd12011-01-21 11:00:08 +00001165/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001166
Paul Bakker7ad00f92013-04-18 23:05:25 +02001167/*
1168 * Sanity checks on defines and dependencies
1169 */
1170#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1171#error "POLARSSL_DHM_C defined, but not all prerequisites"
1172#endif
1173
1174#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1175#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1176#endif
1177
1178#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1179#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1180#endif
1181
1182#if defined(POLARSSL_ECDSA_C) && !defined(POLARSSL_ECP_C)
1183#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1184#endif
1185
1186#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1187#error "POLARSSL_ECP_C defined, but not all prerequisites"
1188#endif
1189
1190#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA4_C)
1191#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1192#endif
1193
1194#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1195#error "POLARSSL_GCM_C defined, but not all prerequisites"
1196#endif
1197
Paul Bakkere07f41d2013-04-19 09:08:57 +02001198#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1199#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1200#endif
1201
1202#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1203 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
1204 !defined(POLARSSL_X509_PARSE_C) )
1205#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1206#endif
1207
1208#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1209 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
1210 !defined(POLARSSL_X509_PARSE_C) )
1211#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1212#endif
1213
1214#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
1215 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1216#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1217#endif
1218
1219#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
1220 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1221#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1222#endif
1223
Paul Bakker7ad00f92013-04-18 23:05:25 +02001224#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1225#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1226#endif
1227
1228#if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C)
1229#error "POLARSSL_PEM_C defined, but not all prerequisites"
1230#endif
1231
1232#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_SSL_TLS_C)
1233#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1234#endif
1235
1236#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1237 !defined(POLARSSL_OID_C) )
1238#error "POLARSSL_RSA_C defined, but not all prerequisites"
1239#endif
1240
1241#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1242#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1243#endif
1244
1245#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_MD5_C) || \
1246 !defined(POLARSSL_SHA1_C) )
1247#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1248#endif
1249
1250#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1251#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1252#endif
1253
1254#if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1255 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
1256 !defined(POLARSSL_RSA_C) )
1257#error "POLARSSL_X509_PARSE_C defined, but not all prerequisites"
1258#endif
1259
1260#if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1261 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1262 !defined(POLARSSL_RSA_C) )
1263#error "POLARSSL_X509_WRITE_C defined, but not all prerequisites"
1264#endif
1265
Paul Bakker5121ce52009-01-03 21:22:43 +00001266#endif /* config.h */