blob: f00a7fc525c7e454c5173264840f0c409775b6b5 [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
Paul Bakker9f4c1622014-01-22 14:14:26 +0100151//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200152//#define POLARSSL_SHA1_ALT
153//#define POLARSSL_SHA256_ALT
154//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200155
156/**
Manuel Pégourié-Gonnardb1d4eb12014-01-22 10:12:57 +0100157 * \def POLARSSL_RSASSA_PSS_CERTIFICATES
158 *
159 * Enable parsing and verification of X.509 certificates and CRLs signed with
160 * RSASSA-PSS.
161 *
162 * This is disabled by default since it breaks binary compatibility with the
163 * 1.3.x line. If you choose to enable it, you will need to rebuild your
164 * application against the new header files, relinking will not be enough.
165 *
166 * TODO: actually disable it when done working on this branch ,)
167 *
168 * Uncomment this macro to allow using RSASSA-PSS in certificates.
169 */
170#define POLARSSL_RSASSA_PSS_CERTIFICATES
171
172/**
Paul Bakker15566e42011-04-24 21:19:15 +0000173 * \def POLARSSL_AES_ROM_TABLES
174 *
175 * Store the AES tables in ROM.
176 *
177 * Uncomment this macro to store the AES tables in ROM.
178 *
Paul Bakker15566e42011-04-24 21:19:15 +0000179 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200180//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000181
182/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200183 * \def POLARSSL_CIPHER_MODE_CBC
184 *
185 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
186 */
187#define POLARSSL_CIPHER_MODE_CBC
188
189/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000190 * \def POLARSSL_CIPHER_MODE_CFB
191 *
192 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
193 */
194#define POLARSSL_CIPHER_MODE_CFB
195
196/**
197 * \def POLARSSL_CIPHER_MODE_CTR
198 *
199 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
200 */
201#define POLARSSL_CIPHER_MODE_CTR
202
203/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000204 * \def POLARSSL_CIPHER_NULL_CIPHER
205 *
206 * Enable NULL cipher.
207 * Warning: Only do so when you know what you are doing. This allows for
208 * encryption or channels without any security!
209 *
210 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
211 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100212 * TLS_ECDH_ECDSA_WITH_NULL_SHA
213 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200214 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100215 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200216 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200217 * TLS_ECDHE_PSK_WITH_NULL_SHA256
218 * TLS_ECDHE_PSK_WITH_NULL_SHA
219 * TLS_DHE_PSK_WITH_NULL_SHA384
220 * TLS_DHE_PSK_WITH_NULL_SHA256
221 * TLS_DHE_PSK_WITH_NULL_SHA
222 * TLS_RSA_WITH_NULL_SHA256
223 * TLS_RSA_WITH_NULL_SHA
224 * TLS_RSA_WITH_NULL_MD5
225 * TLS_RSA_PSK_WITH_NULL_SHA384
226 * TLS_RSA_PSK_WITH_NULL_SHA256
227 * TLS_RSA_PSK_WITH_NULL_SHA
228 * TLS_PSK_WITH_NULL_SHA384
229 * TLS_PSK_WITH_NULL_SHA256
230 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000231 *
232 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200233#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000234 */
235
236/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200237 * \def POLARSSL_CIPHER_PADDING_XXX
238 *
239 * Uncomment or comment macros to add support for specific padding modes
240 * in the cipher layer with cipher modes that support padding (e.g. CBC)
241 *
242 * If you disable all padding modes, only full blocks can be used with CBC.
243 *
244 * Enable padding modes in the cipher layer.
245 */
246#define POLARSSL_CIPHER_PADDING_PKCS7
247#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
248#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
249#define POLARSSL_CIPHER_PADDING_ZEROS
250
251/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000252 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
253 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200254 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000255 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000256 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000257 *
258 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000259 * TLS_RSA_WITH_DES_CBC_SHA
260 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000261 *
262 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200263#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000264 */
265
266/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200267 * \def POLARSSL_ECP_XXXX_ENABLED
268 *
269 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200270 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200271 *
272 * Comment macros to disable the curve and functions for it
273 */
274#define POLARSSL_ECP_DP_SECP192R1_ENABLED
275#define POLARSSL_ECP_DP_SECP224R1_ENABLED
276#define POLARSSL_ECP_DP_SECP256R1_ENABLED
277#define POLARSSL_ECP_DP_SECP384R1_ENABLED
278#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnardea499a72014-01-11 15:58:47 +0100279#define POLARSSL_ECP_DP_SECP192K1_ENABLED
Manuel Pégourié-Gonnard18e3ec92014-01-11 15:22:07 +0100280#define POLARSSL_ECP_DP_SECP224K1_ENABLED
Manuel Pégourié-Gonnardf51c8fc2014-01-10 18:17:18 +0100281#define POLARSSL_ECP_DP_SECP256K1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200282#define POLARSSL_ECP_DP_BP256R1_ENABLED
283#define POLARSSL_ECP_DP_BP384R1_ENABLED
284#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100285//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
286#define POLARSSL_ECP_DP_M255_ENABLED
287//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
288//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200289
290/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200291 * \def POLARSSL_ECP_NIST_OPTIM
292 *
293 * Enable specific 'modulo p' routines for each NIST prime.
294 * Depending on the prime and architecture, makes operations 4 to 8 times
295 * faster on the corresponding curve.
296 *
297 * Comment this macro to disable NIST curves optimisation.
298 */
299#define POLARSSL_ECP_NIST_OPTIM
300
301/**
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100302 * \def POLARSSL_ECDSA_DETERMINISTIC
303 *
304 * Enable deterministic ECDSA (RFC 6979).
305 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
306 * may result in a compromise of the long-term signing key. This is avoided by
307 * the deterministic variant.
308 *
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +0100309 * Requires: POLARSSL_MD_C
310 *
Manuel Pégourié-Gonnard461d4162014-01-06 10:16:28 +0100311 * Comment this macro to disable deterministic ECDSA.
312 */
313#define POLARSSL_ECDSA_DETERMINISTIC
314
315/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200316 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
317 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200318 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200319 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200320 * This enables the following ciphersuites (if other requisites are
321 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200322 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200323 * TLS_PSK_WITH_AES_256_CBC_SHA384
324 * TLS_PSK_WITH_AES_256_CBC_SHA
325 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
326 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
327 * TLS_PSK_WITH_AES_128_GCM_SHA256
328 * TLS_PSK_WITH_AES_128_CBC_SHA256
329 * TLS_PSK_WITH_AES_128_CBC_SHA
330 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
331 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
332 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
333 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200334 */
335#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
336
337/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200338 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
339 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200340 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200341 *
342 * Requires: POLARSSL_DHM_C
343 *
344 * This enables the following ciphersuites (if other requisites are
345 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200346 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200347 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
348 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
349 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
350 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
351 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
352 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
353 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
354 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
355 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
356 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
357 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200358 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200359#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200360
361/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200362 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
363 *
364 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
365 *
366 * Requires: POLARSSL_ECDH_C
367 *
368 * This enables the following ciphersuites (if other requisites are
369 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200370 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200371 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200372 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200373 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
374 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
375 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
376 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
377 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200378 */
379#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
380
381/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200382 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
383 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200384 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200385 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200386 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200387 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200388 *
389 * This enables the following ciphersuites (if other requisites are
390 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200391 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200392 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
393 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
394 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
395 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
396 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
397 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
398 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
399 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
400 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
401 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
402 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200403 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200404#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200405
406/**
407 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
408 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200409 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200410 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200411 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200412 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200413 *
414 * This enables the following ciphersuites (if other requisites are
415 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200416 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200417 * TLS_RSA_WITH_AES_256_CBC_SHA256
418 * TLS_RSA_WITH_AES_256_CBC_SHA
419 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200420 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200421 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
422 * TLS_RSA_WITH_AES_128_GCM_SHA256
423 * TLS_RSA_WITH_AES_128_CBC_SHA256
424 * TLS_RSA_WITH_AES_128_CBC_SHA
425 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
426 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
427 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200428 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200429 * TLS_RSA_WITH_RC4_128_SHA
430 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200431 */
432#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
433
434/**
435 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
436 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200437 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200438 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200439 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200440 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200441 *
442 * This enables the following ciphersuites (if other requisites are
443 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200444 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200445 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200446 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
447 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200448 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200449 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
450 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
451 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
452 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
453 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
454 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
455 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200456 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
457 */
458#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
459
460/**
461 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
462 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200463 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200464 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200465 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200466 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200467 *
468 * This enables the following ciphersuites (if other requisites are
469 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200470 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200471 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
472 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
473 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200474 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200475 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
476 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
477 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
478 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
479 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
480 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
481 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200482 */
483#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
484
485/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200486 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
487 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200488 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200489 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200490 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200491 *
492 * This enables the following ciphersuites (if other requisites are
493 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200494 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
495 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
496 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
497 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
498 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
499 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
500 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
501 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
502 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
503 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
504 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
505 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200506 */
507#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
508
509/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100510 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
511 *
512 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
513 *
514 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
515 *
516 * This enables the following ciphersuites (if other requisites are
517 * enabled as well):
518 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
519 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
520 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
521 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
522 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
523 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
524 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
525 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
526 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
527 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
528 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
529 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
530 */
531#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
532
533/**
534 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
535 *
536 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
537 *
538 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
539 *
540 * This enables the following ciphersuites (if other requisites are
541 * enabled as well):
542 * TLS_ECDH_RSA_WITH_RC4_128_SHA
543 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
544 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
545 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
546 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
547 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
548 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
549 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
550 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
551 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
552 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
553 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
554 */
555#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
556
557/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200558 * \def POLARSSL_ERROR_STRERROR_BC
559 *
560 * Make available the backward compatible error_strerror() next to the
561 * current polarssl_strerror().
562 *
563 * Disable if you run into name conflicts and want to really remove the
564 * error_strerror()
565 */
566#define POLARSSL_ERROR_STRERROR_BC
567
568/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100569 * \def POLARSSL_ERROR_STRERROR_DUMMY
570 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200571 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100572 * third party libraries easier.
573 *
574 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200575 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100576 */
577#define POLARSSL_ERROR_STRERROR_DUMMY
578
579/**
Paul Bakker15566e42011-04-24 21:19:15 +0000580 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000581 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200582 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200583 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200584 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000585 */
Paul Bakker15566e42011-04-24 21:19:15 +0000586#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000587
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000588/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000589 * \def POLARSSL_FS_IO
590 *
591 * Enable functions that use the filesystem.
592 */
593#define POLARSSL_FS_IO
594
595/**
Paul Bakker43655f42011-12-15 20:11:16 +0000596 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
597 *
598 * Do not add default entropy sources. These are the platform specific,
599 * hardclock and HAVEGE based poll functions.
600 *
601 * This is useful to have more control over the added entropy sources in an
602 * application.
603 *
604 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000605 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200606//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000607
608/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000609 * \def POLARSSL_NO_PLATFORM_ENTROPY
610 *
611 * Do not use built-in platform entropy functions.
612 * This is useful if your platform does not support
613 * standards like the /dev/urandom or Windows CryptoAPI.
614 *
615 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000616 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200617//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000618
619/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200620 * \def POLARSSL_MEMORY_DEBUG
621 *
622 * Enable debugging of buffer allocator memory issues. Automatically prints
623 * (to stderr) all (fatal) messages on memory allocation issues. Enables
624 * function for 'debug output' of allocated memory.
625 *
626 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
627 * fprintf()
628 *
629 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200630 */
631//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200632
633/**
634 * \def POLARSSL_MEMORY_BACKTRACE
635 *
636 * Include backtrace information with each allocated block.
637 *
638 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
639 * GLIBC-compatible backtrace() an backtrace_symbols() support
640 *
641 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200642 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200643//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200644
645/**
Paul Bakker48377d92013-08-30 12:06:24 +0200646 * \def POLARSSL_PKCS1_V15
647 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200648 * Enable support for PKCS#1 v1.5 encoding.
649 *
Paul Bakker48377d92013-08-30 12:06:24 +0200650 * Requires: POLARSSL_RSA_C
651 *
Paul Bakker48377d92013-08-30 12:06:24 +0200652 * This enables support for PKCS#1 v1.5 operations.
653 */
654#define POLARSSL_PKCS1_V15
655
656/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000657 * \def POLARSSL_PKCS1_V21
658 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200659 * Enable support for PKCS#1 v2.1 encoding.
660 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000661 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
662 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000663 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
664 */
665#define POLARSSL_PKCS1_V21
666
667/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000668 * \def POLARSSL_RSA_NO_CRT
669 *
670 * Do not use the Chinese Remainder Theorem for the RSA private operation.
671 *
672 * Uncomment this macro to disable the use of CRT in RSA.
673 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000674 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200675//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000676
677/**
678 * \def POLARSSL_SELF_TEST
679 *
680 * Enable the checkup functions (*_self_test).
681 */
682#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000683
684/**
Paul Bakker40865c82013-01-31 17:13:13 +0100685 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
686 *
687 * Enable sending of alert messages in case of encountered errors as per RFC.
688 * If you choose not to send the alert messages, PolarSSL can still communicate
689 * with other servers, only debugging of failures is harder.
690 *
691 * The advantage of not sending alert messages, is that no information is given
692 * about reasons for failures thus preventing adversaries of gaining intel.
693 *
694 * Enable sending of all alert messages
695 */
696#define POLARSSL_SSL_ALERT_MESSAGES
697
698/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100699 * \def POLARSSL_SSL_DEBUG_ALL
700 *
701 * Enable the debug messages in SSL module for all issues.
702 * Debug messages have been disabled in some places to prevent timing
703 * attacks due to (unbalanced) debugging function calls.
704 *
705 * If you need all error reporting you should enable this during debugging,
706 * but remove this for production servers that should log as well.
707 *
708 * Uncomment this macro to report all debug messages on errors introducing
709 * a timing side-channel.
710 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100711 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200712//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100713
714/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000715 * \def POLARSSL_SSL_HW_RECORD_ACCEL
716 *
717 * Enable hooking functions in SSL module for hardware acceleration of
718 * individual records.
719 *
720 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000721 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200722//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000723
724/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100725 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
726 *
727 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200728 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100729 *
730 * Comment this macro to disable support for SSLv2 Client Hello messages.
731 */
732#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
733
734/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100735 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
736 *
737 * Pick the ciphersuite according to the client's preferences rather than ours
738 * in the SSL Server module (POLARSSL_SSL_SRV_C).
739 *
740 * Uncomment this macro to respect client's ciphersuite order
741 */
742//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
743
744/**
Paul Bakker05decb22013-08-15 13:33:48 +0200745 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
746 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200747 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200748 *
749 * Comment this macro to disable support for the max_fragment_length extension
750 */
751#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
752
753/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200754 * \def POLARSSL_SSL_PROTO_SSL3
755 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200756 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200757 *
758 * Requires: POLARSSL_MD5_C
759 * POLARSSL_SHA1_C
760 *
761 * Comment this macro to disable support for SSL 3.0
762 */
763#define POLARSSL_SSL_PROTO_SSL3
764
765/**
766 * \def POLARSSL_SSL_PROTO_TLS1
767 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200768 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200769 *
770 * Requires: POLARSSL_MD5_C
771 * POLARSSL_SHA1_C
772 *
773 * Comment this macro to disable support for TLS 1.0
774 */
775#define POLARSSL_SSL_PROTO_TLS1
776
777/**
778 * \def POLARSSL_SSL_PROTO_TLS1_1
779 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200780 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200781 *
782 * Requires: POLARSSL_MD5_C
783 * POLARSSL_SHA1_C
784 *
785 * Comment this macro to disable support for TLS 1.1
786 */
787#define POLARSSL_SSL_PROTO_TLS1_1
788
789/**
790 * \def POLARSSL_SSL_PROTO_TLS1_2
791 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200792 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200793 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100794 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200795 * (Depends on ciphersuites)
796 *
797 * Comment this macro to disable support for TLS 1.2
798 */
799#define POLARSSL_SSL_PROTO_TLS1_2
800
801/**
Paul Bakkera503a632013-08-14 13:48:06 +0200802 * \def POLARSSL_SSL_SESSION_TICKETS
803 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200804 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200805 *
806 * Requires: POLARSSL_AES_C
807 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200808 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200809 *
810 * Comment this macro to disable support for SSL session tickets
811 */
812#define POLARSSL_SSL_SESSION_TICKETS
813
814/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200815 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
816 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200817 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200818 *
819 * Comment this macro to disable support for server name indication in SSL
820 */
821#define POLARSSL_SSL_SERVER_NAME_INDICATION
822
823/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200824 * \def POLARSSL_SSL_TRUNCATED_HMAC
825 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200826 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200827 *
828 * Comment this macro to disable support for truncated HMAC in SSL
829 */
830#define POLARSSL_SSL_TRUNCATED_HMAC
831
832/**
Paul Bakker2466d932013-09-28 14:40:38 +0200833 * \def POLARSSL_THREADING_ALT
834 *
835 * Provide your own alternate threading implementation.
836 *
837 * Requires: POLARSSL_THREADING_C
838 *
839 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200840 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200841//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200842
843/**
Paul Bakker2466d932013-09-28 14:40:38 +0200844 * \def POLARSSL_THREADING_PTHREAD
845 *
846 * Enable the pthread wrapper layer for the threading layer.
847 *
848 * Requires: POLARSSL_THREADING_C
849 *
850 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200851 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200852//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200853
854/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200855 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
856 *
857 * If set, the X509 parser will not break-off when parsing an X509 certificate
858 * and encountering an extension in a v1 or v2 certificate.
859 *
860 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200861 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200862//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200863
864/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000865 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
866 *
867 * If set, the X509 parser will not break-off when parsing an X509 certificate
868 * and encountering an unknown critical extension.
869 *
870 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000871 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200872//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000873
874/**
875 * \def POLARSSL_ZLIB_SUPPORT
876 *
877 * If set, the SSL/TLS module uses ZLIB to support compression and
878 * decompression of packet data.
879 *
880 * Used in: library/ssl_tls.c
881 * library/ssl_cli.c
882 * library/ssl_srv.c
883 *
884 * This feature requires zlib library and headers to be present.
885 *
886 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000887 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200888//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200889/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000890
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000891/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000892 * \name SECTION: PolarSSL modules
893 *
894 * This section enables or disables entire modules in PolarSSL
895 * \{
896 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000897
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000898/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +0100899 * \def POLARSSL_AESNI_C
900 *
901 * Enable AES-NI support on x86-64.
902 *
903 * Module: library/aesni.c
904 * Caller: library/aes.c
905 *
906 * Requires: POLARSSL_HAVE_ASM
907 *
908 * This modules adds support for the AES-NI instructions on x86-64
909 */
910#define POLARSSL_AESNI_C
911
912/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000913 * \def POLARSSL_AES_C
914 *
915 * Enable the AES block cipher.
916 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000917 * Module: library/aes.c
918 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000919 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000920 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000921 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000922 * This module enables the following ciphersuites (if other requisites are
923 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100924 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
925 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
926 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
927 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
928 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
929 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
930 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
931 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
932 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
933 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
934 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
935 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200936 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
937 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
938 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
939 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
940 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000941 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200942 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100943 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200944 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
945 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
946 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
947 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
948 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
949 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
950 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
951 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
952 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
953 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
954 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
955 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
956 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
957 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
958 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
959 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
960 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
961 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
962 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
963 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
964 * TLS_RSA_WITH_AES_256_GCM_SHA384
965 * TLS_RSA_WITH_AES_256_CBC_SHA256
966 * TLS_RSA_WITH_AES_256_CBC_SHA
967 * TLS_RSA_WITH_AES_128_GCM_SHA256
968 * TLS_RSA_WITH_AES_128_CBC_SHA256
969 * TLS_RSA_WITH_AES_128_CBC_SHA
970 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
971 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
972 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
973 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
974 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
975 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
976 * TLS_PSK_WITH_AES_256_GCM_SHA384
977 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200978 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200979 * TLS_PSK_WITH_AES_128_GCM_SHA256
980 * TLS_PSK_WITH_AES_128_CBC_SHA256
981 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100982 *
Paul Bakkercff68422013-09-15 20:43:33 +0200983 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000984 */
Paul Bakker40e46942009-01-03 21:51:57 +0000985#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000986
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000987/**
988 * \def POLARSSL_ARC4_C
989 *
990 * Enable the ARCFOUR stream cipher.
991 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000992 * Module: library/arc4.c
993 * Caller: library/ssl_tls.c
994 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100995 * This module enables the following ciphersuites (if other requisites are
996 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100997 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
998 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200999 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001000 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001001 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
1002 * TLS_DHE_PSK_WITH_RC4_128_SHA
1003 * TLS_RSA_WITH_RC4_128_SHA
1004 * TLS_RSA_WITH_RC4_128_MD5
1005 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001006 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +00001007 */
Paul Bakker40e46942009-01-03 21:51:57 +00001008#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001009
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001010/**
Paul Bakkerefc30292011-11-10 14:43:23 +00001011 * \def POLARSSL_ASN1_PARSE_C
1012 *
1013 * Enable the generic ASN1 parser.
1014 *
1015 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001016 * Caller: library/x509.c
1017 * library/dhm.c
1018 * library/pkcs12.c
1019 * library/pkcs5.c
1020 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +00001021 */
1022#define POLARSSL_ASN1_PARSE_C
1023
1024/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001025 * \def POLARSSL_ASN1_WRITE_C
1026 *
1027 * Enable the generic ASN1 writer.
1028 *
1029 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001030 * Caller: library/ecdsa.c
1031 * library/pkwrite.c
1032 * library/x509_create.c
1033 * library/x509write_crt.c
1034 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001035 */
1036#define POLARSSL_ASN1_WRITE_C
1037
1038/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001039 * \def POLARSSL_BASE64_C
1040 *
1041 * Enable the Base64 module.
1042 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001043 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001044 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001045 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001046 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001047 */
Paul Bakker40e46942009-01-03 21:51:57 +00001048#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001049
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001050/**
1051 * \def POLARSSL_BIGNUM_C
1052 *
Paul Bakker9a736322012-11-14 12:39:52 +00001053 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001054 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001055 * Module: library/bignum.c
1056 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001057 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001058 * library/rsa.c
1059 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001060 *
1061 * This module is required for RSA and DHM support.
1062 */
Paul Bakker40e46942009-01-03 21:51:57 +00001063#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001064
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001065/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001066 * \def POLARSSL_BLOWFISH_C
1067 *
1068 * Enable the Blowfish block cipher.
1069 *
1070 * Module: library/blowfish.c
1071 */
1072#define POLARSSL_BLOWFISH_C
1073
1074/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001075 * \def POLARSSL_CAMELLIA_C
1076 *
1077 * Enable the Camellia block cipher.
1078 *
Paul Bakker38119b12009-01-10 23:31:23 +00001079 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001080 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001081 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001082 * This module enables the following ciphersuites (if other requisites are
1083 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001084 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1085 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1086 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1087 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1088 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1089 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1090 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1091 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001092 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1093 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1094 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1095 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1096 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001097 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001098 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1099 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1100 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1101 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1102 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1103 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1104 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1105 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1106 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1107 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1108 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1109 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1110 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1111 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1112 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1113 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1114 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1115 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1116 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1117 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1118 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1119 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1120 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1121 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1122 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1123 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1124 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1125 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001126 */
1127#define POLARSSL_CAMELLIA_C
1128
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001129/**
1130 * \def POLARSSL_CERTS_C
1131 *
1132 * Enable the test certificates.
1133 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001134 * Module: library/certs.c
1135 * Caller:
1136 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001137 * Requires: POLARSSL_PEM_PARSE_C
1138 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001139 * This module is used for testing (ssl_client/server).
1140 */
Paul Bakker40e46942009-01-03 21:51:57 +00001141#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001142
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001143/**
1144 * \def POLARSSL_CIPHER_C
1145 *
1146 * Enable the generic cipher layer.
1147 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001148 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001149 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001150 *
1151 * Uncomment to enable generic cipher wrappers.
1152 */
1153#define POLARSSL_CIPHER_C
1154
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001155/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001156 * \def POLARSSL_CTR_DRBG_C
1157 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001158 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001159 *
1160 * Module: library/ctr_drbg.c
1161 * Caller:
1162 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001163 * Requires: POLARSSL_AES_C
1164 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001165 * This module provides the CTR_DRBG AES-256 random number generator.
1166 */
1167#define POLARSSL_CTR_DRBG_C
1168
1169/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001170 * \def POLARSSL_DEBUG_C
1171 *
1172 * Enable the debug functions.
1173 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001174 * Module: library/debug.c
1175 * Caller: library/ssl_cli.c
1176 * library/ssl_srv.c
1177 * library/ssl_tls.c
1178 *
1179 * This module provides debugging functions.
1180 */
Paul Bakker40e46942009-01-03 21:51:57 +00001181#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001182
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001183/**
1184 * \def POLARSSL_DES_C
1185 *
1186 * Enable the DES block cipher.
1187 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001188 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001189 * Caller: library/pem.c
1190 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001191 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001192 * This module enables the following ciphersuites (if other requisites are
1193 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001194 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1195 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001196 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001197 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001198 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1199 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1200 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1201 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1202 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001203 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001204 *
Paul Bakkercff68422013-09-15 20:43:33 +02001205 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001206 */
Paul Bakker40e46942009-01-03 21:51:57 +00001207#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001208
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001209/**
1210 * \def POLARSSL_DHM_C
1211 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001212 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001213 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001214 * Module: library/dhm.c
1215 * Caller: library/ssl_cli.c
1216 * library/ssl_srv.c
1217 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001218 * This module is used by the following key exchanges:
1219 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001220 */
Paul Bakker40e46942009-01-03 21:51:57 +00001221#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001222
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001223/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001224 * \def POLARSSL_ECDH_C
1225 *
1226 * Enable the elliptic curve Diffie-Hellman library.
1227 *
1228 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001229 * Caller: library/ssl_cli.c
1230 * library/ssl_srv.c
1231 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001232 * This module is used by the following key exchanges:
1233 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001234 *
1235 * Requires: POLARSSL_ECP_C
1236 */
1237#define POLARSSL_ECDH_C
1238
1239/**
1240 * \def POLARSSL_ECDSA_C
1241 *
1242 * Enable the elliptic curve DSA library.
1243 *
1244 * Module: library/ecdsa.c
1245 * Caller:
1246 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001247 * This module is used by the following key exchanges:
1248 * ECDHE-ECDSA
1249 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001250 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001251 */
1252#define POLARSSL_ECDSA_C
1253
1254/**
1255 * \def POLARSSL_ECP_C
1256 *
1257 * Enable the elliptic curve over GF(p) library.
1258 *
1259 * Module: library/ecp.c
1260 * Caller: library/ecdh.c
1261 * library/ecdsa.c
1262 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001263 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001264 */
1265#define POLARSSL_ECP_C
1266
1267/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001268 * \def POLARSSL_ENTROPY_C
1269 *
1270 * Enable the platform-specific entropy code.
1271 *
1272 * Module: library/entropy.c
1273 * Caller:
1274 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001275 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001276 *
1277 * This module provides a generic entropy pool
1278 */
1279#define POLARSSL_ENTROPY_C
1280
1281/**
Paul Bakker9d781402011-05-09 16:17:09 +00001282 * \def POLARSSL_ERROR_C
1283 *
1284 * Enable error code to error string conversion.
1285 *
1286 * Module: library/error.c
1287 * Caller:
1288 *
1289 * This module enables err_strerror().
1290 */
1291#define POLARSSL_ERROR_C
1292
1293/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001294 * \def POLARSSL_GCM_C
1295 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001296 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001297 *
1298 * Module: library/gcm.c
1299 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001300 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001301 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001302 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1303 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001304 */
1305#define POLARSSL_GCM_C
1306
1307/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001308 * \def POLARSSL_HAVEGE_C
1309 *
1310 * Enable the HAVEGE random generator.
1311 *
Paul Bakker2a844242013-06-24 13:01:53 +02001312 * Warning: the HAVEGE random generator is not suitable for virtualized
1313 * environments
1314 *
1315 * Warning: the HAVEGE random generator is dependent on timing and specific
1316 * processor traits. It is therefore not advised to use HAVEGE as
1317 * your applications primary random generator or primary entropy pool
1318 * input. As a secondary input to your entropy pool, it IS able add
1319 * the (limited) extra entropy it provides.
1320 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001321 * Module: library/havege.c
1322 * Caller:
1323 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001324 * Requires: POLARSSL_TIMING_C
1325 *
Paul Bakker2a844242013-06-24 13:01:53 +02001326 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001327 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001328//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001329
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001330/**
1331 * \def POLARSSL_MD_C
1332 *
1333 * Enable the generic message digest layer.
1334 *
Paul Bakker17373852011-01-06 14:20:01 +00001335 * Module: library/md.c
1336 * Caller:
1337 *
1338 * Uncomment to enable generic message digest wrappers.
1339 */
1340#define POLARSSL_MD_C
1341
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001342/**
1343 * \def POLARSSL_MD2_C
1344 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001345 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001346 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001347 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001348 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001349 *
1350 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001351 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001352//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001353
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001354/**
1355 * \def POLARSSL_MD4_C
1356 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001357 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001358 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001359 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001360 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001361 *
1362 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001363 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001364//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001365
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001366/**
1367 * \def POLARSSL_MD5_C
1368 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001369 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001370 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001371 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001372 * Caller: library/md.c
1373 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001374 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001375 *
1376 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001377 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001378 */
Paul Bakker40e46942009-01-03 21:51:57 +00001379#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001380
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001381/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001382 * \def POLARSSL_MEMORY_C
1383 *
1384 * Enable the memory allocation layer.
1385 * By default PolarSSL uses the system-provided malloc() and free().
1386 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1387 * are defined and unmodified)
1388 *
1389 * This allows different allocators (self-implemented or provided)
1390 *
1391 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001392 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001393//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001394
1395/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001396 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1397 *
1398 * Enable the buffer allocator implementation that makes use of a (stack)
1399 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1400 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001401 *
1402 * Module: library/memory_buffer_alloc.c
1403 *
1404 * Requires: POLARSSL_MEMORY_C
1405 *
1406 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001407 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001408//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001409
1410/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001411 * \def POLARSSL_NET_C
1412 *
1413 * Enable the TCP/IP networking routines.
1414 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001415 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001416 *
1417 * This module provides TCP/IP networking routines.
1418 */
Paul Bakker40e46942009-01-03 21:51:57 +00001419#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001420
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001421/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001422 * \def POLARSSL_OID_C
1423 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001424 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001425 *
1426 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001427 * Caller: library/asn1write.c
1428 * library/pkcs5.c
1429 * library/pkparse.c
1430 * library/pkwrite.c
1431 * library/rsa.c
1432 * library/x509.c
1433 * library/x509_create.c
1434 * library/x509_crl.c
1435 * library/x509_crt.c
1436 * library/x509_csr.c
1437 * library/x509write_crt.c
1438 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001439 *
1440 * This modules translates between OIDs and internal values.
1441 */
1442#define POLARSSL_OID_C
1443
1444/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001445 * \def POLARSSL_PADLOCK_C
1446 *
1447 * Enable VIA Padlock support on x86.
1448 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001449 * Module: library/padlock.c
1450 * Caller: library/aes.c
1451 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001452 * Requires: POLARSSL_HAVE_ASM
1453 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001454 * This modules adds support for the VIA PadLock on x86.
1455 */
Paul Bakker40e46942009-01-03 21:51:57 +00001456#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001457
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001458/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001459 * \def POLARSSL_PBKDF2_C
1460 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001461 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001462 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001463 *
1464 * Module: library/pbkdf2.c
1465 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001466 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001467 *
1468 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001469 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001470#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001471
1472/**
Paul Bakkercff68422013-09-15 20:43:33 +02001473 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001474 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001475 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001476 *
1477 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001478 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001479 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001480 * library/x509_crl.c
1481 * library/x509_crt.c
1482 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001483 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001484 * Requires: POLARSSL_BASE64_C
1485 *
Paul Bakkercff68422013-09-15 20:43:33 +02001486 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001487 */
Paul Bakkercff68422013-09-15 20:43:33 +02001488#define POLARSSL_PEM_PARSE_C
1489
1490/**
1491 * \def POLARSSL_PEM_WRITE_C
1492 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001493 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001494 *
1495 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001496 * Caller: library/pkwrite.c
1497 * library/x509write_crt.c
1498 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001499 *
1500 * Requires: POLARSSL_BASE64_C
1501 *
1502 * This modules adds support for encoding / writing PEM files.
1503 */
1504#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001505
1506/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001507 * \def POLARSSL_PK_C
1508 *
1509 * Enable the generic public (asymetric) key layer.
1510 *
1511 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001512 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001513 * library/ssl_cli.c
1514 * library/ssl_srv.c
1515 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001516 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1517 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001518 * Uncomment to enable generic public key wrappers.
1519 */
1520#define POLARSSL_PK_C
1521
1522/**
Paul Bakker4606c732013-09-15 17:04:23 +02001523 * \def POLARSSL_PK_PARSE_C
1524 *
1525 * Enable the generic public (asymetric) key parser.
1526 *
1527 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001528 * Caller: library/x509_crt.c
1529 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001530 *
1531 * Requires: POLARSSL_PK_C
1532 *
1533 * Uncomment to enable generic public key parse functions.
1534 */
1535#define POLARSSL_PK_PARSE_C
1536
1537/**
1538 * \def POLARSSL_PK_WRITE_C
1539 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001540 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001541 *
1542 * Module: library/pkwrite.c
1543 * Caller: library/x509write.c
1544 *
1545 * Requires: POLARSSL_PK_C
1546 *
1547 * Uncomment to enable generic public key write functions.
1548 */
1549#define POLARSSL_PK_WRITE_C
1550
1551/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001552 * \def POLARSSL_PKCS5_C
1553 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001554 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001555 *
1556 * Module: library/pkcs5.c
1557 *
1558 * Requires: POLARSSL_MD_C
1559 *
1560 * This module adds support for the PKCS#5 functions.
1561 */
1562#define POLARSSL_PKCS5_C
1563
1564/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001565 * \def POLARSSL_PKCS11_C
1566 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001567 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001568 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001569 * Module: library/pkcs11.c
1570 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001571 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001572 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001573 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001574 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001575 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001576 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001577//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001578
1579/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001580 * \def POLARSSL_PKCS12_C
1581 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001582 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001583 * Adds algorithms for parsing PKCS#8 encrypted private keys
1584 *
1585 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001586 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001587 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001588 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1589 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001590 *
1591 * This module enables PKCS#12 functions.
1592 */
1593#define POLARSSL_PKCS12_C
1594
1595/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001596 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001597 *
1598 * Enable the RIPEMD-160 hash algorithm.
1599 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001600 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001601 * Caller: library/md.c
1602 *
1603 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001604#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001605
1606/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001607 * \def POLARSSL_RSA_C
1608 *
1609 * Enable the RSA public-key cryptosystem.
1610 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001611 * Module: library/rsa.c
1612 * Caller: library/ssl_cli.c
1613 * library/ssl_srv.c
1614 * library/ssl_tls.c
1615 * library/x509.c
1616 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001617 * This module is used by the following key exchanges:
1618 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001619 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001620 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001621 */
Paul Bakker40e46942009-01-03 21:51:57 +00001622#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001623
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001624/**
1625 * \def POLARSSL_SHA1_C
1626 *
1627 * Enable the SHA1 cryptographic hash algorithm.
1628 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001629 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001630 * Caller: library/md.c
1631 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001632 * library/ssl_srv.c
1633 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001634 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001635 *
1636 * This module is required for SSL/TLS and SHA1-signed certificates.
1637 */
Paul Bakker40e46942009-01-03 21:51:57 +00001638#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001639
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001640/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001641 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001642 *
1643 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001644 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001645 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001646 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001647 * Caller: library/entropy.c
1648 * library/md.c
1649 * library/ssl_cli.c
1650 * library/ssl_srv.c
1651 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001652 *
1653 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001654 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001655 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001656#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001657
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001658/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001659 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001660 *
1661 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001662 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001663 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001664 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001665 * Caller: library/entropy.c
1666 * library/md.c
1667 * library/ssl_cli.c
1668 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001669 *
1670 * This module adds support for SHA-384 and SHA-512.
1671 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001672#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001673
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001674/**
Paul Bakker0a597072012-09-25 21:55:46 +00001675 * \def POLARSSL_SSL_CACHE_C
1676 *
1677 * Enable simple SSL cache implementation.
1678 *
1679 * Module: library/ssl_cache.c
1680 * Caller:
1681 *
1682 * Requires: POLARSSL_SSL_CACHE_C
1683 */
1684#define POLARSSL_SSL_CACHE_C
1685
1686/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001687 * \def POLARSSL_SSL_CLI_C
1688 *
1689 * Enable the SSL/TLS client code.
1690 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001691 * Module: library/ssl_cli.c
1692 * Caller:
1693 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001694 * Requires: POLARSSL_SSL_TLS_C
1695 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001696 * This module is required for SSL/TLS client support.
1697 */
Paul Bakker40e46942009-01-03 21:51:57 +00001698#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001699
Paul Bakker9a736322012-11-14 12:39:52 +00001700/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001701 * \def POLARSSL_SSL_SRV_C
1702 *
1703 * Enable the SSL/TLS server code.
1704 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001705 * Module: library/ssl_srv.c
1706 * Caller:
1707 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001708 * Requires: POLARSSL_SSL_TLS_C
1709 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001710 * This module is required for SSL/TLS server support.
1711 */
Paul Bakker40e46942009-01-03 21:51:57 +00001712#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001713
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001714/**
1715 * \def POLARSSL_SSL_TLS_C
1716 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001717 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001718 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001719 * Module: library/ssl_tls.c
1720 * Caller: library/ssl_cli.c
1721 * library/ssl_srv.c
1722 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001723 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001724 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001725 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001726 * This module is required for SSL/TLS.
1727 */
Paul Bakker40e46942009-01-03 21:51:57 +00001728#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001729
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001730/**
Paul Bakker2466d932013-09-28 14:40:38 +02001731 * \def POLARSSL_THREADING_C
1732 *
1733 * Enable the threading abstraction layer.
1734 * By default PolarSSL assumes it is used in a non-threaded environment or that
1735 * contexts are not shared between threads. If you do intend to use contexts
1736 * between threads, you will need to enable this layer to prevent race
1737 * conditions.
1738 *
1739 * Module: library/threading.c
1740 *
1741 * This allows different threading implementations (self-implemented or
1742 * provided).
1743 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001744 * You will have to enable either POLARSSL_THREADING_ALT or
1745 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001746 *
1747 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001748 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001749//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001750
1751/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001752 * \def POLARSSL_TIMING_C
1753 *
1754 * Enable the portable timing interface.
1755 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001756 * Module: library/timing.c
1757 * Caller: library/havege.c
1758 *
1759 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001760 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001761#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001762
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001763/**
1764 * \def POLARSSL_VERSION_C
1765 *
1766 * Enable run-time version information.
1767 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001768 * Module: library/version.c
1769 *
1770 * This module provides run-time version information.
1771 */
1772#define POLARSSL_VERSION_C
1773
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001774/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001775 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001776 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001777 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001778 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001779 * Module: library/x509.c
1780 * Caller: library/x509_crl.c
1781 * library/x509_crt.c
1782 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001783 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001784 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001785 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001786 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001787 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001788 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001789#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001790
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001791/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001792 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001793 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001794 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001795 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001796 * Module: library/x509_crt.c
1797 * Caller: library/ssl_cli.c
1798 * library/ssl_srv.c
1799 * library/ssl_tls.c
1800 *
1801 * Requires: POLARSSL_X509_USE_C
1802 *
1803 * This module is required for X.509 certificate parsing.
1804 */
1805#define POLARSSL_X509_CRT_PARSE_C
1806
1807/**
1808 * \def POLARSSL_X509_CRL_PARSE_C
1809 *
1810 * Enable X.509 CRL parsing.
1811 *
1812 * Module: library/x509_crl.c
1813 * Caller: library/x509_crt.c
1814 *
1815 * Requires: POLARSSL_X509_USE_C
1816 *
1817 * This module is required for X.509 CRL parsing.
1818 */
1819#define POLARSSL_X509_CRL_PARSE_C
1820
1821/**
1822 * \def POLARSSL_X509_CSR_PARSE_C
1823 *
1824 * Enable X.509 Certificate Signing Request (CSR) parsing.
1825 *
1826 * Module: library/x509_csr.c
1827 * Caller: library/x509_crt_write.c
1828 *
1829 * Requires: POLARSSL_X509_USE_C
1830 *
1831 * This module is used for reading X.509 certificate request.
1832 */
1833#define POLARSSL_X509_CSR_PARSE_C
1834
1835/**
1836 * \def POLARSSL_X509_CREATE_C
1837 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001838 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001839 *
1840 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001841 *
Paul Bakker4606c732013-09-15 17:04:23 +02001842 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001843 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001844 * This module is the basis for creating X.509 certificates and CSRs.
1845 */
1846#define POLARSSL_X509_CREATE_C
1847
1848/**
1849 * \def POLARSSL_X509_CRT_WRITE_C
1850 *
1851 * Enable creating X.509 certificates.
1852 *
1853 * Module: library/x509_crt_write.c
1854 *
1855 * Requires: POLARSSL_CREATE_C
1856 *
1857 * This module is required for X.509 certificate creation.
1858 */
1859#define POLARSSL_X509_CRT_WRITE_C
1860
1861/**
1862 * \def POLARSSL_X509_CSR_WRITE_C
1863 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001864 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001865 *
1866 * Module: library/x509_csr_write.c
1867 *
1868 * Requires: POLARSSL_CREATE_C
1869 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001870 * This module is required for X.509 certificate request writing.
1871 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001872#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001873
1874/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001875 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001876 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001877 * Enable the XTEA block cipher.
1878 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001879 * Module: library/xtea.c
1880 * Caller:
1881 */
1882#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001883
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001884/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001885
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001886/**
1887 * \name SECTION: Module configuration options
1888 *
1889 * This section allows for the setting of module specific sizes and
1890 * configuration options. The default values are already present in the
1891 * relevant header files and should suffice for the regular use cases.
1892 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1893 * only if you have a good reason and know the consequences.
1894 *
1895 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1896 * header file take precedence.
1897 *
1898 * Please check the respective header file for documentation on these
1899 * parameters (to prevent duplicate documentation).
1900 *
1901 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1902 * \{
1903 */
1904//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1905
1906#if defined(POLARSSL_CONFIG_OPTIONS)
1907
1908// MPI / BIGNUM options
1909//
1910#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1911#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1912
1913// CTR_DRBG options
1914//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001915#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 +02001916#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1917#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1918#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1919#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1920
Paul Bakkere1b665e2013-12-11 16:02:58 +01001921// ECP options
1922//
1923#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
1924#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
Manuel Pégourié-Gonnard9e4191c2013-12-30 18:41:16 +01001925#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Paul Bakkere1b665e2013-12-11 16:02:58 +01001926
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001927// Entropy options
1928//
1929#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1930#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1931
Paul Bakker6e339b52013-07-03 13:37:05 +02001932// Memory options
1933#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1934#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1935#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1936
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001937// SSL Cache options
1938//
1939#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1940#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1941
1942// SSL options
1943//
1944#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001945#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001946
1947#endif /* POLARSSL_CONFIG_OPTIONS */
1948
1949/* \} name */
1950
Paul Bakker7ad00f92013-04-18 23:05:25 +02001951/*
1952 * Sanity checks on defines and dependencies
1953 */
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001954#if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
1955#error "POLARSSL_AESNI_C defined, but not all prerequisites"
1956#endif
1957
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001958#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1959#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001960#endif
1961
1962#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1963#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1964#endif
1965
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001966#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1967#error "POLARSSL_DHM_C defined, but not all prerequisites"
1968#endif
1969
Paul Bakker7ad00f92013-04-18 23:05:25 +02001970#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1971#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1972#endif
1973
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001974#if defined(POLARSSL_ECDSA_C) && \
1975 ( !defined(POLARSSL_ECP_C) || \
1976 !defined(POLARSSL_ASN1_PARSE_C) || \
1977 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001978#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1979#endif
1980
Manuel Pégourié-Gonnard5b1a5732014-01-07 16:46:17 +01001981#if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_MD_C)
1982#error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
1983#endif
1984
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001985#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1986 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1987 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1988 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1989 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1990 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1991 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1992 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1993 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001994#error "POLARSSL_ECP_C defined, but not all prerequisites"
1995#endif
1996
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001997#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1998 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001999#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
2000#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02002001#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
2002 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
2003#error "CTR_DRBG_ENTROPY_LEN value too high"
2004#endif
2005#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
2006 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
2007#error "CTR_DRBG_ENTROPY_LEN value too high"
2008#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02002009
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02002010#if defined(POLARSSL_GCM_C) && ( \
2011 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002012#error "POLARSSL_GCM_C defined, but not all prerequisites"
2013#endif
2014
Paul Bakkerecd54fb2013-07-03 14:48:29 +02002015#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
2016#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
2017#endif
2018
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01002019#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
2020 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2021#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
2022#endif
2023
2024#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
2025 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2026#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
2027#endif
2028
Paul Bakkere07f41d2013-04-19 09:08:57 +02002029#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
2030#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
2031#endif
2032
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02002033#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
2034 !defined(POLARSSL_ECDH_C)
2035#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
2036#endif
2037
Paul Bakkere07f41d2013-04-19 09:08:57 +02002038#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2039 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002040 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002041#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2042#endif
2043
2044#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2045 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002046 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002047#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2048#endif
2049
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002050#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2051 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002052 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002053#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2054#endif
2055
Paul Bakkere07f41d2013-04-19 09:08:57 +02002056#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002057 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002058 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002059#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2060#endif
2061
2062#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002063 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002064 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002065#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2066#endif
2067
Paul Bakker6e339b52013-07-03 13:37:05 +02002068#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
2069#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2070#endif
2071
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002072#if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2073#error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2074#endif
2075
Paul Bakker7ad00f92013-04-18 23:05:25 +02002076#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2077#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2078#endif
2079
Paul Bakkercff68422013-09-15 20:43:33 +02002080#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2081#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2082#endif
2083
2084#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2085#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002086#endif
2087
Paul Bakker4606c732013-09-15 17:04:23 +02002088#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2089#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2090#endif
2091
2092#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2093#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2094#endif
2095
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002096#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002097#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2098#endif
2099
2100#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2101 !defined(POLARSSL_OID_C) )
2102#error "POLARSSL_RSA_C defined, but not all prerequisites"
2103#endif
2104
Manuel Pégourié-Gonnardce7c6fd2014-01-24 14:37:29 +01002105#if defined(POLARSSL_RSASSA_PSS_CERTIFICATES) && \
2106 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_PKCS1_V21) )
2107#error "POLARSSL_RSASSA_PSS_CERTIFICATES defined, but not all prerequisites"
2108#endif
2109
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002110#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2111 !defined(POLARSSL_SHA1_C) )
2112#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2113#endif
2114
2115#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2116 !defined(POLARSSL_SHA1_C) )
2117#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2118#endif
2119
2120#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2121 !defined(POLARSSL_SHA1_C) )
2122#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2123#endif
2124
2125#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2126 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2127#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2128#endif
2129
Paul Bakker7ad00f92013-04-18 23:05:25 +02002130#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2131#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2132#endif
2133
Paul Bakker577e0062013-08-28 11:57:20 +02002134#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002135 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002136#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2137#endif
2138
2139#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2140#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2141#endif
2142
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002143#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2144 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2145 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2146#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2147#endif
2148
2149#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2150 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2151#error "Illegal protocol selection"
2152#endif
2153
2154#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2155 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2156#error "Illegal protocol selection"
2157#endif
2158
2159#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2160 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2161 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2162#error "Illegal protocol selection"
2163#endif
2164
Paul Bakker59da0a42013-08-19 13:27:17 +02002165#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002166 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2167 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002168#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2169#endif
2170
Paul Bakker2466d932013-09-28 14:40:38 +02002171#if defined(POLARSSL_THREADING_PTHREAD)
2172#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2173#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2174#endif
2175#define POLARSSL_THREADING_IMPL
2176#endif
2177
2178#if defined(POLARSSL_THREADING_ALT)
2179#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2180#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2181#endif
2182#define POLARSSL_THREADING_IMPL
2183#endif
2184
2185#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2186#error "POLARSSL_THREADING_C defined, single threading implementation required"
2187#endif
2188#undef POLARSSL_THREADING_IMPL
2189
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002190#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002191 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002192 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002193#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002194#endif
2195
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002196#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2197 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2198 !defined(POLARSSL_PK_WRITE_C) )
2199#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2200#endif
2201
2202#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2203#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2204#endif
2205
2206#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2207#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2208#endif
2209
2210#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2211#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2212#endif
2213
2214#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2215#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2216#endif
2217
2218#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2219#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002220#endif
2221
Paul Bakker5121ce52009-01-03 21:22:43 +00002222#endif /* config.h */