blob: 7a570e0bed3f4223439468b60d1ff7f27e4af587 [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 Bakkerd4a56ec2013-04-16 18:05:29 +0200165 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
166 *
167 * Enable the PSK based ciphersuite modes in SSL / TLS
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200168 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200169 * This enables the following ciphersuites (if other requisites are
170 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200171 * TLS_PSK_WITH_RC4_128_SHA
172 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
173 * TLS_PSK_WITH_AES_128_CBC_SHA
174 * TLS_PSK_WITH_AES_256_CBC_SHA
175 */
176#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
177
178/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200179 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
180 *
181 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS
182 *
183 * Requires: POLARSSL_DHM_C
184 *
185 * This enables the following ciphersuites (if other requisites are
186 * enabled as well):
187 * TLS_DHE_PSK_WITH_RC4_128_SHA
188 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
189 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
190 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200191 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200192#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200193
194/**
195 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
196 *
197 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS
198 *
199 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
200 *
201 * This enables the following ciphersuites (if other requisites are
202 * enabled as well):
203 * TLS_RSA_PSK_WITH_RC4_128_SHA
204 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
205 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
206 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
207#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
208 */
209
210/**
211 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
212 *
213 * Enable the RSA-only based ciphersuite modes in SSL / TLS
214 *
215 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
216 *
217 * This enables the following ciphersuites (if other requisites are
218 * enabled as well):
219 * TLS_RSA_WITH_AES_128_CBC_SHA
220 * TLS_RSA_WITH_AES_256_CBC_SHA
221 * TLS_RSA_WITH_AES_128_CBC_SHA256
222 * TLS_RSA_WITH_AES_256_CBC_SHA256
223 * TLS_RSA_WITH_AES_128_GCM_SHA256
224 * TLS_RSA_WITH_AES_256_GCM_SHA384
225 * TLS_RSA_WITH_RC4_128_MD5
226 * TLS_RSA_WITH_RC4_128_SHA
227 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
228 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
229 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
230 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
231 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
232 */
233#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
234
235/**
236 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
237 *
238 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS
239 *
240 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
241 *
242 * This enables the following ciphersuites (if other requisites are
243 * enabled as well):
244 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
245 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
246 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
247 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
248 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
249 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
250 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
251 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
252 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
253 */
254#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
255
256/**
257 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
258 *
259 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS
260 *
261 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C
262 *
263 * This enables the following ciphersuites (if other requisites are
264 * enabled as well):
265 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
266 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
267 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
268 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
269 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
270 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
271 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
272 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
273 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
274 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
275 */
276#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
277
278/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100279 * \def POLARSSL_ERROR_STRERROR_DUMMY
280 *
281 * Enable a dummy error function to make use of error_strerror() in
282 * third party libraries easier.
283 *
284 * Disable if you run into name conflicts and want to really remove the
285 * error_strerror()
286 */
287#define POLARSSL_ERROR_STRERROR_DUMMY
288
289/**
Paul Bakker15566e42011-04-24 21:19:15 +0000290 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000291 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000292 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
293 *
Paul Bakker15566e42011-04-24 21:19:15 +0000294 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000295 */
Paul Bakker15566e42011-04-24 21:19:15 +0000296#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000297
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000298/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000299 * \def POLARSSL_FS_IO
300 *
301 * Enable functions that use the filesystem.
302 */
303#define POLARSSL_FS_IO
304
305/**
Paul Bakker43655f42011-12-15 20:11:16 +0000306 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
307 *
308 * Do not add default entropy sources. These are the platform specific,
309 * hardclock and HAVEGE based poll functions.
310 *
311 * This is useful to have more control over the added entropy sources in an
312 * application.
313 *
314 * Uncomment this macro to prevent loading of default entropy functions.
315#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
316 */
317
318/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000319 * \def POLARSSL_NO_PLATFORM_ENTROPY
320 *
321 * Do not use built-in platform entropy functions.
322 * This is useful if your platform does not support
323 * standards like the /dev/urandom or Windows CryptoAPI.
324 *
325 * Uncomment this macro to disable the built-in platform entropy functions.
326#define POLARSSL_NO_PLATFORM_ENTROPY
327 */
328
329/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000330 * \def POLARSSL_PKCS1_V21
331 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000332 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
333 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000334 * Enable support for PKCS#1 v2.1 encoding.
335 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
336 */
337#define POLARSSL_PKCS1_V21
338
339/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000340 * \def POLARSSL_RSA_NO_CRT
341 *
342 * Do not use the Chinese Remainder Theorem for the RSA private operation.
343 *
344 * Uncomment this macro to disable the use of CRT in RSA.
345 *
346#define POLARSSL_RSA_NO_CRT
347 */
Paul Bakker15566e42011-04-24 21:19:15 +0000348
349/**
350 * \def POLARSSL_SELF_TEST
351 *
352 * Enable the checkup functions (*_self_test).
353 */
354#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000355
356/**
Paul Bakker40865c82013-01-31 17:13:13 +0100357 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
358 *
359 * Enable sending of alert messages in case of encountered errors as per RFC.
360 * If you choose not to send the alert messages, PolarSSL can still communicate
361 * with other servers, only debugging of failures is harder.
362 *
363 * The advantage of not sending alert messages, is that no information is given
364 * about reasons for failures thus preventing adversaries of gaining intel.
365 *
366 * Enable sending of all alert messages
367 */
368#define POLARSSL_SSL_ALERT_MESSAGES
369
370/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100371 * \def POLARSSL_SSL_DEBUG_ALL
372 *
373 * Enable the debug messages in SSL module for all issues.
374 * Debug messages have been disabled in some places to prevent timing
375 * attacks due to (unbalanced) debugging function calls.
376 *
377 * If you need all error reporting you should enable this during debugging,
378 * but remove this for production servers that should log as well.
379 *
380 * Uncomment this macro to report all debug messages on errors introducing
381 * a timing side-channel.
382 *
383#define POLARSSL_SSL_DEBUG_ALL
384 */
385
386/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000387 * \def POLARSSL_SSL_HW_RECORD_ACCEL
388 *
389 * Enable hooking functions in SSL module for hardware acceleration of
390 * individual records.
391 *
392 * Uncomment this macro to enable hooking functions.
393#define POLARSSL_SSL_HW_RECORD_ACCEL
394 */
395
396/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100397 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
398 *
399 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
400 * SSL Server module (POLARSSL_SSL_SRV_C)
401 *
402 * Comment this macro to disable support for SSLv2 Client Hello messages.
403 */
404#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
405
406/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000407 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
408 *
409 * If set, the X509 parser will not break-off when parsing an X509 certificate
410 * and encountering an unknown critical extension.
411 *
412 * Uncomment to prevent an error.
413 *
414#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
415 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000416
417/**
418 * \def POLARSSL_ZLIB_SUPPORT
419 *
420 * If set, the SSL/TLS module uses ZLIB to support compression and
421 * decompression of packet data.
422 *
423 * Used in: library/ssl_tls.c
424 * library/ssl_cli.c
425 * library/ssl_srv.c
426 *
427 * This feature requires zlib library and headers to be present.
428 *
429 * Uncomment to enable use of ZLIB
430#define POLARSSL_ZLIB_SUPPORT
431 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000432/* \} name */
433
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000434/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000435 * \name SECTION: PolarSSL modules
436 *
437 * This section enables or disables entire modules in PolarSSL
438 * \{
439 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000440
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000441/**
442 * \def POLARSSL_AES_C
443 *
444 * Enable the AES block cipher.
445 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000446 * Module: library/aes.c
447 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000448 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000449 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000450 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000451 * This module enables the following ciphersuites (if other requisites are
452 * enabled as well):
453 * TLS_RSA_WITH_AES_128_CBC_SHA
454 * TLS_RSA_WITH_AES_256_CBC_SHA
455 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
456 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
457 * TLS_RSA_WITH_AES_128_CBC_SHA256
458 * TLS_RSA_WITH_AES_256_CBC_SHA256
459 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
460 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
461 * TLS_RSA_WITH_AES_128_GCM_SHA256
462 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100463 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
464 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200465 * TLS_PSK_WITH_AES_128_CBC_SHA
466 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100467 *
468 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000469 */
Paul Bakker40e46942009-01-03 21:51:57 +0000470#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000471
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000472/**
473 * \def POLARSSL_ARC4_C
474 *
475 * Enable the ARCFOUR stream cipher.
476 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000477 * Module: library/arc4.c
478 * Caller: library/ssl_tls.c
479 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100480 * This module enables the following ciphersuites (if other requisites are
481 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000482 * TLS_RSA_WITH_RC4_128_MD5
483 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100484 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200485 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000486 */
Paul Bakker40e46942009-01-03 21:51:57 +0000487#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000488
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000489/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000490 * \def POLARSSL_ASN1_PARSE_C
491 *
492 * Enable the generic ASN1 parser.
493 *
494 * Module: library/asn1.c
495 * Caller: library/x509parse.c
496 */
497#define POLARSSL_ASN1_PARSE_C
498
499/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000500 * \def POLARSSL_ASN1_WRITE_C
501 *
502 * Enable the generic ASN1 writer.
503 *
504 * Module: library/asn1write.c
505 */
506#define POLARSSL_ASN1_WRITE_C
507
508/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000509 * \def POLARSSL_BASE64_C
510 *
511 * Enable the Base64 module.
512 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000513 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000514 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000515 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000516 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000517 */
Paul Bakker40e46942009-01-03 21:51:57 +0000518#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000519
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000520/**
521 * \def POLARSSL_BIGNUM_C
522 *
Paul Bakker9a736322012-11-14 12:39:52 +0000523 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000524 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000525 * Module: library/bignum.c
526 * Caller: library/dhm.c
527 * library/rsa.c
528 * library/ssl_tls.c
529 * library/x509parse.c
530 *
531 * This module is required for RSA and DHM support.
532 */
Paul Bakker40e46942009-01-03 21:51:57 +0000533#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000534
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000535/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000536 * \def POLARSSL_BLOWFISH_C
537 *
538 * Enable the Blowfish block cipher.
539 *
540 * Module: library/blowfish.c
541 */
542#define POLARSSL_BLOWFISH_C
543
544/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000545 * \def POLARSSL_CAMELLIA_C
546 *
547 * Enable the Camellia block cipher.
548 *
Paul Bakker38119b12009-01-10 23:31:23 +0000549 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000550 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000551 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000552 * This module enables the following ciphersuites (if other requisites are
553 * enabled as well):
554 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
555 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
556 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
557 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
558 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
559 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
560 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
561 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000562 */
563#define POLARSSL_CAMELLIA_C
564
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000565/**
566 * \def POLARSSL_CERTS_C
567 *
568 * Enable the test certificates.
569 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000570 * Module: library/certs.c
571 * Caller:
572 *
573 * This module is used for testing (ssl_client/server).
574 */
Paul Bakker40e46942009-01-03 21:51:57 +0000575#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000576
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000577/**
578 * \def POLARSSL_CIPHER_C
579 *
580 * Enable the generic cipher layer.
581 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000582 * Module: library/cipher.c
583 * Caller:
584 *
585 * Uncomment to enable generic cipher wrappers.
586 */
587#define POLARSSL_CIPHER_C
588
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000589/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000590 * \def POLARSSL_CTR_DRBG_C
591 *
592 * Enable the CTR_DRBG AES-256-based random generator
593 *
594 * Module: library/ctr_drbg.c
595 * Caller:
596 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000597 * Requires: POLARSSL_AES_C
598 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000599 * This module provides the CTR_DRBG AES-256 random number generator.
600 */
601#define POLARSSL_CTR_DRBG_C
602
603/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000604 * \def POLARSSL_DEBUG_C
605 *
606 * Enable the debug functions.
607 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000608 * Module: library/debug.c
609 * Caller: library/ssl_cli.c
610 * library/ssl_srv.c
611 * library/ssl_tls.c
612 *
613 * This module provides debugging functions.
614 */
Paul Bakker40e46942009-01-03 21:51:57 +0000615#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000616
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000617/**
618 * \def POLARSSL_DES_C
619 *
620 * Enable the DES block cipher.
621 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000622 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100623 * Caller: library/pem.c
624 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000625 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000626 * This module enables the following ciphersuites (if other requisites are
627 * enabled as well):
628 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
629 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100630 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200631 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100632 *
633 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000634 */
Paul Bakker40e46942009-01-03 21:51:57 +0000635#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000636
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000637/**
638 * \def POLARSSL_DHM_C
639 *
640 * Enable the Diffie-Hellman-Merkle key exchange.
641 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000642 * Module: library/dhm.c
643 * Caller: library/ssl_cli.c
644 * library/ssl_srv.c
645 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000646 * This module enables the following ciphersuites (if other requisites are
647 * enabled as well):
648 * TLS_DHE_RSA_WITH_DES_CBC_SHA
649 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
650 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
651 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
652 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
653 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
654 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
655 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
656 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
657 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
658 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
659 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000660 */
Paul Bakker40e46942009-01-03 21:51:57 +0000661#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000662
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000663/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100664 * \def POLARSSL_ECDH_C
665 *
666 * Enable the elliptic curve Diffie-Hellman library.
667 *
668 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100669 * Caller: library/ssl_cli.c
670 * library/ssl_srv.c
671 *
672 * This module enables the following ciphersuites (if other requisites are
673 * enabled as well):
674 * TLS_ECDHE_RSA_WITH_NULL_SHA
675 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
676 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
677 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
678 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100679 *
680 * Requires: POLARSSL_ECP_C
681 */
682#define POLARSSL_ECDH_C
683
684/**
685 * \def POLARSSL_ECDSA_C
686 *
687 * Enable the elliptic curve DSA library.
688 *
689 * Module: library/ecdsa.c
690 * Caller:
691 *
692 * Requires: POLARSSL_ECP_C
693 */
694#define POLARSSL_ECDSA_C
695
696/**
697 * \def POLARSSL_ECP_C
698 *
699 * Enable the elliptic curve over GF(p) library.
700 *
701 * Module: library/ecp.c
702 * Caller: library/ecdh.c
703 * library/ecdsa.c
704 *
705 * Requires: POLARSSL_BIGNUM_C
706 */
707#define POLARSSL_ECP_C
708
709/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000710 * \def POLARSSL_ENTROPY_C
711 *
712 * Enable the platform-specific entropy code.
713 *
714 * Module: library/entropy.c
715 * Caller:
716 *
717 * Requires: POLARSSL_SHA4_C
718 *
719 * This module provides a generic entropy pool
720 */
721#define POLARSSL_ENTROPY_C
722
723/**
Paul Bakker9d781402011-05-09 16:17:09 +0000724 * \def POLARSSL_ERROR_C
725 *
726 * Enable error code to error string conversion.
727 *
728 * Module: library/error.c
729 * Caller:
730 *
731 * This module enables err_strerror().
732 */
733#define POLARSSL_ERROR_C
734
735/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000736 * \def POLARSSL_GCM_C
737 *
738 * Enable the Galois/Counter Mode (GCM) for AES
739 *
740 * Module: library/gcm.c
741 *
742 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000743 *
744 * This module enables the following ciphersuites (if other requisites are
745 * enabled as well):
746 * TLS_RSA_WITH_AES_128_GCM_SHA256
747 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +0000748 */
749#define POLARSSL_GCM_C
750
751/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000752 * \def POLARSSL_HAVEGE_C
753 *
754 * Enable the HAVEGE random generator.
755 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000756 * Module: library/havege.c
757 * Caller:
758 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000759 * Requires: POLARSSL_TIMING_C
760 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000761 * This module enables the HAVEGE random number generator.
762 */
Paul Bakker40e46942009-01-03 21:51:57 +0000763#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000764
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000765/**
766 * \def POLARSSL_MD_C
767 *
768 * Enable the generic message digest layer.
769 *
Paul Bakker17373852011-01-06 14:20:01 +0000770 * Module: library/md.c
771 * Caller:
772 *
773 * Uncomment to enable generic message digest wrappers.
774 */
775#define POLARSSL_MD_C
776
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000777/**
778 * \def POLARSSL_MD2_C
779 *
780 * Enable the MD2 hash algorithm
781 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000782 * Module: library/md2.c
783 * Caller: library/x509parse.c
784 *
785 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
786 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000787#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000788 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000789
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000790/**
791 * \def POLARSSL_MD4_C
792 *
793 * Enable the MD4 hash algorithm
794 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000795 * Module: library/md4.c
796 * Caller: library/x509parse.c
797 *
798 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
799 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000800#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000801 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000802
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000803/**
804 * \def POLARSSL_MD5_C
805 *
806 * Enable the MD5 hash algorithm
807 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000808 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100809 * Caller: library/pem.c
810 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000811 * library/x509parse.c
812 *
813 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +0100814 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000815 */
Paul Bakker40e46942009-01-03 21:51:57 +0000816#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000817
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000818/**
819 * \def POLARSSL_NET_C
820 *
821 * Enable the TCP/IP networking routines.
822 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000823 * Module: library/net.c
824 * Caller:
825 *
826 * This module provides TCP/IP networking routines.
827 */
Paul Bakker40e46942009-01-03 21:51:57 +0000828#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000829
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000830/**
Paul Bakkerc70b9822013-04-07 22:00:46 +0200831 * \def POLARSSL_OID_C
832 *
833 * Enable the OID database
834 *
835 * Module: library/oid.c
836 * Caller: library/rsa.c
837 * library/x509parse.c
838 * library/x509write.c
839 *
840 * This modules translates between OIDs and internal values.
841 */
842#define POLARSSL_OID_C
843
844/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000845 * \def POLARSSL_PADLOCK_C
846 *
847 * Enable VIA Padlock support on x86.
848 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000849 * Module: library/padlock.c
850 * Caller: library/aes.c
851 *
852 * This modules adds support for the VIA PadLock on x86.
853 */
Paul Bakker40e46942009-01-03 21:51:57 +0000854#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000855
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000856/**
Paul Bakkerf518b162012-08-23 13:03:18 +0000857 * \def POLARSSL_PBKDF2_C
858 *
859 * Enable PKCS#5 PBKDF2 key derivation function
860 *
861 * Module: library/pbkdf2.c
862 *
863 * Requires: POLARSSL_MD_C
864 *
865 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +0000866 */
Paul Bakker370e90c2013-04-08 15:19:43 +0200867#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +0000868
869/**
Paul Bakker96743fc2011-02-12 14:30:57 +0000870 * \def POLARSSL_PEM_C
871 *
872 * Enable PEM decoding
873 *
874 * Module: library/pem.c
875 * Caller: library/x509parse.c
876 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000877 * Requires: POLARSSL_BASE64_C
878 *
Paul Bakker96743fc2011-02-12 14:30:57 +0000879 * This modules adds support for decoding PEM files.
880 */
881#define POLARSSL_PEM_C
882
883/**
Paul Bakker5690efc2011-05-26 13:16:06 +0000884 * \def POLARSSL_PKCS11_C
885 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000886 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000887 *
888 * Module: library/ssl_srv.c
889 * Caller: library/ssl_cli.c
890 * library/ssl_srv.c
891 *
892 * Requires: POLARSSL_SSL_TLS_C
893 *
Paul Bakkereb2c6582012-09-27 19:15:01 +0000894 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +0000895 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
896#define POLARSSL_PKCS11_C
897 */
898
899/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000900 * \def POLARSSL_RSA_C
901 *
902 * Enable the RSA public-key cryptosystem.
903 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000904 * Module: library/rsa.c
905 * Caller: library/ssl_cli.c
906 * library/ssl_srv.c
907 * library/ssl_tls.c
908 * library/x509.c
909 *
Paul Bakkerc70b9822013-04-07 22:00:46 +0200910 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +0000911 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000912 * This module is required for SSL/TLS and MD5-signed certificates.
913 */
Paul Bakker40e46942009-01-03 21:51:57 +0000914#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000915
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000916/**
917 * \def POLARSSL_SHA1_C
918 *
919 * Enable the SHA1 cryptographic hash algorithm.
920 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000921 * Module: library/sha1.c
922 * Caller: library/ssl_cli.c
923 * library/ssl_srv.c
924 * library/ssl_tls.c
925 * library/x509parse.c
926 *
927 * This module is required for SSL/TLS and SHA1-signed certificates.
928 */
Paul Bakker40e46942009-01-03 21:51:57 +0000929#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000930
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000931/**
932 * \def POLARSSL_SHA2_C
933 *
934 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
935 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000936 * Module: library/sha2.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000937 * Caller: library/md_wrap.c
938 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000939 *
940 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +0100941 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +0000942 */
Paul Bakker40e46942009-01-03 21:51:57 +0000943#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000944
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000945/**
946 * \def POLARSSL_SHA4_C
947 *
948 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
949 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000950 * Module: library/sha4.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000951 * Caller: library/md_wrap.c
952 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000953 *
954 * This module adds support for SHA-384 and SHA-512.
955 */
Paul Bakker40e46942009-01-03 21:51:57 +0000956#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000957
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000958/**
Paul Bakker0a597072012-09-25 21:55:46 +0000959 * \def POLARSSL_SSL_CACHE_C
960 *
961 * Enable simple SSL cache implementation.
962 *
963 * Module: library/ssl_cache.c
964 * Caller:
965 *
966 * Requires: POLARSSL_SSL_CACHE_C
967 */
968#define POLARSSL_SSL_CACHE_C
969
970/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000971 * \def POLARSSL_SSL_CLI_C
972 *
973 * Enable the SSL/TLS client code.
974 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000975 * Module: library/ssl_cli.c
976 * Caller:
977 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000978 * Requires: POLARSSL_SSL_TLS_C
979 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000980 * This module is required for SSL/TLS client support.
981 */
Paul Bakker40e46942009-01-03 21:51:57 +0000982#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000983
Paul Bakker9a736322012-11-14 12:39:52 +0000984/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000985 * \def POLARSSL_SSL_SRV_C
986 *
987 * Enable the SSL/TLS server code.
988 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000989 * Module: library/ssl_srv.c
990 * Caller:
991 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000992 * Requires: POLARSSL_SSL_TLS_C
993 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000994 * This module is required for SSL/TLS server support.
995 */
Paul Bakker40e46942009-01-03 21:51:57 +0000996#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000997
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000998/**
999 * \def POLARSSL_SSL_TLS_C
1000 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001001 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001002 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001003 * Module: library/ssl_tls.c
1004 * Caller: library/ssl_cli.c
1005 * library/ssl_srv.c
1006 *
Paul Bakker7ad00f92013-04-18 23:05:25 +02001007 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001008 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001009 * This module is required for SSL/TLS.
1010 */
Paul Bakker40e46942009-01-03 21:51:57 +00001011#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001012
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001013/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001014 * \def POLARSSL_TIMING_C
1015 *
1016 * Enable the portable timing interface.
1017 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001018 * Module: library/timing.c
1019 * Caller: library/havege.c
1020 *
1021 * This module is used by the HAVEGE random number generator.
1022 */
Paul Bakker40e46942009-01-03 21:51:57 +00001023#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001024
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001025/**
1026 * \def POLARSSL_VERSION_C
1027 *
1028 * Enable run-time version information.
1029 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001030 * Module: library/version.c
1031 *
1032 * This module provides run-time version information.
1033 */
1034#define POLARSSL_VERSION_C
1035
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001036/**
1037 * \def POLARSSL_X509_PARSE_C
1038 *
1039 * Enable X.509 certificate parsing.
1040 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001041 * Module: library/x509parse.c
1042 * Caller: library/ssl_cli.c
1043 * library/ssl_srv.c
1044 * library/ssl_tls.c
1045 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001046 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
1047 * POLARSSL_RSA_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001048 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001049 * This module is required for X.509 certificate parsing.
1050 */
Paul Bakker40e46942009-01-03 21:51:57 +00001051#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001052
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001053/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001054 * \def POLARSSL_X509_WRITE_C
1055 *
1056 * Enable X.509 buffer writing.
1057 *
1058 * Module: library/x509write.c
1059 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001060 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001061 *
1062 * This module is required for X.509 certificate request writing.
1063 */
1064#define POLARSSL_X509_WRITE_C
1065
1066/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001067 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001068 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001069 * Enable the XTEA block cipher.
1070 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001071 * Module: library/xtea.c
1072 * Caller:
1073 */
1074#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001075
Paul Bakker0a62cd12011-01-21 11:00:08 +00001076/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001077
Paul Bakker7ad00f92013-04-18 23:05:25 +02001078/*
1079 * Sanity checks on defines and dependencies
1080 */
1081#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1082#error "POLARSSL_DHM_C defined, but not all prerequisites"
1083#endif
1084
1085#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1086#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1087#endif
1088
1089#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1090#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1091#endif
1092
1093#if defined(POLARSSL_ECDSA_C) && !defined(POLARSSL_ECP_C)
1094#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1095#endif
1096
1097#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1098#error "POLARSSL_ECP_C defined, but not all prerequisites"
1099#endif
1100
1101#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA4_C)
1102#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1103#endif
1104
1105#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1106#error "POLARSSL_GCM_C defined, but not all prerequisites"
1107#endif
1108
Paul Bakkere07f41d2013-04-19 09:08:57 +02001109#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1110#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1111#endif
1112
1113#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1114 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
1115 !defined(POLARSSL_X509_PARSE_C) )
1116#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1117#endif
1118
1119#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1120 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
1121 !defined(POLARSSL_X509_PARSE_C) )
1122#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1123#endif
1124
1125#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
1126 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1127#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1128#endif
1129
1130#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
1131 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) )
1132#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1133#endif
1134
Paul Bakker7ad00f92013-04-18 23:05:25 +02001135#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1136#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1137#endif
1138
1139#if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C)
1140#error "POLARSSL_PEM_C defined, but not all prerequisites"
1141#endif
1142
1143#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_SSL_TLS_C)
1144#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1145#endif
1146
1147#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1148 !defined(POLARSSL_OID_C) )
1149#error "POLARSSL_RSA_C defined, but not all prerequisites"
1150#endif
1151
1152#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1153#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1154#endif
1155
1156#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_MD5_C) || \
1157 !defined(POLARSSL_SHA1_C) )
1158#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1159#endif
1160
1161#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1162#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1163#endif
1164
1165#if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1166 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
1167 !defined(POLARSSL_RSA_C) )
1168#error "POLARSSL_X509_PARSE_C defined, but not all prerequisites"
1169#endif
1170
1171#if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1172 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1173 !defined(POLARSSL_RSA_C) )
1174#error "POLARSSL_X509_WRITE_C defined, but not all prerequisites"
1175#endif
1176
Paul Bakker5121ce52009-01-03 21:22:43 +00001177#endif /* config.h */