blob: db34e6a2983bb4f1d2423a7b1c33a85b519b49dc [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 Bakker2ceda572014-02-06 15:55:25 +0100669 * \def POLARSSL_ENTROPY_FORCE_SHA256
670 *
671 * Force the entropy accumulator to use a SHA-256 accumulator instead of the
672 * default SHA-512 based one (if both are available).
673 *
674 * Requires: POLARSSL_SHA256_C
675 *
676 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
677 * if you have performance concerns.
678 *
679 * This option is only useful if both POLARSSL_SHA256_C and
680 * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used.
681 */
682//#define POLARSSL_ENTROPY_FORCE_SHA256
683
684/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200685 * \def POLARSSL_MEMORY_DEBUG
686 *
687 * Enable debugging of buffer allocator memory issues. Automatically prints
688 * (to stderr) all (fatal) messages on memory allocation issues. Enables
689 * function for 'debug output' of allocated memory.
690 *
691 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +0200692 *
693 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200694 */
695//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200696
697/**
698 * \def POLARSSL_MEMORY_BACKTRACE
699 *
700 * Include backtrace information with each allocated block.
701 *
702 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
703 * GLIBC-compatible backtrace() an backtrace_symbols() support
704 *
705 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200706 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200707//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200708
709/**
Paul Bakker48377d92013-08-30 12:06:24 +0200710 * \def POLARSSL_PKCS1_V15
711 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200712 * Enable support for PKCS#1 v1.5 encoding.
713 *
Paul Bakker48377d92013-08-30 12:06:24 +0200714 * Requires: POLARSSL_RSA_C
715 *
Paul Bakker48377d92013-08-30 12:06:24 +0200716 * This enables support for PKCS#1 v1.5 operations.
717 */
718#define POLARSSL_PKCS1_V15
719
720/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000721 * \def POLARSSL_PKCS1_V21
722 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200723 * Enable support for PKCS#1 v2.1 encoding.
724 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000725 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
726 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000727 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
728 */
729#define POLARSSL_PKCS1_V21
730
731/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000732 * \def POLARSSL_RSA_NO_CRT
733 *
734 * Do not use the Chinese Remainder Theorem for the RSA private operation.
735 *
736 * Uncomment this macro to disable the use of CRT in RSA.
737 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000738 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200739//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000740
741/**
742 * \def POLARSSL_SELF_TEST
743 *
744 * Enable the checkup functions (*_self_test).
745 */
746#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000747
748/**
Paul Bakker40865c82013-01-31 17:13:13 +0100749 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
750 *
751 * Enable sending of alert messages in case of encountered errors as per RFC.
752 * If you choose not to send the alert messages, PolarSSL can still communicate
753 * with other servers, only debugging of failures is harder.
754 *
755 * The advantage of not sending alert messages, is that no information is given
756 * about reasons for failures thus preventing adversaries of gaining intel.
757 *
758 * Enable sending of all alert messages
759 */
760#define POLARSSL_SSL_ALERT_MESSAGES
761
762/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100763 * \def POLARSSL_SSL_DEBUG_ALL
764 *
765 * Enable the debug messages in SSL module for all issues.
766 * Debug messages have been disabled in some places to prevent timing
767 * attacks due to (unbalanced) debugging function calls.
768 *
769 * If you need all error reporting you should enable this during debugging,
770 * but remove this for production servers that should log as well.
771 *
772 * Uncomment this macro to report all debug messages on errors introducing
773 * a timing side-channel.
774 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100775 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200776//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100777
778/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000779 * \def POLARSSL_SSL_HW_RECORD_ACCEL
780 *
781 * Enable hooking functions in SSL module for hardware acceleration of
782 * individual records.
783 *
784 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000785 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200786//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000787
788/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100789 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
790 *
791 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200792 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100793 *
794 * Comment this macro to disable support for SSLv2 Client Hello messages.
795 */
796#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
797
798/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100799 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
800 *
801 * Pick the ciphersuite according to the client's preferences rather than ours
802 * in the SSL Server module (POLARSSL_SSL_SRV_C).
803 *
804 * Uncomment this macro to respect client's ciphersuite order
805 */
806//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
807
808/**
Paul Bakker05decb22013-08-15 13:33:48 +0200809 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
810 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200811 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200812 *
813 * Comment this macro to disable support for the max_fragment_length extension
814 */
815#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
816
817/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200818 * \def POLARSSL_SSL_PROTO_SSL3
819 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200820 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200821 *
822 * Requires: POLARSSL_MD5_C
823 * POLARSSL_SHA1_C
824 *
825 * Comment this macro to disable support for SSL 3.0
826 */
827#define POLARSSL_SSL_PROTO_SSL3
828
829/**
830 * \def POLARSSL_SSL_PROTO_TLS1
831 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200832 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200833 *
834 * Requires: POLARSSL_MD5_C
835 * POLARSSL_SHA1_C
836 *
837 * Comment this macro to disable support for TLS 1.0
838 */
839#define POLARSSL_SSL_PROTO_TLS1
840
841/**
842 * \def POLARSSL_SSL_PROTO_TLS1_1
843 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200844 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200845 *
846 * Requires: POLARSSL_MD5_C
847 * POLARSSL_SHA1_C
848 *
849 * Comment this macro to disable support for TLS 1.1
850 */
851#define POLARSSL_SSL_PROTO_TLS1_1
852
853/**
854 * \def POLARSSL_SSL_PROTO_TLS1_2
855 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200856 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200857 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100858 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200859 * (Depends on ciphersuites)
860 *
861 * Comment this macro to disable support for TLS 1.2
862 */
863#define POLARSSL_SSL_PROTO_TLS1_2
864
865/**
Paul Bakkera503a632013-08-14 13:48:06 +0200866 * \def POLARSSL_SSL_SESSION_TICKETS
867 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200868 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200869 *
870 * Requires: POLARSSL_AES_C
871 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200872 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200873 *
874 * Comment this macro to disable support for SSL session tickets
875 */
876#define POLARSSL_SSL_SESSION_TICKETS
877
878/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200879 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
880 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200881 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200882 *
883 * Comment this macro to disable support for server name indication in SSL
884 */
885#define POLARSSL_SSL_SERVER_NAME_INDICATION
886
887/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200888 * \def POLARSSL_SSL_TRUNCATED_HMAC
889 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200890 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200891 *
892 * Comment this macro to disable support for truncated HMAC in SSL
893 */
894#define POLARSSL_SSL_TRUNCATED_HMAC
895
896/**
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100897 * \def POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100898 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100899 * Enable ssl_set_curves().
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100900 *
901 * This is disabled by default since it breaks binary compatibility with the
902 * 1.3.x line. If you choose to enable it, you will need to rebuild your
903 * application against the new header files, relinking will not be enough.
904 * It will be enabled by default, or no longer an option, in the 1.4 branch.
905 *
Manuel Pégourié-Gonnardde053902014-02-04 13:58:39 +0100906 * Uncomment to make ssl_set_curves() available.
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100907 */
Manuel Pégourié-Gonnard79265702014-02-06 10:23:14 +0100908//#define POLARSSL_SSL_SET_CURVES
Manuel Pégourié-Gonnard5de25802014-02-03 15:56:49 +0100909
910/**
Paul Bakker2466d932013-09-28 14:40:38 +0200911 * \def POLARSSL_THREADING_ALT
912 *
913 * Provide your own alternate threading implementation.
914 *
915 * Requires: POLARSSL_THREADING_C
916 *
917 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200918 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200919//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200920
921/**
Paul Bakker2466d932013-09-28 14:40:38 +0200922 * \def POLARSSL_THREADING_PTHREAD
923 *
924 * Enable the pthread wrapper layer for the threading layer.
925 *
926 * Requires: POLARSSL_THREADING_C
927 *
928 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200929 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200930//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200931
932/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200933 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
934 *
935 * If set, the X509 parser will not break-off when parsing an X509 certificate
936 * and encountering an extension in a v1 or v2 certificate.
937 *
938 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200939 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200940//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200941
942/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000943 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
944 *
945 * If set, the X509 parser will not break-off when parsing an X509 certificate
946 * and encountering an unknown critical extension.
947 *
948 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000949 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200950//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000951
952/**
953 * \def POLARSSL_ZLIB_SUPPORT
954 *
955 * If set, the SSL/TLS module uses ZLIB to support compression and
956 * decompression of packet data.
957 *
958 * Used in: library/ssl_tls.c
959 * library/ssl_cli.c
960 * library/ssl_srv.c
961 *
962 * This feature requires zlib library and headers to be present.
963 *
964 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000965 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200966//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200967/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000968
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000969/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000970 * \name SECTION: PolarSSL modules
971 *
972 * This section enables or disables entire modules in PolarSSL
973 * \{
974 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000975
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000976/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +0100977 * \def POLARSSL_AESNI_C
978 *
979 * Enable AES-NI support on x86-64.
980 *
981 * Module: library/aesni.c
982 * Caller: library/aes.c
983 *
984 * Requires: POLARSSL_HAVE_ASM
985 *
986 * This modules adds support for the AES-NI instructions on x86-64
987 */
988#define POLARSSL_AESNI_C
989
990/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000991 * \def POLARSSL_AES_C
992 *
993 * Enable the AES block cipher.
994 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000995 * Module: library/aes.c
996 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000997 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000998 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000999 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001000 * This module enables the following ciphersuites (if other requisites are
1001 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001002 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
1003 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
1004 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
1005 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
1006 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
1007 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
1008 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
1009 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
1010 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
1011 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
1012 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
1013 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001014 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
1015 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
1016 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
1017 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
1018 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001019 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001020 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001021 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001022 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
1023 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
1024 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
1025 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
1026 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1027 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
1028 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
1029 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
1030 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1031 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
1032 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
1033 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
1034 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
1035 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
1036 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
1037 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
1038 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
1039 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
1040 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
1041 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
1042 * TLS_RSA_WITH_AES_256_GCM_SHA384
1043 * TLS_RSA_WITH_AES_256_CBC_SHA256
1044 * TLS_RSA_WITH_AES_256_CBC_SHA
1045 * TLS_RSA_WITH_AES_128_GCM_SHA256
1046 * TLS_RSA_WITH_AES_128_CBC_SHA256
1047 * TLS_RSA_WITH_AES_128_CBC_SHA
1048 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
1049 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
1050 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
1051 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
1052 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
1053 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
1054 * TLS_PSK_WITH_AES_256_GCM_SHA384
1055 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001056 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001057 * TLS_PSK_WITH_AES_128_GCM_SHA256
1058 * TLS_PSK_WITH_AES_128_CBC_SHA256
1059 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001060 *
Paul Bakkercff68422013-09-15 20:43:33 +02001061 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001062 */
Paul Bakker40e46942009-01-03 21:51:57 +00001063#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001064
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001065/**
1066 * \def POLARSSL_ARC4_C
1067 *
1068 * Enable the ARCFOUR stream cipher.
1069 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001070 * Module: library/arc4.c
1071 * Caller: library/ssl_tls.c
1072 *
Paul Bakker41c83d32013-03-20 14:39:14 +01001073 * This module enables the following ciphersuites (if other requisites are
1074 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001075 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
1076 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001077 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001078 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001079 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1080 * TLS_DHE_PSK_WITH_RC4_128_SHA
1081 * TLS_RSA_WITH_RC4_128_SHA
1082 * TLS_RSA_WITH_RC4_128_MD5
1083 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001084 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001085 */
Paul Bakker40e46942009-01-03 21:51:57 +00001086#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001087
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001088/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001089 * \def POLARSSL_ASN1_PARSE_C
1090 *
1091 * Enable the generic ASN1 parser.
1092 *
1093 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001094 * Caller: library/x509.c
1095 * library/dhm.c
1096 * library/pkcs12.c
1097 * library/pkcs5.c
1098 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001099 */
1100#define POLARSSL_ASN1_PARSE_C
1101
1102/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001103 * \def POLARSSL_ASN1_WRITE_C
1104 *
1105 * Enable the generic ASN1 writer.
1106 *
1107 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001108 * Caller: library/ecdsa.c
1109 * library/pkwrite.c
1110 * library/x509_create.c
1111 * library/x509write_crt.c
1112 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001113 */
1114#define POLARSSL_ASN1_WRITE_C
1115
1116/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001117 * \def POLARSSL_BASE64_C
1118 *
1119 * Enable the Base64 module.
1120 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001121 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001122 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001123 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001124 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001125 */
Paul Bakker40e46942009-01-03 21:51:57 +00001126#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001127
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001128/**
1129 * \def POLARSSL_BIGNUM_C
1130 *
Paul Bakker9a736322012-11-14 12:39:52 +00001131 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001132 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001133 * Module: library/bignum.c
1134 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001135 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001136 * library/rsa.c
1137 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001138 *
1139 * This module is required for RSA and DHM support.
1140 */
Paul Bakker40e46942009-01-03 21:51:57 +00001141#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001142
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001143/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001144 * \def POLARSSL_BLOWFISH_C
1145 *
1146 * Enable the Blowfish block cipher.
1147 *
1148 * Module: library/blowfish.c
1149 */
1150#define POLARSSL_BLOWFISH_C
1151
1152/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001153 * \def POLARSSL_CAMELLIA_C
1154 *
1155 * Enable the Camellia block cipher.
1156 *
Paul Bakker38119b12009-01-10 23:31:23 +00001157 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001158 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001159 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001160 * This module enables the following ciphersuites (if other requisites are
1161 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001162 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1163 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1164 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1165 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1166 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1167 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1168 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1169 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001170 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1171 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1172 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1173 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1174 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001175 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001176 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1177 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1178 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1179 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1180 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1181 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1182 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1183 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1184 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1185 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1186 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1187 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1188 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1189 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1190 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1191 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1192 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1193 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1194 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1195 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1196 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1197 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1198 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1199 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1200 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1201 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1202 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1203 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001204 */
1205#define POLARSSL_CAMELLIA_C
1206
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001207/**
1208 * \def POLARSSL_CERTS_C
1209 *
1210 * Enable the test certificates.
1211 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001212 * Module: library/certs.c
1213 * Caller:
1214 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001215 * Requires: POLARSSL_PEM_PARSE_C
1216 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001217 * This module is used for testing (ssl_client/server).
1218 */
Paul Bakker40e46942009-01-03 21:51:57 +00001219#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001220
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001221/**
1222 * \def POLARSSL_CIPHER_C
1223 *
1224 * Enable the generic cipher layer.
1225 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001226 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001227 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001228 *
1229 * Uncomment to enable generic cipher wrappers.
1230 */
1231#define POLARSSL_CIPHER_C
1232
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001233/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001234 * \def POLARSSL_CTR_DRBG_C
1235 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001236 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001237 *
1238 * Module: library/ctr_drbg.c
1239 * Caller:
1240 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001241 * Requires: POLARSSL_AES_C
1242 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001243 * This module provides the CTR_DRBG AES-256 random number generator.
1244 */
1245#define POLARSSL_CTR_DRBG_C
1246
1247/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001248 * \def POLARSSL_DEBUG_C
1249 *
1250 * Enable the debug functions.
1251 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001252 * Module: library/debug.c
1253 * Caller: library/ssl_cli.c
1254 * library/ssl_srv.c
1255 * library/ssl_tls.c
1256 *
1257 * This module provides debugging functions.
1258 */
Paul Bakker40e46942009-01-03 21:51:57 +00001259#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001260
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001261/**
1262 * \def POLARSSL_DES_C
1263 *
1264 * Enable the DES block cipher.
1265 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001266 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001267 * Caller: library/pem.c
1268 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001269 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001270 * This module enables the following ciphersuites (if other requisites are
1271 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001272 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1273 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001274 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001275 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001276 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1277 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1278 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1279 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1280 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001281 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001282 *
Paul Bakkercff68422013-09-15 20:43:33 +02001283 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001284 */
Paul Bakker40e46942009-01-03 21:51:57 +00001285#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001286
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001287/**
1288 * \def POLARSSL_DHM_C
1289 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001290 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001291 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001292 * Module: library/dhm.c
1293 * Caller: library/ssl_cli.c
1294 * library/ssl_srv.c
1295 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001296 * This module is used by the following key exchanges:
1297 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001298 */
Paul Bakker40e46942009-01-03 21:51:57 +00001299#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001300
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001301/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001302 * \def POLARSSL_ECDH_C
1303 *
1304 * Enable the elliptic curve Diffie-Hellman library.
1305 *
1306 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001307 * Caller: library/ssl_cli.c
1308 * library/ssl_srv.c
1309 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001310 * This module is used by the following key exchanges:
1311 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001312 *
1313 * Requires: POLARSSL_ECP_C
1314 */
1315#define POLARSSL_ECDH_C
1316
1317/**
1318 * \def POLARSSL_ECDSA_C
1319 *
1320 * Enable the elliptic curve DSA library.
1321 *
1322 * Module: library/ecdsa.c
1323 * Caller:
1324 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001325 * This module is used by the following key exchanges:
1326 * ECDHE-ECDSA
1327 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001328 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001329 */
1330#define POLARSSL_ECDSA_C
1331
1332/**
1333 * \def POLARSSL_ECP_C
1334 *
1335 * Enable the elliptic curve over GF(p) library.
1336 *
1337 * Module: library/ecp.c
1338 * Caller: library/ecdh.c
1339 * library/ecdsa.c
1340 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001341 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001342 */
1343#define POLARSSL_ECP_C
1344
1345/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001346 * \def POLARSSL_ENTROPY_C
1347 *
1348 * Enable the platform-specific entropy code.
1349 *
1350 * Module: library/entropy.c
1351 * Caller:
1352 *
Paul Bakker2ceda572014-02-06 15:55:25 +01001353 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001354 *
1355 * This module provides a generic entropy pool
1356 */
1357#define POLARSSL_ENTROPY_C
1358
1359/**
Paul Bakker9d781402011-05-09 16:17:09 +00001360 * \def POLARSSL_ERROR_C
1361 *
1362 * Enable error code to error string conversion.
1363 *
1364 * Module: library/error.c
1365 * Caller:
1366 *
1367 * This module enables err_strerror().
1368 */
1369#define POLARSSL_ERROR_C
1370
1371/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001372 * \def POLARSSL_GCM_C
1373 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001374 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001375 *
1376 * Module: library/gcm.c
1377 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001378 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001379 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001380 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1381 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001382 */
1383#define POLARSSL_GCM_C
1384
1385/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001386 * \def POLARSSL_HAVEGE_C
1387 *
1388 * Enable the HAVEGE random generator.
1389 *
Paul Bakker2a844242013-06-24 13:01:53 +02001390 * Warning: the HAVEGE random generator is not suitable for virtualized
1391 * environments
1392 *
1393 * Warning: the HAVEGE random generator is dependent on timing and specific
1394 * processor traits. It is therefore not advised to use HAVEGE as
1395 * your applications primary random generator or primary entropy pool
1396 * input. As a secondary input to your entropy pool, it IS able add
1397 * the (limited) extra entropy it provides.
1398 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001399 * Module: library/havege.c
1400 * Caller:
1401 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001402 * Requires: POLARSSL_TIMING_C
1403 *
Paul Bakker2a844242013-06-24 13:01:53 +02001404 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001405 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001406//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001407
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001408/**
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01001409 * \def POLARSSL_HMAC_DRBG_C
1410 *
1411 * Enable the HMAC_DRBG random generator.
1412 *
1413 * Module: library/hmac_drbg.c
1414 * Caller:
1415 *
1416 * Requires: POLARSSL_MD_C
1417 *
1418 * Uncomment to enable the HMAC_DRBG random number geerator.
1419 */
1420#define POLARSSL_HMAC_DRBG_C
1421
1422/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001423 * \def POLARSSL_MD_C
1424 *
1425 * Enable the generic message digest layer.
1426 *
Paul Bakker17373852011-01-06 14:20:01 +00001427 * Module: library/md.c
1428 * Caller:
1429 *
1430 * Uncomment to enable generic message digest wrappers.
1431 */
1432#define POLARSSL_MD_C
1433
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001434/**
1435 * \def POLARSSL_MD2_C
1436 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001437 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001438 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001439 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001440 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001441 *
1442 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001443 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001444//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001445
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001446/**
1447 * \def POLARSSL_MD4_C
1448 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001449 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001450 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001451 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001452 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001453 *
1454 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001455 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001456//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001457
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001458/**
1459 * \def POLARSSL_MD5_C
1460 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001461 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001462 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001463 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001464 * Caller: library/md.c
1465 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001466 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001467 *
1468 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001469 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001470 */
Paul Bakker40e46942009-01-03 21:51:57 +00001471#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001472
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001473/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001474 * \def POLARSSL_MEMORY_C
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001475 * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead.
Paul Bakker6e339b52013-07-03 13:37:05 +02001476 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001477//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001478
1479/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001480 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1481 *
1482 * Enable the buffer allocator implementation that makes use of a (stack)
1483 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1484 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001485 *
1486 * Module: library/memory_buffer_alloc.c
1487 *
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01001488 * Requires: POLARSSL_PLATFORM_C
1489 * POLARSSL_PLATFORM_MEMORY (to use it within PolarSSL)
Paul Bakker6e339b52013-07-03 13:37:05 +02001490 *
1491 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001492 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001493//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001494
1495/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001496 * \def POLARSSL_NET_C
1497 *
1498 * Enable the TCP/IP networking routines.
1499 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001500 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001501 *
1502 * This module provides TCP/IP networking routines.
1503 */
Paul Bakker40e46942009-01-03 21:51:57 +00001504#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001505
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001506/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001507 * \def POLARSSL_OID_C
1508 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001509 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001510 *
1511 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001512 * Caller: library/asn1write.c
1513 * library/pkcs5.c
1514 * library/pkparse.c
1515 * library/pkwrite.c
1516 * library/rsa.c
1517 * library/x509.c
1518 * library/x509_create.c
1519 * library/x509_crl.c
1520 * library/x509_crt.c
1521 * library/x509_csr.c
1522 * library/x509write_crt.c
1523 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001524 *
1525 * This modules translates between OIDs and internal values.
1526 */
1527#define POLARSSL_OID_C
1528
1529/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001530 * \def POLARSSL_PADLOCK_C
1531 *
1532 * Enable VIA Padlock support on x86.
1533 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001534 * Module: library/padlock.c
1535 * Caller: library/aes.c
1536 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001537 * Requires: POLARSSL_HAVE_ASM
1538 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001539 * This modules adds support for the VIA PadLock on x86.
1540 */
Paul Bakker40e46942009-01-03 21:51:57 +00001541#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001542
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001543/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001544 * \def POLARSSL_PBKDF2_C
1545 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001546 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001547 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001548 *
1549 * Module: library/pbkdf2.c
1550 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001551 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001552 *
1553 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001554 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001555#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001556
1557/**
Paul Bakkercff68422013-09-15 20:43:33 +02001558 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001559 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001560 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001561 *
1562 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001563 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001564 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001565 * library/x509_crl.c
1566 * library/x509_crt.c
1567 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001568 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001569 * Requires: POLARSSL_BASE64_C
1570 *
Paul Bakkercff68422013-09-15 20:43:33 +02001571 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001572 */
Paul Bakkercff68422013-09-15 20:43:33 +02001573#define POLARSSL_PEM_PARSE_C
1574
1575/**
1576 * \def POLARSSL_PEM_WRITE_C
1577 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001578 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001579 *
1580 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001581 * Caller: library/pkwrite.c
1582 * library/x509write_crt.c
1583 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001584 *
1585 * Requires: POLARSSL_BASE64_C
1586 *
1587 * This modules adds support for encoding / writing PEM files.
1588 */
1589#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001590
1591/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001592 * \def POLARSSL_PK_C
1593 *
1594 * Enable the generic public (asymetric) key layer.
1595 *
1596 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001597 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001598 * library/ssl_cli.c
1599 * library/ssl_srv.c
1600 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001601 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1602 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001603 * Uncomment to enable generic public key wrappers.
1604 */
1605#define POLARSSL_PK_C
1606
1607/**
Paul Bakker4606c732013-09-15 17:04:23 +02001608 * \def POLARSSL_PK_PARSE_C
1609 *
1610 * Enable the generic public (asymetric) key parser.
1611 *
1612 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001613 * Caller: library/x509_crt.c
1614 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001615 *
1616 * Requires: POLARSSL_PK_C
1617 *
1618 * Uncomment to enable generic public key parse functions.
1619 */
1620#define POLARSSL_PK_PARSE_C
1621
1622/**
1623 * \def POLARSSL_PK_WRITE_C
1624 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001625 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001626 *
1627 * Module: library/pkwrite.c
1628 * Caller: library/x509write.c
1629 *
1630 * Requires: POLARSSL_PK_C
1631 *
1632 * Uncomment to enable generic public key write functions.
1633 */
1634#define POLARSSL_PK_WRITE_C
1635
1636/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001637 * \def POLARSSL_PKCS5_C
1638 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001639 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001640 *
1641 * Module: library/pkcs5.c
1642 *
1643 * Requires: POLARSSL_MD_C
1644 *
1645 * This module adds support for the PKCS#5 functions.
1646 */
1647#define POLARSSL_PKCS5_C
1648
1649/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001650 * \def POLARSSL_PKCS11_C
1651 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001652 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001653 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001654 * Module: library/pkcs11.c
1655 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001656 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001657 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001658 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001659 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001660 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001661 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001662//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001663
1664/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001665 * \def POLARSSL_PKCS12_C
1666 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001667 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001668 * Adds algorithms for parsing PKCS#8 encrypted private keys
1669 *
1670 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001671 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001672 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001673 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1674 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001675 *
1676 * This module enables PKCS#12 functions.
1677 */
1678#define POLARSSL_PKCS12_C
1679
1680/**
Paul Bakker747a83a2014-02-01 22:50:07 +01001681 * \def POLARSSL_PLATFORM_C
1682 *
1683 * Enable the platform abstraction layer that allows you to re-assign
1684 * functions like malloc(), free(), printf(), fprintf()
1685 *
1686 * Module: library/platform.c
1687 * Caller: Most other .c files
1688 *
1689 * This module enables abstraction of common (libc) functions.
1690 */
1691#define POLARSSL_PLATFORM_C
1692
1693/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001694 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001695 *
1696 * Enable the RIPEMD-160 hash algorithm.
1697 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001698 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001699 * Caller: library/md.c
1700 *
1701 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001702#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001703
1704/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001705 * \def POLARSSL_RSA_C
1706 *
1707 * Enable the RSA public-key cryptosystem.
1708 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001709 * Module: library/rsa.c
1710 * Caller: library/ssl_cli.c
1711 * library/ssl_srv.c
1712 * library/ssl_tls.c
1713 * library/x509.c
1714 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001715 * This module is used by the following key exchanges:
1716 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001717 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001718 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001719 */
Paul Bakker40e46942009-01-03 21:51:57 +00001720#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001721
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001722/**
1723 * \def POLARSSL_SHA1_C
1724 *
1725 * Enable the SHA1 cryptographic hash algorithm.
1726 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001727 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001728 * Caller: library/md.c
1729 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001730 * library/ssl_srv.c
1731 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001732 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001733 *
1734 * This module is required for SSL/TLS and SHA1-signed certificates.
1735 */
Paul Bakker40e46942009-01-03 21:51:57 +00001736#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001737
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001738/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001739 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001740 *
1741 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001742 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001743 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001744 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001745 * Caller: library/entropy.c
1746 * library/md.c
1747 * library/ssl_cli.c
1748 * library/ssl_srv.c
1749 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001750 *
1751 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001752 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001753 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001754#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001755
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001756/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001757 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001758 *
1759 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001760 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001761 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001762 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001763 * Caller: library/entropy.c
1764 * library/md.c
1765 * library/ssl_cli.c
1766 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001767 *
1768 * This module adds support for SHA-384 and SHA-512.
1769 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001770#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001771
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001772/**
Paul Bakker0a597072012-09-25 21:55:46 +00001773 * \def POLARSSL_SSL_CACHE_C
1774 *
1775 * Enable simple SSL cache implementation.
1776 *
1777 * Module: library/ssl_cache.c
1778 * Caller:
1779 *
1780 * Requires: POLARSSL_SSL_CACHE_C
1781 */
1782#define POLARSSL_SSL_CACHE_C
1783
1784/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001785 * \def POLARSSL_SSL_CLI_C
1786 *
1787 * Enable the SSL/TLS client code.
1788 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001789 * Module: library/ssl_cli.c
1790 * Caller:
1791 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001792 * Requires: POLARSSL_SSL_TLS_C
1793 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001794 * This module is required for SSL/TLS client support.
1795 */
Paul Bakker40e46942009-01-03 21:51:57 +00001796#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001797
Paul Bakker9a736322012-11-14 12:39:52 +00001798/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001799 * \def POLARSSL_SSL_SRV_C
1800 *
1801 * Enable the SSL/TLS server code.
1802 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001803 * Module: library/ssl_srv.c
1804 * Caller:
1805 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001806 * Requires: POLARSSL_SSL_TLS_C
1807 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001808 * This module is required for SSL/TLS server support.
1809 */
Paul Bakker40e46942009-01-03 21:51:57 +00001810#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001811
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001812/**
1813 * \def POLARSSL_SSL_TLS_C
1814 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001815 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001816 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001817 * Module: library/ssl_tls.c
1818 * Caller: library/ssl_cli.c
1819 * library/ssl_srv.c
1820 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001821 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001822 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001823 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001824 * This module is required for SSL/TLS.
1825 */
Paul Bakker40e46942009-01-03 21:51:57 +00001826#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001827
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001828/**
Paul Bakker2466d932013-09-28 14:40:38 +02001829 * \def POLARSSL_THREADING_C
1830 *
1831 * Enable the threading abstraction layer.
1832 * By default PolarSSL assumes it is used in a non-threaded environment or that
1833 * contexts are not shared between threads. If you do intend to use contexts
1834 * between threads, you will need to enable this layer to prevent race
1835 * conditions.
1836 *
1837 * Module: library/threading.c
1838 *
1839 * This allows different threading implementations (self-implemented or
1840 * provided).
1841 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001842 * You will have to enable either POLARSSL_THREADING_ALT or
1843 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001844 *
1845 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001846 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001847//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001848
1849/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001850 * \def POLARSSL_TIMING_C
1851 *
1852 * Enable the portable timing interface.
1853 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001854 * Module: library/timing.c
1855 * Caller: library/havege.c
1856 *
1857 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001858 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001859#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001860
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001861/**
1862 * \def POLARSSL_VERSION_C
1863 *
1864 * Enable run-time version information.
1865 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001866 * Module: library/version.c
1867 *
1868 * This module provides run-time version information.
1869 */
1870#define POLARSSL_VERSION_C
1871
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001872/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001873 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001874 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001875 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001876 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001877 * Module: library/x509.c
1878 * Caller: library/x509_crl.c
1879 * library/x509_crt.c
1880 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001881 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001882 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001883 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001884 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001885 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001886 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001887#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001888
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001889/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001890 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001891 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001892 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001893 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001894 * Module: library/x509_crt.c
1895 * Caller: library/ssl_cli.c
1896 * library/ssl_srv.c
1897 * library/ssl_tls.c
1898 *
1899 * Requires: POLARSSL_X509_USE_C
1900 *
1901 * This module is required for X.509 certificate parsing.
1902 */
1903#define POLARSSL_X509_CRT_PARSE_C
1904
1905/**
1906 * \def POLARSSL_X509_CRL_PARSE_C
1907 *
1908 * Enable X.509 CRL parsing.
1909 *
1910 * Module: library/x509_crl.c
1911 * Caller: library/x509_crt.c
1912 *
1913 * Requires: POLARSSL_X509_USE_C
1914 *
1915 * This module is required for X.509 CRL parsing.
1916 */
1917#define POLARSSL_X509_CRL_PARSE_C
1918
1919/**
1920 * \def POLARSSL_X509_CSR_PARSE_C
1921 *
1922 * Enable X.509 Certificate Signing Request (CSR) parsing.
1923 *
1924 * Module: library/x509_csr.c
1925 * Caller: library/x509_crt_write.c
1926 *
1927 * Requires: POLARSSL_X509_USE_C
1928 *
1929 * This module is used for reading X.509 certificate request.
1930 */
1931#define POLARSSL_X509_CSR_PARSE_C
1932
1933/**
1934 * \def POLARSSL_X509_CREATE_C
1935 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001936 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001937 *
1938 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001939 *
Paul Bakker4606c732013-09-15 17:04:23 +02001940 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001941 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001942 * This module is the basis for creating X.509 certificates and CSRs.
1943 */
1944#define POLARSSL_X509_CREATE_C
1945
1946/**
1947 * \def POLARSSL_X509_CRT_WRITE_C
1948 *
1949 * Enable creating X.509 certificates.
1950 *
1951 * Module: library/x509_crt_write.c
1952 *
1953 * Requires: POLARSSL_CREATE_C
1954 *
1955 * This module is required for X.509 certificate creation.
1956 */
1957#define POLARSSL_X509_CRT_WRITE_C
1958
1959/**
1960 * \def POLARSSL_X509_CSR_WRITE_C
1961 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001962 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001963 *
1964 * Module: library/x509_csr_write.c
1965 *
1966 * Requires: POLARSSL_CREATE_C
1967 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001968 * This module is required for X.509 certificate request writing.
1969 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001970#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001971
1972/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001973 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001974 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001975 * Enable the XTEA block cipher.
1976 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001977 * Module: library/xtea.c
1978 * Caller:
1979 */
1980#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001981
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001982/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001983
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001984/**
1985 * \name SECTION: Module configuration options
1986 *
1987 * This section allows for the setting of module specific sizes and
1988 * configuration options. The default values are already present in the
1989 * relevant header files and should suffice for the regular use cases.
1990 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1991 * only if you have a good reason and know the consequences.
1992 *
1993 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1994 * header file take precedence.
1995 *
1996 * Please check the respective header file for documentation on these
1997 * parameters (to prevent duplicate documentation).
1998 *
1999 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
2000 * \{
2001 */
2002//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
2003
2004#if defined(POLARSSL_CONFIG_OPTIONS)
2005
2006// MPI / BIGNUM options
2007//
2008#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2009#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
2010
2011// CTR_DRBG options
2012//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002013#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 +02002014#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2015#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2016#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2017#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2018
Manuel Pégourié-Gonnard0520b602014-01-30 19:43:46 +01002019// HMAC_DRBG options
2020//
2021#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2022#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2023#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2024#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2025
Paul Bakkere1b665e2013-12-11 16:02:58 +01002026// ECP options
2027//
2028#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2029#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
Manuel Pégourié-Gonnard9e4191c2013-12-30 18:41:16 +01002030#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Paul Bakkere1b665e2013-12-11 16:02:58 +01002031
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002032// Entropy options
2033//
2034#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2035#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
2036
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002037// Memory buffer allocator options
Paul Bakker6e339b52013-07-03 13:37:05 +02002038#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
Paul Bakker6e339b52013-07-03 13:37:05 +02002039
Paul Bakker747a83a2014-02-01 22:50:07 +01002040// Platform options
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002041#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2042#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
Paul Bakker747a83a2014-02-01 22:50:07 +01002043#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2044#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002045
2046// SSL Cache options
2047//
2048#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2049#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
2050
2051// SSL options
2052//
2053#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02002054#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02002055
2056#endif /* POLARSSL_CONFIG_OPTIONS */
2057
2058/* \} name */
2059
Paul Bakker7ad00f92013-04-18 23:05:25 +02002060/*
2061 * Sanity checks on defines and dependencies
2062 */
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002063#if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
2064#error "POLARSSL_AESNI_C defined, but not all prerequisites"
2065#endif
2066
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002067#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
2068#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002069#endif
2070
2071#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
2072#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
2073#endif
2074
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01002075#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
2076#error "POLARSSL_DHM_C defined, but not all prerequisites"
2077#endif
2078
Paul Bakker7ad00f92013-04-18 23:05:25 +02002079#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
2080#error "POLARSSL_ECDH_C defined, but not all prerequisites"
2081#endif
2082
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02002083#if defined(POLARSSL_ECDSA_C) && \
2084 ( !defined(POLARSSL_ECP_C) || \
2085 !defined(POLARSSL_ASN1_PARSE_C) || \
2086 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002087#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
2088#endif
2089
Manuel Pégourié-Gonnard7845fc02014-01-27 14:24:03 +01002090#if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C)
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +01002091#error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
2092#endif
2093
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01002094#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
2095 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
2096 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
2097 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
2098 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
2099 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
2100 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
2101 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
Manuel Pégourié-Gonnardffd94cc2014-01-28 20:11:07 +01002102 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \
2103 !defined(POLARSSL_ECP_DP_M255_ENABLED) && \
2104 !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \
2105 !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \
2106 !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002107#error "POLARSSL_ECP_C defined, but not all prerequisites"
2108#endif
2109
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002110#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
2111 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02002112#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
2113#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002114#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
2115 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
2116#error "CTR_DRBG_ENTROPY_LEN value too high"
2117#endif
2118#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
2119 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
2120#error "CTR_DRBG_ENTROPY_LEN value too high"
2121#endif
Paul Bakker2ceda572014-02-06 15:55:25 +01002122#if defined(POLARSSL_ENTROPY_C) && \
2123 defined(POLARSSL_ENTROPY_FORCE_SHA256) && !defined(POLARSSL_SHA256_C)
2124#error "POLARSSL_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
2125#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02002126
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02002127#if defined(POLARSSL_GCM_C) && ( \
2128 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002129#error "POLARSSL_GCM_C defined, but not all prerequisites"
2130#endif
2131
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002132#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
2133#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
2134#endif
2135
Manuel Pégourié-Gonnard490bdf32014-01-27 14:03:10 +01002136#if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C)
2137#error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites"
2138#endif
2139
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01002140#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
2141 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2142#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
2143#endif
2144
2145#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
2146 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2147#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
2148#endif
2149
Paul Bakkere07f41d2013-04-19 09:08:57 +02002150#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
2151#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
2152#endif
2153
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02002154#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
2155 !defined(POLARSSL_ECDH_C)
2156#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
2157#endif
2158
Paul Bakkere07f41d2013-04-19 09:08:57 +02002159#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2160 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002161 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002162#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2163#endif
2164
2165#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2166 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002167 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002168#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2169#endif
2170
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002171#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2172 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002173 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002174#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2175#endif
2176
Paul Bakkere07f41d2013-04-19 09:08:57 +02002177#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002178 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002179 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002180#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2181#endif
2182
2183#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002184 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002185 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002186#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2187#endif
2188
Paul Bakkerdefc0ca2014-02-04 17:30:24 +01002189#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \
2190 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
Paul Bakker6e339b52013-07-03 13:37:05 +02002191#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2192#endif
2193
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002194#if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2195#error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2196#endif
2197
Paul Bakker7ad00f92013-04-18 23:05:25 +02002198#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2199#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2200#endif
2201
Paul Bakkercff68422013-09-15 20:43:33 +02002202#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2203#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2204#endif
2205
2206#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2207#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002208#endif
2209
Paul Bakker4606c732013-09-15 17:04:23 +02002210#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2211#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2212#endif
2213
2214#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2215#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2216#endif
2217
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002218#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002219#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2220#endif
2221
2222#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2223 !defined(POLARSSL_OID_C) )
2224#error "POLARSSL_RSA_C defined, but not all prerequisites"
2225#endif
2226
Manuel Pégourié-Gonnardce7c6fd2014-01-24 14:37:29 +01002227#if defined(POLARSSL_RSASSA_PSS_CERTIFICATES) && \
2228 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_PKCS1_V21) )
2229#error "POLARSSL_RSASSA_PSS_CERTIFICATES defined, but not all prerequisites"
2230#endif
2231
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002232#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2233 !defined(POLARSSL_SHA1_C) )
2234#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2235#endif
2236
2237#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2238 !defined(POLARSSL_SHA1_C) )
2239#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2240#endif
2241
2242#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2243 !defined(POLARSSL_SHA1_C) )
2244#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2245#endif
2246
2247#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2248 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2249#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2250#endif
2251
Paul Bakker7ad00f92013-04-18 23:05:25 +02002252#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2253#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2254#endif
2255
Paul Bakker577e0062013-08-28 11:57:20 +02002256#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002257 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002258#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2259#endif
2260
2261#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2262#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2263#endif
2264
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002265#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2266 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2267 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2268#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2269#endif
2270
2271#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2272 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2273#error "Illegal protocol selection"
2274#endif
2275
2276#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2277 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2278#error "Illegal protocol selection"
2279#endif
2280
2281#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2282 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2283 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2284#error "Illegal protocol selection"
2285#endif
2286
Paul Bakker59da0a42013-08-19 13:27:17 +02002287#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002288 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2289 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002290#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2291#endif
2292
Paul Bakker2466d932013-09-28 14:40:38 +02002293#if defined(POLARSSL_THREADING_PTHREAD)
2294#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2295#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2296#endif
2297#define POLARSSL_THREADING_IMPL
2298#endif
2299
2300#if defined(POLARSSL_THREADING_ALT)
2301#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2302#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2303#endif
2304#define POLARSSL_THREADING_IMPL
2305#endif
2306
2307#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2308#error "POLARSSL_THREADING_C defined, single threading implementation required"
2309#endif
2310#undef POLARSSL_THREADING_IMPL
2311
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002312#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002313 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002314 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002315#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002316#endif
2317
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002318#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2319 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2320 !defined(POLARSSL_PK_WRITE_C) )
2321#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2322#endif
2323
2324#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2325#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2326#endif
2327
2328#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2329#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2330#endif
2331
2332#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2333#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2334#endif
2335
2336#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2337#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2338#endif
2339
2340#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2341#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002342#endif
2343
Paul Bakker5121ce52009-01-03 21:22:43 +00002344#endif /* config.h */