blob: 5c36ae6b3c949d37b773e28be0a85b59feec2df3 [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/**
Manuel Pégourié-Gonnardb1d4eb12014-01-22 10:12:57 +0100206 * \def POLARSSL_RSASSA_PSS_CERTIFICATES
207 *
208 * Enable parsing and verification of X.509 certificates and CRLs signed with
209 * RSASSA-PSS.
210 *
211 * This is disabled by default since it breaks binary compatibility with the
212 * 1.3.x line. If you choose to enable it, you will need to rebuild your
213 * application against the new header files, relinking will not be enough.
214 *
215 * TODO: actually disable it when done working on this branch ,)
216 *
217 * Uncomment this macro to allow using RSASSA-PSS in certificates.
218 */
219#define POLARSSL_RSASSA_PSS_CERTIFICATES
220
221/**
Paul Bakker15566e42011-04-24 21:19:15 +0000222 * \def POLARSSL_AES_ROM_TABLES
223 *
224 * Store the AES tables in ROM.
225 *
226 * Uncomment this macro to store the AES tables in ROM.
227 *
Paul Bakker15566e42011-04-24 21:19:15 +0000228 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200229//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000230
231/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200232 * \def POLARSSL_CIPHER_MODE_CBC
233 *
234 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
235 */
236#define POLARSSL_CIPHER_MODE_CBC
237
238/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000239 * \def POLARSSL_CIPHER_MODE_CFB
240 *
241 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
242 */
243#define POLARSSL_CIPHER_MODE_CFB
244
245/**
246 * \def POLARSSL_CIPHER_MODE_CTR
247 *
248 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
249 */
250#define POLARSSL_CIPHER_MODE_CTR
251
252/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000253 * \def POLARSSL_CIPHER_NULL_CIPHER
254 *
255 * Enable NULL cipher.
256 * Warning: Only do so when you know what you are doing. This allows for
257 * encryption or channels without any security!
258 *
259 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
260 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100261 * TLS_ECDH_ECDSA_WITH_NULL_SHA
262 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200263 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100264 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200265 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200266 * TLS_ECDHE_PSK_WITH_NULL_SHA256
267 * TLS_ECDHE_PSK_WITH_NULL_SHA
268 * TLS_DHE_PSK_WITH_NULL_SHA384
269 * TLS_DHE_PSK_WITH_NULL_SHA256
270 * TLS_DHE_PSK_WITH_NULL_SHA
271 * TLS_RSA_WITH_NULL_SHA256
272 * TLS_RSA_WITH_NULL_SHA
273 * TLS_RSA_WITH_NULL_MD5
274 * TLS_RSA_PSK_WITH_NULL_SHA384
275 * TLS_RSA_PSK_WITH_NULL_SHA256
276 * TLS_RSA_PSK_WITH_NULL_SHA
277 * TLS_PSK_WITH_NULL_SHA384
278 * TLS_PSK_WITH_NULL_SHA256
279 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000280 *
281 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200282#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000283 */
284
285/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200286 * \def POLARSSL_CIPHER_PADDING_XXX
287 *
288 * Uncomment or comment macros to add support for specific padding modes
289 * in the cipher layer with cipher modes that support padding (e.g. CBC)
290 *
291 * If you disable all padding modes, only full blocks can be used with CBC.
292 *
293 * Enable padding modes in the cipher layer.
294 */
295#define POLARSSL_CIPHER_PADDING_PKCS7
296#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
297#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
298#define POLARSSL_CIPHER_PADDING_ZEROS
299
300/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000301 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
302 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200303 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000304 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000305 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000306 *
307 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000308 * TLS_RSA_WITH_DES_CBC_SHA
309 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000310 *
311 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200312#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000313 */
314
315/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200316 * \def POLARSSL_ECP_XXXX_ENABLED
317 *
318 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200319 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200320 *
321 * Comment macros to disable the curve and functions for it
322 */
323#define POLARSSL_ECP_DP_SECP192R1_ENABLED
324#define POLARSSL_ECP_DP_SECP224R1_ENABLED
325#define POLARSSL_ECP_DP_SECP256R1_ENABLED
326#define POLARSSL_ECP_DP_SECP384R1_ENABLED
327#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100328#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100329#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100330#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200331#define POLARSSL_ECP_DP_BP256R1_ENABLED
332#define POLARSSL_ECP_DP_BP384R1_ENABLED
333#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100334//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
335#define POLARSSL_ECP_DP_M255_ENABLED
336//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
337//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200338
339/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200340 * \def POLARSSL_ECP_NIST_OPTIM
341 *
342 * Enable specific 'modulo p' routines for each NIST prime.
343 * Depending on the prime and architecture, makes operations 4 to 8 times
344 * faster on the corresponding curve.
345 *
346 * Comment this macro to disable NIST curves optimisation.
347 */
348#define POLARSSL_ECP_NIST_OPTIM
349
350/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100351 * \def POLARSSL_ECDSA_DETERMINISTIC
352 *
353 * Enable deterministic ECDSA (RFC 6979).
354 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
355 * may result in a compromise of the long-term signing key. This is avoided by
356 * the deterministic variant.
357 *
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +0100358 * Requires: POLARSSL_HMAC_DRBG_C
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100359 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100360 * Comment this macro to disable deterministic ECDSA.
361 */
362#define POLARSSL_ECDSA_DETERMINISTIC
363
364/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200365 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
366 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200367 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200368 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200369 * This enables the following ciphersuites (if other requisites are
370 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200371 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200372 * TLS_PSK_WITH_AES_256_CBC_SHA384
373 * TLS_PSK_WITH_AES_256_CBC_SHA
374 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
375 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
376 * TLS_PSK_WITH_AES_128_GCM_SHA256
377 * TLS_PSK_WITH_AES_128_CBC_SHA256
378 * TLS_PSK_WITH_AES_128_CBC_SHA
379 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
380 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
381 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
382 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200383 */
384#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
385
386/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200387 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
388 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200389 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200390 *
391 * Requires: POLARSSL_DHM_C
392 *
393 * This enables the following ciphersuites (if other requisites are
394 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200395 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200396 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
397 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
398 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
399 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
400 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
401 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
402 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
403 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
404 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
405 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
406 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200407 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200408#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200409
410/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200411 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
412 *
413 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
414 *
415 * Requires: POLARSSL_ECDH_C
416 *
417 * This enables the following ciphersuites (if other requisites are
418 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200419 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200420 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200421 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200422 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
423 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
424 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
425 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
426 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200427 */
428#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
429
430/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200431 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
432 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200433 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200434 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200435 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200436 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200437 *
438 * This enables the following ciphersuites (if other requisites are
439 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200440 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200441 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
442 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
443 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
444 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
445 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
446 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
447 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
448 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
449 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
450 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
451 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200452 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200453#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200454
455/**
456 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
457 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200458 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200459 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200460 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200461 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200462 *
463 * This enables the following ciphersuites (if other requisites are
464 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200465 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200466 * TLS_RSA_WITH_AES_256_CBC_SHA256
467 * TLS_RSA_WITH_AES_256_CBC_SHA
468 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200469 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200470 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
471 * TLS_RSA_WITH_AES_128_GCM_SHA256
472 * TLS_RSA_WITH_AES_128_CBC_SHA256
473 * TLS_RSA_WITH_AES_128_CBC_SHA
474 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
475 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
476 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200477 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200478 * TLS_RSA_WITH_RC4_128_SHA
479 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200480 */
481#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
482
483/**
484 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
485 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200486 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200487 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200488 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200489 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200490 *
491 * This enables the following ciphersuites (if other requisites are
492 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200493 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200494 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200495 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
496 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200497 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200498 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
499 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
500 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
501 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
502 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
503 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
504 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200505 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
506 */
507#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
508
509/**
510 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
511 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200512 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200513 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200514 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200515 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200516 *
517 * This enables the following ciphersuites (if other requisites are
518 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200519 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200520 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
521 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
522 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200523 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200524 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
525 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
526 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
527 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
528 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
529 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
530 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200531 */
532#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
533
534/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200535 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
536 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200537 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200538 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200539 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200540 *
541 * This enables the following ciphersuites (if other requisites are
542 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200543 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
544 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
545 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
546 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
547 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
548 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
549 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
550 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
551 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
552 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
553 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
554 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200555 */
556#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
557
558/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100559 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
560 *
561 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
562 *
563 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
564 *
565 * This enables the following ciphersuites (if other requisites are
566 * enabled as well):
567 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
568 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
569 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
570 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
571 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
572 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
573 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
574 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
575 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
576 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
577 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
578 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
579 */
580#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
581
582/**
583 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
584 *
585 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
586 *
587 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
588 *
589 * This enables the following ciphersuites (if other requisites are
590 * enabled as well):
591 * TLS_ECDH_RSA_WITH_RC4_128_SHA
592 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
593 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
594 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
595 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
596 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
597 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
598 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
599 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
600 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
601 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
602 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
603 */
604#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
605
606/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200607 * \def POLARSSL_ERROR_STRERROR_BC
608 *
609 * Make available the backward compatible error_strerror() next to the
610 * current polarssl_strerror().
611 *
612 * Disable if you run into name conflicts and want to really remove the
613 * error_strerror()
614 */
615#define POLARSSL_ERROR_STRERROR_BC
616
617/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100618 * \def POLARSSL_ERROR_STRERROR_DUMMY
619 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200620 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100621 * third party libraries easier.
622 *
623 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200624 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100625 */
626#define POLARSSL_ERROR_STRERROR_DUMMY
627
628/**
Paul Bakker15566e42011-04-24 21:19:15 +0000629 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000630 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200631 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200632 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200633 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000634 */
Paul Bakker15566e42011-04-24 21:19:15 +0000635#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000636
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000637/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000638 * \def POLARSSL_FS_IO
639 *
640 * Enable functions that use the filesystem.
641 */
642#define POLARSSL_FS_IO
643
644/**
Paul Bakker43655f42011-12-15 20:11:16 +0000645 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
646 *
647 * Do not add default entropy sources. These are the platform specific,
648 * hardclock and HAVEGE based poll functions.
649 *
650 * This is useful to have more control over the added entropy sources in an
651 * application.
652 *
653 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000654 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200655//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000656
657/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000658 * \def POLARSSL_NO_PLATFORM_ENTROPY
659 *
660 * Do not use built-in platform entropy functions.
661 * This is useful if your platform does not support
662 * standards like the /dev/urandom or Windows CryptoAPI.
663 *
664 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000665 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200666//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000667
668/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200669 * \def POLARSSL_MEMORY_DEBUG
670 *
671 * Enable debugging of buffer allocator memory issues. Automatically prints
672 * (to stderr) all (fatal) messages on memory allocation issues. Enables
673 * function for 'debug output' of allocated memory.
674 *
675 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200676 *
677 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200678 */
679//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200680
681/**
682 * \def POLARSSL_MEMORY_BACKTRACE
683 *
684 * Include backtrace information with each allocated block.
685 *
686 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
687 * GLIBC-compatible backtrace() an backtrace_symbols() support
688 *
689 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200690 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200691//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200692
693/**
Paul Bakker48377d92013-08-30 12:06:24 +0200694 * \def POLARSSL_PKCS1_V15
695 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200696 * Enable support for PKCS#1 v1.5 encoding.
697 *
Paul Bakker48377d92013-08-30 12:06:24 +0200698 * Requires: POLARSSL_RSA_C
699 *
Paul Bakker48377d92013-08-30 12:06:24 +0200700 * This enables support for PKCS#1 v1.5 operations.
701 */
702#define POLARSSL_PKCS1_V15
703
704/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000705 * \def POLARSSL_PKCS1_V21
706 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200707 * Enable support for PKCS#1 v2.1 encoding.
708 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000709 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
710 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000711 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
712 */
713#define POLARSSL_PKCS1_V21
714
715/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000716 * \def POLARSSL_RSA_NO_CRT
717 *
718 * Do not use the Chinese Remainder Theorem for the RSA private operation.
719 *
720 * Uncomment this macro to disable the use of CRT in RSA.
721 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000722 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200723//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000724
725/**
726 * \def POLARSSL_SELF_TEST
727 *
728 * Enable the checkup functions (*_self_test).
729 */
730#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000731
732/**
Paul Bakker40865c82013-01-31 17:13:13 +0100733 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
734 *
735 * Enable sending of alert messages in case of encountered errors as per RFC.
736 * If you choose not to send the alert messages, PolarSSL can still communicate
737 * with other servers, only debugging of failures is harder.
738 *
739 * The advantage of not sending alert messages, is that no information is given
740 * about reasons for failures thus preventing adversaries of gaining intel.
741 *
742 * Enable sending of all alert messages
743 */
744#define POLARSSL_SSL_ALERT_MESSAGES
745
746/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100747 * \def POLARSSL_SSL_DEBUG_ALL
748 *
749 * Enable the debug messages in SSL module for all issues.
750 * Debug messages have been disabled in some places to prevent timing
751 * attacks due to (unbalanced) debugging function calls.
752 *
753 * If you need all error reporting you should enable this during debugging,
754 * but remove this for production servers that should log as well.
755 *
756 * Uncomment this macro to report all debug messages on errors introducing
757 * a timing side-channel.
758 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100759 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200760//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100761
762/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000763 * \def POLARSSL_SSL_HW_RECORD_ACCEL
764 *
765 * Enable hooking functions in SSL module for hardware acceleration of
766 * individual records.
767 *
768 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000769 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200770//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000771
772/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100773 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
774 *
775 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200776 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100777 *
778 * Comment this macro to disable support for SSLv2 Client Hello messages.
779 */
780#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
781
782/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100783 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
784 *
785 * Pick the ciphersuite according to the client's preferences rather than ours
786 * in the SSL Server module (POLARSSL_SSL_SRV_C).
787 *
788 * Uncomment this macro to respect client's ciphersuite order
789 */
790//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
791
792/**
Paul Bakker05decb22013-08-15 13:33:48 +0200793 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
794 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200795 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200796 *
797 * Comment this macro to disable support for the max_fragment_length extension
798 */
799#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
800
801/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200802 * \def POLARSSL_SSL_PROTO_SSL3
803 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200804 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200805 *
806 * Requires: POLARSSL_MD5_C
807 * POLARSSL_SHA1_C
808 *
809 * Comment this macro to disable support for SSL 3.0
810 */
811#define POLARSSL_SSL_PROTO_SSL3
812
813/**
814 * \def POLARSSL_SSL_PROTO_TLS1
815 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200816 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200817 *
818 * Requires: POLARSSL_MD5_C
819 * POLARSSL_SHA1_C
820 *
821 * Comment this macro to disable support for TLS 1.0
822 */
823#define POLARSSL_SSL_PROTO_TLS1
824
825/**
826 * \def POLARSSL_SSL_PROTO_TLS1_1
827 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200828 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200829 *
830 * Requires: POLARSSL_MD5_C
831 * POLARSSL_SHA1_C
832 *
833 * Comment this macro to disable support for TLS 1.1
834 */
835#define POLARSSL_SSL_PROTO_TLS1_1
836
837/**
838 * \def POLARSSL_SSL_PROTO_TLS1_2
839 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200840 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200841 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100842 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200843 * (Depends on ciphersuites)
844 *
845 * Comment this macro to disable support for TLS 1.2
846 */
847#define POLARSSL_SSL_PROTO_TLS1_2
848
849/**
Paul Bakkera503a632013-08-14 13:48:06 +0200850 * \def POLARSSL_SSL_SESSION_TICKETS
851 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200852 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200853 *
854 * Requires: POLARSSL_AES_C
855 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200856 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200857 *
858 * Comment this macro to disable support for SSL session tickets
859 */
860#define POLARSSL_SSL_SESSION_TICKETS
861
862/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200863 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
864 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200865 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200866 *
867 * Comment this macro to disable support for server name indication in SSL
868 */
869#define POLARSSL_SSL_SERVER_NAME_INDICATION
870
871/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200872 * \def POLARSSL_SSL_TRUNCATED_HMAC
873 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200874 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200875 *
876 * Comment this macro to disable support for truncated HMAC in SSL
877 */
878#define POLARSSL_SSL_TRUNCATED_HMAC
879
880/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100881 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100882 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100883 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100884 *
885 * This is disabled by default since it breaks binary compatibility with the
886 * 1.3.x line. If you choose to enable it, you will need to rebuild your
887 * application against the new header files, relinking will not be enough.
888 * It will be enabled by default, or no longer an option, in the 1.4 branch.
889 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100890 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100891 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +0100892//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100893
894/**
Paul Bakker2466d932013-09-28 14:40:38 +0200895 * \def POLARSSL_THREADING_ALT
896 *
897 * Provide your own alternate threading implementation.
898 *
899 * Requires: POLARSSL_THREADING_C
900 *
901 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200902 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200903//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200904
905/**
Paul Bakker2466d932013-09-28 14:40:38 +0200906 * \def POLARSSL_THREADING_PTHREAD
907 *
908 * Enable the pthread wrapper layer for the threading layer.
909 *
910 * Requires: POLARSSL_THREADING_C
911 *
912 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200913 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200914//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200915
916/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200917 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
918 *
919 * If set, the X509 parser will not break-off when parsing an X509 certificate
920 * and encountering an extension in a v1 or v2 certificate.
921 *
922 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200923 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200924//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200925
926/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000927 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
928 *
929 * If set, the X509 parser will not break-off when parsing an X509 certificate
930 * and encountering an unknown critical extension.
931 *
932 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000933 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200934//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000935
936/**
937 * \def POLARSSL_ZLIB_SUPPORT
938 *
939 * If set, the SSL/TLS module uses ZLIB to support compression and
940 * decompression of packet data.
941 *
942 * Used in: library/ssl_tls.c
943 * library/ssl_cli.c
944 * library/ssl_srv.c
945 *
946 * This feature requires zlib library and headers to be present.
947 *
948 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000949 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200950//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200951/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000952
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000953/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000954 * \name SECTION: PolarSSL modules
955 *
956 * This section enables or disables entire modules in PolarSSL
957 * \{
958 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000959
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000960/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +0100961 * \def POLARSSL_AESNI_C
962 *
963 * Enable AES-NI support on x86-64.
964 *
965 * Module: library/aesni.c
966 * Caller: library/aes.c
967 *
968 * Requires: POLARSSL_HAVE_ASM
969 *
970 * This modules adds support for the AES-NI instructions on x86-64
971 */
972#define POLARSSL_AESNI_C
973
974/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000975 * \def POLARSSL_AES_C
976 *
977 * Enable the AES block cipher.
978 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000979 * Module: library/aes.c
980 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000981 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000982 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000983 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000984 * This module enables the following ciphersuites (if other requisites are
985 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100986 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
987 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
988 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
989 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
990 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
991 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
992 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
993 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
994 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
995 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
996 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
997 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200998 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
999 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1000 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1001 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1002 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001003 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001004 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001005 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001006 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1007 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1008 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1009 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1010 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1011 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1012 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1013 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1014 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1015 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1016 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1017 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1018 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1019 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1020 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1021 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1022 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1023 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1024 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1025 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1026 * TLS_RSA_WITH_AES_256_GCM_SHA384
1027 * TLS_RSA_WITH_AES_256_CBC_SHA256
1028 * TLS_RSA_WITH_AES_256_CBC_SHA
1029 * TLS_RSA_WITH_AES_128_GCM_SHA256
1030 * TLS_RSA_WITH_AES_128_CBC_SHA256
1031 * TLS_RSA_WITH_AES_128_CBC_SHA
1032 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1033 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1034 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1035 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1036 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1037 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1038 * TLS_PSK_WITH_AES_256_GCM_SHA384
1039 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001040 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001041 * TLS_PSK_WITH_AES_128_GCM_SHA256
1042 * TLS_PSK_WITH_AES_128_CBC_SHA256
1043 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001044 *
Paul Bakkercff68422013-09-15 20:43:33 +02001045 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001046 */
Paul Bakker40e46942009-01-03 21:51:57 +00001047#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001048
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001049/**
1050 * \def POLARSSL_ARC4_C
1051 *
1052 * Enable the ARCFOUR stream cipher.
1053 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001054 * Module: library/arc4.c
1055 * Caller: library/ssl_tls.c
1056 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001057 * This module enables the following ciphersuites (if other requisites are
1058 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001059 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1060 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001061 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001062 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001063 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1064 * TLS_DHE_PSK_WITH_RC4_128_SHA
1065 * TLS_RSA_WITH_RC4_128_SHA
1066 * TLS_RSA_WITH_RC4_128_MD5
1067 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001068 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001069 */
Paul Bakker40e46942009-01-03 21:51:57 +00001070#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001071
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001072/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001073 * \def POLARSSL_ASN1_PARSE_C
1074 *
1075 * Enable the generic ASN1 parser.
1076 *
1077 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001078 * Caller: library/x509.c
1079 * library/dhm.c
1080 * library/pkcs12.c
1081 * library/pkcs5.c
1082 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001083 */
1084#define POLARSSL_ASN1_PARSE_C
1085
1086/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001087 * \def POLARSSL_ASN1_WRITE_C
1088 *
1089 * Enable the generic ASN1 writer.
1090 *
1091 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001092 * Caller: library/ecdsa.c
1093 * library/pkwrite.c
1094 * library/x509_create.c
1095 * library/x509write_crt.c
1096 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001097 */
1098#define POLARSSL_ASN1_WRITE_C
1099
1100/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001101 * \def POLARSSL_BASE64_C
1102 *
1103 * Enable the Base64 module.
1104 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001105 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001106 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001107 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001108 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001109 */
Paul Bakker40e46942009-01-03 21:51:57 +00001110#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001111
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001112/**
1113 * \def POLARSSL_BIGNUM_C
1114 *
Paul Bakker9a736322012-11-14 12:39:52 +00001115 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001116 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001117 * Module: library/bignum.c
1118 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001119 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001120 * library/rsa.c
1121 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001122 *
1123 * This module is required for RSA and DHM support.
1124 */
Paul Bakker40e46942009-01-03 21:51:57 +00001125#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001126
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001127/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001128 * \def POLARSSL_BLOWFISH_C
1129 *
1130 * Enable the Blowfish block cipher.
1131 *
1132 * Module: library/blowfish.c
1133 */
1134#define POLARSSL_BLOWFISH_C
1135
1136/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001137 * \def POLARSSL_CAMELLIA_C
1138 *
1139 * Enable the Camellia block cipher.
1140 *
Paul Bakker38119b12009-01-10 23:31:23 +00001141 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001142 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001143 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001144 * This module enables the following ciphersuites (if other requisites are
1145 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001146 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1147 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1148 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1149 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1150 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1151 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1152 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1153 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001154 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1155 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1156 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1157 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1158 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001159 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001160 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1161 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1162 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1163 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1164 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1165 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1166 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1167 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1168 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1169 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1170 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1171 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1172 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1173 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1174 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1175 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1176 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1177 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1178 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1179 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1180 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1181 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1182 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1183 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1184 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1185 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1186 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1187 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001188 */
1189#define POLARSSL_CAMELLIA_C
1190
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001191/**
1192 * \def POLARSSL_CERTS_C
1193 *
1194 * Enable the test certificates.
1195 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001196 * Module: library/certs.c
1197 * Caller:
1198 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001199 * Requires: POLARSSL_PEM_PARSE_C
1200 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001201 * This module is used for testing (ssl_client/server).
1202 */
Paul Bakker40e46942009-01-03 21:51:57 +00001203#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001204
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001205/**
1206 * \def POLARSSL_CIPHER_C
1207 *
1208 * Enable the generic cipher layer.
1209 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001210 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001211 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001212 *
1213 * Uncomment to enable generic cipher wrappers.
1214 */
1215#define POLARSSL_CIPHER_C
1216
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001217/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001218 * \def POLARSSL_CTR_DRBG_C
1219 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001220 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001221 *
1222 * Module: library/ctr_drbg.c
1223 * Caller:
1224 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001225 * Requires: POLARSSL_AES_C
1226 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001227 * This module provides the CTR_DRBG AES-256 random number generator.
1228 */
1229#define POLARSSL_CTR_DRBG_C
1230
1231/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001232 * \def POLARSSL_DEBUG_C
1233 *
1234 * Enable the debug functions.
1235 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001236 * Module: library/debug.c
1237 * Caller: library/ssl_cli.c
1238 * library/ssl_srv.c
1239 * library/ssl_tls.c
1240 *
1241 * This module provides debugging functions.
1242 */
Paul Bakker40e46942009-01-03 21:51:57 +00001243#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001244
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001245/**
1246 * \def POLARSSL_DES_C
1247 *
1248 * Enable the DES block cipher.
1249 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001250 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001251 * Caller: library/pem.c
1252 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001253 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001254 * This module enables the following ciphersuites (if other requisites are
1255 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001256 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1257 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001258 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001259 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001260 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1261 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1262 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1263 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1264 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001265 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001266 *
Paul Bakkercff68422013-09-15 20:43:33 +02001267 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001268 */
Paul Bakker40e46942009-01-03 21:51:57 +00001269#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001270
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001271/**
1272 * \def POLARSSL_DHM_C
1273 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001274 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001275 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001276 * Module: library/dhm.c
1277 * Caller: library/ssl_cli.c
1278 * library/ssl_srv.c
1279 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001280 * This module is used by the following key exchanges:
1281 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001282 */
Paul Bakker40e46942009-01-03 21:51:57 +00001283#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001284
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001285/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001286 * \def POLARSSL_ECDH_C
1287 *
1288 * Enable the elliptic curve Diffie-Hellman library.
1289 *
1290 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001291 * Caller: library/ssl_cli.c
1292 * library/ssl_srv.c
1293 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001294 * This module is used by the following key exchanges:
1295 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001296 *
1297 * Requires: POLARSSL_ECP_C
1298 */
1299#define POLARSSL_ECDH_C
1300
1301/**
1302 * \def POLARSSL_ECDSA_C
1303 *
1304 * Enable the elliptic curve DSA library.
1305 *
1306 * Module: library/ecdsa.c
1307 * Caller:
1308 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001309 * This module is used by the following key exchanges:
1310 * ECDHE-ECDSA
1311 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001312 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001313 */
1314#define POLARSSL_ECDSA_C
1315
1316/**
1317 * \def POLARSSL_ECP_C
1318 *
1319 * Enable the elliptic curve over GF(p) library.
1320 *
1321 * Module: library/ecp.c
1322 * Caller: library/ecdh.c
1323 * library/ecdsa.c
1324 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001325 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001326 */
1327#define POLARSSL_ECP_C
1328
1329/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001330 * \def POLARSSL_ENTROPY_C
1331 *
1332 * Enable the platform-specific entropy code.
1333 *
1334 * Module: library/entropy.c
1335 * Caller:
1336 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001337 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001338 *
1339 * This module provides a generic entropy pool
1340 */
1341#define POLARSSL_ENTROPY_C
1342
1343/**
Paul Bakker9d781402011-05-09 16:17:09 +00001344 * \def POLARSSL_ERROR_C
1345 *
1346 * Enable error code to error string conversion.
1347 *
1348 * Module: library/error.c
1349 * Caller:
1350 *
1351 * This module enables err_strerror().
1352 */
1353#define POLARSSL_ERROR_C
1354
1355/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001356 * \def POLARSSL_GCM_C
1357 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001358 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001359 *
1360 * Module: library/gcm.c
1361 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001362 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001363 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001364 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1365 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001366 */
1367#define POLARSSL_GCM_C
1368
1369/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001370 * \def POLARSSL_HAVEGE_C
1371 *
1372 * Enable the HAVEGE random generator.
1373 *
Paul Bakker2a844242013-06-24 13:01:53 +02001374 * Warning: the HAVEGE random generator is not suitable for virtualized
1375 * environments
1376 *
1377 * Warning: the HAVEGE random generator is dependent on timing and specific
1378 * processor traits. It is therefore not advised to use HAVEGE as
1379 * your applications primary random generator or primary entropy pool
1380 * input. As a secondary input to your entropy pool, it IS able add
1381 * the (limited) extra entropy it provides.
1382 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001383 * Module: library/havege.c
1384 * Caller:
1385 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001386 * Requires: POLARSSL_TIMING_C
1387 *
Paul Bakker2a844242013-06-24 13:01:53 +02001388 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001389 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001390//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001391
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001392/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001393 * \def POLARSSL_HMAC_DRBG_C
1394 *
1395 * Enable the HMAC_DRBG random generator.
1396 *
1397 * Module: library/hmac_drbg.c
1398 * Caller:
1399 *
1400 * Requires: POLARSSL_MD_C
1401 *
1402 * Uncomment to enable the HMAC_DRBG random number geerator.
1403 */
1404#define POLARSSL_HMAC_DRBG_C
1405
1406/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001407 * \def POLARSSL_MD_C
1408 *
1409 * Enable the generic message digest layer.
1410 *
Paul Bakker17373852011-01-06 14:20:01 +00001411 * Module: library/md.c
1412 * Caller:
1413 *
1414 * Uncomment to enable generic message digest wrappers.
1415 */
1416#define POLARSSL_MD_C
1417
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001418/**
1419 * \def POLARSSL_MD2_C
1420 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001421 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001422 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001423 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001424 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001425 *
1426 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001427 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001428//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001429
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001430/**
1431 * \def POLARSSL_MD4_C
1432 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001433 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001434 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001435 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001436 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001437 *
1438 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001439 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001440//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001441
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001442/**
1443 * \def POLARSSL_MD5_C
1444 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001445 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001446 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001447 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001448 * Caller: library/md.c
1449 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001450 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001451 *
1452 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001453 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001454 */
Paul Bakker40e46942009-01-03 21:51:57 +00001455#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001456
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001457/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001458 * \def POLARSSL_MEMORY_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001459 * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead.
Paul Bakker6e339b52013-07-03 13:37:05 +02001460 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001461//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001462
1463/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001464 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1465 *
1466 * Enable the buffer allocator implementation that makes use of a (stack)
1467 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1468 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001469 *
1470 * Module: library/memory_buffer_alloc.c
1471 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001472 * Requires: POLARSSL_PLATFORM_C
1473 * POLARSSL_PLATFORM_MEMORY (to use it within PolarSSL)
Paul Bakker6e339b52013-07-03 13:37:05 +02001474 *
1475 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001476 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001477//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001478
1479/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001480 * \def POLARSSL_NET_C
1481 *
1482 * Enable the TCP/IP networking routines.
1483 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001484 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001485 *
1486 * This module provides TCP/IP networking routines.
1487 */
Paul Bakker40e46942009-01-03 21:51:57 +00001488#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001489
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001490/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001491 * \def POLARSSL_OID_C
1492 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001493 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001494 *
1495 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001496 * Caller: library/asn1write.c
1497 * library/pkcs5.c
1498 * library/pkparse.c
1499 * library/pkwrite.c
1500 * library/rsa.c
1501 * library/x509.c
1502 * library/x509_create.c
1503 * library/x509_crl.c
1504 * library/x509_crt.c
1505 * library/x509_csr.c
1506 * library/x509write_crt.c
1507 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001508 *
1509 * This modules translates between OIDs and internal values.
1510 */
1511#define POLARSSL_OID_C
1512
1513/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001514 * \def POLARSSL_PADLOCK_C
1515 *
1516 * Enable VIA Padlock support on x86.
1517 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001518 * Module: library/padlock.c
1519 * Caller: library/aes.c
1520 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001521 * Requires: POLARSSL_HAVE_ASM
1522 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001523 * This modules adds support for the VIA PadLock on x86.
1524 */
Paul Bakker40e46942009-01-03 21:51:57 +00001525#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001526
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001527/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001528 * \def POLARSSL_PBKDF2_C
1529 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001530 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001531 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001532 *
1533 * Module: library/pbkdf2.c
1534 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001535 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001536 *
1537 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001538 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001539#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001540
1541/**
Paul Bakkercff68422013-09-15 20:43:33 +02001542 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001543 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001544 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001545 *
1546 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001547 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001548 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001549 * library/x509_crl.c
1550 * library/x509_crt.c
1551 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001552 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001553 * Requires: POLARSSL_BASE64_C
1554 *
Paul Bakkercff68422013-09-15 20:43:33 +02001555 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001556 */
Paul Bakkercff68422013-09-15 20:43:33 +02001557#define POLARSSL_PEM_PARSE_C
1558
1559/**
1560 * \def POLARSSL_PEM_WRITE_C
1561 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001562 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001563 *
1564 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001565 * Caller: library/pkwrite.c
1566 * library/x509write_crt.c
1567 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001568 *
1569 * Requires: POLARSSL_BASE64_C
1570 *
1571 * This modules adds support for encoding / writing PEM files.
1572 */
1573#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001574
1575/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001576 * \def POLARSSL_PK_C
1577 *
1578 * Enable the generic public (asymetric) key layer.
1579 *
1580 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001581 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001582 * library/ssl_cli.c
1583 * library/ssl_srv.c
1584 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001585 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1586 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001587 * Uncomment to enable generic public key wrappers.
1588 */
1589#define POLARSSL_PK_C
1590
1591/**
Paul Bakker4606c732013-09-15 17:04:23 +02001592 * \def POLARSSL_PK_PARSE_C
1593 *
1594 * Enable the generic public (asymetric) key parser.
1595 *
1596 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001597 * Caller: library/x509_crt.c
1598 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001599 *
1600 * Requires: POLARSSL_PK_C
1601 *
1602 * Uncomment to enable generic public key parse functions.
1603 */
1604#define POLARSSL_PK_PARSE_C
1605
1606/**
1607 * \def POLARSSL_PK_WRITE_C
1608 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001609 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001610 *
1611 * Module: library/pkwrite.c
1612 * Caller: library/x509write.c
1613 *
1614 * Requires: POLARSSL_PK_C
1615 *
1616 * Uncomment to enable generic public key write functions.
1617 */
1618#define POLARSSL_PK_WRITE_C
1619
1620/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001621 * \def POLARSSL_PKCS5_C
1622 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001623 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001624 *
1625 * Module: library/pkcs5.c
1626 *
1627 * Requires: POLARSSL_MD_C
1628 *
1629 * This module adds support for the PKCS#5 functions.
1630 */
1631#define POLARSSL_PKCS5_C
1632
1633/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001634 * \def POLARSSL_PKCS11_C
1635 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001636 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001637 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001638 * Module: library/pkcs11.c
1639 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001640 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001641 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001642 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001643 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001644 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001645 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001646//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001647
1648/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001649 * \def POLARSSL_PKCS12_C
1650 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001651 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001652 * Adds algorithms for parsing PKCS#8 encrypted private keys
1653 *
1654 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001655 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001656 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001657 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1658 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001659 *
1660 * This module enables PKCS#12 functions.
1661 */
1662#define POLARSSL_PKCS12_C
1663
1664/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001665 * \def POLARSSL_PLATFORM_C
1666 *
1667 * Enable the platform abstraction layer that allows you to re-assign
1668 * functions like malloc(), free(), printf(), fprintf()
1669 *
1670 * Module: library/platform.c
1671 * Caller: Most other .c files
1672 *
1673 * This module enables abstraction of common (libc) functions.
1674 */
1675#define POLARSSL_PLATFORM_C
1676
1677/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001678 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001679 *
1680 * Enable the RIPEMD-160 hash algorithm.
1681 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001682 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001683 * Caller: library/md.c
1684 *
1685 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001686#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001687
1688/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001689 * \def POLARSSL_RSA_C
1690 *
1691 * Enable the RSA public-key cryptosystem.
1692 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001693 * Module: library/rsa.c
1694 * Caller: library/ssl_cli.c
1695 * library/ssl_srv.c
1696 * library/ssl_tls.c
1697 * library/x509.c
1698 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001699 * This module is used by the following key exchanges:
1700 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001701 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001702 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001703 */
Paul Bakker40e46942009-01-03 21:51:57 +00001704#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001705
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001706/**
1707 * \def POLARSSL_SHA1_C
1708 *
1709 * Enable the SHA1 cryptographic hash algorithm.
1710 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001711 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001712 * Caller: library/md.c
1713 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001714 * library/ssl_srv.c
1715 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001716 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001717 *
1718 * This module is required for SSL/TLS and SHA1-signed certificates.
1719 */
Paul Bakker40e46942009-01-03 21:51:57 +00001720#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001721
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001722/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001723 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001724 *
1725 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001726 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001727 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001728 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001729 * Caller: library/entropy.c
1730 * library/md.c
1731 * library/ssl_cli.c
1732 * library/ssl_srv.c
1733 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001734 *
1735 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001736 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001737 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001738#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001739
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001740/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001741 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001742 *
1743 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001744 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001745 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001746 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001747 * Caller: library/entropy.c
1748 * library/md.c
1749 * library/ssl_cli.c
1750 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001751 *
1752 * This module adds support for SHA-384 and SHA-512.
1753 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001754#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001755
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001756/**
Paul Bakker0a597072012-09-25 21:55:46 +00001757 * \def POLARSSL_SSL_CACHE_C
1758 *
1759 * Enable simple SSL cache implementation.
1760 *
1761 * Module: library/ssl_cache.c
1762 * Caller:
1763 *
1764 * Requires: POLARSSL_SSL_CACHE_C
1765 */
1766#define POLARSSL_SSL_CACHE_C
1767
1768/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001769 * \def POLARSSL_SSL_CLI_C
1770 *
1771 * Enable the SSL/TLS client code.
1772 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001773 * Module: library/ssl_cli.c
1774 * Caller:
1775 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001776 * Requires: POLARSSL_SSL_TLS_C
1777 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001778 * This module is required for SSL/TLS client support.
1779 */
Paul Bakker40e46942009-01-03 21:51:57 +00001780#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001781
Paul Bakker9a736322012-11-14 12:39:52 +00001782/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001783 * \def POLARSSL_SSL_SRV_C
1784 *
1785 * Enable the SSL/TLS server code.
1786 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001787 * Module: library/ssl_srv.c
1788 * Caller:
1789 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001790 * Requires: POLARSSL_SSL_TLS_C
1791 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001792 * This module is required for SSL/TLS server support.
1793 */
Paul Bakker40e46942009-01-03 21:51:57 +00001794#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001795
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001796/**
1797 * \def POLARSSL_SSL_TLS_C
1798 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001799 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001800 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001801 * Module: library/ssl_tls.c
1802 * Caller: library/ssl_cli.c
1803 * library/ssl_srv.c
1804 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001805 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001806 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001807 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001808 * This module is required for SSL/TLS.
1809 */
Paul Bakker40e46942009-01-03 21:51:57 +00001810#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001811
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001812/**
Paul Bakker2466d932013-09-28 14:40:38 +02001813 * \def POLARSSL_THREADING_C
1814 *
1815 * Enable the threading abstraction layer.
1816 * By default PolarSSL assumes it is used in a non-threaded environment or that
1817 * contexts are not shared between threads. If you do intend to use contexts
1818 * between threads, you will need to enable this layer to prevent race
1819 * conditions.
1820 *
1821 * Module: library/threading.c
1822 *
1823 * This allows different threading implementations (self-implemented or
1824 * provided).
1825 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001826 * You will have to enable either POLARSSL_THREADING_ALT or
1827 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001828 *
1829 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001830 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001831//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001832
1833/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001834 * \def POLARSSL_TIMING_C
1835 *
1836 * Enable the portable timing interface.
1837 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001838 * Module: library/timing.c
1839 * Caller: library/havege.c
1840 *
1841 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001842 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001843#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001844
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001845/**
1846 * \def POLARSSL_VERSION_C
1847 *
1848 * Enable run-time version information.
1849 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001850 * Module: library/version.c
1851 *
1852 * This module provides run-time version information.
1853 */
1854#define POLARSSL_VERSION_C
1855
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001856/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001857 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001858 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001859 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001860 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001861 * Module: library/x509.c
1862 * Caller: library/x509_crl.c
1863 * library/x509_crt.c
1864 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001865 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001866 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001867 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001868 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001869 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001870 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001871#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001872
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001873/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001874 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001875 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001876 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001877 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001878 * Module: library/x509_crt.c
1879 * Caller: library/ssl_cli.c
1880 * library/ssl_srv.c
1881 * library/ssl_tls.c
1882 *
1883 * Requires: POLARSSL_X509_USE_C
1884 *
1885 * This module is required for X.509 certificate parsing.
1886 */
1887#define POLARSSL_X509_CRT_PARSE_C
1888
1889/**
1890 * \def POLARSSL_X509_CRL_PARSE_C
1891 *
1892 * Enable X.509 CRL parsing.
1893 *
1894 * Module: library/x509_crl.c
1895 * Caller: library/x509_crt.c
1896 *
1897 * Requires: POLARSSL_X509_USE_C
1898 *
1899 * This module is required for X.509 CRL parsing.
1900 */
1901#define POLARSSL_X509_CRL_PARSE_C
1902
1903/**
1904 * \def POLARSSL_X509_CSR_PARSE_C
1905 *
1906 * Enable X.509 Certificate Signing Request (CSR) parsing.
1907 *
1908 * Module: library/x509_csr.c
1909 * Caller: library/x509_crt_write.c
1910 *
1911 * Requires: POLARSSL_X509_USE_C
1912 *
1913 * This module is used for reading X.509 certificate request.
1914 */
1915#define POLARSSL_X509_CSR_PARSE_C
1916
1917/**
1918 * \def POLARSSL_X509_CREATE_C
1919 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001920 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001921 *
1922 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001923 *
Paul Bakker4606c732013-09-15 17:04:23 +02001924 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001925 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001926 * This module is the basis for creating X.509 certificates and CSRs.
1927 */
1928#define POLARSSL_X509_CREATE_C
1929
1930/**
1931 * \def POLARSSL_X509_CRT_WRITE_C
1932 *
1933 * Enable creating X.509 certificates.
1934 *
1935 * Module: library/x509_crt_write.c
1936 *
1937 * Requires: POLARSSL_CREATE_C
1938 *
1939 * This module is required for X.509 certificate creation.
1940 */
1941#define POLARSSL_X509_CRT_WRITE_C
1942
1943/**
1944 * \def POLARSSL_X509_CSR_WRITE_C
1945 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001946 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001947 *
1948 * Module: library/x509_csr_write.c
1949 *
1950 * Requires: POLARSSL_CREATE_C
1951 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001952 * This module is required for X.509 certificate request writing.
1953 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001954#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001955
1956/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001957 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001958 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001959 * Enable the XTEA block cipher.
1960 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001961 * Module: library/xtea.c
1962 * Caller:
1963 */
1964#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001965
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001966/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001967
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001968/**
1969 * \name SECTION: Module configuration options
1970 *
1971 * This section allows for the setting of module specific sizes and
1972 * configuration options. The default values are already present in the
1973 * relevant header files and should suffice for the regular use cases.
1974 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1975 * only if you have a good reason and know the consequences.
1976 *
1977 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1978 * header file take precedence.
1979 *
1980 * Please check the respective header file for documentation on these
1981 * parameters (to prevent duplicate documentation).
1982 *
1983 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1984 * \{
1985 */
1986//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1987
1988#if defined(POLARSSL_CONFIG_OPTIONS)
1989
1990// MPI / BIGNUM options
1991//
1992#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1993#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1994
1995// CTR_DRBG options
1996//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001997#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 +02001998#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1999#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2000#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2001#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2002
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002003// HMAC_DRBG options
2004//
2005#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2006#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2007#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2008#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2009
Paul Bakkere1b665e2013-12-11 16:02:58 +01002010// ECP options
2011//
2012#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2013#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
Manuel Pégourié-Gonnard9e4191c2013-12-30 18:41:16 +01002014#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002015
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002016// Entropy options
2017//
2018#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2019#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
2020
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002021// Memory buffer allocator options
Paul Bakker6e339b52013-07-03 13:37:05 +02002022#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker6e339b52013-07-03 13:37:05 +02002023
Paul Bakker747a83a2014-02-01 22:50:07 +01002024// Platform options
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002025#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2026#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
Paul Bakker747a83a2014-02-01 22:50:07 +01002027#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2028#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002029
2030// SSL Cache options
2031//
2032#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2033#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
2034
2035// SSL options
2036//
2037#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02002038#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002039
2040#endif /* POLARSSL_CONFIG_OPTIONS */
2041
2042/* \} name */
2043
Paul Bakker7ad00f92013-04-18 23:05:25 +02002044/*
2045 * Sanity checks on defines and dependencies
2046 */
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002047#if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
2048#error "POLARSSL_AESNI_C defined, but not all prerequisites"
2049#endif
2050
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002051#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
2052#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002053#endif
2054
2055#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
2056#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
2057#endif
2058
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002059#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
2060#error "POLARSSL_DHM_C defined, but not all prerequisites"
2061#endif
2062
Paul Bakker7ad00f92013-04-18 23:05:25 +02002063#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
2064#error "POLARSSL_ECDH_C defined, but not all prerequisites"
2065#endif
2066
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02002067#if defined(POLARSSL_ECDSA_C) && \
2068 ( !defined(POLARSSL_ECP_C) || \
2069 !defined(POLARSSL_ASN1_PARSE_C) || \
2070 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002071#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
2072#endif
2073
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +01002074#if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C)
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +01002075#error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
2076#endif
2077
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01002078#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
2079 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
2080 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
2081 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
2082 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
2083 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
2084 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
2085 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
Manuel Pégourié-Gonnardffd94cc2014-01-28 20:11:07 +01002086 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \
2087 !defined(POLARSSL_ECP_DP_M255_ENABLED) && \
2088 !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \
2089 !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \
2090 !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002091#error "POLARSSL_ECP_C defined, but not all prerequisites"
2092#endif
2093
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002094#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
2095 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02002096#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
2097#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002098#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
2099 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
2100#error "CTR_DRBG_ENTROPY_LEN value too high"
2101#endif
2102#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
2103 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
2104#error "CTR_DRBG_ENTROPY_LEN value too high"
2105#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02002106
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02002107#if defined(POLARSSL_GCM_C) && ( \
2108 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002109#error "POLARSSL_GCM_C defined, but not all prerequisites"
2110#endif
2111
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002112#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
2113#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
2114#endif
2115
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01002116#if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C)
2117#error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites"
2118#endif
2119
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01002120#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
2121 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2122#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
2123#endif
2124
2125#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
2126 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2127#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
2128#endif
2129
Paul Bakkere07f41d2013-04-19 09:08:57 +02002130#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
2131#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
2132#endif
2133
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02002134#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
2135 !defined(POLARSSL_ECDH_C)
2136#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
2137#endif
2138
Paul Bakkere07f41d2013-04-19 09:08:57 +02002139#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2140 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002141 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002142#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2143#endif
2144
2145#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2146 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002147 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002148#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2149#endif
2150
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002151#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2152 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002153 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002154#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2155#endif
2156
Paul Bakkere07f41d2013-04-19 09:08:57 +02002157#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002158 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002159 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002160#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2161#endif
2162
2163#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002164 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002165 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002166#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2167#endif
2168
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002169#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \
2170 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
Paul Bakker6e339b52013-07-03 13:37:05 +02002171#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2172#endif
2173
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002174#if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2175#error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2176#endif
2177
Paul Bakker7ad00f92013-04-18 23:05:25 +02002178#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2179#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2180#endif
2181
Paul Bakkercff68422013-09-15 20:43:33 +02002182#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2183#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2184#endif
2185
2186#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2187#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002188#endif
2189
Paul Bakker4606c732013-09-15 17:04:23 +02002190#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2191#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2192#endif
2193
2194#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2195#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2196#endif
2197
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002198#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002199#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2200#endif
2201
2202#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2203 !defined(POLARSSL_OID_C) )
2204#error "POLARSSL_RSA_C defined, but not all prerequisites"
2205#endif
2206
Manuel Pégourié-Gonnardce7c6fd2014-01-24 14:37:29 +01002207#if defined(POLARSSL_RSASSA_PSS_CERTIFICATES) && \
2208 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_PKCS1_V21) )
2209#error "POLARSSL_RSASSA_PSS_CERTIFICATES defined, but not all prerequisites"
2210#endif
2211
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002212#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2213 !defined(POLARSSL_SHA1_C) )
2214#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2215#endif
2216
2217#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2218 !defined(POLARSSL_SHA1_C) )
2219#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2220#endif
2221
2222#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2223 !defined(POLARSSL_SHA1_C) )
2224#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2225#endif
2226
2227#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2228 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2229#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2230#endif
2231
Paul Bakker7ad00f92013-04-18 23:05:25 +02002232#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2233#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2234#endif
2235
Paul Bakker577e0062013-08-28 11:57:20 +02002236#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002237 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002238#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2239#endif
2240
2241#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2242#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2243#endif
2244
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002245#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2246 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2247 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2248#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2249#endif
2250
2251#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2252 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2253#error "Illegal protocol selection"
2254#endif
2255
2256#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2257 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2258#error "Illegal protocol selection"
2259#endif
2260
2261#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2262 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2263 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2264#error "Illegal protocol selection"
2265#endif
2266
Paul Bakker59da0a42013-08-19 13:27:17 +02002267#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002268 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2269 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002270#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2271#endif
2272
Paul Bakker2466d932013-09-28 14:40:38 +02002273#if defined(POLARSSL_THREADING_PTHREAD)
2274#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2275#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2276#endif
2277#define POLARSSL_THREADING_IMPL
2278#endif
2279
2280#if defined(POLARSSL_THREADING_ALT)
2281#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2282#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2283#endif
2284#define POLARSSL_THREADING_IMPL
2285#endif
2286
2287#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2288#error "POLARSSL_THREADING_C defined, single threading implementation required"
2289#endif
2290#undef POLARSSL_THREADING_IMPL
2291
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002292#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002293 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002294 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002295#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002296#endif
2297
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002298#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2299 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2300 !defined(POLARSSL_PK_WRITE_C) )
2301#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2302#endif
2303
2304#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2305#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2306#endif
2307
2308#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2309#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2310#endif
2311
2312#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2313#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2314#endif
2315
2316#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2317#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2318#endif
2319
2320#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2321#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002322#endif
2323
Paul Bakker5121ce52009-01-03 21:22:43 +00002324#endif /* config.h */