blob: 40ea45582a10129079dfe43aa54eb318d3e5dcd0 [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 Bakkerfab5c822012-02-06 16:45:10 +0000144 *
145 * Uncomment this macro to enable the NULL cipher and ciphersuites
146#define POLARSSL_CIPHER_NULL_CIPHER
147 */
148
149/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000150 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
151 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000152 * Enable weak ciphersuites in SSL / TLS
Paul Bakkerfab5c822012-02-06 16:45:10 +0000153 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000154 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000155 *
156 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000157 * TLS_RSA_WITH_DES_CBC_SHA
158 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000159 *
160 * Uncomment this macro to enable weak ciphersuites
161#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
162 */
163
164/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100165 * \def POLARSSL_ERROR_STRERROR_DUMMY
166 *
167 * Enable a dummy error function to make use of error_strerror() in
168 * third party libraries easier.
169 *
170 * Disable if you run into name conflicts and want to really remove the
171 * error_strerror()
172 */
173#define POLARSSL_ERROR_STRERROR_DUMMY
174
175/**
Paul Bakker15566e42011-04-24 21:19:15 +0000176 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000177 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000178 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
179 *
Paul Bakker15566e42011-04-24 21:19:15 +0000180 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000181 */
Paul Bakker15566e42011-04-24 21:19:15 +0000182#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000183
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000184/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000185 * \def POLARSSL_FS_IO
186 *
187 * Enable functions that use the filesystem.
188 */
189#define POLARSSL_FS_IO
190
191/**
Paul Bakker43655f42011-12-15 20:11:16 +0000192 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
193 *
194 * Do not add default entropy sources. These are the platform specific,
195 * hardclock and HAVEGE based poll functions.
196 *
197 * This is useful to have more control over the added entropy sources in an
198 * application.
199 *
200 * Uncomment this macro to prevent loading of default entropy functions.
201#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
202 */
203
204/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000205 * \def POLARSSL_NO_PLATFORM_ENTROPY
206 *
207 * Do not use built-in platform entropy functions.
208 * This is useful if your platform does not support
209 * standards like the /dev/urandom or Windows CryptoAPI.
210 *
211 * Uncomment this macro to disable the built-in platform entropy functions.
212#define POLARSSL_NO_PLATFORM_ENTROPY
213 */
214
215/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000216 * \def POLARSSL_PKCS1_V21
217 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000218 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
219 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000220 * Enable support for PKCS#1 v2.1 encoding.
221 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
222 */
223#define POLARSSL_PKCS1_V21
224
225/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000226 * \def POLARSSL_RSA_NO_CRT
227 *
228 * Do not use the Chinese Remainder Theorem for the RSA private operation.
229 *
230 * Uncomment this macro to disable the use of CRT in RSA.
231 *
232#define POLARSSL_RSA_NO_CRT
233 */
Paul Bakker15566e42011-04-24 21:19:15 +0000234
235/**
236 * \def POLARSSL_SELF_TEST
237 *
238 * Enable the checkup functions (*_self_test).
239 */
240#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000241
242/**
Paul Bakker40865c82013-01-31 17:13:13 +0100243 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
244 *
245 * Enable sending of alert messages in case of encountered errors as per RFC.
246 * If you choose not to send the alert messages, PolarSSL can still communicate
247 * with other servers, only debugging of failures is harder.
248 *
249 * The advantage of not sending alert messages, is that no information is given
250 * about reasons for failures thus preventing adversaries of gaining intel.
251 *
252 * Enable sending of all alert messages
253 */
254#define POLARSSL_SSL_ALERT_MESSAGES
255
256/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100257 * \def POLARSSL_SSL_DEBUG_ALL
258 *
259 * Enable the debug messages in SSL module for all issues.
260 * Debug messages have been disabled in some places to prevent timing
261 * attacks due to (unbalanced) debugging function calls.
262 *
263 * If you need all error reporting you should enable this during debugging,
264 * but remove this for production servers that should log as well.
265 *
266 * Uncomment this macro to report all debug messages on errors introducing
267 * a timing side-channel.
268 *
269#define POLARSSL_SSL_DEBUG_ALL
270 */
271
272/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000273 * \def POLARSSL_SSL_HW_RECORD_ACCEL
274 *
275 * Enable hooking functions in SSL module for hardware acceleration of
276 * individual records.
277 *
278 * Uncomment this macro to enable hooking functions.
279#define POLARSSL_SSL_HW_RECORD_ACCEL
280 */
281
282/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100283 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
284 *
285 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
286 * SSL Server module (POLARSSL_SSL_SRV_C)
287 *
288 * Comment this macro to disable support for SSLv2 Client Hello messages.
289 */
290#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
291
292/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000293 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
294 *
295 * If set, the X509 parser will not break-off when parsing an X509 certificate
296 * and encountering an unknown critical extension.
297 *
298 * Uncomment to prevent an error.
299 *
300#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
301 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000302
303/**
304 * \def POLARSSL_ZLIB_SUPPORT
305 *
306 * If set, the SSL/TLS module uses ZLIB to support compression and
307 * decompression of packet data.
308 *
309 * Used in: library/ssl_tls.c
310 * library/ssl_cli.c
311 * library/ssl_srv.c
312 *
313 * This feature requires zlib library and headers to be present.
314 *
315 * Uncomment to enable use of ZLIB
316#define POLARSSL_ZLIB_SUPPORT
317 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000318/* \} name */
319
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000320/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000321 * \name SECTION: PolarSSL modules
322 *
323 * This section enables or disables entire modules in PolarSSL
324 * \{
325 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000326
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000327/**
328 * \def POLARSSL_AES_C
329 *
330 * Enable the AES block cipher.
331 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000332 * Module: library/aes.c
333 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000334 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000335 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000336 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000337 * This module enables the following ciphersuites (if other requisites are
338 * enabled as well):
339 * TLS_RSA_WITH_AES_128_CBC_SHA
340 * TLS_RSA_WITH_AES_256_CBC_SHA
341 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
342 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
343 * TLS_RSA_WITH_AES_128_CBC_SHA256
344 * TLS_RSA_WITH_AES_256_CBC_SHA256
345 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
346 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
347 * TLS_RSA_WITH_AES_128_GCM_SHA256
348 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100349 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
350 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100351 *
352 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000353 */
Paul Bakker40e46942009-01-03 21:51:57 +0000354#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000355
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000356/**
357 * \def POLARSSL_ARC4_C
358 *
359 * Enable the ARCFOUR stream cipher.
360 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000361 * Module: library/arc4.c
362 * Caller: library/ssl_tls.c
363 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100364 * This module enables the following ciphersuites (if other requisites are
365 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000366 * TLS_RSA_WITH_RC4_128_MD5
367 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100368 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000369 */
Paul Bakker40e46942009-01-03 21:51:57 +0000370#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000371
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000372/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000373 * \def POLARSSL_ASN1_PARSE_C
374 *
375 * Enable the generic ASN1 parser.
376 *
377 * Module: library/asn1.c
378 * Caller: library/x509parse.c
379 */
380#define POLARSSL_ASN1_PARSE_C
381
382/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000383 * \def POLARSSL_ASN1_WRITE_C
384 *
385 * Enable the generic ASN1 writer.
386 *
387 * Module: library/asn1write.c
388 */
389#define POLARSSL_ASN1_WRITE_C
390
391/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000392 * \def POLARSSL_BASE64_C
393 *
394 * Enable the Base64 module.
395 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000396 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000397 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000398 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000399 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000400 */
Paul Bakker40e46942009-01-03 21:51:57 +0000401#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000402
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000403/**
404 * \def POLARSSL_BIGNUM_C
405 *
Paul Bakker9a736322012-11-14 12:39:52 +0000406 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000407 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000408 * Module: library/bignum.c
409 * Caller: library/dhm.c
410 * library/rsa.c
411 * library/ssl_tls.c
412 * library/x509parse.c
413 *
414 * This module is required for RSA and DHM support.
415 */
Paul Bakker40e46942009-01-03 21:51:57 +0000416#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000417
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000418/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000419 * \def POLARSSL_BLOWFISH_C
420 *
421 * Enable the Blowfish block cipher.
422 *
423 * Module: library/blowfish.c
424 */
425#define POLARSSL_BLOWFISH_C
426
427/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000428 * \def POLARSSL_CAMELLIA_C
429 *
430 * Enable the Camellia block cipher.
431 *
Paul Bakker38119b12009-01-10 23:31:23 +0000432 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000433 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000434 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000435 * This module enables the following ciphersuites (if other requisites are
436 * enabled as well):
437 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
438 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
439 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
440 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
441 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
442 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
443 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
444 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000445 */
446#define POLARSSL_CAMELLIA_C
447
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000448/**
449 * \def POLARSSL_CERTS_C
450 *
451 * Enable the test certificates.
452 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000453 * Module: library/certs.c
454 * Caller:
455 *
456 * This module is used for testing (ssl_client/server).
457 */
Paul Bakker40e46942009-01-03 21:51:57 +0000458#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000459
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000460/**
461 * \def POLARSSL_CIPHER_C
462 *
463 * Enable the generic cipher layer.
464 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000465 * Module: library/cipher.c
466 * Caller:
467 *
468 * Uncomment to enable generic cipher wrappers.
469 */
470#define POLARSSL_CIPHER_C
471
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000472/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000473 * \def POLARSSL_CTR_DRBG_C
474 *
475 * Enable the CTR_DRBG AES-256-based random generator
476 *
477 * Module: library/ctr_drbg.c
478 * Caller:
479 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000480 * Requires: POLARSSL_AES_C
481 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000482 * This module provides the CTR_DRBG AES-256 random number generator.
483 */
484#define POLARSSL_CTR_DRBG_C
485
486/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000487 * \def POLARSSL_DEBUG_C
488 *
489 * Enable the debug functions.
490 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000491 * Module: library/debug.c
492 * Caller: library/ssl_cli.c
493 * library/ssl_srv.c
494 * library/ssl_tls.c
495 *
496 * This module provides debugging functions.
497 */
Paul Bakker40e46942009-01-03 21:51:57 +0000498#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000499
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000500/**
501 * \def POLARSSL_DES_C
502 *
503 * Enable the DES block cipher.
504 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000505 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100506 * Caller: library/pem.c
507 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000508 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000509 * This module enables the following ciphersuites (if other requisites are
510 * enabled as well):
511 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
512 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100513 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100514 *
515 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000516 */
Paul Bakker40e46942009-01-03 21:51:57 +0000517#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000518
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000519/**
520 * \def POLARSSL_DHM_C
521 *
522 * Enable the Diffie-Hellman-Merkle key exchange.
523 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000524 * Module: library/dhm.c
525 * Caller: library/ssl_cli.c
526 * library/ssl_srv.c
527 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000528 * This module enables the following ciphersuites (if other requisites are
529 * enabled as well):
530 * TLS_DHE_RSA_WITH_DES_CBC_SHA
531 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
532 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
533 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
534 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
535 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
536 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
537 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
538 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
539 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
540 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
541 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000542 */
Paul Bakker40e46942009-01-03 21:51:57 +0000543#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000544
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000545/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100546 * \def POLARSSL_ECDH_C
547 *
548 * Enable the elliptic curve Diffie-Hellman library.
549 *
550 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100551 * Caller: library/ssl_cli.c
552 * library/ssl_srv.c
553 *
554 * This module enables the following ciphersuites (if other requisites are
555 * enabled as well):
556 * TLS_ECDHE_RSA_WITH_NULL_SHA
557 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
558 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
559 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
560 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100561 *
562 * Requires: POLARSSL_ECP_C
563 */
564#define POLARSSL_ECDH_C
565
566/**
567 * \def POLARSSL_ECDSA_C
568 *
569 * Enable the elliptic curve DSA library.
570 *
571 * Module: library/ecdsa.c
572 * Caller:
573 *
574 * Requires: POLARSSL_ECP_C
575 */
576#define POLARSSL_ECDSA_C
577
578/**
579 * \def POLARSSL_ECP_C
580 *
581 * Enable the elliptic curve over GF(p) library.
582 *
583 * Module: library/ecp.c
584 * Caller: library/ecdh.c
585 * library/ecdsa.c
586 *
587 * Requires: POLARSSL_BIGNUM_C
588 */
589#define POLARSSL_ECP_C
590
591/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000592 * \def POLARSSL_ENTROPY_C
593 *
594 * Enable the platform-specific entropy code.
595 *
596 * Module: library/entropy.c
597 * Caller:
598 *
599 * Requires: POLARSSL_SHA4_C
600 *
601 * This module provides a generic entropy pool
602 */
603#define POLARSSL_ENTROPY_C
604
605/**
Paul Bakker9d781402011-05-09 16:17:09 +0000606 * \def POLARSSL_ERROR_C
607 *
608 * Enable error code to error string conversion.
609 *
610 * Module: library/error.c
611 * Caller:
612 *
613 * This module enables err_strerror().
614 */
615#define POLARSSL_ERROR_C
616
617/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000618 * \def POLARSSL_GCM_C
619 *
620 * Enable the Galois/Counter Mode (GCM) for AES
621 *
622 * Module: library/gcm.c
623 *
624 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000625 *
626 * This module enables the following ciphersuites (if other requisites are
627 * enabled as well):
628 * TLS_RSA_WITH_AES_128_GCM_SHA256
629 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000630 */
631#define POLARSSL_GCM_C
632
633/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000634 * \def POLARSSL_HAVEGE_C
635 *
636 * Enable the HAVEGE random generator.
637 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000638 * Module: library/havege.c
639 * Caller:
640 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000641 * Requires: POLARSSL_TIMING_C
642 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000643 * This module enables the HAVEGE random number generator.
644 */
Paul Bakker40e46942009-01-03 21:51:57 +0000645#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000646
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000647/**
648 * \def POLARSSL_MD_C
649 *
650 * Enable the generic message digest layer.
651 *
Paul Bakker17373852011-01-06 14:20:01 +0000652 * Module: library/md.c
653 * Caller:
654 *
655 * Uncomment to enable generic message digest wrappers.
656 */
657#define POLARSSL_MD_C
658
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000659/**
660 * \def POLARSSL_MD2_C
661 *
662 * Enable the MD2 hash algorithm
663 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000664 * Module: library/md2.c
665 * Caller: library/x509parse.c
666 *
667 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
668 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000669#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000670 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000671
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000672/**
673 * \def POLARSSL_MD4_C
674 *
675 * Enable the MD4 hash algorithm
676 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000677 * Module: library/md4.c
678 * Caller: library/x509parse.c
679 *
680 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
681 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000682#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000683 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000684
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000685/**
686 * \def POLARSSL_MD5_C
687 *
688 * Enable the MD5 hash algorithm
689 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000690 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100691 * Caller: library/pem.c
692 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000693 * library/x509parse.c
694 *
695 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100696 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000697 */
Paul Bakker40e46942009-01-03 21:51:57 +0000698#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000699
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000700/**
701 * \def POLARSSL_NET_C
702 *
703 * Enable the TCP/IP networking routines.
704 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000705 * Module: library/net.c
706 * Caller:
707 *
708 * This module provides TCP/IP networking routines.
709 */
Paul Bakker40e46942009-01-03 21:51:57 +0000710#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000711
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000712/**
713 * \def POLARSSL_PADLOCK_C
714 *
715 * Enable VIA Padlock support on x86.
716 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000717 * Module: library/padlock.c
718 * Caller: library/aes.c
719 *
720 * This modules adds support for the VIA PadLock on x86.
721 */
Paul Bakker40e46942009-01-03 21:51:57 +0000722#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000723
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000724/**
Paul Bakkerf518b162012-08-23 13:03:18 +0000725 * \def POLARSSL_PBKDF2_C
726 *
727 * Enable PKCS#5 PBKDF2 key derivation function
728 *
729 * Module: library/pbkdf2.c
730 *
731 * Requires: POLARSSL_MD_C
732 *
733 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
734#define POLARSSL_PBKDF2_C
735 */
736
737/**
Paul Bakker96743fc2011-02-12 14:30:57 +0000738 * \def POLARSSL_PEM_C
739 *
740 * Enable PEM decoding
741 *
742 * Module: library/pem.c
743 * Caller: library/x509parse.c
744 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000745 * Requires: POLARSSL_BASE64_C
746 *
Paul Bakker96743fc2011-02-12 14:30:57 +0000747 * This modules adds support for decoding PEM files.
748 */
749#define POLARSSL_PEM_C
750
751/**
Paul Bakker5690efc2011-05-26 13:16:06 +0000752 * \def POLARSSL_PKCS11_C
753 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000754 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000755 *
756 * Module: library/ssl_srv.c
757 * Caller: library/ssl_cli.c
758 * library/ssl_srv.c
759 *
760 * Requires: POLARSSL_SSL_TLS_C
761 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000762 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000763 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
764#define POLARSSL_PKCS11_C
765 */
766
767/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000768 * \def POLARSSL_RSA_C
769 *
770 * Enable the RSA public-key cryptosystem.
771 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000772 * Module: library/rsa.c
773 * Caller: library/ssl_cli.c
774 * library/ssl_srv.c
775 * library/ssl_tls.c
776 * library/x509.c
777 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000778 * Requires: POLARSSL_BIGNUM_C
779 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000780 * This module is required for SSL/TLS and MD5-signed certificates.
781 */
Paul Bakker40e46942009-01-03 21:51:57 +0000782#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000783
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000784/**
785 * \def POLARSSL_SHA1_C
786 *
787 * Enable the SHA1 cryptographic hash algorithm.
788 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000789 * Module: library/sha1.c
790 * Caller: library/ssl_cli.c
791 * library/ssl_srv.c
792 * library/ssl_tls.c
793 * library/x509parse.c
794 *
795 * This module is required for SSL/TLS and SHA1-signed certificates.
796 */
Paul Bakker40e46942009-01-03 21:51:57 +0000797#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000798
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000799/**
800 * \def POLARSSL_SHA2_C
801 *
802 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
803 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000804 * Module: library/sha2.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000805 * Caller: library/md_wrap.c
806 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000807 *
808 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +0100809 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +0000810 */
Paul Bakker40e46942009-01-03 21:51:57 +0000811#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000812
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000813/**
814 * \def POLARSSL_SHA4_C
815 *
816 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
817 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000818 * Module: library/sha4.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000819 * Caller: library/md_wrap.c
820 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000821 *
822 * This module adds support for SHA-384 and SHA-512.
823 */
Paul Bakker40e46942009-01-03 21:51:57 +0000824#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000825
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000826/**
Paul Bakker0a597072012-09-25 21:55:46 +0000827 * \def POLARSSL_SSL_CACHE_C
828 *
829 * Enable simple SSL cache implementation.
830 *
831 * Module: library/ssl_cache.c
832 * Caller:
833 *
834 * Requires: POLARSSL_SSL_CACHE_C
835 */
836#define POLARSSL_SSL_CACHE_C
837
838/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000839 * \def POLARSSL_SSL_CLI_C
840 *
841 * Enable the SSL/TLS client code.
842 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000843 * Module: library/ssl_cli.c
844 * Caller:
845 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000846 * Requires: POLARSSL_SSL_TLS_C
847 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000848 * This module is required for SSL/TLS client support.
849 */
Paul Bakker40e46942009-01-03 21:51:57 +0000850#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000851
Paul Bakker9a736322012-11-14 12:39:52 +0000852/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000853 * \def POLARSSL_SSL_SRV_C
854 *
855 * Enable the SSL/TLS server code.
856 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000857 * Module: library/ssl_srv.c
858 * Caller:
859 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000860 * Requires: POLARSSL_SSL_TLS_C
861 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000862 * This module is required for SSL/TLS server support.
863 */
Paul Bakker40e46942009-01-03 21:51:57 +0000864#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000865
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000866/**
867 * \def POLARSSL_SSL_TLS_C
868 *
Paul Bakkere29ab062011-05-18 13:26:54 +0000869 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000870 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000871 * Module: library/ssl_tls.c
872 * Caller: library/ssl_cli.c
873 * library/ssl_srv.c
874 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000875 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C, POLARSSL_X509_PARSE_C
876 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000877 * This module is required for SSL/TLS.
878 */
Paul Bakker40e46942009-01-03 21:51:57 +0000879#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000880
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000881/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000882 * \def POLARSSL_TIMING_C
883 *
884 * Enable the portable timing interface.
885 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000886 * Module: library/timing.c
887 * Caller: library/havege.c
888 *
889 * This module is used by the HAVEGE random number generator.
890 */
Paul Bakker40e46942009-01-03 21:51:57 +0000891#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000892
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000893/**
894 * \def POLARSSL_VERSION_C
895 *
896 * Enable run-time version information.
897 *
Paul Bakker0a62cd12011-01-21 11:00:08 +0000898 * Module: library/version.c
899 *
900 * This module provides run-time version information.
901 */
902#define POLARSSL_VERSION_C
903
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000904/**
905 * \def POLARSSL_X509_PARSE_C
906 *
907 * Enable X.509 certificate parsing.
908 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000909 * Module: library/x509parse.c
910 * Caller: library/ssl_cli.c
911 * library/ssl_srv.c
912 * library/ssl_tls.c
913 *
Paul Bakkerefc30292011-11-10 14:43:23 +0000914 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000915 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000916 * This module is required for X.509 certificate parsing.
917 */
Paul Bakker40e46942009-01-03 21:51:57 +0000918#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000919
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000920/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000921 * \def POLARSSL_X509_WRITE_C
922 *
923 * Enable X.509 buffer writing.
924 *
925 * Module: library/x509write.c
926 *
927 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
928 *
929 * This module is required for X.509 certificate request writing.
930 */
931#define POLARSSL_X509_WRITE_C
932
933/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000934 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000935 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000936 * Enable the XTEA block cipher.
937 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000938 * Module: library/xtea.c
939 * Caller:
940 */
941#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +0100942
Paul Bakker0a62cd12011-01-21 11:00:08 +0000943/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000944
Paul Bakker5121ce52009-01-03 21:22:43 +0000945#endif /* config.h */