blob: b69bd8cedc096ec84c32d5bda77c7fec0c2cbe7a [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 Bakkerfab5c822012-02-06 16:45:10 +0000143 *
144 * Uncomment this macro to enable the NULL cipher and ciphersuites
145#define POLARSSL_CIPHER_NULL_CIPHER
146 */
147
148/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000149 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
150 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000151 * Enable weak ciphersuites in SSL / TLS
Paul Bakkerfab5c822012-02-06 16:45:10 +0000152 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000153 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000154 *
155 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000156 * TLS_RSA_WITH_DES_CBC_SHA
157 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000158 *
159 * Uncomment this macro to enable weak ciphersuites
160#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
161 */
162
163/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100164 * \def POLARSSL_ERROR_STRERROR_DUMMY
165 *
166 * Enable a dummy error function to make use of error_strerror() in
167 * third party libraries easier.
168 *
169 * Disable if you run into name conflicts and want to really remove the
170 * error_strerror()
171 */
172#define POLARSSL_ERROR_STRERROR_DUMMY
173
174/**
Paul Bakker15566e42011-04-24 21:19:15 +0000175 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000176 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000177 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
178 *
Paul Bakker15566e42011-04-24 21:19:15 +0000179 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000180 */
Paul Bakker15566e42011-04-24 21:19:15 +0000181#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000182
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000183/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000184 * \def POLARSSL_FS_IO
185 *
186 * Enable functions that use the filesystem.
187 */
188#define POLARSSL_FS_IO
189
190/**
Paul Bakker43655f42011-12-15 20:11:16 +0000191 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
192 *
193 * Do not add default entropy sources. These are the platform specific,
194 * hardclock and HAVEGE based poll functions.
195 *
196 * This is useful to have more control over the added entropy sources in an
197 * application.
198 *
199 * Uncomment this macro to prevent loading of default entropy functions.
200#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
201 */
202
203/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000204 * \def POLARSSL_NO_PLATFORM_ENTROPY
205 *
206 * Do not use built-in platform entropy functions.
207 * This is useful if your platform does not support
208 * standards like the /dev/urandom or Windows CryptoAPI.
209 *
210 * Uncomment this macro to disable the built-in platform entropy functions.
211#define POLARSSL_NO_PLATFORM_ENTROPY
212 */
213
214/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000215 * \def POLARSSL_PKCS1_V21
216 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000217 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
218 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000219 * Enable support for PKCS#1 v2.1 encoding.
220 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
221 */
222#define POLARSSL_PKCS1_V21
223
224/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000225 * \def POLARSSL_RSA_NO_CRT
226 *
227 * Do not use the Chinese Remainder Theorem for the RSA private operation.
228 *
229 * Uncomment this macro to disable the use of CRT in RSA.
230 *
231#define POLARSSL_RSA_NO_CRT
232 */
Paul Bakker15566e42011-04-24 21:19:15 +0000233
234/**
235 * \def POLARSSL_SELF_TEST
236 *
237 * Enable the checkup functions (*_self_test).
238 */
239#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000240
241/**
Paul Bakker40865c82013-01-31 17:13:13 +0100242 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
243 *
244 * Enable sending of alert messages in case of encountered errors as per RFC.
245 * If you choose not to send the alert messages, PolarSSL can still communicate
246 * with other servers, only debugging of failures is harder.
247 *
248 * The advantage of not sending alert messages, is that no information is given
249 * about reasons for failures thus preventing adversaries of gaining intel.
250 *
251 * Enable sending of all alert messages
252 */
253#define POLARSSL_SSL_ALERT_MESSAGES
254
255/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100256 * \def POLARSSL_SSL_DEBUG_ALL
257 *
258 * Enable the debug messages in SSL module for all issues.
259 * Debug messages have been disabled in some places to prevent timing
260 * attacks due to (unbalanced) debugging function calls.
261 *
262 * If you need all error reporting you should enable this during debugging,
263 * but remove this for production servers that should log as well.
264 *
265 * Uncomment this macro to report all debug messages on errors introducing
266 * a timing side-channel.
267 *
268#define POLARSSL_SSL_DEBUG_ALL
269 */
270
271/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000272 * \def POLARSSL_SSL_HW_RECORD_ACCEL
273 *
274 * Enable hooking functions in SSL module for hardware acceleration of
275 * individual records.
276 *
277 * Uncomment this macro to enable hooking functions.
278#define POLARSSL_SSL_HW_RECORD_ACCEL
279 */
280
281/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100282 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
283 *
284 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
285 * SSL Server module (POLARSSL_SSL_SRV_C)
286 *
287 * Comment this macro to disable support for SSLv2 Client Hello messages.
288 */
289#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
290
291/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000292 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
293 *
294 * If set, the X509 parser will not break-off when parsing an X509 certificate
295 * and encountering an unknown critical extension.
296 *
297 * Uncomment to prevent an error.
298 *
299#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
300 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000301
302/**
303 * \def POLARSSL_ZLIB_SUPPORT
304 *
305 * If set, the SSL/TLS module uses ZLIB to support compression and
306 * decompression of packet data.
307 *
308 * Used in: library/ssl_tls.c
309 * library/ssl_cli.c
310 * library/ssl_srv.c
311 *
312 * This feature requires zlib library and headers to be present.
313 *
314 * Uncomment to enable use of ZLIB
315#define POLARSSL_ZLIB_SUPPORT
316 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000317/* \} name */
318
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000319/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000320 * \name SECTION: PolarSSL modules
321 *
322 * This section enables or disables entire modules in PolarSSL
323 * \{
324 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000325
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000326/**
327 * \def POLARSSL_AES_C
328 *
329 * Enable the AES block cipher.
330 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000331 * Module: library/aes.c
332 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000333 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000334 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000335 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000336 * This module enables the following ciphersuites (if other requisites are
337 * enabled as well):
338 * TLS_RSA_WITH_AES_128_CBC_SHA
339 * TLS_RSA_WITH_AES_256_CBC_SHA
340 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
341 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
342 * TLS_RSA_WITH_AES_128_CBC_SHA256
343 * TLS_RSA_WITH_AES_256_CBC_SHA256
344 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
345 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
346 * TLS_RSA_WITH_AES_128_GCM_SHA256
347 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker6deb37e2013-02-19 13:17:08 +0100348 *
349 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000350 */
Paul Bakker40e46942009-01-03 21:51:57 +0000351#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000352
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000353/**
354 * \def POLARSSL_ARC4_C
355 *
356 * Enable the ARCFOUR stream cipher.
357 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000358 * Module: library/arc4.c
359 * Caller: library/ssl_tls.c
360 *
361 * This module enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000362 * TLS_RSA_WITH_RC4_128_MD5
363 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000364 */
Paul Bakker40e46942009-01-03 21:51:57 +0000365#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000366
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000367/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000368 * \def POLARSSL_ASN1_PARSE_C
369 *
370 * Enable the generic ASN1 parser.
371 *
372 * Module: library/asn1.c
373 * Caller: library/x509parse.c
374 */
375#define POLARSSL_ASN1_PARSE_C
376
377/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000378 * \def POLARSSL_ASN1_WRITE_C
379 *
380 * Enable the generic ASN1 writer.
381 *
382 * Module: library/asn1write.c
383 */
384#define POLARSSL_ASN1_WRITE_C
385
386/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000387 * \def POLARSSL_BASE64_C
388 *
389 * Enable the Base64 module.
390 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000391 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000392 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000393 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000394 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000395 */
Paul Bakker40e46942009-01-03 21:51:57 +0000396#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000397
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000398/**
399 * \def POLARSSL_BIGNUM_C
400 *
Paul Bakker9a736322012-11-14 12:39:52 +0000401 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000402 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000403 * Module: library/bignum.c
404 * Caller: library/dhm.c
405 * library/rsa.c
406 * library/ssl_tls.c
407 * library/x509parse.c
408 *
409 * This module is required for RSA and DHM support.
410 */
Paul Bakker40e46942009-01-03 21:51:57 +0000411#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000412
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000413/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000414 * \def POLARSSL_BLOWFISH_C
415 *
416 * Enable the Blowfish block cipher.
417 *
418 * Module: library/blowfish.c
419 */
420#define POLARSSL_BLOWFISH_C
421
422/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000423 * \def POLARSSL_CAMELLIA_C
424 *
425 * Enable the Camellia block cipher.
426 *
Paul Bakker38119b12009-01-10 23:31:23 +0000427 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000428 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000429 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000430 * This module enables the following ciphersuites (if other requisites are
431 * enabled as well):
432 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
433 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
434 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
435 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
436 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
437 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
438 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
439 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000440 */
441#define POLARSSL_CAMELLIA_C
442
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000443/**
444 * \def POLARSSL_CERTS_C
445 *
446 * Enable the test certificates.
447 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000448 * Module: library/certs.c
449 * Caller:
450 *
451 * This module is used for testing (ssl_client/server).
452 */
Paul Bakker40e46942009-01-03 21:51:57 +0000453#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000454
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000455/**
456 * \def POLARSSL_CIPHER_C
457 *
458 * Enable the generic cipher layer.
459 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000460 * Module: library/cipher.c
461 * Caller:
462 *
463 * Uncomment to enable generic cipher wrappers.
464 */
465#define POLARSSL_CIPHER_C
466
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000467/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000468 * \def POLARSSL_CTR_DRBG_C
469 *
470 * Enable the CTR_DRBG AES-256-based random generator
471 *
472 * Module: library/ctr_drbg.c
473 * Caller:
474 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000475 * Requires: POLARSSL_AES_C
476 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000477 * This module provides the CTR_DRBG AES-256 random number generator.
478 */
479#define POLARSSL_CTR_DRBG_C
480
481/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000482 * \def POLARSSL_DEBUG_C
483 *
484 * Enable the debug functions.
485 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000486 * Module: library/debug.c
487 * Caller: library/ssl_cli.c
488 * library/ssl_srv.c
489 * library/ssl_tls.c
490 *
491 * This module provides debugging functions.
492 */
Paul Bakker40e46942009-01-03 21:51:57 +0000493#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000494
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000495/**
496 * \def POLARSSL_DES_C
497 *
498 * Enable the DES block cipher.
499 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000500 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100501 * Caller: library/pem.c
502 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000503 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000504 * This module enables the following ciphersuites (if other requisites are
505 * enabled as well):
506 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
507 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100508 *
509 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000510 */
Paul Bakker40e46942009-01-03 21:51:57 +0000511#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000512
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000513/**
514 * \def POLARSSL_DHM_C
515 *
516 * Enable the Diffie-Hellman-Merkle key exchange.
517 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000518 * Module: library/dhm.c
519 * Caller: library/ssl_cli.c
520 * library/ssl_srv.c
521 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000522 * This module enables the following ciphersuites (if other requisites are
523 * enabled as well):
524 * TLS_DHE_RSA_WITH_DES_CBC_SHA
525 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
526 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
527 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
528 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
529 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
530 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
531 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
532 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
533 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
534 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
535 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000536 */
Paul Bakker40e46942009-01-03 21:51:57 +0000537#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000538
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000539/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000540 * \def POLARSSL_ENTROPY_C
541 *
542 * Enable the platform-specific entropy code.
543 *
544 * Module: library/entropy.c
545 * Caller:
546 *
547 * Requires: POLARSSL_SHA4_C
548 *
549 * This module provides a generic entropy pool
550 */
551#define POLARSSL_ENTROPY_C
552
553/**
Paul Bakker9d781402011-05-09 16:17:09 +0000554 * \def POLARSSL_ERROR_C
555 *
556 * Enable error code to error string conversion.
557 *
558 * Module: library/error.c
559 * Caller:
560 *
561 * This module enables err_strerror().
562 */
563#define POLARSSL_ERROR_C
564
565/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000566 * \def POLARSSL_GCM_C
567 *
568 * Enable the Galois/Counter Mode (GCM) for AES
569 *
570 * Module: library/gcm.c
571 *
572 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000573 *
574 * This module enables the following ciphersuites (if other requisites are
575 * enabled as well):
576 * TLS_RSA_WITH_AES_128_GCM_SHA256
577 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000578 */
579#define POLARSSL_GCM_C
580
581/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000582 * \def POLARSSL_HAVEGE_C
583 *
584 * Enable the HAVEGE random generator.
585 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000586 * Module: library/havege.c
587 * Caller:
588 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000589 * Requires: POLARSSL_TIMING_C
590 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000591 * This module enables the HAVEGE random number generator.
592 */
Paul Bakker40e46942009-01-03 21:51:57 +0000593#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000594
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000595/**
596 * \def POLARSSL_MD_C
597 *
598 * Enable the generic message digest layer.
599 *
Paul Bakker17373852011-01-06 14:20:01 +0000600 * Module: library/md.c
601 * Caller:
602 *
603 * Uncomment to enable generic message digest wrappers.
604 */
605#define POLARSSL_MD_C
606
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000607/**
608 * \def POLARSSL_MD2_C
609 *
610 * Enable the MD2 hash algorithm
611 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000612 * Module: library/md2.c
613 * Caller: library/x509parse.c
614 *
615 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
616 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000617#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000618 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000619
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000620/**
621 * \def POLARSSL_MD4_C
622 *
623 * Enable the MD4 hash algorithm
624 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000625 * Module: library/md4.c
626 * Caller: library/x509parse.c
627 *
628 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
629 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000630#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000631 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000632
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000633/**
634 * \def POLARSSL_MD5_C
635 *
636 * Enable the MD5 hash algorithm
637 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000638 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100639 * Caller: library/pem.c
640 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000641 * library/x509parse.c
642 *
643 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100644 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000645 */
Paul Bakker40e46942009-01-03 21:51:57 +0000646#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000647
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000648/**
649 * \def POLARSSL_NET_C
650 *
651 * Enable the TCP/IP networking routines.
652 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000653 * Module: library/net.c
654 * Caller:
655 *
656 * This module provides TCP/IP networking routines.
657 */
Paul Bakker40e46942009-01-03 21:51:57 +0000658#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000659
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000660/**
661 * \def POLARSSL_PADLOCK_C
662 *
663 * Enable VIA Padlock support on x86.
664 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000665 * Module: library/padlock.c
666 * Caller: library/aes.c
667 *
668 * This modules adds support for the VIA PadLock on x86.
669 */
Paul Bakker40e46942009-01-03 21:51:57 +0000670#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000671
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000672/**
Paul Bakkerf518b162012-08-23 13:03:18 +0000673 * \def POLARSSL_PBKDF2_C
674 *
675 * Enable PKCS#5 PBKDF2 key derivation function
676 *
677 * Module: library/pbkdf2.c
678 *
679 * Requires: POLARSSL_MD_C
680 *
681 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
682#define POLARSSL_PBKDF2_C
683 */
684
685/**
Paul Bakker96743fc2011-02-12 14:30:57 +0000686 * \def POLARSSL_PEM_C
687 *
688 * Enable PEM decoding
689 *
690 * Module: library/pem.c
691 * Caller: library/x509parse.c
692 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000693 * Requires: POLARSSL_BASE64_C
694 *
Paul Bakker96743fc2011-02-12 14:30:57 +0000695 * This modules adds support for decoding PEM files.
696 */
697#define POLARSSL_PEM_C
698
699/**
Paul Bakker5690efc2011-05-26 13:16:06 +0000700 * \def POLARSSL_PKCS11_C
701 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000702 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000703 *
704 * Module: library/ssl_srv.c
705 * Caller: library/ssl_cli.c
706 * library/ssl_srv.c
707 *
708 * Requires: POLARSSL_SSL_TLS_C
709 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000710 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000711 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
712#define POLARSSL_PKCS11_C
713 */
714
715/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000716 * \def POLARSSL_RSA_C
717 *
718 * Enable the RSA public-key cryptosystem.
719 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000720 * Module: library/rsa.c
721 * Caller: library/ssl_cli.c
722 * library/ssl_srv.c
723 * library/ssl_tls.c
724 * library/x509.c
725 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000726 * Requires: POLARSSL_BIGNUM_C
727 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000728 * This module is required for SSL/TLS and MD5-signed certificates.
729 */
Paul Bakker40e46942009-01-03 21:51:57 +0000730#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000731
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000732/**
733 * \def POLARSSL_SHA1_C
734 *
735 * Enable the SHA1 cryptographic hash algorithm.
736 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000737 * Module: library/sha1.c
738 * Caller: library/ssl_cli.c
739 * library/ssl_srv.c
740 * library/ssl_tls.c
741 * library/x509parse.c
742 *
743 * This module is required for SSL/TLS and SHA1-signed certificates.
744 */
Paul Bakker40e46942009-01-03 21:51:57 +0000745#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000746
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000747/**
748 * \def POLARSSL_SHA2_C
749 *
750 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
751 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000752 * Module: library/sha2.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000753 * Caller: library/md_wrap.c
754 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000755 *
756 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +0100757 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +0000758 */
Paul Bakker40e46942009-01-03 21:51:57 +0000759#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000760
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000761/**
762 * \def POLARSSL_SHA4_C
763 *
764 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
765 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000766 * Module: library/sha4.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000767 * Caller: library/md_wrap.c
768 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000769 *
770 * This module adds support for SHA-384 and SHA-512.
771 */
Paul Bakker40e46942009-01-03 21:51:57 +0000772#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000773
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000774/**
Paul Bakker0a597072012-09-25 21:55:46 +0000775 * \def POLARSSL_SSL_CACHE_C
776 *
777 * Enable simple SSL cache implementation.
778 *
779 * Module: library/ssl_cache.c
780 * Caller:
781 *
782 * Requires: POLARSSL_SSL_CACHE_C
783 */
784#define POLARSSL_SSL_CACHE_C
785
786/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000787 * \def POLARSSL_SSL_CLI_C
788 *
789 * Enable the SSL/TLS client code.
790 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000791 * Module: library/ssl_cli.c
792 * Caller:
793 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000794 * Requires: POLARSSL_SSL_TLS_C
795 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000796 * This module is required for SSL/TLS client support.
797 */
Paul Bakker40e46942009-01-03 21:51:57 +0000798#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000799
Paul Bakker9a736322012-11-14 12:39:52 +0000800/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000801 * \def POLARSSL_SSL_SRV_C
802 *
803 * Enable the SSL/TLS server code.
804 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000805 * Module: library/ssl_srv.c
806 * Caller:
807 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000808 * Requires: POLARSSL_SSL_TLS_C
809 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000810 * This module is required for SSL/TLS server support.
811 */
Paul Bakker40e46942009-01-03 21:51:57 +0000812#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000813
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000814/**
815 * \def POLARSSL_SSL_TLS_C
816 *
Paul Bakkere29ab062011-05-18 13:26:54 +0000817 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000818 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000819 * Module: library/ssl_tls.c
820 * Caller: library/ssl_cli.c
821 * library/ssl_srv.c
822 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000823 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C, POLARSSL_X509_PARSE_C
824 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000825 * This module is required for SSL/TLS.
826 */
Paul Bakker40e46942009-01-03 21:51:57 +0000827#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000828
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000829/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000830 * \def POLARSSL_TIMING_C
831 *
832 * Enable the portable timing interface.
833 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000834 * Module: library/timing.c
835 * Caller: library/havege.c
836 *
837 * This module is used by the HAVEGE random number generator.
838 */
Paul Bakker40e46942009-01-03 21:51:57 +0000839#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000840
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000841/**
842 * \def POLARSSL_VERSION_C
843 *
844 * Enable run-time version information.
845 *
Paul Bakker0a62cd12011-01-21 11:00:08 +0000846 * Module: library/version.c
847 *
848 * This module provides run-time version information.
849 */
850#define POLARSSL_VERSION_C
851
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000852/**
853 * \def POLARSSL_X509_PARSE_C
854 *
855 * Enable X.509 certificate parsing.
856 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000857 * Module: library/x509parse.c
858 * Caller: library/ssl_cli.c
859 * library/ssl_srv.c
860 * library/ssl_tls.c
861 *
Paul Bakkerefc30292011-11-10 14:43:23 +0000862 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000863 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000864 * This module is required for X.509 certificate parsing.
865 */
Paul Bakker40e46942009-01-03 21:51:57 +0000866#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000867
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000868/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000869 * \def POLARSSL_X509_WRITE_C
870 *
871 * Enable X.509 buffer writing.
872 *
873 * Module: library/x509write.c
874 *
875 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
876 *
877 * This module is required for X.509 certificate request writing.
878 */
879#define POLARSSL_X509_WRITE_C
880
881/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000882 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000883 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000884 * Enable the XTEA block cipher.
885 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000886 * Module: library/xtea.c
887 * Caller:
888 */
889#define POLARSSL_XTEA_C
Paul Bakker0a62cd12011-01-21 11:00:08 +0000890/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000891
Paul Bakker5121ce52009-01-03 21:22:43 +0000892#endif /* config.h */