blob: 3869654323596157de27aafdeb3ba4ff83821456 [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 Bakker15566e42011-04-24 21:19:15 +0000108 * \def POLARSSL_AES_ROM_TABLES
109 *
110 * Store the AES tables in ROM.
111 *
112 * Uncomment this macro to store the AES tables in ROM.
113 *
114#define POLARSSL_AES_ROM_TABLES
115 */
116
117/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000118 * \def POLARSSL_CIPHER_MODE_CFB
119 *
120 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
121 */
122#define POLARSSL_CIPHER_MODE_CFB
123
124/**
125 * \def POLARSSL_CIPHER_MODE_CTR
126 *
127 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
128 */
129#define POLARSSL_CIPHER_MODE_CTR
130
131/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000132 * \def POLARSSL_CIPHER_NULL_CIPHER
133 *
134 * Enable NULL cipher.
135 * Warning: Only do so when you know what you are doing. This allows for
136 * encryption or channels without any security!
137 *
138 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
139 * the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000140 * TLS_RSA_WITH_NULL_MD5
141 * TLS_RSA_WITH_NULL_SHA
142 * TLS_RSA_WITH_NULL_SHA256
Paul Bakker41c83d32013-03-20 14:39:14 +0100143 * TLS_ECDHE_RSA_WITH_NULL_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200144 * TLS_PSK_WITH_NULL
145 * TLS_PSK_WITH_NULL256
146 * TLS_PSK_WITH_NULL384
147 * TLS_DHE_PSK_WITH_NULL
148 * TLS_DHE_PSK_WITH_NULL256
149 * TLS_DHE_PSK_WITH_NULL384
150 * TLS_RSA_PSK_WITH_NULL
151 * TLS_RSA_PSK_WITH_NULL256
152 * TLS_RSA_PSK_WITH_NULL384
Paul Bakkerfab5c822012-02-06 16:45:10 +0000153 *
154 * Uncomment this macro to enable the NULL cipher and ciphersuites
155#define POLARSSL_CIPHER_NULL_CIPHER
156 */
157
158/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000159 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
160 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000161 * Enable weak ciphersuites in SSL / TLS
Paul Bakkerfab5c822012-02-06 16:45:10 +0000162 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000163 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000164 *
165 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000166 * TLS_RSA_WITH_DES_CBC_SHA
167 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000168 *
169 * Uncomment this macro to enable weak ciphersuites
170#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
171 */
172
173/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200174 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
175 *
176 * Enable the PSK based ciphersuite modes in SSL / TLS
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200177 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200178 * This enables the following ciphersuites (if other requisites are
179 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200180 * TLS_PSK_WITH_RC4_128_SHA
181 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
182 * TLS_PSK_WITH_AES_128_CBC_SHA
183 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200184 * TLS_PSK_WITH_AES_128_CBC_SHA256
185 * TLS_PSK_WITH_AES_256_CBC_SHA384
186 * TLS_PSK_WITH_AES_128_GCM_SHA256
187 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200188 */
189#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
190
191/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200192 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
193 *
194 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS
195 *
196 * Requires: POLARSSL_DHM_C
197 *
198 * This enables the following ciphersuites (if other requisites are
199 * enabled as well):
200 * TLS_DHE_PSK_WITH_RC4_128_SHA
201 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
202 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
203 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200204 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
205 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
206 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
207 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200208 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200209#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200210
211/**
212 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
213 *
214 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS
Paul Bakker45bda902013-04-19 22:28:21 +0200215 * (NOT YET IMPLEMENTED)
Paul Bakkere07f41d2013-04-19 09:08:57 +0200216 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
217 *
218 * This enables the following ciphersuites (if other requisites are
219 * enabled as well):
220 * TLS_RSA_PSK_WITH_RC4_128_SHA
221 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
222 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
223 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200224 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
225 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
226 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
227 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200228#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
229 */
230
231/**
232 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
233 *
234 * Enable the RSA-only based ciphersuite modes in SSL / TLS
235 *
236 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
237 *
238 * This enables the following ciphersuites (if other requisites are
239 * enabled as well):
240 * TLS_RSA_WITH_AES_128_CBC_SHA
241 * TLS_RSA_WITH_AES_256_CBC_SHA
242 * TLS_RSA_WITH_AES_128_CBC_SHA256
243 * TLS_RSA_WITH_AES_256_CBC_SHA256
244 * TLS_RSA_WITH_AES_128_GCM_SHA256
245 * TLS_RSA_WITH_AES_256_GCM_SHA384
246 * TLS_RSA_WITH_RC4_128_MD5
247 * TLS_RSA_WITH_RC4_128_SHA
248 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
249 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
250 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
251 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
252 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
253 */
254#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
255
256/**
257 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
258 *
259 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS
260 *
261 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
262 *
263 * This enables the following ciphersuites (if other requisites are
264 * enabled as well):
265 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
266 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
267 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
268 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
269 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
270 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
271 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
272 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
273 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
274 */
275#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
276
277/**
278 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
279 *
280 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS
281 *
282 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
283 *
284 * This enables the following ciphersuites (if other requisites are
285 * enabled as well):
286 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
287 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
288 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
289 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
290 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
291 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
292 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
293 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
294 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
295 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
296 */
297#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
298
299/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100300 * \def POLARSSL_ERROR_STRERROR_DUMMY
301 *
302 * Enable a dummy error function to make use of error_strerror() in
303 * third party libraries easier.
304 *
305 * Disable if you run into name conflicts and want to really remove the
306 * error_strerror()
307 */
308#define POLARSSL_ERROR_STRERROR_DUMMY
309
310/**
Paul Bakker15566e42011-04-24 21:19:15 +0000311 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000312 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000313 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
314 *
Paul Bakker15566e42011-04-24 21:19:15 +0000315 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000316 */
Paul Bakker15566e42011-04-24 21:19:15 +0000317#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000318
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000319/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000320 * \def POLARSSL_FS_IO
321 *
322 * Enable functions that use the filesystem.
323 */
324#define POLARSSL_FS_IO
325
326/**
Paul Bakker43655f42011-12-15 20:11:16 +0000327 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
328 *
329 * Do not add default entropy sources. These are the platform specific,
330 * hardclock and HAVEGE based poll functions.
331 *
332 * This is useful to have more control over the added entropy sources in an
333 * application.
334 *
335 * Uncomment this macro to prevent loading of default entropy functions.
336#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
337 */
338
339/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000340 * \def POLARSSL_NO_PLATFORM_ENTROPY
341 *
342 * Do not use built-in platform entropy functions.
343 * This is useful if your platform does not support
344 * standards like the /dev/urandom or Windows CryptoAPI.
345 *
346 * Uncomment this macro to disable the built-in platform entropy functions.
347#define POLARSSL_NO_PLATFORM_ENTROPY
348 */
349
350/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000351 * \def POLARSSL_PKCS1_V21
352 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000353 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
354 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000355 * Enable support for PKCS#1 v2.1 encoding.
356 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
357 */
358#define POLARSSL_PKCS1_V21
359
360/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000361 * \def POLARSSL_RSA_NO_CRT
362 *
363 * Do not use the Chinese Remainder Theorem for the RSA private operation.
364 *
365 * Uncomment this macro to disable the use of CRT in RSA.
366 *
367#define POLARSSL_RSA_NO_CRT
368 */
Paul Bakker15566e42011-04-24 21:19:15 +0000369
370/**
371 * \def POLARSSL_SELF_TEST
372 *
373 * Enable the checkup functions (*_self_test).
374 */
375#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000376
377/**
Paul Bakker40865c82013-01-31 17:13:13 +0100378 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
379 *
380 * Enable sending of alert messages in case of encountered errors as per RFC.
381 * If you choose not to send the alert messages, PolarSSL can still communicate
382 * with other servers, only debugging of failures is harder.
383 *
384 * The advantage of not sending alert messages, is that no information is given
385 * about reasons for failures thus preventing adversaries of gaining intel.
386 *
387 * Enable sending of all alert messages
388 */
389#define POLARSSL_SSL_ALERT_MESSAGES
390
391/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100392 * \def POLARSSL_SSL_DEBUG_ALL
393 *
394 * Enable the debug messages in SSL module for all issues.
395 * Debug messages have been disabled in some places to prevent timing
396 * attacks due to (unbalanced) debugging function calls.
397 *
398 * If you need all error reporting you should enable this during debugging,
399 * but remove this for production servers that should log as well.
400 *
401 * Uncomment this macro to report all debug messages on errors introducing
402 * a timing side-channel.
403 *
404#define POLARSSL_SSL_DEBUG_ALL
405 */
406
407/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000408 * \def POLARSSL_SSL_HW_RECORD_ACCEL
409 *
410 * Enable hooking functions in SSL module for hardware acceleration of
411 * individual records.
412 *
413 * Uncomment this macro to enable hooking functions.
414#define POLARSSL_SSL_HW_RECORD_ACCEL
415 */
416
417/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100418 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
419 *
420 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
421 * SSL Server module (POLARSSL_SSL_SRV_C)
422 *
423 * Comment this macro to disable support for SSLv2 Client Hello messages.
424 */
425#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
426
427/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000428 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
429 *
430 * If set, the X509 parser will not break-off when parsing an X509 certificate
431 * and encountering an unknown critical extension.
432 *
433 * Uncomment to prevent an error.
434 *
435#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
436 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000437
438/**
439 * \def POLARSSL_ZLIB_SUPPORT
440 *
441 * If set, the SSL/TLS module uses ZLIB to support compression and
442 * decompression of packet data.
443 *
444 * Used in: library/ssl_tls.c
445 * library/ssl_cli.c
446 * library/ssl_srv.c
447 *
448 * This feature requires zlib library and headers to be present.
449 *
450 * Uncomment to enable use of ZLIB
451#define POLARSSL_ZLIB_SUPPORT
452 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000453/* \} name */
454
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000455/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000456 * \name SECTION: PolarSSL modules
457 *
458 * This section enables or disables entire modules in PolarSSL
459 * \{
460 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000461
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000462/**
463 * \def POLARSSL_AES_C
464 *
465 * Enable the AES block cipher.
466 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000467 * Module: library/aes.c
468 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000469 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000470 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000471 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000472 * This module enables the following ciphersuites (if other requisites are
473 * enabled as well):
474 * TLS_RSA_WITH_AES_128_CBC_SHA
475 * TLS_RSA_WITH_AES_256_CBC_SHA
476 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
477 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
478 * TLS_RSA_WITH_AES_128_CBC_SHA256
479 * TLS_RSA_WITH_AES_256_CBC_SHA256
480 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
481 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
482 * TLS_RSA_WITH_AES_128_GCM_SHA256
483 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100484 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
485 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200486 * TLS_PSK_WITH_AES_128_CBC_SHA
487 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100488 *
489 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000490 */
Paul Bakker40e46942009-01-03 21:51:57 +0000491#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000492
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000493/**
494 * \def POLARSSL_ARC4_C
495 *
496 * Enable the ARCFOUR stream cipher.
497 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000498 * Module: library/arc4.c
499 * Caller: library/ssl_tls.c
500 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100501 * This module enables the following ciphersuites (if other requisites are
502 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000503 * TLS_RSA_WITH_RC4_128_MD5
504 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100505 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200506 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000507 */
Paul Bakker40e46942009-01-03 21:51:57 +0000508#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000509
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000510/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000511 * \def POLARSSL_ASN1_PARSE_C
512 *
513 * Enable the generic ASN1 parser.
514 *
515 * Module: library/asn1.c
516 * Caller: library/x509parse.c
517 */
518#define POLARSSL_ASN1_PARSE_C
519
520/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000521 * \def POLARSSL_ASN1_WRITE_C
522 *
523 * Enable the generic ASN1 writer.
524 *
525 * Module: library/asn1write.c
526 */
527#define POLARSSL_ASN1_WRITE_C
528
529/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000530 * \def POLARSSL_BASE64_C
531 *
532 * Enable the Base64 module.
533 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000534 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000535 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000536 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000537 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000538 */
Paul Bakker40e46942009-01-03 21:51:57 +0000539#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000540
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000541/**
542 * \def POLARSSL_BIGNUM_C
543 *
Paul Bakker9a736322012-11-14 12:39:52 +0000544 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000545 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000546 * Module: library/bignum.c
547 * Caller: library/dhm.c
548 * library/rsa.c
549 * library/ssl_tls.c
550 * library/x509parse.c
551 *
552 * This module is required for RSA and DHM support.
553 */
Paul Bakker40e46942009-01-03 21:51:57 +0000554#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000555
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000556/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000557 * \def POLARSSL_BLOWFISH_C
558 *
559 * Enable the Blowfish block cipher.
560 *
561 * Module: library/blowfish.c
562 */
563#define POLARSSL_BLOWFISH_C
564
565/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000566 * \def POLARSSL_CAMELLIA_C
567 *
568 * Enable the Camellia block cipher.
569 *
Paul Bakker38119b12009-01-10 23:31:23 +0000570 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000571 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000572 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000573 * This module enables the following ciphersuites (if other requisites are
574 * enabled as well):
575 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
576 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
577 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
578 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
579 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
580 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
581 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
582 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000583 */
584#define POLARSSL_CAMELLIA_C
585
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000586/**
587 * \def POLARSSL_CERTS_C
588 *
589 * Enable the test certificates.
590 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000591 * Module: library/certs.c
592 * Caller:
593 *
594 * This module is used for testing (ssl_client/server).
595 */
Paul Bakker40e46942009-01-03 21:51:57 +0000596#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000597
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000598/**
599 * \def POLARSSL_CIPHER_C
600 *
601 * Enable the generic cipher layer.
602 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000603 * Module: library/cipher.c
604 * Caller:
605 *
606 * Uncomment to enable generic cipher wrappers.
607 */
608#define POLARSSL_CIPHER_C
609
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000610/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000611 * \def POLARSSL_CTR_DRBG_C
612 *
613 * Enable the CTR_DRBG AES-256-based random generator
614 *
615 * Module: library/ctr_drbg.c
616 * Caller:
617 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000618 * Requires: POLARSSL_AES_C
619 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000620 * This module provides the CTR_DRBG AES-256 random number generator.
621 */
622#define POLARSSL_CTR_DRBG_C
623
624/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000625 * \def POLARSSL_DEBUG_C
626 *
627 * Enable the debug functions.
628 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000629 * Module: library/debug.c
630 * Caller: library/ssl_cli.c
631 * library/ssl_srv.c
632 * library/ssl_tls.c
633 *
634 * This module provides debugging functions.
635 */
Paul Bakker40e46942009-01-03 21:51:57 +0000636#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000637
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000638/**
639 * \def POLARSSL_DES_C
640 *
641 * Enable the DES block cipher.
642 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000643 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100644 * Caller: library/pem.c
645 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000646 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000647 * This module enables the following ciphersuites (if other requisites are
648 * enabled as well):
649 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
650 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100651 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200652 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100653 *
654 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000655 */
Paul Bakker40e46942009-01-03 21:51:57 +0000656#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000657
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000658/**
659 * \def POLARSSL_DHM_C
660 *
661 * Enable the Diffie-Hellman-Merkle key exchange.
662 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000663 * Module: library/dhm.c
664 * Caller: library/ssl_cli.c
665 * library/ssl_srv.c
666 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000667 * This module enables the following ciphersuites (if other requisites are
668 * enabled as well):
669 * TLS_DHE_RSA_WITH_DES_CBC_SHA
670 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
671 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
672 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
673 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
674 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
675 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
676 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
677 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
678 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
679 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
680 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000681 */
Paul Bakker40e46942009-01-03 21:51:57 +0000682#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000683
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000684/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100685 * \def POLARSSL_ECDH_C
686 *
687 * Enable the elliptic curve Diffie-Hellman library.
688 *
689 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100690 * Caller: library/ssl_cli.c
691 * library/ssl_srv.c
692 *
693 * This module enables the following ciphersuites (if other requisites are
694 * enabled as well):
695 * TLS_ECDHE_RSA_WITH_NULL_SHA
696 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
697 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
698 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
699 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100700 *
701 * Requires: POLARSSL_ECP_C
702 */
703#define POLARSSL_ECDH_C
704
705/**
706 * \def POLARSSL_ECDSA_C
707 *
708 * Enable the elliptic curve DSA library.
709 *
710 * Module: library/ecdsa.c
711 * Caller:
712 *
713 * Requires: POLARSSL_ECP_C
714 */
715#define POLARSSL_ECDSA_C
716
717/**
718 * \def POLARSSL_ECP_C
719 *
720 * Enable the elliptic curve over GF(p) library.
721 *
722 * Module: library/ecp.c
723 * Caller: library/ecdh.c
724 * library/ecdsa.c
725 *
726 * Requires: POLARSSL_BIGNUM_C
727 */
728#define POLARSSL_ECP_C
729
730/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000731 * \def POLARSSL_ENTROPY_C
732 *
733 * Enable the platform-specific entropy code.
734 *
735 * Module: library/entropy.c
736 * Caller:
737 *
738 * Requires: POLARSSL_SHA4_C
739 *
740 * This module provides a generic entropy pool
741 */
742#define POLARSSL_ENTROPY_C
743
744/**
Paul Bakker9d781402011-05-09 16:17:09 +0000745 * \def POLARSSL_ERROR_C
746 *
747 * Enable error code to error string conversion.
748 *
749 * Module: library/error.c
750 * Caller:
751 *
752 * This module enables err_strerror().
753 */
754#define POLARSSL_ERROR_C
755
756/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000757 * \def POLARSSL_GCM_C
758 *
759 * Enable the Galois/Counter Mode (GCM) for AES
760 *
761 * Module: library/gcm.c
762 *
763 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000764 *
765 * This module enables the following ciphersuites (if other requisites are
766 * enabled as well):
767 * TLS_RSA_WITH_AES_128_GCM_SHA256
768 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000769 */
770#define POLARSSL_GCM_C
771
772/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000773 * \def POLARSSL_HAVEGE_C
774 *
775 * Enable the HAVEGE random generator.
776 *
Paul Bakker2a844242013-06-24 13:01:53 +0200777 * Warning: the HAVEGE random generator is not suitable for virtualized
778 * environments
779 *
780 * Warning: the HAVEGE random generator is dependent on timing and specific
781 * processor traits. It is therefore not advised to use HAVEGE as
782 * your applications primary random generator or primary entropy pool
783 * input. As a secondary input to your entropy pool, it IS able add
784 * the (limited) extra entropy it provides.
785 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000786 * Module: library/havege.c
787 * Caller:
788 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000789 * Requires: POLARSSL_TIMING_C
790 *
Paul Bakker2a844242013-06-24 13:01:53 +0200791 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +0000792#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +0200793 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000794
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000795/**
796 * \def POLARSSL_MD_C
797 *
798 * Enable the generic message digest layer.
799 *
Paul Bakker17373852011-01-06 14:20:01 +0000800 * Module: library/md.c
801 * Caller:
802 *
803 * Uncomment to enable generic message digest wrappers.
804 */
805#define POLARSSL_MD_C
806
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000807/**
808 * \def POLARSSL_MD2_C
809 *
810 * Enable the MD2 hash algorithm
811 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000812 * Module: library/md2.c
813 * Caller: library/x509parse.c
814 *
815 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
816 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000817#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000818 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000819
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000820/**
821 * \def POLARSSL_MD4_C
822 *
823 * Enable the MD4 hash algorithm
824 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000825 * Module: library/md4.c
826 * Caller: library/x509parse.c
827 *
828 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
829 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000830#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000831 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000832
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000833/**
834 * \def POLARSSL_MD5_C
835 *
836 * Enable the MD5 hash algorithm
837 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000838 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100839 * Caller: library/pem.c
840 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000841 * library/x509parse.c
842 *
843 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100844 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000845 */
Paul Bakker40e46942009-01-03 21:51:57 +0000846#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000847
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000848/**
849 * \def POLARSSL_NET_C
850 *
851 * Enable the TCP/IP networking routines.
852 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000853 * Module: library/net.c
854 * Caller:
855 *
856 * This module provides TCP/IP networking routines.
857 */
Paul Bakker40e46942009-01-03 21:51:57 +0000858#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000859
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000860/**
Paul Bakkerc70b9822013-04-07 22:00:46 +0200861 * \def POLARSSL_OID_C
862 *
863 * Enable the OID database
864 *
865 * Module: library/oid.c
866 * Caller: library/rsa.c
867 * library/x509parse.c
868 * library/x509write.c
869 *
870 * This modules translates between OIDs and internal values.
871 */
872#define POLARSSL_OID_C
873
874/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000875 * \def POLARSSL_PADLOCK_C
876 *
877 * Enable VIA Padlock support on x86.
878 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000879 * Module: library/padlock.c
880 * Caller: library/aes.c
881 *
882 * This modules adds support for the VIA PadLock on x86.
883 */
Paul Bakker40e46942009-01-03 21:51:57 +0000884#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000885
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000886/**
Paul Bakkerf518b162012-08-23 13:03:18 +0000887 * \def POLARSSL_PBKDF2_C
888 *
889 * Enable PKCS#5 PBKDF2 key derivation function
890 *
891 * Module: library/pbkdf2.c
892 *
893 * Requires: POLARSSL_MD_C
894 *
895 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +0000896 */
Paul Bakker370e90c2013-04-08 15:19:43 +0200897#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +0000898
899/**
Paul Bakker96743fc2011-02-12 14:30:57 +0000900 * \def POLARSSL_PEM_C
901 *
902 * Enable PEM decoding
903 *
904 * Module: library/pem.c
905 * Caller: library/x509parse.c
906 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000907 * Requires: POLARSSL_BASE64_C
908 *
Paul Bakker96743fc2011-02-12 14:30:57 +0000909 * This modules adds support for decoding PEM files.
910 */
911#define POLARSSL_PEM_C
912
913/**
Paul Bakker5690efc2011-05-26 13:16:06 +0000914 * \def POLARSSL_PKCS11_C
915 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000916 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000917 *
918 * Module: library/ssl_srv.c
919 * Caller: library/ssl_cli.c
920 * library/ssl_srv.c
921 *
922 * Requires: POLARSSL_SSL_TLS_C
923 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000924 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000925 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
926#define POLARSSL_PKCS11_C
927 */
928
929/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000930 * \def POLARSSL_RSA_C
931 *
932 * Enable the RSA public-key cryptosystem.
933 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000934 * Module: library/rsa.c
935 * Caller: library/ssl_cli.c
936 * library/ssl_srv.c
937 * library/ssl_tls.c
938 * library/x509.c
939 *
Paul Bakkerc70b9822013-04-07 22:00:46 +0200940 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000941 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000942 * This module is required for SSL/TLS and MD5-signed certificates.
943 */
Paul Bakker40e46942009-01-03 21:51:57 +0000944#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000945
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000946/**
947 * \def POLARSSL_SHA1_C
948 *
949 * Enable the SHA1 cryptographic hash algorithm.
950 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000951 * Module: library/sha1.c
952 * Caller: library/ssl_cli.c
953 * library/ssl_srv.c
954 * library/ssl_tls.c
955 * library/x509parse.c
956 *
957 * This module is required for SSL/TLS and SHA1-signed certificates.
958 */
Paul Bakker40e46942009-01-03 21:51:57 +0000959#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000960
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000961/**
962 * \def POLARSSL_SHA2_C
963 *
964 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
965 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000966 * Module: library/sha2.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000967 * Caller: library/md_wrap.c
968 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000969 *
970 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +0100971 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +0000972 */
Paul Bakker40e46942009-01-03 21:51:57 +0000973#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000974
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000975/**
976 * \def POLARSSL_SHA4_C
977 *
978 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
979 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000980 * Module: library/sha4.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000981 * Caller: library/md_wrap.c
982 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000983 *
984 * This module adds support for SHA-384 and SHA-512.
985 */
Paul Bakker40e46942009-01-03 21:51:57 +0000986#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000987
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000988/**
Paul Bakker0a597072012-09-25 21:55:46 +0000989 * \def POLARSSL_SSL_CACHE_C
990 *
991 * Enable simple SSL cache implementation.
992 *
993 * Module: library/ssl_cache.c
994 * Caller:
995 *
996 * Requires: POLARSSL_SSL_CACHE_C
997 */
998#define POLARSSL_SSL_CACHE_C
999
1000/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001001 * \def POLARSSL_SSL_CLI_C
1002 *
1003 * Enable the SSL/TLS client code.
1004 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001005 * Module: library/ssl_cli.c
1006 * Caller:
1007 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001008 * Requires: POLARSSL_SSL_TLS_C
1009 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001010 * This module is required for SSL/TLS client support.
1011 */
Paul Bakker40e46942009-01-03 21:51:57 +00001012#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001013
Paul Bakker9a736322012-11-14 12:39:52 +00001014/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001015 * \def POLARSSL_SSL_SRV_C
1016 *
1017 * Enable the SSL/TLS server code.
1018 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001019 * Module: library/ssl_srv.c
1020 * Caller:
1021 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001022 * Requires: POLARSSL_SSL_TLS_C
1023 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001024 * This module is required for SSL/TLS server support.
1025 */
Paul Bakker40e46942009-01-03 21:51:57 +00001026#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001027
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001028/**
1029 * \def POLARSSL_SSL_TLS_C
1030 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001031 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001032 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001033 * Module: library/ssl_tls.c
1034 * Caller: library/ssl_cli.c
1035 * library/ssl_srv.c
1036 *
Paul Bakker7ad00f92013-04-18 23:05:25 +02001037 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001038 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001039 * This module is required for SSL/TLS.
1040 */
Paul Bakker40e46942009-01-03 21:51:57 +00001041#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001042
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001043/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001044 * \def POLARSSL_TIMING_C
1045 *
1046 * Enable the portable timing interface.
1047 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001048 * Module: library/timing.c
1049 * Caller: library/havege.c
1050 *
1051 * This module is used by the HAVEGE random number generator.
1052 */
Paul Bakker40e46942009-01-03 21:51:57 +00001053#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001054
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001055/**
1056 * \def POLARSSL_VERSION_C
1057 *
1058 * Enable run-time version information.
1059 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001060 * Module: library/version.c
1061 *
1062 * This module provides run-time version information.
1063 */
1064#define POLARSSL_VERSION_C
1065
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001066/**
1067 * \def POLARSSL_X509_PARSE_C
1068 *
1069 * Enable X.509 certificate parsing.
1070 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001071 * Module: library/x509parse.c
1072 * Caller: library/ssl_cli.c
1073 * library/ssl_srv.c
1074 * library/ssl_tls.c
1075 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001076 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
1077 * POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001078 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001079 * This module is required for X.509 certificate parsing.
1080 */
Paul Bakker40e46942009-01-03 21:51:57 +00001081#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001082
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001083/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001084 * \def POLARSSL_X509_WRITE_C
1085 *
1086 * Enable X.509 buffer writing.
1087 *
1088 * Module: library/x509write.c
1089 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001090 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001091 *
1092 * This module is required for X.509 certificate request writing.
1093 */
1094#define POLARSSL_X509_WRITE_C
1095
1096/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001097 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001098 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001099 * Enable the XTEA block cipher.
1100 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001101 * Module: library/xtea.c
1102 * Caller:
1103 */
1104#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001105
Paul Bakker0a62cd12011-01-21 11:00:08 +00001106/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001107
Paul Bakker7ad00f92013-04-18 23:05:25 +02001108/*
1109 * Sanity checks on defines and dependencies
1110 */
1111#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1112#error "POLARSSL_DHM_C defined, but not all prerequisites"
1113#endif
1114
1115#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1116#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1117#endif
1118
1119#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1120#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1121#endif
1122
1123#if defined(POLARSSL_ECDSA_C) && !defined(POLARSSL_ECP_C)
1124#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1125#endif
1126
1127#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1128#error "POLARSSL_ECP_C defined, but not all prerequisites"
1129#endif
1130
1131#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA4_C)
1132#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1133#endif
1134
1135#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1136#error "POLARSSL_GCM_C defined, but not all prerequisites"
1137#endif
1138
Paul Bakkere07f41d2013-04-19 09:08:57 +02001139#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1140#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1141#endif
1142
1143#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1144 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
1145 !defined(POLARSSL_X509_PARSE_C) )
1146#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1147#endif
1148
1149#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1150 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
1151 !defined(POLARSSL_X509_PARSE_C) )
1152#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1153#endif
1154
1155#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
1156 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1157#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1158#endif
1159
1160#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
1161 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1162#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1163#endif
1164
Paul Bakker7ad00f92013-04-18 23:05:25 +02001165#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1166#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1167#endif
1168
1169#if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C)
1170#error "POLARSSL_PEM_C defined, but not all prerequisites"
1171#endif
1172
1173#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_SSL_TLS_C)
1174#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1175#endif
1176
1177#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1178 !defined(POLARSSL_OID_C) )
1179#error "POLARSSL_RSA_C defined, but not all prerequisites"
1180#endif
1181
1182#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1183#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1184#endif
1185
1186#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_MD5_C) || \
1187 !defined(POLARSSL_SHA1_C) )
1188#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1189#endif
1190
1191#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1192#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1193#endif
1194
1195#if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1196 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
1197 !defined(POLARSSL_RSA_C) )
1198#error "POLARSSL_X509_PARSE_C defined, but not all prerequisites"
1199#endif
1200
1201#if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1202 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1203 !defined(POLARSSL_RSA_C) )
1204#error "POLARSSL_X509_WRITE_C defined, but not all prerequisites"
1205#endif
1206
Paul Bakker5121ce52009-01-03 21:22:43 +00001207#endif /* config.h */