blob: d231b42c8bbc01e944c58bca234e70fb092ea868 [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/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200263 * \def POLARSSL_ECP_NIST_OPTIM
264 *
265 * Enable specific 'modulo p' routines for each NIST prime.
266 * Depending on the prime and architecture, makes operations 4 to 8 times
267 * faster on the corresponding curve.
268 *
269 * Comment this macro to disable NIST curves optimisation.
270 */
271#define POLARSSL_ECP_NIST_OPTIM
272
273/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200274 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
275 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200276 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200277 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200278 * This enables the following ciphersuites (if other requisites are
279 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200280 * TLS_PSK_WITH_RC4_128_SHA
281 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
282 * TLS_PSK_WITH_AES_128_CBC_SHA
283 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200284 * TLS_PSK_WITH_AES_128_CBC_SHA256
285 * TLS_PSK_WITH_AES_256_CBC_SHA384
286 * TLS_PSK_WITH_AES_128_GCM_SHA256
287 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200288 */
289#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
290
291/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200292 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
293 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200294 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200295 *
296 * Requires: POLARSSL_DHM_C
297 *
298 * This enables the following ciphersuites (if other requisites are
299 * enabled as well):
300 * TLS_DHE_PSK_WITH_RC4_128_SHA
301 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
302 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
303 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200304 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
305 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
306 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
307 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200308 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200309#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200310
311/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200312 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
313 *
314 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
315 *
316 * Requires: POLARSSL_ECDH_C
317 *
318 * This enables the following ciphersuites (if other requisites are
319 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200320 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
321 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
322 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
323 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
324 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
325 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
326 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
327 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200328 */
329#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
330
331/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200332 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
333 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200334 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200335 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200336 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200337 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200338 *
339 * This enables the following ciphersuites (if other requisites are
340 * enabled as well):
341 * TLS_RSA_PSK_WITH_RC4_128_SHA
342 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
343 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
344 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200345 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
346 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
347 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
348 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200349 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200350#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200351
352/**
353 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
354 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200355 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200356 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200357 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200358 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200359 *
360 * This enables the following ciphersuites (if other requisites are
361 * enabled as well):
362 * TLS_RSA_WITH_AES_128_CBC_SHA
363 * TLS_RSA_WITH_AES_256_CBC_SHA
364 * TLS_RSA_WITH_AES_128_CBC_SHA256
365 * TLS_RSA_WITH_AES_256_CBC_SHA256
366 * TLS_RSA_WITH_AES_128_GCM_SHA256
367 * TLS_RSA_WITH_AES_256_GCM_SHA384
368 * TLS_RSA_WITH_RC4_128_MD5
369 * TLS_RSA_WITH_RC4_128_SHA
370 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
371 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
372 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
373 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
374 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
375 */
376#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
377
378/**
379 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
380 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200381 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200382 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200383 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200384 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200385 *
386 * This enables the following ciphersuites (if other requisites are
387 * enabled as well):
388 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
389 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
390 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
391 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
392 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
393 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
394 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
395 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
396 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
397 */
398#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
399
400/**
401 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
402 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200403 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200404 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200405 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200406 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200407 *
408 * This enables the following ciphersuites (if other requisites are
409 * enabled as well):
410 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
411 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
412 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
413 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
414 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
415 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
416 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
417 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
418 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
419 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
420 */
421#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
422
423/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200424 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
425 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200426 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200427 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200428 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200429 *
430 * This enables the following ciphersuites (if other requisites are
431 * enabled as well):
432 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
433 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
434 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
435 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
436 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
437 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
438 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
439 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
440 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
441 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
442 */
443#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
444
445/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200446 * \def POLARSSL_ERROR_STRERROR_BC
447 *
448 * Make available the backward compatible error_strerror() next to the
449 * current polarssl_strerror().
450 *
451 * Disable if you run into name conflicts and want to really remove the
452 * error_strerror()
453 */
454#define POLARSSL_ERROR_STRERROR_BC
455
456/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100457 * \def POLARSSL_ERROR_STRERROR_DUMMY
458 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200459 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100460 * third party libraries easier.
461 *
462 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200463 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100464 */
465#define POLARSSL_ERROR_STRERROR_DUMMY
466
467/**
Paul Bakker15566e42011-04-24 21:19:15 +0000468 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000469 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200470 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200471 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200472 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000473 */
Paul Bakker15566e42011-04-24 21:19:15 +0000474#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000475
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000476/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000477 * \def POLARSSL_FS_IO
478 *
479 * Enable functions that use the filesystem.
480 */
481#define POLARSSL_FS_IO
482
483/**
Paul Bakker43655f42011-12-15 20:11:16 +0000484 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
485 *
486 * Do not add default entropy sources. These are the platform specific,
487 * hardclock and HAVEGE based poll functions.
488 *
489 * This is useful to have more control over the added entropy sources in an
490 * application.
491 *
492 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000493 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200494//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000495
496/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000497 * \def POLARSSL_NO_PLATFORM_ENTROPY
498 *
499 * Do not use built-in platform entropy functions.
500 * This is useful if your platform does not support
501 * standards like the /dev/urandom or Windows CryptoAPI.
502 *
503 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000504 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200505//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000506
507/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200508 * \def POLARSSL_MEMORY_DEBUG
509 *
510 * Enable debugging of buffer allocator memory issues. Automatically prints
511 * (to stderr) all (fatal) messages on memory allocation issues. Enables
512 * function for 'debug output' of allocated memory.
513 *
514 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
515 * fprintf()
516 *
517 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200518 */
519//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200520
521/**
522 * \def POLARSSL_MEMORY_BACKTRACE
523 *
524 * Include backtrace information with each allocated block.
525 *
526 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
527 * GLIBC-compatible backtrace() an backtrace_symbols() support
528 *
529 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200530 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200531//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200532
533/**
Paul Bakker48377d92013-08-30 12:06:24 +0200534 * \def POLARSSL_PKCS1_V15
535 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200536 * Enable support for PKCS#1 v1.5 encoding.
537 *
Paul Bakker48377d92013-08-30 12:06:24 +0200538 * Requires: POLARSSL_RSA_C
539 *
Paul Bakker48377d92013-08-30 12:06:24 +0200540 * This enables support for PKCS#1 v1.5 operations.
541 */
542#define POLARSSL_PKCS1_V15
543
544/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000545 * \def POLARSSL_PKCS1_V21
546 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200547 * Enable support for PKCS#1 v2.1 encoding.
548 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000549 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
550 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000551 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
552 */
553#define POLARSSL_PKCS1_V21
554
555/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000556 * \def POLARSSL_RSA_NO_CRT
557 *
558 * Do not use the Chinese Remainder Theorem for the RSA private operation.
559 *
560 * Uncomment this macro to disable the use of CRT in RSA.
561 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000562 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200563//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000564
565/**
566 * \def POLARSSL_SELF_TEST
567 *
568 * Enable the checkup functions (*_self_test).
569 */
570#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000571
572/**
Paul Bakker40865c82013-01-31 17:13:13 +0100573 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
574 *
575 * Enable sending of alert messages in case of encountered errors as per RFC.
576 * If you choose not to send the alert messages, PolarSSL can still communicate
577 * with other servers, only debugging of failures is harder.
578 *
579 * The advantage of not sending alert messages, is that no information is given
580 * about reasons for failures thus preventing adversaries of gaining intel.
581 *
582 * Enable sending of all alert messages
583 */
584#define POLARSSL_SSL_ALERT_MESSAGES
585
586/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100587 * \def POLARSSL_SSL_DEBUG_ALL
588 *
589 * Enable the debug messages in SSL module for all issues.
590 * Debug messages have been disabled in some places to prevent timing
591 * attacks due to (unbalanced) debugging function calls.
592 *
593 * If you need all error reporting you should enable this during debugging,
594 * but remove this for production servers that should log as well.
595 *
596 * Uncomment this macro to report all debug messages on errors introducing
597 * a timing side-channel.
598 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100599 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200600//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100601
602/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000603 * \def POLARSSL_SSL_HW_RECORD_ACCEL
604 *
605 * Enable hooking functions in SSL module for hardware acceleration of
606 * individual records.
607 *
608 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000609 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200610//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000611
612/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100613 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
614 *
615 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200616 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100617 *
618 * Comment this macro to disable support for SSLv2 Client Hello messages.
619 */
620#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
621
622/**
Paul Bakker05decb22013-08-15 13:33:48 +0200623 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
624 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200625 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200626 *
627 * Comment this macro to disable support for the max_fragment_length extension
628 */
629#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
630
631/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200632 * \def POLARSSL_SSL_PROTO_SSL3
633 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200634 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200635 *
636 * Requires: POLARSSL_MD5_C
637 * POLARSSL_SHA1_C
638 *
639 * Comment this macro to disable support for SSL 3.0
640 */
641#define POLARSSL_SSL_PROTO_SSL3
642
643/**
644 * \def POLARSSL_SSL_PROTO_TLS1
645 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200646 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200647 *
648 * Requires: POLARSSL_MD5_C
649 * POLARSSL_SHA1_C
650 *
651 * Comment this macro to disable support for TLS 1.0
652 */
653#define POLARSSL_SSL_PROTO_TLS1
654
655/**
656 * \def POLARSSL_SSL_PROTO_TLS1_1
657 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200658 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200659 *
660 * Requires: POLARSSL_MD5_C
661 * POLARSSL_SHA1_C
662 *
663 * Comment this macro to disable support for TLS 1.1
664 */
665#define POLARSSL_SSL_PROTO_TLS1_1
666
667/**
668 * \def POLARSSL_SSL_PROTO_TLS1_2
669 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200670 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200671 *
672 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
673 * (Depends on ciphersuites)
674 *
675 * Comment this macro to disable support for TLS 1.2
676 */
677#define POLARSSL_SSL_PROTO_TLS1_2
678
679/**
Paul Bakkera503a632013-08-14 13:48:06 +0200680 * \def POLARSSL_SSL_SESSION_TICKETS
681 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200682 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200683 *
684 * Requires: POLARSSL_AES_C
685 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200686 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200687 *
688 * Comment this macro to disable support for SSL session tickets
689 */
690#define POLARSSL_SSL_SESSION_TICKETS
691
692/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200693 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
694 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200695 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200696 *
697 * Comment this macro to disable support for server name indication in SSL
698 */
699#define POLARSSL_SSL_SERVER_NAME_INDICATION
700
701/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200702 * \def POLARSSL_SSL_TRUNCATED_HMAC
703 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200704 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200705 *
706 * Comment this macro to disable support for truncated HMAC in SSL
707 */
708#define POLARSSL_SSL_TRUNCATED_HMAC
709
710/**
Paul Bakker2466d932013-09-28 14:40:38 +0200711 * \def POLARSSL_THREADING_ALT
712 *
713 * Provide your own alternate threading implementation.
714 *
715 * Requires: POLARSSL_THREADING_C
716 *
717 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200718 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200719//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200720
721/**
722 * \def POLARSSL_THREADING_DUMMY
723 *
724 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200725 * Warning: If you use this, all claims of thread-safety in the documentation
726 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200727 *
728 * Requires: POLARSSL_THREADING_C
729 *
730 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200731 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200732//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200733
734/**
735 * \def POLARSSL_THREADING_PTHREAD
736 *
737 * Enable the pthread wrapper layer for the threading layer.
738 *
739 * Requires: POLARSSL_THREADING_C
740 *
741 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200742 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200743//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200744
745/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200746 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
747 *
748 * If set, the X509 parser will not break-off when parsing an X509 certificate
749 * and encountering an extension in a v1 or v2 certificate.
750 *
751 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200752 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200753//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200754
755/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000756 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
757 *
758 * If set, the X509 parser will not break-off when parsing an X509 certificate
759 * and encountering an unknown critical extension.
760 *
761 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000762 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200763//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000764
765/**
766 * \def POLARSSL_ZLIB_SUPPORT
767 *
768 * If set, the SSL/TLS module uses ZLIB to support compression and
769 * decompression of packet data.
770 *
771 * Used in: library/ssl_tls.c
772 * library/ssl_cli.c
773 * library/ssl_srv.c
774 *
775 * This feature requires zlib library and headers to be present.
776 *
777 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000778 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200779//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200780/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000781
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000782/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000783 * \name SECTION: PolarSSL modules
784 *
785 * This section enables or disables entire modules in PolarSSL
786 * \{
787 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000788
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000789/**
790 * \def POLARSSL_AES_C
791 *
792 * Enable the AES block cipher.
793 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000794 * Module: library/aes.c
795 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000796 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000797 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000798 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000799 * This module enables the following ciphersuites (if other requisites are
800 * enabled as well):
801 * TLS_RSA_WITH_AES_128_CBC_SHA
802 * TLS_RSA_WITH_AES_256_CBC_SHA
803 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
804 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
805 * TLS_RSA_WITH_AES_128_CBC_SHA256
806 * TLS_RSA_WITH_AES_256_CBC_SHA256
807 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
808 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
809 * TLS_RSA_WITH_AES_128_GCM_SHA256
810 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100811 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
812 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200813 * TLS_PSK_WITH_AES_128_CBC_SHA
814 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100815 *
Paul Bakkercff68422013-09-15 20:43:33 +0200816 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000817 */
Paul Bakker40e46942009-01-03 21:51:57 +0000818#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000819
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000820/**
821 * \def POLARSSL_ARC4_C
822 *
823 * Enable the ARCFOUR stream cipher.
824 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000825 * Module: library/arc4.c
826 * Caller: library/ssl_tls.c
827 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100828 * This module enables the following ciphersuites (if other requisites are
829 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000830 * TLS_RSA_WITH_RC4_128_MD5
831 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100832 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200833 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000834 */
Paul Bakker40e46942009-01-03 21:51:57 +0000835#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000836
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000837/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000838 * \def POLARSSL_ASN1_PARSE_C
839 *
840 * Enable the generic ASN1 parser.
841 *
842 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200843 * Caller: library/x509.c
844 * library/dhm.c
845 * library/pkcs12.c
846 * library/pkcs5.c
847 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000848 */
849#define POLARSSL_ASN1_PARSE_C
850
851/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000852 * \def POLARSSL_ASN1_WRITE_C
853 *
854 * Enable the generic ASN1 writer.
855 *
856 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200857 * Caller: library/ecdsa.c
858 * library/pkwrite.c
859 * library/x509_create.c
860 * library/x509write_crt.c
861 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000862 */
863#define POLARSSL_ASN1_WRITE_C
864
865/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000866 * \def POLARSSL_BASE64_C
867 *
868 * Enable the Base64 module.
869 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000870 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000871 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000872 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000873 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000874 */
Paul Bakker40e46942009-01-03 21:51:57 +0000875#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000876
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000877/**
878 * \def POLARSSL_BIGNUM_C
879 *
Paul Bakker9a736322012-11-14 12:39:52 +0000880 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000881 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000882 * Module: library/bignum.c
883 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200884 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000885 * library/rsa.c
886 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000887 *
888 * This module is required for RSA and DHM support.
889 */
Paul Bakker40e46942009-01-03 21:51:57 +0000890#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000891
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000892/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000893 * \def POLARSSL_BLOWFISH_C
894 *
895 * Enable the Blowfish block cipher.
896 *
897 * Module: library/blowfish.c
898 */
899#define POLARSSL_BLOWFISH_C
900
901/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000902 * \def POLARSSL_CAMELLIA_C
903 *
904 * Enable the Camellia block cipher.
905 *
Paul Bakker38119b12009-01-10 23:31:23 +0000906 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000907 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000908 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000909 * This module enables the following ciphersuites (if other requisites are
910 * enabled as well):
911 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
912 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
913 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
914 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
915 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
916 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
917 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
918 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000919 */
920#define POLARSSL_CAMELLIA_C
921
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000922/**
923 * \def POLARSSL_CERTS_C
924 *
925 * Enable the test certificates.
926 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000927 * Module: library/certs.c
928 * Caller:
929 *
930 * This module is used for testing (ssl_client/server).
931 */
Paul Bakker40e46942009-01-03 21:51:57 +0000932#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000933
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000934/**
935 * \def POLARSSL_CIPHER_C
936 *
937 * Enable the generic cipher layer.
938 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000939 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200940 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000941 *
942 * Uncomment to enable generic cipher wrappers.
943 */
944#define POLARSSL_CIPHER_C
945
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000946/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000947 * \def POLARSSL_CTR_DRBG_C
948 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200949 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000950 *
951 * Module: library/ctr_drbg.c
952 * Caller:
953 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000954 * Requires: POLARSSL_AES_C
955 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000956 * This module provides the CTR_DRBG AES-256 random number generator.
957 */
958#define POLARSSL_CTR_DRBG_C
959
960/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000961 * \def POLARSSL_DEBUG_C
962 *
963 * Enable the debug functions.
964 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000965 * Module: library/debug.c
966 * Caller: library/ssl_cli.c
967 * library/ssl_srv.c
968 * library/ssl_tls.c
969 *
970 * This module provides debugging functions.
971 */
Paul Bakker40e46942009-01-03 21:51:57 +0000972#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000973
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000974/**
975 * \def POLARSSL_DES_C
976 *
977 * Enable the DES block cipher.
978 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000979 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100980 * Caller: library/pem.c
981 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000982 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000983 * This module enables the following ciphersuites (if other requisites are
984 * enabled as well):
985 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
986 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100987 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200988 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100989 *
Paul Bakkercff68422013-09-15 20:43:33 +0200990 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000991 */
Paul Bakker40e46942009-01-03 21:51:57 +0000992#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000993
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000994/**
995 * \def POLARSSL_DHM_C
996 *
997 * Enable the Diffie-Hellman-Merkle key exchange.
998 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000999 * Module: library/dhm.c
1000 * Caller: library/ssl_cli.c
1001 * library/ssl_srv.c
1002 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001003 * This module enables the following ciphersuites (if other requisites are
1004 * enabled as well):
1005 * TLS_DHE_RSA_WITH_DES_CBC_SHA
1006 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1007 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1008 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1009 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1010 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
1011 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1012 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1013 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1014 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
1015 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1016 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +00001017 */
Paul Bakker40e46942009-01-03 21:51:57 +00001018#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001019
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001020/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001021 * \def POLARSSL_ECDH_C
1022 *
1023 * Enable the elliptic curve Diffie-Hellman library.
1024 *
1025 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001026 * Caller: library/ssl_cli.c
1027 * library/ssl_srv.c
1028 *
1029 * This module enables the following ciphersuites (if other requisites are
1030 * enabled as well):
1031 * TLS_ECDHE_RSA_WITH_NULL_SHA
1032 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
1033 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1034 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1035 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001036 *
1037 * Requires: POLARSSL_ECP_C
1038 */
1039#define POLARSSL_ECDH_C
1040
1041/**
1042 * \def POLARSSL_ECDSA_C
1043 *
1044 * Enable the elliptic curve DSA library.
1045 *
1046 * Module: library/ecdsa.c
1047 * Caller:
1048 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001049 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001050 */
1051#define POLARSSL_ECDSA_C
1052
1053/**
1054 * \def POLARSSL_ECP_C
1055 *
1056 * Enable the elliptic curve over GF(p) library.
1057 *
1058 * Module: library/ecp.c
1059 * Caller: library/ecdh.c
1060 * library/ecdsa.c
1061 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001062 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001063 */
1064#define POLARSSL_ECP_C
1065
1066/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001067 * \def POLARSSL_ENTROPY_C
1068 *
1069 * Enable the platform-specific entropy code.
1070 *
1071 * Module: library/entropy.c
1072 * Caller:
1073 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001074 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001075 *
1076 * This module provides a generic entropy pool
1077 */
1078#define POLARSSL_ENTROPY_C
1079
1080/**
Paul Bakker9d781402011-05-09 16:17:09 +00001081 * \def POLARSSL_ERROR_C
1082 *
1083 * Enable error code to error string conversion.
1084 *
1085 * Module: library/error.c
1086 * Caller:
1087 *
1088 * This module enables err_strerror().
1089 */
1090#define POLARSSL_ERROR_C
1091
1092/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001093 * \def POLARSSL_GCM_C
1094 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001095 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001096 *
1097 * Module: library/gcm.c
1098 *
1099 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001100 *
1101 * This module enables the following ciphersuites (if other requisites are
1102 * enabled as well):
1103 * TLS_RSA_WITH_AES_128_GCM_SHA256
1104 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001105 */
1106#define POLARSSL_GCM_C
1107
1108/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001109 * \def POLARSSL_HAVEGE_C
1110 *
1111 * Enable the HAVEGE random generator.
1112 *
Paul Bakker2a844242013-06-24 13:01:53 +02001113 * Warning: the HAVEGE random generator is not suitable for virtualized
1114 * environments
1115 *
1116 * Warning: the HAVEGE random generator is dependent on timing and specific
1117 * processor traits. It is therefore not advised to use HAVEGE as
1118 * your applications primary random generator or primary entropy pool
1119 * input. As a secondary input to your entropy pool, it IS able add
1120 * the (limited) extra entropy it provides.
1121 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001122 * Module: library/havege.c
1123 * Caller:
1124 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001125 * Requires: POLARSSL_TIMING_C
1126 *
Paul Bakker2a844242013-06-24 13:01:53 +02001127 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001128 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001129//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001130
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001131/**
1132 * \def POLARSSL_MD_C
1133 *
1134 * Enable the generic message digest layer.
1135 *
Paul Bakker17373852011-01-06 14:20:01 +00001136 * Module: library/md.c
1137 * Caller:
1138 *
1139 * Uncomment to enable generic message digest wrappers.
1140 */
1141#define POLARSSL_MD_C
1142
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001143/**
1144 * \def POLARSSL_MD2_C
1145 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001146 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001147 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001148 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001149 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001150 *
1151 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001152 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001153//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001154
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001155/**
1156 * \def POLARSSL_MD4_C
1157 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001158 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001159 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001160 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001161 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001162 *
1163 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001164 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001165//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001166
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001167/**
1168 * \def POLARSSL_MD5_C
1169 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001170 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001171 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001172 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001173 * Caller: library/md.c
1174 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001175 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001176 *
1177 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001178 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001179 */
Paul Bakker40e46942009-01-03 21:51:57 +00001180#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001181
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001182/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001183 * \def POLARSSL_MEMORY_C
1184 *
1185 * Enable the memory allocation layer.
1186 * By default PolarSSL uses the system-provided malloc() and free().
1187 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1188 * are defined and unmodified)
1189 *
1190 * This allows different allocators (self-implemented or provided)
1191 *
1192 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001193 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001194//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001195
1196/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001197 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1198 *
1199 * Enable the buffer allocator implementation that makes use of a (stack)
1200 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1201 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001202 *
1203 * Module: library/memory_buffer_alloc.c
1204 *
1205 * Requires: POLARSSL_MEMORY_C
1206 *
1207 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001208 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001209//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001210
1211/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001212 * \def POLARSSL_NET_C
1213 *
1214 * Enable the TCP/IP networking routines.
1215 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001216 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001217 *
1218 * This module provides TCP/IP networking routines.
1219 */
Paul Bakker40e46942009-01-03 21:51:57 +00001220#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001221
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001222/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001223 * \def POLARSSL_OID_C
1224 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001225 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001226 *
1227 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001228 * Caller: library/asn1write.c
1229 * library/pkcs5.c
1230 * library/pkparse.c
1231 * library/pkwrite.c
1232 * library/rsa.c
1233 * library/x509.c
1234 * library/x509_create.c
1235 * library/x509_crl.c
1236 * library/x509_crt.c
1237 * library/x509_csr.c
1238 * library/x509write_crt.c
1239 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001240 *
1241 * This modules translates between OIDs and internal values.
1242 */
1243#define POLARSSL_OID_C
1244
1245/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001246 * \def POLARSSL_PADLOCK_C
1247 *
1248 * Enable VIA Padlock support on x86.
1249 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001250 * Module: library/padlock.c
1251 * Caller: library/aes.c
1252 *
1253 * This modules adds support for the VIA PadLock on x86.
1254 */
Paul Bakker40e46942009-01-03 21:51:57 +00001255#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001256
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001257/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001258 * \def POLARSSL_PBKDF2_C
1259 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001260 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001261 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001262 *
1263 * Module: library/pbkdf2.c
1264 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001265 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001266 *
1267 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001268 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001269#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001270
1271/**
Paul Bakkercff68422013-09-15 20:43:33 +02001272 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001273 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001274 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001275 *
1276 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001277 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001278 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001279 * library/x509_crl.c
1280 * library/x509_crt.c
1281 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001282 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001283 * Requires: POLARSSL_BASE64_C
1284 *
Paul Bakkercff68422013-09-15 20:43:33 +02001285 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001286 */
Paul Bakkercff68422013-09-15 20:43:33 +02001287#define POLARSSL_PEM_PARSE_C
1288
1289/**
1290 * \def POLARSSL_PEM_WRITE_C
1291 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001292 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001293 *
1294 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001295 * Caller: library/pkwrite.c
1296 * library/x509write_crt.c
1297 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001298 *
1299 * Requires: POLARSSL_BASE64_C
1300 *
1301 * This modules adds support for encoding / writing PEM files.
1302 */
1303#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001304
1305/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001306 * \def POLARSSL_PK_C
1307 *
1308 * Enable the generic public (asymetric) key layer.
1309 *
1310 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001311 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001312 * library/ssl_cli.c
1313 * library/ssl_srv.c
1314 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001315 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1316 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001317 * Uncomment to enable generic public key wrappers.
1318 */
1319#define POLARSSL_PK_C
1320
1321/**
Paul Bakker4606c732013-09-15 17:04:23 +02001322 * \def POLARSSL_PK_PARSE_C
1323 *
1324 * Enable the generic public (asymetric) key parser.
1325 *
1326 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001327 * Caller: library/x509_crt.c
1328 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001329 *
1330 * Requires: POLARSSL_PK_C
1331 *
1332 * Uncomment to enable generic public key parse functions.
1333 */
1334#define POLARSSL_PK_PARSE_C
1335
1336/**
1337 * \def POLARSSL_PK_WRITE_C
1338 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001339 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001340 *
1341 * Module: library/pkwrite.c
1342 * Caller: library/x509write.c
1343 *
1344 * Requires: POLARSSL_PK_C
1345 *
1346 * Uncomment to enable generic public key write functions.
1347 */
1348#define POLARSSL_PK_WRITE_C
1349
1350/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001351 * \def POLARSSL_PKCS5_C
1352 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001353 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001354 *
1355 * Module: library/pkcs5.c
1356 *
1357 * Requires: POLARSSL_MD_C
1358 *
1359 * This module adds support for the PKCS#5 functions.
1360 */
1361#define POLARSSL_PKCS5_C
1362
1363/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001364 * \def POLARSSL_PKCS11_C
1365 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001366 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001367 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001368 * Module: library/pkcs11.c
1369 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001370 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001371 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001372 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001373 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001374 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001375 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001376//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001377
1378/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001379 * \def POLARSSL_PKCS12_C
1380 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001381 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001382 * Adds algorithms for parsing PKCS#8 encrypted private keys
1383 *
1384 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001385 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001386 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001387 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1388 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001389 *
1390 * This module enables PKCS#12 functions.
1391 */
1392#define POLARSSL_PKCS12_C
1393
1394/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001395 * \def POLARSSL_RSA_C
1396 *
1397 * Enable the RSA public-key cryptosystem.
1398 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001399 * Module: library/rsa.c
1400 * Caller: library/ssl_cli.c
1401 * library/ssl_srv.c
1402 * library/ssl_tls.c
1403 * library/x509.c
1404 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001405 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001406 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001407 * This module is required for SSL/TLS and MD5-signed certificates.
1408 */
Paul Bakker40e46942009-01-03 21:51:57 +00001409#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001410
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001411/**
1412 * \def POLARSSL_SHA1_C
1413 *
1414 * Enable the SHA1 cryptographic hash algorithm.
1415 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001416 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001417 * Caller: library/md.c
1418 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001419 * library/ssl_srv.c
1420 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001421 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001422 *
1423 * This module is required for SSL/TLS and SHA1-signed certificates.
1424 */
Paul Bakker40e46942009-01-03 21:51:57 +00001425#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001426
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001427/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001428 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001429 *
1430 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001431 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001432 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001433 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001434 * Caller: library/entropy.c
1435 * library/md.c
1436 * library/ssl_cli.c
1437 * library/ssl_srv.c
1438 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001439 *
1440 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001441 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001442 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001443#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001444
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001445/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001446 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001447 *
1448 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001449 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001450 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001451 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001452 * Caller: library/entropy.c
1453 * library/md.c
1454 * library/ssl_cli.c
1455 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001456 *
1457 * This module adds support for SHA-384 and SHA-512.
1458 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001459#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001460
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001461/**
Paul Bakker0a597072012-09-25 21:55:46 +00001462 * \def POLARSSL_SSL_CACHE_C
1463 *
1464 * Enable simple SSL cache implementation.
1465 *
1466 * Module: library/ssl_cache.c
1467 * Caller:
1468 *
1469 * Requires: POLARSSL_SSL_CACHE_C
1470 */
1471#define POLARSSL_SSL_CACHE_C
1472
1473/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001474 * \def POLARSSL_SSL_CLI_C
1475 *
1476 * Enable the SSL/TLS client code.
1477 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001478 * Module: library/ssl_cli.c
1479 * Caller:
1480 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001481 * Requires: POLARSSL_SSL_TLS_C
1482 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001483 * This module is required for SSL/TLS client support.
1484 */
Paul Bakker40e46942009-01-03 21:51:57 +00001485#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001486
Paul Bakker9a736322012-11-14 12:39:52 +00001487/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001488 * \def POLARSSL_SSL_SRV_C
1489 *
1490 * Enable the SSL/TLS server code.
1491 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001492 * Module: library/ssl_srv.c
1493 * Caller:
1494 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001495 * Requires: POLARSSL_SSL_TLS_C
1496 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001497 * This module is required for SSL/TLS server support.
1498 */
Paul Bakker40e46942009-01-03 21:51:57 +00001499#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001500
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001501/**
1502 * \def POLARSSL_SSL_TLS_C
1503 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001504 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001505 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001506 * Module: library/ssl_tls.c
1507 * Caller: library/ssl_cli.c
1508 * library/ssl_srv.c
1509 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001510 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001511 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001512 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001513 * This module is required for SSL/TLS.
1514 */
Paul Bakker40e46942009-01-03 21:51:57 +00001515#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001516
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001517/**
Paul Bakker2466d932013-09-28 14:40:38 +02001518 * \def POLARSSL_THREADING_C
1519 *
1520 * Enable the threading abstraction layer.
1521 * By default PolarSSL assumes it is used in a non-threaded environment or that
1522 * contexts are not shared between threads. If you do intend to use contexts
1523 * between threads, you will need to enable this layer to prevent race
1524 * conditions.
1525 *
1526 * Module: library/threading.c
1527 *
1528 * This allows different threading implementations (self-implemented or
1529 * provided).
1530 *
1531 * You will have to enable either POLARSSL_THREADING_ALT,
1532 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1533 *
1534 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001535 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001536//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001537
1538/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001539 * \def POLARSSL_TIMING_C
1540 *
1541 * Enable the portable timing interface.
1542 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001543 * Module: library/timing.c
1544 * Caller: library/havege.c
1545 *
1546 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001547 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001548#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001549
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001550/**
1551 * \def POLARSSL_VERSION_C
1552 *
1553 * Enable run-time version information.
1554 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001555 * Module: library/version.c
1556 *
1557 * This module provides run-time version information.
1558 */
1559#define POLARSSL_VERSION_C
1560
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001561/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001562 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001563 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001564 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001565 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001566 * Module: library/x509.c
1567 * Caller: library/x509_crl.c
1568 * library/x509_crt.c
1569 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001570 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001571 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001572 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001573 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001574 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001575 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001576#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001577
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001578/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001579 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001580 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001581 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001582 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001583 * Module: library/x509_crt.c
1584 * Caller: library/ssl_cli.c
1585 * library/ssl_srv.c
1586 * library/ssl_tls.c
1587 *
1588 * Requires: POLARSSL_X509_USE_C
1589 *
1590 * This module is required for X.509 certificate parsing.
1591 */
1592#define POLARSSL_X509_CRT_PARSE_C
1593
1594/**
1595 * \def POLARSSL_X509_CRL_PARSE_C
1596 *
1597 * Enable X.509 CRL parsing.
1598 *
1599 * Module: library/x509_crl.c
1600 * Caller: library/x509_crt.c
1601 *
1602 * Requires: POLARSSL_X509_USE_C
1603 *
1604 * This module is required for X.509 CRL parsing.
1605 */
1606#define POLARSSL_X509_CRL_PARSE_C
1607
1608/**
1609 * \def POLARSSL_X509_CSR_PARSE_C
1610 *
1611 * Enable X.509 Certificate Signing Request (CSR) parsing.
1612 *
1613 * Module: library/x509_csr.c
1614 * Caller: library/x509_crt_write.c
1615 *
1616 * Requires: POLARSSL_X509_USE_C
1617 *
1618 * This module is used for reading X.509 certificate request.
1619 */
1620#define POLARSSL_X509_CSR_PARSE_C
1621
1622/**
1623 * \def POLARSSL_X509_CREATE_C
1624 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001625 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001626 *
1627 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001628 *
Paul Bakker4606c732013-09-15 17:04:23 +02001629 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001630 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001631 * This module is the basis for creating X.509 certificates and CSRs.
1632 */
1633#define POLARSSL_X509_CREATE_C
1634
1635/**
1636 * \def POLARSSL_X509_CRT_WRITE_C
1637 *
1638 * Enable creating X.509 certificates.
1639 *
1640 * Module: library/x509_crt_write.c
1641 *
1642 * Requires: POLARSSL_CREATE_C
1643 *
1644 * This module is required for X.509 certificate creation.
1645 */
1646#define POLARSSL_X509_CRT_WRITE_C
1647
1648/**
1649 * \def POLARSSL_X509_CSR_WRITE_C
1650 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001651 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001652 *
1653 * Module: library/x509_csr_write.c
1654 *
1655 * Requires: POLARSSL_CREATE_C
1656 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001657 * This module is required for X.509 certificate request writing.
1658 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001659#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001660
1661/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001662 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001663 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001664 * Enable the XTEA block cipher.
1665 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001666 * Module: library/xtea.c
1667 * Caller:
1668 */
1669#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001670
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001671/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001672
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001673/**
1674 * \name SECTION: Module configuration options
1675 *
1676 * This section allows for the setting of module specific sizes and
1677 * configuration options. The default values are already present in the
1678 * relevant header files and should suffice for the regular use cases.
1679 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1680 * only if you have a good reason and know the consequences.
1681 *
1682 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1683 * header file take precedence.
1684 *
1685 * Please check the respective header file for documentation on these
1686 * parameters (to prevent duplicate documentation).
1687 *
1688 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1689 * \{
1690 */
1691//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1692
1693#if defined(POLARSSL_CONFIG_OPTIONS)
1694
1695// MPI / BIGNUM options
1696//
1697#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1698#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1699
1700// CTR_DRBG options
1701//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001702#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 +02001703#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1704#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1705#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1706#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1707
1708// Entropy options
1709//
1710#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1711#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1712
Paul Bakker6e339b52013-07-03 13:37:05 +02001713// Memory options
1714#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1715#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1716#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1717
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001718// SSL Cache options
1719//
1720#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1721#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1722
1723// SSL options
1724//
1725#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001726#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001727
1728#endif /* POLARSSL_CONFIG_OPTIONS */
1729
1730/* \} name */
1731
Paul Bakker7ad00f92013-04-18 23:05:25 +02001732/*
1733 * Sanity checks on defines and dependencies
1734 */
1735#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1736#error "POLARSSL_DHM_C defined, but not all prerequisites"
1737#endif
1738
1739#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1740#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1741#endif
1742
1743#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1744#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1745#endif
1746
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001747#if defined(POLARSSL_ECDSA_C) && \
1748 ( !defined(POLARSSL_ECP_C) || \
1749 !defined(POLARSSL_ASN1_PARSE_C) || \
1750 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001751#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1752#endif
1753
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001754#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C) || ( \
1755 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1756 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1757 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1758 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1759 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1760 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1761 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1762 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001763#error "POLARSSL_ECP_C defined, but not all prerequisites"
1764#endif
1765
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001766#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1767 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001768#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1769#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001770#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1771 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1772#error "CTR_DRBG_ENTROPY_LEN value too high"
1773#endif
1774#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1775 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1776#error "CTR_DRBG_ENTROPY_LEN value too high"
1777#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001778
1779#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1780#error "POLARSSL_GCM_C defined, but not all prerequisites"
1781#endif
1782
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001783#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1784#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1785#endif
1786
Paul Bakkere07f41d2013-04-19 09:08:57 +02001787#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1788#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1789#endif
1790
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001791#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1792 !defined(POLARSSL_ECDH_C)
1793#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1794#endif
1795
Paul Bakkere07f41d2013-04-19 09:08:57 +02001796#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1797 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001798 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001799#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1800#endif
1801
1802#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1803 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001804 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001805#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1806#endif
1807
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001808#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1809 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001810 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001811#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1812#endif
1813
Paul Bakkere07f41d2013-04-19 09:08:57 +02001814#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001815 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001816 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001817#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1818#endif
1819
1820#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001821 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001822 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001823#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1824#endif
1825
Paul Bakker6e339b52013-07-03 13:37:05 +02001826#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1827#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1828#endif
1829
Paul Bakker7ad00f92013-04-18 23:05:25 +02001830#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1831#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1832#endif
1833
Paul Bakkercff68422013-09-15 20:43:33 +02001834#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1835#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1836#endif
1837
1838#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1839#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001840#endif
1841
Paul Bakker4606c732013-09-15 17:04:23 +02001842#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1843#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1844#endif
1845
1846#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1847#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1848#endif
1849
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001850#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001851#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1852#endif
1853
1854#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1855 !defined(POLARSSL_OID_C) )
1856#error "POLARSSL_RSA_C defined, but not all prerequisites"
1857#endif
1858
1859#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1860#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1861#endif
1862
Paul Bakker577e0062013-08-28 11:57:20 +02001863#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001864 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001865#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1866#endif
1867
1868#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1869#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1870#endif
1871
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001872#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1873 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1874 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1875#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1876#endif
1877
1878#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1879 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1880#error "Illegal protocol selection"
1881#endif
1882
1883#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1884 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1885#error "Illegal protocol selection"
1886#endif
1887
1888#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1889 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1890 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1891#error "Illegal protocol selection"
1892#endif
1893
Paul Bakker59da0a42013-08-19 13:27:17 +02001894#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001895 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1896 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001897#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1898#endif
1899
Paul Bakker2466d932013-09-28 14:40:38 +02001900#if defined(POLARSSL_THREADING_DUMMY)
1901#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1902#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1903#endif
1904#define POLARSSL_THREADING_IMPL
1905#endif
1906
1907#if defined(POLARSSL_THREADING_PTHREAD)
1908#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1909#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
1910#endif
1911#define POLARSSL_THREADING_IMPL
1912#endif
1913
1914#if defined(POLARSSL_THREADING_ALT)
1915#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1916#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
1917#endif
1918#define POLARSSL_THREADING_IMPL
1919#endif
1920
1921#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
1922#error "POLARSSL_THREADING_C defined, single threading implementation required"
1923#endif
1924#undef POLARSSL_THREADING_IMPL
1925
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001926#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001927 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001928 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001929#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001930#endif
1931
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001932#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1933 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1934 !defined(POLARSSL_PK_WRITE_C) )
1935#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1936#endif
1937
1938#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1939#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1940#endif
1941
1942#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1943#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1944#endif
1945
1946#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1947#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1948#endif
1949
1950#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1951#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1952#endif
1953
1954#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1955#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001956#endif
1957
Paul Bakker5121ce52009-01-03 21:22:43 +00001958#endif /* config.h */