blob: 801483743113c5dda805a6718796d6b00beab3f8 [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 Bakker9bcf16c2013-06-24 19:31:17 +02006 * Copyright (C) 2006-2013, 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 Bakkerfa9b1002013-07-03 15:31:03 +020097
98/**
99 * \def POLARSSL_HAVE_TIME
100 *
101 * System has time.h and time() / localtime() / gettimeofday()
102 *
103 * Comment if your system does not support time functions
104 */
105#define POLARSSL_HAVE_TIME
Paul Bakker0a62cd12011-01-21 11:00:08 +0000106/* \} name */
107
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000108/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000109 * \name SECTION: PolarSSL feature support
110 *
111 * This section sets support for features that are or are not needed
112 * within the modules that are enabled.
113 * \{
114 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000115
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000116/**
Paul Bakker90995b52013-06-24 19:20:35 +0200117 * \def POLARSSL_XXX_ALT
118 *
119 * Uncomment a macro to let PolarSSL use your alternate core implementation of
120 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
121 * implementations). Keep in mind that the function prototypes should remain
122 * the same.
123 *
124 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
125 * provide the "struct aes_context" definition and omit the base function
126 * declarations and implementations. "aes_alt.h" will be included from
127 * "aes.h" to include the new function definitions.
128 *
129 * Uncomment a macro to enable alternate implementation for core algorithm
130 * functions
131#define POLARSSL_AES_ALT
132#define POLARSSL_ARC4_ALT
133#define POLARSSL_BLOWFISH_ALT
134#define POLARSSL_CAMELLIA_ALT
135#define POLARSSL_DES_ALT
136#define POLARSSL_XTEA_ALT
137#define POLARSSL_MD2_ALT
138#define POLARSSL_MD4_ALT
139#define POLARSSL_MD5_ALT
140#define POLARSSL_SHA1_ALT
Paul Bakker9e36f042013-06-30 14:34:05 +0200141#define POLARSSL_SHA256_ALT
142#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200143 */
144
145/**
Paul Bakker15566e42011-04-24 21:19:15 +0000146 * \def POLARSSL_AES_ROM_TABLES
147 *
148 * Store the AES tables in ROM.
149 *
150 * Uncomment this macro to store the AES tables in ROM.
151 *
152#define POLARSSL_AES_ROM_TABLES
153 */
154
155/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200156 * \def POLARSSL_CIPHER_MODE_CBC
157 *
158 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
159 */
160#define POLARSSL_CIPHER_MODE_CBC
161
162/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000163 * \def POLARSSL_CIPHER_MODE_CFB
164 *
165 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
166 */
167#define POLARSSL_CIPHER_MODE_CFB
168
169/**
170 * \def POLARSSL_CIPHER_MODE_CTR
171 *
172 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
173 */
174#define POLARSSL_CIPHER_MODE_CTR
175
176/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000177 * \def POLARSSL_CIPHER_NULL_CIPHER
178 *
179 * Enable NULL cipher.
180 * Warning: Only do so when you know what you are doing. This allows for
181 * encryption or channels without any security!
182 *
183 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
184 * the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000185 * TLS_RSA_WITH_NULL_MD5
186 * TLS_RSA_WITH_NULL_SHA
187 * TLS_RSA_WITH_NULL_SHA256
Paul Bakker41c83d32013-03-20 14:39:14 +0100188 * TLS_ECDHE_RSA_WITH_NULL_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200189 * TLS_PSK_WITH_NULL
190 * TLS_PSK_WITH_NULL256
191 * TLS_PSK_WITH_NULL384
192 * TLS_DHE_PSK_WITH_NULL
193 * TLS_DHE_PSK_WITH_NULL256
194 * TLS_DHE_PSK_WITH_NULL384
195 * TLS_RSA_PSK_WITH_NULL
196 * TLS_RSA_PSK_WITH_NULL256
197 * TLS_RSA_PSK_WITH_NULL384
Paul Bakkerfab5c822012-02-06 16:45:10 +0000198 *
199 * Uncomment this macro to enable the NULL cipher and ciphersuites
200#define POLARSSL_CIPHER_NULL_CIPHER
201 */
202
203/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200204 * \def POLARSSL_CIPHER_PADDING_XXX
205 *
206 * Uncomment or comment macros to add support for specific padding modes
207 * in the cipher layer with cipher modes that support padding (e.g. CBC)
208 *
209 * If you disable all padding modes, only full blocks can be used with CBC.
210 *
211 * Enable padding modes in the cipher layer.
212 */
213#define POLARSSL_CIPHER_PADDING_PKCS7
214#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
215#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
216#define POLARSSL_CIPHER_PADDING_ZEROS
217
218/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000219 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
220 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000221 * Enable weak ciphersuites in SSL / TLS
Paul Bakkerfab5c822012-02-06 16:45:10 +0000222 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000223 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000224 *
225 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000226 * TLS_RSA_WITH_DES_CBC_SHA
227 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000228 *
229 * Uncomment this macro to enable weak ciphersuites
230#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
231 */
232
233/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200234 * \def POLARSSL_ECP_XXXX_ENABLED
235 *
236 * Enables specific curves within the Elliptic Curve module.
237 * By default all supported curves are enables.
238 *
239 * Comment macros to disable the curve and functions for it
240 */
241#define POLARSSL_ECP_DP_SECP192R1_ENABLED
242#define POLARSSL_ECP_DP_SECP224R1_ENABLED
243#define POLARSSL_ECP_DP_SECP256R1_ENABLED
244#define POLARSSL_ECP_DP_SECP384R1_ENABLED
245#define POLARSSL_ECP_DP_SECP521R1_ENABLED
246
247/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200248 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
249 *
250 * Enable the PSK based ciphersuite modes in SSL / TLS
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200251 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200252 * This enables the following ciphersuites (if other requisites are
253 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200254 * TLS_PSK_WITH_RC4_128_SHA
255 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
256 * TLS_PSK_WITH_AES_128_CBC_SHA
257 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200258 * TLS_PSK_WITH_AES_128_CBC_SHA256
259 * TLS_PSK_WITH_AES_256_CBC_SHA384
260 * TLS_PSK_WITH_AES_128_GCM_SHA256
261 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200262 */
263#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
264
265/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200266 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
267 *
268 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS
269 *
270 * Requires: POLARSSL_DHM_C
271 *
272 * This enables the following ciphersuites (if other requisites are
273 * enabled as well):
274 * TLS_DHE_PSK_WITH_RC4_128_SHA
275 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
276 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
277 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200278 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
279 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
280 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
281 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200282 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200283#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200284
285/**
286 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
287 *
288 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS
Paul Bakker45bda902013-04-19 22:28:21 +0200289 * (NOT YET IMPLEMENTED)
Paul Bakker48377d92013-08-30 12:06:24 +0200290 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C, POLARSSL_PKCS1_V15
Paul Bakkere07f41d2013-04-19 09:08:57 +0200291 *
292 * This enables the following ciphersuites (if other requisites are
293 * enabled as well):
294 * TLS_RSA_PSK_WITH_RC4_128_SHA
295 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
296 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
297 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200298 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
299 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
300 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
301 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200302#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
303 */
304
305/**
306 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
307 *
308 * Enable the RSA-only based ciphersuite modes in SSL / TLS
309 *
Paul Bakker48377d92013-08-30 12:06:24 +0200310 * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C, POLARSSL_PKCS1_V15
Paul Bakkere07f41d2013-04-19 09:08:57 +0200311 *
312 * This enables the following ciphersuites (if other requisites are
313 * enabled as well):
314 * TLS_RSA_WITH_AES_128_CBC_SHA
315 * TLS_RSA_WITH_AES_256_CBC_SHA
316 * TLS_RSA_WITH_AES_128_CBC_SHA256
317 * TLS_RSA_WITH_AES_256_CBC_SHA256
318 * TLS_RSA_WITH_AES_128_GCM_SHA256
319 * TLS_RSA_WITH_AES_256_GCM_SHA384
320 * TLS_RSA_WITH_RC4_128_MD5
321 * TLS_RSA_WITH_RC4_128_SHA
322 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
323 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
324 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
325 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
326 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
327 */
328#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
329
330/**
331 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
332 *
333 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS
334 *
Paul Bakker48377d92013-08-30 12:06:24 +0200335 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C,
336 * POLARSSL_PKCS1_V15
Paul Bakkere07f41d2013-04-19 09:08:57 +0200337 *
338 * This enables the following ciphersuites (if other requisites are
339 * enabled as well):
340 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
341 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
342 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
343 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
344 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
345 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
346 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
347 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
348 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
349 */
350#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
351
352/**
353 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
354 *
355 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS
356 *
Paul Bakker48377d92013-08-30 12:06:24 +0200357 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C,
358 * POLARSSL_PKCS1_V15
Paul Bakkere07f41d2013-04-19 09:08:57 +0200359 *
360 * This enables the following ciphersuites (if other requisites are
361 * enabled as well):
362 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
363 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
364 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
365 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
366 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
367 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
368 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
369 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
370 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
371 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
372 */
373#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
374
375/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200376 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
377 *
378 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS
379 *
380 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_PARSE_C
381 *
382 * This enables the following ciphersuites (if other requisites are
383 * enabled as well):
384 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
385 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
386 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
387 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
388 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
389 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
390 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
391 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
392 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
393 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
394 */
395#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
396
397/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200398 * \def POLARSSL_ERROR_STRERROR_BC
399 *
400 * Make available the backward compatible error_strerror() next to the
401 * current polarssl_strerror().
402 *
403 * Disable if you run into name conflicts and want to really remove the
404 * error_strerror()
405 */
406#define POLARSSL_ERROR_STRERROR_BC
407
408/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100409 * \def POLARSSL_ERROR_STRERROR_DUMMY
410 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200411 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100412 * third party libraries easier.
413 *
414 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200415 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100416 */
417#define POLARSSL_ERROR_STRERROR_DUMMY
418
419/**
Paul Bakker15566e42011-04-24 21:19:15 +0000420 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000421 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000422 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
423 *
Paul Bakker15566e42011-04-24 21:19:15 +0000424 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000425 */
Paul Bakker15566e42011-04-24 21:19:15 +0000426#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000427
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000428/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000429 * \def POLARSSL_FS_IO
430 *
431 * Enable functions that use the filesystem.
432 */
433#define POLARSSL_FS_IO
434
435/**
Paul Bakker43655f42011-12-15 20:11:16 +0000436 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
437 *
438 * Do not add default entropy sources. These are the platform specific,
439 * hardclock and HAVEGE based poll functions.
440 *
441 * This is useful to have more control over the added entropy sources in an
442 * application.
443 *
444 * Uncomment this macro to prevent loading of default entropy functions.
445#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
446 */
447
448/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000449 * \def POLARSSL_NO_PLATFORM_ENTROPY
450 *
451 * Do not use built-in platform entropy functions.
452 * This is useful if your platform does not support
453 * standards like the /dev/urandom or Windows CryptoAPI.
454 *
455 * Uncomment this macro to disable the built-in platform entropy functions.
456#define POLARSSL_NO_PLATFORM_ENTROPY
457 */
458
459/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200460 * \def POLARSSL_MEMORY_DEBUG
461 *
462 * Enable debugging of buffer allocator memory issues. Automatically prints
463 * (to stderr) all (fatal) messages on memory allocation issues. Enables
464 * function for 'debug output' of allocated memory.
465 *
466 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
467 * fprintf()
468 *
469 * Uncomment this macro to let the buffer allocator print out error messages.
470#define POLARSSL_MEMORY_DEBUG
471*/
472
473/**
474 * \def POLARSSL_MEMORY_BACKTRACE
475 *
476 * Include backtrace information with each allocated block.
477 *
478 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
479 * GLIBC-compatible backtrace() an backtrace_symbols() support
480 *
481 * Uncomment this macro to include backtrace information
482#define POLARSSL_MEMORY_BACKTRACE
483 */
484
485/**
Paul Bakker48377d92013-08-30 12:06:24 +0200486 * \def POLARSSL_PKCS1_V15
487 *
488 * Requires: POLARSSL_RSA_C
489 *
490 * Enable support for PKCS#1 v1.5 encoding.
491 * This enables support for PKCS#1 v1.5 operations.
492 */
493#define POLARSSL_PKCS1_V15
494
495/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000496 * \def POLARSSL_PKCS1_V21
497 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000498 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
499 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000500 * Enable support for PKCS#1 v2.1 encoding.
501 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
502 */
503#define POLARSSL_PKCS1_V21
504
505/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000506 * \def POLARSSL_RSA_NO_CRT
507 *
508 * Do not use the Chinese Remainder Theorem for the RSA private operation.
509 *
510 * Uncomment this macro to disable the use of CRT in RSA.
511 *
512#define POLARSSL_RSA_NO_CRT
513 */
Paul Bakker15566e42011-04-24 21:19:15 +0000514
515/**
516 * \def POLARSSL_SELF_TEST
517 *
518 * Enable the checkup functions (*_self_test).
519 */
520#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000521
522/**
Paul Bakker40865c82013-01-31 17:13:13 +0100523 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
524 *
525 * Enable sending of alert messages in case of encountered errors as per RFC.
526 * If you choose not to send the alert messages, PolarSSL can still communicate
527 * with other servers, only debugging of failures is harder.
528 *
529 * The advantage of not sending alert messages, is that no information is given
530 * about reasons for failures thus preventing adversaries of gaining intel.
531 *
532 * Enable sending of all alert messages
533 */
534#define POLARSSL_SSL_ALERT_MESSAGES
535
536/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100537 * \def POLARSSL_SSL_DEBUG_ALL
538 *
539 * Enable the debug messages in SSL module for all issues.
540 * Debug messages have been disabled in some places to prevent timing
541 * attacks due to (unbalanced) debugging function calls.
542 *
543 * If you need all error reporting you should enable this during debugging,
544 * but remove this for production servers that should log as well.
545 *
546 * Uncomment this macro to report all debug messages on errors introducing
547 * a timing side-channel.
548 *
549#define POLARSSL_SSL_DEBUG_ALL
550 */
551
552/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000553 * \def POLARSSL_SSL_HW_RECORD_ACCEL
554 *
555 * Enable hooking functions in SSL module for hardware acceleration of
556 * individual records.
557 *
558 * Uncomment this macro to enable hooking functions.
559#define POLARSSL_SSL_HW_RECORD_ACCEL
560 */
561
562/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100563 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
564 *
565 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
566 * SSL Server module (POLARSSL_SSL_SRV_C)
567 *
568 * Comment this macro to disable support for SSLv2 Client Hello messages.
569 */
570#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
571
572/**
Paul Bakker05decb22013-08-15 13:33:48 +0200573 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
574 *
575 * Enable support for RFC 6066 max_fragment_length extension in SSL
576 *
577 * Comment this macro to disable support for the max_fragment_length extension
578 */
579#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
580
581/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200582 * \def POLARSSL_SSL_PROTO_SSL3
583 *
584 * Enable support for SSL 3.0
585 *
586 * Requires: POLARSSL_MD5_C
587 * POLARSSL_SHA1_C
588 *
589 * Comment this macro to disable support for SSL 3.0
590 */
591#define POLARSSL_SSL_PROTO_SSL3
592
593/**
594 * \def POLARSSL_SSL_PROTO_TLS1
595 *
596 * Enable support for TLS 1.0
597 *
598 * Requires: POLARSSL_MD5_C
599 * POLARSSL_SHA1_C
600 *
601 * Comment this macro to disable support for TLS 1.0
602 */
603#define POLARSSL_SSL_PROTO_TLS1
604
605/**
606 * \def POLARSSL_SSL_PROTO_TLS1_1
607 *
608 * Enable support for TLS 1.1
609 *
610 * Requires: POLARSSL_MD5_C
611 * POLARSSL_SHA1_C
612 *
613 * Comment this macro to disable support for TLS 1.1
614 */
615#define POLARSSL_SSL_PROTO_TLS1_1
616
617/**
618 * \def POLARSSL_SSL_PROTO_TLS1_2
619 *
620 * Enable support for TLS 1.2
621 *
622 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
623 * (Depends on ciphersuites)
624 *
625 * Comment this macro to disable support for TLS 1.2
626 */
627#define POLARSSL_SSL_PROTO_TLS1_2
628
629/**
Paul Bakkera503a632013-08-14 13:48:06 +0200630 * \def POLARSSL_SSL_SESSION_TICKETS
631 *
632 * Enable support for RFC 5077 session tickets in SSL
633 *
634 * Requires: POLARSSL_AES_C
635 * POLARSSL_SHA256_C
636 *
637 * Comment this macro to disable support for SSL session tickets
638 */
639#define POLARSSL_SSL_SESSION_TICKETS
640
641/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200642 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
643 *
644 * Enable support for RFC 6066 server name indication (SNI) in SSL
645 *
646 * Comment this macro to disable support for server name indication in SSL
647 */
648#define POLARSSL_SSL_SERVER_NAME_INDICATION
649
650/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200651 * \def POLARSSL_SSL_TRUNCATED_HMAC
652 *
653 * Enable support for RFC 6066 truncated HMAC in SSL
654 *
655 * Comment this macro to disable support for truncated HMAC in SSL
656 */
657#define POLARSSL_SSL_TRUNCATED_HMAC
658
659/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000660 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
661 *
662 * If set, the X509 parser will not break-off when parsing an X509 certificate
663 * and encountering an unknown critical extension.
664 *
665 * Uncomment to prevent an error.
666 *
667#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
668 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000669
670/**
671 * \def POLARSSL_ZLIB_SUPPORT
672 *
673 * If set, the SSL/TLS module uses ZLIB to support compression and
674 * decompression of packet data.
675 *
676 * Used in: library/ssl_tls.c
677 * library/ssl_cli.c
678 * library/ssl_srv.c
679 *
680 * This feature requires zlib library and headers to be present.
681 *
682 * Uncomment to enable use of ZLIB
683#define POLARSSL_ZLIB_SUPPORT
684 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000685/* \} name */
686
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000687/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000688 * \name SECTION: PolarSSL modules
689 *
690 * This section enables or disables entire modules in PolarSSL
691 * \{
692 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000693
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000694/**
695 * \def POLARSSL_AES_C
696 *
697 * Enable the AES block cipher.
698 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000699 * Module: library/aes.c
700 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000701 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000702 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000703 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000704 * This module enables the following ciphersuites (if other requisites are
705 * enabled as well):
706 * TLS_RSA_WITH_AES_128_CBC_SHA
707 * TLS_RSA_WITH_AES_256_CBC_SHA
708 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
709 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
710 * TLS_RSA_WITH_AES_128_CBC_SHA256
711 * TLS_RSA_WITH_AES_256_CBC_SHA256
712 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
713 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
714 * TLS_RSA_WITH_AES_128_GCM_SHA256
715 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100716 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
717 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200718 * TLS_PSK_WITH_AES_128_CBC_SHA
719 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100720 *
721 * PEM uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000722 */
Paul Bakker40e46942009-01-03 21:51:57 +0000723#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000724
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000725/**
726 * \def POLARSSL_ARC4_C
727 *
728 * Enable the ARCFOUR stream cipher.
729 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000730 * Module: library/arc4.c
731 * Caller: library/ssl_tls.c
732 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100733 * This module enables the following ciphersuites (if other requisites are
734 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000735 * TLS_RSA_WITH_RC4_128_MD5
736 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100737 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200738 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000739 */
Paul Bakker40e46942009-01-03 21:51:57 +0000740#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000741
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000742/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000743 * \def POLARSSL_ASN1_PARSE_C
744 *
745 * Enable the generic ASN1 parser.
746 *
747 * Module: library/asn1.c
748 * Caller: library/x509parse.c
749 */
750#define POLARSSL_ASN1_PARSE_C
751
752/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000753 * \def POLARSSL_ASN1_WRITE_C
754 *
755 * Enable the generic ASN1 writer.
756 *
757 * Module: library/asn1write.c
758 */
759#define POLARSSL_ASN1_WRITE_C
760
761/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000762 * \def POLARSSL_BASE64_C
763 *
764 * Enable the Base64 module.
765 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000766 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000767 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000768 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000769 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000770 */
Paul Bakker40e46942009-01-03 21:51:57 +0000771#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000772
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000773/**
774 * \def POLARSSL_BIGNUM_C
775 *
Paul Bakker9a736322012-11-14 12:39:52 +0000776 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000777 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000778 * Module: library/bignum.c
779 * Caller: library/dhm.c
780 * library/rsa.c
781 * library/ssl_tls.c
782 * library/x509parse.c
783 *
784 * This module is required for RSA and DHM support.
785 */
Paul Bakker40e46942009-01-03 21:51:57 +0000786#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000787
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000788/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000789 * \def POLARSSL_BLOWFISH_C
790 *
791 * Enable the Blowfish block cipher.
792 *
793 * Module: library/blowfish.c
794 */
795#define POLARSSL_BLOWFISH_C
796
797/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000798 * \def POLARSSL_CAMELLIA_C
799 *
800 * Enable the Camellia block cipher.
801 *
Paul Bakker38119b12009-01-10 23:31:23 +0000802 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000803 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000804 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000805 * This module enables the following ciphersuites (if other requisites are
806 * enabled as well):
807 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
808 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
809 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
810 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
811 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
812 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
813 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
814 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000815 */
816#define POLARSSL_CAMELLIA_C
817
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000818/**
819 * \def POLARSSL_CERTS_C
820 *
821 * Enable the test certificates.
822 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000823 * Module: library/certs.c
824 * Caller:
825 *
826 * This module is used for testing (ssl_client/server).
827 */
Paul Bakker40e46942009-01-03 21:51:57 +0000828#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000829
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000830/**
831 * \def POLARSSL_CIPHER_C
832 *
833 * Enable the generic cipher layer.
834 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000835 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200836 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000837 *
838 * Uncomment to enable generic cipher wrappers.
839 */
840#define POLARSSL_CIPHER_C
841
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000842/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000843 * \def POLARSSL_CTR_DRBG_C
844 *
845 * Enable the CTR_DRBG AES-256-based random generator
846 *
847 * Module: library/ctr_drbg.c
848 * Caller:
849 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000850 * Requires: POLARSSL_AES_C
851 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000852 * This module provides the CTR_DRBG AES-256 random number generator.
853 */
854#define POLARSSL_CTR_DRBG_C
855
856/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000857 * \def POLARSSL_DEBUG_C
858 *
859 * Enable the debug functions.
860 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000861 * Module: library/debug.c
862 * Caller: library/ssl_cli.c
863 * library/ssl_srv.c
864 * library/ssl_tls.c
865 *
866 * This module provides debugging functions.
867 */
Paul Bakker40e46942009-01-03 21:51:57 +0000868#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000869
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000870/**
871 * \def POLARSSL_DES_C
872 *
873 * Enable the DES block cipher.
874 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000875 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100876 * Caller: library/pem.c
877 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000878 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000879 * This module enables the following ciphersuites (if other requisites are
880 * enabled as well):
881 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
882 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100883 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200884 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100885 *
886 * PEM uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000887 */
Paul Bakker40e46942009-01-03 21:51:57 +0000888#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000889
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000890/**
891 * \def POLARSSL_DHM_C
892 *
893 * Enable the Diffie-Hellman-Merkle key exchange.
894 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000895 * Module: library/dhm.c
896 * Caller: library/ssl_cli.c
897 * library/ssl_srv.c
898 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000899 * This module enables the following ciphersuites (if other requisites are
900 * enabled as well):
901 * TLS_DHE_RSA_WITH_DES_CBC_SHA
902 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
903 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
904 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
905 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
906 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
907 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
908 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
909 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
910 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
911 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
912 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000913 */
Paul Bakker40e46942009-01-03 21:51:57 +0000914#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000915
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000916/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100917 * \def POLARSSL_ECDH_C
918 *
919 * Enable the elliptic curve Diffie-Hellman library.
920 *
921 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100922 * Caller: library/ssl_cli.c
923 * library/ssl_srv.c
924 *
925 * This module enables the following ciphersuites (if other requisites are
926 * enabled as well):
927 * TLS_ECDHE_RSA_WITH_NULL_SHA
928 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
929 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
930 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
931 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100932 *
933 * Requires: POLARSSL_ECP_C
934 */
935#define POLARSSL_ECDH_C
936
937/**
938 * \def POLARSSL_ECDSA_C
939 *
940 * Enable the elliptic curve DSA library.
941 *
942 * Module: library/ecdsa.c
943 * Caller:
944 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +0200945 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100946 */
947#define POLARSSL_ECDSA_C
948
949/**
950 * \def POLARSSL_ECP_C
951 *
952 * Enable the elliptic curve over GF(p) library.
953 *
954 * Module: library/ecp.c
955 * Caller: library/ecdh.c
956 * library/ecdsa.c
957 *
958 * Requires: POLARSSL_BIGNUM_C
959 */
960#define POLARSSL_ECP_C
961
962/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000963 * \def POLARSSL_ENTROPY_C
964 *
965 * Enable the platform-specific entropy code.
966 *
967 * Module: library/entropy.c
968 * Caller:
969 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200970 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000971 *
972 * This module provides a generic entropy pool
973 */
974#define POLARSSL_ENTROPY_C
975
976/**
Paul Bakker9d781402011-05-09 16:17:09 +0000977 * \def POLARSSL_ERROR_C
978 *
979 * Enable error code to error string conversion.
980 *
981 * Module: library/error.c
982 * Caller:
983 *
984 * This module enables err_strerror().
985 */
986#define POLARSSL_ERROR_C
987
988/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000989 * \def POLARSSL_GCM_C
990 *
991 * Enable the Galois/Counter Mode (GCM) for AES
992 *
993 * Module: library/gcm.c
994 *
995 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000996 *
997 * This module enables the following ciphersuites (if other requisites are
998 * enabled as well):
999 * TLS_RSA_WITH_AES_128_GCM_SHA256
1000 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001001 */
1002#define POLARSSL_GCM_C
1003
1004/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001005 * \def POLARSSL_HAVEGE_C
1006 *
1007 * Enable the HAVEGE random generator.
1008 *
Paul Bakker2a844242013-06-24 13:01:53 +02001009 * Warning: the HAVEGE random generator is not suitable for virtualized
1010 * environments
1011 *
1012 * Warning: the HAVEGE random generator is dependent on timing and specific
1013 * processor traits. It is therefore not advised to use HAVEGE as
1014 * your applications primary random generator or primary entropy pool
1015 * input. As a secondary input to your entropy pool, it IS able add
1016 * the (limited) extra entropy it provides.
1017 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001018 * Module: library/havege.c
1019 * Caller:
1020 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001021 * Requires: POLARSSL_TIMING_C
1022 *
Paul Bakker2a844242013-06-24 13:01:53 +02001023 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001024#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001025 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001026
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001027/**
1028 * \def POLARSSL_MD_C
1029 *
1030 * Enable the generic message digest layer.
1031 *
Paul Bakker17373852011-01-06 14:20:01 +00001032 * Module: library/md.c
1033 * Caller:
1034 *
1035 * Uncomment to enable generic message digest wrappers.
1036 */
1037#define POLARSSL_MD_C
1038
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001039/**
1040 * \def POLARSSL_MD2_C
1041 *
1042 * Enable the MD2 hash algorithm
1043 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001044 * Module: library/md2.c
1045 * Caller: library/x509parse.c
1046 *
1047 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1048 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001049#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001050 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001051
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001052/**
1053 * \def POLARSSL_MD4_C
1054 *
1055 * Enable the MD4 hash algorithm
1056 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001057 * Module: library/md4.c
1058 * Caller: library/x509parse.c
1059 *
1060 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1061 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001062#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001063 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001064
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001065/**
1066 * \def POLARSSL_MD5_C
1067 *
1068 * Enable the MD5 hash algorithm
1069 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001070 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001071 * Caller: library/pem.c
1072 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001073 * library/x509parse.c
1074 *
1075 * This module is required for SSL/TLS and X.509.
Paul Bakker6deb37e2013-02-19 13:17:08 +01001076 * PEM uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001077 */
Paul Bakker40e46942009-01-03 21:51:57 +00001078#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001079
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001080/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001081 * \def POLARSSL_MEMORY_C
1082 *
1083 * Enable the memory allocation layer.
1084 * By default PolarSSL uses the system-provided malloc() and free().
1085 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1086 * are defined and unmodified)
1087 *
1088 * This allows different allocators (self-implemented or provided)
1089 *
1090 * Enable this layer to allow use of alternative memory allocators.
1091#define POLARSSL_MEMORY_C
1092 */
1093
1094/**
1095 * The buffer allocator implementation that makes use of a (stack) based
1096 * buffer to 'allocate' dynamic memory. (replaces malloc() and free() calls)
1097 *
1098 * Module: library/memory_buffer_alloc.c
1099 *
1100 * Requires: POLARSSL_MEMORY_C
1101 *
1102 * Enable this module to enable the buffer memory allocator.
1103#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1104 */
1105
1106/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001107 * \def POLARSSL_NET_C
1108 *
1109 * Enable the TCP/IP networking routines.
1110 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001111 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001112 *
1113 * This module provides TCP/IP networking routines.
1114 */
Paul Bakker40e46942009-01-03 21:51:57 +00001115#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001116
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001117/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001118 * \def POLARSSL_OID_C
1119 *
1120 * Enable the OID database
1121 *
1122 * Module: library/oid.c
1123 * Caller: library/rsa.c
1124 * library/x509parse.c
1125 * library/x509write.c
1126 *
1127 * This modules translates between OIDs and internal values.
1128 */
1129#define POLARSSL_OID_C
1130
1131/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001132 * \def POLARSSL_PADLOCK_C
1133 *
1134 * Enable VIA Padlock support on x86.
1135 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001136 * Module: library/padlock.c
1137 * Caller: library/aes.c
1138 *
1139 * This modules adds support for the VIA PadLock on x86.
1140 */
Paul Bakker40e46942009-01-03 21:51:57 +00001141#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001142
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001143/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001144 * \def POLARSSL_PBKDF2_C
1145 *
1146 * Enable PKCS#5 PBKDF2 key derivation function
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001147 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001148 *
1149 * Module: library/pbkdf2.c
1150 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001151 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001152 *
1153 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001154 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001155#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001156
1157/**
Paul Bakker96743fc2011-02-12 14:30:57 +00001158 * \def POLARSSL_PEM_C
1159 *
1160 * Enable PEM decoding
1161 *
1162 * Module: library/pem.c
1163 * Caller: library/x509parse.c
1164 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001165 * Requires: POLARSSL_BASE64_C
1166 *
Paul Bakker96743fc2011-02-12 14:30:57 +00001167 * This modules adds support for decoding PEM files.
1168 */
1169#define POLARSSL_PEM_C
1170
1171/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001172 * \def POLARSSL_PK_C
1173 *
1174 * Enable the generic public (asymetric) key layer.
1175 *
1176 * Module: library/pk.c
1177 * Caller: library/x509parse.c
1178 * library/ssl_tls.c
1179 * library/ssl_cli.c
1180 * library/ssl_srv.c
1181 *
1182 * Uncomment to enable generic public key wrappers.
1183 */
1184#define POLARSSL_PK_C
1185
1186/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001187 * \def POLARSSL_PKCS5_C
1188 *
1189 * Enable PKCS#5 functions
1190 *
1191 * Module: library/pkcs5.c
1192 *
1193 * Requires: POLARSSL_MD_C
1194 *
1195 * This module adds support for the PKCS#5 functions.
1196 */
1197#define POLARSSL_PKCS5_C
1198
1199/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001200 * \def POLARSSL_PKCS11_C
1201 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001202 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001203 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001204 * Module: library/pkcs11.c
1205 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001206 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001207 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001208 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001209 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001210 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1211#define POLARSSL_PKCS11_C
1212 */
1213
1214/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001215 * \def POLARSSL_PKCS12_C
1216 *
1217 * Enable PKCS#12 PBE functions
1218 * Adds algorithms for parsing PKCS#8 encrypted private keys
1219 *
1220 * Module: library/pkcs12.c
1221 * Caller: library/x509parse.c
1222 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001223 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1224 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001225 *
1226 * This module enables PKCS#12 functions.
1227 */
1228#define POLARSSL_PKCS12_C
1229
1230/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001231 * \def POLARSSL_RSA_C
1232 *
1233 * Enable the RSA public-key cryptosystem.
1234 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001235 * Module: library/rsa.c
1236 * Caller: library/ssl_cli.c
1237 * library/ssl_srv.c
1238 * library/ssl_tls.c
1239 * library/x509.c
1240 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001241 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001242 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001243 * This module is required for SSL/TLS and MD5-signed certificates.
1244 */
Paul Bakker40e46942009-01-03 21:51:57 +00001245#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001246
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001247/**
1248 * \def POLARSSL_SHA1_C
1249 *
1250 * Enable the SHA1 cryptographic hash algorithm.
1251 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001252 * Module: library/sha1.c
1253 * Caller: library/ssl_cli.c
1254 * library/ssl_srv.c
1255 * library/ssl_tls.c
1256 * library/x509parse.c
1257 *
1258 * This module is required for SSL/TLS and SHA1-signed certificates.
1259 */
Paul Bakker40e46942009-01-03 21:51:57 +00001260#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001261
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001262/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001263 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001264 *
1265 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001266 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001267 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001268 * Module: library/sha256.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001269 * Caller: library/md_wrap.c
1270 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001271 *
1272 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001273 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001274 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001275#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001276
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001277/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001278 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001279 *
1280 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001281 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001282 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001283 * Module: library/sha512.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001284 * Caller: library/md_wrap.c
1285 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001286 *
1287 * This module adds support for SHA-384 and SHA-512.
1288 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001289#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001290
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001291/**
Paul Bakker0a597072012-09-25 21:55:46 +00001292 * \def POLARSSL_SSL_CACHE_C
1293 *
1294 * Enable simple SSL cache implementation.
1295 *
1296 * Module: library/ssl_cache.c
1297 * Caller:
1298 *
1299 * Requires: POLARSSL_SSL_CACHE_C
1300 */
1301#define POLARSSL_SSL_CACHE_C
1302
1303/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001304 * \def POLARSSL_SSL_CLI_C
1305 *
1306 * Enable the SSL/TLS client code.
1307 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001308 * Module: library/ssl_cli.c
1309 * Caller:
1310 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001311 * Requires: POLARSSL_SSL_TLS_C
1312 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001313 * This module is required for SSL/TLS client support.
1314 */
Paul Bakker40e46942009-01-03 21:51:57 +00001315#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001316
Paul Bakker9a736322012-11-14 12:39:52 +00001317/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001318 * \def POLARSSL_SSL_SRV_C
1319 *
1320 * Enable the SSL/TLS server code.
1321 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001322 * Module: library/ssl_srv.c
1323 * Caller:
1324 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001325 * Requires: POLARSSL_SSL_TLS_C
1326 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001327 * This module is required for SSL/TLS server support.
1328 */
Paul Bakker40e46942009-01-03 21:51:57 +00001329#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001330
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001331/**
1332 * \def POLARSSL_SSL_TLS_C
1333 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001334 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001335 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001336 * Module: library/ssl_tls.c
1337 * Caller: library/ssl_cli.c
1338 * library/ssl_srv.c
1339 *
Paul Bakker577e0062013-08-28 11:57:20 +02001340 * Requires: POLARSSL_CIPHER_C, POLARSSL_PK_C, POLARSSL_MD_C
1341 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001342 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001343 * This module is required for SSL/TLS.
1344 */
Paul Bakker40e46942009-01-03 21:51:57 +00001345#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001346
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001347/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001348 * \def POLARSSL_TIMING_C
1349 *
1350 * Enable the portable timing interface.
1351 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001352 * Module: library/timing.c
1353 * Caller: library/havege.c
1354 *
1355 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001356 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001357#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001358
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001359/**
1360 * \def POLARSSL_VERSION_C
1361 *
1362 * Enable run-time version information.
1363 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001364 * Module: library/version.c
1365 *
1366 * This module provides run-time version information.
1367 */
1368#define POLARSSL_VERSION_C
1369
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001370/**
1371 * \def POLARSSL_X509_PARSE_C
1372 *
1373 * Enable X.509 certificate parsing.
1374 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001375 * Module: library/x509parse.c
1376 * Caller: library/ssl_cli.c
1377 * library/ssl_srv.c
1378 * library/ssl_tls.c
1379 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001380 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001381 * POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001382 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001383 * This module is required for X.509 certificate parsing.
1384 */
Paul Bakker40e46942009-01-03 21:51:57 +00001385#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001386
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001387/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001388 * \def POLARSSL_X509_WRITE_C
1389 *
1390 * Enable X.509 buffer writing.
1391 *
1392 * Module: library/x509write.c
1393 *
Manuel Pégourié-Gonnard02376202013-09-12 07:01:31 +02001394 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001395 *
1396 * This module is required for X.509 certificate request writing.
1397 */
1398#define POLARSSL_X509_WRITE_C
1399
1400/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001401 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001402 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001403 * Enable the XTEA block cipher.
1404 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001405 * Module: library/xtea.c
1406 * Caller:
1407 */
1408#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001409
Paul Bakker0a62cd12011-01-21 11:00:08 +00001410/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001411
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001412/**
1413 * \name SECTION: Module configuration options
1414 *
1415 * This section allows for the setting of module specific sizes and
1416 * configuration options. The default values are already present in the
1417 * relevant header files and should suffice for the regular use cases.
1418 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1419 * only if you have a good reason and know the consequences.
1420 *
1421 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1422 * header file take precedence.
1423 *
1424 * Please check the respective header file for documentation on these
1425 * parameters (to prevent duplicate documentation).
1426 *
1427 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1428 * \{
1429 */
1430//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1431
1432#if defined(POLARSSL_CONFIG_OPTIONS)
1433
1434// MPI / BIGNUM options
1435//
1436#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1437#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1438
1439// CTR_DRBG options
1440//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001441#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001442#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1443#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1444#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1445#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1446
1447// Entropy options
1448//
1449#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1450#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1451
Paul Bakker6e339b52013-07-03 13:37:05 +02001452// Memory options
1453#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1454#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1455#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1456
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001457// SSL Cache options
1458//
1459#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1460#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1461
1462// SSL options
1463//
1464#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001465#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001466
1467#endif /* POLARSSL_CONFIG_OPTIONS */
1468
1469/* \} name */
1470
Paul Bakker7ad00f92013-04-18 23:05:25 +02001471/*
1472 * Sanity checks on defines and dependencies
1473 */
1474#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1475#error "POLARSSL_DHM_C defined, but not all prerequisites"
1476#endif
1477
1478#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1479#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1480#endif
1481
1482#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1483#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1484#endif
1485
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001486#if defined(POLARSSL_ECDSA_C) && \
1487 ( !defined(POLARSSL_ECP_C) || \
1488 !defined(POLARSSL_ASN1_PARSE_C) || \
1489 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001490#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1491#endif
1492
1493#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1494#error "POLARSSL_ECP_C defined, but not all prerequisites"
1495#endif
1496
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001497#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1498 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001499#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1500#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001501#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1502 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1503#error "CTR_DRBG_ENTROPY_LEN value too high"
1504#endif
1505#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1506 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1507#error "CTR_DRBG_ENTROPY_LEN value too high"
1508#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001509
1510#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1511#error "POLARSSL_GCM_C defined, but not all prerequisites"
1512#endif
1513
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001514#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1515#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1516#endif
1517
Paul Bakkere07f41d2013-04-19 09:08:57 +02001518#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1519#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1520#endif
1521
1522#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1523 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Paul Bakker48377d92013-08-30 12:06:24 +02001524 !defined(POLARSSL_X509_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001525#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1526#endif
1527
1528#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1529 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Paul Bakker48377d92013-08-30 12:06:24 +02001530 !defined(POLARSSL_X509_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001531#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1532#endif
1533
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001534#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1535 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
1536 !defined(POLARSSL_X509_PARSE_C) )
1537#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1538#endif
1539
Paul Bakkere07f41d2013-04-19 09:08:57 +02001540#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker48377d92013-08-30 12:06:24 +02001541 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) || \
1542 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001543#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1544#endif
1545
1546#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker48377d92013-08-30 12:06:24 +02001547 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) || \
1548 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001549#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1550#endif
1551
Paul Bakker6e339b52013-07-03 13:37:05 +02001552#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1553#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1554#endif
1555
Paul Bakker7ad00f92013-04-18 23:05:25 +02001556#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1557#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1558#endif
1559
1560#if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C)
1561#error "POLARSSL_PEM_C defined, but not all prerequisites"
1562#endif
1563
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001564#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001565#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1566#endif
1567
1568#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1569 !defined(POLARSSL_OID_C) )
1570#error "POLARSSL_RSA_C defined, but not all prerequisites"
1571#endif
1572
1573#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1574#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1575#endif
1576
Paul Bakker577e0062013-08-28 11:57:20 +02001577#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
1578 !defined(POLARSSL_PK_C) || !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001579#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1580#endif
1581
1582#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1583#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1584#endif
1585
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001586#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1587 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1588 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1589#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1590#endif
1591
1592#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1593 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1594#error "Illegal protocol selection"
1595#endif
1596
1597#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1598 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1599#error "Illegal protocol selection"
1600#endif
1601
1602#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1603 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1604 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1605#error "Illegal protocol selection"
1606#endif
1607
Paul Bakker59da0a42013-08-19 13:27:17 +02001608#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
1609 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) )
1610#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1611#endif
1612
Paul Bakker7ad00f92013-04-18 23:05:25 +02001613#if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1614 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001615 !defined(POLARSSL_PK_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001616#error "POLARSSL_X509_PARSE_C defined, but not all prerequisites"
1617#endif
1618
1619#if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1620 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1621 !defined(POLARSSL_RSA_C) )
1622#error "POLARSSL_X509_WRITE_C defined, but not all prerequisites"
1623#endif
1624
Paul Bakker5121ce52009-01-03 21:22:43 +00001625#endif /* config.h */