blob: 32704de5204ad6ead0db606773891181db2adb9d [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 *
661 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
662 * (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 *
919 * This module is used for testing (ssl_client/server).
920 */
Paul Bakker40e46942009-01-03 21:51:57 +0000921#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000922
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000923/**
924 * \def POLARSSL_CIPHER_C
925 *
926 * Enable the generic cipher layer.
927 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000928 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200929 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000930 *
931 * Uncomment to enable generic cipher wrappers.
932 */
933#define POLARSSL_CIPHER_C
934
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000935/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000936 * \def POLARSSL_CTR_DRBG_C
937 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200938 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000939 *
940 * Module: library/ctr_drbg.c
941 * Caller:
942 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000943 * Requires: POLARSSL_AES_C
944 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000945 * This module provides the CTR_DRBG AES-256 random number generator.
946 */
947#define POLARSSL_CTR_DRBG_C
948
949/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000950 * \def POLARSSL_DEBUG_C
951 *
952 * Enable the debug functions.
953 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000954 * Module: library/debug.c
955 * Caller: library/ssl_cli.c
956 * library/ssl_srv.c
957 * library/ssl_tls.c
958 *
959 * This module provides debugging functions.
960 */
Paul Bakker40e46942009-01-03 21:51:57 +0000961#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000962
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000963/**
964 * \def POLARSSL_DES_C
965 *
966 * Enable the DES block cipher.
967 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000968 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100969 * Caller: library/pem.c
970 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000971 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000972 * This module enables the following ciphersuites (if other requisites are
973 * enabled as well):
974 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
975 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100976 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200977 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100978 *
Paul Bakkercff68422013-09-15 20:43:33 +0200979 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000980 */
Paul Bakker40e46942009-01-03 21:51:57 +0000981#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000982
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000983/**
984 * \def POLARSSL_DHM_C
985 *
986 * Enable the Diffie-Hellman-Merkle key exchange.
987 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000988 * Module: library/dhm.c
989 * Caller: library/ssl_cli.c
990 * library/ssl_srv.c
991 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000992 * This module enables the following ciphersuites (if other requisites are
993 * enabled as well):
994 * TLS_DHE_RSA_WITH_DES_CBC_SHA
995 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
996 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
997 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
998 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
999 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
1000 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1001 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1002 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1003 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
1004 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1005 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +00001006 */
Paul Bakker40e46942009-01-03 21:51:57 +00001007#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001008
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001009/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001010 * \def POLARSSL_ECDH_C
1011 *
1012 * Enable the elliptic curve Diffie-Hellman library.
1013 *
1014 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001015 * Caller: library/ssl_cli.c
1016 * library/ssl_srv.c
1017 *
1018 * This module enables the following ciphersuites (if other requisites are
1019 * enabled as well):
1020 * TLS_ECDHE_RSA_WITH_NULL_SHA
1021 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
1022 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1023 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1024 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001025 *
1026 * Requires: POLARSSL_ECP_C
1027 */
1028#define POLARSSL_ECDH_C
1029
1030/**
1031 * \def POLARSSL_ECDSA_C
1032 *
1033 * Enable the elliptic curve DSA library.
1034 *
1035 * Module: library/ecdsa.c
1036 * Caller:
1037 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001038 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001039 */
1040#define POLARSSL_ECDSA_C
1041
1042/**
1043 * \def POLARSSL_ECP_C
1044 *
1045 * Enable the elliptic curve over GF(p) library.
1046 *
1047 * Module: library/ecp.c
1048 * Caller: library/ecdh.c
1049 * library/ecdsa.c
1050 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001051 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001052 */
1053#define POLARSSL_ECP_C
1054
1055/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001056 * \def POLARSSL_ENTROPY_C
1057 *
1058 * Enable the platform-specific entropy code.
1059 *
1060 * Module: library/entropy.c
1061 * Caller:
1062 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001063 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001064 *
1065 * This module provides a generic entropy pool
1066 */
1067#define POLARSSL_ENTROPY_C
1068
1069/**
Paul Bakker9d781402011-05-09 16:17:09 +00001070 * \def POLARSSL_ERROR_C
1071 *
1072 * Enable error code to error string conversion.
1073 *
1074 * Module: library/error.c
1075 * Caller:
1076 *
1077 * This module enables err_strerror().
1078 */
1079#define POLARSSL_ERROR_C
1080
1081/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001082 * \def POLARSSL_GCM_C
1083 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001084 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001085 *
1086 * Module: library/gcm.c
1087 *
1088 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001089 *
1090 * This module enables the following ciphersuites (if other requisites are
1091 * enabled as well):
1092 * TLS_RSA_WITH_AES_128_GCM_SHA256
1093 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001094 */
1095#define POLARSSL_GCM_C
1096
1097/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001098 * \def POLARSSL_HAVEGE_C
1099 *
1100 * Enable the HAVEGE random generator.
1101 *
Paul Bakker2a844242013-06-24 13:01:53 +02001102 * Warning: the HAVEGE random generator is not suitable for virtualized
1103 * environments
1104 *
1105 * Warning: the HAVEGE random generator is dependent on timing and specific
1106 * processor traits. It is therefore not advised to use HAVEGE as
1107 * your applications primary random generator or primary entropy pool
1108 * input. As a secondary input to your entropy pool, it IS able add
1109 * the (limited) extra entropy it provides.
1110 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001111 * Module: library/havege.c
1112 * Caller:
1113 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001114 * Requires: POLARSSL_TIMING_C
1115 *
Paul Bakker2a844242013-06-24 13:01:53 +02001116 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001117 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001118//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001119
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001120/**
1121 * \def POLARSSL_MD_C
1122 *
1123 * Enable the generic message digest layer.
1124 *
Paul Bakker17373852011-01-06 14:20:01 +00001125 * Module: library/md.c
1126 * Caller:
1127 *
1128 * Uncomment to enable generic message digest wrappers.
1129 */
1130#define POLARSSL_MD_C
1131
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001132/**
1133 * \def POLARSSL_MD2_C
1134 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001135 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001136 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001137 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001138 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001139 *
1140 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001141 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001142//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001143
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001144/**
1145 * \def POLARSSL_MD4_C
1146 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001147 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001148 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001149 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001150 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001151 *
1152 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001153 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001154//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001155
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001156/**
1157 * \def POLARSSL_MD5_C
1158 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001159 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001160 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001161 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001162 * Caller: library/md.c
1163 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001164 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001165 *
1166 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001167 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001168 */
Paul Bakker40e46942009-01-03 21:51:57 +00001169#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001170
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001171/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001172 * \def POLARSSL_MEMORY_C
1173 *
1174 * Enable the memory allocation layer.
1175 * By default PolarSSL uses the system-provided malloc() and free().
1176 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1177 * are defined and unmodified)
1178 *
1179 * This allows different allocators (self-implemented or provided)
1180 *
1181 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001182 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001183//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001184
1185/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001186 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1187 *
1188 * Enable the buffer allocator implementation that makes use of a (stack)
1189 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1190 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001191 *
1192 * Module: library/memory_buffer_alloc.c
1193 *
1194 * Requires: POLARSSL_MEMORY_C
1195 *
1196 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001197 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001198//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001199
1200/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001201 * \def POLARSSL_NET_C
1202 *
1203 * Enable the TCP/IP networking routines.
1204 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001205 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001206 *
1207 * This module provides TCP/IP networking routines.
1208 */
Paul Bakker40e46942009-01-03 21:51:57 +00001209#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001210
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001211/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001212 * \def POLARSSL_OID_C
1213 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001214 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001215 *
1216 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001217 * Caller: library/asn1write.c
1218 * library/pkcs5.c
1219 * library/pkparse.c
1220 * library/pkwrite.c
1221 * library/rsa.c
1222 * library/x509.c
1223 * library/x509_create.c
1224 * library/x509_crl.c
1225 * library/x509_crt.c
1226 * library/x509_csr.c
1227 * library/x509write_crt.c
1228 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001229 *
1230 * This modules translates between OIDs and internal values.
1231 */
1232#define POLARSSL_OID_C
1233
1234/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001235 * \def POLARSSL_PADLOCK_C
1236 *
1237 * Enable VIA Padlock support on x86.
1238 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001239 * Module: library/padlock.c
1240 * Caller: library/aes.c
1241 *
1242 * This modules adds support for the VIA PadLock on x86.
1243 */
Paul Bakker40e46942009-01-03 21:51:57 +00001244#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001245
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001246/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001247 * \def POLARSSL_PBKDF2_C
1248 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001249 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001250 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001251 *
1252 * Module: library/pbkdf2.c
1253 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001254 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001255 *
1256 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001257 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001258#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001259
1260/**
Paul Bakkercff68422013-09-15 20:43:33 +02001261 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001262 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001263 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001264 *
1265 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001266 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001267 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001268 * library/x509_crl.c
1269 * library/x509_crt.c
1270 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001271 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001272 * Requires: POLARSSL_BASE64_C
1273 *
Paul Bakkercff68422013-09-15 20:43:33 +02001274 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001275 */
Paul Bakkercff68422013-09-15 20:43:33 +02001276#define POLARSSL_PEM_PARSE_C
1277
1278/**
1279 * \def POLARSSL_PEM_WRITE_C
1280 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001281 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001282 *
1283 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001284 * Caller: library/pkwrite.c
1285 * library/x509write_crt.c
1286 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001287 *
1288 * Requires: POLARSSL_BASE64_C
1289 *
1290 * This modules adds support for encoding / writing PEM files.
1291 */
1292#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001293
1294/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001295 * \def POLARSSL_PK_C
1296 *
1297 * Enable the generic public (asymetric) key layer.
1298 *
1299 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001300 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001301 * library/ssl_cli.c
1302 * library/ssl_srv.c
1303 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001304 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1305 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001306 * Uncomment to enable generic public key wrappers.
1307 */
1308#define POLARSSL_PK_C
1309
1310/**
Paul Bakker4606c732013-09-15 17:04:23 +02001311 * \def POLARSSL_PK_PARSE_C
1312 *
1313 * Enable the generic public (asymetric) key parser.
1314 *
1315 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001316 * Caller: library/x509_crt.c
1317 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001318 *
1319 * Requires: POLARSSL_PK_C
1320 *
1321 * Uncomment to enable generic public key parse functions.
1322 */
1323#define POLARSSL_PK_PARSE_C
1324
1325/**
1326 * \def POLARSSL_PK_WRITE_C
1327 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001328 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001329 *
1330 * Module: library/pkwrite.c
1331 * Caller: library/x509write.c
1332 *
1333 * Requires: POLARSSL_PK_C
1334 *
1335 * Uncomment to enable generic public key write functions.
1336 */
1337#define POLARSSL_PK_WRITE_C
1338
1339/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001340 * \def POLARSSL_PKCS5_C
1341 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001342 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001343 *
1344 * Module: library/pkcs5.c
1345 *
1346 * Requires: POLARSSL_MD_C
1347 *
1348 * This module adds support for the PKCS#5 functions.
1349 */
1350#define POLARSSL_PKCS5_C
1351
1352/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001353 * \def POLARSSL_PKCS11_C
1354 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001355 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001356 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001357 * Module: library/pkcs11.c
1358 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001359 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001360 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001361 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001362 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001363 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001364 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001365//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001366
1367/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001368 * \def POLARSSL_PKCS12_C
1369 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001370 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001371 * Adds algorithms for parsing PKCS#8 encrypted private keys
1372 *
1373 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001374 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001375 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001376 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1377 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001378 *
1379 * This module enables PKCS#12 functions.
1380 */
1381#define POLARSSL_PKCS12_C
1382
1383/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001384 * \def POLARSSL_RSA_C
1385 *
1386 * Enable the RSA public-key cryptosystem.
1387 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001388 * Module: library/rsa.c
1389 * Caller: library/ssl_cli.c
1390 * library/ssl_srv.c
1391 * library/ssl_tls.c
1392 * library/x509.c
1393 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001394 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001395 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001396 * This module is required for SSL/TLS and MD5-signed certificates.
1397 */
Paul Bakker40e46942009-01-03 21:51:57 +00001398#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001399
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001400/**
1401 * \def POLARSSL_SHA1_C
1402 *
1403 * Enable the SHA1 cryptographic hash algorithm.
1404 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001405 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001406 * Caller: library/md.c
1407 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001408 * library/ssl_srv.c
1409 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001410 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001411 *
1412 * This module is required for SSL/TLS and SHA1-signed certificates.
1413 */
Paul Bakker40e46942009-01-03 21:51:57 +00001414#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001415
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001416/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001417 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001418 *
1419 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001420 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001421 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001422 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001423 * Caller: library/entropy.c
1424 * library/md.c
1425 * library/ssl_cli.c
1426 * library/ssl_srv.c
1427 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001428 *
1429 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001430 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001431 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001432#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001433
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001434/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001435 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001436 *
1437 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001438 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001439 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001440 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001441 * Caller: library/entropy.c
1442 * library/md.c
1443 * library/ssl_cli.c
1444 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001445 *
1446 * This module adds support for SHA-384 and SHA-512.
1447 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001448#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001449
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001450/**
Paul Bakker0a597072012-09-25 21:55:46 +00001451 * \def POLARSSL_SSL_CACHE_C
1452 *
1453 * Enable simple SSL cache implementation.
1454 *
1455 * Module: library/ssl_cache.c
1456 * Caller:
1457 *
1458 * Requires: POLARSSL_SSL_CACHE_C
1459 */
1460#define POLARSSL_SSL_CACHE_C
1461
1462/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001463 * \def POLARSSL_SSL_CLI_C
1464 *
1465 * Enable the SSL/TLS client code.
1466 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001467 * Module: library/ssl_cli.c
1468 * Caller:
1469 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001470 * Requires: POLARSSL_SSL_TLS_C
1471 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001472 * This module is required for SSL/TLS client support.
1473 */
Paul Bakker40e46942009-01-03 21:51:57 +00001474#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001475
Paul Bakker9a736322012-11-14 12:39:52 +00001476/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001477 * \def POLARSSL_SSL_SRV_C
1478 *
1479 * Enable the SSL/TLS server code.
1480 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001481 * Module: library/ssl_srv.c
1482 * Caller:
1483 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001484 * Requires: POLARSSL_SSL_TLS_C
1485 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001486 * This module is required for SSL/TLS server support.
1487 */
Paul Bakker40e46942009-01-03 21:51:57 +00001488#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001489
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001490/**
1491 * \def POLARSSL_SSL_TLS_C
1492 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001493 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001494 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001495 * Module: library/ssl_tls.c
1496 * Caller: library/ssl_cli.c
1497 * library/ssl_srv.c
1498 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001499 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001500 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001501 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001502 * This module is required for SSL/TLS.
1503 */
Paul Bakker40e46942009-01-03 21:51:57 +00001504#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001505
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001506/**
Paul Bakker2466d932013-09-28 14:40:38 +02001507 * \def POLARSSL_THREADING_C
1508 *
1509 * Enable the threading abstraction layer.
1510 * By default PolarSSL assumes it is used in a non-threaded environment or that
1511 * contexts are not shared between threads. If you do intend to use contexts
1512 * between threads, you will need to enable this layer to prevent race
1513 * conditions.
1514 *
1515 * Module: library/threading.c
1516 *
1517 * This allows different threading implementations (self-implemented or
1518 * provided).
1519 *
1520 * You will have to enable either POLARSSL_THREADING_ALT,
1521 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1522 *
1523 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001524 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001525//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001526
1527/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001528 * \def POLARSSL_TIMING_C
1529 *
1530 * Enable the portable timing interface.
1531 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001532 * Module: library/timing.c
1533 * Caller: library/havege.c
1534 *
1535 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001536 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001537#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001538
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001539/**
1540 * \def POLARSSL_VERSION_C
1541 *
1542 * Enable run-time version information.
1543 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001544 * Module: library/version.c
1545 *
1546 * This module provides run-time version information.
1547 */
1548#define POLARSSL_VERSION_C
1549
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001550/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001551 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001552 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001553 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001554 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001555 * Module: library/x509.c
1556 * Caller: library/x509_crl.c
1557 * library/x509_crt.c
1558 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001559 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001560 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001561 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001562 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001563 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001564 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001565#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001566
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001567/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001568 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001569 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001570 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001571 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001572 * Module: library/x509_crt.c
1573 * Caller: library/ssl_cli.c
1574 * library/ssl_srv.c
1575 * library/ssl_tls.c
1576 *
1577 * Requires: POLARSSL_X509_USE_C
1578 *
1579 * This module is required for X.509 certificate parsing.
1580 */
1581#define POLARSSL_X509_CRT_PARSE_C
1582
1583/**
1584 * \def POLARSSL_X509_CRL_PARSE_C
1585 *
1586 * Enable X.509 CRL parsing.
1587 *
1588 * Module: library/x509_crl.c
1589 * Caller: library/x509_crt.c
1590 *
1591 * Requires: POLARSSL_X509_USE_C
1592 *
1593 * This module is required for X.509 CRL parsing.
1594 */
1595#define POLARSSL_X509_CRL_PARSE_C
1596
1597/**
1598 * \def POLARSSL_X509_CSR_PARSE_C
1599 *
1600 * Enable X.509 Certificate Signing Request (CSR) parsing.
1601 *
1602 * Module: library/x509_csr.c
1603 * Caller: library/x509_crt_write.c
1604 *
1605 * Requires: POLARSSL_X509_USE_C
1606 *
1607 * This module is used for reading X.509 certificate request.
1608 */
1609#define POLARSSL_X509_CSR_PARSE_C
1610
1611/**
1612 * \def POLARSSL_X509_CREATE_C
1613 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001614 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001615 *
1616 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001617 *
Paul Bakker4606c732013-09-15 17:04:23 +02001618 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001619 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001620 * This module is the basis for creating X.509 certificates and CSRs.
1621 */
1622#define POLARSSL_X509_CREATE_C
1623
1624/**
1625 * \def POLARSSL_X509_CRT_WRITE_C
1626 *
1627 * Enable creating X.509 certificates.
1628 *
1629 * Module: library/x509_crt_write.c
1630 *
1631 * Requires: POLARSSL_CREATE_C
1632 *
1633 * This module is required for X.509 certificate creation.
1634 */
1635#define POLARSSL_X509_CRT_WRITE_C
1636
1637/**
1638 * \def POLARSSL_X509_CSR_WRITE_C
1639 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001640 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001641 *
1642 * Module: library/x509_csr_write.c
1643 *
1644 * Requires: POLARSSL_CREATE_C
1645 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001646 * This module is required for X.509 certificate request writing.
1647 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001648#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001649
1650/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001651 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001652 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001653 * Enable the XTEA block cipher.
1654 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001655 * Module: library/xtea.c
1656 * Caller:
1657 */
1658#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001659
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001660/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001661
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001662/**
1663 * \name SECTION: Module configuration options
1664 *
1665 * This section allows for the setting of module specific sizes and
1666 * configuration options. The default values are already present in the
1667 * relevant header files and should suffice for the regular use cases.
1668 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1669 * only if you have a good reason and know the consequences.
1670 *
1671 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1672 * header file take precedence.
1673 *
1674 * Please check the respective header file for documentation on these
1675 * parameters (to prevent duplicate documentation).
1676 *
1677 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1678 * \{
1679 */
1680//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1681
1682#if defined(POLARSSL_CONFIG_OPTIONS)
1683
1684// MPI / BIGNUM options
1685//
1686#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1687#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1688
1689// CTR_DRBG options
1690//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001691#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 +02001692#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1693#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1694#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1695#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1696
1697// Entropy options
1698//
1699#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1700#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1701
Paul Bakker6e339b52013-07-03 13:37:05 +02001702// Memory options
1703#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1704#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1705#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1706
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001707// SSL Cache options
1708//
1709#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1710#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1711
1712// SSL options
1713//
1714#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001715#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001716
1717#endif /* POLARSSL_CONFIG_OPTIONS */
1718
1719/* \} name */
1720
Paul Bakker7ad00f92013-04-18 23:05:25 +02001721/*
1722 * Sanity checks on defines and dependencies
1723 */
1724#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1725#error "POLARSSL_DHM_C defined, but not all prerequisites"
1726#endif
1727
1728#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1729#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1730#endif
1731
1732#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1733#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1734#endif
1735
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001736#if defined(POLARSSL_ECDSA_C) && \
1737 ( !defined(POLARSSL_ECP_C) || \
1738 !defined(POLARSSL_ASN1_PARSE_C) || \
1739 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001740#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1741#endif
1742
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001743#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1744 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1745 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1746 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1747 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1748 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1749 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1750 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1751 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001752#error "POLARSSL_ECP_C defined, but not all prerequisites"
1753#endif
1754
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001755#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1756 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001757#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1758#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001759#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1760 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1761#error "CTR_DRBG_ENTROPY_LEN value too high"
1762#endif
1763#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1764 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1765#error "CTR_DRBG_ENTROPY_LEN value too high"
1766#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001767
1768#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1769#error "POLARSSL_GCM_C defined, but not all prerequisites"
1770#endif
1771
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001772#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1773#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1774#endif
1775
Paul Bakkere07f41d2013-04-19 09:08:57 +02001776#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1777#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1778#endif
1779
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001780#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1781 !defined(POLARSSL_ECDH_C)
1782#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1783#endif
1784
Paul Bakkere07f41d2013-04-19 09:08:57 +02001785#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1786 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001787 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001788#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1789#endif
1790
1791#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1792 ( !defined(POLARSSL_ECDH_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_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1795#endif
1796
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001797#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1798 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001799 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001800#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1801#endif
1802
Paul Bakkere07f41d2013-04-19 09:08:57 +02001803#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001804 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001805 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001806#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1807#endif
1808
1809#if defined(POLARSSL_KEY_EXCHANGE_RSA_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_ENABLED defined, but not all prerequisites"
1813#endif
1814
Paul Bakker6e339b52013-07-03 13:37:05 +02001815#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1816#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1817#endif
1818
Paul Bakker7ad00f92013-04-18 23:05:25 +02001819#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1820#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1821#endif
1822
Paul Bakkercff68422013-09-15 20:43:33 +02001823#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1824#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1825#endif
1826
1827#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1828#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001829#endif
1830
Paul Bakker4606c732013-09-15 17:04:23 +02001831#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1832#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1833#endif
1834
1835#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1836#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1837#endif
1838
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001839#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001840#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1841#endif
1842
1843#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1844 !defined(POLARSSL_OID_C) )
1845#error "POLARSSL_RSA_C defined, but not all prerequisites"
1846#endif
1847
1848#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1849#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1850#endif
1851
Paul Bakker577e0062013-08-28 11:57:20 +02001852#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001853 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001854#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1855#endif
1856
1857#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1858#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1859#endif
1860
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001861#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1862 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1863 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1864#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1865#endif
1866
1867#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1868 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1869#error "Illegal protocol selection"
1870#endif
1871
1872#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1873 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1874#error "Illegal protocol selection"
1875#endif
1876
1877#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1878 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1879 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1880#error "Illegal protocol selection"
1881#endif
1882
Paul Bakker59da0a42013-08-19 13:27:17 +02001883#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001884 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1885 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001886#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1887#endif
1888
Paul Bakker2466d932013-09-28 14:40:38 +02001889#if defined(POLARSSL_THREADING_DUMMY)
1890#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1891#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1892#endif
1893#define POLARSSL_THREADING_IMPL
1894#endif
1895
1896#if defined(POLARSSL_THREADING_PTHREAD)
1897#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1898#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
1899#endif
1900#define POLARSSL_THREADING_IMPL
1901#endif
1902
1903#if defined(POLARSSL_THREADING_ALT)
1904#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1905#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
1906#endif
1907#define POLARSSL_THREADING_IMPL
1908#endif
1909
1910#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
1911#error "POLARSSL_THREADING_C defined, single threading implementation required"
1912#endif
1913#undef POLARSSL_THREADING_IMPL
1914
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001915#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001916 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001917 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001918#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001919#endif
1920
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001921#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1922 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1923 !defined(POLARSSL_PK_WRITE_C) )
1924#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1925#endif
1926
1927#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1928#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1929#endif
1930
1931#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1932#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1933#endif
1934
1935#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1936#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1937#endif
1938
1939#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1940#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1941#endif
1942
1943#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1944#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001945#endif
1946
Paul Bakker5121ce52009-01-03 21:22:43 +00001947#endif /* config.h */