blob: 540658394dfc13f96d08375fc6064a17ad871a0e [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 Bakker5121ce52009-01-03 21:22:43 +000051 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020052//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000053
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 Bakker5121ce52009-01-03 21:22:43 +000060 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020061//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000062
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 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020074 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000075 *
76 * Requires support for asm() in compiler.
77 *
78 * Used in:
79 * library/timing.c
80 * library/padlock.c
81 * include/polarssl/bn_mul.h
82 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020083 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000084 */
Paul Bakker40e46942009-01-03 21:51:57 +000085#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000086
Paul Bakkerf3b86c12011-01-27 15:24:17 +000087/**
88 * \def POLARSSL_HAVE_SSE2
89 *
Paul Bakkere23c3152012-10-01 14:42:47 +000090 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000091 *
Paul Bakker5121ce52009-01-03 21:22:43 +000092 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000093 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020094//#define POLARSSL_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020095
96/**
Paul Bakkerbe089b02013-10-14 15:51:50 +020097 * \def POLARSSL_HAVE_READDIR_R
98 *
99 * (Non Windows) System has readdir_r().
100 *
101 * Required for x509_crt_parse_path() in non-Windows systems.
102 *
103 * Comment if your system does not have support.
104 */
105#define POLARSSL_HAVE_READDIR_R
106
107/**
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200108 * \def POLARSSL_HAVE_TIME
109 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200110 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200111 *
112 * Comment if your system does not support time functions
113 */
114#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200115/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000116
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000117/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000118 * \name SECTION: PolarSSL feature support
119 *
120 * This section sets support for features that are or are not needed
121 * within the modules that are enabled.
122 * \{
123 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000124
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000125/**
Paul Bakker90995b52013-06-24 19:20:35 +0200126 * \def POLARSSL_XXX_ALT
127 *
128 * Uncomment a macro to let PolarSSL use your alternate core implementation of
129 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
130 * implementations). Keep in mind that the function prototypes should remain
131 * the same.
132 *
133 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
134 * provide the "struct aes_context" definition and omit the base function
135 * declarations and implementations. "aes_alt.h" will be included from
136 * "aes.h" to include the new function definitions.
137 *
138 * Uncomment a macro to enable alternate implementation for core algorithm
139 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200140 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200141//#define POLARSSL_AES_ALT
142//#define POLARSSL_ARC4_ALT
143//#define POLARSSL_BLOWFISH_ALT
144//#define POLARSSL_CAMELLIA_ALT
145//#define POLARSSL_DES_ALT
146//#define POLARSSL_XTEA_ALT
147//#define POLARSSL_MD2_ALT
148//#define POLARSSL_MD4_ALT
149//#define POLARSSL_MD5_ALT
150//#define POLARSSL_SHA1_ALT
151//#define POLARSSL_SHA256_ALT
152//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200153
154/**
Paul Bakker15566e42011-04-24 21:19:15 +0000155 * \def POLARSSL_AES_ROM_TABLES
156 *
157 * Store the AES tables in ROM.
158 *
159 * Uncomment this macro to store the AES tables in ROM.
160 *
Paul Bakker15566e42011-04-24 21:19:15 +0000161 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200162//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000163
164/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200165 * \def POLARSSL_CIPHER_MODE_CBC
166 *
167 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
168 */
169#define POLARSSL_CIPHER_MODE_CBC
170
171/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000172 * \def POLARSSL_CIPHER_MODE_CFB
173 *
174 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
175 */
176#define POLARSSL_CIPHER_MODE_CFB
177
178/**
179 * \def POLARSSL_CIPHER_MODE_CTR
180 *
181 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
182 */
183#define POLARSSL_CIPHER_MODE_CTR
184
185/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000186 * \def POLARSSL_CIPHER_NULL_CIPHER
187 *
188 * Enable NULL cipher.
189 * Warning: Only do so when you know what you are doing. This allows for
190 * encryption or channels without any security!
191 *
192 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
193 * the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000194 * TLS_RSA_WITH_NULL_MD5
195 * TLS_RSA_WITH_NULL_SHA
196 * TLS_RSA_WITH_NULL_SHA256
Paul Bakker41c83d32013-03-20 14:39:14 +0100197 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard057e0cf2013-10-14 14:19:31 +0200198 * TLS_PSK_WITH_NULL_SHA
199 * TLS_PSK_WITH_NULL_SHA256
200 * TLS_PSK_WITH_NULL_SHA384
201 * TLS_DHE_PSK_WITH_NULL_SHA
202 * TLS_DHE_PSK_WITH_NULL_SHA256
203 * TLS_DHE_PSK_WITH_NULL_SHA384
204 * TLS_RSA_PSK_WITH_NULL_SHA
205 * TLS_RSA_PSK_WITH_NULL_SHA256
206 * TLS_RSA_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200207 * TLS_ECDHE_PSK_WITH_NULL_SHA
208 * TLS_ECDHE_PSK_WITH_NULL_SHA256
209 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Paul Bakkerfab5c822012-02-06 16:45:10 +0000210 *
211 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000212 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200213//#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000214
215/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200216 * \def POLARSSL_CIPHER_PADDING_XXX
217 *
218 * Uncomment or comment macros to add support for specific padding modes
219 * in the cipher layer with cipher modes that support padding (e.g. CBC)
220 *
221 * If you disable all padding modes, only full blocks can be used with CBC.
222 *
223 * Enable padding modes in the cipher layer.
224 */
225#define POLARSSL_CIPHER_PADDING_PKCS7
226#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
227#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
228#define POLARSSL_CIPHER_PADDING_ZEROS
229
230/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000231 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
232 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200233 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000234 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000235 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000236 *
237 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000238 * TLS_RSA_WITH_DES_CBC_SHA
239 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000240 *
241 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000242 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200243//#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000244
245/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200246 * \def POLARSSL_ECP_XXXX_ENABLED
247 *
248 * Enables specific curves within the Elliptic Curve module.
249 * By default all supported curves are enables.
250 *
251 * Comment macros to disable the curve and functions for it
252 */
253#define POLARSSL_ECP_DP_SECP192R1_ENABLED
254#define POLARSSL_ECP_DP_SECP224R1_ENABLED
255#define POLARSSL_ECP_DP_SECP256R1_ENABLED
256#define POLARSSL_ECP_DP_SECP384R1_ENABLED
257#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200258#define POLARSSL_ECP_DP_BP256R1_ENABLED
259#define POLARSSL_ECP_DP_BP384R1_ENABLED
260#define POLARSSL_ECP_DP_BP512R1_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200261
262/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200263 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
264 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200265 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200266 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200267 * This enables the following ciphersuites (if other requisites are
268 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200269 * TLS_PSK_WITH_RC4_128_SHA
270 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
271 * TLS_PSK_WITH_AES_128_CBC_SHA
272 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200273 * TLS_PSK_WITH_AES_128_CBC_SHA256
274 * TLS_PSK_WITH_AES_256_CBC_SHA384
275 * TLS_PSK_WITH_AES_128_GCM_SHA256
276 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200277 */
278#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
279
280/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200281 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
282 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200283 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200284 *
285 * Requires: POLARSSL_DHM_C
286 *
287 * This enables the following ciphersuites (if other requisites are
288 * enabled as well):
289 * TLS_DHE_PSK_WITH_RC4_128_SHA
290 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
291 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
292 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200293 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
294 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
295 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
296 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200297 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200298#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200299
300/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200301 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
302 *
303 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
304 *
305 * Requires: POLARSSL_ECDH_C
306 *
307 * This enables the following ciphersuites (if other requisites are
308 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200309 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
310 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
311 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
312 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
313 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
314 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
315 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
316 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200317 */
318#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
319
320/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200321 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
322 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200323 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200324 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200325 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200326 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200327 *
328 * This enables the following ciphersuites (if other requisites are
329 * enabled as well):
330 * TLS_RSA_PSK_WITH_RC4_128_SHA
331 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
332 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
333 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200334 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
335 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
336 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
337 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200338 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200339#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200340
341/**
342 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
343 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200344 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200345 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200346 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200347 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200348 *
349 * This enables the following ciphersuites (if other requisites are
350 * enabled as well):
351 * TLS_RSA_WITH_AES_128_CBC_SHA
352 * TLS_RSA_WITH_AES_256_CBC_SHA
353 * TLS_RSA_WITH_AES_128_CBC_SHA256
354 * TLS_RSA_WITH_AES_256_CBC_SHA256
355 * TLS_RSA_WITH_AES_128_GCM_SHA256
356 * TLS_RSA_WITH_AES_256_GCM_SHA384
357 * TLS_RSA_WITH_RC4_128_MD5
358 * TLS_RSA_WITH_RC4_128_SHA
359 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
360 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
361 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
362 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
363 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
364 */
365#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
366
367/**
368 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
369 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200370 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200371 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200372 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200373 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200374 *
375 * This enables the following ciphersuites (if other requisites are
376 * enabled as well):
377 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
378 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
379 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
380 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
381 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
382 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
383 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
384 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
385 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
386 */
387#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
388
389/**
390 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
391 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200392 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200393 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200394 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200395 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200396 *
397 * This enables the following ciphersuites (if other requisites are
398 * enabled as well):
399 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
400 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
401 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
402 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
403 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
404 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
405 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
406 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
407 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
408 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
409 */
410#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
411
412/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200413 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
414 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200415 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200416 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200417 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200418 *
419 * This enables the following ciphersuites (if other requisites are
420 * enabled as well):
421 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
422 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
423 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
424 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
425 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
426 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
427 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
428 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
429 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
430 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
431 */
432#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
433
434/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200435 * \def POLARSSL_ERROR_STRERROR_BC
436 *
437 * Make available the backward compatible error_strerror() next to the
438 * current polarssl_strerror().
439 *
440 * Disable if you run into name conflicts and want to really remove the
441 * error_strerror()
442 */
443#define POLARSSL_ERROR_STRERROR_BC
444
445/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100446 * \def POLARSSL_ERROR_STRERROR_DUMMY
447 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200448 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100449 * third party libraries easier.
450 *
451 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200452 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100453 */
454#define POLARSSL_ERROR_STRERROR_DUMMY
455
456/**
Paul Bakker15566e42011-04-24 21:19:15 +0000457 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000458 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200459 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200460 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200461 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000462 */
Paul Bakker15566e42011-04-24 21:19:15 +0000463#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000464
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000465/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000466 * \def POLARSSL_FS_IO
467 *
468 * Enable functions that use the filesystem.
469 */
470#define POLARSSL_FS_IO
471
472/**
Paul Bakker43655f42011-12-15 20:11:16 +0000473 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
474 *
475 * Do not add default entropy sources. These are the platform specific,
476 * hardclock and HAVEGE based poll functions.
477 *
478 * This is useful to have more control over the added entropy sources in an
479 * application.
480 *
481 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000482 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200483//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000484
485/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000486 * \def POLARSSL_NO_PLATFORM_ENTROPY
487 *
488 * Do not use built-in platform entropy functions.
489 * This is useful if your platform does not support
490 * standards like the /dev/urandom or Windows CryptoAPI.
491 *
492 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000493 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200494//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000495
496/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200497 * \def POLARSSL_MEMORY_DEBUG
498 *
499 * Enable debugging of buffer allocator memory issues. Automatically prints
500 * (to stderr) all (fatal) messages on memory allocation issues. Enables
501 * function for 'debug output' of allocated memory.
502 *
503 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
504 * fprintf()
505 *
506 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200507 */
508//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200509
510/**
511 * \def POLARSSL_MEMORY_BACKTRACE
512 *
513 * Include backtrace information with each allocated block.
514 *
515 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
516 * GLIBC-compatible backtrace() an backtrace_symbols() support
517 *
518 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200519 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200520//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200521
522/**
Paul Bakker48377d92013-08-30 12:06:24 +0200523 * \def POLARSSL_PKCS1_V15
524 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200525 * Enable support for PKCS#1 v1.5 encoding.
526 *
Paul Bakker48377d92013-08-30 12:06:24 +0200527 * Requires: POLARSSL_RSA_C
528 *
Paul Bakker48377d92013-08-30 12:06:24 +0200529 * This enables support for PKCS#1 v1.5 operations.
530 */
531#define POLARSSL_PKCS1_V15
532
533/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000534 * \def POLARSSL_PKCS1_V21
535 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200536 * Enable support for PKCS#1 v2.1 encoding.
537 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000538 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
539 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000540 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
541 */
542#define POLARSSL_PKCS1_V21
543
544/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000545 * \def POLARSSL_RSA_NO_CRT
546 *
547 * Do not use the Chinese Remainder Theorem for the RSA private operation.
548 *
549 * Uncomment this macro to disable the use of CRT in RSA.
550 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000551 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200552//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000553
554/**
555 * \def POLARSSL_SELF_TEST
556 *
557 * Enable the checkup functions (*_self_test).
558 */
559#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000560
561/**
Paul Bakker40865c82013-01-31 17:13:13 +0100562 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
563 *
564 * Enable sending of alert messages in case of encountered errors as per RFC.
565 * If you choose not to send the alert messages, PolarSSL can still communicate
566 * with other servers, only debugging of failures is harder.
567 *
568 * The advantage of not sending alert messages, is that no information is given
569 * about reasons for failures thus preventing adversaries of gaining intel.
570 *
571 * Enable sending of all alert messages
572 */
573#define POLARSSL_SSL_ALERT_MESSAGES
574
575/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100576 * \def POLARSSL_SSL_DEBUG_ALL
577 *
578 * Enable the debug messages in SSL module for all issues.
579 * Debug messages have been disabled in some places to prevent timing
580 * attacks due to (unbalanced) debugging function calls.
581 *
582 * If you need all error reporting you should enable this during debugging,
583 * but remove this for production servers that should log as well.
584 *
585 * Uncomment this macro to report all debug messages on errors introducing
586 * a timing side-channel.
587 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100588 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200589//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100590
591/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000592 * \def POLARSSL_SSL_HW_RECORD_ACCEL
593 *
594 * Enable hooking functions in SSL module for hardware acceleration of
595 * individual records.
596 *
597 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000598 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200599//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000600
601/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100602 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
603 *
604 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200605 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100606 *
607 * Comment this macro to disable support for SSLv2 Client Hello messages.
608 */
609#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
610
611/**
Paul Bakker05decb22013-08-15 13:33:48 +0200612 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
613 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200614 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200615 *
616 * Comment this macro to disable support for the max_fragment_length extension
617 */
618#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
619
620/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200621 * \def POLARSSL_SSL_PROTO_SSL3
622 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200623 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200624 *
625 * Requires: POLARSSL_MD5_C
626 * POLARSSL_SHA1_C
627 *
628 * Comment this macro to disable support for SSL 3.0
629 */
630#define POLARSSL_SSL_PROTO_SSL3
631
632/**
633 * \def POLARSSL_SSL_PROTO_TLS1
634 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200635 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200636 *
637 * Requires: POLARSSL_MD5_C
638 * POLARSSL_SHA1_C
639 *
640 * Comment this macro to disable support for TLS 1.0
641 */
642#define POLARSSL_SSL_PROTO_TLS1
643
644/**
645 * \def POLARSSL_SSL_PROTO_TLS1_1
646 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200647 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200648 *
649 * Requires: POLARSSL_MD5_C
650 * POLARSSL_SHA1_C
651 *
652 * Comment this macro to disable support for TLS 1.1
653 */
654#define POLARSSL_SSL_PROTO_TLS1_1
655
656/**
657 * \def POLARSSL_SSL_PROTO_TLS1_2
658 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200659 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200660 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100661 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200662 * (Depends on ciphersuites)
663 *
664 * Comment this macro to disable support for TLS 1.2
665 */
666#define POLARSSL_SSL_PROTO_TLS1_2
667
668/**
Paul Bakkera503a632013-08-14 13:48:06 +0200669 * \def POLARSSL_SSL_SESSION_TICKETS
670 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200671 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200672 *
673 * Requires: POLARSSL_AES_C
674 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200675 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200676 *
677 * Comment this macro to disable support for SSL session tickets
678 */
679#define POLARSSL_SSL_SESSION_TICKETS
680
681/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200682 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
683 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200684 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200685 *
686 * Comment this macro to disable support for server name indication in SSL
687 */
688#define POLARSSL_SSL_SERVER_NAME_INDICATION
689
690/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200691 * \def POLARSSL_SSL_TRUNCATED_HMAC
692 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200693 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200694 *
695 * Comment this macro to disable support for truncated HMAC in SSL
696 */
697#define POLARSSL_SSL_TRUNCATED_HMAC
698
699/**
Paul Bakker2466d932013-09-28 14:40:38 +0200700 * \def POLARSSL_THREADING_ALT
701 *
702 * Provide your own alternate threading implementation.
703 *
704 * Requires: POLARSSL_THREADING_C
705 *
706 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200707 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200708//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200709
710/**
711 * \def POLARSSL_THREADING_DUMMY
712 *
713 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200714 * Warning: If you use this, all claims of thread-safety in the documentation
715 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200716 *
717 * Requires: POLARSSL_THREADING_C
718 *
719 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200720 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200721//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200722
723/**
724 * \def POLARSSL_THREADING_PTHREAD
725 *
726 * Enable the pthread wrapper layer for the threading layer.
727 *
728 * Requires: POLARSSL_THREADING_C
729 *
730 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200731 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200732//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200733
734/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200735 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
736 *
737 * If set, the X509 parser will not break-off when parsing an X509 certificate
738 * and encountering an extension in a v1 or v2 certificate.
739 *
740 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200741 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200742//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200743
744/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000745 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
746 *
747 * If set, the X509 parser will not break-off when parsing an X509 certificate
748 * and encountering an unknown critical extension.
749 *
750 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000751 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200752//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000753
754/**
755 * \def POLARSSL_ZLIB_SUPPORT
756 *
757 * If set, the SSL/TLS module uses ZLIB to support compression and
758 * decompression of packet data.
759 *
760 * Used in: library/ssl_tls.c
761 * library/ssl_cli.c
762 * library/ssl_srv.c
763 *
764 * This feature requires zlib library and headers to be present.
765 *
766 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000767 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200768//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200769/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000770
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000771/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000772 * \name SECTION: PolarSSL modules
773 *
774 * This section enables or disables entire modules in PolarSSL
775 * \{
776 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000777
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000778/**
779 * \def POLARSSL_AES_C
780 *
781 * Enable the AES block cipher.
782 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000783 * Module: library/aes.c
784 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000785 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000786 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000787 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000788 * This module enables the following ciphersuites (if other requisites are
789 * enabled as well):
790 * TLS_RSA_WITH_AES_128_CBC_SHA
791 * TLS_RSA_WITH_AES_256_CBC_SHA
792 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
793 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
794 * TLS_RSA_WITH_AES_128_CBC_SHA256
795 * TLS_RSA_WITH_AES_256_CBC_SHA256
796 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
797 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
798 * TLS_RSA_WITH_AES_128_GCM_SHA256
799 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100800 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
801 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200802 * TLS_PSK_WITH_AES_128_CBC_SHA
803 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100804 *
Paul Bakkercff68422013-09-15 20:43:33 +0200805 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000806 */
Paul Bakker40e46942009-01-03 21:51:57 +0000807#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000808
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000809/**
810 * \def POLARSSL_ARC4_C
811 *
812 * Enable the ARCFOUR stream cipher.
813 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000814 * Module: library/arc4.c
815 * Caller: library/ssl_tls.c
816 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100817 * This module enables the following ciphersuites (if other requisites are
818 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000819 * TLS_RSA_WITH_RC4_128_MD5
820 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100821 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200822 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000823 */
Paul Bakker40e46942009-01-03 21:51:57 +0000824#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000825
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000826/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000827 * \def POLARSSL_ASN1_PARSE_C
828 *
829 * Enable the generic ASN1 parser.
830 *
831 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200832 * Caller: library/x509.c
833 * library/dhm.c
834 * library/pkcs12.c
835 * library/pkcs5.c
836 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000837 */
838#define POLARSSL_ASN1_PARSE_C
839
840/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000841 * \def POLARSSL_ASN1_WRITE_C
842 *
843 * Enable the generic ASN1 writer.
844 *
845 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200846 * Caller: library/ecdsa.c
847 * library/pkwrite.c
848 * library/x509_create.c
849 * library/x509write_crt.c
850 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000851 */
852#define POLARSSL_ASN1_WRITE_C
853
854/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000855 * \def POLARSSL_BASE64_C
856 *
857 * Enable the Base64 module.
858 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000859 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000860 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000861 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000862 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000863 */
Paul Bakker40e46942009-01-03 21:51:57 +0000864#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000865
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000866/**
867 * \def POLARSSL_BIGNUM_C
868 *
Paul Bakker9a736322012-11-14 12:39:52 +0000869 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000870 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000871 * Module: library/bignum.c
872 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200873 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000874 * library/rsa.c
875 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000876 *
877 * This module is required for RSA and DHM support.
878 */
Paul Bakker40e46942009-01-03 21:51:57 +0000879#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000880
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000881/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000882 * \def POLARSSL_BLOWFISH_C
883 *
884 * Enable the Blowfish block cipher.
885 *
886 * Module: library/blowfish.c
887 */
888#define POLARSSL_BLOWFISH_C
889
890/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000891 * \def POLARSSL_CAMELLIA_C
892 *
893 * Enable the Camellia block cipher.
894 *
Paul Bakker38119b12009-01-10 23:31:23 +0000895 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000896 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000897 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000898 * This module enables the following ciphersuites (if other requisites are
899 * enabled as well):
900 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
901 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
902 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
903 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
904 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
905 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
906 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
907 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000908 */
909#define POLARSSL_CAMELLIA_C
910
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000911/**
912 * \def POLARSSL_CERTS_C
913 *
914 * Enable the test certificates.
915 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000916 * Module: library/certs.c
917 * Caller:
918 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +0100919 * Requires: POLARSSL_PEM_PARSE_C
920 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000921 * This module is used for testing (ssl_client/server).
922 */
Paul Bakker40e46942009-01-03 21:51:57 +0000923#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000924
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000925/**
926 * \def POLARSSL_CIPHER_C
927 *
928 * Enable the generic cipher layer.
929 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000930 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200931 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000932 *
933 * Uncomment to enable generic cipher wrappers.
934 */
935#define POLARSSL_CIPHER_C
936
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000937/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000938 * \def POLARSSL_CTR_DRBG_C
939 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200940 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000941 *
942 * Module: library/ctr_drbg.c
943 * Caller:
944 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000945 * Requires: POLARSSL_AES_C
946 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000947 * This module provides the CTR_DRBG AES-256 random number generator.
948 */
949#define POLARSSL_CTR_DRBG_C
950
951/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000952 * \def POLARSSL_DEBUG_C
953 *
954 * Enable the debug functions.
955 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000956 * Module: library/debug.c
957 * Caller: library/ssl_cli.c
958 * library/ssl_srv.c
959 * library/ssl_tls.c
960 *
961 * This module provides debugging functions.
962 */
Paul Bakker40e46942009-01-03 21:51:57 +0000963#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000964
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000965/**
966 * \def POLARSSL_DES_C
967 *
968 * Enable the DES block cipher.
969 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000970 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100971 * Caller: library/pem.c
972 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000973 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000974 * This module enables the following ciphersuites (if other requisites are
975 * enabled as well):
976 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
977 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100978 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200979 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100980 *
Paul Bakkercff68422013-09-15 20:43:33 +0200981 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000982 */
Paul Bakker40e46942009-01-03 21:51:57 +0000983#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000984
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000985/**
986 * \def POLARSSL_DHM_C
987 *
988 * Enable the Diffie-Hellman-Merkle key exchange.
989 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000990 * Module: library/dhm.c
991 * Caller: library/ssl_cli.c
992 * library/ssl_srv.c
993 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000994 * This module enables the following ciphersuites (if other requisites are
995 * enabled as well):
996 * TLS_DHE_RSA_WITH_DES_CBC_SHA
997 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
998 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
999 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1000 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1001 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
1002 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1003 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1004 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1005 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
1006 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1007 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +00001008 */
Paul Bakker40e46942009-01-03 21:51:57 +00001009#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001010
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001011/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001012 * \def POLARSSL_ECDH_C
1013 *
1014 * Enable the elliptic curve Diffie-Hellman library.
1015 *
1016 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001017 * Caller: library/ssl_cli.c
1018 * library/ssl_srv.c
1019 *
1020 * This module enables the following ciphersuites (if other requisites are
1021 * enabled as well):
1022 * TLS_ECDHE_RSA_WITH_NULL_SHA
1023 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
1024 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1025 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1026 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001027 *
1028 * Requires: POLARSSL_ECP_C
1029 */
1030#define POLARSSL_ECDH_C
1031
1032/**
1033 * \def POLARSSL_ECDSA_C
1034 *
1035 * Enable the elliptic curve DSA library.
1036 *
1037 * Module: library/ecdsa.c
1038 * Caller:
1039 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001040 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001041 */
1042#define POLARSSL_ECDSA_C
1043
1044/**
1045 * \def POLARSSL_ECP_C
1046 *
1047 * Enable the elliptic curve over GF(p) library.
1048 *
1049 * Module: library/ecp.c
1050 * Caller: library/ecdh.c
1051 * library/ecdsa.c
1052 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001053 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001054 */
1055#define POLARSSL_ECP_C
1056
1057/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001058 * \def POLARSSL_ENTROPY_C
1059 *
1060 * Enable the platform-specific entropy code.
1061 *
1062 * Module: library/entropy.c
1063 * Caller:
1064 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001065 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001066 *
1067 * This module provides a generic entropy pool
1068 */
1069#define POLARSSL_ENTROPY_C
1070
1071/**
Paul Bakker9d781402011-05-09 16:17:09 +00001072 * \def POLARSSL_ERROR_C
1073 *
1074 * Enable error code to error string conversion.
1075 *
1076 * Module: library/error.c
1077 * Caller:
1078 *
1079 * This module enables err_strerror().
1080 */
1081#define POLARSSL_ERROR_C
1082
1083/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001084 * \def POLARSSL_GCM_C
1085 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001086 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001087 *
1088 * Module: library/gcm.c
1089 *
1090 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001091 *
1092 * This module enables the following ciphersuites (if other requisites are
1093 * enabled as well):
1094 * TLS_RSA_WITH_AES_128_GCM_SHA256
1095 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001096 */
1097#define POLARSSL_GCM_C
1098
1099/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001100 * \def POLARSSL_HAVEGE_C
1101 *
1102 * Enable the HAVEGE random generator.
1103 *
Paul Bakker2a844242013-06-24 13:01:53 +02001104 * Warning: the HAVEGE random generator is not suitable for virtualized
1105 * environments
1106 *
1107 * Warning: the HAVEGE random generator is dependent on timing and specific
1108 * processor traits. It is therefore not advised to use HAVEGE as
1109 * your applications primary random generator or primary entropy pool
1110 * input. As a secondary input to your entropy pool, it IS able add
1111 * the (limited) extra entropy it provides.
1112 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001113 * Module: library/havege.c
1114 * Caller:
1115 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001116 * Requires: POLARSSL_TIMING_C
1117 *
Paul Bakker2a844242013-06-24 13:01:53 +02001118 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001119 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001120//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001121
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001122/**
1123 * \def POLARSSL_MD_C
1124 *
1125 * Enable the generic message digest layer.
1126 *
Paul Bakker17373852011-01-06 14:20:01 +00001127 * Module: library/md.c
1128 * Caller:
1129 *
1130 * Uncomment to enable generic message digest wrappers.
1131 */
1132#define POLARSSL_MD_C
1133
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001134/**
1135 * \def POLARSSL_MD2_C
1136 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001137 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001138 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001139 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001140 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001141 *
1142 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001143 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001144//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001145
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001146/**
1147 * \def POLARSSL_MD4_C
1148 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001149 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001150 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001151 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001152 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001153 *
1154 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001155 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001156//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001157
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001158/**
1159 * \def POLARSSL_MD5_C
1160 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001161 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001162 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001163 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001164 * Caller: library/md.c
1165 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001166 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001167 *
1168 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001169 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001170 */
Paul Bakker40e46942009-01-03 21:51:57 +00001171#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001172
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001173/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001174 * \def POLARSSL_MEMORY_C
1175 *
1176 * Enable the memory allocation layer.
1177 * By default PolarSSL uses the system-provided malloc() and free().
1178 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1179 * are defined and unmodified)
1180 *
1181 * This allows different allocators (self-implemented or provided)
1182 *
1183 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001184 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001185//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001186
1187/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001188 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1189 *
1190 * Enable the buffer allocator implementation that makes use of a (stack)
1191 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1192 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001193 *
1194 * Module: library/memory_buffer_alloc.c
1195 *
1196 * Requires: POLARSSL_MEMORY_C
1197 *
1198 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001199 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001200//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001201
1202/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001203 * \def POLARSSL_NET_C
1204 *
1205 * Enable the TCP/IP networking routines.
1206 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001207 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001208 *
1209 * This module provides TCP/IP networking routines.
1210 */
Paul Bakker40e46942009-01-03 21:51:57 +00001211#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001212
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001213/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001214 * \def POLARSSL_OID_C
1215 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001216 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001217 *
1218 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001219 * Caller: library/asn1write.c
1220 * library/pkcs5.c
1221 * library/pkparse.c
1222 * library/pkwrite.c
1223 * library/rsa.c
1224 * library/x509.c
1225 * library/x509_create.c
1226 * library/x509_crl.c
1227 * library/x509_crt.c
1228 * library/x509_csr.c
1229 * library/x509write_crt.c
1230 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001231 *
1232 * This modules translates between OIDs and internal values.
1233 */
1234#define POLARSSL_OID_C
1235
1236/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001237 * \def POLARSSL_PADLOCK_C
1238 *
1239 * Enable VIA Padlock support on x86.
1240 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001241 * Module: library/padlock.c
1242 * Caller: library/aes.c
1243 *
1244 * This modules adds support for the VIA PadLock on x86.
1245 */
Paul Bakker40e46942009-01-03 21:51:57 +00001246#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001247
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001248/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001249 * \def POLARSSL_PBKDF2_C
1250 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001251 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001252 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001253 *
1254 * Module: library/pbkdf2.c
1255 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001256 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001257 *
1258 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001259 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001260#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001261
1262/**
Paul Bakkercff68422013-09-15 20:43:33 +02001263 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001264 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001265 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001266 *
1267 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001268 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001269 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001270 * library/x509_crl.c
1271 * library/x509_crt.c
1272 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001273 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001274 * Requires: POLARSSL_BASE64_C
1275 *
Paul Bakkercff68422013-09-15 20:43:33 +02001276 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001277 */
Paul Bakkercff68422013-09-15 20:43:33 +02001278#define POLARSSL_PEM_PARSE_C
1279
1280/**
1281 * \def POLARSSL_PEM_WRITE_C
1282 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001283 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001284 *
1285 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001286 * Caller: library/pkwrite.c
1287 * library/x509write_crt.c
1288 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001289 *
1290 * Requires: POLARSSL_BASE64_C
1291 *
1292 * This modules adds support for encoding / writing PEM files.
1293 */
1294#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001295
1296/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001297 * \def POLARSSL_PK_C
1298 *
1299 * Enable the generic public (asymetric) key layer.
1300 *
1301 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001302 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001303 * library/ssl_cli.c
1304 * library/ssl_srv.c
1305 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001306 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1307 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001308 * Uncomment to enable generic public key wrappers.
1309 */
1310#define POLARSSL_PK_C
1311
1312/**
Paul Bakker4606c732013-09-15 17:04:23 +02001313 * \def POLARSSL_PK_PARSE_C
1314 *
1315 * Enable the generic public (asymetric) key parser.
1316 *
1317 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001318 * Caller: library/x509_crt.c
1319 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001320 *
1321 * Requires: POLARSSL_PK_C
1322 *
1323 * Uncomment to enable generic public key parse functions.
1324 */
1325#define POLARSSL_PK_PARSE_C
1326
1327/**
1328 * \def POLARSSL_PK_WRITE_C
1329 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001330 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001331 *
1332 * Module: library/pkwrite.c
1333 * Caller: library/x509write.c
1334 *
1335 * Requires: POLARSSL_PK_C
1336 *
1337 * Uncomment to enable generic public key write functions.
1338 */
1339#define POLARSSL_PK_WRITE_C
1340
1341/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001342 * \def POLARSSL_PKCS5_C
1343 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001344 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001345 *
1346 * Module: library/pkcs5.c
1347 *
1348 * Requires: POLARSSL_MD_C
1349 *
1350 * This module adds support for the PKCS#5 functions.
1351 */
1352#define POLARSSL_PKCS5_C
1353
1354/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001355 * \def POLARSSL_PKCS11_C
1356 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001357 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001358 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001359 * Module: library/pkcs11.c
1360 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001361 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001362 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001363 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001364 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001365 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001366 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001367//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001368
1369/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001370 * \def POLARSSL_PKCS12_C
1371 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001372 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001373 * Adds algorithms for parsing PKCS#8 encrypted private keys
1374 *
1375 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001376 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001377 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001378 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1379 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001380 *
1381 * This module enables PKCS#12 functions.
1382 */
1383#define POLARSSL_PKCS12_C
1384
1385/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001386 * \def POLARSSL_RSA_C
1387 *
1388 * Enable the RSA public-key cryptosystem.
1389 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001390 * Module: library/rsa.c
1391 * Caller: library/ssl_cli.c
1392 * library/ssl_srv.c
1393 * library/ssl_tls.c
1394 * library/x509.c
1395 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001396 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001397 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001398 * This module is required for SSL/TLS and MD5-signed certificates.
1399 */
Paul Bakker40e46942009-01-03 21:51:57 +00001400#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001401
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001402/**
1403 * \def POLARSSL_SHA1_C
1404 *
1405 * Enable the SHA1 cryptographic hash algorithm.
1406 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001407 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001408 * Caller: library/md.c
1409 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001410 * library/ssl_srv.c
1411 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001412 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001413 *
1414 * This module is required for SSL/TLS and SHA1-signed certificates.
1415 */
Paul Bakker40e46942009-01-03 21:51:57 +00001416#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001417
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001418/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001419 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001420 *
1421 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001422 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001423 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001424 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001425 * Caller: library/entropy.c
1426 * library/md.c
1427 * library/ssl_cli.c
1428 * library/ssl_srv.c
1429 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001430 *
1431 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001432 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001433 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001434#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001435
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001436/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001437 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001438 *
1439 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001440 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001441 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001442 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001443 * Caller: library/entropy.c
1444 * library/md.c
1445 * library/ssl_cli.c
1446 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001447 *
1448 * This module adds support for SHA-384 and SHA-512.
1449 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001450#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001451
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001452/**
Paul Bakker0a597072012-09-25 21:55:46 +00001453 * \def POLARSSL_SSL_CACHE_C
1454 *
1455 * Enable simple SSL cache implementation.
1456 *
1457 * Module: library/ssl_cache.c
1458 * Caller:
1459 *
1460 * Requires: POLARSSL_SSL_CACHE_C
1461 */
1462#define POLARSSL_SSL_CACHE_C
1463
1464/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001465 * \def POLARSSL_SSL_CLI_C
1466 *
1467 * Enable the SSL/TLS client code.
1468 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001469 * Module: library/ssl_cli.c
1470 * Caller:
1471 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001472 * Requires: POLARSSL_SSL_TLS_C
1473 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001474 * This module is required for SSL/TLS client support.
1475 */
Paul Bakker40e46942009-01-03 21:51:57 +00001476#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001477
Paul Bakker9a736322012-11-14 12:39:52 +00001478/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001479 * \def POLARSSL_SSL_SRV_C
1480 *
1481 * Enable the SSL/TLS server code.
1482 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001483 * Module: library/ssl_srv.c
1484 * Caller:
1485 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001486 * Requires: POLARSSL_SSL_TLS_C
1487 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001488 * This module is required for SSL/TLS server support.
1489 */
Paul Bakker40e46942009-01-03 21:51:57 +00001490#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001491
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001492/**
1493 * \def POLARSSL_SSL_TLS_C
1494 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001495 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001496 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001497 * Module: library/ssl_tls.c
1498 * Caller: library/ssl_cli.c
1499 * library/ssl_srv.c
1500 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001501 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001502 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001503 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001504 * This module is required for SSL/TLS.
1505 */
Paul Bakker40e46942009-01-03 21:51:57 +00001506#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001507
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001508/**
Paul Bakker2466d932013-09-28 14:40:38 +02001509 * \def POLARSSL_THREADING_C
1510 *
1511 * Enable the threading abstraction layer.
1512 * By default PolarSSL assumes it is used in a non-threaded environment or that
1513 * contexts are not shared between threads. If you do intend to use contexts
1514 * between threads, you will need to enable this layer to prevent race
1515 * conditions.
1516 *
1517 * Module: library/threading.c
1518 *
1519 * This allows different threading implementations (self-implemented or
1520 * provided).
1521 *
1522 * You will have to enable either POLARSSL_THREADING_ALT,
1523 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1524 *
1525 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001526 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001527//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001528
1529/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001530 * \def POLARSSL_TIMING_C
1531 *
1532 * Enable the portable timing interface.
1533 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001534 * Module: library/timing.c
1535 * Caller: library/havege.c
1536 *
1537 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001538 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001539#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001540
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001541/**
1542 * \def POLARSSL_VERSION_C
1543 *
1544 * Enable run-time version information.
1545 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001546 * Module: library/version.c
1547 *
1548 * This module provides run-time version information.
1549 */
1550#define POLARSSL_VERSION_C
1551
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001552/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001553 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001554 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001555 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001556 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001557 * Module: library/x509.c
1558 * Caller: library/x509_crl.c
1559 * library/x509_crt.c
1560 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001561 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001562 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001563 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001564 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001565 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001566 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001567#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001568
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001569/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001570 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001571 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001572 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001573 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001574 * Module: library/x509_crt.c
1575 * Caller: library/ssl_cli.c
1576 * library/ssl_srv.c
1577 * library/ssl_tls.c
1578 *
1579 * Requires: POLARSSL_X509_USE_C
1580 *
1581 * This module is required for X.509 certificate parsing.
1582 */
1583#define POLARSSL_X509_CRT_PARSE_C
1584
1585/**
1586 * \def POLARSSL_X509_CRL_PARSE_C
1587 *
1588 * Enable X.509 CRL parsing.
1589 *
1590 * Module: library/x509_crl.c
1591 * Caller: library/x509_crt.c
1592 *
1593 * Requires: POLARSSL_X509_USE_C
1594 *
1595 * This module is required for X.509 CRL parsing.
1596 */
1597#define POLARSSL_X509_CRL_PARSE_C
1598
1599/**
1600 * \def POLARSSL_X509_CSR_PARSE_C
1601 *
1602 * Enable X.509 Certificate Signing Request (CSR) parsing.
1603 *
1604 * Module: library/x509_csr.c
1605 * Caller: library/x509_crt_write.c
1606 *
1607 * Requires: POLARSSL_X509_USE_C
1608 *
1609 * This module is used for reading X.509 certificate request.
1610 */
1611#define POLARSSL_X509_CSR_PARSE_C
1612
1613/**
1614 * \def POLARSSL_X509_CREATE_C
1615 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001616 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001617 *
1618 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001619 *
Paul Bakker4606c732013-09-15 17:04:23 +02001620 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001621 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001622 * This module is the basis for creating X.509 certificates and CSRs.
1623 */
1624#define POLARSSL_X509_CREATE_C
1625
1626/**
1627 * \def POLARSSL_X509_CRT_WRITE_C
1628 *
1629 * Enable creating X.509 certificates.
1630 *
1631 * Module: library/x509_crt_write.c
1632 *
1633 * Requires: POLARSSL_CREATE_C
1634 *
1635 * This module is required for X.509 certificate creation.
1636 */
1637#define POLARSSL_X509_CRT_WRITE_C
1638
1639/**
1640 * \def POLARSSL_X509_CSR_WRITE_C
1641 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001642 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001643 *
1644 * Module: library/x509_csr_write.c
1645 *
1646 * Requires: POLARSSL_CREATE_C
1647 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001648 * This module is required for X.509 certificate request writing.
1649 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001650#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001651
1652/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001653 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001654 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001655 * Enable the XTEA block cipher.
1656 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001657 * Module: library/xtea.c
1658 * Caller:
1659 */
1660#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001661
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001662/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001663
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001664/**
1665 * \name SECTION: Module configuration options
1666 *
1667 * This section allows for the setting of module specific sizes and
1668 * configuration options. The default values are already present in the
1669 * relevant header files and should suffice for the regular use cases.
1670 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1671 * only if you have a good reason and know the consequences.
1672 *
1673 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1674 * header file take precedence.
1675 *
1676 * Please check the respective header file for documentation on these
1677 * parameters (to prevent duplicate documentation).
1678 *
1679 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1680 * \{
1681 */
1682//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1683
1684#if defined(POLARSSL_CONFIG_OPTIONS)
1685
1686// MPI / BIGNUM options
1687//
1688#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1689#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1690
1691// CTR_DRBG options
1692//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001693#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 +02001694#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1695#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1696#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1697#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1698
1699// Entropy options
1700//
1701#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1702#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1703
Paul Bakker6e339b52013-07-03 13:37:05 +02001704// Memory options
1705#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1706#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1707#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1708
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001709// SSL Cache options
1710//
1711#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1712#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1713
1714// SSL options
1715//
1716#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001717#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001718
1719#endif /* POLARSSL_CONFIG_OPTIONS */
1720
1721/* \} name */
1722
Paul Bakker7ad00f92013-04-18 23:05:25 +02001723/*
1724 * Sanity checks on defines and dependencies
1725 */
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001726#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1727#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001728#endif
1729
1730#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1731#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1732#endif
1733
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001734#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1735#error "POLARSSL_DHM_C defined, but not all prerequisites"
1736#endif
1737
Paul Bakker7ad00f92013-04-18 23:05:25 +02001738#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1739#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1740#endif
1741
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001742#if defined(POLARSSL_ECDSA_C) && \
1743 ( !defined(POLARSSL_ECP_C) || \
1744 !defined(POLARSSL_ASN1_PARSE_C) || \
1745 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001746#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1747#endif
1748
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001749#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1750 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1751 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1752 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1753 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1754 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1755 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1756 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1757 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001758#error "POLARSSL_ECP_C defined, but not all prerequisites"
1759#endif
1760
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001761#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1762 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001763#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1764#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001765#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1766 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1767#error "CTR_DRBG_ENTROPY_LEN value too high"
1768#endif
1769#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1770 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1771#error "CTR_DRBG_ENTROPY_LEN value too high"
1772#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001773
1774#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1775#error "POLARSSL_GCM_C defined, but not all prerequisites"
1776#endif
1777
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001778#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1779#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1780#endif
1781
Paul Bakkere07f41d2013-04-19 09:08:57 +02001782#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1783#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1784#endif
1785
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001786#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1787 !defined(POLARSSL_ECDH_C)
1788#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1789#endif
1790
Paul Bakkere07f41d2013-04-19 09:08:57 +02001791#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1792 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001793 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001794#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1795#endif
1796
1797#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1798 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001799 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001800#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1801#endif
1802
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001803#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1804 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001805 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001806#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1807#endif
1808
Paul Bakkere07f41d2013-04-19 09:08:57 +02001809#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001810 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001811 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001812#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1813#endif
1814
1815#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001816 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001817 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001818#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1819#endif
1820
Paul Bakker6e339b52013-07-03 13:37:05 +02001821#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1822#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1823#endif
1824
Paul Bakker7ad00f92013-04-18 23:05:25 +02001825#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1826#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1827#endif
1828
Paul Bakkercff68422013-09-15 20:43:33 +02001829#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1830#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1831#endif
1832
1833#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1834#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001835#endif
1836
Paul Bakker4606c732013-09-15 17:04:23 +02001837#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1838#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1839#endif
1840
1841#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1842#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1843#endif
1844
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001845#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001846#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1847#endif
1848
1849#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1850 !defined(POLARSSL_OID_C) )
1851#error "POLARSSL_RSA_C defined, but not all prerequisites"
1852#endif
1853
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01001854#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
1855 !defined(POLARSSL_SHA1_C) )
1856#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
1857#endif
1858
1859#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
1860 !defined(POLARSSL_SHA1_C) )
1861#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
1862#endif
1863
1864#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
1865 !defined(POLARSSL_SHA1_C) )
1866#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
1867#endif
1868
1869#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
1870 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
1871#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
1872#endif
1873
Paul Bakker7ad00f92013-04-18 23:05:25 +02001874#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1875#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1876#endif
1877
Paul Bakker577e0062013-08-28 11:57:20 +02001878#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001879 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001880#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1881#endif
1882
1883#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1884#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1885#endif
1886
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001887#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1888 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1889 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1890#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1891#endif
1892
1893#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1894 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1895#error "Illegal protocol selection"
1896#endif
1897
1898#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1899 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1900#error "Illegal protocol selection"
1901#endif
1902
1903#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1904 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1905 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1906#error "Illegal protocol selection"
1907#endif
1908
Paul Bakker59da0a42013-08-19 13:27:17 +02001909#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001910 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1911 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001912#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1913#endif
1914
Paul Bakker2466d932013-09-28 14:40:38 +02001915#if defined(POLARSSL_THREADING_DUMMY)
1916#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1917#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1918#endif
1919#define POLARSSL_THREADING_IMPL
1920#endif
1921
1922#if defined(POLARSSL_THREADING_PTHREAD)
1923#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1924#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
1925#endif
1926#define POLARSSL_THREADING_IMPL
1927#endif
1928
1929#if defined(POLARSSL_THREADING_ALT)
1930#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1931#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
1932#endif
1933#define POLARSSL_THREADING_IMPL
1934#endif
1935
1936#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
1937#error "POLARSSL_THREADING_C defined, single threading implementation required"
1938#endif
1939#undef POLARSSL_THREADING_IMPL
1940
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001941#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001942 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001943 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001944#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001945#endif
1946
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001947#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1948 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1949 !defined(POLARSSL_PK_WRITE_C) )
1950#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1951#endif
1952
1953#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1954#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1955#endif
1956
1957#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1958#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1959#endif
1960
1961#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1962#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1963#endif
1964
1965#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1966#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1967#endif
1968
1969#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1970#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001971#endif
1972
Paul Bakker5121ce52009-01-03 21:22:43 +00001973#endif /* config.h */