blob: 970212ffde3b351f011ac893c7a146daa87bfa97 [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é-Gonnard09fff7e2013-09-20 13:45:36 +0200104/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000105
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000106/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000107 * \name SECTION: PolarSSL feature support
108 *
109 * This section sets support for features that are or are not needed
110 * within the modules that are enabled.
111 * \{
112 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000113
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000114/**
Paul Bakker90995b52013-06-24 19:20:35 +0200115 * \def POLARSSL_XXX_ALT
116 *
117 * Uncomment a macro to let PolarSSL use your alternate core implementation of
118 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
119 * implementations). Keep in mind that the function prototypes should remain
120 * the same.
121 *
122 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
123 * provide the "struct aes_context" definition and omit the base function
124 * declarations and implementations. "aes_alt.h" will be included from
125 * "aes.h" to include the new function definitions.
126 *
127 * Uncomment a macro to enable alternate implementation for core algorithm
128 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200129 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200130//#define POLARSSL_AES_ALT
131//#define POLARSSL_ARC4_ALT
132//#define POLARSSL_BLOWFISH_ALT
133//#define POLARSSL_CAMELLIA_ALT
134//#define POLARSSL_DES_ALT
135//#define POLARSSL_XTEA_ALT
136//#define POLARSSL_MD2_ALT
137//#define POLARSSL_MD4_ALT
138//#define POLARSSL_MD5_ALT
139//#define POLARSSL_SHA1_ALT
140//#define POLARSSL_SHA256_ALT
141//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200142
143/**
Paul Bakker15566e42011-04-24 21:19:15 +0000144 * \def POLARSSL_AES_ROM_TABLES
145 *
146 * Store the AES tables in ROM.
147 *
148 * Uncomment this macro to store the AES tables in ROM.
149 *
Paul Bakker15566e42011-04-24 21:19:15 +0000150 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200151//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000152
153/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200154 * \def POLARSSL_CIPHER_MODE_CBC
155 *
156 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
157 */
158#define POLARSSL_CIPHER_MODE_CBC
159
160/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000161 * \def POLARSSL_CIPHER_MODE_CFB
162 *
163 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
164 */
165#define POLARSSL_CIPHER_MODE_CFB
166
167/**
168 * \def POLARSSL_CIPHER_MODE_CTR
169 *
170 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
171 */
172#define POLARSSL_CIPHER_MODE_CTR
173
174/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000175 * \def POLARSSL_CIPHER_NULL_CIPHER
176 *
177 * Enable NULL cipher.
178 * Warning: Only do so when you know what you are doing. This allows for
179 * encryption or channels without any security!
180 *
181 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
182 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100183 * TLS_ECDH_ECDSA_WITH_NULL_SHA
184 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200185 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100186 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200187 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200188 * TLS_ECDHE_PSK_WITH_NULL_SHA256
189 * TLS_ECDHE_PSK_WITH_NULL_SHA
190 * TLS_DHE_PSK_WITH_NULL_SHA384
191 * TLS_DHE_PSK_WITH_NULL_SHA256
192 * TLS_DHE_PSK_WITH_NULL_SHA
193 * TLS_RSA_WITH_NULL_SHA256
194 * TLS_RSA_WITH_NULL_SHA
195 * TLS_RSA_WITH_NULL_MD5
196 * TLS_RSA_PSK_WITH_NULL_SHA384
197 * TLS_RSA_PSK_WITH_NULL_SHA256
198 * TLS_RSA_PSK_WITH_NULL_SHA
199 * TLS_PSK_WITH_NULL_SHA384
200 * TLS_PSK_WITH_NULL_SHA256
201 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000202 *
203 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200204#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000205 */
206
207/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200208 * \def POLARSSL_CIPHER_PADDING_XXX
209 *
210 * Uncomment or comment macros to add support for specific padding modes
211 * in the cipher layer with cipher modes that support padding (e.g. CBC)
212 *
213 * If you disable all padding modes, only full blocks can be used with CBC.
214 *
215 * Enable padding modes in the cipher layer.
216 */
217#define POLARSSL_CIPHER_PADDING_PKCS7
218#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
219#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
220#define POLARSSL_CIPHER_PADDING_ZEROS
221
222/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000223 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
224 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200225 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000226 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000227 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000228 *
229 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000230 * TLS_RSA_WITH_DES_CBC_SHA
231 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000232 *
233 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200234#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000235 */
236
237/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200238 * \def POLARSSL_ECP_XXXX_ENABLED
239 *
240 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200241 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200242 *
243 * Comment macros to disable the curve and functions for it
244 */
245#define POLARSSL_ECP_DP_SECP192R1_ENABLED
246#define POLARSSL_ECP_DP_SECP224R1_ENABLED
247#define POLARSSL_ECP_DP_SECP256R1_ENABLED
248#define POLARSSL_ECP_DP_SECP384R1_ENABLED
249#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200250#define POLARSSL_ECP_DP_BP256R1_ENABLED
251#define POLARSSL_ECP_DP_BP384R1_ENABLED
252#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100253//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
254#define POLARSSL_ECP_DP_M255_ENABLED
255//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
256//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200257
258/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200259 * \def POLARSSL_ECP_NIST_OPTIM
260 *
261 * Enable specific 'modulo p' routines for each NIST prime.
262 * Depending on the prime and architecture, makes operations 4 to 8 times
263 * faster on the corresponding curve.
264 *
265 * Comment this macro to disable NIST curves optimisation.
266 */
267#define POLARSSL_ECP_NIST_OPTIM
268
269/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200270 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
271 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200272 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200273 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200274 * This enables the following ciphersuites (if other requisites are
275 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200276 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200277 * TLS_PSK_WITH_AES_256_CBC_SHA384
278 * TLS_PSK_WITH_AES_256_CBC_SHA
279 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
280 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
281 * TLS_PSK_WITH_AES_128_GCM_SHA256
282 * TLS_PSK_WITH_AES_128_CBC_SHA256
283 * TLS_PSK_WITH_AES_128_CBC_SHA
284 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
285 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
286 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
287 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200288 */
289#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
290
291/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200292 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
293 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200294 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200295 *
296 * Requires: POLARSSL_DHM_C
297 *
298 * This enables the following ciphersuites (if other requisites are
299 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200300 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200301 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
302 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
303 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
304 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
305 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
306 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
307 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
308 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
309 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
310 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
311 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200312 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200313#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200314
315/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200316 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
317 *
318 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
319 *
320 * Requires: POLARSSL_ECDH_C
321 *
322 * This enables the following ciphersuites (if other requisites are
323 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200324 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200325 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200326 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200327 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
328 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
329 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
330 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
331 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200332 */
333#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
334
335/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200336 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
337 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200338 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200339 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200340 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200341 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200342 *
343 * This enables the following ciphersuites (if other requisites are
344 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200345 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200346 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
347 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
348 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
349 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
350 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
351 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
352 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
353 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
354 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
355 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
356 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200357 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200358#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200359
360/**
361 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
362 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200363 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200364 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200365 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200366 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200367 *
368 * This enables the following ciphersuites (if other requisites are
369 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200370 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200371 * TLS_RSA_WITH_AES_256_CBC_SHA256
372 * TLS_RSA_WITH_AES_256_CBC_SHA
373 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200374 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200375 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
376 * TLS_RSA_WITH_AES_128_GCM_SHA256
377 * TLS_RSA_WITH_AES_128_CBC_SHA256
378 * TLS_RSA_WITH_AES_128_CBC_SHA
379 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
380 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
381 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200382 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200383 * TLS_RSA_WITH_RC4_128_SHA
384 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200385 */
386#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
387
388/**
389 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
390 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200391 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200392 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200393 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200394 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200395 *
396 * This enables the following ciphersuites (if other requisites are
397 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200398 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200399 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200400 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
401 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200402 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200403 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
404 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
405 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
406 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
407 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
408 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
409 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200410 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
411 */
412#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
413
414/**
415 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
416 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200417 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200418 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200419 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200420 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200421 *
422 * This enables the following ciphersuites (if other requisites are
423 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200424 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200425 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
426 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
427 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200428 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200429 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
430 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
431 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
432 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
433 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
434 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
435 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200436 */
437#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
438
439/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200440 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
441 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200442 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200443 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200444 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200445 *
446 * This enables the following ciphersuites (if other requisites are
447 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200448 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
449 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
450 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
451 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
452 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
453 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
454 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
455 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
456 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
457 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
458 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
459 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200460 */
461#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
462
463/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100464 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
465 *
466 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
467 *
468 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
469 *
470 * This enables the following ciphersuites (if other requisites are
471 * enabled as well):
472 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
473 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
474 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
475 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
476 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
477 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
478 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
479 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
480 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
481 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
482 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
483 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
484 */
485#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
486
487/**
488 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
489 *
490 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
491 *
492 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
493 *
494 * This enables the following ciphersuites (if other requisites are
495 * enabled as well):
496 * TLS_ECDH_RSA_WITH_RC4_128_SHA
497 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
498 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
499 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
500 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
501 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
502 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
503 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
504 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
505 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
506 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
507 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
508 */
509#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
510
511/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200512 * \def POLARSSL_ERROR_STRERROR_BC
513 *
514 * Make available the backward compatible error_strerror() next to the
515 * current polarssl_strerror().
516 *
517 * Disable if you run into name conflicts and want to really remove the
518 * error_strerror()
519 */
520#define POLARSSL_ERROR_STRERROR_BC
521
522/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100523 * \def POLARSSL_ERROR_STRERROR_DUMMY
524 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200525 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100526 * third party libraries easier.
527 *
528 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200529 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100530 */
531#define POLARSSL_ERROR_STRERROR_DUMMY
532
533/**
Paul Bakker15566e42011-04-24 21:19:15 +0000534 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000535 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200536 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200537 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200538 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000539 */
Paul Bakker15566e42011-04-24 21:19:15 +0000540#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000541
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000542/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000543 * \def POLARSSL_FS_IO
544 *
545 * Enable functions that use the filesystem.
546 */
547#define POLARSSL_FS_IO
548
549/**
Paul Bakker43655f42011-12-15 20:11:16 +0000550 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
551 *
552 * Do not add default entropy sources. These are the platform specific,
553 * hardclock and HAVEGE based poll functions.
554 *
555 * This is useful to have more control over the added entropy sources in an
556 * application.
557 *
558 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000559 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200560//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000561
562/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000563 * \def POLARSSL_NO_PLATFORM_ENTROPY
564 *
565 * Do not use built-in platform entropy functions.
566 * This is useful if your platform does not support
567 * standards like the /dev/urandom or Windows CryptoAPI.
568 *
569 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000570 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200571//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000572
573/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200574 * \def POLARSSL_MEMORY_DEBUG
575 *
576 * Enable debugging of buffer allocator memory issues. Automatically prints
577 * (to stderr) all (fatal) messages on memory allocation issues. Enables
578 * function for 'debug output' of allocated memory.
579 *
580 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
581 * fprintf()
582 *
583 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200584 */
585//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200586
587/**
588 * \def POLARSSL_MEMORY_BACKTRACE
589 *
590 * Include backtrace information with each allocated block.
591 *
592 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
593 * GLIBC-compatible backtrace() an backtrace_symbols() support
594 *
595 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200596 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200597//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200598
599/**
Paul Bakker48377d92013-08-30 12:06:24 +0200600 * \def POLARSSL_PKCS1_V15
601 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200602 * Enable support for PKCS#1 v1.5 encoding.
603 *
Paul Bakker48377d92013-08-30 12:06:24 +0200604 * Requires: POLARSSL_RSA_C
605 *
Paul Bakker48377d92013-08-30 12:06:24 +0200606 * This enables support for PKCS#1 v1.5 operations.
607 */
608#define POLARSSL_PKCS1_V15
609
610/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000611 * \def POLARSSL_PKCS1_V21
612 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200613 * Enable support for PKCS#1 v2.1 encoding.
614 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000615 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
616 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000617 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
618 */
619#define POLARSSL_PKCS1_V21
620
621/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000622 * \def POLARSSL_RSA_NO_CRT
623 *
624 * Do not use the Chinese Remainder Theorem for the RSA private operation.
625 *
626 * Uncomment this macro to disable the use of CRT in RSA.
627 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000628 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200629//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000630
631/**
632 * \def POLARSSL_SELF_TEST
633 *
634 * Enable the checkup functions (*_self_test).
635 */
636#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000637
638/**
Paul Bakker40865c82013-01-31 17:13:13 +0100639 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
640 *
641 * Enable sending of alert messages in case of encountered errors as per RFC.
642 * If you choose not to send the alert messages, PolarSSL can still communicate
643 * with other servers, only debugging of failures is harder.
644 *
645 * The advantage of not sending alert messages, is that no information is given
646 * about reasons for failures thus preventing adversaries of gaining intel.
647 *
648 * Enable sending of all alert messages
649 */
650#define POLARSSL_SSL_ALERT_MESSAGES
651
652/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100653 * \def POLARSSL_SSL_DEBUG_ALL
654 *
655 * Enable the debug messages in SSL module for all issues.
656 * Debug messages have been disabled in some places to prevent timing
657 * attacks due to (unbalanced) debugging function calls.
658 *
659 * If you need all error reporting you should enable this during debugging,
660 * but remove this for production servers that should log as well.
661 *
662 * Uncomment this macro to report all debug messages on errors introducing
663 * a timing side-channel.
664 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100665 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200666//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100667
668/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000669 * \def POLARSSL_SSL_HW_RECORD_ACCEL
670 *
671 * Enable hooking functions in SSL module for hardware acceleration of
672 * individual records.
673 *
674 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000675 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200676//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000677
678/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100679 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
680 *
681 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200682 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100683 *
684 * Comment this macro to disable support for SSLv2 Client Hello messages.
685 */
686#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
687
688/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100689 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
690 *
691 * Pick the ciphersuite according to the client's preferences rather than ours
692 * in the SSL Server module (POLARSSL_SSL_SRV_C).
693 *
694 * Uncomment this macro to respect client's ciphersuite order
695 */
696//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
697
698/**
Paul Bakker05decb22013-08-15 13:33:48 +0200699 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
700 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200701 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200702 *
703 * Comment this macro to disable support for the max_fragment_length extension
704 */
705#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
706
707/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200708 * \def POLARSSL_SSL_PROTO_SSL3
709 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200710 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200711 *
712 * Requires: POLARSSL_MD5_C
713 * POLARSSL_SHA1_C
714 *
715 * Comment this macro to disable support for SSL 3.0
716 */
717#define POLARSSL_SSL_PROTO_SSL3
718
719/**
720 * \def POLARSSL_SSL_PROTO_TLS1
721 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200722 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200723 *
724 * Requires: POLARSSL_MD5_C
725 * POLARSSL_SHA1_C
726 *
727 * Comment this macro to disable support for TLS 1.0
728 */
729#define POLARSSL_SSL_PROTO_TLS1
730
731/**
732 * \def POLARSSL_SSL_PROTO_TLS1_1
733 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200734 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200735 *
736 * Requires: POLARSSL_MD5_C
737 * POLARSSL_SHA1_C
738 *
739 * Comment this macro to disable support for TLS 1.1
740 */
741#define POLARSSL_SSL_PROTO_TLS1_1
742
743/**
744 * \def POLARSSL_SSL_PROTO_TLS1_2
745 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200746 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200747 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100748 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200749 * (Depends on ciphersuites)
750 *
751 * Comment this macro to disable support for TLS 1.2
752 */
753#define POLARSSL_SSL_PROTO_TLS1_2
754
755/**
Paul Bakkera503a632013-08-14 13:48:06 +0200756 * \def POLARSSL_SSL_SESSION_TICKETS
757 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200758 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200759 *
760 * Requires: POLARSSL_AES_C
761 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200762 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200763 *
764 * Comment this macro to disable support for SSL session tickets
765 */
766#define POLARSSL_SSL_SESSION_TICKETS
767
768/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200769 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
770 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200771 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200772 *
773 * Comment this macro to disable support for server name indication in SSL
774 */
775#define POLARSSL_SSL_SERVER_NAME_INDICATION
776
777/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200778 * \def POLARSSL_SSL_TRUNCATED_HMAC
779 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200780 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200781 *
782 * Comment this macro to disable support for truncated HMAC in SSL
783 */
784#define POLARSSL_SSL_TRUNCATED_HMAC
785
786/**
Paul Bakker2466d932013-09-28 14:40:38 +0200787 * \def POLARSSL_THREADING_ALT
788 *
789 * Provide your own alternate threading implementation.
790 *
791 * Requires: POLARSSL_THREADING_C
792 *
793 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200794 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200795//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200796
797/**
798 * \def POLARSSL_THREADING_DUMMY
799 *
800 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200801 * Warning: If you use this, all claims of thread-safety in the documentation
802 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200803 *
804 * Requires: POLARSSL_THREADING_C
805 *
806 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200807 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200808//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200809
810/**
811 * \def POLARSSL_THREADING_PTHREAD
812 *
813 * Enable the pthread wrapper layer for the threading layer.
814 *
815 * Requires: POLARSSL_THREADING_C
816 *
817 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200818 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200819//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200820
821/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200822 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
823 *
824 * If set, the X509 parser will not break-off when parsing an X509 certificate
825 * and encountering an extension in a v1 or v2 certificate.
826 *
827 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200828 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200829//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200830
831/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000832 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
833 *
834 * If set, the X509 parser will not break-off when parsing an X509 certificate
835 * and encountering an unknown critical extension.
836 *
837 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000838 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200839//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000840
841/**
842 * \def POLARSSL_ZLIB_SUPPORT
843 *
844 * If set, the SSL/TLS module uses ZLIB to support compression and
845 * decompression of packet data.
846 *
847 * Used in: library/ssl_tls.c
848 * library/ssl_cli.c
849 * library/ssl_srv.c
850 *
851 * This feature requires zlib library and headers to be present.
852 *
853 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000854 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200855//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200856/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000857
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000858/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000859 * \name SECTION: PolarSSL modules
860 *
861 * This section enables or disables entire modules in PolarSSL
862 * \{
863 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000864
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000865/**
866 * \def POLARSSL_AES_C
867 *
868 * Enable the AES block cipher.
869 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000870 * Module: library/aes.c
871 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000872 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000873 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000874 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000875 * This module enables the following ciphersuites (if other requisites are
876 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100877 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
878 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
879 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
880 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
881 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
882 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
883 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
884 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
885 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
886 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
887 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
888 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200889 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
890 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
891 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
892 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
893 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000894 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200895 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100896 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200897 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
898 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
899 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
900 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
901 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
902 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
903 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
904 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
905 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
906 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
907 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
908 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
909 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
910 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
911 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
912 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
913 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
914 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
915 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
916 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
917 * TLS_RSA_WITH_AES_256_GCM_SHA384
918 * TLS_RSA_WITH_AES_256_CBC_SHA256
919 * TLS_RSA_WITH_AES_256_CBC_SHA
920 * TLS_RSA_WITH_AES_128_GCM_SHA256
921 * TLS_RSA_WITH_AES_128_CBC_SHA256
922 * TLS_RSA_WITH_AES_128_CBC_SHA
923 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
924 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
925 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
926 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
927 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
928 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
929 * TLS_PSK_WITH_AES_256_GCM_SHA384
930 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200931 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200932 * TLS_PSK_WITH_AES_128_GCM_SHA256
933 * TLS_PSK_WITH_AES_128_CBC_SHA256
934 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100935 *
Paul Bakkercff68422013-09-15 20:43:33 +0200936 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000937 */
Paul Bakker40e46942009-01-03 21:51:57 +0000938#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000939
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000940/**
941 * \def POLARSSL_ARC4_C
942 *
943 * Enable the ARCFOUR stream cipher.
944 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000945 * Module: library/arc4.c
946 * Caller: library/ssl_tls.c
947 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100948 * This module enables the following ciphersuites (if other requisites are
949 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100950 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
951 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200952 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100953 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200954 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
955 * TLS_DHE_PSK_WITH_RC4_128_SHA
956 * TLS_RSA_WITH_RC4_128_SHA
957 * TLS_RSA_WITH_RC4_128_MD5
958 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200959 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000960 */
Paul Bakker40e46942009-01-03 21:51:57 +0000961#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000962
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000963/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000964 * \def POLARSSL_ASN1_PARSE_C
965 *
966 * Enable the generic ASN1 parser.
967 *
968 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200969 * Caller: library/x509.c
970 * library/dhm.c
971 * library/pkcs12.c
972 * library/pkcs5.c
973 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000974 */
975#define POLARSSL_ASN1_PARSE_C
976
977/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000978 * \def POLARSSL_ASN1_WRITE_C
979 *
980 * Enable the generic ASN1 writer.
981 *
982 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200983 * Caller: library/ecdsa.c
984 * library/pkwrite.c
985 * library/x509_create.c
986 * library/x509write_crt.c
987 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000988 */
989#define POLARSSL_ASN1_WRITE_C
990
991/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000992 * \def POLARSSL_BASE64_C
993 *
994 * Enable the Base64 module.
995 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000996 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000997 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000998 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000999 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001000 */
Paul Bakker40e46942009-01-03 21:51:57 +00001001#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001002
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001003/**
1004 * \def POLARSSL_BIGNUM_C
1005 *
Paul Bakker9a736322012-11-14 12:39:52 +00001006 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001007 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001008 * Module: library/bignum.c
1009 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001010 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001011 * library/rsa.c
1012 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001013 *
1014 * This module is required for RSA and DHM support.
1015 */
Paul Bakker40e46942009-01-03 21:51:57 +00001016#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001017
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001018/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001019 * \def POLARSSL_BLOWFISH_C
1020 *
1021 * Enable the Blowfish block cipher.
1022 *
1023 * Module: library/blowfish.c
1024 */
1025#define POLARSSL_BLOWFISH_C
1026
1027/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001028 * \def POLARSSL_CAMELLIA_C
1029 *
1030 * Enable the Camellia block cipher.
1031 *
Paul Bakker38119b12009-01-10 23:31:23 +00001032 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001033 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001034 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001035 * This module enables the following ciphersuites (if other requisites are
1036 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001037 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1038 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1039 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1040 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1041 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1042 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1043 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1044 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001045 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1046 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1047 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1048 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1049 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001050 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001051 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1052 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1053 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1054 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1055 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1056 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1057 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1058 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1059 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1060 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1061 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1062 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1063 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1064 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1065 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1066 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1067 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1068 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1069 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1070 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1071 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1072 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1073 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1074 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1075 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1076 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1077 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1078 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001079 */
1080#define POLARSSL_CAMELLIA_C
1081
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001082/**
1083 * \def POLARSSL_CERTS_C
1084 *
1085 * Enable the test certificates.
1086 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001087 * Module: library/certs.c
1088 * Caller:
1089 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001090 * Requires: POLARSSL_PEM_PARSE_C
1091 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001092 * This module is used for testing (ssl_client/server).
1093 */
Paul Bakker40e46942009-01-03 21:51:57 +00001094#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001095
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001096/**
1097 * \def POLARSSL_CIPHER_C
1098 *
1099 * Enable the generic cipher layer.
1100 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001101 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001102 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001103 *
1104 * Uncomment to enable generic cipher wrappers.
1105 */
1106#define POLARSSL_CIPHER_C
1107
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001108/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001109 * \def POLARSSL_CTR_DRBG_C
1110 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001111 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001112 *
1113 * Module: library/ctr_drbg.c
1114 * Caller:
1115 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001116 * Requires: POLARSSL_AES_C
1117 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001118 * This module provides the CTR_DRBG AES-256 random number generator.
1119 */
1120#define POLARSSL_CTR_DRBG_C
1121
1122/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001123 * \def POLARSSL_DEBUG_C
1124 *
1125 * Enable the debug functions.
1126 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001127 * Module: library/debug.c
1128 * Caller: library/ssl_cli.c
1129 * library/ssl_srv.c
1130 * library/ssl_tls.c
1131 *
1132 * This module provides debugging functions.
1133 */
Paul Bakker40e46942009-01-03 21:51:57 +00001134#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001135
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001136/**
1137 * \def POLARSSL_DES_C
1138 *
1139 * Enable the DES block cipher.
1140 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001141 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001142 * Caller: library/pem.c
1143 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001144 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001145 * This module enables the following ciphersuites (if other requisites are
1146 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001147 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1148 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001149 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001150 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001151 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1152 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1153 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1154 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1155 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001156 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001157 *
Paul Bakkercff68422013-09-15 20:43:33 +02001158 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001159 */
Paul Bakker40e46942009-01-03 21:51:57 +00001160#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001161
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001162/**
1163 * \def POLARSSL_DHM_C
1164 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001165 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001166 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001167 * Module: library/dhm.c
1168 * Caller: library/ssl_cli.c
1169 * library/ssl_srv.c
1170 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001171 * This module is used by the following key exchanges:
1172 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001173 */
Paul Bakker40e46942009-01-03 21:51:57 +00001174#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001175
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001176/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001177 * \def POLARSSL_ECDH_C
1178 *
1179 * Enable the elliptic curve Diffie-Hellman library.
1180 *
1181 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001182 * Caller: library/ssl_cli.c
1183 * library/ssl_srv.c
1184 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001185 * This module is used by the following key exchanges:
1186 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001187 *
1188 * Requires: POLARSSL_ECP_C
1189 */
1190#define POLARSSL_ECDH_C
1191
1192/**
1193 * \def POLARSSL_ECDSA_C
1194 *
1195 * Enable the elliptic curve DSA library.
1196 *
1197 * Module: library/ecdsa.c
1198 * Caller:
1199 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001200 * This module is used by the following key exchanges:
1201 * ECDHE-ECDSA
1202 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001203 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001204 */
1205#define POLARSSL_ECDSA_C
1206
1207/**
1208 * \def POLARSSL_ECP_C
1209 *
1210 * Enable the elliptic curve over GF(p) library.
1211 *
1212 * Module: library/ecp.c
1213 * Caller: library/ecdh.c
1214 * library/ecdsa.c
1215 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001216 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001217 */
1218#define POLARSSL_ECP_C
1219
1220/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001221 * \def POLARSSL_ENTROPY_C
1222 *
1223 * Enable the platform-specific entropy code.
1224 *
1225 * Module: library/entropy.c
1226 * Caller:
1227 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001228 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001229 *
1230 * This module provides a generic entropy pool
1231 */
1232#define POLARSSL_ENTROPY_C
1233
1234/**
Paul Bakker9d781402011-05-09 16:17:09 +00001235 * \def POLARSSL_ERROR_C
1236 *
1237 * Enable error code to error string conversion.
1238 *
1239 * Module: library/error.c
1240 * Caller:
1241 *
1242 * This module enables err_strerror().
1243 */
1244#define POLARSSL_ERROR_C
1245
1246/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001247 * \def POLARSSL_GCM_C
1248 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001249 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001250 *
1251 * Module: library/gcm.c
1252 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001253 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001254 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001255 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1256 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001257 */
1258#define POLARSSL_GCM_C
1259
1260/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001261 * \def POLARSSL_HAVEGE_C
1262 *
1263 * Enable the HAVEGE random generator.
1264 *
Paul Bakker2a844242013-06-24 13:01:53 +02001265 * Warning: the HAVEGE random generator is not suitable for virtualized
1266 * environments
1267 *
1268 * Warning: the HAVEGE random generator is dependent on timing and specific
1269 * processor traits. It is therefore not advised to use HAVEGE as
1270 * your applications primary random generator or primary entropy pool
1271 * input. As a secondary input to your entropy pool, it IS able add
1272 * the (limited) extra entropy it provides.
1273 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001274 * Module: library/havege.c
1275 * Caller:
1276 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001277 * Requires: POLARSSL_TIMING_C
1278 *
Paul Bakker2a844242013-06-24 13:01:53 +02001279 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001280 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001281//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001282
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001283/**
1284 * \def POLARSSL_MD_C
1285 *
1286 * Enable the generic message digest layer.
1287 *
Paul Bakker17373852011-01-06 14:20:01 +00001288 * Module: library/md.c
1289 * Caller:
1290 *
1291 * Uncomment to enable generic message digest wrappers.
1292 */
1293#define POLARSSL_MD_C
1294
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001295/**
1296 * \def POLARSSL_MD2_C
1297 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001298 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001299 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001300 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001301 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001302 *
1303 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001304 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001305//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001306
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001307/**
1308 * \def POLARSSL_MD4_C
1309 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001310 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001311 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001312 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001313 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001314 *
1315 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001316 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001317//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001318
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001319/**
1320 * \def POLARSSL_MD5_C
1321 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001322 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001323 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001324 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001325 * Caller: library/md.c
1326 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001327 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001328 *
1329 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001330 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001331 */
Paul Bakker40e46942009-01-03 21:51:57 +00001332#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001333
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001334/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001335 * \def POLARSSL_MEMORY_C
1336 *
1337 * Enable the memory allocation layer.
1338 * By default PolarSSL uses the system-provided malloc() and free().
1339 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1340 * are defined and unmodified)
1341 *
1342 * This allows different allocators (self-implemented or provided)
1343 *
1344 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001345 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001346//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001347
1348/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001349 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1350 *
1351 * Enable the buffer allocator implementation that makes use of a (stack)
1352 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1353 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001354 *
1355 * Module: library/memory_buffer_alloc.c
1356 *
1357 * Requires: POLARSSL_MEMORY_C
1358 *
1359 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001360 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001361//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001362
1363/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001364 * \def POLARSSL_NET_C
1365 *
1366 * Enable the TCP/IP networking routines.
1367 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001368 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001369 *
1370 * This module provides TCP/IP networking routines.
1371 */
Paul Bakker40e46942009-01-03 21:51:57 +00001372#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001373
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001374/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001375 * \def POLARSSL_OID_C
1376 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001377 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001378 *
1379 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001380 * Caller: library/asn1write.c
1381 * library/pkcs5.c
1382 * library/pkparse.c
1383 * library/pkwrite.c
1384 * library/rsa.c
1385 * library/x509.c
1386 * library/x509_create.c
1387 * library/x509_crl.c
1388 * library/x509_crt.c
1389 * library/x509_csr.c
1390 * library/x509write_crt.c
1391 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001392 *
1393 * This modules translates between OIDs and internal values.
1394 */
1395#define POLARSSL_OID_C
1396
1397/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001398 * \def POLARSSL_PADLOCK_C
1399 *
1400 * Enable VIA Padlock support on x86.
1401 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001402 * Module: library/padlock.c
1403 * Caller: library/aes.c
1404 *
1405 * This modules adds support for the VIA PadLock on x86.
1406 */
Paul Bakker40e46942009-01-03 21:51:57 +00001407#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001408
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001409/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001410 * \def POLARSSL_PBKDF2_C
1411 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001412 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001413 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001414 *
1415 * Module: library/pbkdf2.c
1416 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001417 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001418 *
1419 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001420 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001421#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001422
1423/**
Paul Bakkercff68422013-09-15 20:43:33 +02001424 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001425 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001426 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001427 *
1428 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001429 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001430 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001431 * library/x509_crl.c
1432 * library/x509_crt.c
1433 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001434 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001435 * Requires: POLARSSL_BASE64_C
1436 *
Paul Bakkercff68422013-09-15 20:43:33 +02001437 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001438 */
Paul Bakkercff68422013-09-15 20:43:33 +02001439#define POLARSSL_PEM_PARSE_C
1440
1441/**
1442 * \def POLARSSL_PEM_WRITE_C
1443 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001444 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001445 *
1446 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001447 * Caller: library/pkwrite.c
1448 * library/x509write_crt.c
1449 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001450 *
1451 * Requires: POLARSSL_BASE64_C
1452 *
1453 * This modules adds support for encoding / writing PEM files.
1454 */
1455#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001456
1457/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001458 * \def POLARSSL_PK_C
1459 *
1460 * Enable the generic public (asymetric) key layer.
1461 *
1462 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001463 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001464 * library/ssl_cli.c
1465 * library/ssl_srv.c
1466 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001467 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1468 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001469 * Uncomment to enable generic public key wrappers.
1470 */
1471#define POLARSSL_PK_C
1472
1473/**
Paul Bakker4606c732013-09-15 17:04:23 +02001474 * \def POLARSSL_PK_PARSE_C
1475 *
1476 * Enable the generic public (asymetric) key parser.
1477 *
1478 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001479 * Caller: library/x509_crt.c
1480 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001481 *
1482 * Requires: POLARSSL_PK_C
1483 *
1484 * Uncomment to enable generic public key parse functions.
1485 */
1486#define POLARSSL_PK_PARSE_C
1487
1488/**
1489 * \def POLARSSL_PK_WRITE_C
1490 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001491 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001492 *
1493 * Module: library/pkwrite.c
1494 * Caller: library/x509write.c
1495 *
1496 * Requires: POLARSSL_PK_C
1497 *
1498 * Uncomment to enable generic public key write functions.
1499 */
1500#define POLARSSL_PK_WRITE_C
1501
1502/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001503 * \def POLARSSL_PKCS5_C
1504 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001505 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001506 *
1507 * Module: library/pkcs5.c
1508 *
1509 * Requires: POLARSSL_MD_C
1510 *
1511 * This module adds support for the PKCS#5 functions.
1512 */
1513#define POLARSSL_PKCS5_C
1514
1515/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001516 * \def POLARSSL_PKCS11_C
1517 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001518 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001519 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001520 * Module: library/pkcs11.c
1521 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001522 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001523 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001524 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001525 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001526 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001527 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001528//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001529
1530/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001531 * \def POLARSSL_PKCS12_C
1532 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001533 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001534 * Adds algorithms for parsing PKCS#8 encrypted private keys
1535 *
1536 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001537 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001538 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001539 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1540 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001541 *
1542 * This module enables PKCS#12 functions.
1543 */
1544#define POLARSSL_PKCS12_C
1545
1546/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001547 * \def POLARSSL_RSA_C
1548 *
1549 * Enable the RSA public-key cryptosystem.
1550 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001551 * Module: library/rsa.c
1552 * Caller: library/ssl_cli.c
1553 * library/ssl_srv.c
1554 * library/ssl_tls.c
1555 * library/x509.c
1556 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001557 * This module is used by the following key exchanges:
1558 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001559 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001560 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001561 */
Paul Bakker40e46942009-01-03 21:51:57 +00001562#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001563
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001564/**
1565 * \def POLARSSL_SHA1_C
1566 *
1567 * Enable the SHA1 cryptographic hash algorithm.
1568 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001569 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001570 * Caller: library/md.c
1571 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001572 * library/ssl_srv.c
1573 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001574 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001575 *
1576 * This module is required for SSL/TLS and SHA1-signed certificates.
1577 */
Paul Bakker40e46942009-01-03 21:51:57 +00001578#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001579
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001580/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001581 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001582 *
1583 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001584 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001585 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001586 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001587 * Caller: library/entropy.c
1588 * library/md.c
1589 * library/ssl_cli.c
1590 * library/ssl_srv.c
1591 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001592 *
1593 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001594 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001595 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001596#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001597
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001598/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001599 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001600 *
1601 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001602 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001603 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001604 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001605 * Caller: library/entropy.c
1606 * library/md.c
1607 * library/ssl_cli.c
1608 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001609 *
1610 * This module adds support for SHA-384 and SHA-512.
1611 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001612#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001613
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001614/**
Paul Bakker0a597072012-09-25 21:55:46 +00001615 * \def POLARSSL_SSL_CACHE_C
1616 *
1617 * Enable simple SSL cache implementation.
1618 *
1619 * Module: library/ssl_cache.c
1620 * Caller:
1621 *
1622 * Requires: POLARSSL_SSL_CACHE_C
1623 */
1624#define POLARSSL_SSL_CACHE_C
1625
1626/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001627 * \def POLARSSL_SSL_CLI_C
1628 *
1629 * Enable the SSL/TLS client code.
1630 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001631 * Module: library/ssl_cli.c
1632 * Caller:
1633 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001634 * Requires: POLARSSL_SSL_TLS_C
1635 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001636 * This module is required for SSL/TLS client support.
1637 */
Paul Bakker40e46942009-01-03 21:51:57 +00001638#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001639
Paul Bakker9a736322012-11-14 12:39:52 +00001640/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001641 * \def POLARSSL_SSL_SRV_C
1642 *
1643 * Enable the SSL/TLS server code.
1644 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001645 * Module: library/ssl_srv.c
1646 * Caller:
1647 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001648 * Requires: POLARSSL_SSL_TLS_C
1649 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001650 * This module is required for SSL/TLS server support.
1651 */
Paul Bakker40e46942009-01-03 21:51:57 +00001652#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001653
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001654/**
1655 * \def POLARSSL_SSL_TLS_C
1656 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001657 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001658 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001659 * Module: library/ssl_tls.c
1660 * Caller: library/ssl_cli.c
1661 * library/ssl_srv.c
1662 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001663 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001664 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001665 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001666 * This module is required for SSL/TLS.
1667 */
Paul Bakker40e46942009-01-03 21:51:57 +00001668#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001669
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001670/**
Paul Bakker2466d932013-09-28 14:40:38 +02001671 * \def POLARSSL_THREADING_C
1672 *
1673 * Enable the threading abstraction layer.
1674 * By default PolarSSL assumes it is used in a non-threaded environment or that
1675 * contexts are not shared between threads. If you do intend to use contexts
1676 * between threads, you will need to enable this layer to prevent race
1677 * conditions.
1678 *
1679 * Module: library/threading.c
1680 *
1681 * This allows different threading implementations (self-implemented or
1682 * provided).
1683 *
1684 * You will have to enable either POLARSSL_THREADING_ALT,
1685 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1686 *
1687 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001688 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001689//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001690
1691/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001692 * \def POLARSSL_TIMING_C
1693 *
1694 * Enable the portable timing interface.
1695 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001696 * Module: library/timing.c
1697 * Caller: library/havege.c
1698 *
1699 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001700 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001701#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001702
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001703/**
1704 * \def POLARSSL_VERSION_C
1705 *
1706 * Enable run-time version information.
1707 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001708 * Module: library/version.c
1709 *
1710 * This module provides run-time version information.
1711 */
1712#define POLARSSL_VERSION_C
1713
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001714/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001715 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001716 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001717 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001718 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001719 * Module: library/x509.c
1720 * Caller: library/x509_crl.c
1721 * library/x509_crt.c
1722 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001723 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001724 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001725 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001726 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001727 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001728 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001729#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001730
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001731/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001732 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001733 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001734 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001735 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001736 * Module: library/x509_crt.c
1737 * Caller: library/ssl_cli.c
1738 * library/ssl_srv.c
1739 * library/ssl_tls.c
1740 *
1741 * Requires: POLARSSL_X509_USE_C
1742 *
1743 * This module is required for X.509 certificate parsing.
1744 */
1745#define POLARSSL_X509_CRT_PARSE_C
1746
1747/**
1748 * \def POLARSSL_X509_CRL_PARSE_C
1749 *
1750 * Enable X.509 CRL parsing.
1751 *
1752 * Module: library/x509_crl.c
1753 * Caller: library/x509_crt.c
1754 *
1755 * Requires: POLARSSL_X509_USE_C
1756 *
1757 * This module is required for X.509 CRL parsing.
1758 */
1759#define POLARSSL_X509_CRL_PARSE_C
1760
1761/**
1762 * \def POLARSSL_X509_CSR_PARSE_C
1763 *
1764 * Enable X.509 Certificate Signing Request (CSR) parsing.
1765 *
1766 * Module: library/x509_csr.c
1767 * Caller: library/x509_crt_write.c
1768 *
1769 * Requires: POLARSSL_X509_USE_C
1770 *
1771 * This module is used for reading X.509 certificate request.
1772 */
1773#define POLARSSL_X509_CSR_PARSE_C
1774
1775/**
1776 * \def POLARSSL_X509_CREATE_C
1777 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001778 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001779 *
1780 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001781 *
Paul Bakker4606c732013-09-15 17:04:23 +02001782 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001783 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001784 * This module is the basis for creating X.509 certificates and CSRs.
1785 */
1786#define POLARSSL_X509_CREATE_C
1787
1788/**
1789 * \def POLARSSL_X509_CRT_WRITE_C
1790 *
1791 * Enable creating X.509 certificates.
1792 *
1793 * Module: library/x509_crt_write.c
1794 *
1795 * Requires: POLARSSL_CREATE_C
1796 *
1797 * This module is required for X.509 certificate creation.
1798 */
1799#define POLARSSL_X509_CRT_WRITE_C
1800
1801/**
1802 * \def POLARSSL_X509_CSR_WRITE_C
1803 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001804 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001805 *
1806 * Module: library/x509_csr_write.c
1807 *
1808 * Requires: POLARSSL_CREATE_C
1809 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001810 * This module is required for X.509 certificate request writing.
1811 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001812#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001813
1814/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001815 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001816 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001817 * Enable the XTEA block cipher.
1818 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001819 * Module: library/xtea.c
1820 * Caller:
1821 */
1822#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001823
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001824/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001825
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001826/**
1827 * \name SECTION: Module configuration options
1828 *
1829 * This section allows for the setting of module specific sizes and
1830 * configuration options. The default values are already present in the
1831 * relevant header files and should suffice for the regular use cases.
1832 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1833 * only if you have a good reason and know the consequences.
1834 *
1835 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1836 * header file take precedence.
1837 *
1838 * Please check the respective header file for documentation on these
1839 * parameters (to prevent duplicate documentation).
1840 *
1841 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1842 * \{
1843 */
1844//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1845
1846#if defined(POLARSSL_CONFIG_OPTIONS)
1847
1848// MPI / BIGNUM options
1849//
1850#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1851#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1852
1853// CTR_DRBG options
1854//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001855#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 +02001856#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1857#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1858#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1859#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1860
Paul Bakkere1b665e2013-12-11 16:02:58 +01001861// ECP options
1862//
1863#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
1864#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
1865
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001866// Entropy options
1867//
1868#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1869#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1870
Paul Bakker6e339b52013-07-03 13:37:05 +02001871// Memory options
1872#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1873#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1874#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1875
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001876// SSL Cache options
1877//
1878#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1879#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1880
1881// SSL options
1882//
1883#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001884#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001885
1886#endif /* POLARSSL_CONFIG_OPTIONS */
1887
1888/* \} name */
1889
Paul Bakker7ad00f92013-04-18 23:05:25 +02001890/*
1891 * Sanity checks on defines and dependencies
1892 */
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001893#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1894#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001895#endif
1896
1897#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1898#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1899#endif
1900
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001901#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1902#error "POLARSSL_DHM_C defined, but not all prerequisites"
1903#endif
1904
Paul Bakker7ad00f92013-04-18 23:05:25 +02001905#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1906#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1907#endif
1908
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001909#if defined(POLARSSL_ECDSA_C) && \
1910 ( !defined(POLARSSL_ECP_C) || \
1911 !defined(POLARSSL_ASN1_PARSE_C) || \
1912 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001913#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1914#endif
1915
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001916#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1917 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1918 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1919 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1920 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1921 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1922 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1923 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1924 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001925#error "POLARSSL_ECP_C defined, but not all prerequisites"
1926#endif
1927
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001928#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1929 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001930#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1931#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001932#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1933 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1934#error "CTR_DRBG_ENTROPY_LEN value too high"
1935#endif
1936#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1937 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1938#error "CTR_DRBG_ENTROPY_LEN value too high"
1939#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001940
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001941#if defined(POLARSSL_GCM_C) && ( \
1942 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001943#error "POLARSSL_GCM_C defined, but not all prerequisites"
1944#endif
1945
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001946#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1947#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1948#endif
1949
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001950#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
1951 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1952#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
1953#endif
1954
1955#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
1956 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1957#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
1958#endif
1959
Paul Bakkere07f41d2013-04-19 09:08:57 +02001960#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1961#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1962#endif
1963
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001964#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1965 !defined(POLARSSL_ECDH_C)
1966#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1967#endif
1968
Paul Bakkere07f41d2013-04-19 09:08:57 +02001969#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1970 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001971 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001972#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1973#endif
1974
1975#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1976 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001977 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001978#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1979#endif
1980
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001981#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1982 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001983 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001984#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1985#endif
1986
Paul Bakkere07f41d2013-04-19 09:08:57 +02001987#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001988 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001989 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001990#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1991#endif
1992
1993#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001994 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001995 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001996#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1997#endif
1998
Paul Bakker6e339b52013-07-03 13:37:05 +02001999#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
2000#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2001#endif
2002
Paul Bakker7ad00f92013-04-18 23:05:25 +02002003#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2004#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2005#endif
2006
Paul Bakkercff68422013-09-15 20:43:33 +02002007#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2008#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2009#endif
2010
2011#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2012#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002013#endif
2014
Paul Bakker4606c732013-09-15 17:04:23 +02002015#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2016#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2017#endif
2018
2019#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2020#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2021#endif
2022
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002023#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002024#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2025#endif
2026
2027#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2028 !defined(POLARSSL_OID_C) )
2029#error "POLARSSL_RSA_C defined, but not all prerequisites"
2030#endif
2031
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002032#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2033 !defined(POLARSSL_SHA1_C) )
2034#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2035#endif
2036
2037#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2038 !defined(POLARSSL_SHA1_C) )
2039#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2040#endif
2041
2042#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2043 !defined(POLARSSL_SHA1_C) )
2044#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2045#endif
2046
2047#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2048 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2049#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2050#endif
2051
Paul Bakker7ad00f92013-04-18 23:05:25 +02002052#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2053#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2054#endif
2055
Paul Bakker577e0062013-08-28 11:57:20 +02002056#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002057 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002058#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2059#endif
2060
2061#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2062#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2063#endif
2064
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002065#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2066 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2067 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2068#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2069#endif
2070
2071#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2072 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2073#error "Illegal protocol selection"
2074#endif
2075
2076#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2077 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2078#error "Illegal protocol selection"
2079#endif
2080
2081#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2082 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2083 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2084#error "Illegal protocol selection"
2085#endif
2086
Paul Bakker59da0a42013-08-19 13:27:17 +02002087#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002088 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2089 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002090#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2091#endif
2092
Paul Bakker2466d932013-09-28 14:40:38 +02002093#if defined(POLARSSL_THREADING_DUMMY)
2094#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2095#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
2096#endif
2097#define POLARSSL_THREADING_IMPL
2098#endif
2099
2100#if defined(POLARSSL_THREADING_PTHREAD)
2101#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2102#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2103#endif
2104#define POLARSSL_THREADING_IMPL
2105#endif
2106
2107#if defined(POLARSSL_THREADING_ALT)
2108#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2109#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2110#endif
2111#define POLARSSL_THREADING_IMPL
2112#endif
2113
2114#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2115#error "POLARSSL_THREADING_C defined, single threading implementation required"
2116#endif
2117#undef POLARSSL_THREADING_IMPL
2118
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002119#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002120 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002121 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002122#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002123#endif
2124
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002125#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2126 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2127 !defined(POLARSSL_PK_WRITE_C) )
2128#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2129#endif
2130
2131#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2132#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2133#endif
2134
2135#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2136#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2137#endif
2138
2139#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2140#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2141#endif
2142
2143#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2144#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2145#endif
2146
2147#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2148#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002149#endif
2150
Paul Bakker5121ce52009-01-03 21:22:43 +00002151#endif /* config.h */