blob: 409d756ccbc81c971a83db35d6343e05ae836ffb [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 Bakker4087c472013-06-12 16:49:10 +0200108 * \def POLARSSL_XXX_ALT
109 *
110 * Uncomment a macro to let PolarSSL use your alternate core implementation of
111 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
112 * implementations). Keep in mind that the function prototypes should remain
113 * the same.
114 *
115 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
116 * provide the "struct aes_context" definition and omit the base function
117 * declarations and implementations. "aes_alt.h" will be included from
118 * "aes.h" to include the new function definitions.
119 *
120 * Uncomment a macro to enable alternate implementation for core algorithm
121 * functions
122#define POLARSSL_AES_ALT
123#define POLARSSL_ARC4_ALT
124#define POLARSSL_BLOWFISH_ALT
125#define POLARSSL_CAMELLIA_ALT
126#define POLARSSL_DES_ALT
127#define POLARSSL_XTEA_ALT
128#define POLARSSL_MD2_ALT
129#define POLARSSL_MD4_ALT
130#define POLARSSL_MD5_ALT
131#define POLARSSL_SHA1_ALT
132#define POLARSSL_SHA2_ALT
133#define POLARSSL_SHA4_ALT
134 */
135
136/**
Paul Bakker15566e42011-04-24 21:19:15 +0000137 * \def POLARSSL_AES_ROM_TABLES
138 *
139 * Store the AES tables in ROM.
140 *
141 * Uncomment this macro to store the AES tables in ROM.
142 *
143#define POLARSSL_AES_ROM_TABLES
144 */
145
146/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000147 * \def POLARSSL_CIPHER_MODE_CFB
148 *
149 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
150 */
151#define POLARSSL_CIPHER_MODE_CFB
152
153/**
154 * \def POLARSSL_CIPHER_MODE_CTR
155 *
156 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
157 */
158#define POLARSSL_CIPHER_MODE_CTR
159
160/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000161 * \def POLARSSL_CIPHER_NULL_CIPHER
162 *
163 * Enable NULL cipher.
164 * Warning: Only do so when you know what you are doing. This allows for
165 * encryption or channels without any security!
166 *
167 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
168 * the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000169 * TLS_RSA_WITH_NULL_MD5
170 * TLS_RSA_WITH_NULL_SHA
171 * TLS_RSA_WITH_NULL_SHA256
Paul Bakkerfab5c822012-02-06 16:45:10 +0000172 *
173 * Uncomment this macro to enable the NULL cipher and ciphersuites
174#define POLARSSL_CIPHER_NULL_CIPHER
175 */
176
177/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000178 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
179 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000180 * Enable weak ciphersuites in SSL / TLS
Paul Bakkerfab5c822012-02-06 16:45:10 +0000181 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000182 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000183 *
184 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000185 * TLS_RSA_WITH_DES_CBC_SHA
186 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000187 *
188 * Uncomment this macro to enable weak ciphersuites
189#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
190 */
191
192/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100193 * \def POLARSSL_ERROR_STRERROR_DUMMY
194 *
195 * Enable a dummy error function to make use of error_strerror() in
196 * third party libraries easier.
197 *
198 * Disable if you run into name conflicts and want to really remove the
199 * error_strerror()
200 */
201#define POLARSSL_ERROR_STRERROR_DUMMY
202
203/**
Paul Bakker15566e42011-04-24 21:19:15 +0000204 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000205 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000206 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
207 *
Paul Bakker15566e42011-04-24 21:19:15 +0000208 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000209 */
Paul Bakker15566e42011-04-24 21:19:15 +0000210#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000211
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000212/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000213 * \def POLARSSL_FS_IO
214 *
215 * Enable functions that use the filesystem.
216 */
217#define POLARSSL_FS_IO
218
219/**
Paul Bakker43655f42011-12-15 20:11:16 +0000220 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
221 *
222 * Do not add default entropy sources. These are the platform specific,
223 * hardclock and HAVEGE based poll functions.
224 *
225 * This is useful to have more control over the added entropy sources in an
226 * application.
227 *
228 * Uncomment this macro to prevent loading of default entropy functions.
229#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
230 */
231
232/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000233 * \def POLARSSL_NO_PLATFORM_ENTROPY
234 *
235 * Do not use built-in platform entropy functions.
236 * This is useful if your platform does not support
237 * standards like the /dev/urandom or Windows CryptoAPI.
238 *
239 * Uncomment this macro to disable the built-in platform entropy functions.
240#define POLARSSL_NO_PLATFORM_ENTROPY
241 */
242
243/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000244 * \def POLARSSL_PKCS1_V21
245 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000246 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
247 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000248 * Enable support for PKCS#1 v2.1 encoding.
249 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
250 */
251#define POLARSSL_PKCS1_V21
252
253/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000254 * \def POLARSSL_RSA_NO_CRT
255 *
256 * Do not use the Chinese Remainder Theorem for the RSA private operation.
257 *
258 * Uncomment this macro to disable the use of CRT in RSA.
259 *
260#define POLARSSL_RSA_NO_CRT
261 */
Paul Bakker15566e42011-04-24 21:19:15 +0000262
263/**
264 * \def POLARSSL_SELF_TEST
265 *
266 * Enable the checkup functions (*_self_test).
267 */
268#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000269
270/**
Paul Bakker40865c82013-01-31 17:13:13 +0100271 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
272 *
273 * Enable sending of alert messages in case of encountered errors as per RFC.
274 * If you choose not to send the alert messages, PolarSSL can still communicate
275 * with other servers, only debugging of failures is harder.
276 *
277 * The advantage of not sending alert messages, is that no information is given
278 * about reasons for failures thus preventing adversaries of gaining intel.
279 *
280 * Enable sending of all alert messages
281 */
282#define POLARSSL_SSL_ALERT_MESSAGES
283
284/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100285 * \def POLARSSL_SSL_DEBUG_ALL
286 *
287 * Enable the debug messages in SSL module for all issues.
288 * Debug messages have been disabled in some places to prevent timing
289 * attacks due to (unbalanced) debugging function calls.
290 *
291 * If you need all error reporting you should enable this during debugging,
292 * but remove this for production servers that should log as well.
293 *
294 * Uncomment this macro to report all debug messages on errors introducing
295 * a timing side-channel.
296 *
297#define POLARSSL_SSL_DEBUG_ALL
298 */
299
300/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000301 * \def POLARSSL_SSL_HW_RECORD_ACCEL
302 *
303 * Enable hooking functions in SSL module for hardware acceleration of
304 * individual records.
305 *
306 * Uncomment this macro to enable hooking functions.
307#define POLARSSL_SSL_HW_RECORD_ACCEL
308 */
309
310/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100311 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
312 *
313 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
314 * SSL Server module (POLARSSL_SSL_SRV_C)
315 *
316 * Comment this macro to disable support for SSLv2 Client Hello messages.
317 */
318#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
319
320/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000321 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
322 *
323 * If set, the X509 parser will not break-off when parsing an X509 certificate
324 * and encountering an unknown critical extension.
325 *
326 * Uncomment to prevent an error.
327 *
328#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
329 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000330
331/**
332 * \def POLARSSL_ZLIB_SUPPORT
333 *
334 * If set, the SSL/TLS module uses ZLIB to support compression and
335 * decompression of packet data.
336 *
337 * Used in: library/ssl_tls.c
338 * library/ssl_cli.c
339 * library/ssl_srv.c
340 *
341 * This feature requires zlib library and headers to be present.
342 *
343 * Uncomment to enable use of ZLIB
344#define POLARSSL_ZLIB_SUPPORT
345 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000346/* \} name */
347
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000348/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000349 * \name SECTION: PolarSSL modules
350 *
351 * This section enables or disables entire modules in PolarSSL
352 * \{
353 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000354
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000355/**
356 * \def POLARSSL_AES_C
357 *
358 * Enable the AES block cipher.
359 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000360 * Module: library/aes.c
361 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000362 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000363 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000364 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000365 * This module enables the following ciphersuites (if other requisites are
366 * enabled as well):
367 * TLS_RSA_WITH_AES_128_CBC_SHA
368 * TLS_RSA_WITH_AES_256_CBC_SHA
369 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
370 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
371 * TLS_RSA_WITH_AES_128_CBC_SHA256
372 * TLS_RSA_WITH_AES_256_CBC_SHA256
373 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
374 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
375 * TLS_RSA_WITH_AES_128_GCM_SHA256
376 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker6deb37e2013-02-19 13:17:08 +0100377 *
378 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000379 */
Paul Bakker40e46942009-01-03 21:51:57 +0000380#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000381
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000382/**
383 * \def POLARSSL_ARC4_C
384 *
385 * Enable the ARCFOUR stream cipher.
386 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000387 * Module: library/arc4.c
388 * Caller: library/ssl_tls.c
389 *
390 * This module enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000391 * TLS_RSA_WITH_RC4_128_MD5
392 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000393 */
Paul Bakker40e46942009-01-03 21:51:57 +0000394#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000395
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000396/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000397 * \def POLARSSL_ASN1_PARSE_C
398 *
399 * Enable the generic ASN1 parser.
400 *
401 * Module: library/asn1.c
402 * Caller: library/x509parse.c
403 */
404#define POLARSSL_ASN1_PARSE_C
405
406/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000407 * \def POLARSSL_ASN1_WRITE_C
408 *
409 * Enable the generic ASN1 writer.
410 *
411 * Module: library/asn1write.c
412 */
413#define POLARSSL_ASN1_WRITE_C
414
415/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000416 * \def POLARSSL_BASE64_C
417 *
418 * Enable the Base64 module.
419 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000420 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000421 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000422 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000423 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000424 */
Paul Bakker40e46942009-01-03 21:51:57 +0000425#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000426
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000427/**
428 * \def POLARSSL_BIGNUM_C
429 *
Paul Bakker9a736322012-11-14 12:39:52 +0000430 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000431 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000432 * Module: library/bignum.c
433 * Caller: library/dhm.c
434 * library/rsa.c
435 * library/ssl_tls.c
436 * library/x509parse.c
437 *
438 * This module is required for RSA and DHM support.
439 */
Paul Bakker40e46942009-01-03 21:51:57 +0000440#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000441
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000442/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000443 * \def POLARSSL_BLOWFISH_C
444 *
445 * Enable the Blowfish block cipher.
446 *
447 * Module: library/blowfish.c
448 */
449#define POLARSSL_BLOWFISH_C
450
451/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000452 * \def POLARSSL_CAMELLIA_C
453 *
454 * Enable the Camellia block cipher.
455 *
Paul Bakker38119b12009-01-10 23:31:23 +0000456 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000457 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000458 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000459 * This module enables the following ciphersuites (if other requisites are
460 * enabled as well):
461 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
462 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
463 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
464 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
465 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
466 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
467 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
468 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000469 */
470#define POLARSSL_CAMELLIA_C
471
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000472/**
473 * \def POLARSSL_CERTS_C
474 *
475 * Enable the test certificates.
476 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000477 * Module: library/certs.c
478 * Caller:
479 *
480 * This module is used for testing (ssl_client/server).
481 */
Paul Bakker40e46942009-01-03 21:51:57 +0000482#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000483
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000484/**
485 * \def POLARSSL_CIPHER_C
486 *
487 * Enable the generic cipher layer.
488 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000489 * Module: library/cipher.c
490 * Caller:
491 *
492 * Uncomment to enable generic cipher wrappers.
493 */
494#define POLARSSL_CIPHER_C
495
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000496/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000497 * \def POLARSSL_CTR_DRBG_C
498 *
499 * Enable the CTR_DRBG AES-256-based random generator
500 *
501 * Module: library/ctr_drbg.c
502 * Caller:
503 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000504 * Requires: POLARSSL_AES_C
505 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000506 * This module provides the CTR_DRBG AES-256 random number generator.
507 */
508#define POLARSSL_CTR_DRBG_C
509
510/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000511 * \def POLARSSL_DEBUG_C
512 *
513 * Enable the debug functions.
514 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000515 * Module: library/debug.c
516 * Caller: library/ssl_cli.c
517 * library/ssl_srv.c
518 * library/ssl_tls.c
519 *
520 * This module provides debugging functions.
521 */
Paul Bakker40e46942009-01-03 21:51:57 +0000522#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000523
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000524/**
525 * \def POLARSSL_DES_C
526 *
527 * Enable the DES block cipher.
528 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000529 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100530 * Caller: library/pem.c
531 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000532 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000533 * This module enables the following ciphersuites (if other requisites are
534 * enabled as well):
535 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
536 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100537 *
538 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000539 */
Paul Bakker40e46942009-01-03 21:51:57 +0000540#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000541
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000542/**
543 * \def POLARSSL_DHM_C
544 *
545 * Enable the Diffie-Hellman-Merkle key exchange.
546 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000547 * Module: library/dhm.c
548 * Caller: library/ssl_cli.c
549 * library/ssl_srv.c
550 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000551 * This module enables the following ciphersuites (if other requisites are
552 * enabled as well):
553 * TLS_DHE_RSA_WITH_DES_CBC_SHA
554 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
555 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
556 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
557 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
558 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
559 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
560 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
561 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
562 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
563 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
564 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000565 */
Paul Bakker40e46942009-01-03 21:51:57 +0000566#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000567
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000568/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000569 * \def POLARSSL_ENTROPY_C
570 *
571 * Enable the platform-specific entropy code.
572 *
573 * Module: library/entropy.c
574 * Caller:
575 *
576 * Requires: POLARSSL_SHA4_C
577 *
578 * This module provides a generic entropy pool
579 */
580#define POLARSSL_ENTROPY_C
581
582/**
Paul Bakker9d781402011-05-09 16:17:09 +0000583 * \def POLARSSL_ERROR_C
584 *
585 * Enable error code to error string conversion.
586 *
587 * Module: library/error.c
588 * Caller:
589 *
590 * This module enables err_strerror().
591 */
592#define POLARSSL_ERROR_C
593
594/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000595 * \def POLARSSL_GCM_C
596 *
597 * Enable the Galois/Counter Mode (GCM) for AES
598 *
599 * Module: library/gcm.c
600 *
601 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000602 *
603 * This module enables the following ciphersuites (if other requisites are
604 * enabled as well):
605 * TLS_RSA_WITH_AES_128_GCM_SHA256
606 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000607 */
608#define POLARSSL_GCM_C
609
610/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000611 * \def POLARSSL_HAVEGE_C
612 *
613 * Enable the HAVEGE random generator.
614 *
Paul Bakker08f06cf2013-06-06 14:05:26 +0200615 * Warning: the HAVEGE random generator is not suitable for virtualized
616 * environments
617 *
618 * Warning: the HAVEGE random generator is dependent on timing and specific
619 * processor traits. It is therefore not advised to use HAVEGE as
620 * your applications primary random generator or primary entropy pool
621 * input. As a secondary input to your entropy pool, it IS able add
622 * the (limited) extra entropy it provides.
623 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000624 * Module: library/havege.c
625 * Caller:
626 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000627 * Requires: POLARSSL_TIMING_C
628 *
Paul Bakker08f06cf2013-06-06 14:05:26 +0200629 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +0000630#define POLARSSL_HAVEGE_C
Paul Bakker08f06cf2013-06-06 14:05:26 +0200631 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000632
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000633/**
634 * \def POLARSSL_MD_C
635 *
636 * Enable the generic message digest layer.
637 *
Paul Bakker17373852011-01-06 14:20:01 +0000638 * Module: library/md.c
639 * Caller:
640 *
641 * Uncomment to enable generic message digest wrappers.
642 */
643#define POLARSSL_MD_C
644
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000645/**
646 * \def POLARSSL_MD2_C
647 *
648 * Enable the MD2 hash algorithm
649 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000650 * Module: library/md2.c
651 * Caller: library/x509parse.c
652 *
653 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
654 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000655#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000656 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000657
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000658/**
659 * \def POLARSSL_MD4_C
660 *
661 * Enable the MD4 hash algorithm
662 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000663 * Module: library/md4.c
664 * Caller: library/x509parse.c
665 *
666 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
667 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000668#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000669 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000670
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000671/**
672 * \def POLARSSL_MD5_C
673 *
674 * Enable the MD5 hash algorithm
675 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000676 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100677 * Caller: library/pem.c
678 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000679 * library/x509parse.c
680 *
681 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100682 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000683 */
Paul Bakker40e46942009-01-03 21:51:57 +0000684#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000685
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000686/**
687 * \def POLARSSL_NET_C
688 *
689 * Enable the TCP/IP networking routines.
690 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000691 * Module: library/net.c
692 * Caller:
693 *
694 * This module provides TCP/IP networking routines.
695 */
Paul Bakker40e46942009-01-03 21:51:57 +0000696#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000697
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000698/**
699 * \def POLARSSL_PADLOCK_C
700 *
701 * Enable VIA Padlock support on x86.
702 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000703 * Module: library/padlock.c
704 * Caller: library/aes.c
705 *
706 * This modules adds support for the VIA PadLock on x86.
707 */
Paul Bakker40e46942009-01-03 21:51:57 +0000708#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000709
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000710/**
Paul Bakkerf518b162012-08-23 13:03:18 +0000711 * \def POLARSSL_PBKDF2_C
712 *
713 * Enable PKCS#5 PBKDF2 key derivation function
714 *
715 * Module: library/pbkdf2.c
716 *
717 * Requires: POLARSSL_MD_C
718 *
719 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
720#define POLARSSL_PBKDF2_C
721 */
722
723/**
Paul Bakker96743fc2011-02-12 14:30:57 +0000724 * \def POLARSSL_PEM_C
725 *
726 * Enable PEM decoding
727 *
728 * Module: library/pem.c
729 * Caller: library/x509parse.c
730 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000731 * Requires: POLARSSL_BASE64_C
732 *
Paul Bakker96743fc2011-02-12 14:30:57 +0000733 * This modules adds support for decoding PEM files.
734 */
735#define POLARSSL_PEM_C
736
737/**
Paul Bakker5690efc2011-05-26 13:16:06 +0000738 * \def POLARSSL_PKCS11_C
739 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000740 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000741 *
742 * Module: library/ssl_srv.c
743 * Caller: library/ssl_cli.c
744 * library/ssl_srv.c
745 *
746 * Requires: POLARSSL_SSL_TLS_C
747 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000748 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000749 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
750#define POLARSSL_PKCS11_C
751 */
752
753/**
Paul Bakkercf6e95d2013-06-12 13:18:15 +0200754 * \def POLARSSL_PKCS12_C
755 *
756 * Enable PKCS#12 PBE functions
757 * Adds algorithms for parsing PKCS#8 encrypted private keys
758 *
759 * Module: library/pkcs12.c
760 * Caller: library/x509parse.c
761 *
762 * Requires: POLARSSL_ASN1_PARSE_C
763 * Can use: POLARSSL_SHA1_C, POLARSSL_DES_C, POLARSSL_ARC4_C
764 *
765 * This module enables PKCS#12 functions.
766 */
767#define POLARSSL_PKCS12_C
768
769/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000770 * \def POLARSSL_RSA_C
771 *
772 * Enable the RSA public-key cryptosystem.
773 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000774 * Module: library/rsa.c
775 * Caller: library/ssl_cli.c
776 * library/ssl_srv.c
777 * library/ssl_tls.c
778 * library/x509.c
779 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000780 * Requires: POLARSSL_BIGNUM_C
781 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000782 * This module is required for SSL/TLS and MD5-signed certificates.
783 */
Paul Bakker40e46942009-01-03 21:51:57 +0000784#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000785
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000786/**
787 * \def POLARSSL_SHA1_C
788 *
789 * Enable the SHA1 cryptographic hash algorithm.
790 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000791 * Module: library/sha1.c
792 * Caller: library/ssl_cli.c
793 * library/ssl_srv.c
794 * library/ssl_tls.c
795 * library/x509parse.c
796 *
797 * This module is required for SSL/TLS and SHA1-signed certificates.
798 */
Paul Bakker40e46942009-01-03 21:51:57 +0000799#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000800
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000801/**
802 * \def POLARSSL_SHA2_C
803 *
804 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
805 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000806 * Module: library/sha2.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000807 * Caller: library/md_wrap.c
808 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000809 *
810 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +0100811 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +0000812 */
Paul Bakker40e46942009-01-03 21:51:57 +0000813#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000814
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000815/**
816 * \def POLARSSL_SHA4_C
817 *
818 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
819 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000820 * Module: library/sha4.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000821 * Caller: library/md_wrap.c
822 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000823 *
824 * This module adds support for SHA-384 and SHA-512.
825 */
Paul Bakker40e46942009-01-03 21:51:57 +0000826#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000827
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000828/**
Paul Bakker0a597072012-09-25 21:55:46 +0000829 * \def POLARSSL_SSL_CACHE_C
830 *
831 * Enable simple SSL cache implementation.
832 *
833 * Module: library/ssl_cache.c
834 * Caller:
835 *
836 * Requires: POLARSSL_SSL_CACHE_C
837 */
838#define POLARSSL_SSL_CACHE_C
839
840/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000841 * \def POLARSSL_SSL_CLI_C
842 *
843 * Enable the SSL/TLS client code.
844 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000845 * Module: library/ssl_cli.c
846 * Caller:
847 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000848 * Requires: POLARSSL_SSL_TLS_C
849 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000850 * This module is required for SSL/TLS client support.
851 */
Paul Bakker40e46942009-01-03 21:51:57 +0000852#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000853
Paul Bakker9a736322012-11-14 12:39:52 +0000854/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000855 * \def POLARSSL_SSL_SRV_C
856 *
857 * Enable the SSL/TLS server code.
858 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000859 * Module: library/ssl_srv.c
860 * Caller:
861 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000862 * Requires: POLARSSL_SSL_TLS_C
863 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000864 * This module is required for SSL/TLS server support.
865 */
Paul Bakker40e46942009-01-03 21:51:57 +0000866#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000867
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000868/**
869 * \def POLARSSL_SSL_TLS_C
870 *
Paul Bakkere29ab062011-05-18 13:26:54 +0000871 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000872 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000873 * Module: library/ssl_tls.c
874 * Caller: library/ssl_cli.c
875 * library/ssl_srv.c
876 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000877 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C, POLARSSL_X509_PARSE_C
878 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000879 * This module is required for SSL/TLS.
880 */
Paul Bakker40e46942009-01-03 21:51:57 +0000881#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000882
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000883/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000884 * \def POLARSSL_TIMING_C
885 *
886 * Enable the portable timing interface.
887 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000888 * Module: library/timing.c
889 * Caller: library/havege.c
890 *
891 * This module is used by the HAVEGE random number generator.
892 */
Paul Bakker40e46942009-01-03 21:51:57 +0000893#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000894
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000895/**
896 * \def POLARSSL_VERSION_C
897 *
898 * Enable run-time version information.
899 *
Paul Bakker0a62cd12011-01-21 11:00:08 +0000900 * Module: library/version.c
901 *
902 * This module provides run-time version information.
903 */
904#define POLARSSL_VERSION_C
905
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000906/**
907 * \def POLARSSL_X509_PARSE_C
908 *
909 * Enable X.509 certificate parsing.
910 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000911 * Module: library/x509parse.c
912 * Caller: library/ssl_cli.c
913 * library/ssl_srv.c
914 * library/ssl_tls.c
915 *
Paul Bakkerefc30292011-11-10 14:43:23 +0000916 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000917 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000918 * This module is required for X.509 certificate parsing.
919 */
Paul Bakker40e46942009-01-03 21:51:57 +0000920#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000921
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000922/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000923 * \def POLARSSL_X509_WRITE_C
924 *
925 * Enable X.509 buffer writing.
926 *
927 * Module: library/x509write.c
928 *
929 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
930 *
931 * This module is required for X.509 certificate request writing.
932 */
933#define POLARSSL_X509_WRITE_C
934
935/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000936 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000937 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000938 * Enable the XTEA block cipher.
939 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000940 * Module: library/xtea.c
941 * Caller:
942 */
943#define POLARSSL_XTEA_C
Paul Bakker0a62cd12011-01-21 11:00:08 +0000944/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000945
Paul Bakker5121ce52009-01-03 21:22:43 +0000946#endif /* config.h */