blob: f23f540f0f0fd543c5907b1c7ac3f0a18f5f87f7 [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 Bakker40e46942009-01-03 21:51:57 +000051#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000052 */
53
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 Bakker40e46942009-01-03 21:51:57 +000060#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000061 */
62
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 Bakker40e46942009-01-03 21:51:57 +000093#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000094 */
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
129#define POLARSSL_AES_ALT
130#define POLARSSL_ARC4_ALT
131#define POLARSSL_BLOWFISH_ALT
132#define POLARSSL_CAMELLIA_ALT
133#define POLARSSL_DES_ALT
134#define POLARSSL_XTEA_ALT
135#define POLARSSL_MD2_ALT
136#define POLARSSL_MD4_ALT
137#define POLARSSL_MD5_ALT
138#define POLARSSL_SHA1_ALT
Paul Bakker9e36f042013-06-30 14:34:05 +0200139#define POLARSSL_SHA256_ALT
140#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200141 */
142
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 *
150#define POLARSSL_AES_ROM_TABLES
151 */
152
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:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000183 * TLS_RSA_WITH_NULL_MD5
184 * TLS_RSA_WITH_NULL_SHA
185 * TLS_RSA_WITH_NULL_SHA256
Paul Bakker41c83d32013-03-20 14:39:14 +0100186 * TLS_ECDHE_RSA_WITH_NULL_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200187 * TLS_PSK_WITH_NULL
188 * TLS_PSK_WITH_NULL256
189 * TLS_PSK_WITH_NULL384
190 * TLS_DHE_PSK_WITH_NULL
191 * TLS_DHE_PSK_WITH_NULL256
192 * TLS_DHE_PSK_WITH_NULL384
193 * TLS_RSA_PSK_WITH_NULL
194 * TLS_RSA_PSK_WITH_NULL256
195 * TLS_RSA_PSK_WITH_NULL384
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200196 * TLS_ECDHE_PSK_WITH_NULL_SHA
197 * TLS_ECDHE_PSK_WITH_NULL_SHA256
198 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Paul Bakkerfab5c822012-02-06 16:45:10 +0000199 *
200 * Uncomment this macro to enable the NULL cipher and ciphersuites
201#define POLARSSL_CIPHER_NULL_CIPHER
202 */
203
204/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200205 * \def POLARSSL_CIPHER_PADDING_XXX
206 *
207 * Uncomment or comment macros to add support for specific padding modes
208 * in the cipher layer with cipher modes that support padding (e.g. CBC)
209 *
210 * If you disable all padding modes, only full blocks can be used with CBC.
211 *
212 * Enable padding modes in the cipher layer.
213 */
214#define POLARSSL_CIPHER_PADDING_PKCS7
215#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
216#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
217#define POLARSSL_CIPHER_PADDING_ZEROS
218
219/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000220 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
221 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200222 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000223 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000224 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000225 *
226 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000227 * TLS_RSA_WITH_DES_CBC_SHA
228 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000229 *
230 * Uncomment this macro to enable weak ciphersuites
231#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
232 */
233
234/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200235 * \def POLARSSL_ECP_XXXX_ENABLED
236 *
237 * Enables specific curves within the Elliptic Curve module.
238 * By default all supported curves are enables.
239 *
240 * Comment macros to disable the curve and functions for it
241 */
242#define POLARSSL_ECP_DP_SECP192R1_ENABLED
243#define POLARSSL_ECP_DP_SECP224R1_ENABLED
244#define POLARSSL_ECP_DP_SECP256R1_ENABLED
245#define POLARSSL_ECP_DP_SECP384R1_ENABLED
246#define POLARSSL_ECP_DP_SECP521R1_ENABLED
247
248/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200249 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
250 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200251 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200252 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200253 * This enables the following ciphersuites (if other requisites are
254 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200255 * TLS_PSK_WITH_RC4_128_SHA
256 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
257 * TLS_PSK_WITH_AES_128_CBC_SHA
258 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200259 * TLS_PSK_WITH_AES_128_CBC_SHA256
260 * TLS_PSK_WITH_AES_256_CBC_SHA384
261 * TLS_PSK_WITH_AES_128_GCM_SHA256
262 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200263 */
264#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
265
266/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200267 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
268 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200269 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200270 *
271 * Requires: POLARSSL_DHM_C
272 *
273 * This enables the following ciphersuites (if other requisites are
274 * enabled as well):
275 * TLS_DHE_PSK_WITH_RC4_128_SHA
276 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
277 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
278 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200279 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
280 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
281 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
282 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200283 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200284#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200285
286/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200287 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
288 *
289 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
290 *
291 * Requires: POLARSSL_ECDH_C
292 *
293 * This enables the following ciphersuites (if other requisites are
294 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200295 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
296 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
297 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
298 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
299 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
300 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
301 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
302 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200303 */
304#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
305
306/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200307 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
308 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200309 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Paul Bakker45bda902013-04-19 22:28:21 +0200310 * (NOT YET IMPLEMENTED)
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200311 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200312 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200313 *
314 * This enables the following ciphersuites (if other requisites are
315 * enabled as well):
316 * TLS_RSA_PSK_WITH_RC4_128_SHA
317 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
318 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
319 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200320 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
321 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
322 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
323 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200324#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
325 */
326
327/**
328 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
329 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200330 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200331 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200332 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200333 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200334 *
335 * This enables the following ciphersuites (if other requisites are
336 * enabled as well):
337 * TLS_RSA_WITH_AES_128_CBC_SHA
338 * TLS_RSA_WITH_AES_256_CBC_SHA
339 * TLS_RSA_WITH_AES_128_CBC_SHA256
340 * TLS_RSA_WITH_AES_256_CBC_SHA256
341 * TLS_RSA_WITH_AES_128_GCM_SHA256
342 * TLS_RSA_WITH_AES_256_GCM_SHA384
343 * TLS_RSA_WITH_RC4_128_MD5
344 * TLS_RSA_WITH_RC4_128_SHA
345 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
346 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
347 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
348 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
349 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
350 */
351#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
352
353/**
354 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
355 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200356 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200357 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200358 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200359 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200360 *
361 * This enables the following ciphersuites (if other requisites are
362 * enabled as well):
363 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
364 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
365 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
366 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
367 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
368 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
369 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
370 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
371 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
372 */
373#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
374
375/**
376 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
377 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200378 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200379 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200380 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200381 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200382 *
383 * This enables the following ciphersuites (if other requisites are
384 * enabled as well):
385 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
386 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
387 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
388 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
389 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
390 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
391 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
392 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
393 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
394 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
395 */
396#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
397
398/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200399 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
400 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200401 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200402 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200403 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200404 *
405 * This enables the following ciphersuites (if other requisites are
406 * enabled as well):
407 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
408 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
409 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
410 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
411 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
412 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
413 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
414 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
415 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
416 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
417 */
418#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
419
420/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200421 * \def POLARSSL_ERROR_STRERROR_BC
422 *
423 * Make available the backward compatible error_strerror() next to the
424 * current polarssl_strerror().
425 *
426 * Disable if you run into name conflicts and want to really remove the
427 * error_strerror()
428 */
429#define POLARSSL_ERROR_STRERROR_BC
430
431/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100432 * \def POLARSSL_ERROR_STRERROR_DUMMY
433 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200434 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100435 * third party libraries easier.
436 *
437 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200438 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100439 */
440#define POLARSSL_ERROR_STRERROR_DUMMY
441
442/**
Paul Bakker15566e42011-04-24 21:19:15 +0000443 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000444 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200445 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200446 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200447 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000448 */
Paul Bakker15566e42011-04-24 21:19:15 +0000449#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000450
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000451/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000452 * \def POLARSSL_FS_IO
453 *
454 * Enable functions that use the filesystem.
455 */
456#define POLARSSL_FS_IO
457
458/**
Paul Bakker43655f42011-12-15 20:11:16 +0000459 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
460 *
461 * Do not add default entropy sources. These are the platform specific,
462 * hardclock and HAVEGE based poll functions.
463 *
464 * This is useful to have more control over the added entropy sources in an
465 * application.
466 *
467 * Uncomment this macro to prevent loading of default entropy functions.
468#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
469 */
470
471/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000472 * \def POLARSSL_NO_PLATFORM_ENTROPY
473 *
474 * Do not use built-in platform entropy functions.
475 * This is useful if your platform does not support
476 * standards like the /dev/urandom or Windows CryptoAPI.
477 *
478 * Uncomment this macro to disable the built-in platform entropy functions.
479#define POLARSSL_NO_PLATFORM_ENTROPY
480 */
481
482/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200483 * \def POLARSSL_MEMORY_DEBUG
484 *
485 * Enable debugging of buffer allocator memory issues. Automatically prints
486 * (to stderr) all (fatal) messages on memory allocation issues. Enables
487 * function for 'debug output' of allocated memory.
488 *
489 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
490 * fprintf()
491 *
492 * Uncomment this macro to let the buffer allocator print out error messages.
493#define POLARSSL_MEMORY_DEBUG
494*/
495
496/**
497 * \def POLARSSL_MEMORY_BACKTRACE
498 *
499 * Include backtrace information with each allocated block.
500 *
501 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
502 * GLIBC-compatible backtrace() an backtrace_symbols() support
503 *
504 * Uncomment this macro to include backtrace information
505#define POLARSSL_MEMORY_BACKTRACE
506 */
507
508/**
Paul Bakker48377d92013-08-30 12:06:24 +0200509 * \def POLARSSL_PKCS1_V15
510 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200511 * Enable support for PKCS#1 v1.5 encoding.
512 *
Paul Bakker48377d92013-08-30 12:06:24 +0200513 * Requires: POLARSSL_RSA_C
514 *
Paul Bakker48377d92013-08-30 12:06:24 +0200515 * This enables support for PKCS#1 v1.5 operations.
516 */
517#define POLARSSL_PKCS1_V15
518
519/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000520 * \def POLARSSL_PKCS1_V21
521 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200522 * Enable support for PKCS#1 v2.1 encoding.
523 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000524 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
525 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000526 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
527 */
528#define POLARSSL_PKCS1_V21
529
530/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000531 * \def POLARSSL_RSA_NO_CRT
532 *
533 * Do not use the Chinese Remainder Theorem for the RSA private operation.
534 *
535 * Uncomment this macro to disable the use of CRT in RSA.
536 *
537#define POLARSSL_RSA_NO_CRT
538 */
Paul Bakker15566e42011-04-24 21:19:15 +0000539
540/**
541 * \def POLARSSL_SELF_TEST
542 *
543 * Enable the checkup functions (*_self_test).
544 */
545#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000546
547/**
Paul Bakker40865c82013-01-31 17:13:13 +0100548 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
549 *
550 * Enable sending of alert messages in case of encountered errors as per RFC.
551 * If you choose not to send the alert messages, PolarSSL can still communicate
552 * with other servers, only debugging of failures is harder.
553 *
554 * The advantage of not sending alert messages, is that no information is given
555 * about reasons for failures thus preventing adversaries of gaining intel.
556 *
557 * Enable sending of all alert messages
558 */
559#define POLARSSL_SSL_ALERT_MESSAGES
560
561/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100562 * \def POLARSSL_SSL_DEBUG_ALL
563 *
564 * Enable the debug messages in SSL module for all issues.
565 * Debug messages have been disabled in some places to prevent timing
566 * attacks due to (unbalanced) debugging function calls.
567 *
568 * If you need all error reporting you should enable this during debugging,
569 * but remove this for production servers that should log as well.
570 *
571 * Uncomment this macro to report all debug messages on errors introducing
572 * a timing side-channel.
573 *
574#define POLARSSL_SSL_DEBUG_ALL
575 */
576
577/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000578 * \def POLARSSL_SSL_HW_RECORD_ACCEL
579 *
580 * Enable hooking functions in SSL module for hardware acceleration of
581 * individual records.
582 *
583 * Uncomment this macro to enable hooking functions.
584#define POLARSSL_SSL_HW_RECORD_ACCEL
585 */
586
587/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100588 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
589 *
590 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200591 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100592 *
593 * Comment this macro to disable support for SSLv2 Client Hello messages.
594 */
595#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
596
597/**
Paul Bakker05decb22013-08-15 13:33:48 +0200598 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
599 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200600 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200601 *
602 * Comment this macro to disable support for the max_fragment_length extension
603 */
604#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
605
606/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200607 * \def POLARSSL_SSL_PROTO_SSL3
608 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200609 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200610 *
611 * Requires: POLARSSL_MD5_C
612 * POLARSSL_SHA1_C
613 *
614 * Comment this macro to disable support for SSL 3.0
615 */
616#define POLARSSL_SSL_PROTO_SSL3
617
618/**
619 * \def POLARSSL_SSL_PROTO_TLS1
620 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200621 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200622 *
623 * Requires: POLARSSL_MD5_C
624 * POLARSSL_SHA1_C
625 *
626 * Comment this macro to disable support for TLS 1.0
627 */
628#define POLARSSL_SSL_PROTO_TLS1
629
630/**
631 * \def POLARSSL_SSL_PROTO_TLS1_1
632 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200633 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200634 *
635 * Requires: POLARSSL_MD5_C
636 * POLARSSL_SHA1_C
637 *
638 * Comment this macro to disable support for TLS 1.1
639 */
640#define POLARSSL_SSL_PROTO_TLS1_1
641
642/**
643 * \def POLARSSL_SSL_PROTO_TLS1_2
644 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200645 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200646 *
647 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
648 * (Depends on ciphersuites)
649 *
650 * Comment this macro to disable support for TLS 1.2
651 */
652#define POLARSSL_SSL_PROTO_TLS1_2
653
654/**
Paul Bakkera503a632013-08-14 13:48:06 +0200655 * \def POLARSSL_SSL_SESSION_TICKETS
656 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200657 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200658 *
659 * Requires: POLARSSL_AES_C
660 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200661 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200662 *
663 * Comment this macro to disable support for SSL session tickets
664 */
665#define POLARSSL_SSL_SESSION_TICKETS
666
667/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200668 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
669 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200670 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200671 *
672 * Comment this macro to disable support for server name indication in SSL
673 */
674#define POLARSSL_SSL_SERVER_NAME_INDICATION
675
676/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200677 * \def POLARSSL_SSL_TRUNCATED_HMAC
678 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200679 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200680 *
681 * Comment this macro to disable support for truncated HMAC in SSL
682 */
683#define POLARSSL_SSL_TRUNCATED_HMAC
684
685/**
Paul Bakker2466d932013-09-28 14:40:38 +0200686 * \def POLARSSL_THREADING_ALT
687 *
688 * Provide your own alternate threading implementation.
689 *
690 * Requires: POLARSSL_THREADING_C
691 *
692 * Uncomment this to allow your own alternate threading implementation.
693#define POLARSSL_THREADING_ALT
694 */
695
696/**
697 * \def POLARSSL_THREADING_DUMMY
698 *
699 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200700 * Warning: If you use this, all claims of thread-safety in the documentation
701 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200702 *
703 * Requires: POLARSSL_THREADING_C
704 *
705 * Uncomment this to enable code to compile like with threading enabled
706#define POLARSSL_THREADING_DUMMY
707 */
708
709/**
710 * \def POLARSSL_THREADING_PTHREAD
711 *
712 * Enable the pthread wrapper layer for the threading layer.
713 *
714 * Requires: POLARSSL_THREADING_C
715 *
716 * Uncomment this to enable pthread mutexes.
717#define POLARSSL_THREADING_PTHREAD
718 */
719
720/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200721 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
722 *
723 * If set, the X509 parser will not break-off when parsing an X509 certificate
724 * and encountering an extension in a v1 or v2 certificate.
725 *
726 * Uncomment to prevent an error.
727 *
728#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
729 */
730
731/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000732 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
733 *
734 * If set, the X509 parser will not break-off when parsing an X509 certificate
735 * and encountering an unknown critical extension.
736 *
737 * Uncomment to prevent an error.
738 *
739#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
740 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000741
742/**
743 * \def POLARSSL_ZLIB_SUPPORT
744 *
745 * If set, the SSL/TLS module uses ZLIB to support compression and
746 * decompression of packet data.
747 *
748 * Used in: library/ssl_tls.c
749 * library/ssl_cli.c
750 * library/ssl_srv.c
751 *
752 * This feature requires zlib library and headers to be present.
753 *
754 * Uncomment to enable use of ZLIB
755#define POLARSSL_ZLIB_SUPPORT
756 */
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200757/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000758
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000759/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000760 * \name SECTION: PolarSSL modules
761 *
762 * This section enables or disables entire modules in PolarSSL
763 * \{
764 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000765
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000766/**
767 * \def POLARSSL_AES_C
768 *
769 * Enable the AES block cipher.
770 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000771 * Module: library/aes.c
772 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000773 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000774 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000775 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000776 * This module enables the following ciphersuites (if other requisites are
777 * enabled as well):
778 * TLS_RSA_WITH_AES_128_CBC_SHA
779 * TLS_RSA_WITH_AES_256_CBC_SHA
780 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
781 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
782 * TLS_RSA_WITH_AES_128_CBC_SHA256
783 * TLS_RSA_WITH_AES_256_CBC_SHA256
784 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
785 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
786 * TLS_RSA_WITH_AES_128_GCM_SHA256
787 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100788 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
789 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200790 * TLS_PSK_WITH_AES_128_CBC_SHA
791 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100792 *
Paul Bakkercff68422013-09-15 20:43:33 +0200793 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000794 */
Paul Bakker40e46942009-01-03 21:51:57 +0000795#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000796
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000797/**
798 * \def POLARSSL_ARC4_C
799 *
800 * Enable the ARCFOUR stream cipher.
801 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000802 * Module: library/arc4.c
803 * Caller: library/ssl_tls.c
804 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100805 * This module enables the following ciphersuites (if other requisites are
806 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000807 * TLS_RSA_WITH_RC4_128_MD5
808 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100809 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200810 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000811 */
Paul Bakker40e46942009-01-03 21:51:57 +0000812#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000813
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000814/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000815 * \def POLARSSL_ASN1_PARSE_C
816 *
817 * Enable the generic ASN1 parser.
818 *
819 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200820 * Caller: library/x509.c
821 * library/dhm.c
822 * library/pkcs12.c
823 * library/pkcs5.c
824 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000825 */
826#define POLARSSL_ASN1_PARSE_C
827
828/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000829 * \def POLARSSL_ASN1_WRITE_C
830 *
831 * Enable the generic ASN1 writer.
832 *
833 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200834 * Caller: library/ecdsa.c
835 * library/pkwrite.c
836 * library/x509_create.c
837 * library/x509write_crt.c
838 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000839 */
840#define POLARSSL_ASN1_WRITE_C
841
842/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000843 * \def POLARSSL_BASE64_C
844 *
845 * Enable the Base64 module.
846 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000847 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000848 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000849 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000850 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000851 */
Paul Bakker40e46942009-01-03 21:51:57 +0000852#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000853
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000854/**
855 * \def POLARSSL_BIGNUM_C
856 *
Paul Bakker9a736322012-11-14 12:39:52 +0000857 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000858 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000859 * Module: library/bignum.c
860 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200861 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000862 * library/rsa.c
863 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000864 *
865 * This module is required for RSA and DHM support.
866 */
Paul Bakker40e46942009-01-03 21:51:57 +0000867#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000868
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000869/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000870 * \def POLARSSL_BLOWFISH_C
871 *
872 * Enable the Blowfish block cipher.
873 *
874 * Module: library/blowfish.c
875 */
876#define POLARSSL_BLOWFISH_C
877
878/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000879 * \def POLARSSL_CAMELLIA_C
880 *
881 * Enable the Camellia block cipher.
882 *
Paul Bakker38119b12009-01-10 23:31:23 +0000883 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000884 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000885 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000886 * This module enables the following ciphersuites (if other requisites are
887 * enabled as well):
888 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
889 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
890 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
891 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
892 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
893 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
894 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
895 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000896 */
897#define POLARSSL_CAMELLIA_C
898
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000899/**
900 * \def POLARSSL_CERTS_C
901 *
902 * Enable the test certificates.
903 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000904 * Module: library/certs.c
905 * Caller:
906 *
907 * This module is used for testing (ssl_client/server).
908 */
Paul Bakker40e46942009-01-03 21:51:57 +0000909#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000910
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000911/**
912 * \def POLARSSL_CIPHER_C
913 *
914 * Enable the generic cipher layer.
915 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000916 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200917 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000918 *
919 * Uncomment to enable generic cipher wrappers.
920 */
921#define POLARSSL_CIPHER_C
922
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000923/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000924 * \def POLARSSL_CTR_DRBG_C
925 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200926 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000927 *
928 * Module: library/ctr_drbg.c
929 * Caller:
930 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000931 * Requires: POLARSSL_AES_C
932 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000933 * This module provides the CTR_DRBG AES-256 random number generator.
934 */
935#define POLARSSL_CTR_DRBG_C
936
937/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000938 * \def POLARSSL_DEBUG_C
939 *
940 * Enable the debug functions.
941 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000942 * Module: library/debug.c
943 * Caller: library/ssl_cli.c
944 * library/ssl_srv.c
945 * library/ssl_tls.c
946 *
947 * This module provides debugging functions.
948 */
Paul Bakker40e46942009-01-03 21:51:57 +0000949#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000950
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000951/**
952 * \def POLARSSL_DES_C
953 *
954 * Enable the DES block cipher.
955 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000956 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100957 * Caller: library/pem.c
958 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000959 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000960 * This module enables the following ciphersuites (if other requisites are
961 * enabled as well):
962 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
963 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100964 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200965 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100966 *
Paul Bakkercff68422013-09-15 20:43:33 +0200967 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000968 */
Paul Bakker40e46942009-01-03 21:51:57 +0000969#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000970
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000971/**
972 * \def POLARSSL_DHM_C
973 *
974 * Enable the Diffie-Hellman-Merkle key exchange.
975 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000976 * Module: library/dhm.c
977 * Caller: library/ssl_cli.c
978 * library/ssl_srv.c
979 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000980 * This module enables the following ciphersuites (if other requisites are
981 * enabled as well):
982 * TLS_DHE_RSA_WITH_DES_CBC_SHA
983 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
984 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
985 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
986 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
987 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
988 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
989 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
990 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
991 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
992 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
993 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000994 */
Paul Bakker40e46942009-01-03 21:51:57 +0000995#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000996
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000997/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100998 * \def POLARSSL_ECDH_C
999 *
1000 * Enable the elliptic curve Diffie-Hellman library.
1001 *
1002 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001003 * Caller: library/ssl_cli.c
1004 * library/ssl_srv.c
1005 *
1006 * This module enables the following ciphersuites (if other requisites are
1007 * enabled as well):
1008 * TLS_ECDHE_RSA_WITH_NULL_SHA
1009 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
1010 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1011 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1012 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001013 *
1014 * Requires: POLARSSL_ECP_C
1015 */
1016#define POLARSSL_ECDH_C
1017
1018/**
1019 * \def POLARSSL_ECDSA_C
1020 *
1021 * Enable the elliptic curve DSA library.
1022 *
1023 * Module: library/ecdsa.c
1024 * Caller:
1025 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001026 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001027 */
1028#define POLARSSL_ECDSA_C
1029
1030/**
1031 * \def POLARSSL_ECP_C
1032 *
1033 * Enable the elliptic curve over GF(p) library.
1034 *
1035 * Module: library/ecp.c
1036 * Caller: library/ecdh.c
1037 * library/ecdsa.c
1038 *
1039 * Requires: POLARSSL_BIGNUM_C
1040 */
1041#define POLARSSL_ECP_C
1042
1043/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001044 * \def POLARSSL_ENTROPY_C
1045 *
1046 * Enable the platform-specific entropy code.
1047 *
1048 * Module: library/entropy.c
1049 * Caller:
1050 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001051 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001052 *
1053 * This module provides a generic entropy pool
1054 */
1055#define POLARSSL_ENTROPY_C
1056
1057/**
Paul Bakker9d781402011-05-09 16:17:09 +00001058 * \def POLARSSL_ERROR_C
1059 *
1060 * Enable error code to error string conversion.
1061 *
1062 * Module: library/error.c
1063 * Caller:
1064 *
1065 * This module enables err_strerror().
1066 */
1067#define POLARSSL_ERROR_C
1068
1069/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001070 * \def POLARSSL_GCM_C
1071 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001072 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001073 *
1074 * Module: library/gcm.c
1075 *
1076 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001077 *
1078 * This module enables the following ciphersuites (if other requisites are
1079 * enabled as well):
1080 * TLS_RSA_WITH_AES_128_GCM_SHA256
1081 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001082 */
1083#define POLARSSL_GCM_C
1084
1085/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001086 * \def POLARSSL_HAVEGE_C
1087 *
1088 * Enable the HAVEGE random generator.
1089 *
Paul Bakker2a844242013-06-24 13:01:53 +02001090 * Warning: the HAVEGE random generator is not suitable for virtualized
1091 * environments
1092 *
1093 * Warning: the HAVEGE random generator is dependent on timing and specific
1094 * processor traits. It is therefore not advised to use HAVEGE as
1095 * your applications primary random generator or primary entropy pool
1096 * input. As a secondary input to your entropy pool, it IS able add
1097 * the (limited) extra entropy it provides.
1098 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001099 * Module: library/havege.c
1100 * Caller:
1101 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001102 * Requires: POLARSSL_TIMING_C
1103 *
Paul Bakker2a844242013-06-24 13:01:53 +02001104 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001105#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001106 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001107
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001108/**
1109 * \def POLARSSL_MD_C
1110 *
1111 * Enable the generic message digest layer.
1112 *
Paul Bakker17373852011-01-06 14:20:01 +00001113 * Module: library/md.c
1114 * Caller:
1115 *
1116 * Uncomment to enable generic message digest wrappers.
1117 */
1118#define POLARSSL_MD_C
1119
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001120/**
1121 * \def POLARSSL_MD2_C
1122 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001123 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001124 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001125 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001126 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001127 *
1128 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1129 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001130#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001131 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001132
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001133/**
1134 * \def POLARSSL_MD4_C
1135 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001136 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001137 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001138 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001139 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001140 *
1141 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1142 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001143#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001144 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001145
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001146/**
1147 * \def POLARSSL_MD5_C
1148 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001149 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001150 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001151 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001152 * Caller: library/md.c
1153 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001154 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001155 *
1156 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001157 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001158 */
Paul Bakker40e46942009-01-03 21:51:57 +00001159#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001160
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001161/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001162 * \def POLARSSL_MEMORY_C
1163 *
1164 * Enable the memory allocation layer.
1165 * By default PolarSSL uses the system-provided malloc() and free().
1166 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1167 * are defined and unmodified)
1168 *
1169 * This allows different allocators (self-implemented or provided)
1170 *
1171 * Enable this layer to allow use of alternative memory allocators.
1172#define POLARSSL_MEMORY_C
1173 */
1174
1175/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001176 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1177 *
1178 * Enable the buffer allocator implementation that makes use of a (stack)
1179 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1180 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001181 *
1182 * Module: library/memory_buffer_alloc.c
1183 *
1184 * Requires: POLARSSL_MEMORY_C
1185 *
1186 * Enable this module to enable the buffer memory allocator.
1187#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1188 */
1189
1190/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001191 * \def POLARSSL_NET_C
1192 *
1193 * Enable the TCP/IP networking routines.
1194 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001195 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001196 *
1197 * This module provides TCP/IP networking routines.
1198 */
Paul Bakker40e46942009-01-03 21:51:57 +00001199#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001200
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001201/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001202 * \def POLARSSL_OID_C
1203 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001204 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001205 *
1206 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001207 * Caller: library/asn1write.c
1208 * library/pkcs5.c
1209 * library/pkparse.c
1210 * library/pkwrite.c
1211 * library/rsa.c
1212 * library/x509.c
1213 * library/x509_create.c
1214 * library/x509_crl.c
1215 * library/x509_crt.c
1216 * library/x509_csr.c
1217 * library/x509write_crt.c
1218 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001219 *
1220 * This modules translates between OIDs and internal values.
1221 */
1222#define POLARSSL_OID_C
1223
1224/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001225 * \def POLARSSL_PADLOCK_C
1226 *
1227 * Enable VIA Padlock support on x86.
1228 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001229 * Module: library/padlock.c
1230 * Caller: library/aes.c
1231 *
1232 * This modules adds support for the VIA PadLock on x86.
1233 */
Paul Bakker40e46942009-01-03 21:51:57 +00001234#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001235
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001236/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001237 * \def POLARSSL_PBKDF2_C
1238 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001239 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001240 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001241 *
1242 * Module: library/pbkdf2.c
1243 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001244 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001245 *
1246 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001247 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001248#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001249
1250/**
Paul Bakkercff68422013-09-15 20:43:33 +02001251 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001252 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001253 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001254 *
1255 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001256 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001257 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001258 * library/x509_crl.c
1259 * library/x509_crt.c
1260 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001261 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001262 * Requires: POLARSSL_BASE64_C
1263 *
Paul Bakkercff68422013-09-15 20:43:33 +02001264 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001265 */
Paul Bakkercff68422013-09-15 20:43:33 +02001266#define POLARSSL_PEM_PARSE_C
1267
1268/**
1269 * \def POLARSSL_PEM_WRITE_C
1270 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001271 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001272 *
1273 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001274 * Caller: library/pkwrite.c
1275 * library/x509write_crt.c
1276 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001277 *
1278 * Requires: POLARSSL_BASE64_C
1279 *
1280 * This modules adds support for encoding / writing PEM files.
1281 */
1282#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001283
1284/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001285 * \def POLARSSL_PK_C
1286 *
1287 * Enable the generic public (asymetric) key layer.
1288 *
1289 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001290 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001291 * library/ssl_cli.c
1292 * library/ssl_srv.c
1293 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001294 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1295 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001296 * Uncomment to enable generic public key wrappers.
1297 */
1298#define POLARSSL_PK_C
1299
1300/**
Paul Bakker4606c732013-09-15 17:04:23 +02001301 * \def POLARSSL_PK_PARSE_C
1302 *
1303 * Enable the generic public (asymetric) key parser.
1304 *
1305 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001306 * Caller: library/x509_crt.c
1307 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001308 *
1309 * Requires: POLARSSL_PK_C
1310 *
1311 * Uncomment to enable generic public key parse functions.
1312 */
1313#define POLARSSL_PK_PARSE_C
1314
1315/**
1316 * \def POLARSSL_PK_WRITE_C
1317 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001318 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001319 *
1320 * Module: library/pkwrite.c
1321 * Caller: library/x509write.c
1322 *
1323 * Requires: POLARSSL_PK_C
1324 *
1325 * Uncomment to enable generic public key write functions.
1326 */
1327#define POLARSSL_PK_WRITE_C
1328
1329/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001330 * \def POLARSSL_PKCS5_C
1331 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001332 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001333 *
1334 * Module: library/pkcs5.c
1335 *
1336 * Requires: POLARSSL_MD_C
1337 *
1338 * This module adds support for the PKCS#5 functions.
1339 */
1340#define POLARSSL_PKCS5_C
1341
1342/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001343 * \def POLARSSL_PKCS11_C
1344 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001345 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001346 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001347 * Module: library/pkcs11.c
1348 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001349 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001350 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001351 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001352 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001353 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1354#define POLARSSL_PKCS11_C
1355 */
1356
1357/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001358 * \def POLARSSL_PKCS12_C
1359 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001360 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001361 * Adds algorithms for parsing PKCS#8 encrypted private keys
1362 *
1363 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001364 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001365 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001366 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1367 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001368 *
1369 * This module enables PKCS#12 functions.
1370 */
1371#define POLARSSL_PKCS12_C
1372
1373/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001374 * \def POLARSSL_RSA_C
1375 *
1376 * Enable the RSA public-key cryptosystem.
1377 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001378 * Module: library/rsa.c
1379 * Caller: library/ssl_cli.c
1380 * library/ssl_srv.c
1381 * library/ssl_tls.c
1382 * library/x509.c
1383 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001384 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001385 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001386 * This module is required for SSL/TLS and MD5-signed certificates.
1387 */
Paul Bakker40e46942009-01-03 21:51:57 +00001388#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001389
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001390/**
1391 * \def POLARSSL_SHA1_C
1392 *
1393 * Enable the SHA1 cryptographic hash algorithm.
1394 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001395 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001396 * Caller: library/md.c
1397 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001398 * library/ssl_srv.c
1399 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001400 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001401 *
1402 * This module is required for SSL/TLS and SHA1-signed certificates.
1403 */
Paul Bakker40e46942009-01-03 21:51:57 +00001404#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001405
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001406/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001407 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001408 *
1409 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001410 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001411 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001412 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001413 * Caller: library/entropy.c
1414 * library/md.c
1415 * library/ssl_cli.c
1416 * library/ssl_srv.c
1417 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001418 *
1419 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001420 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001421 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001422#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001423
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001424/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001425 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001426 *
1427 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001428 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001429 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001430 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001431 * Caller: library/entropy.c
1432 * library/md.c
1433 * library/ssl_cli.c
1434 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001435 *
1436 * This module adds support for SHA-384 and SHA-512.
1437 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001438#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001439
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001440/**
Paul Bakker0a597072012-09-25 21:55:46 +00001441 * \def POLARSSL_SSL_CACHE_C
1442 *
1443 * Enable simple SSL cache implementation.
1444 *
1445 * Module: library/ssl_cache.c
1446 * Caller:
1447 *
1448 * Requires: POLARSSL_SSL_CACHE_C
1449 */
1450#define POLARSSL_SSL_CACHE_C
1451
1452/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001453 * \def POLARSSL_SSL_CLI_C
1454 *
1455 * Enable the SSL/TLS client code.
1456 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001457 * Module: library/ssl_cli.c
1458 * Caller:
1459 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001460 * Requires: POLARSSL_SSL_TLS_C
1461 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001462 * This module is required for SSL/TLS client support.
1463 */
Paul Bakker40e46942009-01-03 21:51:57 +00001464#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001465
Paul Bakker9a736322012-11-14 12:39:52 +00001466/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001467 * \def POLARSSL_SSL_SRV_C
1468 *
1469 * Enable the SSL/TLS server code.
1470 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001471 * Module: library/ssl_srv.c
1472 * Caller:
1473 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001474 * Requires: POLARSSL_SSL_TLS_C
1475 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001476 * This module is required for SSL/TLS server support.
1477 */
Paul Bakker40e46942009-01-03 21:51:57 +00001478#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001479
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001480/**
1481 * \def POLARSSL_SSL_TLS_C
1482 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001483 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001484 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001485 * Module: library/ssl_tls.c
1486 * Caller: library/ssl_cli.c
1487 * library/ssl_srv.c
1488 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001489 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001490 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001491 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001492 * This module is required for SSL/TLS.
1493 */
Paul Bakker40e46942009-01-03 21:51:57 +00001494#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001495
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001496/**
Paul Bakker2466d932013-09-28 14:40:38 +02001497 * \def POLARSSL_THREADING_C
1498 *
1499 * Enable the threading abstraction layer.
1500 * By default PolarSSL assumes it is used in a non-threaded environment or that
1501 * contexts are not shared between threads. If you do intend to use contexts
1502 * between threads, you will need to enable this layer to prevent race
1503 * conditions.
1504 *
1505 * Module: library/threading.c
1506 *
1507 * This allows different threading implementations (self-implemented or
1508 * provided).
1509 *
1510 * You will have to enable either POLARSSL_THREADING_ALT,
1511 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1512 *
1513 * Enable this layer to allow use of mutexes within PolarSSL
1514#define POLARSSL_THREADING_C
1515 */
1516
1517/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001518 * \def POLARSSL_TIMING_C
1519 *
1520 * Enable the portable timing interface.
1521 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001522 * Module: library/timing.c
1523 * Caller: library/havege.c
1524 *
1525 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001526 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001527#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001528
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001529/**
1530 * \def POLARSSL_VERSION_C
1531 *
1532 * Enable run-time version information.
1533 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001534 * Module: library/version.c
1535 *
1536 * This module provides run-time version information.
1537 */
1538#define POLARSSL_VERSION_C
1539
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001540/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001541 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001542 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001543 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001544 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001545 * Module: library/x509.c
1546 * Caller: library/x509_crl.c
1547 * library/x509_crt.c
1548 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001549 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001550 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001551 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001552 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001553 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001554 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001555#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001556
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001557/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001558 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001559 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001560 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001561 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001562 * Module: library/x509_crt.c
1563 * Caller: library/ssl_cli.c
1564 * library/ssl_srv.c
1565 * library/ssl_tls.c
1566 *
1567 * Requires: POLARSSL_X509_USE_C
1568 *
1569 * This module is required for X.509 certificate parsing.
1570 */
1571#define POLARSSL_X509_CRT_PARSE_C
1572
1573/**
1574 * \def POLARSSL_X509_CRL_PARSE_C
1575 *
1576 * Enable X.509 CRL parsing.
1577 *
1578 * Module: library/x509_crl.c
1579 * Caller: library/x509_crt.c
1580 *
1581 * Requires: POLARSSL_X509_USE_C
1582 *
1583 * This module is required for X.509 CRL parsing.
1584 */
1585#define POLARSSL_X509_CRL_PARSE_C
1586
1587/**
1588 * \def POLARSSL_X509_CSR_PARSE_C
1589 *
1590 * Enable X.509 Certificate Signing Request (CSR) parsing.
1591 *
1592 * Module: library/x509_csr.c
1593 * Caller: library/x509_crt_write.c
1594 *
1595 * Requires: POLARSSL_X509_USE_C
1596 *
1597 * This module is used for reading X.509 certificate request.
1598 */
1599#define POLARSSL_X509_CSR_PARSE_C
1600
1601/**
1602 * \def POLARSSL_X509_CREATE_C
1603 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001604 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001605 *
1606 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001607 *
Paul Bakker4606c732013-09-15 17:04:23 +02001608 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001609 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001610 * This module is the basis for creating X.509 certificates and CSRs.
1611 */
1612#define POLARSSL_X509_CREATE_C
1613
1614/**
1615 * \def POLARSSL_X509_CRT_WRITE_C
1616 *
1617 * Enable creating X.509 certificates.
1618 *
1619 * Module: library/x509_crt_write.c
1620 *
1621 * Requires: POLARSSL_CREATE_C
1622 *
1623 * This module is required for X.509 certificate creation.
1624 */
1625#define POLARSSL_X509_CRT_WRITE_C
1626
1627/**
1628 * \def POLARSSL_X509_CSR_WRITE_C
1629 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001630 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001631 *
1632 * Module: library/x509_csr_write.c
1633 *
1634 * Requires: POLARSSL_CREATE_C
1635 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001636 * This module is required for X.509 certificate request writing.
1637 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001638#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001639
1640/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001641 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001642 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001643 * Enable the XTEA block cipher.
1644 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001645 * Module: library/xtea.c
1646 * Caller:
1647 */
1648#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001649
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001650/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001651
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001652/**
1653 * \name SECTION: Module configuration options
1654 *
1655 * This section allows for the setting of module specific sizes and
1656 * configuration options. The default values are already present in the
1657 * relevant header files and should suffice for the regular use cases.
1658 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1659 * only if you have a good reason and know the consequences.
1660 *
1661 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1662 * header file take precedence.
1663 *
1664 * Please check the respective header file for documentation on these
1665 * parameters (to prevent duplicate documentation).
1666 *
1667 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1668 * \{
1669 */
1670//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1671
1672#if defined(POLARSSL_CONFIG_OPTIONS)
1673
1674// MPI / BIGNUM options
1675//
1676#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1677#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1678
1679// CTR_DRBG options
1680//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001681#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 +02001682#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1683#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1684#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1685#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1686
1687// Entropy options
1688//
1689#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1690#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1691
Paul Bakker6e339b52013-07-03 13:37:05 +02001692// Memory options
1693#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1694#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1695#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1696
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001697// SSL Cache options
1698//
1699#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1700#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1701
1702// SSL options
1703//
1704#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001705#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001706
1707#endif /* POLARSSL_CONFIG_OPTIONS */
1708
1709/* \} name */
1710
Paul Bakker7ad00f92013-04-18 23:05:25 +02001711/*
1712 * Sanity checks on defines and dependencies
1713 */
1714#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1715#error "POLARSSL_DHM_C defined, but not all prerequisites"
1716#endif
1717
1718#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1719#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1720#endif
1721
1722#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1723#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1724#endif
1725
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001726#if defined(POLARSSL_ECDSA_C) && \
1727 ( !defined(POLARSSL_ECP_C) || \
1728 !defined(POLARSSL_ASN1_PARSE_C) || \
1729 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001730#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1731#endif
1732
1733#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1734#error "POLARSSL_ECP_C defined, but not all prerequisites"
1735#endif
1736
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001737#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1738 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001739#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1740#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001741#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1742 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1743#error "CTR_DRBG_ENTROPY_LEN value too high"
1744#endif
1745#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1746 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1747#error "CTR_DRBG_ENTROPY_LEN value too high"
1748#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001749
1750#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1751#error "POLARSSL_GCM_C defined, but not all prerequisites"
1752#endif
1753
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001754#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1755#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1756#endif
1757
Paul Bakkere07f41d2013-04-19 09:08:57 +02001758#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1759#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1760#endif
1761
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001762#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1763 !defined(POLARSSL_ECDH_C)
1764#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1765#endif
1766
Paul Bakkere07f41d2013-04-19 09:08:57 +02001767#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1768 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001769 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001770#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1771#endif
1772
1773#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1774 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001775 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001776#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1777#endif
1778
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001779#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1780 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001781 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001782#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1783#endif
1784
Paul Bakkere07f41d2013-04-19 09:08:57 +02001785#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001786 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001787 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001788#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1789#endif
1790
1791#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001792 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001793 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001794#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1795#endif
1796
Paul Bakker6e339b52013-07-03 13:37:05 +02001797#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1798#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1799#endif
1800
Paul Bakker7ad00f92013-04-18 23:05:25 +02001801#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1802#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1803#endif
1804
Paul Bakkercff68422013-09-15 20:43:33 +02001805#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1806#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1807#endif
1808
1809#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1810#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001811#endif
1812
Paul Bakker4606c732013-09-15 17:04:23 +02001813#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1814#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1815#endif
1816
1817#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1818#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1819#endif
1820
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001821#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001822#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1823#endif
1824
1825#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1826 !defined(POLARSSL_OID_C) )
1827#error "POLARSSL_RSA_C defined, but not all prerequisites"
1828#endif
1829
1830#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1831#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1832#endif
1833
Paul Bakker577e0062013-08-28 11:57:20 +02001834#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001835 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001836#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1837#endif
1838
1839#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1840#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1841#endif
1842
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001843#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1844 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1845 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1846#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1847#endif
1848
1849#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1850 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1851#error "Illegal protocol selection"
1852#endif
1853
1854#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1855 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1856#error "Illegal protocol selection"
1857#endif
1858
1859#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1860 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1861 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1862#error "Illegal protocol selection"
1863#endif
1864
Paul Bakker59da0a42013-08-19 13:27:17 +02001865#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001866 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1867 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001868#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1869#endif
1870
Paul Bakker2466d932013-09-28 14:40:38 +02001871#if defined(POLARSSL_THREADING_DUMMY)
1872#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1873#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1874#endif
1875#define POLARSSL_THREADING_IMPL
1876#endif
1877
1878#if defined(POLARSSL_THREADING_PTHREAD)
1879#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1880#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
1881#endif
1882#define POLARSSL_THREADING_IMPL
1883#endif
1884
1885#if defined(POLARSSL_THREADING_ALT)
1886#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1887#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
1888#endif
1889#define POLARSSL_THREADING_IMPL
1890#endif
1891
1892#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
1893#error "POLARSSL_THREADING_C defined, single threading implementation required"
1894#endif
1895#undef POLARSSL_THREADING_IMPL
1896
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001897#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001898 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001899 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001900#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001901#endif
1902
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001903#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1904 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1905 !defined(POLARSSL_PK_WRITE_C) )
1906#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1907#endif
1908
1909#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1910#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1911#endif
1912
1913#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1914#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1915#endif
1916
1917#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1918#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1919#endif
1920
1921#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1922#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1923#endif
1924
1925#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1926#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001927#endif
1928
Paul Bakker5121ce52009-01-03 21:22:43 +00001929#endif /* config.h */