blob: be1005710f1f36642a7b44514cf0200753baa440 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakker37ca75d2011-01-06 12:28:03 +00004 * \brief Configuration options (set of defines)
5 *
Paul Bakker9bcf16c2013-06-24 19:31:17 +02006 * Copyright (C) 2006-2013, Brainspark B.V.
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
8 * This file is part of PolarSSL (http://www.polarssl.org)
Paul Bakker84f12b72010-07-18 10:13:04 +00009 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakkerb96f1542010-07-18 20:36:00 +000010 *
Paul Bakker77b385e2009-07-28 17:23:11 +000011 * All rights reserved.
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000012 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000013 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
Paul Bakker5121ce52009-01-03 21:22:43 +000027 * This set of compile-time options may be used to enable
28 * or disable features selectively, and reduce the global
29 * memory footprint.
30 */
Paul Bakker40e46942009-01-03 21:51:57 +000031#ifndef POLARSSL_CONFIG_H
32#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000033
Paul Bakkercce9d772011-11-18 14:26:47 +000034#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
Paul Bakker5121ce52009-01-03 21:22:43 +000035#define _CRT_SECURE_NO_DEPRECATE 1
36#endif
37
Paul Bakkerf3b86c12011-01-27 15:24:17 +000038/**
Paul Bakker0a62cd12011-01-21 11:00:08 +000039 * \name SECTION: System support
40 *
41 * This section sets system specific settings.
42 * \{
43 */
44
Paul Bakkerf3b86c12011-01-27 15:24:17 +000045/**
46 * \def POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000047 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000048 * The system uses 8-bit wide native integers.
49 *
50 * Uncomment if native integers are 8-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000051 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020052//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000053
Paul Bakkerf3b86c12011-01-27 15:24:17 +000054/**
55 * \def POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000056 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000057 * The system uses 16-bit wide native integers.
58 *
59 * Uncomment if native integers are 16-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000060 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020061//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000062
Paul Bakkerf3b86c12011-01-27 15:24:17 +000063/**
Paul Bakker62261d62012-10-02 12:19:31 +000064 * \def POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000065 *
Paul Bakker62261d62012-10-02 12:19:31 +000066 * The compiler supports the 'long long' type.
67 * (Only used on 32-bit platforms)
Paul Bakker5121ce52009-01-03 21:22:43 +000068 */
Paul Bakker62261d62012-10-02 12:19:31 +000069#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000070
Paul Bakkerf3b86c12011-01-27 15:24:17 +000071/**
72 * \def POLARSSL_HAVE_ASM
73 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020074 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000075 *
76 * Requires support for asm() in compiler.
77 *
78 * Used in:
79 * library/timing.c
80 * library/padlock.c
81 * include/polarssl/bn_mul.h
82 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020083 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000084 */
Paul Bakker40e46942009-01-03 21:51:57 +000085#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000086
Paul Bakkerf3b86c12011-01-27 15:24:17 +000087/**
88 * \def POLARSSL_HAVE_SSE2
89 *
Paul Bakkere23c3152012-10-01 14:42:47 +000090 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000091 *
Paul Bakker5121ce52009-01-03 21:22:43 +000092 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000093 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020094//#define POLARSSL_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020095
96/**
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/**
118 * \def POLARSSL_PLATFORM_XXX_ALT
119 *
120 * Uncomment a macro to let PolarSSL support the function in the platform
121 * abstraction layer.
122 *
123 * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, PolarSSL will
124 * provide a function "platform_set_printf()" that allows you to set an
125 * alternative printf function pointer.
126 *
127 * All these define require POLARSSL_PLATFORM_C to be defined!
128 *
129 * Uncomment a macro to enable alternate implementation of specific base
130 * platform function
131 */
132//#define POLARSSL_PLATFORM_PRINTF_ALT
133//#define POLARSSL_PLATFORM_FPRINTF_ALT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200134/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000135
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000136/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000137 * \name SECTION: PolarSSL feature support
138 *
139 * This section sets support for features that are or are not needed
140 * within the modules that are enabled.
141 * \{
142 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000143
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000144/**
Paul Bakker90995b52013-06-24 19:20:35 +0200145 * \def POLARSSL_XXX_ALT
146 *
147 * Uncomment a macro to let PolarSSL use your alternate core implementation of
148 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
149 * implementations). Keep in mind that the function prototypes should remain
150 * the same.
151 *
152 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
153 * provide the "struct aes_context" definition and omit the base function
154 * declarations and implementations. "aes_alt.h" will be included from
155 * "aes.h" to include the new function definitions.
156 *
157 * Uncomment a macro to enable alternate implementation for core algorithm
158 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200159 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200160//#define POLARSSL_AES_ALT
161//#define POLARSSL_ARC4_ALT
162//#define POLARSSL_BLOWFISH_ALT
163//#define POLARSSL_CAMELLIA_ALT
164//#define POLARSSL_DES_ALT
165//#define POLARSSL_XTEA_ALT
166//#define POLARSSL_MD2_ALT
167//#define POLARSSL_MD4_ALT
168//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100169//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200170//#define POLARSSL_SHA1_ALT
171//#define POLARSSL_SHA256_ALT
172//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200173
174/**
Manuel Pégourié-Gonnardb1d4eb12014-01-22 10:12:57 +0100175 * \def POLARSSL_RSASSA_PSS_CERTIFICATES
176 *
177 * Enable parsing and verification of X.509 certificates and CRLs signed with
178 * RSASSA-PSS.
179 *
180 * This is disabled by default since it breaks binary compatibility with the
181 * 1.3.x line. If you choose to enable it, you will need to rebuild your
182 * application against the new header files, relinking will not be enough.
183 *
184 * TODO: actually disable it when done working on this branch ,)
185 *
186 * Uncomment this macro to allow using RSASSA-PSS in certificates.
187 */
188#define POLARSSL_RSASSA_PSS_CERTIFICATES
189
190/**
Paul Bakker15566e42011-04-24 21:19:15 +0000191 * \def POLARSSL_AES_ROM_TABLES
192 *
193 * Store the AES tables in ROM.
194 *
195 * Uncomment this macro to store the AES tables in ROM.
196 *
Paul Bakker15566e42011-04-24 21:19:15 +0000197 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200198//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000199
200/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200201 * \def POLARSSL_CIPHER_MODE_CBC
202 *
203 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
204 */
205#define POLARSSL_CIPHER_MODE_CBC
206
207/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000208 * \def POLARSSL_CIPHER_MODE_CFB
209 *
210 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
211 */
212#define POLARSSL_CIPHER_MODE_CFB
213
214/**
215 * \def POLARSSL_CIPHER_MODE_CTR
216 *
217 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
218 */
219#define POLARSSL_CIPHER_MODE_CTR
220
221/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000222 * \def POLARSSL_CIPHER_NULL_CIPHER
223 *
224 * Enable NULL cipher.
225 * Warning: Only do so when you know what you are doing. This allows for
226 * encryption or channels without any security!
227 *
228 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
229 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100230 * TLS_ECDH_ECDSA_WITH_NULL_SHA
231 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200232 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100233 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200234 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200235 * TLS_ECDHE_PSK_WITH_NULL_SHA256
236 * TLS_ECDHE_PSK_WITH_NULL_SHA
237 * TLS_DHE_PSK_WITH_NULL_SHA384
238 * TLS_DHE_PSK_WITH_NULL_SHA256
239 * TLS_DHE_PSK_WITH_NULL_SHA
240 * TLS_RSA_WITH_NULL_SHA256
241 * TLS_RSA_WITH_NULL_SHA
242 * TLS_RSA_WITH_NULL_MD5
243 * TLS_RSA_PSK_WITH_NULL_SHA384
244 * TLS_RSA_PSK_WITH_NULL_SHA256
245 * TLS_RSA_PSK_WITH_NULL_SHA
246 * TLS_PSK_WITH_NULL_SHA384
247 * TLS_PSK_WITH_NULL_SHA256
248 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000249 *
250 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200251#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000252 */
253
254/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200255 * \def POLARSSL_CIPHER_PADDING_XXX
256 *
257 * Uncomment or comment macros to add support for specific padding modes
258 * in the cipher layer with cipher modes that support padding (e.g. CBC)
259 *
260 * If you disable all padding modes, only full blocks can be used with CBC.
261 *
262 * Enable padding modes in the cipher layer.
263 */
264#define POLARSSL_CIPHER_PADDING_PKCS7
265#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
266#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
267#define POLARSSL_CIPHER_PADDING_ZEROS
268
269/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000270 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
271 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200272 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000273 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000274 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000275 *
276 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000277 * TLS_RSA_WITH_DES_CBC_SHA
278 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000279 *
280 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200281#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000282 */
283
284/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200285 * \def POLARSSL_ECP_XXXX_ENABLED
286 *
287 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200288 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200289 *
290 * Comment macros to disable the curve and functions for it
291 */
292#define POLARSSL_ECP_DP_SECP192R1_ENABLED
293#define POLARSSL_ECP_DP_SECP224R1_ENABLED
294#define POLARSSL_ECP_DP_SECP256R1_ENABLED
295#define POLARSSL_ECP_DP_SECP384R1_ENABLED
296#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100297#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100298#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100299#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200300#define POLARSSL_ECP_DP_BP256R1_ENABLED
301#define POLARSSL_ECP_DP_BP384R1_ENABLED
302#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100303//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
304#define POLARSSL_ECP_DP_M255_ENABLED
305//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
306//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200307
308/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200309 * \def POLARSSL_ECP_NIST_OPTIM
310 *
311 * Enable specific 'modulo p' routines for each NIST prime.
312 * Depending on the prime and architecture, makes operations 4 to 8 times
313 * faster on the corresponding curve.
314 *
315 * Comment this macro to disable NIST curves optimisation.
316 */
317#define POLARSSL_ECP_NIST_OPTIM
318
319/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100320 * \def POLARSSL_ECDSA_DETERMINISTIC
321 *
322 * Enable deterministic ECDSA (RFC 6979).
323 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
324 * may result in a compromise of the long-term signing key. This is avoided by
325 * the deterministic variant.
326 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100327 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100328 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100329 * Comment this macro to disable deterministic ECDSA.
330 */
331#define POLARSSL_ECDSA_DETERMINISTIC
332
333/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200334 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
335 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200336 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200337 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200338 * This enables the following ciphersuites (if other requisites are
339 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200340 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200341 * TLS_PSK_WITH_AES_256_CBC_SHA384
342 * TLS_PSK_WITH_AES_256_CBC_SHA
343 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
344 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
345 * TLS_PSK_WITH_AES_128_GCM_SHA256
346 * TLS_PSK_WITH_AES_128_CBC_SHA256
347 * TLS_PSK_WITH_AES_128_CBC_SHA
348 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
349 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
350 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
351 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200352 */
353#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
354
355/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200356 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
357 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200358 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200359 *
360 * Requires: POLARSSL_DHM_C
361 *
362 * This enables the following ciphersuites (if other requisites are
363 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200364 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200365 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
366 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
367 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
368 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
369 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
370 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
371 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
372 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
373 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
374 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
375 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200376 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200377#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200378
379/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200380 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
381 *
382 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
383 *
384 * Requires: POLARSSL_ECDH_C
385 *
386 * This enables the following ciphersuites (if other requisites are
387 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200388 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200389 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200390 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200391 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
392 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
393 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
394 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
395 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200396 */
397#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
398
399/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200400 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
401 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200402 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200403 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200404 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200405 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200406 *
407 * This enables the following ciphersuites (if other requisites are
408 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200409 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200410 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
411 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
412 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
413 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
414 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
415 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
416 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
417 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
418 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
419 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
420 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200421 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200422#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200423
424/**
425 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
426 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200427 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200428 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200429 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200430 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200431 *
432 * This enables the following ciphersuites (if other requisites are
433 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200434 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200435 * TLS_RSA_WITH_AES_256_CBC_SHA256
436 * TLS_RSA_WITH_AES_256_CBC_SHA
437 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200438 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200439 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
440 * TLS_RSA_WITH_AES_128_GCM_SHA256
441 * TLS_RSA_WITH_AES_128_CBC_SHA256
442 * TLS_RSA_WITH_AES_128_CBC_SHA
443 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
444 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
445 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200446 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200447 * TLS_RSA_WITH_RC4_128_SHA
448 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200449 */
450#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
451
452/**
453 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
454 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200455 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200456 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200457 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200458 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200459 *
460 * This enables the following ciphersuites (if other requisites are
461 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200462 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200463 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200464 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
465 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200466 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200467 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
468 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
469 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
470 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
471 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
472 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
473 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200474 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
475 */
476#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
477
478/**
479 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
480 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200481 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200482 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200483 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200484 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200485 *
486 * This enables the following ciphersuites (if other requisites are
487 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200488 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200489 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
490 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
491 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200492 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200493 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
494 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
495 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
496 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
497 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
498 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
499 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200500 */
501#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
502
503/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200504 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
505 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200506 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200507 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200508 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200509 *
510 * This enables the following ciphersuites (if other requisites are
511 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200512 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
513 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
514 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
515 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
516 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
517 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
518 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
519 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
520 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
521 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
522 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
523 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200524 */
525#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
526
527/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100528 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
529 *
530 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
531 *
532 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
533 *
534 * This enables the following ciphersuites (if other requisites are
535 * enabled as well):
536 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
537 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
538 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
539 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
540 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
541 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
542 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
543 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
544 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
545 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
546 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
547 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
548 */
549#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
550
551/**
552 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
553 *
554 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
555 *
556 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
557 *
558 * This enables the following ciphersuites (if other requisites are
559 * enabled as well):
560 * TLS_ECDH_RSA_WITH_RC4_128_SHA
561 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
562 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
563 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
564 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
565 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
566 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
567 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
568 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
569 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
570 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
571 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
572 */
573#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
574
575/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200576 * \def POLARSSL_ERROR_STRERROR_BC
577 *
578 * Make available the backward compatible error_strerror() next to the
579 * current polarssl_strerror().
580 *
581 * Disable if you run into name conflicts and want to really remove the
582 * error_strerror()
583 */
584#define POLARSSL_ERROR_STRERROR_BC
585
586/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100587 * \def POLARSSL_ERROR_STRERROR_DUMMY
588 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200589 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100590 * third party libraries easier.
591 *
592 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200593 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100594 */
595#define POLARSSL_ERROR_STRERROR_DUMMY
596
597/**
Paul Bakker15566e42011-04-24 21:19:15 +0000598 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000599 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200600 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200601 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200602 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000603 */
Paul Bakker15566e42011-04-24 21:19:15 +0000604#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000605
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000606/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000607 * \def POLARSSL_FS_IO
608 *
609 * Enable functions that use the filesystem.
610 */
611#define POLARSSL_FS_IO
612
613/**
Paul Bakker43655f42011-12-15 20:11:16 +0000614 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
615 *
616 * Do not add default entropy sources. These are the platform specific,
617 * hardclock and HAVEGE based poll functions.
618 *
619 * This is useful to have more control over the added entropy sources in an
620 * application.
621 *
622 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000623 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200624//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000625
626/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000627 * \def POLARSSL_NO_PLATFORM_ENTROPY
628 *
629 * Do not use built-in platform entropy functions.
630 * This is useful if your platform does not support
631 * standards like the /dev/urandom or Windows CryptoAPI.
632 *
633 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000634 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200635//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000636
637/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200638 * \def POLARSSL_MEMORY_DEBUG
639 *
640 * Enable debugging of buffer allocator memory issues. Automatically prints
641 * (to stderr) all (fatal) messages on memory allocation issues. Enables
642 * function for 'debug output' of allocated memory.
643 *
644 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
645 * fprintf()
646 *
647 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200648 */
649//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200650
651/**
652 * \def POLARSSL_MEMORY_BACKTRACE
653 *
654 * Include backtrace information with each allocated block.
655 *
656 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
657 * GLIBC-compatible backtrace() an backtrace_symbols() support
658 *
659 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200660 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200661//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200662
663/**
Paul Bakker48377d92013-08-30 12:06:24 +0200664 * \def POLARSSL_PKCS1_V15
665 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200666 * Enable support for PKCS#1 v1.5 encoding.
667 *
Paul Bakker48377d92013-08-30 12:06:24 +0200668 * Requires: POLARSSL_RSA_C
669 *
Paul Bakker48377d92013-08-30 12:06:24 +0200670 * This enables support for PKCS#1 v1.5 operations.
671 */
672#define POLARSSL_PKCS1_V15
673
674/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000675 * \def POLARSSL_PKCS1_V21
676 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200677 * Enable support for PKCS#1 v2.1 encoding.
678 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000679 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
680 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000681 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
682 */
683#define POLARSSL_PKCS1_V21
684
685/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000686 * \def POLARSSL_RSA_NO_CRT
687 *
688 * Do not use the Chinese Remainder Theorem for the RSA private operation.
689 *
690 * Uncomment this macro to disable the use of CRT in RSA.
691 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000692 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200693//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000694
695/**
696 * \def POLARSSL_SELF_TEST
697 *
698 * Enable the checkup functions (*_self_test).
699 */
700#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000701
702/**
Paul Bakker40865c82013-01-31 17:13:13 +0100703 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
704 *
705 * Enable sending of alert messages in case of encountered errors as per RFC.
706 * If you choose not to send the alert messages, PolarSSL can still communicate
707 * with other servers, only debugging of failures is harder.
708 *
709 * The advantage of not sending alert messages, is that no information is given
710 * about reasons for failures thus preventing adversaries of gaining intel.
711 *
712 * Enable sending of all alert messages
713 */
714#define POLARSSL_SSL_ALERT_MESSAGES
715
716/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100717 * \def POLARSSL_SSL_DEBUG_ALL
718 *
719 * Enable the debug messages in SSL module for all issues.
720 * Debug messages have been disabled in some places to prevent timing
721 * attacks due to (unbalanced) debugging function calls.
722 *
723 * If you need all error reporting you should enable this during debugging,
724 * but remove this for production servers that should log as well.
725 *
726 * Uncomment this macro to report all debug messages on errors introducing
727 * a timing side-channel.
728 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100729 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200730//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100731
732/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000733 * \def POLARSSL_SSL_HW_RECORD_ACCEL
734 *
735 * Enable hooking functions in SSL module for hardware acceleration of
736 * individual records.
737 *
738 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000739 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200740//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000741
742/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100743 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
744 *
745 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200746 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100747 *
748 * Comment this macro to disable support for SSLv2 Client Hello messages.
749 */
750#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
751
752/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100753 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
754 *
755 * Pick the ciphersuite according to the client's preferences rather than ours
756 * in the SSL Server module (POLARSSL_SSL_SRV_C).
757 *
758 * Uncomment this macro to respect client's ciphersuite order
759 */
760//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
761
762/**
Paul Bakker05decb22013-08-15 13:33:48 +0200763 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
764 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200765 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200766 *
767 * Comment this macro to disable support for the max_fragment_length extension
768 */
769#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
770
771/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200772 * \def POLARSSL_SSL_PROTO_SSL3
773 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200774 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200775 *
776 * Requires: POLARSSL_MD5_C
777 * POLARSSL_SHA1_C
778 *
779 * Comment this macro to disable support for SSL 3.0
780 */
781#define POLARSSL_SSL_PROTO_SSL3
782
783/**
784 * \def POLARSSL_SSL_PROTO_TLS1
785 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200786 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200787 *
788 * Requires: POLARSSL_MD5_C
789 * POLARSSL_SHA1_C
790 *
791 * Comment this macro to disable support for TLS 1.0
792 */
793#define POLARSSL_SSL_PROTO_TLS1
794
795/**
796 * \def POLARSSL_SSL_PROTO_TLS1_1
797 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200798 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200799 *
800 * Requires: POLARSSL_MD5_C
801 * POLARSSL_SHA1_C
802 *
803 * Comment this macro to disable support for TLS 1.1
804 */
805#define POLARSSL_SSL_PROTO_TLS1_1
806
807/**
808 * \def POLARSSL_SSL_PROTO_TLS1_2
809 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200810 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200811 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100812 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200813 * (Depends on ciphersuites)
814 *
815 * Comment this macro to disable support for TLS 1.2
816 */
817#define POLARSSL_SSL_PROTO_TLS1_2
818
819/**
Paul Bakkera503a632013-08-14 13:48:06 +0200820 * \def POLARSSL_SSL_SESSION_TICKETS
821 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200822 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200823 *
824 * Requires: POLARSSL_AES_C
825 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200826 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200827 *
828 * Comment this macro to disable support for SSL session tickets
829 */
830#define POLARSSL_SSL_SESSION_TICKETS
831
832/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200833 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
834 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200835 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200836 *
837 * Comment this macro to disable support for server name indication in SSL
838 */
839#define POLARSSL_SSL_SERVER_NAME_INDICATION
840
841/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200842 * \def POLARSSL_SSL_TRUNCATED_HMAC
843 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200844 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200845 *
846 * Comment this macro to disable support for truncated HMAC in SSL
847 */
848#define POLARSSL_SSL_TRUNCATED_HMAC
849
850/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100851 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100852 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100853 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100854 *
855 * This is disabled by default since it breaks binary compatibility with the
856 * 1.3.x line. If you choose to enable it, you will need to rebuild your
857 * application against the new header files, relinking will not be enough.
858 * It will be enabled by default, or no longer an option, in the 1.4 branch.
859 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100860 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100861 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +0100862//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100863
864/**
Paul Bakker2466d932013-09-28 14:40:38 +0200865 * \def POLARSSL_THREADING_ALT
866 *
867 * Provide your own alternate threading implementation.
868 *
869 * Requires: POLARSSL_THREADING_C
870 *
871 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200872 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200873//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200874
875/**
Paul Bakker2466d932013-09-28 14:40:38 +0200876 * \def POLARSSL_THREADING_PTHREAD
877 *
878 * Enable the pthread wrapper layer for the threading layer.
879 *
880 * Requires: POLARSSL_THREADING_C
881 *
882 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200883 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200884//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200885
886/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200887 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
888 *
889 * If set, the X509 parser will not break-off when parsing an X509 certificate
890 * and encountering an extension in a v1 or v2 certificate.
891 *
892 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200893 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200894//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200895
896/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000897 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
898 *
899 * If set, the X509 parser will not break-off when parsing an X509 certificate
900 * and encountering an unknown critical extension.
901 *
902 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000903 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200904//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000905
906/**
907 * \def POLARSSL_ZLIB_SUPPORT
908 *
909 * If set, the SSL/TLS module uses ZLIB to support compression and
910 * decompression of packet data.
911 *
912 * Used in: library/ssl_tls.c
913 * library/ssl_cli.c
914 * library/ssl_srv.c
915 *
916 * This feature requires zlib library and headers to be present.
917 *
918 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000919 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200920//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200921/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000922
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000923/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000924 * \name SECTION: PolarSSL modules
925 *
926 * This section enables or disables entire modules in PolarSSL
927 * \{
928 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000929
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000930/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +0100931 * \def POLARSSL_AESNI_C
932 *
933 * Enable AES-NI support on x86-64.
934 *
935 * Module: library/aesni.c
936 * Caller: library/aes.c
937 *
938 * Requires: POLARSSL_HAVE_ASM
939 *
940 * This modules adds support for the AES-NI instructions on x86-64
941 */
942#define POLARSSL_AESNI_C
943
944/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000945 * \def POLARSSL_AES_C
946 *
947 * Enable the AES block cipher.
948 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000949 * Module: library/aes.c
950 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000951 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000952 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000953 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000954 * This module enables the following ciphersuites (if other requisites are
955 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100956 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
957 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
958 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
959 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
960 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
961 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
962 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
963 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
964 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
965 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
966 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
967 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200968 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
969 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
970 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
971 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
972 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000973 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200974 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100975 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200976 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
977 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
978 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
979 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
980 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
981 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
982 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
983 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
984 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
985 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
986 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
987 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
988 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
989 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
990 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
991 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
992 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
993 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
994 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
995 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
996 * TLS_RSA_WITH_AES_256_GCM_SHA384
997 * TLS_RSA_WITH_AES_256_CBC_SHA256
998 * TLS_RSA_WITH_AES_256_CBC_SHA
999 * TLS_RSA_WITH_AES_128_GCM_SHA256
1000 * TLS_RSA_WITH_AES_128_CBC_SHA256
1001 * TLS_RSA_WITH_AES_128_CBC_SHA
1002 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1003 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1004 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1005 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1006 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1007 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1008 * TLS_PSK_WITH_AES_256_GCM_SHA384
1009 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001010 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001011 * TLS_PSK_WITH_AES_128_GCM_SHA256
1012 * TLS_PSK_WITH_AES_128_CBC_SHA256
1013 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001014 *
Paul Bakkercff68422013-09-15 20:43:33 +02001015 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001016 */
Paul Bakker40e46942009-01-03 21:51:57 +00001017#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001018
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001019/**
1020 * \def POLARSSL_ARC4_C
1021 *
1022 * Enable the ARCFOUR stream cipher.
1023 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001024 * Module: library/arc4.c
1025 * Caller: library/ssl_tls.c
1026 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001027 * This module enables the following ciphersuites (if other requisites are
1028 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001029 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1030 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001031 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001032 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001033 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1034 * TLS_DHE_PSK_WITH_RC4_128_SHA
1035 * TLS_RSA_WITH_RC4_128_SHA
1036 * TLS_RSA_WITH_RC4_128_MD5
1037 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001038 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001039 */
Paul Bakker40e46942009-01-03 21:51:57 +00001040#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001041
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001042/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001043 * \def POLARSSL_ASN1_PARSE_C
1044 *
1045 * Enable the generic ASN1 parser.
1046 *
1047 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001048 * Caller: library/x509.c
1049 * library/dhm.c
1050 * library/pkcs12.c
1051 * library/pkcs5.c
1052 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001053 */
1054#define POLARSSL_ASN1_PARSE_C
1055
1056/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001057 * \def POLARSSL_ASN1_WRITE_C
1058 *
1059 * Enable the generic ASN1 writer.
1060 *
1061 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001062 * Caller: library/ecdsa.c
1063 * library/pkwrite.c
1064 * library/x509_create.c
1065 * library/x509write_crt.c
1066 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001067 */
1068#define POLARSSL_ASN1_WRITE_C
1069
1070/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001071 * \def POLARSSL_BASE64_C
1072 *
1073 * Enable the Base64 module.
1074 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001075 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001076 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001077 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001078 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001079 */
Paul Bakker40e46942009-01-03 21:51:57 +00001080#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001081
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001082/**
1083 * \def POLARSSL_BIGNUM_C
1084 *
Paul Bakker9a736322012-11-14 12:39:52 +00001085 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001086 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001087 * Module: library/bignum.c
1088 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001089 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001090 * library/rsa.c
1091 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001092 *
1093 * This module is required for RSA and DHM support.
1094 */
Paul Bakker40e46942009-01-03 21:51:57 +00001095#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001096
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001097/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001098 * \def POLARSSL_BLOWFISH_C
1099 *
1100 * Enable the Blowfish block cipher.
1101 *
1102 * Module: library/blowfish.c
1103 */
1104#define POLARSSL_BLOWFISH_C
1105
1106/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001107 * \def POLARSSL_CAMELLIA_C
1108 *
1109 * Enable the Camellia block cipher.
1110 *
Paul Bakker38119b12009-01-10 23:31:23 +00001111 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001112 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001113 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001114 * This module enables the following ciphersuites (if other requisites are
1115 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001116 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1117 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1118 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1119 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1120 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1121 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1122 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1123 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001124 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1125 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1126 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1127 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1128 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001129 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001130 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1131 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1132 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1133 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1134 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1135 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1136 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1137 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1138 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1139 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1140 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1141 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1142 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1143 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1144 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1145 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1146 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1147 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1148 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1149 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1150 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1151 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1152 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1153 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1154 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1155 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1156 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1157 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001158 */
1159#define POLARSSL_CAMELLIA_C
1160
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001161/**
1162 * \def POLARSSL_CERTS_C
1163 *
1164 * Enable the test certificates.
1165 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001166 * Module: library/certs.c
1167 * Caller:
1168 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001169 * Requires: POLARSSL_PEM_PARSE_C
1170 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001171 * This module is used for testing (ssl_client/server).
1172 */
Paul Bakker40e46942009-01-03 21:51:57 +00001173#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001174
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001175/**
1176 * \def POLARSSL_CIPHER_C
1177 *
1178 * Enable the generic cipher layer.
1179 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001180 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001181 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001182 *
1183 * Uncomment to enable generic cipher wrappers.
1184 */
1185#define POLARSSL_CIPHER_C
1186
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001187/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001188 * \def POLARSSL_CTR_DRBG_C
1189 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001190 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001191 *
1192 * Module: library/ctr_drbg.c
1193 * Caller:
1194 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001195 * Requires: POLARSSL_AES_C
1196 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001197 * This module provides the CTR_DRBG AES-256 random number generator.
1198 */
1199#define POLARSSL_CTR_DRBG_C
1200
1201/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001202 * \def POLARSSL_DEBUG_C
1203 *
1204 * Enable the debug functions.
1205 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001206 * Module: library/debug.c
1207 * Caller: library/ssl_cli.c
1208 * library/ssl_srv.c
1209 * library/ssl_tls.c
1210 *
1211 * This module provides debugging functions.
1212 */
Paul Bakker40e46942009-01-03 21:51:57 +00001213#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001214
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001215/**
1216 * \def POLARSSL_DES_C
1217 *
1218 * Enable the DES block cipher.
1219 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001220 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001221 * Caller: library/pem.c
1222 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001223 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001224 * This module enables the following ciphersuites (if other requisites are
1225 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001226 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1227 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001228 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001229 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001230 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1231 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1232 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1233 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1234 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001235 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001236 *
Paul Bakkercff68422013-09-15 20:43:33 +02001237 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001238 */
Paul Bakker40e46942009-01-03 21:51:57 +00001239#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001240
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001241/**
1242 * \def POLARSSL_DHM_C
1243 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001244 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001245 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001246 * Module: library/dhm.c
1247 * Caller: library/ssl_cli.c
1248 * library/ssl_srv.c
1249 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001250 * This module is used by the following key exchanges:
1251 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001252 */
Paul Bakker40e46942009-01-03 21:51:57 +00001253#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001254
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001255/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001256 * \def POLARSSL_ECDH_C
1257 *
1258 * Enable the elliptic curve Diffie-Hellman library.
1259 *
1260 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001261 * Caller: library/ssl_cli.c
1262 * library/ssl_srv.c
1263 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001264 * This module is used by the following key exchanges:
1265 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001266 *
1267 * Requires: POLARSSL_ECP_C
1268 */
1269#define POLARSSL_ECDH_C
1270
1271/**
1272 * \def POLARSSL_ECDSA_C
1273 *
1274 * Enable the elliptic curve DSA library.
1275 *
1276 * Module: library/ecdsa.c
1277 * Caller:
1278 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001279 * This module is used by the following key exchanges:
1280 * ECDHE-ECDSA
1281 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001282 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001283 */
1284#define POLARSSL_ECDSA_C
1285
1286/**
1287 * \def POLARSSL_ECP_C
1288 *
1289 * Enable the elliptic curve over GF(p) library.
1290 *
1291 * Module: library/ecp.c
1292 * Caller: library/ecdh.c
1293 * library/ecdsa.c
1294 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001295 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001296 */
1297#define POLARSSL_ECP_C
1298
1299/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001300 * \def POLARSSL_ENTROPY_C
1301 *
1302 * Enable the platform-specific entropy code.
1303 *
1304 * Module: library/entropy.c
1305 * Caller:
1306 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001307 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001308 *
1309 * This module provides a generic entropy pool
1310 */
1311#define POLARSSL_ENTROPY_C
1312
1313/**
Paul Bakker9d781402011-05-09 16:17:09 +00001314 * \def POLARSSL_ERROR_C
1315 *
1316 * Enable error code to error string conversion.
1317 *
1318 * Module: library/error.c
1319 * Caller:
1320 *
1321 * This module enables err_strerror().
1322 */
1323#define POLARSSL_ERROR_C
1324
1325/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001326 * \def POLARSSL_GCM_C
1327 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001328 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001329 *
1330 * Module: library/gcm.c
1331 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001332 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001333 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001334 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1335 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001336 */
1337#define POLARSSL_GCM_C
1338
1339/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001340 * \def POLARSSL_HAVEGE_C
1341 *
1342 * Enable the HAVEGE random generator.
1343 *
Paul Bakker2a844242013-06-24 13:01:53 +02001344 * Warning: the HAVEGE random generator is not suitable for virtualized
1345 * environments
1346 *
1347 * Warning: the HAVEGE random generator is dependent on timing and specific
1348 * processor traits. It is therefore not advised to use HAVEGE as
1349 * your applications primary random generator or primary entropy pool
1350 * input. As a secondary input to your entropy pool, it IS able add
1351 * the (limited) extra entropy it provides.
1352 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001353 * Module: library/havege.c
1354 * Caller:
1355 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001356 * Requires: POLARSSL_TIMING_C
1357 *
Paul Bakker2a844242013-06-24 13:01:53 +02001358 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001359 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001360//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001361
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001362/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001363 * \def POLARSSL_HMAC_DRBG_C
1364 *
1365 * Enable the HMAC_DRBG random generator.
1366 *
1367 * Module: library/hmac_drbg.c
1368 * Caller:
1369 *
1370 * Requires: POLARSSL_MD_C
1371 *
1372 * Uncomment to enable the HMAC_DRBG random number geerator.
1373 */
1374#define POLARSSL_HMAC_DRBG_C
1375
1376/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001377 * \def POLARSSL_MD_C
1378 *
1379 * Enable the generic message digest layer.
1380 *
Paul Bakker17373852011-01-06 14:20:01 +00001381 * Module: library/md.c
1382 * Caller:
1383 *
1384 * Uncomment to enable generic message digest wrappers.
1385 */
1386#define POLARSSL_MD_C
1387
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001388/**
1389 * \def POLARSSL_MD2_C
1390 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001391 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001392 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001393 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001394 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001395 *
1396 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001397 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001398//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001399
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001400/**
1401 * \def POLARSSL_MD4_C
1402 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001403 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001404 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001405 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001406 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001407 *
1408 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001409 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001410//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001411
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001412/**
1413 * \def POLARSSL_MD5_C
1414 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001415 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001416 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001417 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001418 * Caller: library/md.c
1419 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001420 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001421 *
1422 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001423 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001424 */
Paul Bakker40e46942009-01-03 21:51:57 +00001425#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001426
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001427/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001428 * \def POLARSSL_MEMORY_C
1429 *
1430 * Enable the memory allocation layer.
1431 * By default PolarSSL uses the system-provided malloc() and free().
1432 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1433 * are defined and unmodified)
1434 *
1435 * This allows different allocators (self-implemented or provided)
1436 *
1437 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001438 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001439//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001440
1441/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001442 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1443 *
1444 * Enable the buffer allocator implementation that makes use of a (stack)
1445 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1446 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001447 *
1448 * Module: library/memory_buffer_alloc.c
1449 *
1450 * Requires: POLARSSL_MEMORY_C
1451 *
1452 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001453 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001454//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001455
1456/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001457 * \def POLARSSL_NET_C
1458 *
1459 * Enable the TCP/IP networking routines.
1460 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001461 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001462 *
1463 * This module provides TCP/IP networking routines.
1464 */
Paul Bakker40e46942009-01-03 21:51:57 +00001465#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001466
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001467/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001468 * \def POLARSSL_OID_C
1469 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001470 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001471 *
1472 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001473 * Caller: library/asn1write.c
1474 * library/pkcs5.c
1475 * library/pkparse.c
1476 * library/pkwrite.c
1477 * library/rsa.c
1478 * library/x509.c
1479 * library/x509_create.c
1480 * library/x509_crl.c
1481 * library/x509_crt.c
1482 * library/x509_csr.c
1483 * library/x509write_crt.c
1484 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001485 *
1486 * This modules translates between OIDs and internal values.
1487 */
1488#define POLARSSL_OID_C
1489
1490/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001491 * \def POLARSSL_PADLOCK_C
1492 *
1493 * Enable VIA Padlock support on x86.
1494 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001495 * Module: library/padlock.c
1496 * Caller: library/aes.c
1497 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001498 * Requires: POLARSSL_HAVE_ASM
1499 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001500 * This modules adds support for the VIA PadLock on x86.
1501 */
Paul Bakker40e46942009-01-03 21:51:57 +00001502#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001503
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001504/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001505 * \def POLARSSL_PBKDF2_C
1506 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001507 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001508 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001509 *
1510 * Module: library/pbkdf2.c
1511 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001512 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001513 *
1514 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001515 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001516#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001517
1518/**
Paul Bakkercff68422013-09-15 20:43:33 +02001519 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001520 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001521 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001522 *
1523 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001524 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001525 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001526 * library/x509_crl.c
1527 * library/x509_crt.c
1528 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001529 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001530 * Requires: POLARSSL_BASE64_C
1531 *
Paul Bakkercff68422013-09-15 20:43:33 +02001532 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001533 */
Paul Bakkercff68422013-09-15 20:43:33 +02001534#define POLARSSL_PEM_PARSE_C
1535
1536/**
1537 * \def POLARSSL_PEM_WRITE_C
1538 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001539 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001540 *
1541 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001542 * Caller: library/pkwrite.c
1543 * library/x509write_crt.c
1544 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001545 *
1546 * Requires: POLARSSL_BASE64_C
1547 *
1548 * This modules adds support for encoding / writing PEM files.
1549 */
1550#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001551
1552/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001553 * \def POLARSSL_PK_C
1554 *
1555 * Enable the generic public (asymetric) key layer.
1556 *
1557 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001558 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001559 * library/ssl_cli.c
1560 * library/ssl_srv.c
1561 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001562 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1563 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001564 * Uncomment to enable generic public key wrappers.
1565 */
1566#define POLARSSL_PK_C
1567
1568/**
Paul Bakker4606c732013-09-15 17:04:23 +02001569 * \def POLARSSL_PK_PARSE_C
1570 *
1571 * Enable the generic public (asymetric) key parser.
1572 *
1573 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001574 * Caller: library/x509_crt.c
1575 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001576 *
1577 * Requires: POLARSSL_PK_C
1578 *
1579 * Uncomment to enable generic public key parse functions.
1580 */
1581#define POLARSSL_PK_PARSE_C
1582
1583/**
1584 * \def POLARSSL_PK_WRITE_C
1585 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001586 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001587 *
1588 * Module: library/pkwrite.c
1589 * Caller: library/x509write.c
1590 *
1591 * Requires: POLARSSL_PK_C
1592 *
1593 * Uncomment to enable generic public key write functions.
1594 */
1595#define POLARSSL_PK_WRITE_C
1596
1597/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001598 * \def POLARSSL_PKCS5_C
1599 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001600 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001601 *
1602 * Module: library/pkcs5.c
1603 *
1604 * Requires: POLARSSL_MD_C
1605 *
1606 * This module adds support for the PKCS#5 functions.
1607 */
1608#define POLARSSL_PKCS5_C
1609
1610/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001611 * \def POLARSSL_PKCS11_C
1612 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001613 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001614 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001615 * Module: library/pkcs11.c
1616 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001617 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001618 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001619 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001620 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001621 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001622 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001623//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001624
1625/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001626 * \def POLARSSL_PKCS12_C
1627 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001628 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001629 * Adds algorithms for parsing PKCS#8 encrypted private keys
1630 *
1631 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001632 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001633 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001634 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1635 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001636 *
1637 * This module enables PKCS#12 functions.
1638 */
1639#define POLARSSL_PKCS12_C
1640
1641/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001642 * \def POLARSSL_PLATFORM_C
1643 *
1644 * Enable the platform abstraction layer that allows you to re-assign
1645 * functions like malloc(), free(), printf(), fprintf()
1646 *
1647 * Module: library/platform.c
1648 * Caller: Most other .c files
1649 *
1650 * This module enables abstraction of common (libc) functions.
1651 */
1652#define POLARSSL_PLATFORM_C
1653
1654/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001655 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001656 *
1657 * Enable the RIPEMD-160 hash algorithm.
1658 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001659 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001660 * Caller: library/md.c
1661 *
1662 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001663#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001664
1665/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001666 * \def POLARSSL_RSA_C
1667 *
1668 * Enable the RSA public-key cryptosystem.
1669 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001670 * Module: library/rsa.c
1671 * Caller: library/ssl_cli.c
1672 * library/ssl_srv.c
1673 * library/ssl_tls.c
1674 * library/x509.c
1675 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001676 * This module is used by the following key exchanges:
1677 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001678 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001679 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001680 */
Paul Bakker40e46942009-01-03 21:51:57 +00001681#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001682
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001683/**
1684 * \def POLARSSL_SHA1_C
1685 *
1686 * Enable the SHA1 cryptographic hash algorithm.
1687 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001688 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001689 * Caller: library/md.c
1690 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001691 * library/ssl_srv.c
1692 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001693 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001694 *
1695 * This module is required for SSL/TLS and SHA1-signed certificates.
1696 */
Paul Bakker40e46942009-01-03 21:51:57 +00001697#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001698
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001699/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001700 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001701 *
1702 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001703 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001704 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001705 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001706 * Caller: library/entropy.c
1707 * library/md.c
1708 * library/ssl_cli.c
1709 * library/ssl_srv.c
1710 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001711 *
1712 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001713 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001714 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001715#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001716
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001717/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001718 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001719 *
1720 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001721 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001722 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001723 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001724 * Caller: library/entropy.c
1725 * library/md.c
1726 * library/ssl_cli.c
1727 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001728 *
1729 * This module adds support for SHA-384 and SHA-512.
1730 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001731#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001732
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001733/**
Paul Bakker0a597072012-09-25 21:55:46 +00001734 * \def POLARSSL_SSL_CACHE_C
1735 *
1736 * Enable simple SSL cache implementation.
1737 *
1738 * Module: library/ssl_cache.c
1739 * Caller:
1740 *
1741 * Requires: POLARSSL_SSL_CACHE_C
1742 */
1743#define POLARSSL_SSL_CACHE_C
1744
1745/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001746 * \def POLARSSL_SSL_CLI_C
1747 *
1748 * Enable the SSL/TLS client code.
1749 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001750 * Module: library/ssl_cli.c
1751 * Caller:
1752 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001753 * Requires: POLARSSL_SSL_TLS_C
1754 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001755 * This module is required for SSL/TLS client support.
1756 */
Paul Bakker40e46942009-01-03 21:51:57 +00001757#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001758
Paul Bakker9a736322012-11-14 12:39:52 +00001759/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001760 * \def POLARSSL_SSL_SRV_C
1761 *
1762 * Enable the SSL/TLS server code.
1763 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001764 * Module: library/ssl_srv.c
1765 * Caller:
1766 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001767 * Requires: POLARSSL_SSL_TLS_C
1768 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001769 * This module is required for SSL/TLS server support.
1770 */
Paul Bakker40e46942009-01-03 21:51:57 +00001771#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001772
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001773/**
1774 * \def POLARSSL_SSL_TLS_C
1775 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001776 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001777 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001778 * Module: library/ssl_tls.c
1779 * Caller: library/ssl_cli.c
1780 * library/ssl_srv.c
1781 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001782 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001783 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001784 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001785 * This module is required for SSL/TLS.
1786 */
Paul Bakker40e46942009-01-03 21:51:57 +00001787#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001788
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001789/**
Paul Bakker2466d932013-09-28 14:40:38 +02001790 * \def POLARSSL_THREADING_C
1791 *
1792 * Enable the threading abstraction layer.
1793 * By default PolarSSL assumes it is used in a non-threaded environment or that
1794 * contexts are not shared between threads. If you do intend to use contexts
1795 * between threads, you will need to enable this layer to prevent race
1796 * conditions.
1797 *
1798 * Module: library/threading.c
1799 *
1800 * This allows different threading implementations (self-implemented or
1801 * provided).
1802 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001803 * You will have to enable either POLARSSL_THREADING_ALT or
1804 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001805 *
1806 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001807 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001808//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001809
1810/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001811 * \def POLARSSL_TIMING_C
1812 *
1813 * Enable the portable timing interface.
1814 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001815 * Module: library/timing.c
1816 * Caller: library/havege.c
1817 *
1818 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001819 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001820#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001821
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001822/**
1823 * \def POLARSSL_VERSION_C
1824 *
1825 * Enable run-time version information.
1826 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001827 * Module: library/version.c
1828 *
1829 * This module provides run-time version information.
1830 */
1831#define POLARSSL_VERSION_C
1832
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001833/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001834 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001835 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001836 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001837 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001838 * Module: library/x509.c
1839 * Caller: library/x509_crl.c
1840 * library/x509_crt.c
1841 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001842 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001843 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001844 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001845 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001846 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001847 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001848#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001849
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001850/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001851 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001852 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001853 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001854 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001855 * Module: library/x509_crt.c
1856 * Caller: library/ssl_cli.c
1857 * library/ssl_srv.c
1858 * library/ssl_tls.c
1859 *
1860 * Requires: POLARSSL_X509_USE_C
1861 *
1862 * This module is required for X.509 certificate parsing.
1863 */
1864#define POLARSSL_X509_CRT_PARSE_C
1865
1866/**
1867 * \def POLARSSL_X509_CRL_PARSE_C
1868 *
1869 * Enable X.509 CRL parsing.
1870 *
1871 * Module: library/x509_crl.c
1872 * Caller: library/x509_crt.c
1873 *
1874 * Requires: POLARSSL_X509_USE_C
1875 *
1876 * This module is required for X.509 CRL parsing.
1877 */
1878#define POLARSSL_X509_CRL_PARSE_C
1879
1880/**
1881 * \def POLARSSL_X509_CSR_PARSE_C
1882 *
1883 * Enable X.509 Certificate Signing Request (CSR) parsing.
1884 *
1885 * Module: library/x509_csr.c
1886 * Caller: library/x509_crt_write.c
1887 *
1888 * Requires: POLARSSL_X509_USE_C
1889 *
1890 * This module is used for reading X.509 certificate request.
1891 */
1892#define POLARSSL_X509_CSR_PARSE_C
1893
1894/**
1895 * \def POLARSSL_X509_CREATE_C
1896 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001897 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001898 *
1899 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001900 *
Paul Bakker4606c732013-09-15 17:04:23 +02001901 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001902 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001903 * This module is the basis for creating X.509 certificates and CSRs.
1904 */
1905#define POLARSSL_X509_CREATE_C
1906
1907/**
1908 * \def POLARSSL_X509_CRT_WRITE_C
1909 *
1910 * Enable creating X.509 certificates.
1911 *
1912 * Module: library/x509_crt_write.c
1913 *
1914 * Requires: POLARSSL_CREATE_C
1915 *
1916 * This module is required for X.509 certificate creation.
1917 */
1918#define POLARSSL_X509_CRT_WRITE_C
1919
1920/**
1921 * \def POLARSSL_X509_CSR_WRITE_C
1922 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001923 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001924 *
1925 * Module: library/x509_csr_write.c
1926 *
1927 * Requires: POLARSSL_CREATE_C
1928 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001929 * This module is required for X.509 certificate request writing.
1930 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001931#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001932
1933/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001934 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001935 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001936 * Enable the XTEA block cipher.
1937 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001938 * Module: library/xtea.c
1939 * Caller:
1940 */
1941#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001942
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001943/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001944
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001945/**
1946 * \name SECTION: Module configuration options
1947 *
1948 * This section allows for the setting of module specific sizes and
1949 * configuration options. The default values are already present in the
1950 * relevant header files and should suffice for the regular use cases.
1951 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1952 * only if you have a good reason and know the consequences.
1953 *
1954 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1955 * header file take precedence.
1956 *
1957 * Please check the respective header file for documentation on these
1958 * parameters (to prevent duplicate documentation).
1959 *
1960 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1961 * \{
1962 */
1963//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1964
1965#if defined(POLARSSL_CONFIG_OPTIONS)
1966
1967// MPI / BIGNUM options
1968//
1969#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1970#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1971
1972// CTR_DRBG options
1973//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001974#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 +02001975#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1976#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1977#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1978#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1979
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01001980// HMAC_DRBG options
1981//
1982#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1983#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1984#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1985#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1986
Paul Bakkere1b665e2013-12-11 16:02:58 +01001987// ECP options
1988//
1989#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
1990#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
Manuel Pégourié-Gonnard9e4191c2013-12-30 18:41:16 +01001991#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Paul Bakkere1b665e2013-12-11 16:02:58 +01001992
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001993// Entropy options
1994//
1995#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1996#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1997
Paul Bakker6e339b52013-07-03 13:37:05 +02001998// Memory options
1999#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
2000#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
2001#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
2002
Paul Bakker747a83a2014-02-01 22:50:07 +01002003// Platform options
2004#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2005#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2006
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002007// SSL Cache options
2008//
2009#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2010#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
2011
2012// SSL options
2013//
2014#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02002015#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002016
2017#endif /* POLARSSL_CONFIG_OPTIONS */
2018
2019/* \} name */
2020
Paul Bakker7ad00f92013-04-18 23:05:25 +02002021/*
2022 * Sanity checks on defines and dependencies
2023 */
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002024#if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
2025#error "POLARSSL_AESNI_C defined, but not all prerequisites"
2026#endif
2027
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002028#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
2029#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002030#endif
2031
2032#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
2033#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
2034#endif
2035
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002036#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
2037#error "POLARSSL_DHM_C defined, but not all prerequisites"
2038#endif
2039
Paul Bakker7ad00f92013-04-18 23:05:25 +02002040#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
2041#error "POLARSSL_ECDH_C defined, but not all prerequisites"
2042#endif
2043
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02002044#if defined(POLARSSL_ECDSA_C) && \
2045 ( !defined(POLARSSL_ECP_C) || \
2046 !defined(POLARSSL_ASN1_PARSE_C) || \
2047 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002048#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
2049#endif
2050
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +01002051#if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C)
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +01002052#error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
2053#endif
2054
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01002055#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
2056 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
2057 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
2058 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
2059 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
2060 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
2061 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
2062 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
Manuel Pégourié-Gonnardffd94cc2014-01-28 20:11:07 +01002063 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \
2064 !defined(POLARSSL_ECP_DP_M255_ENABLED) && \
2065 !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \
2066 !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \
2067 !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002068#error "POLARSSL_ECP_C defined, but not all prerequisites"
2069#endif
2070
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002071#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
2072 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02002073#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
2074#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002075#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
2076 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
2077#error "CTR_DRBG_ENTROPY_LEN value too high"
2078#endif
2079#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
2080 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
2081#error "CTR_DRBG_ENTROPY_LEN value too high"
2082#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02002083
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02002084#if defined(POLARSSL_GCM_C) && ( \
2085 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002086#error "POLARSSL_GCM_C defined, but not all prerequisites"
2087#endif
2088
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002089#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
2090#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
2091#endif
2092
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01002093#if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C)
2094#error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites"
2095#endif
2096
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01002097#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
2098 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2099#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
2100#endif
2101
2102#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
2103 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2104#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
2105#endif
2106
Paul Bakkere07f41d2013-04-19 09:08:57 +02002107#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
2108#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
2109#endif
2110
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02002111#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
2112 !defined(POLARSSL_ECDH_C)
2113#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
2114#endif
2115
Paul Bakkere07f41d2013-04-19 09:08:57 +02002116#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2117 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002118 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002119#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2120#endif
2121
2122#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2123 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002124 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002125#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2126#endif
2127
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002128#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2129 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002130 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002131#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2132#endif
2133
Paul Bakkere07f41d2013-04-19 09:08:57 +02002134#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002135 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002136 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002137#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2138#endif
2139
2140#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002141 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002142 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002143#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2144#endif
2145
Paul Bakker6e339b52013-07-03 13:37:05 +02002146#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
2147#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2148#endif
2149
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002150#if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2151#error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2152#endif
2153
Paul Bakker7ad00f92013-04-18 23:05:25 +02002154#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2155#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2156#endif
2157
Paul Bakkercff68422013-09-15 20:43:33 +02002158#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2159#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2160#endif
2161
2162#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2163#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002164#endif
2165
Paul Bakker4606c732013-09-15 17:04:23 +02002166#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2167#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2168#endif
2169
2170#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2171#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2172#endif
2173
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002174#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002175#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2176#endif
2177
2178#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2179 !defined(POLARSSL_OID_C) )
2180#error "POLARSSL_RSA_C defined, but not all prerequisites"
2181#endif
2182
Manuel Pégourié-Gonnardce7c6fd2014-01-24 14:37:29 +01002183#if defined(POLARSSL_RSASSA_PSS_CERTIFICATES) && \
2184 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_PKCS1_V21) )
2185#error "POLARSSL_RSASSA_PSS_CERTIFICATES defined, but not all prerequisites"
2186#endif
2187
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002188#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2189 !defined(POLARSSL_SHA1_C) )
2190#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2191#endif
2192
2193#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2194 !defined(POLARSSL_SHA1_C) )
2195#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2196#endif
2197
2198#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2199 !defined(POLARSSL_SHA1_C) )
2200#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2201#endif
2202
2203#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2204 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2205#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2206#endif
2207
Paul Bakker7ad00f92013-04-18 23:05:25 +02002208#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2209#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2210#endif
2211
Paul Bakker577e0062013-08-28 11:57:20 +02002212#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002213 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002214#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2215#endif
2216
2217#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2218#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2219#endif
2220
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002221#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2222 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2223 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2224#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2225#endif
2226
2227#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2228 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2229#error "Illegal protocol selection"
2230#endif
2231
2232#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2233 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2234#error "Illegal protocol selection"
2235#endif
2236
2237#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2238 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2239 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2240#error "Illegal protocol selection"
2241#endif
2242
Paul Bakker59da0a42013-08-19 13:27:17 +02002243#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002244 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2245 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002246#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2247#endif
2248
Paul Bakker2466d932013-09-28 14:40:38 +02002249#if defined(POLARSSL_THREADING_PTHREAD)
2250#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2251#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2252#endif
2253#define POLARSSL_THREADING_IMPL
2254#endif
2255
2256#if defined(POLARSSL_THREADING_ALT)
2257#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2258#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2259#endif
2260#define POLARSSL_THREADING_IMPL
2261#endif
2262
2263#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2264#error "POLARSSL_THREADING_C defined, single threading implementation required"
2265#endif
2266#undef POLARSSL_THREADING_IMPL
2267
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002268#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002269 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002270 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002271#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002272#endif
2273
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002274#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2275 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2276 !defined(POLARSSL_PK_WRITE_C) )
2277#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2278#endif
2279
2280#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2281#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2282#endif
2283
2284#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2285#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2286#endif
2287
2288#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2289#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2290#endif
2291
2292#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2293#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2294#endif
2295
2296#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2297#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002298#endif
2299
Paul Bakker5121ce52009-01-03 21:22:43 +00002300#endif /* config.h */