blob: cff57418553798b8ae0f8d994c31e7778a112e4f [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 Bakkerdefc0ca2014-02-04 17:30:24 +01006 * Copyright (C) 2006-2014, 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/**
97 * \def POLARSSL_HAVE_TIME
98 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020099 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200100 *
101 * Comment if your system does not support time functions
102 */
103#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100104
105/**
106 * \def POLARSSL_HAVE_IPV6
107 *
108 * System supports the basic socket interface for IPv6 (RFC 3493),
Manuel Pégourié-Gonnard767f02c2013-12-13 16:23:39 +0100109 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100110 *
Manuel Pégourié-Gonnard13211352013-12-17 17:38:55 +0100111 * Note: on Windows/MingW, XP or higher is required.
112 *
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100113 * Comment if your system does not support the IPv6 socket interface
114 */
115#define POLARSSL_HAVE_IPV6
Paul Bakker747a83a2014-02-01 22:50:07 +0100116
117/**
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100118 * \def POLARSSL_PLATFORM_MEMORY
119 *
120 * Enable the memory allocation layer.
121 *
122 * By default PolarSSL uses the system-provided malloc() and free().
123 * This allows different allocators (self-implemented or provided) to be
124 * provided to the platform abstraction layer.
125 *
126 * Enabling POLARSSL_PLATFORM_MEMORY will provide "platform_set_malloc_free()"
127 * to allow you to set an alternative malloc() and free() function pointer.
128 *
129 * Requires: POLARSSL_PLATFORM_C
130 *
131 * Enable this layer to allow use of alternative memory allocators.
132 */
133//#define POLARSSL_PLATFORM_MEMORY
134
135/**
Paul Bakker747a83a2014-02-01 22:50:07 +0100136 * \def POLARSSL_PLATFORM_XXX_ALT
137 *
138 * Uncomment a macro to let PolarSSL support the function in the platform
139 * abstraction layer.
140 *
141 * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, PolarSSL will
142 * provide a function "platform_set_printf()" that allows you to set an
143 * alternative printf function pointer.
144 *
145 * All these define require POLARSSL_PLATFORM_C to be defined!
146 *
147 * Uncomment a macro to enable alternate implementation of specific base
148 * platform function
149 */
150//#define POLARSSL_PLATFORM_PRINTF_ALT
151//#define POLARSSL_PLATFORM_FPRINTF_ALT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200152/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000153
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000154/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000155 * \name SECTION: PolarSSL feature support
156 *
157 * This section sets support for features that are or are not needed
158 * within the modules that are enabled.
159 * \{
160 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000161
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000162/**
Paul Bakker90995b52013-06-24 19:20:35 +0200163 * \def POLARSSL_XXX_ALT
164 *
165 * Uncomment a macro to let PolarSSL use your alternate core implementation of
166 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
167 * implementations). Keep in mind that the function prototypes should remain
168 * the same.
169 *
170 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
171 * provide the "struct aes_context" definition and omit the base function
172 * declarations and implementations. "aes_alt.h" will be included from
173 * "aes.h" to include the new function definitions.
174 *
175 * Uncomment a macro to enable alternate implementation for core algorithm
176 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200177 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200178//#define POLARSSL_AES_ALT
179//#define POLARSSL_ARC4_ALT
180//#define POLARSSL_BLOWFISH_ALT
181//#define POLARSSL_CAMELLIA_ALT
182//#define POLARSSL_DES_ALT
183//#define POLARSSL_XTEA_ALT
184//#define POLARSSL_MD2_ALT
185//#define POLARSSL_MD4_ALT
186//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100187//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200188//#define POLARSSL_SHA1_ALT
189//#define POLARSSL_SHA256_ALT
190//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200191
192/**
Manuel Pégourié-Gonnardb1d4eb12014-01-22 10:12:57 +0100193 * \def POLARSSL_RSASSA_PSS_CERTIFICATES
194 *
195 * Enable parsing and verification of X.509 certificates and CRLs signed with
196 * RSASSA-PSS.
197 *
198 * This is disabled by default since it breaks binary compatibility with the
199 * 1.3.x line. If you choose to enable it, you will need to rebuild your
200 * application against the new header files, relinking will not be enough.
201 *
202 * TODO: actually disable it when done working on this branch ,)
203 *
204 * Uncomment this macro to allow using RSASSA-PSS in certificates.
205 */
206#define POLARSSL_RSASSA_PSS_CERTIFICATES
207
208/**
Paul Bakker15566e42011-04-24 21:19:15 +0000209 * \def POLARSSL_AES_ROM_TABLES
210 *
211 * Store the AES tables in ROM.
212 *
213 * Uncomment this macro to store the AES tables in ROM.
214 *
Paul Bakker15566e42011-04-24 21:19:15 +0000215 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200216//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000217
218/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200219 * \def POLARSSL_CIPHER_MODE_CBC
220 *
221 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
222 */
223#define POLARSSL_CIPHER_MODE_CBC
224
225/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000226 * \def POLARSSL_CIPHER_MODE_CFB
227 *
228 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
229 */
230#define POLARSSL_CIPHER_MODE_CFB
231
232/**
233 * \def POLARSSL_CIPHER_MODE_CTR
234 *
235 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
236 */
237#define POLARSSL_CIPHER_MODE_CTR
238
239/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000240 * \def POLARSSL_CIPHER_NULL_CIPHER
241 *
242 * Enable NULL cipher.
243 * Warning: Only do so when you know what you are doing. This allows for
244 * encryption or channels without any security!
245 *
246 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
247 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100248 * TLS_ECDH_ECDSA_WITH_NULL_SHA
249 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200250 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100251 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200252 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200253 * TLS_ECDHE_PSK_WITH_NULL_SHA256
254 * TLS_ECDHE_PSK_WITH_NULL_SHA
255 * TLS_DHE_PSK_WITH_NULL_SHA384
256 * TLS_DHE_PSK_WITH_NULL_SHA256
257 * TLS_DHE_PSK_WITH_NULL_SHA
258 * TLS_RSA_WITH_NULL_SHA256
259 * TLS_RSA_WITH_NULL_SHA
260 * TLS_RSA_WITH_NULL_MD5
261 * TLS_RSA_PSK_WITH_NULL_SHA384
262 * TLS_RSA_PSK_WITH_NULL_SHA256
263 * TLS_RSA_PSK_WITH_NULL_SHA
264 * TLS_PSK_WITH_NULL_SHA384
265 * TLS_PSK_WITH_NULL_SHA256
266 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000267 *
268 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200269#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000270 */
271
272/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200273 * \def POLARSSL_CIPHER_PADDING_XXX
274 *
275 * Uncomment or comment macros to add support for specific padding modes
276 * in the cipher layer with cipher modes that support padding (e.g. CBC)
277 *
278 * If you disable all padding modes, only full blocks can be used with CBC.
279 *
280 * Enable padding modes in the cipher layer.
281 */
282#define POLARSSL_CIPHER_PADDING_PKCS7
283#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
284#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
285#define POLARSSL_CIPHER_PADDING_ZEROS
286
287/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000288 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
289 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200290 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000291 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000292 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000293 *
294 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000295 * TLS_RSA_WITH_DES_CBC_SHA
296 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000297 *
298 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200299#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000300 */
301
302/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200303 * \def POLARSSL_ECP_XXXX_ENABLED
304 *
305 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200306 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200307 *
308 * Comment macros to disable the curve and functions for it
309 */
310#define POLARSSL_ECP_DP_SECP192R1_ENABLED
311#define POLARSSL_ECP_DP_SECP224R1_ENABLED
312#define POLARSSL_ECP_DP_SECP256R1_ENABLED
313#define POLARSSL_ECP_DP_SECP384R1_ENABLED
314#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100315#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100316#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100317#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200318#define POLARSSL_ECP_DP_BP256R1_ENABLED
319#define POLARSSL_ECP_DP_BP384R1_ENABLED
320#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100321//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
322#define POLARSSL_ECP_DP_M255_ENABLED
323//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
324//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200325
326/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200327 * \def POLARSSL_ECP_NIST_OPTIM
328 *
329 * Enable specific 'modulo p' routines for each NIST prime.
330 * Depending on the prime and architecture, makes operations 4 to 8 times
331 * faster on the corresponding curve.
332 *
333 * Comment this macro to disable NIST curves optimisation.
334 */
335#define POLARSSL_ECP_NIST_OPTIM
336
337/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100338 * \def POLARSSL_ECDSA_DETERMINISTIC
339 *
340 * Enable deterministic ECDSA (RFC 6979).
341 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
342 * may result in a compromise of the long-term signing key. This is avoided by
343 * the deterministic variant.
344 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100345 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100346 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100347 * Comment this macro to disable deterministic ECDSA.
348 */
349#define POLARSSL_ECDSA_DETERMINISTIC
350
351/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200352 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
353 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200354 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200355 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200356 * This enables the following ciphersuites (if other requisites are
357 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200358 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200359 * TLS_PSK_WITH_AES_256_CBC_SHA384
360 * TLS_PSK_WITH_AES_256_CBC_SHA
361 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
362 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
363 * TLS_PSK_WITH_AES_128_GCM_SHA256
364 * TLS_PSK_WITH_AES_128_CBC_SHA256
365 * TLS_PSK_WITH_AES_128_CBC_SHA
366 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
367 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
368 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
369 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200370 */
371#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
372
373/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200374 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
375 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200376 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200377 *
378 * Requires: POLARSSL_DHM_C
379 *
380 * This enables the following ciphersuites (if other requisites are
381 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200382 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200383 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
384 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
385 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
386 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
387 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
388 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
389 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
390 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
391 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
392 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
393 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200394 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200395#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200396
397/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200398 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
399 *
400 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
401 *
402 * Requires: POLARSSL_ECDH_C
403 *
404 * This enables the following ciphersuites (if other requisites are
405 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200406 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200407 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200408 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200409 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
410 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
411 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
412 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
413 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200414 */
415#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
416
417/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200418 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
419 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200420 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200421 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200422 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200423 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200424 *
425 * This enables the following ciphersuites (if other requisites are
426 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200427 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200428 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
429 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
430 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
431 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
432 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
433 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
434 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
435 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
436 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
437 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
438 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200439 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200440#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200441
442/**
443 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
444 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200445 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200446 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200447 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200448 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200449 *
450 * This enables the following ciphersuites (if other requisites are
451 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200452 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200453 * TLS_RSA_WITH_AES_256_CBC_SHA256
454 * TLS_RSA_WITH_AES_256_CBC_SHA
455 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200456 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200457 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
458 * TLS_RSA_WITH_AES_128_GCM_SHA256
459 * TLS_RSA_WITH_AES_128_CBC_SHA256
460 * TLS_RSA_WITH_AES_128_CBC_SHA
461 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
462 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
463 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200464 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200465 * TLS_RSA_WITH_RC4_128_SHA
466 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200467 */
468#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
469
470/**
471 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
472 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200473 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200474 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200475 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200476 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200477 *
478 * This enables the following ciphersuites (if other requisites are
479 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200480 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200481 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200482 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
483 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200484 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200485 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
486 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
487 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
488 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
489 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
490 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
491 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200492 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
493 */
494#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
495
496/**
497 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
498 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200499 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200500 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200501 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200502 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200503 *
504 * This enables the following ciphersuites (if other requisites are
505 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200506 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200507 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
508 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
509 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200510 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200511 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
512 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
513 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
514 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
515 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
516 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
517 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200518 */
519#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
520
521/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200522 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
523 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200524 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200525 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200526 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200527 *
528 * This enables the following ciphersuites (if other requisites are
529 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200530 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
531 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
532 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
533 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
534 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
535 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
536 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
537 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
538 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
539 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
540 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
541 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200542 */
543#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
544
545/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100546 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
547 *
548 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
549 *
550 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
551 *
552 * This enables the following ciphersuites (if other requisites are
553 * enabled as well):
554 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
555 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
556 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
557 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
558 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
559 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
560 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
561 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
562 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
563 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
564 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
565 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
566 */
567#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
568
569/**
570 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
571 *
572 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
573 *
574 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
575 *
576 * This enables the following ciphersuites (if other requisites are
577 * enabled as well):
578 * TLS_ECDH_RSA_WITH_RC4_128_SHA
579 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
580 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
581 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
582 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
583 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
584 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
585 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
586 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
587 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
588 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
589 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
590 */
591#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
592
593/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200594 * \def POLARSSL_ERROR_STRERROR_BC
595 *
596 * Make available the backward compatible error_strerror() next to the
597 * current polarssl_strerror().
598 *
599 * Disable if you run into name conflicts and want to really remove the
600 * error_strerror()
601 */
602#define POLARSSL_ERROR_STRERROR_BC
603
604/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100605 * \def POLARSSL_ERROR_STRERROR_DUMMY
606 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200607 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100608 * third party libraries easier.
609 *
610 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200611 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100612 */
613#define POLARSSL_ERROR_STRERROR_DUMMY
614
615/**
Paul Bakker15566e42011-04-24 21:19:15 +0000616 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000617 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200618 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200619 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200620 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000621 */
Paul Bakker15566e42011-04-24 21:19:15 +0000622#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000623
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000624/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000625 * \def POLARSSL_FS_IO
626 *
627 * Enable functions that use the filesystem.
628 */
629#define POLARSSL_FS_IO
630
631/**
Paul Bakker43655f42011-12-15 20:11:16 +0000632 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
633 *
634 * Do not add default entropy sources. These are the platform specific,
635 * hardclock and HAVEGE based poll functions.
636 *
637 * This is useful to have more control over the added entropy sources in an
638 * application.
639 *
640 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000641 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200642//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000643
644/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000645 * \def POLARSSL_NO_PLATFORM_ENTROPY
646 *
647 * Do not use built-in platform entropy functions.
648 * This is useful if your platform does not support
649 * standards like the /dev/urandom or Windows CryptoAPI.
650 *
651 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000652 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200653//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000654
655/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200656 * \def POLARSSL_MEMORY_DEBUG
657 *
658 * Enable debugging of buffer allocator memory issues. Automatically prints
659 * (to stderr) all (fatal) messages on memory allocation issues. Enables
660 * function for 'debug output' of allocated memory.
661 *
662 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200663 *
664 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200665 */
666//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200667
668/**
669 * \def POLARSSL_MEMORY_BACKTRACE
670 *
671 * Include backtrace information with each allocated block.
672 *
673 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
674 * GLIBC-compatible backtrace() an backtrace_symbols() support
675 *
676 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200677 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200678//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200679
680/**
Paul Bakker48377d92013-08-30 12:06:24 +0200681 * \def POLARSSL_PKCS1_V15
682 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200683 * Enable support for PKCS#1 v1.5 encoding.
684 *
Paul Bakker48377d92013-08-30 12:06:24 +0200685 * Requires: POLARSSL_RSA_C
686 *
Paul Bakker48377d92013-08-30 12:06:24 +0200687 * This enables support for PKCS#1 v1.5 operations.
688 */
689#define POLARSSL_PKCS1_V15
690
691/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000692 * \def POLARSSL_PKCS1_V21
693 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200694 * Enable support for PKCS#1 v2.1 encoding.
695 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000696 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
697 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000698 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
699 */
700#define POLARSSL_PKCS1_V21
701
702/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000703 * \def POLARSSL_RSA_NO_CRT
704 *
705 * Do not use the Chinese Remainder Theorem for the RSA private operation.
706 *
707 * Uncomment this macro to disable the use of CRT in RSA.
708 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000709 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200710//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000711
712/**
713 * \def POLARSSL_SELF_TEST
714 *
715 * Enable the checkup functions (*_self_test).
716 */
717#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000718
719/**
Paul Bakker40865c82013-01-31 17:13:13 +0100720 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
721 *
722 * Enable sending of alert messages in case of encountered errors as per RFC.
723 * If you choose not to send the alert messages, PolarSSL can still communicate
724 * with other servers, only debugging of failures is harder.
725 *
726 * The advantage of not sending alert messages, is that no information is given
727 * about reasons for failures thus preventing adversaries of gaining intel.
728 *
729 * Enable sending of all alert messages
730 */
731#define POLARSSL_SSL_ALERT_MESSAGES
732
733/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100734 * \def POLARSSL_SSL_DEBUG_ALL
735 *
736 * Enable the debug messages in SSL module for all issues.
737 * Debug messages have been disabled in some places to prevent timing
738 * attacks due to (unbalanced) debugging function calls.
739 *
740 * If you need all error reporting you should enable this during debugging,
741 * but remove this for production servers that should log as well.
742 *
743 * Uncomment this macro to report all debug messages on errors introducing
744 * a timing side-channel.
745 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100746 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200747//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100748
749/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000750 * \def POLARSSL_SSL_HW_RECORD_ACCEL
751 *
752 * Enable hooking functions in SSL module for hardware acceleration of
753 * individual records.
754 *
755 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000756 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200757//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000758
759/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100760 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
761 *
762 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200763 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100764 *
765 * Comment this macro to disable support for SSLv2 Client Hello messages.
766 */
767#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
768
769/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100770 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
771 *
772 * Pick the ciphersuite according to the client's preferences rather than ours
773 * in the SSL Server module (POLARSSL_SSL_SRV_C).
774 *
775 * Uncomment this macro to respect client's ciphersuite order
776 */
777//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
778
779/**
Paul Bakker05decb22013-08-15 13:33:48 +0200780 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
781 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200782 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200783 *
784 * Comment this macro to disable support for the max_fragment_length extension
785 */
786#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
787
788/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200789 * \def POLARSSL_SSL_PROTO_SSL3
790 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200791 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200792 *
793 * Requires: POLARSSL_MD5_C
794 * POLARSSL_SHA1_C
795 *
796 * Comment this macro to disable support for SSL 3.0
797 */
798#define POLARSSL_SSL_PROTO_SSL3
799
800/**
801 * \def POLARSSL_SSL_PROTO_TLS1
802 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200803 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200804 *
805 * Requires: POLARSSL_MD5_C
806 * POLARSSL_SHA1_C
807 *
808 * Comment this macro to disable support for TLS 1.0
809 */
810#define POLARSSL_SSL_PROTO_TLS1
811
812/**
813 * \def POLARSSL_SSL_PROTO_TLS1_1
814 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200815 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200816 *
817 * Requires: POLARSSL_MD5_C
818 * POLARSSL_SHA1_C
819 *
820 * Comment this macro to disable support for TLS 1.1
821 */
822#define POLARSSL_SSL_PROTO_TLS1_1
823
824/**
825 * \def POLARSSL_SSL_PROTO_TLS1_2
826 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200827 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200828 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100829 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200830 * (Depends on ciphersuites)
831 *
832 * Comment this macro to disable support for TLS 1.2
833 */
834#define POLARSSL_SSL_PROTO_TLS1_2
835
836/**
Paul Bakkera503a632013-08-14 13:48:06 +0200837 * \def POLARSSL_SSL_SESSION_TICKETS
838 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200839 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200840 *
841 * Requires: POLARSSL_AES_C
842 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200843 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200844 *
845 * Comment this macro to disable support for SSL session tickets
846 */
847#define POLARSSL_SSL_SESSION_TICKETS
848
849/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200850 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
851 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200852 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200853 *
854 * Comment this macro to disable support for server name indication in SSL
855 */
856#define POLARSSL_SSL_SERVER_NAME_INDICATION
857
858/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200859 * \def POLARSSL_SSL_TRUNCATED_HMAC
860 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200861 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200862 *
863 * Comment this macro to disable support for truncated HMAC in SSL
864 */
865#define POLARSSL_SSL_TRUNCATED_HMAC
866
867/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100868 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100869 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100870 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100871 *
872 * This is disabled by default since it breaks binary compatibility with the
873 * 1.3.x line. If you choose to enable it, you will need to rebuild your
874 * application against the new header files, relinking will not be enough.
875 * It will be enabled by default, or no longer an option, in the 1.4 branch.
876 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100877 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100878 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +0100879//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100880
881/**
Paul Bakker2466d932013-09-28 14:40:38 +0200882 * \def POLARSSL_THREADING_ALT
883 *
884 * Provide your own alternate threading implementation.
885 *
886 * Requires: POLARSSL_THREADING_C
887 *
888 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200889 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200890//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200891
892/**
Paul Bakker2466d932013-09-28 14:40:38 +0200893 * \def POLARSSL_THREADING_PTHREAD
894 *
895 * Enable the pthread wrapper layer for the threading layer.
896 *
897 * Requires: POLARSSL_THREADING_C
898 *
899 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200900 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200901//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200902
903/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200904 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
905 *
906 * If set, the X509 parser will not break-off when parsing an X509 certificate
907 * and encountering an extension in a v1 or v2 certificate.
908 *
909 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200910 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200911//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200912
913/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000914 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
915 *
916 * If set, the X509 parser will not break-off when parsing an X509 certificate
917 * and encountering an unknown critical extension.
918 *
919 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000920 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200921//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000922
923/**
924 * \def POLARSSL_ZLIB_SUPPORT
925 *
926 * If set, the SSL/TLS module uses ZLIB to support compression and
927 * decompression of packet data.
928 *
929 * Used in: library/ssl_tls.c
930 * library/ssl_cli.c
931 * library/ssl_srv.c
932 *
933 * This feature requires zlib library and headers to be present.
934 *
935 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000936 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200937//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200938/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000939
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000940/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000941 * \name SECTION: PolarSSL modules
942 *
943 * This section enables or disables entire modules in PolarSSL
944 * \{
945 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000946
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000947/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +0100948 * \def POLARSSL_AESNI_C
949 *
950 * Enable AES-NI support on x86-64.
951 *
952 * Module: library/aesni.c
953 * Caller: library/aes.c
954 *
955 * Requires: POLARSSL_HAVE_ASM
956 *
957 * This modules adds support for the AES-NI instructions on x86-64
958 */
959#define POLARSSL_AESNI_C
960
961/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000962 * \def POLARSSL_AES_C
963 *
964 * Enable the AES block cipher.
965 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000966 * Module: library/aes.c
967 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000968 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000969 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000970 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000971 * This module enables the following ciphersuites (if other requisites are
972 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100973 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
974 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
975 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
976 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
977 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
978 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
979 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
980 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
981 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
982 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
983 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
984 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200985 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
986 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
987 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
988 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
989 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000990 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200991 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100992 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200993 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
994 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
995 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
996 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
997 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
998 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
999 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1000 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1001 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1002 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1003 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1004 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1005 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1006 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1007 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1008 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1009 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1010 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1011 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1012 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1013 * TLS_RSA_WITH_AES_256_GCM_SHA384
1014 * TLS_RSA_WITH_AES_256_CBC_SHA256
1015 * TLS_RSA_WITH_AES_256_CBC_SHA
1016 * TLS_RSA_WITH_AES_128_GCM_SHA256
1017 * TLS_RSA_WITH_AES_128_CBC_SHA256
1018 * TLS_RSA_WITH_AES_128_CBC_SHA
1019 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1020 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1021 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1022 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1023 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1024 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1025 * TLS_PSK_WITH_AES_256_GCM_SHA384
1026 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001027 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001028 * TLS_PSK_WITH_AES_128_GCM_SHA256
1029 * TLS_PSK_WITH_AES_128_CBC_SHA256
1030 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001031 *
Paul Bakkercff68422013-09-15 20:43:33 +02001032 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001033 */
Paul Bakker40e46942009-01-03 21:51:57 +00001034#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001035
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001036/**
1037 * \def POLARSSL_ARC4_C
1038 *
1039 * Enable the ARCFOUR stream cipher.
1040 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001041 * Module: library/arc4.c
1042 * Caller: library/ssl_tls.c
1043 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001044 * This module enables the following ciphersuites (if other requisites are
1045 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001046 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1047 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001048 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001049 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001050 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1051 * TLS_DHE_PSK_WITH_RC4_128_SHA
1052 * TLS_RSA_WITH_RC4_128_SHA
1053 * TLS_RSA_WITH_RC4_128_MD5
1054 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001055 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001056 */
Paul Bakker40e46942009-01-03 21:51:57 +00001057#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001058
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001059/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001060 * \def POLARSSL_ASN1_PARSE_C
1061 *
1062 * Enable the generic ASN1 parser.
1063 *
1064 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001065 * Caller: library/x509.c
1066 * library/dhm.c
1067 * library/pkcs12.c
1068 * library/pkcs5.c
1069 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001070 */
1071#define POLARSSL_ASN1_PARSE_C
1072
1073/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001074 * \def POLARSSL_ASN1_WRITE_C
1075 *
1076 * Enable the generic ASN1 writer.
1077 *
1078 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001079 * Caller: library/ecdsa.c
1080 * library/pkwrite.c
1081 * library/x509_create.c
1082 * library/x509write_crt.c
1083 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001084 */
1085#define POLARSSL_ASN1_WRITE_C
1086
1087/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001088 * \def POLARSSL_BASE64_C
1089 *
1090 * Enable the Base64 module.
1091 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001092 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001093 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001094 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001095 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001096 */
Paul Bakker40e46942009-01-03 21:51:57 +00001097#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001098
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001099/**
1100 * \def POLARSSL_BIGNUM_C
1101 *
Paul Bakker9a736322012-11-14 12:39:52 +00001102 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001103 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001104 * Module: library/bignum.c
1105 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001106 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001107 * library/rsa.c
1108 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001109 *
1110 * This module is required for RSA and DHM support.
1111 */
Paul Bakker40e46942009-01-03 21:51:57 +00001112#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001113
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001114/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001115 * \def POLARSSL_BLOWFISH_C
1116 *
1117 * Enable the Blowfish block cipher.
1118 *
1119 * Module: library/blowfish.c
1120 */
1121#define POLARSSL_BLOWFISH_C
1122
1123/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001124 * \def POLARSSL_CAMELLIA_C
1125 *
1126 * Enable the Camellia block cipher.
1127 *
Paul Bakker38119b12009-01-10 23:31:23 +00001128 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001129 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001130 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001131 * This module enables the following ciphersuites (if other requisites are
1132 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001133 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1134 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1135 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1136 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1137 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1138 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1139 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1140 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001141 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1142 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1143 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1144 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1145 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001146 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001147 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1148 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1149 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1150 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1151 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1152 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1153 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1154 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1155 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1156 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1157 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1158 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1159 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1160 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1161 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1162 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1163 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1164 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1165 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1166 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1167 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1168 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1169 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1170 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1171 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1172 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1173 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1174 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001175 */
1176#define POLARSSL_CAMELLIA_C
1177
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001178/**
1179 * \def POLARSSL_CERTS_C
1180 *
1181 * Enable the test certificates.
1182 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001183 * Module: library/certs.c
1184 * Caller:
1185 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001186 * Requires: POLARSSL_PEM_PARSE_C
1187 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001188 * This module is used for testing (ssl_client/server).
1189 */
Paul Bakker40e46942009-01-03 21:51:57 +00001190#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001191
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001192/**
1193 * \def POLARSSL_CIPHER_C
1194 *
1195 * Enable the generic cipher layer.
1196 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001197 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001198 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001199 *
1200 * Uncomment to enable generic cipher wrappers.
1201 */
1202#define POLARSSL_CIPHER_C
1203
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001204/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001205 * \def POLARSSL_CTR_DRBG_C
1206 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001207 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001208 *
1209 * Module: library/ctr_drbg.c
1210 * Caller:
1211 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001212 * Requires: POLARSSL_AES_C
1213 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001214 * This module provides the CTR_DRBG AES-256 random number generator.
1215 */
1216#define POLARSSL_CTR_DRBG_C
1217
1218/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001219 * \def POLARSSL_DEBUG_C
1220 *
1221 * Enable the debug functions.
1222 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001223 * Module: library/debug.c
1224 * Caller: library/ssl_cli.c
1225 * library/ssl_srv.c
1226 * library/ssl_tls.c
1227 *
1228 * This module provides debugging functions.
1229 */
Paul Bakker40e46942009-01-03 21:51:57 +00001230#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001231
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001232/**
1233 * \def POLARSSL_DES_C
1234 *
1235 * Enable the DES block cipher.
1236 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001237 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001238 * Caller: library/pem.c
1239 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001240 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001241 * This module enables the following ciphersuites (if other requisites are
1242 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001243 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1244 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001245 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001246 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001247 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1248 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1249 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1250 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1251 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001252 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001253 *
Paul Bakkercff68422013-09-15 20:43:33 +02001254 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001255 */
Paul Bakker40e46942009-01-03 21:51:57 +00001256#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001257
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001258/**
1259 * \def POLARSSL_DHM_C
1260 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001261 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001262 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001263 * Module: library/dhm.c
1264 * Caller: library/ssl_cli.c
1265 * library/ssl_srv.c
1266 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001267 * This module is used by the following key exchanges:
1268 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001269 */
Paul Bakker40e46942009-01-03 21:51:57 +00001270#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001271
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001272/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001273 * \def POLARSSL_ECDH_C
1274 *
1275 * Enable the elliptic curve Diffie-Hellman library.
1276 *
1277 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001278 * Caller: library/ssl_cli.c
1279 * library/ssl_srv.c
1280 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001281 * This module is used by the following key exchanges:
1282 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001283 *
1284 * Requires: POLARSSL_ECP_C
1285 */
1286#define POLARSSL_ECDH_C
1287
1288/**
1289 * \def POLARSSL_ECDSA_C
1290 *
1291 * Enable the elliptic curve DSA library.
1292 *
1293 * Module: library/ecdsa.c
1294 * Caller:
1295 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001296 * This module is used by the following key exchanges:
1297 * ECDHE-ECDSA
1298 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001299 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001300 */
1301#define POLARSSL_ECDSA_C
1302
1303/**
1304 * \def POLARSSL_ECP_C
1305 *
1306 * Enable the elliptic curve over GF(p) library.
1307 *
1308 * Module: library/ecp.c
1309 * Caller: library/ecdh.c
1310 * library/ecdsa.c
1311 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001312 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001313 */
1314#define POLARSSL_ECP_C
1315
1316/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001317 * \def POLARSSL_ENTROPY_C
1318 *
1319 * Enable the platform-specific entropy code.
1320 *
1321 * Module: library/entropy.c
1322 * Caller:
1323 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001324 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001325 *
1326 * This module provides a generic entropy pool
1327 */
1328#define POLARSSL_ENTROPY_C
1329
1330/**
Paul Bakker9d781402011-05-09 16:17:09 +00001331 * \def POLARSSL_ERROR_C
1332 *
1333 * Enable error code to error string conversion.
1334 *
1335 * Module: library/error.c
1336 * Caller:
1337 *
1338 * This module enables err_strerror().
1339 */
1340#define POLARSSL_ERROR_C
1341
1342/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001343 * \def POLARSSL_GCM_C
1344 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001345 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001346 *
1347 * Module: library/gcm.c
1348 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001349 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001350 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001351 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1352 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001353 */
1354#define POLARSSL_GCM_C
1355
1356/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001357 * \def POLARSSL_HAVEGE_C
1358 *
1359 * Enable the HAVEGE random generator.
1360 *
Paul Bakker2a844242013-06-24 13:01:53 +02001361 * Warning: the HAVEGE random generator is not suitable for virtualized
1362 * environments
1363 *
1364 * Warning: the HAVEGE random generator is dependent on timing and specific
1365 * processor traits. It is therefore not advised to use HAVEGE as
1366 * your applications primary random generator or primary entropy pool
1367 * input. As a secondary input to your entropy pool, it IS able add
1368 * the (limited) extra entropy it provides.
1369 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001370 * Module: library/havege.c
1371 * Caller:
1372 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001373 * Requires: POLARSSL_TIMING_C
1374 *
Paul Bakker2a844242013-06-24 13:01:53 +02001375 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001376 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001377//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001378
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001379/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001380 * \def POLARSSL_HMAC_DRBG_C
1381 *
1382 * Enable the HMAC_DRBG random generator.
1383 *
1384 * Module: library/hmac_drbg.c
1385 * Caller:
1386 *
1387 * Requires: POLARSSL_MD_C
1388 *
1389 * Uncomment to enable the HMAC_DRBG random number geerator.
1390 */
1391#define POLARSSL_HMAC_DRBG_C
1392
1393/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001394 * \def POLARSSL_MD_C
1395 *
1396 * Enable the generic message digest layer.
1397 *
Paul Bakker17373852011-01-06 14:20:01 +00001398 * Module: library/md.c
1399 * Caller:
1400 *
1401 * Uncomment to enable generic message digest wrappers.
1402 */
1403#define POLARSSL_MD_C
1404
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001405/**
1406 * \def POLARSSL_MD2_C
1407 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001408 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001409 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001410 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001411 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001412 *
1413 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001414 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001415//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001416
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001417/**
1418 * \def POLARSSL_MD4_C
1419 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001420 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001421 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001422 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001423 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001424 *
1425 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001426 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001427//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001428
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001429/**
1430 * \def POLARSSL_MD5_C
1431 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001432 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001433 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001434 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001435 * Caller: library/md.c
1436 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001437 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001438 *
1439 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001440 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001441 */
Paul Bakker40e46942009-01-03 21:51:57 +00001442#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001443
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001444/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001445 * \def POLARSSL_MEMORY_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001446 * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead.
Paul Bakker6e339b52013-07-03 13:37:05 +02001447 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001448//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001449
1450/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001451 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1452 *
1453 * Enable the buffer allocator implementation that makes use of a (stack)
1454 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1455 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001456 *
1457 * Module: library/memory_buffer_alloc.c
1458 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001459 * Requires: POLARSSL_PLATFORM_C
1460 * POLARSSL_PLATFORM_MEMORY (to use it within PolarSSL)
Paul Bakker6e339b52013-07-03 13:37:05 +02001461 *
1462 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001463 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001464//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001465
1466/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001467 * \def POLARSSL_NET_C
1468 *
1469 * Enable the TCP/IP networking routines.
1470 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001471 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001472 *
1473 * This module provides TCP/IP networking routines.
1474 */
Paul Bakker40e46942009-01-03 21:51:57 +00001475#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001476
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001477/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001478 * \def POLARSSL_OID_C
1479 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001480 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001481 *
1482 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001483 * Caller: library/asn1write.c
1484 * library/pkcs5.c
1485 * library/pkparse.c
1486 * library/pkwrite.c
1487 * library/rsa.c
1488 * library/x509.c
1489 * library/x509_create.c
1490 * library/x509_crl.c
1491 * library/x509_crt.c
1492 * library/x509_csr.c
1493 * library/x509write_crt.c
1494 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001495 *
1496 * This modules translates between OIDs and internal values.
1497 */
1498#define POLARSSL_OID_C
1499
1500/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001501 * \def POLARSSL_PADLOCK_C
1502 *
1503 * Enable VIA Padlock support on x86.
1504 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001505 * Module: library/padlock.c
1506 * Caller: library/aes.c
1507 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001508 * Requires: POLARSSL_HAVE_ASM
1509 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001510 * This modules adds support for the VIA PadLock on x86.
1511 */
Paul Bakker40e46942009-01-03 21:51:57 +00001512#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001513
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001514/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001515 * \def POLARSSL_PBKDF2_C
1516 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001517 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001518 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001519 *
1520 * Module: library/pbkdf2.c
1521 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001522 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001523 *
1524 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001525 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001526#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001527
1528/**
Paul Bakkercff68422013-09-15 20:43:33 +02001529 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001530 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001531 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001532 *
1533 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001534 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001535 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001536 * library/x509_crl.c
1537 * library/x509_crt.c
1538 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001539 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001540 * Requires: POLARSSL_BASE64_C
1541 *
Paul Bakkercff68422013-09-15 20:43:33 +02001542 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001543 */
Paul Bakkercff68422013-09-15 20:43:33 +02001544#define POLARSSL_PEM_PARSE_C
1545
1546/**
1547 * \def POLARSSL_PEM_WRITE_C
1548 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001549 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001550 *
1551 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001552 * Caller: library/pkwrite.c
1553 * library/x509write_crt.c
1554 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001555 *
1556 * Requires: POLARSSL_BASE64_C
1557 *
1558 * This modules adds support for encoding / writing PEM files.
1559 */
1560#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001561
1562/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001563 * \def POLARSSL_PK_C
1564 *
1565 * Enable the generic public (asymetric) key layer.
1566 *
1567 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001568 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001569 * library/ssl_cli.c
1570 * library/ssl_srv.c
1571 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001572 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1573 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001574 * Uncomment to enable generic public key wrappers.
1575 */
1576#define POLARSSL_PK_C
1577
1578/**
Paul Bakker4606c732013-09-15 17:04:23 +02001579 * \def POLARSSL_PK_PARSE_C
1580 *
1581 * Enable the generic public (asymetric) key parser.
1582 *
1583 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001584 * Caller: library/x509_crt.c
1585 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001586 *
1587 * Requires: POLARSSL_PK_C
1588 *
1589 * Uncomment to enable generic public key parse functions.
1590 */
1591#define POLARSSL_PK_PARSE_C
1592
1593/**
1594 * \def POLARSSL_PK_WRITE_C
1595 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001596 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001597 *
1598 * Module: library/pkwrite.c
1599 * Caller: library/x509write.c
1600 *
1601 * Requires: POLARSSL_PK_C
1602 *
1603 * Uncomment to enable generic public key write functions.
1604 */
1605#define POLARSSL_PK_WRITE_C
1606
1607/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001608 * \def POLARSSL_PKCS5_C
1609 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001610 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001611 *
1612 * Module: library/pkcs5.c
1613 *
1614 * Requires: POLARSSL_MD_C
1615 *
1616 * This module adds support for the PKCS#5 functions.
1617 */
1618#define POLARSSL_PKCS5_C
1619
1620/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001621 * \def POLARSSL_PKCS11_C
1622 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001623 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001624 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001625 * Module: library/pkcs11.c
1626 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001627 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001628 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001629 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001630 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001631 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001632 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001633//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001634
1635/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001636 * \def POLARSSL_PKCS12_C
1637 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001638 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001639 * Adds algorithms for parsing PKCS#8 encrypted private keys
1640 *
1641 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001642 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001643 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001644 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1645 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001646 *
1647 * This module enables PKCS#12 functions.
1648 */
1649#define POLARSSL_PKCS12_C
1650
1651/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001652 * \def POLARSSL_PLATFORM_C
1653 *
1654 * Enable the platform abstraction layer that allows you to re-assign
1655 * functions like malloc(), free(), printf(), fprintf()
1656 *
1657 * Module: library/platform.c
1658 * Caller: Most other .c files
1659 *
1660 * This module enables abstraction of common (libc) functions.
1661 */
1662#define POLARSSL_PLATFORM_C
1663
1664/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001665 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001666 *
1667 * Enable the RIPEMD-160 hash algorithm.
1668 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001669 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001670 * Caller: library/md.c
1671 *
1672 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001673#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001674
1675/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001676 * \def POLARSSL_RSA_C
1677 *
1678 * Enable the RSA public-key cryptosystem.
1679 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001680 * Module: library/rsa.c
1681 * Caller: library/ssl_cli.c
1682 * library/ssl_srv.c
1683 * library/ssl_tls.c
1684 * library/x509.c
1685 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001686 * This module is used by the following key exchanges:
1687 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001688 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001689 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001690 */
Paul Bakker40e46942009-01-03 21:51:57 +00001691#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001692
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001693/**
1694 * \def POLARSSL_SHA1_C
1695 *
1696 * Enable the SHA1 cryptographic hash algorithm.
1697 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001698 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001699 * Caller: library/md.c
1700 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001701 * library/ssl_srv.c
1702 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001703 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001704 *
1705 * This module is required for SSL/TLS and SHA1-signed certificates.
1706 */
Paul Bakker40e46942009-01-03 21:51:57 +00001707#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001708
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001709/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001710 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001711 *
1712 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001713 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001714 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001715 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001716 * Caller: library/entropy.c
1717 * library/md.c
1718 * library/ssl_cli.c
1719 * library/ssl_srv.c
1720 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001721 *
1722 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001723 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001724 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001725#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001726
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001727/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001728 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001729 *
1730 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001731 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001732 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001733 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001734 * Caller: library/entropy.c
1735 * library/md.c
1736 * library/ssl_cli.c
1737 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001738 *
1739 * This module adds support for SHA-384 and SHA-512.
1740 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001741#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001742
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001743/**
Paul Bakker0a597072012-09-25 21:55:46 +00001744 * \def POLARSSL_SSL_CACHE_C
1745 *
1746 * Enable simple SSL cache implementation.
1747 *
1748 * Module: library/ssl_cache.c
1749 * Caller:
1750 *
1751 * Requires: POLARSSL_SSL_CACHE_C
1752 */
1753#define POLARSSL_SSL_CACHE_C
1754
1755/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001756 * \def POLARSSL_SSL_CLI_C
1757 *
1758 * Enable the SSL/TLS client code.
1759 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001760 * Module: library/ssl_cli.c
1761 * Caller:
1762 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001763 * Requires: POLARSSL_SSL_TLS_C
1764 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001765 * This module is required for SSL/TLS client support.
1766 */
Paul Bakker40e46942009-01-03 21:51:57 +00001767#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001768
Paul Bakker9a736322012-11-14 12:39:52 +00001769/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001770 * \def POLARSSL_SSL_SRV_C
1771 *
1772 * Enable the SSL/TLS server code.
1773 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001774 * Module: library/ssl_srv.c
1775 * Caller:
1776 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001777 * Requires: POLARSSL_SSL_TLS_C
1778 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001779 * This module is required for SSL/TLS server support.
1780 */
Paul Bakker40e46942009-01-03 21:51:57 +00001781#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001782
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001783/**
1784 * \def POLARSSL_SSL_TLS_C
1785 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001786 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001787 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001788 * Module: library/ssl_tls.c
1789 * Caller: library/ssl_cli.c
1790 * library/ssl_srv.c
1791 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001792 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001793 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001794 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001795 * This module is required for SSL/TLS.
1796 */
Paul Bakker40e46942009-01-03 21:51:57 +00001797#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001798
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001799/**
Paul Bakker2466d932013-09-28 14:40:38 +02001800 * \def POLARSSL_THREADING_C
1801 *
1802 * Enable the threading abstraction layer.
1803 * By default PolarSSL assumes it is used in a non-threaded environment or that
1804 * contexts are not shared between threads. If you do intend to use contexts
1805 * between threads, you will need to enable this layer to prevent race
1806 * conditions.
1807 *
1808 * Module: library/threading.c
1809 *
1810 * This allows different threading implementations (self-implemented or
1811 * provided).
1812 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001813 * You will have to enable either POLARSSL_THREADING_ALT or
1814 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001815 *
1816 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001817 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001818//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001819
1820/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001821 * \def POLARSSL_TIMING_C
1822 *
1823 * Enable the portable timing interface.
1824 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001825 * Module: library/timing.c
1826 * Caller: library/havege.c
1827 *
1828 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001829 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001830#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001831
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001832/**
1833 * \def POLARSSL_VERSION_C
1834 *
1835 * Enable run-time version information.
1836 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001837 * Module: library/version.c
1838 *
1839 * This module provides run-time version information.
1840 */
1841#define POLARSSL_VERSION_C
1842
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001843/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001844 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001845 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001846 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001847 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001848 * Module: library/x509.c
1849 * Caller: library/x509_crl.c
1850 * library/x509_crt.c
1851 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001852 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001853 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001854 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001855 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001856 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001857 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001858#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001859
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001860/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001861 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001862 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001863 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001864 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001865 * Module: library/x509_crt.c
1866 * Caller: library/ssl_cli.c
1867 * library/ssl_srv.c
1868 * library/ssl_tls.c
1869 *
1870 * Requires: POLARSSL_X509_USE_C
1871 *
1872 * This module is required for X.509 certificate parsing.
1873 */
1874#define POLARSSL_X509_CRT_PARSE_C
1875
1876/**
1877 * \def POLARSSL_X509_CRL_PARSE_C
1878 *
1879 * Enable X.509 CRL parsing.
1880 *
1881 * Module: library/x509_crl.c
1882 * Caller: library/x509_crt.c
1883 *
1884 * Requires: POLARSSL_X509_USE_C
1885 *
1886 * This module is required for X.509 CRL parsing.
1887 */
1888#define POLARSSL_X509_CRL_PARSE_C
1889
1890/**
1891 * \def POLARSSL_X509_CSR_PARSE_C
1892 *
1893 * Enable X.509 Certificate Signing Request (CSR) parsing.
1894 *
1895 * Module: library/x509_csr.c
1896 * Caller: library/x509_crt_write.c
1897 *
1898 * Requires: POLARSSL_X509_USE_C
1899 *
1900 * This module is used for reading X.509 certificate request.
1901 */
1902#define POLARSSL_X509_CSR_PARSE_C
1903
1904/**
1905 * \def POLARSSL_X509_CREATE_C
1906 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001907 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001908 *
1909 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001910 *
Paul Bakker4606c732013-09-15 17:04:23 +02001911 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001912 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001913 * This module is the basis for creating X.509 certificates and CSRs.
1914 */
1915#define POLARSSL_X509_CREATE_C
1916
1917/**
1918 * \def POLARSSL_X509_CRT_WRITE_C
1919 *
1920 * Enable creating X.509 certificates.
1921 *
1922 * Module: library/x509_crt_write.c
1923 *
1924 * Requires: POLARSSL_CREATE_C
1925 *
1926 * This module is required for X.509 certificate creation.
1927 */
1928#define POLARSSL_X509_CRT_WRITE_C
1929
1930/**
1931 * \def POLARSSL_X509_CSR_WRITE_C
1932 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001933 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001934 *
1935 * Module: library/x509_csr_write.c
1936 *
1937 * Requires: POLARSSL_CREATE_C
1938 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001939 * This module is required for X.509 certificate request writing.
1940 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001941#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001942
1943/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001944 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001945 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001946 * Enable the XTEA block cipher.
1947 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001948 * Module: library/xtea.c
1949 * Caller:
1950 */
1951#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001952
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001953/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001954
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001955/**
1956 * \name SECTION: Module configuration options
1957 *
1958 * This section allows for the setting of module specific sizes and
1959 * configuration options. The default values are already present in the
1960 * relevant header files and should suffice for the regular use cases.
1961 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1962 * only if you have a good reason and know the consequences.
1963 *
1964 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1965 * header file take precedence.
1966 *
1967 * Please check the respective header file for documentation on these
1968 * parameters (to prevent duplicate documentation).
1969 *
1970 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1971 * \{
1972 */
1973//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1974
1975#if defined(POLARSSL_CONFIG_OPTIONS)
1976
1977// MPI / BIGNUM options
1978//
1979#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1980#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1981
1982// CTR_DRBG options
1983//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001984#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 +02001985#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1986#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1987#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1988#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1989
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01001990// HMAC_DRBG options
1991//
1992#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1993#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1994#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1995#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1996
Paul Bakkere1b665e2013-12-11 16:02:58 +01001997// ECP options
1998//
1999#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2000#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
Manuel Pégourié-Gonnard9e4191c2013-12-30 18:41:16 +01002001#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002002
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002003// Entropy options
2004//
2005#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2006#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
2007
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002008// Memory buffer allocator options
Paul Bakker6e339b52013-07-03 13:37:05 +02002009#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker6e339b52013-07-03 13:37:05 +02002010
Paul Bakker747a83a2014-02-01 22:50:07 +01002011// Platform options
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002012#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2013#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
Paul Bakker747a83a2014-02-01 22:50:07 +01002014#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2015#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002016
2017// SSL Cache options
2018//
2019#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2020#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
2021
2022// SSL options
2023//
2024#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02002025#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002026
2027#endif /* POLARSSL_CONFIG_OPTIONS */
2028
2029/* \} name */
2030
Paul Bakker7ad00f92013-04-18 23:05:25 +02002031/*
2032 * Sanity checks on defines and dependencies
2033 */
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002034#if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
2035#error "POLARSSL_AESNI_C defined, but not all prerequisites"
2036#endif
2037
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002038#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
2039#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002040#endif
2041
2042#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
2043#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
2044#endif
2045
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002046#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
2047#error "POLARSSL_DHM_C defined, but not all prerequisites"
2048#endif
2049
Paul Bakker7ad00f92013-04-18 23:05:25 +02002050#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
2051#error "POLARSSL_ECDH_C defined, but not all prerequisites"
2052#endif
2053
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02002054#if defined(POLARSSL_ECDSA_C) && \
2055 ( !defined(POLARSSL_ECP_C) || \
2056 !defined(POLARSSL_ASN1_PARSE_C) || \
2057 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002058#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
2059#endif
2060
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +01002061#if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C)
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +01002062#error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
2063#endif
2064
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01002065#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
2066 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
2067 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
2068 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
2069 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
2070 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
2071 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
2072 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
Manuel Pégourié-Gonnardffd94cc2014-01-28 20:11:07 +01002073 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \
2074 !defined(POLARSSL_ECP_DP_M255_ENABLED) && \
2075 !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \
2076 !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \
2077 !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002078#error "POLARSSL_ECP_C defined, but not all prerequisites"
2079#endif
2080
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002081#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
2082 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02002083#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
2084#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002085#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
2086 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
2087#error "CTR_DRBG_ENTROPY_LEN value too high"
2088#endif
2089#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
2090 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
2091#error "CTR_DRBG_ENTROPY_LEN value too high"
2092#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02002093
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02002094#if defined(POLARSSL_GCM_C) && ( \
2095 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002096#error "POLARSSL_GCM_C defined, but not all prerequisites"
2097#endif
2098
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002099#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
2100#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
2101#endif
2102
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01002103#if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C)
2104#error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites"
2105#endif
2106
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01002107#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
2108 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2109#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
2110#endif
2111
2112#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
2113 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2114#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
2115#endif
2116
Paul Bakkere07f41d2013-04-19 09:08:57 +02002117#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
2118#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
2119#endif
2120
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02002121#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
2122 !defined(POLARSSL_ECDH_C)
2123#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
2124#endif
2125
Paul Bakkere07f41d2013-04-19 09:08:57 +02002126#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2127 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002128 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002129#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2130#endif
2131
2132#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2133 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002134 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002135#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2136#endif
2137
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002138#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2139 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002140 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002141#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2142#endif
2143
Paul Bakkere07f41d2013-04-19 09:08:57 +02002144#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002145 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002146 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002147#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2148#endif
2149
2150#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002151 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002152 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002153#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2154#endif
2155
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002156#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \
2157 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
Paul Bakker6e339b52013-07-03 13:37:05 +02002158#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2159#endif
2160
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002161#if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2162#error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2163#endif
2164
Paul Bakker7ad00f92013-04-18 23:05:25 +02002165#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2166#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2167#endif
2168
Paul Bakkercff68422013-09-15 20:43:33 +02002169#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2170#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2171#endif
2172
2173#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2174#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002175#endif
2176
Paul Bakker4606c732013-09-15 17:04:23 +02002177#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2178#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2179#endif
2180
2181#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2182#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2183#endif
2184
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002185#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002186#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2187#endif
2188
2189#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2190 !defined(POLARSSL_OID_C) )
2191#error "POLARSSL_RSA_C defined, but not all prerequisites"
2192#endif
2193
Manuel Pégourié-Gonnardce7c6fd2014-01-24 14:37:29 +01002194#if defined(POLARSSL_RSASSA_PSS_CERTIFICATES) && \
2195 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_PKCS1_V21) )
2196#error "POLARSSL_RSASSA_PSS_CERTIFICATES defined, but not all prerequisites"
2197#endif
2198
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002199#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2200 !defined(POLARSSL_SHA1_C) )
2201#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2202#endif
2203
2204#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2205 !defined(POLARSSL_SHA1_C) )
2206#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2207#endif
2208
2209#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2210 !defined(POLARSSL_SHA1_C) )
2211#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2212#endif
2213
2214#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2215 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2216#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2217#endif
2218
Paul Bakker7ad00f92013-04-18 23:05:25 +02002219#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2220#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2221#endif
2222
Paul Bakker577e0062013-08-28 11:57:20 +02002223#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002224 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002225#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2226#endif
2227
2228#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2229#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2230#endif
2231
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002232#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2233 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2234 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2235#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2236#endif
2237
2238#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2239 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2240#error "Illegal protocol selection"
2241#endif
2242
2243#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2244 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2245#error "Illegal protocol selection"
2246#endif
2247
2248#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2249 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2250 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2251#error "Illegal protocol selection"
2252#endif
2253
Paul Bakker59da0a42013-08-19 13:27:17 +02002254#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002255 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2256 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002257#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2258#endif
2259
Paul Bakker2466d932013-09-28 14:40:38 +02002260#if defined(POLARSSL_THREADING_PTHREAD)
2261#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2262#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2263#endif
2264#define POLARSSL_THREADING_IMPL
2265#endif
2266
2267#if defined(POLARSSL_THREADING_ALT)
2268#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2269#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2270#endif
2271#define POLARSSL_THREADING_IMPL
2272#endif
2273
2274#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2275#error "POLARSSL_THREADING_C defined, single threading implementation required"
2276#endif
2277#undef POLARSSL_THREADING_IMPL
2278
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002279#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002280 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002281 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002282#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002283#endif
2284
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002285#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2286 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2287 !defined(POLARSSL_PK_WRITE_C) )
2288#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2289#endif
2290
2291#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2292#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2293#endif
2294
2295#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2296#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2297#endif
2298
2299#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2300#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2301#endif
2302
2303#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2304#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2305#endif
2306
2307#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2308#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002309#endif
2310
Paul Bakker5121ce52009-01-03 21:22:43 +00002311#endif /* config.h */