blob: c76c81979654658f39b56a71b10513d2b0b4c7d4 [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
Paul Bakker45bda902013-04-19 22:28:21 +0200198 * TLS_PSK_WITH_NULL
199 * TLS_PSK_WITH_NULL256
200 * TLS_PSK_WITH_NULL384
201 * TLS_DHE_PSK_WITH_NULL
202 * TLS_DHE_PSK_WITH_NULL256
203 * TLS_DHE_PSK_WITH_NULL384
204 * TLS_RSA_PSK_WITH_NULL
205 * TLS_RSA_PSK_WITH_NULL256
206 * TLS_RSA_PSK_WITH_NULL384
Paul Bakkerfab5c822012-02-06 16:45:10 +0000207 *
208 * Uncomment this macro to enable the NULL cipher and ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000209 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200210//#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000211
212/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200213 * \def POLARSSL_CIPHER_PADDING_XXX
214 *
215 * Uncomment or comment macros to add support for specific padding modes
216 * in the cipher layer with cipher modes that support padding (e.g. CBC)
217 *
218 * If you disable all padding modes, only full blocks can be used with CBC.
219 *
220 * Enable padding modes in the cipher layer.
221 */
222#define POLARSSL_CIPHER_PADDING_PKCS7
223#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
224#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
225#define POLARSSL_CIPHER_PADDING_ZEROS
226
227/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000228 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
229 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200230 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000231 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000232 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000233 *
234 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000235 * TLS_RSA_WITH_DES_CBC_SHA
236 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000237 *
238 * Uncomment this macro to enable weak ciphersuites
Paul Bakkerfab5c822012-02-06 16:45:10 +0000239 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200240//#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000241
242/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200243 * \def POLARSSL_ECP_XXXX_ENABLED
244 *
245 * Enables specific curves within the Elliptic Curve module.
246 * By default all supported curves are enables.
247 *
248 * Comment macros to disable the curve and functions for it
249 */
250#define POLARSSL_ECP_DP_SECP192R1_ENABLED
251#define POLARSSL_ECP_DP_SECP224R1_ENABLED
252#define POLARSSL_ECP_DP_SECP256R1_ENABLED
253#define POLARSSL_ECP_DP_SECP384R1_ENABLED
254#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200255#define POLARSSL_ECP_DP_BP256R1_ENABLED
256#define POLARSSL_ECP_DP_BP384R1_ENABLED
257#define POLARSSL_ECP_DP_BP512R1_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200258
259/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200260 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
261 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200262 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200263 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200264 * This enables the following ciphersuites (if other requisites are
265 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200266 * TLS_PSK_WITH_RC4_128_SHA
267 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
268 * TLS_PSK_WITH_AES_128_CBC_SHA
269 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200270 * TLS_PSK_WITH_AES_128_CBC_SHA256
271 * TLS_PSK_WITH_AES_256_CBC_SHA384
272 * TLS_PSK_WITH_AES_128_GCM_SHA256
273 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200274 */
275#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
276
277/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200278 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
279 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200280 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200281 *
282 * Requires: POLARSSL_DHM_C
283 *
284 * This enables the following ciphersuites (if other requisites are
285 * enabled as well):
286 * TLS_DHE_PSK_WITH_RC4_128_SHA
287 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
288 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
289 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200290 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
291 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
292 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
293 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200294 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200295#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200296
297/**
298 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
299 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200300 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Paul Bakker45bda902013-04-19 22:28:21 +0200301 * (NOT YET IMPLEMENTED)
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200302 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200303 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200304 *
305 * This enables the following ciphersuites (if other requisites are
306 * enabled as well):
307 * TLS_RSA_PSK_WITH_RC4_128_SHA
308 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
309 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
310 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200311 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
312 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
313 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
314 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200315 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200316//#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200317
318/**
319 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
320 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200321 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200322 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200323 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200324 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200325 *
326 * This enables the following ciphersuites (if other requisites are
327 * enabled as well):
328 * TLS_RSA_WITH_AES_128_CBC_SHA
329 * TLS_RSA_WITH_AES_256_CBC_SHA
330 * TLS_RSA_WITH_AES_128_CBC_SHA256
331 * TLS_RSA_WITH_AES_256_CBC_SHA256
332 * TLS_RSA_WITH_AES_128_GCM_SHA256
333 * TLS_RSA_WITH_AES_256_GCM_SHA384
334 * TLS_RSA_WITH_RC4_128_MD5
335 * TLS_RSA_WITH_RC4_128_SHA
336 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
337 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
338 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
339 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
340 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
341 */
342#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
343
344/**
345 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
346 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200347 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200348 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200349 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200350 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200351 *
352 * This enables the following ciphersuites (if other requisites are
353 * enabled as well):
354 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
355 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
356 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
357 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
358 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
359 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
360 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
361 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
362 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
363 */
364#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
365
366/**
367 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
368 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200369 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200370 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200371 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200372 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200373 *
374 * This enables the following ciphersuites (if other requisites are
375 * enabled as well):
376 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
377 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
378 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
379 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
380 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
381 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
382 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
383 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
384 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
385 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
386 */
387#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
388
389/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200390 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
391 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200392 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200393 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200394 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200395 *
396 * This enables the following ciphersuites (if other requisites are
397 * enabled as well):
398 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
399 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
400 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
401 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
402 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
403 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
404 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
405 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
406 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
407 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
408 */
409#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
410
411/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200412 * \def POLARSSL_ERROR_STRERROR_BC
413 *
414 * Make available the backward compatible error_strerror() next to the
415 * current polarssl_strerror().
416 *
417 * Disable if you run into name conflicts and want to really remove the
418 * error_strerror()
419 */
420#define POLARSSL_ERROR_STRERROR_BC
421
422/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100423 * \def POLARSSL_ERROR_STRERROR_DUMMY
424 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200425 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100426 * third party libraries easier.
427 *
428 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200429 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100430 */
431#define POLARSSL_ERROR_STRERROR_DUMMY
432
433/**
Paul Bakker15566e42011-04-24 21:19:15 +0000434 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000435 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200436 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200437 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200438 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000439 */
Paul Bakker15566e42011-04-24 21:19:15 +0000440#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000441
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000442/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000443 * \def POLARSSL_FS_IO
444 *
445 * Enable functions that use the filesystem.
446 */
447#define POLARSSL_FS_IO
448
449/**
Paul Bakker43655f42011-12-15 20:11:16 +0000450 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
451 *
452 * Do not add default entropy sources. These are the platform specific,
453 * hardclock and HAVEGE based poll functions.
454 *
455 * This is useful to have more control over the added entropy sources in an
456 * application.
457 *
458 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000459 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200460//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000461
462/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000463 * \def POLARSSL_NO_PLATFORM_ENTROPY
464 *
465 * Do not use built-in platform entropy functions.
466 * This is useful if your platform does not support
467 * standards like the /dev/urandom or Windows CryptoAPI.
468 *
469 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000470 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200471//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000472
473/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200474 * \def POLARSSL_MEMORY_DEBUG
475 *
476 * Enable debugging of buffer allocator memory issues. Automatically prints
477 * (to stderr) all (fatal) messages on memory allocation issues. Enables
478 * function for 'debug output' of allocated memory.
479 *
480 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
481 * fprintf()
482 *
483 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200484 */
485//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200486
487/**
488 * \def POLARSSL_MEMORY_BACKTRACE
489 *
490 * Include backtrace information with each allocated block.
491 *
492 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
493 * GLIBC-compatible backtrace() an backtrace_symbols() support
494 *
495 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200496 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200497//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200498
499/**
Paul Bakker48377d92013-08-30 12:06:24 +0200500 * \def POLARSSL_PKCS1_V15
501 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200502 * Enable support for PKCS#1 v1.5 encoding.
503 *
Paul Bakker48377d92013-08-30 12:06:24 +0200504 * Requires: POLARSSL_RSA_C
505 *
Paul Bakker48377d92013-08-30 12:06:24 +0200506 * This enables support for PKCS#1 v1.5 operations.
507 */
508#define POLARSSL_PKCS1_V15
509
510/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000511 * \def POLARSSL_PKCS1_V21
512 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200513 * Enable support for PKCS#1 v2.1 encoding.
514 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000515 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
516 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000517 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
518 */
519#define POLARSSL_PKCS1_V21
520
521/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000522 * \def POLARSSL_RSA_NO_CRT
523 *
524 * Do not use the Chinese Remainder Theorem for the RSA private operation.
525 *
526 * Uncomment this macro to disable the use of CRT in RSA.
527 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000528 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200529//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000530
531/**
532 * \def POLARSSL_SELF_TEST
533 *
534 * Enable the checkup functions (*_self_test).
535 */
536#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000537
538/**
Paul Bakker40865c82013-01-31 17:13:13 +0100539 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
540 *
541 * Enable sending of alert messages in case of encountered errors as per RFC.
542 * If you choose not to send the alert messages, PolarSSL can still communicate
543 * with other servers, only debugging of failures is harder.
544 *
545 * The advantage of not sending alert messages, is that no information is given
546 * about reasons for failures thus preventing adversaries of gaining intel.
547 *
548 * Enable sending of all alert messages
549 */
550#define POLARSSL_SSL_ALERT_MESSAGES
551
552/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100553 * \def POLARSSL_SSL_DEBUG_ALL
554 *
555 * Enable the debug messages in SSL module for all issues.
556 * Debug messages have been disabled in some places to prevent timing
557 * attacks due to (unbalanced) debugging function calls.
558 *
559 * If you need all error reporting you should enable this during debugging,
560 * but remove this for production servers that should log as well.
561 *
562 * Uncomment this macro to report all debug messages on errors introducing
563 * a timing side-channel.
564 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100565 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200566//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100567
568/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000569 * \def POLARSSL_SSL_HW_RECORD_ACCEL
570 *
571 * Enable hooking functions in SSL module for hardware acceleration of
572 * individual records.
573 *
574 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000575 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200576//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000577
578/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100579 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
580 *
581 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200582 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100583 *
584 * Comment this macro to disable support for SSLv2 Client Hello messages.
585 */
586#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
587
588/**
Paul Bakker05decb22013-08-15 13:33:48 +0200589 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
590 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200591 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200592 *
593 * Comment this macro to disable support for the max_fragment_length extension
594 */
595#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
596
597/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200598 * \def POLARSSL_SSL_PROTO_SSL3
599 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200600 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200601 *
602 * Requires: POLARSSL_MD5_C
603 * POLARSSL_SHA1_C
604 *
605 * Comment this macro to disable support for SSL 3.0
606 */
607#define POLARSSL_SSL_PROTO_SSL3
608
609/**
610 * \def POLARSSL_SSL_PROTO_TLS1
611 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200612 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200613 *
614 * Requires: POLARSSL_MD5_C
615 * POLARSSL_SHA1_C
616 *
617 * Comment this macro to disable support for TLS 1.0
618 */
619#define POLARSSL_SSL_PROTO_TLS1
620
621/**
622 * \def POLARSSL_SSL_PROTO_TLS1_1
623 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200624 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200625 *
626 * Requires: POLARSSL_MD5_C
627 * POLARSSL_SHA1_C
628 *
629 * Comment this macro to disable support for TLS 1.1
630 */
631#define POLARSSL_SSL_PROTO_TLS1_1
632
633/**
634 * \def POLARSSL_SSL_PROTO_TLS1_2
635 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200636 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200637 *
638 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
639 * (Depends on ciphersuites)
640 *
641 * Comment this macro to disable support for TLS 1.2
642 */
643#define POLARSSL_SSL_PROTO_TLS1_2
644
645/**
Paul Bakkera503a632013-08-14 13:48:06 +0200646 * \def POLARSSL_SSL_SESSION_TICKETS
647 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200648 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200649 *
650 * Requires: POLARSSL_AES_C
651 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200652 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200653 *
654 * Comment this macro to disable support for SSL session tickets
655 */
656#define POLARSSL_SSL_SESSION_TICKETS
657
658/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200659 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
660 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200661 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200662 *
663 * Comment this macro to disable support for server name indication in SSL
664 */
665#define POLARSSL_SSL_SERVER_NAME_INDICATION
666
667/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200668 * \def POLARSSL_SSL_TRUNCATED_HMAC
669 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200670 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200671 *
672 * Comment this macro to disable support for truncated HMAC in SSL
673 */
674#define POLARSSL_SSL_TRUNCATED_HMAC
675
676/**
Paul Bakker2466d932013-09-28 14:40:38 +0200677 * \def POLARSSL_THREADING_ALT
678 *
679 * Provide your own alternate threading implementation.
680 *
681 * Requires: POLARSSL_THREADING_C
682 *
683 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200684 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200685//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200686
687/**
688 * \def POLARSSL_THREADING_DUMMY
689 *
690 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200691 * Warning: If you use this, all claims of thread-safety in the documentation
692 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200693 *
694 * Requires: POLARSSL_THREADING_C
695 *
696 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200697 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200698//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200699
700/**
701 * \def POLARSSL_THREADING_PTHREAD
702 *
703 * Enable the pthread wrapper layer for the threading layer.
704 *
705 * Requires: POLARSSL_THREADING_C
706 *
707 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200708 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200709//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200710
711/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200712 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
713 *
714 * If set, the X509 parser will not break-off when parsing an X509 certificate
715 * and encountering an extension in a v1 or v2 certificate.
716 *
717 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200718 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200719//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200720
721/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000722 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
723 *
724 * If set, the X509 parser will not break-off when parsing an X509 certificate
725 * and encountering an unknown critical extension.
726 *
727 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000728 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200729//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000730
731/**
732 * \def POLARSSL_ZLIB_SUPPORT
733 *
734 * If set, the SSL/TLS module uses ZLIB to support compression and
735 * decompression of packet data.
736 *
737 * Used in: library/ssl_tls.c
738 * library/ssl_cli.c
739 * library/ssl_srv.c
740 *
741 * This feature requires zlib library and headers to be present.
742 *
743 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000744 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200745//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200746/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000747
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000748/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000749 * \name SECTION: PolarSSL modules
750 *
751 * This section enables or disables entire modules in PolarSSL
752 * \{
753 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000754
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000755/**
756 * \def POLARSSL_AES_C
757 *
758 * Enable the AES block cipher.
759 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000760 * Module: library/aes.c
761 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000762 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000763 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000764 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000765 * This module enables the following ciphersuites (if other requisites are
766 * enabled as well):
767 * TLS_RSA_WITH_AES_128_CBC_SHA
768 * TLS_RSA_WITH_AES_256_CBC_SHA
769 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
770 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
771 * TLS_RSA_WITH_AES_128_CBC_SHA256
772 * TLS_RSA_WITH_AES_256_CBC_SHA256
773 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
774 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
775 * TLS_RSA_WITH_AES_128_GCM_SHA256
776 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100777 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
778 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200779 * TLS_PSK_WITH_AES_128_CBC_SHA
780 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100781 *
Paul Bakkercff68422013-09-15 20:43:33 +0200782 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000783 */
Paul Bakker40e46942009-01-03 21:51:57 +0000784#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000785
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000786/**
787 * \def POLARSSL_ARC4_C
788 *
789 * Enable the ARCFOUR stream cipher.
790 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000791 * Module: library/arc4.c
792 * Caller: library/ssl_tls.c
793 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100794 * This module enables the following ciphersuites (if other requisites are
795 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000796 * TLS_RSA_WITH_RC4_128_MD5
797 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100798 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200799 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000800 */
Paul Bakker40e46942009-01-03 21:51:57 +0000801#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000802
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000803/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000804 * \def POLARSSL_ASN1_PARSE_C
805 *
806 * Enable the generic ASN1 parser.
807 *
808 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200809 * Caller: library/x509.c
810 * library/dhm.c
811 * library/pkcs12.c
812 * library/pkcs5.c
813 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000814 */
815#define POLARSSL_ASN1_PARSE_C
816
817/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000818 * \def POLARSSL_ASN1_WRITE_C
819 *
820 * Enable the generic ASN1 writer.
821 *
822 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200823 * Caller: library/ecdsa.c
824 * library/pkwrite.c
825 * library/x509_create.c
826 * library/x509write_crt.c
827 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000828 */
829#define POLARSSL_ASN1_WRITE_C
830
831/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000832 * \def POLARSSL_BASE64_C
833 *
834 * Enable the Base64 module.
835 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000836 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000837 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000838 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000839 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000840 */
Paul Bakker40e46942009-01-03 21:51:57 +0000841#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000842
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000843/**
844 * \def POLARSSL_BIGNUM_C
845 *
Paul Bakker9a736322012-11-14 12:39:52 +0000846 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000847 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000848 * Module: library/bignum.c
849 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200850 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000851 * library/rsa.c
852 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000853 *
854 * This module is required for RSA and DHM support.
855 */
Paul Bakker40e46942009-01-03 21:51:57 +0000856#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000857
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000858/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000859 * \def POLARSSL_BLOWFISH_C
860 *
861 * Enable the Blowfish block cipher.
862 *
863 * Module: library/blowfish.c
864 */
865#define POLARSSL_BLOWFISH_C
866
867/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000868 * \def POLARSSL_CAMELLIA_C
869 *
870 * Enable the Camellia block cipher.
871 *
Paul Bakker38119b12009-01-10 23:31:23 +0000872 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000873 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000874 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000875 * This module enables the following ciphersuites (if other requisites are
876 * enabled as well):
877 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
878 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
879 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
880 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
881 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
882 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
883 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
884 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000885 */
886#define POLARSSL_CAMELLIA_C
887
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000888/**
889 * \def POLARSSL_CERTS_C
890 *
891 * Enable the test certificates.
892 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000893 * Module: library/certs.c
894 * Caller:
895 *
896 * This module is used for testing (ssl_client/server).
897 */
Paul Bakker40e46942009-01-03 21:51:57 +0000898#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000899
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000900/**
901 * \def POLARSSL_CIPHER_C
902 *
903 * Enable the generic cipher layer.
904 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000905 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200906 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000907 *
908 * Uncomment to enable generic cipher wrappers.
909 */
910#define POLARSSL_CIPHER_C
911
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000912/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000913 * \def POLARSSL_CTR_DRBG_C
914 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200915 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000916 *
917 * Module: library/ctr_drbg.c
918 * Caller:
919 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000920 * Requires: POLARSSL_AES_C
921 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000922 * This module provides the CTR_DRBG AES-256 random number generator.
923 */
924#define POLARSSL_CTR_DRBG_C
925
926/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000927 * \def POLARSSL_DEBUG_C
928 *
929 * Enable the debug functions.
930 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000931 * Module: library/debug.c
932 * Caller: library/ssl_cli.c
933 * library/ssl_srv.c
934 * library/ssl_tls.c
935 *
936 * This module provides debugging functions.
937 */
Paul Bakker40e46942009-01-03 21:51:57 +0000938#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000939
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000940/**
941 * \def POLARSSL_DES_C
942 *
943 * Enable the DES block cipher.
944 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000945 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100946 * Caller: library/pem.c
947 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000948 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000949 * This module enables the following ciphersuites (if other requisites are
950 * enabled as well):
951 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
952 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100953 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200954 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100955 *
Paul Bakkercff68422013-09-15 20:43:33 +0200956 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000957 */
Paul Bakker40e46942009-01-03 21:51:57 +0000958#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000959
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000960/**
961 * \def POLARSSL_DHM_C
962 *
963 * Enable the Diffie-Hellman-Merkle key exchange.
964 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000965 * Module: library/dhm.c
966 * Caller: library/ssl_cli.c
967 * library/ssl_srv.c
968 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000969 * This module enables the following ciphersuites (if other requisites are
970 * enabled as well):
971 * TLS_DHE_RSA_WITH_DES_CBC_SHA
972 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
973 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
974 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
975 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
976 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
977 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
978 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
979 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
980 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
981 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
982 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000983 */
Paul Bakker40e46942009-01-03 21:51:57 +0000984#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000985
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000986/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100987 * \def POLARSSL_ECDH_C
988 *
989 * Enable the elliptic curve Diffie-Hellman library.
990 *
991 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100992 * Caller: library/ssl_cli.c
993 * library/ssl_srv.c
994 *
995 * This module enables the following ciphersuites (if other requisites are
996 * enabled as well):
997 * TLS_ECDHE_RSA_WITH_NULL_SHA
998 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
999 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1000 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1001 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001002 *
1003 * Requires: POLARSSL_ECP_C
1004 */
1005#define POLARSSL_ECDH_C
1006
1007/**
1008 * \def POLARSSL_ECDSA_C
1009 *
1010 * Enable the elliptic curve DSA library.
1011 *
1012 * Module: library/ecdsa.c
1013 * Caller:
1014 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001015 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001016 */
1017#define POLARSSL_ECDSA_C
1018
1019/**
1020 * \def POLARSSL_ECP_C
1021 *
1022 * Enable the elliptic curve over GF(p) library.
1023 *
1024 * Module: library/ecp.c
1025 * Caller: library/ecdh.c
1026 * library/ecdsa.c
1027 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001028 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001029 */
1030#define POLARSSL_ECP_C
1031
1032/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001033 * \def POLARSSL_ENTROPY_C
1034 *
1035 * Enable the platform-specific entropy code.
1036 *
1037 * Module: library/entropy.c
1038 * Caller:
1039 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001040 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001041 *
1042 * This module provides a generic entropy pool
1043 */
1044#define POLARSSL_ENTROPY_C
1045
1046/**
Paul Bakker9d781402011-05-09 16:17:09 +00001047 * \def POLARSSL_ERROR_C
1048 *
1049 * Enable error code to error string conversion.
1050 *
1051 * Module: library/error.c
1052 * Caller:
1053 *
1054 * This module enables err_strerror().
1055 */
1056#define POLARSSL_ERROR_C
1057
1058/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001059 * \def POLARSSL_GCM_C
1060 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001061 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001062 *
1063 * Module: library/gcm.c
1064 *
1065 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001066 *
1067 * This module enables the following ciphersuites (if other requisites are
1068 * enabled as well):
1069 * TLS_RSA_WITH_AES_128_GCM_SHA256
1070 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001071 */
1072#define POLARSSL_GCM_C
1073
1074/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001075 * \def POLARSSL_HAVEGE_C
1076 *
1077 * Enable the HAVEGE random generator.
1078 *
Paul Bakker2a844242013-06-24 13:01:53 +02001079 * Warning: the HAVEGE random generator is not suitable for virtualized
1080 * environments
1081 *
1082 * Warning: the HAVEGE random generator is dependent on timing and specific
1083 * processor traits. It is therefore not advised to use HAVEGE as
1084 * your applications primary random generator or primary entropy pool
1085 * input. As a secondary input to your entropy pool, it IS able add
1086 * the (limited) extra entropy it provides.
1087 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001088 * Module: library/havege.c
1089 * Caller:
1090 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001091 * Requires: POLARSSL_TIMING_C
1092 *
Paul Bakker2a844242013-06-24 13:01:53 +02001093 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001094 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001095//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001096
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001097/**
1098 * \def POLARSSL_MD_C
1099 *
1100 * Enable the generic message digest layer.
1101 *
Paul Bakker17373852011-01-06 14:20:01 +00001102 * Module: library/md.c
1103 * Caller:
1104 *
1105 * Uncomment to enable generic message digest wrappers.
1106 */
1107#define POLARSSL_MD_C
1108
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001109/**
1110 * \def POLARSSL_MD2_C
1111 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001112 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001113 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001114 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001115 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001116 *
1117 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001118 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001119//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001120
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001121/**
1122 * \def POLARSSL_MD4_C
1123 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001124 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001125 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001126 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001127 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001128 *
1129 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001130 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001131//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001132
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001133/**
1134 * \def POLARSSL_MD5_C
1135 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001136 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001137 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001138 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001139 * Caller: library/md.c
1140 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001141 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001142 *
1143 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001144 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001145 */
Paul Bakker40e46942009-01-03 21:51:57 +00001146#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001147
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001148/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001149 * \def POLARSSL_MEMORY_C
1150 *
1151 * Enable the memory allocation layer.
1152 * By default PolarSSL uses the system-provided malloc() and free().
1153 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1154 * are defined and unmodified)
1155 *
1156 * This allows different allocators (self-implemented or provided)
1157 *
1158 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001159 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001160//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001161
1162/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001163 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1164 *
1165 * Enable the buffer allocator implementation that makes use of a (stack)
1166 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1167 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001168 *
1169 * Module: library/memory_buffer_alloc.c
1170 *
1171 * Requires: POLARSSL_MEMORY_C
1172 *
1173 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001174 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001175//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001176
1177/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001178 * \def POLARSSL_NET_C
1179 *
1180 * Enable the TCP/IP networking routines.
1181 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001182 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001183 *
1184 * This module provides TCP/IP networking routines.
1185 */
Paul Bakker40e46942009-01-03 21:51:57 +00001186#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001187
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001188/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001189 * \def POLARSSL_OID_C
1190 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001191 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001192 *
1193 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001194 * Caller: library/asn1write.c
1195 * library/pkcs5.c
1196 * library/pkparse.c
1197 * library/pkwrite.c
1198 * library/rsa.c
1199 * library/x509.c
1200 * library/x509_create.c
1201 * library/x509_crl.c
1202 * library/x509_crt.c
1203 * library/x509_csr.c
1204 * library/x509write_crt.c
1205 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001206 *
1207 * This modules translates between OIDs and internal values.
1208 */
1209#define POLARSSL_OID_C
1210
1211/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001212 * \def POLARSSL_PADLOCK_C
1213 *
1214 * Enable VIA Padlock support on x86.
1215 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001216 * Module: library/padlock.c
1217 * Caller: library/aes.c
1218 *
1219 * This modules adds support for the VIA PadLock on x86.
1220 */
Paul Bakker40e46942009-01-03 21:51:57 +00001221#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001222
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001223/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001224 * \def POLARSSL_PBKDF2_C
1225 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001226 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001227 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001228 *
1229 * Module: library/pbkdf2.c
1230 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001231 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001232 *
1233 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001234 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001235#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001236
1237/**
Paul Bakkercff68422013-09-15 20:43:33 +02001238 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001239 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001240 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001241 *
1242 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001243 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001244 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001245 * library/x509_crl.c
1246 * library/x509_crt.c
1247 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001248 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001249 * Requires: POLARSSL_BASE64_C
1250 *
Paul Bakkercff68422013-09-15 20:43:33 +02001251 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001252 */
Paul Bakkercff68422013-09-15 20:43:33 +02001253#define POLARSSL_PEM_PARSE_C
1254
1255/**
1256 * \def POLARSSL_PEM_WRITE_C
1257 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001258 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001259 *
1260 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001261 * Caller: library/pkwrite.c
1262 * library/x509write_crt.c
1263 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001264 *
1265 * Requires: POLARSSL_BASE64_C
1266 *
1267 * This modules adds support for encoding / writing PEM files.
1268 */
1269#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001270
1271/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001272 * \def POLARSSL_PK_C
1273 *
1274 * Enable the generic public (asymetric) key layer.
1275 *
1276 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001277 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001278 * library/ssl_cli.c
1279 * library/ssl_srv.c
1280 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001281 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1282 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001283 * Uncomment to enable generic public key wrappers.
1284 */
1285#define POLARSSL_PK_C
1286
1287/**
Paul Bakker4606c732013-09-15 17:04:23 +02001288 * \def POLARSSL_PK_PARSE_C
1289 *
1290 * Enable the generic public (asymetric) key parser.
1291 *
1292 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001293 * Caller: library/x509_crt.c
1294 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001295 *
1296 * Requires: POLARSSL_PK_C
1297 *
1298 * Uncomment to enable generic public key parse functions.
1299 */
1300#define POLARSSL_PK_PARSE_C
1301
1302/**
1303 * \def POLARSSL_PK_WRITE_C
1304 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001305 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001306 *
1307 * Module: library/pkwrite.c
1308 * Caller: library/x509write.c
1309 *
1310 * Requires: POLARSSL_PK_C
1311 *
1312 * Uncomment to enable generic public key write functions.
1313 */
1314#define POLARSSL_PK_WRITE_C
1315
1316/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001317 * \def POLARSSL_PKCS5_C
1318 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001319 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001320 *
1321 * Module: library/pkcs5.c
1322 *
1323 * Requires: POLARSSL_MD_C
1324 *
1325 * This module adds support for the PKCS#5 functions.
1326 */
1327#define POLARSSL_PKCS5_C
1328
1329/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001330 * \def POLARSSL_PKCS11_C
1331 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001332 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001333 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001334 * Module: library/pkcs11.c
1335 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001336 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001337 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001338 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001339 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001340 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001341 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001342//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001343
1344/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001345 * \def POLARSSL_PKCS12_C
1346 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001347 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001348 * Adds algorithms for parsing PKCS#8 encrypted private keys
1349 *
1350 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001351 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001352 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001353 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1354 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001355 *
1356 * This module enables PKCS#12 functions.
1357 */
1358#define POLARSSL_PKCS12_C
1359
1360/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001361 * \def POLARSSL_RSA_C
1362 *
1363 * Enable the RSA public-key cryptosystem.
1364 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001365 * Module: library/rsa.c
1366 * Caller: library/ssl_cli.c
1367 * library/ssl_srv.c
1368 * library/ssl_tls.c
1369 * library/x509.c
1370 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001371 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001372 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001373 * This module is required for SSL/TLS and MD5-signed certificates.
1374 */
Paul Bakker40e46942009-01-03 21:51:57 +00001375#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001376
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001377/**
1378 * \def POLARSSL_SHA1_C
1379 *
1380 * Enable the SHA1 cryptographic hash algorithm.
1381 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001382 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001383 * Caller: library/md.c
1384 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001385 * library/ssl_srv.c
1386 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001387 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001388 *
1389 * This module is required for SSL/TLS and SHA1-signed certificates.
1390 */
Paul Bakker40e46942009-01-03 21:51:57 +00001391#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001392
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001393/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001394 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001395 *
1396 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001397 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001398 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001399 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001400 * Caller: library/entropy.c
1401 * library/md.c
1402 * library/ssl_cli.c
1403 * library/ssl_srv.c
1404 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001405 *
1406 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001407 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001408 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001409#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001410
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001411/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001412 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001413 *
1414 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001415 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001416 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001417 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001418 * Caller: library/entropy.c
1419 * library/md.c
1420 * library/ssl_cli.c
1421 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001422 *
1423 * This module adds support for SHA-384 and SHA-512.
1424 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001425#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001426
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001427/**
Paul Bakker0a597072012-09-25 21:55:46 +00001428 * \def POLARSSL_SSL_CACHE_C
1429 *
1430 * Enable simple SSL cache implementation.
1431 *
1432 * Module: library/ssl_cache.c
1433 * Caller:
1434 *
1435 * Requires: POLARSSL_SSL_CACHE_C
1436 */
1437#define POLARSSL_SSL_CACHE_C
1438
1439/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001440 * \def POLARSSL_SSL_CLI_C
1441 *
1442 * Enable the SSL/TLS client code.
1443 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001444 * Module: library/ssl_cli.c
1445 * Caller:
1446 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001447 * Requires: POLARSSL_SSL_TLS_C
1448 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001449 * This module is required for SSL/TLS client support.
1450 */
Paul Bakker40e46942009-01-03 21:51:57 +00001451#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001452
Paul Bakker9a736322012-11-14 12:39:52 +00001453/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001454 * \def POLARSSL_SSL_SRV_C
1455 *
1456 * Enable the SSL/TLS server code.
1457 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001458 * Module: library/ssl_srv.c
1459 * Caller:
1460 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001461 * Requires: POLARSSL_SSL_TLS_C
1462 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001463 * This module is required for SSL/TLS server support.
1464 */
Paul Bakker40e46942009-01-03 21:51:57 +00001465#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001466
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001467/**
1468 * \def POLARSSL_SSL_TLS_C
1469 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001470 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001471 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001472 * Module: library/ssl_tls.c
1473 * Caller: library/ssl_cli.c
1474 * library/ssl_srv.c
1475 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001476 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001477 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001478 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001479 * This module is required for SSL/TLS.
1480 */
Paul Bakker40e46942009-01-03 21:51:57 +00001481#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001482
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001483/**
Paul Bakker2466d932013-09-28 14:40:38 +02001484 * \def POLARSSL_THREADING_C
1485 *
1486 * Enable the threading abstraction layer.
1487 * By default PolarSSL assumes it is used in a non-threaded environment or that
1488 * contexts are not shared between threads. If you do intend to use contexts
1489 * between threads, you will need to enable this layer to prevent race
1490 * conditions.
1491 *
1492 * Module: library/threading.c
1493 *
1494 * This allows different threading implementations (self-implemented or
1495 * provided).
1496 *
1497 * You will have to enable either POLARSSL_THREADING_ALT,
1498 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1499 *
1500 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001501 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001502//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001503
1504/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001505 * \def POLARSSL_TIMING_C
1506 *
1507 * Enable the portable timing interface.
1508 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001509 * Module: library/timing.c
1510 * Caller: library/havege.c
1511 *
1512 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001513 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001514#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001515
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001516/**
1517 * \def POLARSSL_VERSION_C
1518 *
1519 * Enable run-time version information.
1520 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001521 * Module: library/version.c
1522 *
1523 * This module provides run-time version information.
1524 */
1525#define POLARSSL_VERSION_C
1526
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001527/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001528 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001529 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001530 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001531 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001532 * Module: library/x509.c
1533 * Caller: library/x509_crl.c
1534 * library/x509_crt.c
1535 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001536 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001537 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001538 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001539 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001540 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001541 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001542#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001543
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001544/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001545 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001546 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001547 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001548 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001549 * Module: library/x509_crt.c
1550 * Caller: library/ssl_cli.c
1551 * library/ssl_srv.c
1552 * library/ssl_tls.c
1553 *
1554 * Requires: POLARSSL_X509_USE_C
1555 *
1556 * This module is required for X.509 certificate parsing.
1557 */
1558#define POLARSSL_X509_CRT_PARSE_C
1559
1560/**
1561 * \def POLARSSL_X509_CRL_PARSE_C
1562 *
1563 * Enable X.509 CRL parsing.
1564 *
1565 * Module: library/x509_crl.c
1566 * Caller: library/x509_crt.c
1567 *
1568 * Requires: POLARSSL_X509_USE_C
1569 *
1570 * This module is required for X.509 CRL parsing.
1571 */
1572#define POLARSSL_X509_CRL_PARSE_C
1573
1574/**
1575 * \def POLARSSL_X509_CSR_PARSE_C
1576 *
1577 * Enable X.509 Certificate Signing Request (CSR) parsing.
1578 *
1579 * Module: library/x509_csr.c
1580 * Caller: library/x509_crt_write.c
1581 *
1582 * Requires: POLARSSL_X509_USE_C
1583 *
1584 * This module is used for reading X.509 certificate request.
1585 */
1586#define POLARSSL_X509_CSR_PARSE_C
1587
1588/**
1589 * \def POLARSSL_X509_CREATE_C
1590 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001591 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001592 *
1593 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001594 *
Paul Bakker4606c732013-09-15 17:04:23 +02001595 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001596 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001597 * This module is the basis for creating X.509 certificates and CSRs.
1598 */
1599#define POLARSSL_X509_CREATE_C
1600
1601/**
1602 * \def POLARSSL_X509_CRT_WRITE_C
1603 *
1604 * Enable creating X.509 certificates.
1605 *
1606 * Module: library/x509_crt_write.c
1607 *
1608 * Requires: POLARSSL_CREATE_C
1609 *
1610 * This module is required for X.509 certificate creation.
1611 */
1612#define POLARSSL_X509_CRT_WRITE_C
1613
1614/**
1615 * \def POLARSSL_X509_CSR_WRITE_C
1616 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001617 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001618 *
1619 * Module: library/x509_csr_write.c
1620 *
1621 * Requires: POLARSSL_CREATE_C
1622 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001623 * This module is required for X.509 certificate request writing.
1624 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001625#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001626
1627/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001628 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001629 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001630 * Enable the XTEA block cipher.
1631 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001632 * Module: library/xtea.c
1633 * Caller:
1634 */
1635#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001636
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001637/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001638
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001639/**
1640 * \name SECTION: Module configuration options
1641 *
1642 * This section allows for the setting of module specific sizes and
1643 * configuration options. The default values are already present in the
1644 * relevant header files and should suffice for the regular use cases.
1645 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1646 * only if you have a good reason and know the consequences.
1647 *
1648 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1649 * header file take precedence.
1650 *
1651 * Please check the respective header file for documentation on these
1652 * parameters (to prevent duplicate documentation).
1653 *
1654 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1655 * \{
1656 */
1657//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1658
1659#if defined(POLARSSL_CONFIG_OPTIONS)
1660
1661// MPI / BIGNUM options
1662//
1663#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1664#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1665
1666// CTR_DRBG options
1667//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001668#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 +02001669#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1670#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1671#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1672#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1673
1674// Entropy options
1675//
1676#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1677#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1678
Paul Bakker6e339b52013-07-03 13:37:05 +02001679// Memory options
1680#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1681#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1682#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1683
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001684// SSL Cache options
1685//
1686#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1687#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1688
1689// SSL options
1690//
1691#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001692#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001693
1694#endif /* POLARSSL_CONFIG_OPTIONS */
1695
1696/* \} name */
1697
Paul Bakker7ad00f92013-04-18 23:05:25 +02001698/*
1699 * Sanity checks on defines and dependencies
1700 */
1701#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1702#error "POLARSSL_DHM_C defined, but not all prerequisites"
1703#endif
1704
1705#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1706#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1707#endif
1708
1709#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1710#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1711#endif
1712
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001713#if defined(POLARSSL_ECDSA_C) && \
1714 ( !defined(POLARSSL_ECP_C) || \
1715 !defined(POLARSSL_ASN1_PARSE_C) || \
1716 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001717#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1718#endif
1719
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001720#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C) || ( \
1721 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1722 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1723 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1724 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1725 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1726 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1727 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1728 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001729#error "POLARSSL_ECP_C defined, but not all prerequisites"
1730#endif
1731
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001732#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1733 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001734#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1735#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001736#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1737 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1738#error "CTR_DRBG_ENTROPY_LEN value too high"
1739#endif
1740#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1741 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1742#error "CTR_DRBG_ENTROPY_LEN value too high"
1743#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001744
1745#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1746#error "POLARSSL_GCM_C defined, but not all prerequisites"
1747#endif
1748
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001749#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1750#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1751#endif
1752
Paul Bakkere07f41d2013-04-19 09:08:57 +02001753#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1754#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1755#endif
1756
1757#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1758 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001759 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001760#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1761#endif
1762
1763#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1764 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001765 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001766#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1767#endif
1768
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001769#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1770 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001771 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001772#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1773#endif
1774
Paul Bakkere07f41d2013-04-19 09:08:57 +02001775#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001776 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001777 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001778#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1779#endif
1780
1781#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001782 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001783 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001784#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1785#endif
1786
Paul Bakker6e339b52013-07-03 13:37:05 +02001787#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1788#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1789#endif
1790
Paul Bakker7ad00f92013-04-18 23:05:25 +02001791#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1792#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1793#endif
1794
Paul Bakkercff68422013-09-15 20:43:33 +02001795#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1796#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1797#endif
1798
1799#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1800#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001801#endif
1802
Paul Bakker4606c732013-09-15 17:04:23 +02001803#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1804#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1805#endif
1806
1807#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1808#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1809#endif
1810
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001811#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001812#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1813#endif
1814
1815#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1816 !defined(POLARSSL_OID_C) )
1817#error "POLARSSL_RSA_C defined, but not all prerequisites"
1818#endif
1819
1820#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1821#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1822#endif
1823
Paul Bakker577e0062013-08-28 11:57:20 +02001824#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001825 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001826#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1827#endif
1828
1829#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1830#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1831#endif
1832
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001833#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1834 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1835 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1836#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1837#endif
1838
1839#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1840 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1841#error "Illegal protocol selection"
1842#endif
1843
1844#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1845 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1846#error "Illegal protocol selection"
1847#endif
1848
1849#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1850 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1851 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1852#error "Illegal protocol selection"
1853#endif
1854
Paul Bakker59da0a42013-08-19 13:27:17 +02001855#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001856 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1857 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001858#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1859#endif
1860
Paul Bakker2466d932013-09-28 14:40:38 +02001861#if defined(POLARSSL_THREADING_DUMMY)
1862#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1863#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1864#endif
1865#define POLARSSL_THREADING_IMPL
1866#endif
1867
1868#if defined(POLARSSL_THREADING_PTHREAD)
1869#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1870#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
1871#endif
1872#define POLARSSL_THREADING_IMPL
1873#endif
1874
1875#if defined(POLARSSL_THREADING_ALT)
1876#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1877#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
1878#endif
1879#define POLARSSL_THREADING_IMPL
1880#endif
1881
1882#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
1883#error "POLARSSL_THREADING_C defined, single threading implementation required"
1884#endif
1885#undef POLARSSL_THREADING_IMPL
1886
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001887#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001888 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001889 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001890#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001891#endif
1892
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001893#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1894 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1895 !defined(POLARSSL_PK_WRITE_C) )
1896#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1897#endif
1898
1899#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1900#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1901#endif
1902
1903#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1904#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1905#endif
1906
1907#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1908#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1909#endif
1910
1911#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1912#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1913#endif
1914
1915#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1916#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001917#endif
1918
Paul Bakker5121ce52009-01-03 21:22:43 +00001919#endif /* config.h */