blob: f879016c5dd89a8c2ec6f25dafa20eda29ae87a9 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakker37ca75d2011-01-06 12:28:03 +00004 * \brief Configuration options (set of defines)
5 *
Paul Bakker9bcf16c2013-06-24 19:31:17 +02006 * Copyright (C) 2006-2013, Brainspark B.V.
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
8 * This file is part of PolarSSL (http://www.polarssl.org)
Paul Bakker84f12b72010-07-18 10:13:04 +00009 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakkerb96f1542010-07-18 20:36:00 +000010 *
Paul Bakker77b385e2009-07-28 17:23:11 +000011 * All rights reserved.
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000012 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000013 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
Paul Bakker5121ce52009-01-03 21:22:43 +000027 * This set of compile-time options may be used to enable
28 * or disable features selectively, and reduce the global
29 * memory footprint.
30 */
Paul Bakker40e46942009-01-03 21:51:57 +000031#ifndef POLARSSL_CONFIG_H
32#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000033
Paul Bakkercce9d772011-11-18 14:26:47 +000034#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
Paul Bakker5121ce52009-01-03 21:22:43 +000035#define _CRT_SECURE_NO_DEPRECATE 1
36#endif
37
Paul Bakkerf3b86c12011-01-27 15:24:17 +000038/**
Paul Bakker0a62cd12011-01-21 11:00:08 +000039 * \name SECTION: System support
40 *
41 * This section sets system specific settings.
42 * \{
43 */
44
Paul Bakkerf3b86c12011-01-27 15:24:17 +000045/**
46 * \def POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000047 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000048 * The system uses 8-bit wide native integers.
49 *
50 * Uncomment if native integers are 8-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000051 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020052//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000053
Paul Bakkerf3b86c12011-01-27 15:24:17 +000054/**
55 * \def POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000056 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000057 * The system uses 16-bit wide native integers.
58 *
59 * Uncomment if native integers are 16-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000060 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020061//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000062
Paul Bakkerf3b86c12011-01-27 15:24:17 +000063/**
Paul Bakker62261d62012-10-02 12:19:31 +000064 * \def POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000065 *
Paul Bakker62261d62012-10-02 12:19:31 +000066 * The compiler supports the 'long long' type.
67 * (Only used on 32-bit platforms)
Paul Bakker5121ce52009-01-03 21:22:43 +000068 */
Paul Bakker62261d62012-10-02 12:19:31 +000069#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000070
Paul Bakkerf3b86c12011-01-27 15:24:17 +000071/**
72 * \def POLARSSL_HAVE_ASM
73 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020074 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000075 *
76 * Requires support for asm() in compiler.
77 *
78 * Used in:
79 * library/timing.c
80 * library/padlock.c
81 * include/polarssl/bn_mul.h
82 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020083 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000084 */
Paul Bakker40e46942009-01-03 21:51:57 +000085#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000086
Paul Bakkerf3b86c12011-01-27 15:24:17 +000087/**
88 * \def POLARSSL_HAVE_SSE2
89 *
Paul Bakkere23c3152012-10-01 14:42:47 +000090 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000091 *
Paul Bakker5121ce52009-01-03 21:22:43 +000092 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000093 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020094//#define POLARSSL_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020095
96/**
97 * \def POLARSSL_HAVE_TIME
98 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020099 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200100 *
101 * Comment if your system does not support time functions
102 */
103#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100104
105/**
106 * \def POLARSSL_HAVE_IPV6
107 *
108 * System supports the basic socket interface for IPv6 (RFC 3493),
Manuel Pégourié-Gonnard767f02c2013-12-13 16:23:39 +0100109 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100110 *
Manuel Pégourié-Gonnard13211352013-12-17 17:38:55 +0100111 * Note: on Windows/MingW, XP or higher is required.
112 *
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100113 * Comment if your system does not support the IPv6 socket interface
114 */
115#define POLARSSL_HAVE_IPV6
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200116/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000117
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000118/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000119 * \name SECTION: PolarSSL feature support
120 *
121 * This section sets support for features that are or are not needed
122 * within the modules that are enabled.
123 * \{
124 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000125
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000126/**
Paul Bakker90995b52013-06-24 19:20:35 +0200127 * \def POLARSSL_XXX_ALT
128 *
129 * Uncomment a macro to let PolarSSL use your alternate core implementation of
130 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
131 * implementations). Keep in mind that the function prototypes should remain
132 * the same.
133 *
134 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
135 * provide the "struct aes_context" definition and omit the base function
136 * declarations and implementations. "aes_alt.h" will be included from
137 * "aes.h" to include the new function definitions.
138 *
139 * Uncomment a macro to enable alternate implementation for core algorithm
140 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200141 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200142//#define POLARSSL_AES_ALT
143//#define POLARSSL_ARC4_ALT
144//#define POLARSSL_BLOWFISH_ALT
145//#define POLARSSL_CAMELLIA_ALT
146//#define POLARSSL_DES_ALT
147//#define POLARSSL_XTEA_ALT
148//#define POLARSSL_MD2_ALT
149//#define POLARSSL_MD4_ALT
150//#define POLARSSL_MD5_ALT
151//#define POLARSSL_SHA1_ALT
152//#define POLARSSL_SHA256_ALT
153//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200154
155/**
Paul Bakker15566e42011-04-24 21:19:15 +0000156 * \def POLARSSL_AES_ROM_TABLES
157 *
158 * Store the AES tables in ROM.
159 *
160 * Uncomment this macro to store the AES tables in ROM.
161 *
Paul Bakker15566e42011-04-24 21:19:15 +0000162 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200163//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000164
165/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200166 * \def POLARSSL_CIPHER_MODE_CBC
167 *
168 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
169 */
170#define POLARSSL_CIPHER_MODE_CBC
171
172/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000173 * \def POLARSSL_CIPHER_MODE_CFB
174 *
175 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
176 */
177#define POLARSSL_CIPHER_MODE_CFB
178
179/**
180 * \def POLARSSL_CIPHER_MODE_CTR
181 *
182 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
183 */
184#define POLARSSL_CIPHER_MODE_CTR
185
186/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000187 * \def POLARSSL_CIPHER_NULL_CIPHER
188 *
189 * Enable NULL cipher.
190 * Warning: Only do so when you know what you are doing. This allows for
191 * encryption or channels without any security!
192 *
193 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
194 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100195 * TLS_ECDH_ECDSA_WITH_NULL_SHA
196 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200197 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100198 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200199 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200200 * TLS_ECDHE_PSK_WITH_NULL_SHA256
201 * TLS_ECDHE_PSK_WITH_NULL_SHA
202 * TLS_DHE_PSK_WITH_NULL_SHA384
203 * TLS_DHE_PSK_WITH_NULL_SHA256
204 * TLS_DHE_PSK_WITH_NULL_SHA
205 * TLS_RSA_WITH_NULL_SHA256
206 * TLS_RSA_WITH_NULL_SHA
207 * TLS_RSA_WITH_NULL_MD5
208 * TLS_RSA_PSK_WITH_NULL_SHA384
209 * TLS_RSA_PSK_WITH_NULL_SHA256
210 * TLS_RSA_PSK_WITH_NULL_SHA
211 * TLS_PSK_WITH_NULL_SHA384
212 * TLS_PSK_WITH_NULL_SHA256
213 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000214 *
215 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200216#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000217 */
218
219/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200220 * \def POLARSSL_CIPHER_PADDING_XXX
221 *
222 * Uncomment or comment macros to add support for specific padding modes
223 * in the cipher layer with cipher modes that support padding (e.g. CBC)
224 *
225 * If you disable all padding modes, only full blocks can be used with CBC.
226 *
227 * Enable padding modes in the cipher layer.
228 */
229#define POLARSSL_CIPHER_PADDING_PKCS7
230#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
231#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
232#define POLARSSL_CIPHER_PADDING_ZEROS
233
234/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000235 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
236 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200237 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000238 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000239 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000240 *
241 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000242 * TLS_RSA_WITH_DES_CBC_SHA
243 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000244 *
245 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200246#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000247 */
248
249/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200250 * \def POLARSSL_ECP_XXXX_ENABLED
251 *
252 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200253 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200254 *
255 * Comment macros to disable the curve and functions for it
256 */
257#define POLARSSL_ECP_DP_SECP192R1_ENABLED
258#define POLARSSL_ECP_DP_SECP224R1_ENABLED
259#define POLARSSL_ECP_DP_SECP256R1_ENABLED
260#define POLARSSL_ECP_DP_SECP384R1_ENABLED
261#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100262//#define POLARSSL_ECP_DP_SECP192K1_ENABLED // Not implemented yet!
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100263#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100264#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200265#define POLARSSL_ECP_DP_BP256R1_ENABLED
266#define POLARSSL_ECP_DP_BP384R1_ENABLED
267#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100268//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
269#define POLARSSL_ECP_DP_M255_ENABLED
270//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
271//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200272
273/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200274 * \def POLARSSL_ECP_NIST_OPTIM
275 *
276 * Enable specific 'modulo p' routines for each NIST prime.
277 * Depending on the prime and architecture, makes operations 4 to 8 times
278 * faster on the corresponding curve.
279 *
280 * Comment this macro to disable NIST curves optimisation.
281 */
282#define POLARSSL_ECP_NIST_OPTIM
283
284/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200285 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
286 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200287 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200288 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200289 * This enables the following ciphersuites (if other requisites are
290 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200291 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200292 * TLS_PSK_WITH_AES_256_CBC_SHA384
293 * TLS_PSK_WITH_AES_256_CBC_SHA
294 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
295 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
296 * TLS_PSK_WITH_AES_128_GCM_SHA256
297 * TLS_PSK_WITH_AES_128_CBC_SHA256
298 * TLS_PSK_WITH_AES_128_CBC_SHA
299 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
300 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
301 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
302 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200303 */
304#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
305
306/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200307 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
308 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200309 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200310 *
311 * Requires: POLARSSL_DHM_C
312 *
313 * This enables the following ciphersuites (if other requisites are
314 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200315 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200316 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
317 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
318 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
319 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
320 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
321 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
322 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
323 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
324 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
325 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
326 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200327 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200328#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200329
330/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200331 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
332 *
333 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
334 *
335 * Requires: POLARSSL_ECDH_C
336 *
337 * This enables the following ciphersuites (if other requisites are
338 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200339 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200340 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200341 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200342 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
343 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
344 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
345 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
346 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200347 */
348#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
349
350/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200351 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
352 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200353 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200354 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200355 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200356 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200357 *
358 * This enables the following ciphersuites (if other requisites are
359 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200360 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200361 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
362 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
363 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
364 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
365 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
366 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
367 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
368 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
369 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
370 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
371 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200372 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200373#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200374
375/**
376 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
377 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200378 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200379 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200380 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200381 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200382 *
383 * This enables the following ciphersuites (if other requisites are
384 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200385 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200386 * TLS_RSA_WITH_AES_256_CBC_SHA256
387 * TLS_RSA_WITH_AES_256_CBC_SHA
388 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200389 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200390 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
391 * TLS_RSA_WITH_AES_128_GCM_SHA256
392 * TLS_RSA_WITH_AES_128_CBC_SHA256
393 * TLS_RSA_WITH_AES_128_CBC_SHA
394 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
395 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
396 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200397 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200398 * TLS_RSA_WITH_RC4_128_SHA
399 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200400 */
401#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
402
403/**
404 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
405 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200406 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200407 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200408 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200409 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200410 *
411 * This enables the following ciphersuites (if other requisites are
412 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200413 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200414 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200415 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
416 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200417 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200418 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
419 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
420 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
421 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
422 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
423 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
424 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200425 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
426 */
427#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
428
429/**
430 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
431 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200432 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200433 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200434 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200435 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200436 *
437 * This enables the following ciphersuites (if other requisites are
438 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200439 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200440 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
441 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
442 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200443 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200444 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
445 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
446 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
447 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
448 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
449 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
450 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200451 */
452#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
453
454/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200455 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
456 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200457 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200458 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200459 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200460 *
461 * This enables the following ciphersuites (if other requisites are
462 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200463 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
464 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
465 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
466 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
467 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
468 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
469 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
470 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
471 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
472 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
473 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
474 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200475 */
476#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
477
478/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100479 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
480 *
481 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
482 *
483 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
484 *
485 * This enables the following ciphersuites (if other requisites are
486 * enabled as well):
487 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
488 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
489 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
490 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
491 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
492 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
493 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
494 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
495 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
496 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
497 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
498 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
499 */
500#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
501
502/**
503 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
504 *
505 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
506 *
507 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
508 *
509 * This enables the following ciphersuites (if other requisites are
510 * enabled as well):
511 * TLS_ECDH_RSA_WITH_RC4_128_SHA
512 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
513 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
514 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
515 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
516 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
517 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
518 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
519 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
520 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
521 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
522 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
523 */
524#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
525
526/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200527 * \def POLARSSL_ERROR_STRERROR_BC
528 *
529 * Make available the backward compatible error_strerror() next to the
530 * current polarssl_strerror().
531 *
532 * Disable if you run into name conflicts and want to really remove the
533 * error_strerror()
534 */
535#define POLARSSL_ERROR_STRERROR_BC
536
537/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100538 * \def POLARSSL_ERROR_STRERROR_DUMMY
539 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200540 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100541 * third party libraries easier.
542 *
543 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200544 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100545 */
546#define POLARSSL_ERROR_STRERROR_DUMMY
547
548/**
Paul Bakker15566e42011-04-24 21:19:15 +0000549 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000550 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200551 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200552 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200553 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000554 */
Paul Bakker15566e42011-04-24 21:19:15 +0000555#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000556
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000557/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000558 * \def POLARSSL_FS_IO
559 *
560 * Enable functions that use the filesystem.
561 */
562#define POLARSSL_FS_IO
563
564/**
Paul Bakker43655f42011-12-15 20:11:16 +0000565 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
566 *
567 * Do not add default entropy sources. These are the platform specific,
568 * hardclock and HAVEGE based poll functions.
569 *
570 * This is useful to have more control over the added entropy sources in an
571 * application.
572 *
573 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000574 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200575//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000576
577/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000578 * \def POLARSSL_NO_PLATFORM_ENTROPY
579 *
580 * Do not use built-in platform entropy functions.
581 * This is useful if your platform does not support
582 * standards like the /dev/urandom or Windows CryptoAPI.
583 *
584 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000585 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200586//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000587
588/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200589 * \def POLARSSL_MEMORY_DEBUG
590 *
591 * Enable debugging of buffer allocator memory issues. Automatically prints
592 * (to stderr) all (fatal) messages on memory allocation issues. Enables
593 * function for 'debug output' of allocated memory.
594 *
595 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
596 * fprintf()
597 *
598 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200599 */
600//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200601
602/**
603 * \def POLARSSL_MEMORY_BACKTRACE
604 *
605 * Include backtrace information with each allocated block.
606 *
607 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
608 * GLIBC-compatible backtrace() an backtrace_symbols() support
609 *
610 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200611 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200612//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200613
614/**
Paul Bakker48377d92013-08-30 12:06:24 +0200615 * \def POLARSSL_PKCS1_V15
616 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200617 * Enable support for PKCS#1 v1.5 encoding.
618 *
Paul Bakker48377d92013-08-30 12:06:24 +0200619 * Requires: POLARSSL_RSA_C
620 *
Paul Bakker48377d92013-08-30 12:06:24 +0200621 * This enables support for PKCS#1 v1.5 operations.
622 */
623#define POLARSSL_PKCS1_V15
624
625/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000626 * \def POLARSSL_PKCS1_V21
627 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200628 * Enable support for PKCS#1 v2.1 encoding.
629 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000630 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
631 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000632 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
633 */
634#define POLARSSL_PKCS1_V21
635
636/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000637 * \def POLARSSL_RSA_NO_CRT
638 *
639 * Do not use the Chinese Remainder Theorem for the RSA private operation.
640 *
641 * Uncomment this macro to disable the use of CRT in RSA.
642 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000643 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200644//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000645
646/**
647 * \def POLARSSL_SELF_TEST
648 *
649 * Enable the checkup functions (*_self_test).
650 */
651#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000652
653/**
Paul Bakker40865c82013-01-31 17:13:13 +0100654 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
655 *
656 * Enable sending of alert messages in case of encountered errors as per RFC.
657 * If you choose not to send the alert messages, PolarSSL can still communicate
658 * with other servers, only debugging of failures is harder.
659 *
660 * The advantage of not sending alert messages, is that no information is given
661 * about reasons for failures thus preventing adversaries of gaining intel.
662 *
663 * Enable sending of all alert messages
664 */
665#define POLARSSL_SSL_ALERT_MESSAGES
666
667/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100668 * \def POLARSSL_SSL_DEBUG_ALL
669 *
670 * Enable the debug messages in SSL module for all issues.
671 * Debug messages have been disabled in some places to prevent timing
672 * attacks due to (unbalanced) debugging function calls.
673 *
674 * If you need all error reporting you should enable this during debugging,
675 * but remove this for production servers that should log as well.
676 *
677 * Uncomment this macro to report all debug messages on errors introducing
678 * a timing side-channel.
679 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100680 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200681//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100682
683/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000684 * \def POLARSSL_SSL_HW_RECORD_ACCEL
685 *
686 * Enable hooking functions in SSL module for hardware acceleration of
687 * individual records.
688 *
689 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000690 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200691//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000692
693/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100694 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
695 *
696 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200697 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100698 *
699 * Comment this macro to disable support for SSLv2 Client Hello messages.
700 */
701#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
702
703/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100704 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
705 *
706 * Pick the ciphersuite according to the client's preferences rather than ours
707 * in the SSL Server module (POLARSSL_SSL_SRV_C).
708 *
709 * Uncomment this macro to respect client's ciphersuite order
710 */
711//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
712
713/**
Paul Bakker05decb22013-08-15 13:33:48 +0200714 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
715 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200716 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200717 *
718 * Comment this macro to disable support for the max_fragment_length extension
719 */
720#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
721
722/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200723 * \def POLARSSL_SSL_PROTO_SSL3
724 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200725 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200726 *
727 * Requires: POLARSSL_MD5_C
728 * POLARSSL_SHA1_C
729 *
730 * Comment this macro to disable support for SSL 3.0
731 */
732#define POLARSSL_SSL_PROTO_SSL3
733
734/**
735 * \def POLARSSL_SSL_PROTO_TLS1
736 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200737 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200738 *
739 * Requires: POLARSSL_MD5_C
740 * POLARSSL_SHA1_C
741 *
742 * Comment this macro to disable support for TLS 1.0
743 */
744#define POLARSSL_SSL_PROTO_TLS1
745
746/**
747 * \def POLARSSL_SSL_PROTO_TLS1_1
748 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200749 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200750 *
751 * Requires: POLARSSL_MD5_C
752 * POLARSSL_SHA1_C
753 *
754 * Comment this macro to disable support for TLS 1.1
755 */
756#define POLARSSL_SSL_PROTO_TLS1_1
757
758/**
759 * \def POLARSSL_SSL_PROTO_TLS1_2
760 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200761 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200762 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100763 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200764 * (Depends on ciphersuites)
765 *
766 * Comment this macro to disable support for TLS 1.2
767 */
768#define POLARSSL_SSL_PROTO_TLS1_2
769
770/**
Paul Bakkera503a632013-08-14 13:48:06 +0200771 * \def POLARSSL_SSL_SESSION_TICKETS
772 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200773 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200774 *
775 * Requires: POLARSSL_AES_C
776 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200777 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200778 *
779 * Comment this macro to disable support for SSL session tickets
780 */
781#define POLARSSL_SSL_SESSION_TICKETS
782
783/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200784 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
785 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200786 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200787 *
788 * Comment this macro to disable support for server name indication in SSL
789 */
790#define POLARSSL_SSL_SERVER_NAME_INDICATION
791
792/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200793 * \def POLARSSL_SSL_TRUNCATED_HMAC
794 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200795 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200796 *
797 * Comment this macro to disable support for truncated HMAC in SSL
798 */
799#define POLARSSL_SSL_TRUNCATED_HMAC
800
801/**
Paul Bakker2466d932013-09-28 14:40:38 +0200802 * \def POLARSSL_THREADING_ALT
803 *
804 * Provide your own alternate threading implementation.
805 *
806 * Requires: POLARSSL_THREADING_C
807 *
808 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200809 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200810//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200811
812/**
Paul Bakker2466d932013-09-28 14:40:38 +0200813 * \def POLARSSL_THREADING_PTHREAD
814 *
815 * Enable the pthread wrapper layer for the threading layer.
816 *
817 * Requires: POLARSSL_THREADING_C
818 *
819 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200820 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200821//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200822
823/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200824 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
825 *
826 * If set, the X509 parser will not break-off when parsing an X509 certificate
827 * and encountering an extension in a v1 or v2 certificate.
828 *
829 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200830 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200831//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200832
833/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000834 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
835 *
836 * If set, the X509 parser will not break-off when parsing an X509 certificate
837 * and encountering an unknown critical extension.
838 *
839 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000840 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200841//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000842
843/**
844 * \def POLARSSL_ZLIB_SUPPORT
845 *
846 * If set, the SSL/TLS module uses ZLIB to support compression and
847 * decompression of packet data.
848 *
849 * Used in: library/ssl_tls.c
850 * library/ssl_cli.c
851 * library/ssl_srv.c
852 *
853 * This feature requires zlib library and headers to be present.
854 *
855 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000856 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200857//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200858/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000859
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000860/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000861 * \name SECTION: PolarSSL modules
862 *
863 * This section enables or disables entire modules in PolarSSL
864 * \{
865 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000866
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000867/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +0100868 * \def POLARSSL_AESNI_C
869 *
870 * Enable AES-NI support on x86-64.
871 *
872 * Module: library/aesni.c
873 * Caller: library/aes.c
874 *
875 * Requires: POLARSSL_HAVE_ASM
876 *
877 * This modules adds support for the AES-NI instructions on x86-64
878 */
879#define POLARSSL_AESNI_C
880
881/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000882 * \def POLARSSL_AES_C
883 *
884 * Enable the AES block cipher.
885 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000886 * Module: library/aes.c
887 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000888 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000889 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000890 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000891 * This module enables the following ciphersuites (if other requisites are
892 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100893 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
894 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
895 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
896 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
897 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
898 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
899 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
900 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
901 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
902 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
903 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
904 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200905 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
906 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
907 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
908 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
909 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000910 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200911 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100912 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200913 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
914 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
915 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
916 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
917 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
918 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
919 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
920 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
921 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
922 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
923 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
924 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
925 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
926 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
927 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
928 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
929 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
930 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
931 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
932 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
933 * TLS_RSA_WITH_AES_256_GCM_SHA384
934 * TLS_RSA_WITH_AES_256_CBC_SHA256
935 * TLS_RSA_WITH_AES_256_CBC_SHA
936 * TLS_RSA_WITH_AES_128_GCM_SHA256
937 * TLS_RSA_WITH_AES_128_CBC_SHA256
938 * TLS_RSA_WITH_AES_128_CBC_SHA
939 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
940 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
941 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
942 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
943 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
944 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
945 * TLS_PSK_WITH_AES_256_GCM_SHA384
946 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200947 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200948 * TLS_PSK_WITH_AES_128_GCM_SHA256
949 * TLS_PSK_WITH_AES_128_CBC_SHA256
950 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100951 *
Paul Bakkercff68422013-09-15 20:43:33 +0200952 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000953 */
Paul Bakker40e46942009-01-03 21:51:57 +0000954#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000955
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000956/**
957 * \def POLARSSL_ARC4_C
958 *
959 * Enable the ARCFOUR stream cipher.
960 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000961 * Module: library/arc4.c
962 * Caller: library/ssl_tls.c
963 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100964 * This module enables the following ciphersuites (if other requisites are
965 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100966 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
967 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200968 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100969 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200970 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
971 * TLS_DHE_PSK_WITH_RC4_128_SHA
972 * TLS_RSA_WITH_RC4_128_SHA
973 * TLS_RSA_WITH_RC4_128_MD5
974 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200975 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000976 */
Paul Bakker40e46942009-01-03 21:51:57 +0000977#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000978
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000979/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000980 * \def POLARSSL_ASN1_PARSE_C
981 *
982 * Enable the generic ASN1 parser.
983 *
984 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200985 * Caller: library/x509.c
986 * library/dhm.c
987 * library/pkcs12.c
988 * library/pkcs5.c
989 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000990 */
991#define POLARSSL_ASN1_PARSE_C
992
993/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000994 * \def POLARSSL_ASN1_WRITE_C
995 *
996 * Enable the generic ASN1 writer.
997 *
998 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200999 * Caller: library/ecdsa.c
1000 * library/pkwrite.c
1001 * library/x509_create.c
1002 * library/x509write_crt.c
1003 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001004 */
1005#define POLARSSL_ASN1_WRITE_C
1006
1007/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001008 * \def POLARSSL_BASE64_C
1009 *
1010 * Enable the Base64 module.
1011 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001012 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001013 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001014 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001015 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001016 */
Paul Bakker40e46942009-01-03 21:51:57 +00001017#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001018
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001019/**
1020 * \def POLARSSL_BIGNUM_C
1021 *
Paul Bakker9a736322012-11-14 12:39:52 +00001022 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001023 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001024 * Module: library/bignum.c
1025 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001026 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001027 * library/rsa.c
1028 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001029 *
1030 * This module is required for RSA and DHM support.
1031 */
Paul Bakker40e46942009-01-03 21:51:57 +00001032#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001033
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001034/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001035 * \def POLARSSL_BLOWFISH_C
1036 *
1037 * Enable the Blowfish block cipher.
1038 *
1039 * Module: library/blowfish.c
1040 */
1041#define POLARSSL_BLOWFISH_C
1042
1043/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001044 * \def POLARSSL_CAMELLIA_C
1045 *
1046 * Enable the Camellia block cipher.
1047 *
Paul Bakker38119b12009-01-10 23:31:23 +00001048 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001049 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001050 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001051 * This module enables the following ciphersuites (if other requisites are
1052 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001053 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1054 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1055 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1056 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1057 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1058 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1059 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1060 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001061 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1062 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1063 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1064 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1065 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001066 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001067 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1068 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1069 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1070 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1071 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1072 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1073 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1074 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1075 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1076 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1077 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1078 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1079 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1080 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1081 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1082 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1083 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1084 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1085 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1086 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1087 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1088 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1089 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1090 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1091 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1092 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1093 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1094 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001095 */
1096#define POLARSSL_CAMELLIA_C
1097
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001098/**
1099 * \def POLARSSL_CERTS_C
1100 *
1101 * Enable the test certificates.
1102 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001103 * Module: library/certs.c
1104 * Caller:
1105 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001106 * Requires: POLARSSL_PEM_PARSE_C
1107 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001108 * This module is used for testing (ssl_client/server).
1109 */
Paul Bakker40e46942009-01-03 21:51:57 +00001110#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001111
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001112/**
1113 * \def POLARSSL_CIPHER_C
1114 *
1115 * Enable the generic cipher layer.
1116 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001117 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001118 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001119 *
1120 * Uncomment to enable generic cipher wrappers.
1121 */
1122#define POLARSSL_CIPHER_C
1123
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001124/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001125 * \def POLARSSL_CTR_DRBG_C
1126 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001127 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001128 *
1129 * Module: library/ctr_drbg.c
1130 * Caller:
1131 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001132 * Requires: POLARSSL_AES_C
1133 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001134 * This module provides the CTR_DRBG AES-256 random number generator.
1135 */
1136#define POLARSSL_CTR_DRBG_C
1137
1138/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001139 * \def POLARSSL_DEBUG_C
1140 *
1141 * Enable the debug functions.
1142 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001143 * Module: library/debug.c
1144 * Caller: library/ssl_cli.c
1145 * library/ssl_srv.c
1146 * library/ssl_tls.c
1147 *
1148 * This module provides debugging functions.
1149 */
Paul Bakker40e46942009-01-03 21:51:57 +00001150#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001151
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001152/**
1153 * \def POLARSSL_DES_C
1154 *
1155 * Enable the DES block cipher.
1156 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001157 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001158 * Caller: library/pem.c
1159 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001160 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001161 * This module enables the following ciphersuites (if other requisites are
1162 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001163 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1164 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001165 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001166 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001167 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1168 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1169 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1170 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1171 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001172 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001173 *
Paul Bakkercff68422013-09-15 20:43:33 +02001174 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001175 */
Paul Bakker40e46942009-01-03 21:51:57 +00001176#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001177
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001178/**
1179 * \def POLARSSL_DHM_C
1180 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001181 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001182 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001183 * Module: library/dhm.c
1184 * Caller: library/ssl_cli.c
1185 * library/ssl_srv.c
1186 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001187 * This module is used by the following key exchanges:
1188 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001189 */
Paul Bakker40e46942009-01-03 21:51:57 +00001190#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001191
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001192/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001193 * \def POLARSSL_ECDH_C
1194 *
1195 * Enable the elliptic curve Diffie-Hellman library.
1196 *
1197 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001198 * Caller: library/ssl_cli.c
1199 * library/ssl_srv.c
1200 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001201 * This module is used by the following key exchanges:
1202 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001203 *
1204 * Requires: POLARSSL_ECP_C
1205 */
1206#define POLARSSL_ECDH_C
1207
1208/**
1209 * \def POLARSSL_ECDSA_C
1210 *
1211 * Enable the elliptic curve DSA library.
1212 *
1213 * Module: library/ecdsa.c
1214 * Caller:
1215 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001216 * This module is used by the following key exchanges:
1217 * ECDHE-ECDSA
1218 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001219 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001220 */
1221#define POLARSSL_ECDSA_C
1222
1223/**
1224 * \def POLARSSL_ECP_C
1225 *
1226 * Enable the elliptic curve over GF(p) library.
1227 *
1228 * Module: library/ecp.c
1229 * Caller: library/ecdh.c
1230 * library/ecdsa.c
1231 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001232 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001233 */
1234#define POLARSSL_ECP_C
1235
1236/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001237 * \def POLARSSL_ENTROPY_C
1238 *
1239 * Enable the platform-specific entropy code.
1240 *
1241 * Module: library/entropy.c
1242 * Caller:
1243 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001244 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001245 *
1246 * This module provides a generic entropy pool
1247 */
1248#define POLARSSL_ENTROPY_C
1249
1250/**
Paul Bakker9d781402011-05-09 16:17:09 +00001251 * \def POLARSSL_ERROR_C
1252 *
1253 * Enable error code to error string conversion.
1254 *
1255 * Module: library/error.c
1256 * Caller:
1257 *
1258 * This module enables err_strerror().
1259 */
1260#define POLARSSL_ERROR_C
1261
1262/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001263 * \def POLARSSL_GCM_C
1264 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001265 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001266 *
1267 * Module: library/gcm.c
1268 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001269 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001270 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001271 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1272 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001273 */
1274#define POLARSSL_GCM_C
1275
1276/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001277 * \def POLARSSL_HAVEGE_C
1278 *
1279 * Enable the HAVEGE random generator.
1280 *
Paul Bakker2a844242013-06-24 13:01:53 +02001281 * Warning: the HAVEGE random generator is not suitable for virtualized
1282 * environments
1283 *
1284 * Warning: the HAVEGE random generator is dependent on timing and specific
1285 * processor traits. It is therefore not advised to use HAVEGE as
1286 * your applications primary random generator or primary entropy pool
1287 * input. As a secondary input to your entropy pool, it IS able add
1288 * the (limited) extra entropy it provides.
1289 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001290 * Module: library/havege.c
1291 * Caller:
1292 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001293 * Requires: POLARSSL_TIMING_C
1294 *
Paul Bakker2a844242013-06-24 13:01:53 +02001295 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001296 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001297//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001298
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001299/**
1300 * \def POLARSSL_MD_C
1301 *
1302 * Enable the generic message digest layer.
1303 *
Paul Bakker17373852011-01-06 14:20:01 +00001304 * Module: library/md.c
1305 * Caller:
1306 *
1307 * Uncomment to enable generic message digest wrappers.
1308 */
1309#define POLARSSL_MD_C
1310
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001311/**
1312 * \def POLARSSL_MD2_C
1313 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001314 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001315 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001316 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001317 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001318 *
1319 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001320 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001321//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001322
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001323/**
1324 * \def POLARSSL_MD4_C
1325 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001326 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001327 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001328 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001329 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001330 *
1331 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001332 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001333//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001334
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001335/**
1336 * \def POLARSSL_MD5_C
1337 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001338 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001339 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001340 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001341 * Caller: library/md.c
1342 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001343 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001344 *
1345 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001346 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001347 */
Paul Bakker40e46942009-01-03 21:51:57 +00001348#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001349
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001350/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001351 * \def POLARSSL_MEMORY_C
1352 *
1353 * Enable the memory allocation layer.
1354 * By default PolarSSL uses the system-provided malloc() and free().
1355 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1356 * are defined and unmodified)
1357 *
1358 * This allows different allocators (self-implemented or provided)
1359 *
1360 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001361 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001362//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001363
1364/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001365 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1366 *
1367 * Enable the buffer allocator implementation that makes use of a (stack)
1368 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1369 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001370 *
1371 * Module: library/memory_buffer_alloc.c
1372 *
1373 * Requires: POLARSSL_MEMORY_C
1374 *
1375 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001376 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001377//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001378
1379/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001380 * \def POLARSSL_NET_C
1381 *
1382 * Enable the TCP/IP networking routines.
1383 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001384 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001385 *
1386 * This module provides TCP/IP networking routines.
1387 */
Paul Bakker40e46942009-01-03 21:51:57 +00001388#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001389
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001390/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001391 * \def POLARSSL_OID_C
1392 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001393 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001394 *
1395 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001396 * Caller: library/asn1write.c
1397 * library/pkcs5.c
1398 * library/pkparse.c
1399 * library/pkwrite.c
1400 * library/rsa.c
1401 * library/x509.c
1402 * library/x509_create.c
1403 * library/x509_crl.c
1404 * library/x509_crt.c
1405 * library/x509_csr.c
1406 * library/x509write_crt.c
1407 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001408 *
1409 * This modules translates between OIDs and internal values.
1410 */
1411#define POLARSSL_OID_C
1412
1413/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001414 * \def POLARSSL_PADLOCK_C
1415 *
1416 * Enable VIA Padlock support on x86.
1417 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001418 * Module: library/padlock.c
1419 * Caller: library/aes.c
1420 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001421 * Requires: POLARSSL_HAVE_ASM
1422 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001423 * This modules adds support for the VIA PadLock on x86.
1424 */
Paul Bakker40e46942009-01-03 21:51:57 +00001425#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001426
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001427/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001428 * \def POLARSSL_PBKDF2_C
1429 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001430 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001431 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001432 *
1433 * Module: library/pbkdf2.c
1434 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001435 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001436 *
1437 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001438 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001439#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001440
1441/**
Paul Bakkercff68422013-09-15 20:43:33 +02001442 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001443 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001444 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001445 *
1446 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001447 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001448 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001449 * library/x509_crl.c
1450 * library/x509_crt.c
1451 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001452 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001453 * Requires: POLARSSL_BASE64_C
1454 *
Paul Bakkercff68422013-09-15 20:43:33 +02001455 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001456 */
Paul Bakkercff68422013-09-15 20:43:33 +02001457#define POLARSSL_PEM_PARSE_C
1458
1459/**
1460 * \def POLARSSL_PEM_WRITE_C
1461 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001462 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001463 *
1464 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001465 * Caller: library/pkwrite.c
1466 * library/x509write_crt.c
1467 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001468 *
1469 * Requires: POLARSSL_BASE64_C
1470 *
1471 * This modules adds support for encoding / writing PEM files.
1472 */
1473#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001474
1475/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001476 * \def POLARSSL_PK_C
1477 *
1478 * Enable the generic public (asymetric) key layer.
1479 *
1480 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001481 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001482 * library/ssl_cli.c
1483 * library/ssl_srv.c
1484 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001485 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1486 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001487 * Uncomment to enable generic public key wrappers.
1488 */
1489#define POLARSSL_PK_C
1490
1491/**
Paul Bakker4606c732013-09-15 17:04:23 +02001492 * \def POLARSSL_PK_PARSE_C
1493 *
1494 * Enable the generic public (asymetric) key parser.
1495 *
1496 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001497 * Caller: library/x509_crt.c
1498 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001499 *
1500 * Requires: POLARSSL_PK_C
1501 *
1502 * Uncomment to enable generic public key parse functions.
1503 */
1504#define POLARSSL_PK_PARSE_C
1505
1506/**
1507 * \def POLARSSL_PK_WRITE_C
1508 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001509 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001510 *
1511 * Module: library/pkwrite.c
1512 * Caller: library/x509write.c
1513 *
1514 * Requires: POLARSSL_PK_C
1515 *
1516 * Uncomment to enable generic public key write functions.
1517 */
1518#define POLARSSL_PK_WRITE_C
1519
1520/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001521 * \def POLARSSL_PKCS5_C
1522 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001523 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001524 *
1525 * Module: library/pkcs5.c
1526 *
1527 * Requires: POLARSSL_MD_C
1528 *
1529 * This module adds support for the PKCS#5 functions.
1530 */
1531#define POLARSSL_PKCS5_C
1532
1533/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001534 * \def POLARSSL_PKCS11_C
1535 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001536 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001537 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001538 * Module: library/pkcs11.c
1539 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001540 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001541 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001542 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001543 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001544 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001545 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001546//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001547
1548/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001549 * \def POLARSSL_PKCS12_C
1550 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001551 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001552 * Adds algorithms for parsing PKCS#8 encrypted private keys
1553 *
1554 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001555 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001556 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001557 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1558 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001559 *
1560 * This module enables PKCS#12 functions.
1561 */
1562#define POLARSSL_PKCS12_C
1563
1564/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001565 * \def POLARSSL_RSA_C
1566 *
1567 * Enable the RSA public-key cryptosystem.
1568 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001569 * Module: library/rsa.c
1570 * Caller: library/ssl_cli.c
1571 * library/ssl_srv.c
1572 * library/ssl_tls.c
1573 * library/x509.c
1574 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001575 * This module is used by the following key exchanges:
1576 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001577 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001578 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001579 */
Paul Bakker40e46942009-01-03 21:51:57 +00001580#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001581
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001582/**
1583 * \def POLARSSL_SHA1_C
1584 *
1585 * Enable the SHA1 cryptographic hash algorithm.
1586 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001587 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001588 * Caller: library/md.c
1589 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001590 * library/ssl_srv.c
1591 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001592 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001593 *
1594 * This module is required for SSL/TLS and SHA1-signed certificates.
1595 */
Paul Bakker40e46942009-01-03 21:51:57 +00001596#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001597
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001598/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001599 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001600 *
1601 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001602 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001603 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001604 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001605 * Caller: library/entropy.c
1606 * library/md.c
1607 * library/ssl_cli.c
1608 * library/ssl_srv.c
1609 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001610 *
1611 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001612 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001613 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001614#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001615
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001616/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001617 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001618 *
1619 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001620 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001621 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001622 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001623 * Caller: library/entropy.c
1624 * library/md.c
1625 * library/ssl_cli.c
1626 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001627 *
1628 * This module adds support for SHA-384 and SHA-512.
1629 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001630#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001631
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001632/**
Paul Bakker0a597072012-09-25 21:55:46 +00001633 * \def POLARSSL_SSL_CACHE_C
1634 *
1635 * Enable simple SSL cache implementation.
1636 *
1637 * Module: library/ssl_cache.c
1638 * Caller:
1639 *
1640 * Requires: POLARSSL_SSL_CACHE_C
1641 */
1642#define POLARSSL_SSL_CACHE_C
1643
1644/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001645 * \def POLARSSL_SSL_CLI_C
1646 *
1647 * Enable the SSL/TLS client code.
1648 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001649 * Module: library/ssl_cli.c
1650 * Caller:
1651 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001652 * Requires: POLARSSL_SSL_TLS_C
1653 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001654 * This module is required for SSL/TLS client support.
1655 */
Paul Bakker40e46942009-01-03 21:51:57 +00001656#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001657
Paul Bakker9a736322012-11-14 12:39:52 +00001658/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001659 * \def POLARSSL_SSL_SRV_C
1660 *
1661 * Enable the SSL/TLS server code.
1662 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001663 * Module: library/ssl_srv.c
1664 * Caller:
1665 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001666 * Requires: POLARSSL_SSL_TLS_C
1667 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001668 * This module is required for SSL/TLS server support.
1669 */
Paul Bakker40e46942009-01-03 21:51:57 +00001670#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001671
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001672/**
1673 * \def POLARSSL_SSL_TLS_C
1674 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001675 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001676 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001677 * Module: library/ssl_tls.c
1678 * Caller: library/ssl_cli.c
1679 * library/ssl_srv.c
1680 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001681 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001682 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001683 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001684 * This module is required for SSL/TLS.
1685 */
Paul Bakker40e46942009-01-03 21:51:57 +00001686#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001687
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001688/**
Paul Bakker2466d932013-09-28 14:40:38 +02001689 * \def POLARSSL_THREADING_C
1690 *
1691 * Enable the threading abstraction layer.
1692 * By default PolarSSL assumes it is used in a non-threaded environment or that
1693 * contexts are not shared between threads. If you do intend to use contexts
1694 * between threads, you will need to enable this layer to prevent race
1695 * conditions.
1696 *
1697 * Module: library/threading.c
1698 *
1699 * This allows different threading implementations (self-implemented or
1700 * provided).
1701 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001702 * You will have to enable either POLARSSL_THREADING_ALT or
1703 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001704 *
1705 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001706 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001707//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001708
1709/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001710 * \def POLARSSL_TIMING_C
1711 *
1712 * Enable the portable timing interface.
1713 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001714 * Module: library/timing.c
1715 * Caller: library/havege.c
1716 *
1717 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001718 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001719#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001720
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001721/**
1722 * \def POLARSSL_VERSION_C
1723 *
1724 * Enable run-time version information.
1725 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001726 * Module: library/version.c
1727 *
1728 * This module provides run-time version information.
1729 */
1730#define POLARSSL_VERSION_C
1731
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001732/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001733 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001734 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001735 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001736 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001737 * Module: library/x509.c
1738 * Caller: library/x509_crl.c
1739 * library/x509_crt.c
1740 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001741 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001742 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001743 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001744 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001745 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001746 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001747#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001748
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001749/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001750 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001751 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001752 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001753 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001754 * Module: library/x509_crt.c
1755 * Caller: library/ssl_cli.c
1756 * library/ssl_srv.c
1757 * library/ssl_tls.c
1758 *
1759 * Requires: POLARSSL_X509_USE_C
1760 *
1761 * This module is required for X.509 certificate parsing.
1762 */
1763#define POLARSSL_X509_CRT_PARSE_C
1764
1765/**
1766 * \def POLARSSL_X509_CRL_PARSE_C
1767 *
1768 * Enable X.509 CRL parsing.
1769 *
1770 * Module: library/x509_crl.c
1771 * Caller: library/x509_crt.c
1772 *
1773 * Requires: POLARSSL_X509_USE_C
1774 *
1775 * This module is required for X.509 CRL parsing.
1776 */
1777#define POLARSSL_X509_CRL_PARSE_C
1778
1779/**
1780 * \def POLARSSL_X509_CSR_PARSE_C
1781 *
1782 * Enable X.509 Certificate Signing Request (CSR) parsing.
1783 *
1784 * Module: library/x509_csr.c
1785 * Caller: library/x509_crt_write.c
1786 *
1787 * Requires: POLARSSL_X509_USE_C
1788 *
1789 * This module is used for reading X.509 certificate request.
1790 */
1791#define POLARSSL_X509_CSR_PARSE_C
1792
1793/**
1794 * \def POLARSSL_X509_CREATE_C
1795 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001796 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001797 *
1798 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001799 *
Paul Bakker4606c732013-09-15 17:04:23 +02001800 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001801 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001802 * This module is the basis for creating X.509 certificates and CSRs.
1803 */
1804#define POLARSSL_X509_CREATE_C
1805
1806/**
1807 * \def POLARSSL_X509_CRT_WRITE_C
1808 *
1809 * Enable creating X.509 certificates.
1810 *
1811 * Module: library/x509_crt_write.c
1812 *
1813 * Requires: POLARSSL_CREATE_C
1814 *
1815 * This module is required for X.509 certificate creation.
1816 */
1817#define POLARSSL_X509_CRT_WRITE_C
1818
1819/**
1820 * \def POLARSSL_X509_CSR_WRITE_C
1821 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001822 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001823 *
1824 * Module: library/x509_csr_write.c
1825 *
1826 * Requires: POLARSSL_CREATE_C
1827 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001828 * This module is required for X.509 certificate request writing.
1829 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001830#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001831
1832/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001833 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001834 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001835 * Enable the XTEA block cipher.
1836 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001837 * Module: library/xtea.c
1838 * Caller:
1839 */
1840#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001841
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001842/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001843
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001844/**
1845 * \name SECTION: Module configuration options
1846 *
1847 * This section allows for the setting of module specific sizes and
1848 * configuration options. The default values are already present in the
1849 * relevant header files and should suffice for the regular use cases.
1850 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1851 * only if you have a good reason and know the consequences.
1852 *
1853 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1854 * header file take precedence.
1855 *
1856 * Please check the respective header file for documentation on these
1857 * parameters (to prevent duplicate documentation).
1858 *
1859 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1860 * \{
1861 */
1862//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1863
1864#if defined(POLARSSL_CONFIG_OPTIONS)
1865
1866// MPI / BIGNUM options
1867//
1868#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1869#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1870
1871// CTR_DRBG options
1872//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001873#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 +02001874#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1875#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1876#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1877#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1878
Paul Bakkere1b665e2013-12-11 16:02:58 +01001879// ECP options
1880//
1881#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
1882#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
Manuel Pégourié-Gonnard9e4191c2013-12-30 18:41:16 +01001883#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Paul Bakkere1b665e2013-12-11 16:02:58 +01001884
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001885// Entropy options
1886//
1887#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1888#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1889
Paul Bakker6e339b52013-07-03 13:37:05 +02001890// Memory options
1891#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1892#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1893#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1894
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001895// SSL Cache options
1896//
1897#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1898#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1899
1900// SSL options
1901//
1902#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001903#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001904
1905#endif /* POLARSSL_CONFIG_OPTIONS */
1906
1907/* \} name */
1908
Paul Bakker7ad00f92013-04-18 23:05:25 +02001909/*
1910 * Sanity checks on defines and dependencies
1911 */
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001912#if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
1913#error "POLARSSL_AESNI_C defined, but not all prerequisites"
1914#endif
1915
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001916#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1917#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001918#endif
1919
1920#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1921#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1922#endif
1923
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001924#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1925#error "POLARSSL_DHM_C defined, but not all prerequisites"
1926#endif
1927
Paul Bakker7ad00f92013-04-18 23:05:25 +02001928#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1929#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1930#endif
1931
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001932#if defined(POLARSSL_ECDSA_C) && \
1933 ( !defined(POLARSSL_ECP_C) || \
1934 !defined(POLARSSL_ASN1_PARSE_C) || \
1935 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001936#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1937#endif
1938
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001939#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1940 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1941 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1942 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1943 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1944 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1945 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1946 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1947 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001948#error "POLARSSL_ECP_C defined, but not all prerequisites"
1949#endif
1950
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001951#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1952 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001953#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1954#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001955#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1956 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1957#error "CTR_DRBG_ENTROPY_LEN value too high"
1958#endif
1959#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1960 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1961#error "CTR_DRBG_ENTROPY_LEN value too high"
1962#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001963
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001964#if defined(POLARSSL_GCM_C) && ( \
1965 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001966#error "POLARSSL_GCM_C defined, but not all prerequisites"
1967#endif
1968
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001969#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1970#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1971#endif
1972
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001973#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
1974 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1975#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
1976#endif
1977
1978#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
1979 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1980#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
1981#endif
1982
Paul Bakkere07f41d2013-04-19 09:08:57 +02001983#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1984#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1985#endif
1986
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001987#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1988 !defined(POLARSSL_ECDH_C)
1989#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1990#endif
1991
Paul Bakkere07f41d2013-04-19 09:08:57 +02001992#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1993 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001994 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001995#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1996#endif
1997
1998#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1999 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002000 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002001#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2002#endif
2003
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002004#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2005 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002006 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002007#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2008#endif
2009
Paul Bakkere07f41d2013-04-19 09:08:57 +02002010#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002011 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002012 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002013#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2014#endif
2015
2016#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002017 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002018 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002019#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2020#endif
2021
Paul Bakker6e339b52013-07-03 13:37:05 +02002022#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
2023#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2024#endif
2025
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002026#if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2027#error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2028#endif
2029
Paul Bakker7ad00f92013-04-18 23:05:25 +02002030#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2031#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2032#endif
2033
Paul Bakkercff68422013-09-15 20:43:33 +02002034#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2035#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2036#endif
2037
2038#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2039#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002040#endif
2041
Paul Bakker4606c732013-09-15 17:04:23 +02002042#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2043#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2044#endif
2045
2046#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2047#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2048#endif
2049
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002050#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002051#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2052#endif
2053
2054#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2055 !defined(POLARSSL_OID_C) )
2056#error "POLARSSL_RSA_C defined, but not all prerequisites"
2057#endif
2058
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002059#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2060 !defined(POLARSSL_SHA1_C) )
2061#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2062#endif
2063
2064#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2065 !defined(POLARSSL_SHA1_C) )
2066#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2067#endif
2068
2069#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2070 !defined(POLARSSL_SHA1_C) )
2071#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2072#endif
2073
2074#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2075 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2076#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2077#endif
2078
Paul Bakker7ad00f92013-04-18 23:05:25 +02002079#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2080#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2081#endif
2082
Paul Bakker577e0062013-08-28 11:57:20 +02002083#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002084 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002085#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2086#endif
2087
2088#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2089#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2090#endif
2091
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002092#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2093 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2094 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2095#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2096#endif
2097
2098#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2099 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2100#error "Illegal protocol selection"
2101#endif
2102
2103#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2104 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2105#error "Illegal protocol selection"
2106#endif
2107
2108#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2109 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2110 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2111#error "Illegal protocol selection"
2112#endif
2113
Paul Bakker59da0a42013-08-19 13:27:17 +02002114#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002115 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2116 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002117#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2118#endif
2119
Paul Bakker2466d932013-09-28 14:40:38 +02002120#if defined(POLARSSL_THREADING_PTHREAD)
2121#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2122#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2123#endif
2124#define POLARSSL_THREADING_IMPL
2125#endif
2126
2127#if defined(POLARSSL_THREADING_ALT)
2128#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2129#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2130#endif
2131#define POLARSSL_THREADING_IMPL
2132#endif
2133
2134#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2135#error "POLARSSL_THREADING_C defined, single threading implementation required"
2136#endif
2137#undef POLARSSL_THREADING_IMPL
2138
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002139#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002140 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002141 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002142#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002143#endif
2144
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002145#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2146 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2147 !defined(POLARSSL_PK_WRITE_C) )
2148#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2149#endif
2150
2151#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2152#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2153#endif
2154
2155#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2156#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2157#endif
2158
2159#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2160#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2161#endif
2162
2163#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2164#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2165#endif
2166
2167#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2168#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002169#endif
2170
Paul Bakker5121ce52009-01-03 21:22:43 +00002171#endif /* config.h */