blob: 6d7bd86c05df93ff368fd98b21616ffe03515f34 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakker37ca75d2011-01-06 12:28:03 +00004 * \brief Configuration options (set of defines)
5 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01006 * Copyright (C) 2006-2014, Brainspark B.V.
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
8 * This file is part of PolarSSL (http://www.polarssl.org)
Paul Bakker84f12b72010-07-18 10:13:04 +00009 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakkerb96f1542010-07-18 20:36:00 +000010 *
Paul Bakker77b385e2009-07-28 17:23:11 +000011 * All rights reserved.
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000012 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000013 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
Paul Bakker5121ce52009-01-03 21:22:43 +000027 * This set of compile-time options may be used to enable
28 * or disable features selectively, and reduce the global
29 * memory footprint.
30 */
Paul Bakker40e46942009-01-03 21:51:57 +000031#ifndef POLARSSL_CONFIG_H
32#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000033
Paul Bakkercce9d772011-11-18 14:26:47 +000034#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
Paul Bakker5121ce52009-01-03 21:22:43 +000035#define _CRT_SECURE_NO_DEPRECATE 1
36#endif
37
Paul Bakkerf3b86c12011-01-27 15:24:17 +000038/**
Paul Bakker0a62cd12011-01-21 11:00:08 +000039 * \name SECTION: System support
40 *
41 * This section sets system specific settings.
42 * \{
43 */
44
Paul Bakkerf3b86c12011-01-27 15:24:17 +000045/**
46 * \def POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000047 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000048 * The system uses 8-bit wide native integers.
49 *
50 * Uncomment if native integers are 8-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000051 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020052//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000053
Paul Bakkerf3b86c12011-01-27 15:24:17 +000054/**
55 * \def POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000056 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000057 * The system uses 16-bit wide native integers.
58 *
59 * Uncomment if native integers are 16-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000060 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020061//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000062
Paul Bakkerf3b86c12011-01-27 15:24:17 +000063/**
Paul Bakker62261d62012-10-02 12:19:31 +000064 * \def POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000065 *
Paul Bakker62261d62012-10-02 12:19:31 +000066 * The compiler supports the 'long long' type.
67 * (Only used on 32-bit platforms)
Paul Bakker5121ce52009-01-03 21:22:43 +000068 */
Paul Bakker62261d62012-10-02 12:19:31 +000069#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000070
Paul Bakkerf3b86c12011-01-27 15:24:17 +000071/**
72 * \def POLARSSL_HAVE_ASM
73 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020074 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000075 *
76 * Requires support for asm() in compiler.
77 *
78 * Used in:
79 * library/timing.c
80 * library/padlock.c
81 * include/polarssl/bn_mul.h
82 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020083 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000084 */
Paul Bakker40e46942009-01-03 21:51:57 +000085#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000086
Paul Bakkerf3b86c12011-01-27 15:24:17 +000087/**
88 * \def POLARSSL_HAVE_SSE2
89 *
Paul Bakkere23c3152012-10-01 14:42:47 +000090 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000091 *
Paul Bakker5121ce52009-01-03 21:22:43 +000092 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000093 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020094//#define POLARSSL_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020095
96/**
97 * \def POLARSSL_HAVE_TIME
98 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020099 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200100 *
101 * Comment if your system does not support time functions
102 */
103#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100104
105/**
106 * \def POLARSSL_HAVE_IPV6
107 *
108 * System supports the basic socket interface for IPv6 (RFC 3493),
Manuel Pégourié-Gonnard767f02c2013-12-13 16:23:39 +0100109 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100110 *
Manuel Pégourié-Gonnard13211352013-12-17 17:38:55 +0100111 * Note: on Windows/MingW, XP or higher is required.
112 *
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100113 * Comment if your system does not support the IPv6 socket interface
114 */
115#define POLARSSL_HAVE_IPV6
Paul Bakker747a83a2014-02-01 22:50:07 +0100116
117/**
Paul Bakkerdefc0ca2014-02-04 17:30:24 +0100118 * \def POLARSSL_PLATFORM_MEMORY
119 *
120 * Enable the memory allocation layer.
121 *
122 * By default PolarSSL uses the system-provided malloc() and free().
123 * This allows different allocators (self-implemented or provided) to be
124 * provided to the platform abstraction layer.
125 *
126 * Enabling POLARSSL_PLATFORM_MEMORY will provide "platform_set_malloc_free()"
127 * to allow you to set an alternative malloc() and free() function pointer.
128 *
129 * Requires: POLARSSL_PLATFORM_C
130 *
131 * Enable this layer to allow use of alternative memory allocators.
132 */
133//#define POLARSSL_PLATFORM_MEMORY
134
135/**
Paul Bakker747a83a2014-02-01 22:50:07 +0100136 * \def POLARSSL_PLATFORM_XXX_ALT
137 *
138 * Uncomment a macro to let PolarSSL support the function in the platform
139 * abstraction layer.
140 *
141 * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, PolarSSL will
142 * provide a function "platform_set_printf()" that allows you to set an
143 * alternative printf function pointer.
144 *
145 * All these define require POLARSSL_PLATFORM_C to be defined!
146 *
147 * Uncomment a macro to enable alternate implementation of specific base
148 * platform function
149 */
150//#define POLARSSL_PLATFORM_PRINTF_ALT
151//#define POLARSSL_PLATFORM_FPRINTF_ALT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200152/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000153
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000154/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000155 * \name SECTION: PolarSSL feature support
156 *
157 * This section sets support for features that are or are not needed
158 * within the modules that are enabled.
159 * \{
160 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000161
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000162/**
Paul Bakkerf2561b32014-02-06 15:11:55 +0100163 * \def POLARSSL_TIMING_ALT
164 *
165 * Uncomment to provide your own alternate implementation for hardclock(),
166 * get_timer(), set_alarm() and m_sleep().
167 *
168 * Only works if you have POLARSSL_TIMING_C enabled.
169 *
170 * You will need to provide a header "timing_alt.h" and an implementation at
171 * compile time.
172 */
173//#define POLARSSL_TIMING_ALT
174
175/**
Paul Bakker90995b52013-06-24 19:20:35 +0200176 * \def POLARSSL_XXX_ALT
177 *
178 * Uncomment a macro to let PolarSSL use your alternate core implementation of
179 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
180 * implementations). Keep in mind that the function prototypes should remain
181 * the same.
182 *
183 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
184 * provide the "struct aes_context" definition and omit the base function
185 * declarations and implementations. "aes_alt.h" will be included from
186 * "aes.h" to include the new function definitions.
187 *
188 * Uncomment a macro to enable alternate implementation for core algorithm
189 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200190 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200191//#define POLARSSL_AES_ALT
192//#define POLARSSL_ARC4_ALT
193//#define POLARSSL_BLOWFISH_ALT
194//#define POLARSSL_CAMELLIA_ALT
195//#define POLARSSL_DES_ALT
196//#define POLARSSL_XTEA_ALT
197//#define POLARSSL_MD2_ALT
198//#define POLARSSL_MD4_ALT
199//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100200//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200201//#define POLARSSL_SHA1_ALT
202//#define POLARSSL_SHA256_ALT
203//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200204
205/**
Paul Bakker15566e42011-04-24 21:19:15 +0000206 * \def POLARSSL_AES_ROM_TABLES
207 *
208 * Store the AES tables in ROM.
209 *
210 * Uncomment this macro to store the AES tables in ROM.
211 *
Paul Bakker15566e42011-04-24 21:19:15 +0000212 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200213//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000214
215/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200216 * \def POLARSSL_CIPHER_MODE_CBC
217 *
218 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
219 */
220#define POLARSSL_CIPHER_MODE_CBC
221
222/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000223 * \def POLARSSL_CIPHER_MODE_CFB
224 *
225 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
226 */
227#define POLARSSL_CIPHER_MODE_CFB
228
229/**
230 * \def POLARSSL_CIPHER_MODE_CTR
231 *
232 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
233 */
234#define POLARSSL_CIPHER_MODE_CTR
235
236/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000237 * \def POLARSSL_CIPHER_NULL_CIPHER
238 *
239 * Enable NULL cipher.
240 * Warning: Only do so when you know what you are doing. This allows for
241 * encryption or channels without any security!
242 *
243 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
244 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100245 * TLS_ECDH_ECDSA_WITH_NULL_SHA
246 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200247 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100248 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200249 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200250 * TLS_ECDHE_PSK_WITH_NULL_SHA256
251 * TLS_ECDHE_PSK_WITH_NULL_SHA
252 * TLS_DHE_PSK_WITH_NULL_SHA384
253 * TLS_DHE_PSK_WITH_NULL_SHA256
254 * TLS_DHE_PSK_WITH_NULL_SHA
255 * TLS_RSA_WITH_NULL_SHA256
256 * TLS_RSA_WITH_NULL_SHA
257 * TLS_RSA_WITH_NULL_MD5
258 * TLS_RSA_PSK_WITH_NULL_SHA384
259 * TLS_RSA_PSK_WITH_NULL_SHA256
260 * TLS_RSA_PSK_WITH_NULL_SHA
261 * TLS_PSK_WITH_NULL_SHA384
262 * TLS_PSK_WITH_NULL_SHA256
263 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000264 *
265 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200266#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000267 */
268
269/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200270 * \def POLARSSL_CIPHER_PADDING_XXX
271 *
272 * Uncomment or comment macros to add support for specific padding modes
273 * in the cipher layer with cipher modes that support padding (e.g. CBC)
274 *
275 * If you disable all padding modes, only full blocks can be used with CBC.
276 *
277 * Enable padding modes in the cipher layer.
278 */
279#define POLARSSL_CIPHER_PADDING_PKCS7
280#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
281#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
282#define POLARSSL_CIPHER_PADDING_ZEROS
283
284/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000285 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
286 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200287 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000288 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000289 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000290 *
291 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000292 * TLS_RSA_WITH_DES_CBC_SHA
293 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000294 *
295 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200296#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000297 */
298
299/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200300 * \def POLARSSL_ECP_XXXX_ENABLED
301 *
302 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200303 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200304 *
305 * Comment macros to disable the curve and functions for it
306 */
307#define POLARSSL_ECP_DP_SECP192R1_ENABLED
308#define POLARSSL_ECP_DP_SECP224R1_ENABLED
309#define POLARSSL_ECP_DP_SECP256R1_ENABLED
310#define POLARSSL_ECP_DP_SECP384R1_ENABLED
311#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100312#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100313#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100314#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200315#define POLARSSL_ECP_DP_BP256R1_ENABLED
316#define POLARSSL_ECP_DP_BP384R1_ENABLED
317#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100318//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
319#define POLARSSL_ECP_DP_M255_ENABLED
320//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
321//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200322
323/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200324 * \def POLARSSL_ECP_NIST_OPTIM
325 *
326 * Enable specific 'modulo p' routines for each NIST prime.
327 * Depending on the prime and architecture, makes operations 4 to 8 times
328 * faster on the corresponding curve.
329 *
330 * Comment this macro to disable NIST curves optimisation.
331 */
332#define POLARSSL_ECP_NIST_OPTIM
333
334/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100335 * \def POLARSSL_ECDSA_DETERMINISTIC
336 *
337 * Enable deterministic ECDSA (RFC 6979).
338 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
339 * may result in a compromise of the long-term signing key. This is avoided by
340 * the deterministic variant.
341 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100342 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100343 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100344 * Comment this macro to disable deterministic ECDSA.
345 */
346#define POLARSSL_ECDSA_DETERMINISTIC
347
348/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200349 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
350 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200351 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200352 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200353 * This enables the following ciphersuites (if other requisites are
354 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200355 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200356 * TLS_PSK_WITH_AES_256_CBC_SHA384
357 * TLS_PSK_WITH_AES_256_CBC_SHA
358 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
359 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
360 * TLS_PSK_WITH_AES_128_GCM_SHA256
361 * TLS_PSK_WITH_AES_128_CBC_SHA256
362 * TLS_PSK_WITH_AES_128_CBC_SHA
363 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
364 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
365 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
366 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200367 */
368#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
369
370/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200371 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
372 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200373 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200374 *
375 * Requires: POLARSSL_DHM_C
376 *
377 * This enables the following ciphersuites (if other requisites are
378 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200379 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200380 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
381 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
382 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
383 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
384 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
385 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
386 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
387 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
388 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
389 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
390 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200391 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200392#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200393
394/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200395 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
396 *
397 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
398 *
399 * Requires: POLARSSL_ECDH_C
400 *
401 * This enables the following ciphersuites (if other requisites are
402 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200403 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200404 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200405 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200406 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
407 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
408 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
409 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
410 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200411 */
412#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
413
414/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200415 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
416 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200417 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200418 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200419 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200420 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200421 *
422 * This enables the following ciphersuites (if other requisites are
423 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200424 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200425 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
426 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
427 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
428 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
429 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
430 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
431 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
432 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
433 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
434 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
435 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200436 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200437#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200438
439/**
440 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
441 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200442 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200443 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200444 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200445 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200446 *
447 * This enables the following ciphersuites (if other requisites are
448 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200449 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200450 * TLS_RSA_WITH_AES_256_CBC_SHA256
451 * TLS_RSA_WITH_AES_256_CBC_SHA
452 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200453 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200454 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
455 * TLS_RSA_WITH_AES_128_GCM_SHA256
456 * TLS_RSA_WITH_AES_128_CBC_SHA256
457 * TLS_RSA_WITH_AES_128_CBC_SHA
458 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
459 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
460 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200461 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200462 * TLS_RSA_WITH_RC4_128_SHA
463 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200464 */
465#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
466
467/**
468 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
469 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200470 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200471 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200472 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200473 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200474 *
475 * This enables the following ciphersuites (if other requisites are
476 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200477 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200478 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200479 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
480 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200481 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200482 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
483 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
484 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
485 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
486 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
487 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
488 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200489 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
490 */
491#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
492
493/**
494 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
495 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200496 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200497 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200498 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200499 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200500 *
501 * This enables the following ciphersuites (if other requisites are
502 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200503 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200504 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
505 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
506 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200507 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200508 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
509 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
510 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
511 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
512 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
513 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
514 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200515 */
516#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
517
518/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200519 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
520 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200521 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200522 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200523 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200524 *
525 * This enables the following ciphersuites (if other requisites are
526 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200527 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
528 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
529 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
530 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
531 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
532 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
533 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
534 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
535 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
536 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
537 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
538 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200539 */
540#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
541
542/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100543 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
544 *
545 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
546 *
547 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
548 *
549 * This enables the following ciphersuites (if other requisites are
550 * enabled as well):
551 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
552 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
553 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
554 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
555 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
556 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
557 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
558 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
559 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
560 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
561 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
562 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
563 */
564#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
565
566/**
567 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
568 *
569 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
570 *
571 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
572 *
573 * This enables the following ciphersuites (if other requisites are
574 * enabled as well):
575 * TLS_ECDH_RSA_WITH_RC4_128_SHA
576 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
577 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
578 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
579 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
580 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
581 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
582 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
583 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
584 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
585 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
586 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
587 */
588#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
589
590/**
Manuel Pégourié-Gonnard6fac3512014-03-19 16:39:52 +0100591 * \def POLARSSL_PK_PARSE_EC_EXTENDED
592 *
593 * Enhance support for reading EC keys using variants of SEC1 not allowed by
594 * RFC 5915 and RFC 5480.
595 *
596 * Currently this means parsing the SpecifiedECDomain choice of EC
597 * parameters (only known groups are supported, not arbitrary domains, to
598 * avoid validation issues).
599 *
600 * Disable if you only need to support RFC 5915 + 5480 key formats.
601 */
602#define POLARSSL_PK_PARSE_EC_EXTENDED
603
604/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200605 * \def POLARSSL_ERROR_STRERROR_BC
606 *
607 * Make available the backward compatible error_strerror() next to the
608 * current polarssl_strerror().
609 *
610 * Disable if you run into name conflicts and want to really remove the
611 * error_strerror()
612 */
613#define POLARSSL_ERROR_STRERROR_BC
614
615/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100616 * \def POLARSSL_ERROR_STRERROR_DUMMY
617 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200618 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100619 * third party libraries easier.
620 *
621 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200622 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100623 */
624#define POLARSSL_ERROR_STRERROR_DUMMY
625
626/**
Paul Bakker15566e42011-04-24 21:19:15 +0000627 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000628 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200629 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200630 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200631 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000632 */
Paul Bakker15566e42011-04-24 21:19:15 +0000633#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000634
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000635/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000636 * \def POLARSSL_FS_IO
637 *
638 * Enable functions that use the filesystem.
639 */
640#define POLARSSL_FS_IO
641
642/**
Paul Bakker43655f42011-12-15 20:11:16 +0000643 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
644 *
645 * Do not add default entropy sources. These are the platform specific,
646 * hardclock and HAVEGE based poll functions.
647 *
Shuo Chen95a0d112014-04-04 21:04:40 -0700648 * This is useful to have more control over the added entropy sources in an
Paul Bakker43655f42011-12-15 20:11:16 +0000649 * application.
650 *
651 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000652 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200653//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000654
655/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000656 * \def POLARSSL_NO_PLATFORM_ENTROPY
657 *
658 * Do not use built-in platform entropy functions.
659 * This is useful if your platform does not support
660 * standards like the /dev/urandom or Windows CryptoAPI.
661 *
662 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000663 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200664//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000665
666/**
Paul Bakker2ceda572014-02-06 15:55:25 +0100667 * \def POLARSSL_ENTROPY_FORCE_SHA256
668 *
669 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
670 * default SHA-512 based one (if both are available).
671 *
672 * Requires: POLARSSL_SHA256_C
673 *
674 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
675 * if you have performance concerns.
676 *
677 * This option is only useful if both POLARSSL_SHA256_C and
678 * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used.
679 */
680//#define POLARSSL_ENTROPY_FORCE_SHA256
681
682/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200683 * \def POLARSSL_MEMORY_DEBUG
684 *
685 * Enable debugging of buffer allocator memory issues. Automatically prints
686 * (to stderr) all (fatal) messages on memory allocation issues. Enables
687 * function for 'debug output' of allocated memory.
688 *
689 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200690 *
691 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200692 */
693//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200694
695/**
696 * \def POLARSSL_MEMORY_BACKTRACE
697 *
698 * Include backtrace information with each allocated block.
699 *
700 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
701 * GLIBC-compatible backtrace() an backtrace_symbols() support
702 *
703 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200704 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200705//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200706
707/**
Paul Bakker48377d92013-08-30 12:06:24 +0200708 * \def POLARSSL_PKCS1_V15
709 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200710 * Enable support for PKCS#1 v1.5 encoding.
711 *
Paul Bakker48377d92013-08-30 12:06:24 +0200712 * Requires: POLARSSL_RSA_C
713 *
Paul Bakker48377d92013-08-30 12:06:24 +0200714 * This enables support for PKCS#1 v1.5 operations.
715 */
716#define POLARSSL_PKCS1_V15
717
718/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000719 * \def POLARSSL_PKCS1_V21
720 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200721 * Enable support for PKCS#1 v2.1 encoding.
722 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000723 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
724 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000725 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
726 */
727#define POLARSSL_PKCS1_V21
728
729/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000730 * \def POLARSSL_RSA_NO_CRT
731 *
732 * Do not use the Chinese Remainder Theorem for the RSA private operation.
733 *
734 * Uncomment this macro to disable the use of CRT in RSA.
735 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000736 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200737//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000738
739/**
740 * \def POLARSSL_SELF_TEST
741 *
742 * Enable the checkup functions (*_self_test).
743 */
744#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000745
746/**
Paul Bakker40865c82013-01-31 17:13:13 +0100747 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
748 *
749 * Enable sending of alert messages in case of encountered errors as per RFC.
750 * If you choose not to send the alert messages, PolarSSL can still communicate
751 * with other servers, only debugging of failures is harder.
752 *
753 * The advantage of not sending alert messages, is that no information is given
754 * about reasons for failures thus preventing adversaries of gaining intel.
755 *
756 * Enable sending of all alert messages
757 */
758#define POLARSSL_SSL_ALERT_MESSAGES
759
760/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100761 * \def POLARSSL_SSL_DEBUG_ALL
762 *
763 * Enable the debug messages in SSL module for all issues.
764 * Debug messages have been disabled in some places to prevent timing
765 * attacks due to (unbalanced) debugging function calls.
766 *
767 * If you need all error reporting you should enable this during debugging,
768 * but remove this for production servers that should log as well.
769 *
770 * Uncomment this macro to report all debug messages on errors introducing
771 * a timing side-channel.
772 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100773 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200774//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100775
776/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000777 * \def POLARSSL_SSL_HW_RECORD_ACCEL
778 *
779 * Enable hooking functions in SSL module for hardware acceleration of
780 * individual records.
781 *
782 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000783 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200784//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000785
786/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100787 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
788 *
789 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200790 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100791 *
792 * Comment this macro to disable support for SSLv2 Client Hello messages.
793 */
794#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
795
796/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100797 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
798 *
799 * Pick the ciphersuite according to the client's preferences rather than ours
800 * in the SSL Server module (POLARSSL_SSL_SRV_C).
801 *
802 * Uncomment this macro to respect client's ciphersuite order
803 */
804//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
805
806/**
Paul Bakker05decb22013-08-15 13:33:48 +0200807 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
808 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200809 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200810 *
811 * Comment this macro to disable support for the max_fragment_length extension
812 */
813#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
814
815/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200816 * \def POLARSSL_SSL_PROTO_SSL3
817 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200818 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200819 *
820 * Requires: POLARSSL_MD5_C
821 * POLARSSL_SHA1_C
822 *
823 * Comment this macro to disable support for SSL 3.0
824 */
825#define POLARSSL_SSL_PROTO_SSL3
826
827/**
828 * \def POLARSSL_SSL_PROTO_TLS1
829 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200830 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200831 *
832 * Requires: POLARSSL_MD5_C
833 * POLARSSL_SHA1_C
834 *
835 * Comment this macro to disable support for TLS 1.0
836 */
837#define POLARSSL_SSL_PROTO_TLS1
838
839/**
840 * \def POLARSSL_SSL_PROTO_TLS1_1
841 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200842 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200843 *
844 * Requires: POLARSSL_MD5_C
845 * POLARSSL_SHA1_C
846 *
847 * Comment this macro to disable support for TLS 1.1
848 */
849#define POLARSSL_SSL_PROTO_TLS1_1
850
851/**
852 * \def POLARSSL_SSL_PROTO_TLS1_2
853 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200854 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200855 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100856 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200857 * (Depends on ciphersuites)
858 *
859 * Comment this macro to disable support for TLS 1.2
860 */
861#define POLARSSL_SSL_PROTO_TLS1_2
862
863/**
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200864 * \def POLARSSL_SSL_ALPN
865 *
866 * Enable support for Application Layer Protocol Negotiation.
867 * draft-ietf-tls-applayerprotoneg-05
868 *
Paul Bakker27e36d32014-04-08 12:33:37 +0200869 * Comment this macro to disable support for ALPN.
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200870 */
Paul Bakker27e36d32014-04-08 12:33:37 +0200871#define POLARSSL_SSL_ALPN
Manuel Pégourié-Gonnard7e250d42014-04-04 16:08:41 +0200872
873/**
Paul Bakkera503a632013-08-14 13:48:06 +0200874 * \def POLARSSL_SSL_SESSION_TICKETS
875 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200876 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200877 *
878 * Requires: POLARSSL_AES_C
879 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200880 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200881 *
882 * Comment this macro to disable support for SSL session tickets
883 */
884#define POLARSSL_SSL_SESSION_TICKETS
885
886/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200887 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
888 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200889 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200890 *
891 * Comment this macro to disable support for server name indication in SSL
892 */
893#define POLARSSL_SSL_SERVER_NAME_INDICATION
894
895/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200896 * \def POLARSSL_SSL_TRUNCATED_HMAC
897 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200898 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200899 *
900 * Comment this macro to disable support for truncated HMAC in SSL
901 */
902#define POLARSSL_SSL_TRUNCATED_HMAC
903
904/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100905 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100906 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100907 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100908 *
909 * This is disabled by default since it breaks binary compatibility with the
910 * 1.3.x line. If you choose to enable it, you will need to rebuild your
911 * application against the new header files, relinking will not be enough.
912 * It will be enabled by default, or no longer an option, in the 1.4 branch.
913 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100914 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100915 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +0100916//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100917
918/**
Paul Bakker2466d932013-09-28 14:40:38 +0200919 * \def POLARSSL_THREADING_ALT
920 *
921 * Provide your own alternate threading implementation.
922 *
923 * Requires: POLARSSL_THREADING_C
924 *
925 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200926 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200927//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200928
929/**
Paul Bakker2466d932013-09-28 14:40:38 +0200930 * \def POLARSSL_THREADING_PTHREAD
931 *
932 * Enable the pthread wrapper layer for the threading layer.
933 *
934 * Requires: POLARSSL_THREADING_C
935 *
936 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200937 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200938//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200939
940/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200941 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
942 *
943 * If set, the X509 parser will not break-off when parsing an X509 certificate
944 * and encountering an extension in a v1 or v2 certificate.
945 *
946 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200947 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200948//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200949
950/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000951 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
952 *
953 * If set, the X509 parser will not break-off when parsing an X509 certificate
954 * and encountering an unknown critical extension.
955 *
956 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000957 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200958//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000959
960/**
Manuel Pégourié-Gonnard603116c2014-04-09 09:50:03 +0200961 * \def POLARSSL_X509_CHECK_KEY_USAGE
962 *
963 * Enable verification of the keyUsage extension (CA and leaf certificates).
964 *
965 * Disabling this avoids problems with mis-issued and/or misused
966 * (intermediate) CA and leaf certificates.
967 *
968 * \warning Depending on your PKI use, disabling this can be a security risk!
969 *
970 * Comment to skip keyUsage checking for both CA and leaf certificates.
971 */
972#define POLARSSL_X509_CHECK_KEY_USAGE
973
974/**
Manuel Pégourié-Gonnard7afb8a02014-04-10 17:53:56 +0200975 * \def POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
976 *
977 * Enable verification of the extendedKeyUsage extension (leaf certificates).
978 *
979 * Disabling this avoids problems with mis-issued and/or misused certificates.
980 *
981 * \warning Depending on your PKI use, disabling this can be a security risk!
982 *
983 * Comment to skip extendedKeyUsage checking for certificates.
984 */
985#define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
986
987/**
Paul Bakker2770fbd2012-07-03 13:30:23 +0000988 * \def POLARSSL_ZLIB_SUPPORT
989 *
990 * If set, the SSL/TLS module uses ZLIB to support compression and
991 * decompression of packet data.
992 *
Manuel Pégourié-Gonnardbb4dd372014-03-11 10:30:38 +0100993 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
994 * CRIME attack. Before enabling this option, you should examine with care if
995 * CRIME or similar exploits may be a applicable to your use case.
996 *
Paul Bakker2770fbd2012-07-03 13:30:23 +0000997 * Used in: library/ssl_tls.c
998 * library/ssl_cli.c
999 * library/ssl_srv.c
1000 *
1001 * This feature requires zlib library and headers to be present.
1002 *
1003 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +00001004 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001005//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001006/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +00001007
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001008/**
Paul Bakker0a62cd12011-01-21 11:00:08 +00001009 * \name SECTION: PolarSSL modules
1010 *
1011 * This section enables or disables entire modules in PolarSSL
1012 * \{
1013 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001014
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001015/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001016 * \def POLARSSL_AESNI_C
1017 *
1018 * Enable AES-NI support on x86-64.
1019 *
1020 * Module: library/aesni.c
1021 * Caller: library/aes.c
1022 *
1023 * Requires: POLARSSL_HAVE_ASM
1024 *
1025 * This modules adds support for the AES-NI instructions on x86-64
1026 */
1027#define POLARSSL_AESNI_C
1028
1029/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001030 * \def POLARSSL_AES_C
1031 *
1032 * Enable the AES block cipher.
1033 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001034 * Module: library/aes.c
1035 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001036 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +00001037 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001038 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001039 * This module enables the following ciphersuites (if other requisites are
1040 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001041 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1042 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1043 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1044 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1045 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1046 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1047 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1048 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1049 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1050 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1051 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1052 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001053 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1054 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1055 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1056 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1057 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001058 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001059 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001060 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001061 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1062 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1063 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1064 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1065 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1066 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1067 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1068 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1069 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1070 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1071 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1072 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1073 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1074 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1075 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1076 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1077 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1078 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1079 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1080 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1081 * TLS_RSA_WITH_AES_256_GCM_SHA384
1082 * TLS_RSA_WITH_AES_256_CBC_SHA256
1083 * TLS_RSA_WITH_AES_256_CBC_SHA
1084 * TLS_RSA_WITH_AES_128_GCM_SHA256
1085 * TLS_RSA_WITH_AES_128_CBC_SHA256
1086 * TLS_RSA_WITH_AES_128_CBC_SHA
1087 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1088 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1089 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1090 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1091 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1092 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1093 * TLS_PSK_WITH_AES_256_GCM_SHA384
1094 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001095 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001096 * TLS_PSK_WITH_AES_128_GCM_SHA256
1097 * TLS_PSK_WITH_AES_128_CBC_SHA256
1098 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001099 *
Paul Bakkercff68422013-09-15 20:43:33 +02001100 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001101 */
Paul Bakker40e46942009-01-03 21:51:57 +00001102#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001103
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001104/**
1105 * \def POLARSSL_ARC4_C
1106 *
1107 * Enable the ARCFOUR stream cipher.
1108 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001109 * Module: library/arc4.c
1110 * Caller: library/ssl_tls.c
1111 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001112 * This module enables the following ciphersuites (if other requisites are
1113 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001114 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1115 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001116 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001117 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001118 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1119 * TLS_DHE_PSK_WITH_RC4_128_SHA
1120 * TLS_RSA_WITH_RC4_128_SHA
1121 * TLS_RSA_WITH_RC4_128_MD5
1122 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001123 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001124 */
Paul Bakker40e46942009-01-03 21:51:57 +00001125#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001126
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001127/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001128 * \def POLARSSL_ASN1_PARSE_C
1129 *
1130 * Enable the generic ASN1 parser.
1131 *
1132 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001133 * Caller: library/x509.c
1134 * library/dhm.c
1135 * library/pkcs12.c
1136 * library/pkcs5.c
1137 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001138 */
1139#define POLARSSL_ASN1_PARSE_C
1140
1141/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001142 * \def POLARSSL_ASN1_WRITE_C
1143 *
1144 * Enable the generic ASN1 writer.
1145 *
1146 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001147 * Caller: library/ecdsa.c
1148 * library/pkwrite.c
1149 * library/x509_create.c
1150 * library/x509write_crt.c
1151 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001152 */
1153#define POLARSSL_ASN1_WRITE_C
1154
1155/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001156 * \def POLARSSL_BASE64_C
1157 *
1158 * Enable the Base64 module.
1159 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001160 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001161 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001162 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001163 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001164 */
Paul Bakker40e46942009-01-03 21:51:57 +00001165#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001166
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001167/**
1168 * \def POLARSSL_BIGNUM_C
1169 *
Paul Bakker9a736322012-11-14 12:39:52 +00001170 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001171 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001172 * Module: library/bignum.c
1173 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001174 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001175 * library/rsa.c
1176 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001177 *
1178 * This module is required for RSA and DHM support.
1179 */
Paul Bakker40e46942009-01-03 21:51:57 +00001180#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001181
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001182/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001183 * \def POLARSSL_BLOWFISH_C
1184 *
1185 * Enable the Blowfish block cipher.
1186 *
1187 * Module: library/blowfish.c
1188 */
1189#define POLARSSL_BLOWFISH_C
1190
1191/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001192 * \def POLARSSL_CAMELLIA_C
1193 *
1194 * Enable the Camellia block cipher.
1195 *
Paul Bakker38119b12009-01-10 23:31:23 +00001196 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001197 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001198 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001199 * This module enables the following ciphersuites (if other requisites are
1200 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001201 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1202 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1203 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1204 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1205 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1206 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1207 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1208 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001209 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1210 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1211 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1212 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1213 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001214 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001215 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1216 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1217 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1218 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1219 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1220 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1221 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1222 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1223 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1224 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1225 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1226 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1227 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1228 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1229 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1230 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1231 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1232 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1233 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1234 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1235 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1236 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1237 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1238 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1239 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1240 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1241 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1242 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001243 */
1244#define POLARSSL_CAMELLIA_C
1245
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001246/**
1247 * \def POLARSSL_CERTS_C
1248 *
1249 * Enable the test certificates.
1250 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001251 * Module: library/certs.c
1252 * Caller:
1253 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001254 * Requires: POLARSSL_PEM_PARSE_C
1255 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001256 * This module is used for testing (ssl_client/server).
1257 */
Paul Bakker40e46942009-01-03 21:51:57 +00001258#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001259
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001260/**
1261 * \def POLARSSL_CIPHER_C
1262 *
1263 * Enable the generic cipher layer.
1264 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001265 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001266 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001267 *
1268 * Uncomment to enable generic cipher wrappers.
1269 */
1270#define POLARSSL_CIPHER_C
1271
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001272/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001273 * \def POLARSSL_CTR_DRBG_C
1274 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001275 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001276 *
1277 * Module: library/ctr_drbg.c
1278 * Caller:
1279 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001280 * Requires: POLARSSL_AES_C
1281 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001282 * This module provides the CTR_DRBG AES-256 random number generator.
1283 */
1284#define POLARSSL_CTR_DRBG_C
1285
1286/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001287 * \def POLARSSL_DEBUG_C
1288 *
1289 * Enable the debug functions.
1290 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001291 * Module: library/debug.c
1292 * Caller: library/ssl_cli.c
1293 * library/ssl_srv.c
1294 * library/ssl_tls.c
1295 *
1296 * This module provides debugging functions.
1297 */
Paul Bakker40e46942009-01-03 21:51:57 +00001298#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001299
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001300/**
1301 * \def POLARSSL_DES_C
1302 *
1303 * Enable the DES block cipher.
1304 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001305 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001306 * Caller: library/pem.c
1307 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001308 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001309 * This module enables the following ciphersuites (if other requisites are
1310 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001311 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1312 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001313 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001314 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001315 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1316 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1317 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1318 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1319 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001320 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001321 *
Paul Bakkercff68422013-09-15 20:43:33 +02001322 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001323 */
Paul Bakker40e46942009-01-03 21:51:57 +00001324#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001325
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001326/**
1327 * \def POLARSSL_DHM_C
1328 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001329 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001330 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001331 * Module: library/dhm.c
1332 * Caller: library/ssl_cli.c
1333 * library/ssl_srv.c
1334 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001335 * This module is used by the following key exchanges:
1336 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001337 */
Paul Bakker40e46942009-01-03 21:51:57 +00001338#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001339
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001340/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001341 * \def POLARSSL_ECDH_C
1342 *
1343 * Enable the elliptic curve Diffie-Hellman library.
1344 *
1345 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001346 * Caller: library/ssl_cli.c
1347 * library/ssl_srv.c
1348 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001349 * This module is used by the following key exchanges:
1350 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001351 *
1352 * Requires: POLARSSL_ECP_C
1353 */
1354#define POLARSSL_ECDH_C
1355
1356/**
1357 * \def POLARSSL_ECDSA_C
1358 *
1359 * Enable the elliptic curve DSA library.
1360 *
1361 * Module: library/ecdsa.c
1362 * Caller:
1363 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001364 * This module is used by the following key exchanges:
1365 * ECDHE-ECDSA
1366 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001367 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001368 */
1369#define POLARSSL_ECDSA_C
1370
1371/**
1372 * \def POLARSSL_ECP_C
1373 *
1374 * Enable the elliptic curve over GF(p) library.
1375 *
1376 * Module: library/ecp.c
1377 * Caller: library/ecdh.c
1378 * library/ecdsa.c
1379 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001380 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001381 */
1382#define POLARSSL_ECP_C
1383
1384/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001385 * \def POLARSSL_ENTROPY_C
1386 *
1387 * Enable the platform-specific entropy code.
1388 *
1389 * Module: library/entropy.c
1390 * Caller:
1391 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001392 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001393 *
1394 * This module provides a generic entropy pool
1395 */
1396#define POLARSSL_ENTROPY_C
1397
1398/**
Paul Bakker9d781402011-05-09 16:17:09 +00001399 * \def POLARSSL_ERROR_C
1400 *
1401 * Enable error code to error string conversion.
1402 *
1403 * Module: library/error.c
1404 * Caller:
1405 *
Shuo Chen95a0d112014-04-04 21:04:40 -07001406 * This module enables polarssl_strerror().
Paul Bakker9d781402011-05-09 16:17:09 +00001407 */
1408#define POLARSSL_ERROR_C
1409
1410/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001411 * \def POLARSSL_GCM_C
1412 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001413 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001414 *
1415 * Module: library/gcm.c
1416 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001417 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001418 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001419 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1420 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001421 */
1422#define POLARSSL_GCM_C
1423
1424/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001425 * \def POLARSSL_HAVEGE_C
1426 *
1427 * Enable the HAVEGE random generator.
1428 *
Paul Bakker2a844242013-06-24 13:01:53 +02001429 * Warning: the HAVEGE random generator is not suitable for virtualized
1430 * environments
1431 *
1432 * Warning: the HAVEGE random generator is dependent on timing and specific
1433 * processor traits. It is therefore not advised to use HAVEGE as
1434 * your applications primary random generator or primary entropy pool
1435 * input. As a secondary input to your entropy pool, it IS able add
1436 * the (limited) extra entropy it provides.
1437 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001438 * Module: library/havege.c
1439 * Caller:
1440 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001441 * Requires: POLARSSL_TIMING_C
1442 *
Paul Bakker2a844242013-06-24 13:01:53 +02001443 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001444 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001445//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001446
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001447/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001448 * \def POLARSSL_HMAC_DRBG_C
1449 *
1450 * Enable the HMAC_DRBG random generator.
1451 *
1452 * Module: library/hmac_drbg.c
1453 * Caller:
1454 *
1455 * Requires: POLARSSL_MD_C
1456 *
1457 * Uncomment to enable the HMAC_DRBG random number geerator.
1458 */
1459#define POLARSSL_HMAC_DRBG_C
1460
1461/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001462 * \def POLARSSL_MD_C
1463 *
1464 * Enable the generic message digest layer.
1465 *
Paul Bakker17373852011-01-06 14:20:01 +00001466 * Module: library/md.c
1467 * Caller:
1468 *
1469 * Uncomment to enable generic message digest wrappers.
1470 */
1471#define POLARSSL_MD_C
1472
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001473/**
1474 * \def POLARSSL_MD2_C
1475 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001476 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001477 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001478 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001479 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001480 *
1481 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001482 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001483//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001484
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001485/**
1486 * \def POLARSSL_MD4_C
1487 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001488 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001489 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001490 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001491 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001492 *
1493 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001494 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001495//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001496
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001497/**
1498 * \def POLARSSL_MD5_C
1499 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001500 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001501 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001502 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001503 * Caller: library/md.c
1504 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001505 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001506 *
1507 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001508 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001509 */
Paul Bakker40e46942009-01-03 21:51:57 +00001510#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001511
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001512/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001513 * \def POLARSSL_MEMORY_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001514 * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead.
Paul Bakker6e339b52013-07-03 13:37:05 +02001515 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001516//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001517
1518/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001519 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1520 *
1521 * Enable the buffer allocator implementation that makes use of a (stack)
1522 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1523 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001524 *
1525 * Module: library/memory_buffer_alloc.c
1526 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001527 * Requires: POLARSSL_PLATFORM_C
1528 * POLARSSL_PLATFORM_MEMORY (to use it within PolarSSL)
Paul Bakker6e339b52013-07-03 13:37:05 +02001529 *
1530 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001531 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001532//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001533
1534/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001535 * \def POLARSSL_NET_C
1536 *
1537 * Enable the TCP/IP networking routines.
1538 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001539 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001540 *
1541 * This module provides TCP/IP networking routines.
1542 */
Paul Bakker40e46942009-01-03 21:51:57 +00001543#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001544
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001545/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001546 * \def POLARSSL_OID_C
1547 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001548 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001549 *
1550 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001551 * Caller: library/asn1write.c
1552 * library/pkcs5.c
1553 * library/pkparse.c
1554 * library/pkwrite.c
1555 * library/rsa.c
1556 * library/x509.c
1557 * library/x509_create.c
1558 * library/x509_crl.c
1559 * library/x509_crt.c
1560 * library/x509_csr.c
1561 * library/x509write_crt.c
1562 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001563 *
1564 * This modules translates between OIDs and internal values.
1565 */
1566#define POLARSSL_OID_C
1567
1568/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001569 * \def POLARSSL_PADLOCK_C
1570 *
1571 * Enable VIA Padlock support on x86.
1572 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001573 * Module: library/padlock.c
1574 * Caller: library/aes.c
1575 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001576 * Requires: POLARSSL_HAVE_ASM
1577 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001578 * This modules adds support for the VIA PadLock on x86.
1579 */
Paul Bakker40e46942009-01-03 21:51:57 +00001580#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001581
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001582/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001583 * \def POLARSSL_PBKDF2_C
1584 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001585 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001586 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001587 *
1588 * Module: library/pbkdf2.c
1589 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001590 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001591 *
1592 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001593 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001594#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001595
1596/**
Paul Bakkercff68422013-09-15 20:43:33 +02001597 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001598 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001599 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001600 *
1601 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001602 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001603 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001604 * library/x509_crl.c
1605 * library/x509_crt.c
1606 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001607 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001608 * Requires: POLARSSL_BASE64_C
1609 *
Paul Bakkercff68422013-09-15 20:43:33 +02001610 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001611 */
Paul Bakkercff68422013-09-15 20:43:33 +02001612#define POLARSSL_PEM_PARSE_C
1613
1614/**
1615 * \def POLARSSL_PEM_WRITE_C
1616 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001617 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001618 *
1619 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001620 * Caller: library/pkwrite.c
1621 * library/x509write_crt.c
1622 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001623 *
1624 * Requires: POLARSSL_BASE64_C
1625 *
1626 * This modules adds support for encoding / writing PEM files.
1627 */
1628#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001629
1630/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001631 * \def POLARSSL_PK_C
1632 *
1633 * Enable the generic public (asymetric) key layer.
1634 *
1635 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001636 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001637 * library/ssl_cli.c
1638 * library/ssl_srv.c
1639 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001640 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1641 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001642 * Uncomment to enable generic public key wrappers.
1643 */
1644#define POLARSSL_PK_C
1645
1646/**
Paul Bakker4606c732013-09-15 17:04:23 +02001647 * \def POLARSSL_PK_PARSE_C
1648 *
1649 * Enable the generic public (asymetric) key parser.
1650 *
1651 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001652 * Caller: library/x509_crt.c
1653 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001654 *
1655 * Requires: POLARSSL_PK_C
1656 *
1657 * Uncomment to enable generic public key parse functions.
1658 */
1659#define POLARSSL_PK_PARSE_C
1660
1661/**
1662 * \def POLARSSL_PK_WRITE_C
1663 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001664 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001665 *
1666 * Module: library/pkwrite.c
1667 * Caller: library/x509write.c
1668 *
1669 * Requires: POLARSSL_PK_C
1670 *
1671 * Uncomment to enable generic public key write functions.
1672 */
1673#define POLARSSL_PK_WRITE_C
1674
1675/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001676 * \def POLARSSL_PKCS5_C
1677 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001678 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001679 *
1680 * Module: library/pkcs5.c
1681 *
1682 * Requires: POLARSSL_MD_C
1683 *
1684 * This module adds support for the PKCS#5 functions.
1685 */
1686#define POLARSSL_PKCS5_C
1687
1688/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001689 * \def POLARSSL_PKCS11_C
1690 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001691 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001692 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001693 * Module: library/pkcs11.c
1694 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001695 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001696 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001697 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001698 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001699 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001700 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001701//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001702
1703/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001704 * \def POLARSSL_PKCS12_C
1705 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001706 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001707 * Adds algorithms for parsing PKCS#8 encrypted private keys
1708 *
1709 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001710 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001711 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001712 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1713 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001714 *
1715 * This module enables PKCS#12 functions.
1716 */
1717#define POLARSSL_PKCS12_C
1718
1719/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001720 * \def POLARSSL_PLATFORM_C
1721 *
1722 * Enable the platform abstraction layer that allows you to re-assign
1723 * functions like malloc(), free(), printf(), fprintf()
1724 *
1725 * Module: library/platform.c
1726 * Caller: Most other .c files
1727 *
1728 * This module enables abstraction of common (libc) functions.
1729 */
1730#define POLARSSL_PLATFORM_C
1731
1732/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001733 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001734 *
1735 * Enable the RIPEMD-160 hash algorithm.
1736 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001737 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001738 * Caller: library/md.c
1739 *
1740 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001741#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001742
1743/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001744 * \def POLARSSL_RSA_C
1745 *
1746 * Enable the RSA public-key cryptosystem.
1747 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001748 * Module: library/rsa.c
1749 * Caller: library/ssl_cli.c
1750 * library/ssl_srv.c
1751 * library/ssl_tls.c
1752 * library/x509.c
1753 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001754 * This module is used by the following key exchanges:
1755 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001756 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001757 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001758 */
Paul Bakker40e46942009-01-03 21:51:57 +00001759#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001760
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001761/**
1762 * \def POLARSSL_SHA1_C
1763 *
1764 * Enable the SHA1 cryptographic hash algorithm.
1765 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001766 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001767 * Caller: library/md.c
1768 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001769 * library/ssl_srv.c
1770 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001771 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001772 *
1773 * This module is required for SSL/TLS and SHA1-signed certificates.
1774 */
Paul Bakker40e46942009-01-03 21:51:57 +00001775#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001776
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001777/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001778 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001779 *
1780 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001781 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001782 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001783 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001784 * Caller: library/entropy.c
1785 * library/md.c
1786 * library/ssl_cli.c
1787 * library/ssl_srv.c
1788 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001789 *
1790 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001791 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001792 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001793#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001794
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001795/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001796 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001797 *
1798 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001799 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001800 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001801 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001802 * Caller: library/entropy.c
1803 * library/md.c
1804 * library/ssl_cli.c
1805 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001806 *
1807 * This module adds support for SHA-384 and SHA-512.
1808 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001809#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001810
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001811/**
Paul Bakker0a597072012-09-25 21:55:46 +00001812 * \def POLARSSL_SSL_CACHE_C
1813 *
1814 * Enable simple SSL cache implementation.
1815 *
1816 * Module: library/ssl_cache.c
1817 * Caller:
1818 *
1819 * Requires: POLARSSL_SSL_CACHE_C
1820 */
1821#define POLARSSL_SSL_CACHE_C
1822
1823/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001824 * \def POLARSSL_SSL_CLI_C
1825 *
1826 * Enable the SSL/TLS client code.
1827 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001828 * Module: library/ssl_cli.c
1829 * Caller:
1830 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001831 * Requires: POLARSSL_SSL_TLS_C
1832 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001833 * This module is required for SSL/TLS client support.
1834 */
Paul Bakker40e46942009-01-03 21:51:57 +00001835#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001836
Paul Bakker9a736322012-11-14 12:39:52 +00001837/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001838 * \def POLARSSL_SSL_SRV_C
1839 *
1840 * Enable the SSL/TLS server code.
1841 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001842 * Module: library/ssl_srv.c
1843 * Caller:
1844 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001845 * Requires: POLARSSL_SSL_TLS_C
1846 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001847 * This module is required for SSL/TLS server support.
1848 */
Paul Bakker40e46942009-01-03 21:51:57 +00001849#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001850
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001851/**
1852 * \def POLARSSL_SSL_TLS_C
1853 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001854 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001855 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001856 * Module: library/ssl_tls.c
1857 * Caller: library/ssl_cli.c
1858 * library/ssl_srv.c
1859 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001860 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001861 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001862 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001863 * This module is required for SSL/TLS.
1864 */
Paul Bakker40e46942009-01-03 21:51:57 +00001865#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001866
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001867/**
Paul Bakker2466d932013-09-28 14:40:38 +02001868 * \def POLARSSL_THREADING_C
1869 *
1870 * Enable the threading abstraction layer.
1871 * By default PolarSSL assumes it is used in a non-threaded environment or that
1872 * contexts are not shared between threads. If you do intend to use contexts
1873 * between threads, you will need to enable this layer to prevent race
1874 * conditions.
1875 *
1876 * Module: library/threading.c
1877 *
1878 * This allows different threading implementations (self-implemented or
1879 * provided).
1880 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001881 * You will have to enable either POLARSSL_THREADING_ALT or
1882 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001883 *
1884 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001885 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001886//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001887
1888/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001889 * \def POLARSSL_TIMING_C
1890 *
1891 * Enable the portable timing interface.
1892 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001893 * Module: library/timing.c
1894 * Caller: library/havege.c
1895 *
1896 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001897 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001898#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001899
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001900/**
1901 * \def POLARSSL_VERSION_C
1902 *
1903 * Enable run-time version information.
1904 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001905 * Module: library/version.c
1906 *
1907 * This module provides run-time version information.
1908 */
1909#define POLARSSL_VERSION_C
1910
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001911/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001912 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001913 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001914 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001915 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001916 * Module: library/x509.c
1917 * Caller: library/x509_crl.c
1918 * library/x509_crt.c
1919 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001920 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001921 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001922 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001923 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001924 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001925 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001926#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001927
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001928/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001929 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001930 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001931 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001932 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001933 * Module: library/x509_crt.c
1934 * Caller: library/ssl_cli.c
1935 * library/ssl_srv.c
1936 * library/ssl_tls.c
1937 *
1938 * Requires: POLARSSL_X509_USE_C
1939 *
1940 * This module is required for X.509 certificate parsing.
1941 */
1942#define POLARSSL_X509_CRT_PARSE_C
1943
1944/**
1945 * \def POLARSSL_X509_CRL_PARSE_C
1946 *
1947 * Enable X.509 CRL parsing.
1948 *
1949 * Module: library/x509_crl.c
1950 * Caller: library/x509_crt.c
1951 *
1952 * Requires: POLARSSL_X509_USE_C
1953 *
1954 * This module is required for X.509 CRL parsing.
1955 */
1956#define POLARSSL_X509_CRL_PARSE_C
1957
1958/**
1959 * \def POLARSSL_X509_CSR_PARSE_C
1960 *
1961 * Enable X.509 Certificate Signing Request (CSR) parsing.
1962 *
1963 * Module: library/x509_csr.c
1964 * Caller: library/x509_crt_write.c
1965 *
1966 * Requires: POLARSSL_X509_USE_C
1967 *
1968 * This module is used for reading X.509 certificate request.
1969 */
1970#define POLARSSL_X509_CSR_PARSE_C
1971
1972/**
1973 * \def POLARSSL_X509_CREATE_C
1974 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001975 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001976 *
1977 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001978 *
Paul Bakker4606c732013-09-15 17:04:23 +02001979 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001980 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001981 * This module is the basis for creating X.509 certificates and CSRs.
1982 */
1983#define POLARSSL_X509_CREATE_C
1984
1985/**
1986 * \def POLARSSL_X509_CRT_WRITE_C
1987 *
1988 * Enable creating X.509 certificates.
1989 *
1990 * Module: library/x509_crt_write.c
1991 *
1992 * Requires: POLARSSL_CREATE_C
1993 *
1994 * This module is required for X.509 certificate creation.
1995 */
1996#define POLARSSL_X509_CRT_WRITE_C
1997
1998/**
1999 * \def POLARSSL_X509_CSR_WRITE_C
2000 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002001 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002002 *
2003 * Module: library/x509_csr_write.c
2004 *
2005 * Requires: POLARSSL_CREATE_C
2006 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002007 * This module is required for X.509 certificate request writing.
2008 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002009#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00002010
2011/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002012 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00002013 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00002014 * Enable the XTEA block cipher.
2015 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002016 * Module: library/xtea.c
2017 * Caller:
2018 */
2019#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01002020
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02002021/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00002022
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002023/**
2024 * \name SECTION: Module configuration options
2025 *
2026 * This section allows for the setting of module specific sizes and
2027 * configuration options. The default values are already present in the
2028 * relevant header files and should suffice for the regular use cases.
2029 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
2030 * only if you have a good reason and know the consequences.
2031 *
2032 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
2033 * header file take precedence.
2034 *
2035 * Please check the respective header file for documentation on these
2036 * parameters (to prevent duplicate documentation).
2037 *
2038 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
2039 * \{
2040 */
2041//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
2042
2043#if defined(POLARSSL_CONFIG_OPTIONS)
2044
2045// MPI / BIGNUM options
2046//
2047#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2048#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
2049
2050// CTR_DRBG options
2051//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002052#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 +02002053#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2054#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2055#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2056#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2057
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002058// HMAC_DRBG options
2059//
2060#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2061#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2062#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2063#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2064
Paul Bakkere1b665e2013-12-11 16:02:58 +01002065// ECP options
2066//
2067#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2068#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
Manuel Pégourié-Gonnard9e4191c2013-12-30 18:41:16 +01002069#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002070
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002071// Entropy options
2072//
2073#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2074#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
2075
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002076// Memory buffer allocator options
Paul Bakker6e339b52013-07-03 13:37:05 +02002077#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker6e339b52013-07-03 13:37:05 +02002078
Paul Bakker747a83a2014-02-01 22:50:07 +01002079// Platform options
Manuel Pégourié-Gonnardeb82a742014-04-02 13:43:48 +02002080//
2081#define POLARSSL_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include for default allocator. Don't define if no header is needed. */
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002082#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2083#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
Paul Bakker747a83a2014-02-01 22:50:07 +01002084#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2085#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002086
2087// SSL Cache options
2088//
2089#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2090#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
2091
2092// SSL options
2093//
2094#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02002095#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002096
2097#endif /* POLARSSL_CONFIG_OPTIONS */
2098
2099/* \} name */
2100
Paul Bakker7ad00f92013-04-18 23:05:25 +02002101/*
2102 * Sanity checks on defines and dependencies
2103 */
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002104#if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
2105#error "POLARSSL_AESNI_C defined, but not all prerequisites"
2106#endif
2107
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002108#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
2109#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002110#endif
2111
2112#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
2113#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
2114#endif
2115
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002116#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
2117#error "POLARSSL_DHM_C defined, but not all prerequisites"
2118#endif
2119
Paul Bakker7ad00f92013-04-18 23:05:25 +02002120#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
2121#error "POLARSSL_ECDH_C defined, but not all prerequisites"
2122#endif
2123
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02002124#if defined(POLARSSL_ECDSA_C) && \
2125 ( !defined(POLARSSL_ECP_C) || \
2126 !defined(POLARSSL_ASN1_PARSE_C) || \
2127 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002128#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
2129#endif
2130
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +01002131#if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C)
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +01002132#error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
2133#endif
2134
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01002135#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
2136 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
2137 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
2138 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
2139 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
2140 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
2141 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
2142 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
Manuel Pégourié-Gonnardffd94cc2014-01-28 20:11:07 +01002143 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \
2144 !defined(POLARSSL_ECP_DP_M255_ENABLED) && \
2145 !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \
2146 !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \
2147 !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002148#error "POLARSSL_ECP_C defined, but not all prerequisites"
2149#endif
2150
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002151#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
2152 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02002153#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
2154#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002155#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
2156 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
2157#error "CTR_DRBG_ENTROPY_LEN value too high"
2158#endif
Manuel Pégourié-Gonnarda27cd4c2014-04-02 13:46:29 +02002159#if defined(POLARSSL_ENTROPY_C) && \
2160 ( !defined(POLARSSL_SHA512_C) || defined(POLARSSL_ENTROPY_FORCE_SHA256) ) \
2161 && defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002162#error "CTR_DRBG_ENTROPY_LEN value too high"
2163#endif
Paul Bakker2ceda572014-02-06 15:55:25 +01002164#if defined(POLARSSL_ENTROPY_C) && \
2165 defined(POLARSSL_ENTROPY_FORCE_SHA256) && !defined(POLARSSL_SHA256_C)
2166#error "POLARSSL_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
2167#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02002168
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02002169#if defined(POLARSSL_GCM_C) && ( \
2170 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002171#error "POLARSSL_GCM_C defined, but not all prerequisites"
2172#endif
2173
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002174#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
2175#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
2176#endif
2177
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01002178#if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C)
2179#error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites"
2180#endif
2181
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01002182#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
2183 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2184#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
2185#endif
2186
2187#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
2188 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2189#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
2190#endif
2191
Paul Bakkere07f41d2013-04-19 09:08:57 +02002192#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
2193#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
2194#endif
2195
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02002196#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
2197 !defined(POLARSSL_ECDH_C)
2198#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
2199#endif
2200
Paul Bakkere07f41d2013-04-19 09:08:57 +02002201#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2202 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002203 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002204#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2205#endif
2206
2207#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2208 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002209 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002210#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2211#endif
2212
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002213#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2214 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002215 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002216#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2217#endif
2218
Paul Bakkere07f41d2013-04-19 09:08:57 +02002219#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002220 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002221 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002222#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2223#endif
2224
2225#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002226 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002227 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002228#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2229#endif
2230
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002231#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \
2232 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
Paul Bakker6e339b52013-07-03 13:37:05 +02002233#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2234#endif
2235
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002236#if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2237#error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2238#endif
2239
Paul Bakker7ad00f92013-04-18 23:05:25 +02002240#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2241#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2242#endif
2243
Paul Bakkercff68422013-09-15 20:43:33 +02002244#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2245#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2246#endif
2247
2248#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2249#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002250#endif
2251
Paul Bakker4606c732013-09-15 17:04:23 +02002252#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2253#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2254#endif
2255
2256#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2257#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2258#endif
2259
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002260#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002261#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2262#endif
2263
2264#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2265 !defined(POLARSSL_OID_C) )
2266#error "POLARSSL_RSA_C defined, but not all prerequisites"
2267#endif
2268
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002269#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2270 !defined(POLARSSL_SHA1_C) )
2271#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2272#endif
2273
2274#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2275 !defined(POLARSSL_SHA1_C) )
2276#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2277#endif
2278
2279#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2280 !defined(POLARSSL_SHA1_C) )
2281#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2282#endif
2283
2284#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2285 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2286#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2287#endif
2288
Paul Bakker7ad00f92013-04-18 23:05:25 +02002289#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2290#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2291#endif
2292
Paul Bakker577e0062013-08-28 11:57:20 +02002293#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002294 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002295#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2296#endif
2297
2298#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2299#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2300#endif
2301
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002302#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2303 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2304 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2305#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2306#endif
2307
2308#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2309 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2310#error "Illegal protocol selection"
2311#endif
2312
2313#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2314 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2315#error "Illegal protocol selection"
2316#endif
2317
2318#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2319 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2320 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2321#error "Illegal protocol selection"
2322#endif
2323
Paul Bakker59da0a42013-08-19 13:27:17 +02002324#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002325 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2326 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002327#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2328#endif
2329
Manuel Pégourié-Gonnard5d917ff2014-02-21 16:52:06 +01002330#if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) && \
2331 !defined(POLARSSL_X509_CRT_PARSE_C)
2332#error "POLARSSL_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites"
2333#endif
2334
Paul Bakker2466d932013-09-28 14:40:38 +02002335#if defined(POLARSSL_THREADING_PTHREAD)
2336#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2337#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2338#endif
2339#define POLARSSL_THREADING_IMPL
2340#endif
2341
2342#if defined(POLARSSL_THREADING_ALT)
2343#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2344#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2345#endif
2346#define POLARSSL_THREADING_IMPL
2347#endif
2348
2349#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2350#error "POLARSSL_THREADING_C defined, single threading implementation required"
2351#endif
2352#undef POLARSSL_THREADING_IMPL
2353
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002354#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002355 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002356 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002357#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002358#endif
2359
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002360#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2361 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2362 !defined(POLARSSL_PK_WRITE_C) )
2363#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2364#endif
2365
2366#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2367#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2368#endif
2369
2370#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2371#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2372#endif
2373
2374#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2375#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2376#endif
2377
2378#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2379#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2380#endif
2381
2382#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2383#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002384#endif
2385
Paul Bakker5121ce52009-01-03 21:22:43 +00002386#endif /* config.h */