blob: aa35af2830821aa8731983b147b636ea82e330a9 [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
Paul Bakkerfab5c822012-02-06 16:45:10 +0000196 *
197 * Uncomment this macro to enable the NULL cipher and ciphersuites
198#define POLARSSL_CIPHER_NULL_CIPHER
199 */
200
201/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200202 * \def POLARSSL_CIPHER_PADDING_XXX
203 *
204 * Uncomment or comment macros to add support for specific padding modes
205 * in the cipher layer with cipher modes that support padding (e.g. CBC)
206 *
207 * If you disable all padding modes, only full blocks can be used with CBC.
208 *
209 * Enable padding modes in the cipher layer.
210 */
211#define POLARSSL_CIPHER_PADDING_PKCS7
212#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
213#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
214#define POLARSSL_CIPHER_PADDING_ZEROS
215
216/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000217 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
218 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200219 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000220 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000221 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000222 *
223 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000224 * TLS_RSA_WITH_DES_CBC_SHA
225 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000226 *
227 * Uncomment this macro to enable weak ciphersuites
228#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
229 */
230
231/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200232 * \def POLARSSL_ECP_XXXX_ENABLED
233 *
234 * Enables specific curves within the Elliptic Curve module.
235 * By default all supported curves are enables.
236 *
237 * Comment macros to disable the curve and functions for it
238 */
239#define POLARSSL_ECP_DP_SECP192R1_ENABLED
240#define POLARSSL_ECP_DP_SECP224R1_ENABLED
241#define POLARSSL_ECP_DP_SECP256R1_ENABLED
242#define POLARSSL_ECP_DP_SECP384R1_ENABLED
243#define POLARSSL_ECP_DP_SECP521R1_ENABLED
244
245/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200246 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
247 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200248 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200249 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200250 * This enables the following ciphersuites (if other requisites are
251 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200252 * TLS_PSK_WITH_RC4_128_SHA
253 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
254 * TLS_PSK_WITH_AES_128_CBC_SHA
255 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200256 * TLS_PSK_WITH_AES_128_CBC_SHA256
257 * TLS_PSK_WITH_AES_256_CBC_SHA384
258 * TLS_PSK_WITH_AES_128_GCM_SHA256
259 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200260 */
261#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
262
263/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200264 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
265 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200266 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200267 *
268 * Requires: POLARSSL_DHM_C
269 *
270 * This enables the following ciphersuites (if other requisites are
271 * enabled as well):
272 * TLS_DHE_PSK_WITH_RC4_128_SHA
273 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
274 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
275 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200276 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
277 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
278 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
279 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200280 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200281#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200282
283/**
284 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
285 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200286 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Paul Bakker45bda902013-04-19 22:28:21 +0200287 * (NOT YET IMPLEMENTED)
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200288 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
289 * POLARSSL_X509_CRT_PARSE_C, POLARSSL_X509_CRL_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200290 *
291 * This enables the following ciphersuites (if other requisites are
292 * enabled as well):
293 * TLS_RSA_PSK_WITH_RC4_128_SHA
294 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
295 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
296 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200297 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
298 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
299 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
300 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200301#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
302 */
303
304/**
305 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
306 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200307 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200308 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200309 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
310 * POLARSSL_X509_CRT_PARSE_C, POLARSSL_X509_CRL_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200311 *
312 * This enables the following ciphersuites (if other requisites are
313 * enabled as well):
314 * TLS_RSA_WITH_AES_128_CBC_SHA
315 * TLS_RSA_WITH_AES_256_CBC_SHA
316 * TLS_RSA_WITH_AES_128_CBC_SHA256
317 * TLS_RSA_WITH_AES_256_CBC_SHA256
318 * TLS_RSA_WITH_AES_128_GCM_SHA256
319 * TLS_RSA_WITH_AES_256_GCM_SHA384
320 * TLS_RSA_WITH_RC4_128_MD5
321 * TLS_RSA_WITH_RC4_128_SHA
322 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
323 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
324 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
325 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
326 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
327 */
328#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
329
330/**
331 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
332 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200333 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200334 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200335 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
336 * POLARSSL_X509_CRT_PARSE_C, POLARSSL_X509_CRL_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200337 *
338 * This enables the following ciphersuites (if other requisites are
339 * enabled as well):
340 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
341 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
342 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
343 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
344 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
345 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
346 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
347 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
348 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
349 */
350#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
351
352/**
353 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
354 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200355 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200356 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200357 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
358 * POLARSSL_X509_CRT_PARSE_C, POLARSSL_X509_CRL_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200359 *
360 * This enables the following ciphersuites (if other requisites are
361 * enabled as well):
362 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
363 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
364 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
365 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
366 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
367 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
368 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
369 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
370 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
371 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
372 */
373#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
374
375/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200376 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
377 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200378 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200379 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200380 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
381 * POLARSSL_X509_CRL_PARSE_C
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200382 *
383 * This enables the following ciphersuites (if other requisites are
384 * enabled as well):
385 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
386 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
387 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
388 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
389 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
390 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
391 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
392 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
393 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
394 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
395 */
396#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
397
398/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200399 * \def POLARSSL_ERROR_STRERROR_BC
400 *
401 * Make available the backward compatible error_strerror() next to the
402 * current polarssl_strerror().
403 *
404 * Disable if you run into name conflicts and want to really remove the
405 * error_strerror()
406 */
407#define POLARSSL_ERROR_STRERROR_BC
408
409/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100410 * \def POLARSSL_ERROR_STRERROR_DUMMY
411 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200412 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100413 * third party libraries easier.
414 *
415 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200416 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100417 */
418#define POLARSSL_ERROR_STRERROR_DUMMY
419
420/**
Paul Bakker15566e42011-04-24 21:19:15 +0000421 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000422 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200423 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200424 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200425 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000426 */
Paul Bakker15566e42011-04-24 21:19:15 +0000427#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000428
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000429/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000430 * \def POLARSSL_FS_IO
431 *
432 * Enable functions that use the filesystem.
433 */
434#define POLARSSL_FS_IO
435
436/**
Paul Bakker43655f42011-12-15 20:11:16 +0000437 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
438 *
439 * Do not add default entropy sources. These are the platform specific,
440 * hardclock and HAVEGE based poll functions.
441 *
442 * This is useful to have more control over the added entropy sources in an
443 * application.
444 *
445 * Uncomment this macro to prevent loading of default entropy functions.
446#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
447 */
448
449/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000450 * \def POLARSSL_NO_PLATFORM_ENTROPY
451 *
452 * Do not use built-in platform entropy functions.
453 * This is useful if your platform does not support
454 * standards like the /dev/urandom or Windows CryptoAPI.
455 *
456 * Uncomment this macro to disable the built-in platform entropy functions.
457#define POLARSSL_NO_PLATFORM_ENTROPY
458 */
459
460/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200461 * \def POLARSSL_MEMORY_DEBUG
462 *
463 * Enable debugging of buffer allocator memory issues. Automatically prints
464 * (to stderr) all (fatal) messages on memory allocation issues. Enables
465 * function for 'debug output' of allocated memory.
466 *
467 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
468 * fprintf()
469 *
470 * Uncomment this macro to let the buffer allocator print out error messages.
471#define POLARSSL_MEMORY_DEBUG
472*/
473
474/**
475 * \def POLARSSL_MEMORY_BACKTRACE
476 *
477 * Include backtrace information with each allocated block.
478 *
479 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
480 * GLIBC-compatible backtrace() an backtrace_symbols() support
481 *
482 * Uncomment this macro to include backtrace information
483#define POLARSSL_MEMORY_BACKTRACE
484 */
485
486/**
Paul Bakker48377d92013-08-30 12:06:24 +0200487 * \def POLARSSL_PKCS1_V15
488 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200489 * Enable support for PKCS#1 v1.5 encoding.
490 *
Paul Bakker48377d92013-08-30 12:06:24 +0200491 * Requires: POLARSSL_RSA_C
492 *
Paul Bakker48377d92013-08-30 12:06:24 +0200493 * This enables support for PKCS#1 v1.5 operations.
494 */
495#define POLARSSL_PKCS1_V15
496
497/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000498 * \def POLARSSL_PKCS1_V21
499 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200500 * Enable support for PKCS#1 v2.1 encoding.
501 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000502 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
503 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000504 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
505 */
506#define POLARSSL_PKCS1_V21
507
508/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000509 * \def POLARSSL_RSA_NO_CRT
510 *
511 * Do not use the Chinese Remainder Theorem for the RSA private operation.
512 *
513 * Uncomment this macro to disable the use of CRT in RSA.
514 *
515#define POLARSSL_RSA_NO_CRT
516 */
Paul Bakker15566e42011-04-24 21:19:15 +0000517
518/**
519 * \def POLARSSL_SELF_TEST
520 *
521 * Enable the checkup functions (*_self_test).
522 */
523#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000524
525/**
Paul Bakker40865c82013-01-31 17:13:13 +0100526 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
527 *
528 * Enable sending of alert messages in case of encountered errors as per RFC.
529 * If you choose not to send the alert messages, PolarSSL can still communicate
530 * with other servers, only debugging of failures is harder.
531 *
532 * The advantage of not sending alert messages, is that no information is given
533 * about reasons for failures thus preventing adversaries of gaining intel.
534 *
535 * Enable sending of all alert messages
536 */
537#define POLARSSL_SSL_ALERT_MESSAGES
538
539/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100540 * \def POLARSSL_SSL_DEBUG_ALL
541 *
542 * Enable the debug messages in SSL module for all issues.
543 * Debug messages have been disabled in some places to prevent timing
544 * attacks due to (unbalanced) debugging function calls.
545 *
546 * If you need all error reporting you should enable this during debugging,
547 * but remove this for production servers that should log as well.
548 *
549 * Uncomment this macro to report all debug messages on errors introducing
550 * a timing side-channel.
551 *
552#define POLARSSL_SSL_DEBUG_ALL
553 */
554
555/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000556 * \def POLARSSL_SSL_HW_RECORD_ACCEL
557 *
558 * Enable hooking functions in SSL module for hardware acceleration of
559 * individual records.
560 *
561 * Uncomment this macro to enable hooking functions.
562#define POLARSSL_SSL_HW_RECORD_ACCEL
563 */
564
565/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100566 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
567 *
568 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200569 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100570 *
571 * Comment this macro to disable support for SSLv2 Client Hello messages.
572 */
573#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
574
575/**
Paul Bakker05decb22013-08-15 13:33:48 +0200576 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
577 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200578 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200579 *
580 * Comment this macro to disable support for the max_fragment_length extension
581 */
582#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
583
584/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200585 * \def POLARSSL_SSL_PROTO_SSL3
586 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200587 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200588 *
589 * Requires: POLARSSL_MD5_C
590 * POLARSSL_SHA1_C
591 *
592 * Comment this macro to disable support for SSL 3.0
593 */
594#define POLARSSL_SSL_PROTO_SSL3
595
596/**
597 * \def POLARSSL_SSL_PROTO_TLS1
598 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200599 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200600 *
601 * Requires: POLARSSL_MD5_C
602 * POLARSSL_SHA1_C
603 *
604 * Comment this macro to disable support for TLS 1.0
605 */
606#define POLARSSL_SSL_PROTO_TLS1
607
608/**
609 * \def POLARSSL_SSL_PROTO_TLS1_1
610 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200611 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200612 *
613 * Requires: POLARSSL_MD5_C
614 * POLARSSL_SHA1_C
615 *
616 * Comment this macro to disable support for TLS 1.1
617 */
618#define POLARSSL_SSL_PROTO_TLS1_1
619
620/**
621 * \def POLARSSL_SSL_PROTO_TLS1_2
622 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200623 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200624 *
625 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
626 * (Depends on ciphersuites)
627 *
628 * Comment this macro to disable support for TLS 1.2
629 */
630#define POLARSSL_SSL_PROTO_TLS1_2
631
632/**
Paul Bakkera503a632013-08-14 13:48:06 +0200633 * \def POLARSSL_SSL_SESSION_TICKETS
634 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200635 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200636 *
637 * Requires: POLARSSL_AES_C
638 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200639 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200640 *
641 * Comment this macro to disable support for SSL session tickets
642 */
643#define POLARSSL_SSL_SESSION_TICKETS
644
645/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200646 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
647 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200648 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200649 *
650 * Comment this macro to disable support for server name indication in SSL
651 */
652#define POLARSSL_SSL_SERVER_NAME_INDICATION
653
654/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200655 * \def POLARSSL_SSL_TRUNCATED_HMAC
656 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200657 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200658 *
659 * Comment this macro to disable support for truncated HMAC in SSL
660 */
661#define POLARSSL_SSL_TRUNCATED_HMAC
662
663/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000664 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
665 *
666 * If set, the X509 parser will not break-off when parsing an X509 certificate
667 * and encountering an unknown critical extension.
668 *
669 * Uncomment to prevent an error.
670 *
671#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
672 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000673
674/**
675 * \def POLARSSL_ZLIB_SUPPORT
676 *
677 * If set, the SSL/TLS module uses ZLIB to support compression and
678 * decompression of packet data.
679 *
680 * Used in: library/ssl_tls.c
681 * library/ssl_cli.c
682 * library/ssl_srv.c
683 *
684 * This feature requires zlib library and headers to be present.
685 *
686 * Uncomment to enable use of ZLIB
687#define POLARSSL_ZLIB_SUPPORT
688 */
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200689/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000690
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000691/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000692 * \name SECTION: PolarSSL modules
693 *
694 * This section enables or disables entire modules in PolarSSL
695 * \{
696 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000697
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000698/**
699 * \def POLARSSL_AES_C
700 *
701 * Enable the AES block cipher.
702 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000703 * Module: library/aes.c
704 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000705 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000706 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000707 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000708 * This module enables the following ciphersuites (if other requisites are
709 * enabled as well):
710 * TLS_RSA_WITH_AES_128_CBC_SHA
711 * TLS_RSA_WITH_AES_256_CBC_SHA
712 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
713 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
714 * TLS_RSA_WITH_AES_128_CBC_SHA256
715 * TLS_RSA_WITH_AES_256_CBC_SHA256
716 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
717 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
718 * TLS_RSA_WITH_AES_128_GCM_SHA256
719 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100720 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
721 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200722 * TLS_PSK_WITH_AES_128_CBC_SHA
723 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100724 *
Paul Bakkercff68422013-09-15 20:43:33 +0200725 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000726 */
Paul Bakker40e46942009-01-03 21:51:57 +0000727#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000728
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000729/**
730 * \def POLARSSL_ARC4_C
731 *
732 * Enable the ARCFOUR stream cipher.
733 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000734 * Module: library/arc4.c
735 * Caller: library/ssl_tls.c
736 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100737 * This module enables the following ciphersuites (if other requisites are
738 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000739 * TLS_RSA_WITH_RC4_128_MD5
740 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100741 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200742 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000743 */
Paul Bakker40e46942009-01-03 21:51:57 +0000744#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000745
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000746/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000747 * \def POLARSSL_ASN1_PARSE_C
748 *
749 * Enable the generic ASN1 parser.
750 *
751 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200752 * Caller: library/x509.c
753 * library/dhm.c
754 * library/pkcs12.c
755 * library/pkcs5.c
756 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000757 */
758#define POLARSSL_ASN1_PARSE_C
759
760/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000761 * \def POLARSSL_ASN1_WRITE_C
762 *
763 * Enable the generic ASN1 writer.
764 *
765 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200766 * Caller: library/ecdsa.c
767 * library/pkwrite.c
768 * library/x509_create.c
769 * library/x509write_crt.c
770 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000771 */
772#define POLARSSL_ASN1_WRITE_C
773
774/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000775 * \def POLARSSL_BASE64_C
776 *
777 * Enable the Base64 module.
778 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000779 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000780 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000781 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000782 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000783 */
Paul Bakker40e46942009-01-03 21:51:57 +0000784#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000785
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000786/**
787 * \def POLARSSL_BIGNUM_C
788 *
Paul Bakker9a736322012-11-14 12:39:52 +0000789 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000790 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000791 * Module: library/bignum.c
792 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200793 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000794 * library/rsa.c
795 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000796 *
797 * This module is required for RSA and DHM support.
798 */
Paul Bakker40e46942009-01-03 21:51:57 +0000799#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000800
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000801/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000802 * \def POLARSSL_BLOWFISH_C
803 *
804 * Enable the Blowfish block cipher.
805 *
806 * Module: library/blowfish.c
807 */
808#define POLARSSL_BLOWFISH_C
809
810/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000811 * \def POLARSSL_CAMELLIA_C
812 *
813 * Enable the Camellia block cipher.
814 *
Paul Bakker38119b12009-01-10 23:31:23 +0000815 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000816 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000817 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000818 * This module enables the following ciphersuites (if other requisites are
819 * enabled as well):
820 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
821 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
822 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
823 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
824 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
825 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
826 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
827 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000828 */
829#define POLARSSL_CAMELLIA_C
830
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000831/**
832 * \def POLARSSL_CERTS_C
833 *
834 * Enable the test certificates.
835 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000836 * Module: library/certs.c
837 * Caller:
838 *
839 * This module is used for testing (ssl_client/server).
840 */
Paul Bakker40e46942009-01-03 21:51:57 +0000841#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000842
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000843/**
844 * \def POLARSSL_CIPHER_C
845 *
846 * Enable the generic cipher layer.
847 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000848 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200849 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000850 *
851 * Uncomment to enable generic cipher wrappers.
852 */
853#define POLARSSL_CIPHER_C
854
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000855/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000856 * \def POLARSSL_CTR_DRBG_C
857 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200858 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000859 *
860 * Module: library/ctr_drbg.c
861 * Caller:
862 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000863 * Requires: POLARSSL_AES_C
864 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000865 * This module provides the CTR_DRBG AES-256 random number generator.
866 */
867#define POLARSSL_CTR_DRBG_C
868
869/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000870 * \def POLARSSL_DEBUG_C
871 *
872 * Enable the debug functions.
873 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000874 * Module: library/debug.c
875 * Caller: library/ssl_cli.c
876 * library/ssl_srv.c
877 * library/ssl_tls.c
878 *
879 * This module provides debugging functions.
880 */
Paul Bakker40e46942009-01-03 21:51:57 +0000881#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000882
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000883/**
884 * \def POLARSSL_DES_C
885 *
886 * Enable the DES block cipher.
887 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000888 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100889 * Caller: library/pem.c
890 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000891 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000892 * This module enables the following ciphersuites (if other requisites are
893 * enabled as well):
894 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
895 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100896 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200897 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100898 *
Paul Bakkercff68422013-09-15 20:43:33 +0200899 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000900 */
Paul Bakker40e46942009-01-03 21:51:57 +0000901#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000902
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000903/**
904 * \def POLARSSL_DHM_C
905 *
906 * Enable the Diffie-Hellman-Merkle key exchange.
907 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000908 * Module: library/dhm.c
909 * Caller: library/ssl_cli.c
910 * library/ssl_srv.c
911 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000912 * This module enables the following ciphersuites (if other requisites are
913 * enabled as well):
914 * TLS_DHE_RSA_WITH_DES_CBC_SHA
915 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
916 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
917 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
918 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
919 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
920 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
921 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
922 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
923 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
924 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
925 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000926 */
Paul Bakker40e46942009-01-03 21:51:57 +0000927#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000928
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000929/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100930 * \def POLARSSL_ECDH_C
931 *
932 * Enable the elliptic curve Diffie-Hellman library.
933 *
934 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100935 * Caller: library/ssl_cli.c
936 * library/ssl_srv.c
937 *
938 * This module enables the following ciphersuites (if other requisites are
939 * enabled as well):
940 * TLS_ECDHE_RSA_WITH_NULL_SHA
941 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
942 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
943 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
944 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100945 *
946 * Requires: POLARSSL_ECP_C
947 */
948#define POLARSSL_ECDH_C
949
950/**
951 * \def POLARSSL_ECDSA_C
952 *
953 * Enable the elliptic curve DSA library.
954 *
955 * Module: library/ecdsa.c
956 * Caller:
957 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +0200958 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100959 */
960#define POLARSSL_ECDSA_C
961
962/**
963 * \def POLARSSL_ECP_C
964 *
965 * Enable the elliptic curve over GF(p) library.
966 *
967 * Module: library/ecp.c
968 * Caller: library/ecdh.c
969 * library/ecdsa.c
970 *
971 * Requires: POLARSSL_BIGNUM_C
972 */
973#define POLARSSL_ECP_C
974
975/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000976 * \def POLARSSL_ENTROPY_C
977 *
978 * Enable the platform-specific entropy code.
979 *
980 * Module: library/entropy.c
981 * Caller:
982 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200983 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000984 *
985 * This module provides a generic entropy pool
986 */
987#define POLARSSL_ENTROPY_C
988
989/**
Paul Bakker9d781402011-05-09 16:17:09 +0000990 * \def POLARSSL_ERROR_C
991 *
992 * Enable error code to error string conversion.
993 *
994 * Module: library/error.c
995 * Caller:
996 *
997 * This module enables err_strerror().
998 */
999#define POLARSSL_ERROR_C
1000
1001/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001002 * \def POLARSSL_GCM_C
1003 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001004 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001005 *
1006 * Module: library/gcm.c
1007 *
1008 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001009 *
1010 * This module enables the following ciphersuites (if other requisites are
1011 * enabled as well):
1012 * TLS_RSA_WITH_AES_128_GCM_SHA256
1013 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001014 */
1015#define POLARSSL_GCM_C
1016
1017/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001018 * \def POLARSSL_HAVEGE_C
1019 *
1020 * Enable the HAVEGE random generator.
1021 *
Paul Bakker2a844242013-06-24 13:01:53 +02001022 * Warning: the HAVEGE random generator is not suitable for virtualized
1023 * environments
1024 *
1025 * Warning: the HAVEGE random generator is dependent on timing and specific
1026 * processor traits. It is therefore not advised to use HAVEGE as
1027 * your applications primary random generator or primary entropy pool
1028 * input. As a secondary input to your entropy pool, it IS able add
1029 * the (limited) extra entropy it provides.
1030 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001031 * Module: library/havege.c
1032 * Caller:
1033 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001034 * Requires: POLARSSL_TIMING_C
1035 *
Paul Bakker2a844242013-06-24 13:01:53 +02001036 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001037#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001038 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001039
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001040/**
1041 * \def POLARSSL_MD_C
1042 *
1043 * Enable the generic message digest layer.
1044 *
Paul Bakker17373852011-01-06 14:20:01 +00001045 * Module: library/md.c
1046 * Caller:
1047 *
1048 * Uncomment to enable generic message digest wrappers.
1049 */
1050#define POLARSSL_MD_C
1051
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001052/**
1053 * \def POLARSSL_MD2_C
1054 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001055 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001056 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001057 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001058 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001059 *
1060 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1061 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001062#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001063 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001064
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001065/**
1066 * \def POLARSSL_MD4_C
1067 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001068 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001069 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001070 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001071 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001072 *
1073 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1074 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001075#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001076 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001077
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001078/**
1079 * \def POLARSSL_MD5_C
1080 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001081 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001082 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001083 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001084 * Caller: library/md.c
1085 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001086 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001087 *
1088 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001089 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001090 */
Paul Bakker40e46942009-01-03 21:51:57 +00001091#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001092
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001093/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001094 * \def POLARSSL_MEMORY_C
1095 *
1096 * Enable the memory allocation layer.
1097 * By default PolarSSL uses the system-provided malloc() and free().
1098 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1099 * are defined and unmodified)
1100 *
1101 * This allows different allocators (self-implemented or provided)
1102 *
1103 * Enable this layer to allow use of alternative memory allocators.
1104#define POLARSSL_MEMORY_C
1105 */
1106
1107/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001108 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1109 *
1110 * Enable the buffer allocator implementation that makes use of a (stack)
1111 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1112 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001113 *
1114 * Module: library/memory_buffer_alloc.c
1115 *
1116 * Requires: POLARSSL_MEMORY_C
1117 *
1118 * Enable this module to enable the buffer memory allocator.
1119#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1120 */
1121
1122/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001123 * \def POLARSSL_NET_C
1124 *
1125 * Enable the TCP/IP networking routines.
1126 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001127 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001128 *
1129 * This module provides TCP/IP networking routines.
1130 */
Paul Bakker40e46942009-01-03 21:51:57 +00001131#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001132
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001133/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001134 * \def POLARSSL_OID_C
1135 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001136 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001137 *
1138 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001139 * Caller: library/asn1write.c
1140 * library/pkcs5.c
1141 * library/pkparse.c
1142 * library/pkwrite.c
1143 * library/rsa.c
1144 * library/x509.c
1145 * library/x509_create.c
1146 * library/x509_crl.c
1147 * library/x509_crt.c
1148 * library/x509_csr.c
1149 * library/x509write_crt.c
1150 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001151 *
1152 * This modules translates between OIDs and internal values.
1153 */
1154#define POLARSSL_OID_C
1155
1156/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001157 * \def POLARSSL_PADLOCK_C
1158 *
1159 * Enable VIA Padlock support on x86.
1160 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001161 * Module: library/padlock.c
1162 * Caller: library/aes.c
1163 *
1164 * This modules adds support for the VIA PadLock on x86.
1165 */
Paul Bakker40e46942009-01-03 21:51:57 +00001166#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001167
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001168/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001169 * \def POLARSSL_PBKDF2_C
1170 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001171 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001172 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001173 *
1174 * Module: library/pbkdf2.c
1175 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001176 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001177 *
1178 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001179 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001180#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001181
1182/**
Paul Bakkercff68422013-09-15 20:43:33 +02001183 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001184 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001185 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001186 *
1187 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001188 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001189 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001190 * library/x509_crl.c
1191 * library/x509_crt.c
1192 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001193 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001194 * Requires: POLARSSL_BASE64_C
1195 *
Paul Bakkercff68422013-09-15 20:43:33 +02001196 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001197 */
Paul Bakkercff68422013-09-15 20:43:33 +02001198#define POLARSSL_PEM_PARSE_C
1199
1200/**
1201 * \def POLARSSL_PEM_WRITE_C
1202 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001203 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001204 *
1205 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001206 * Caller: library/pkwrite.c
1207 * library/x509write_crt.c
1208 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001209 *
1210 * Requires: POLARSSL_BASE64_C
1211 *
1212 * This modules adds support for encoding / writing PEM files.
1213 */
1214#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001215
1216/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001217 * \def POLARSSL_PK_C
1218 *
1219 * Enable the generic public (asymetric) key layer.
1220 *
1221 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001222 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001223 * library/ssl_cli.c
1224 * library/ssl_srv.c
1225 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001226 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1227 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001228 * Uncomment to enable generic public key wrappers.
1229 */
1230#define POLARSSL_PK_C
1231
1232/**
Paul Bakker4606c732013-09-15 17:04:23 +02001233 * \def POLARSSL_PK_PARSE_C
1234 *
1235 * Enable the generic public (asymetric) key parser.
1236 *
1237 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001238 * Caller: library/x509_crt.c
1239 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001240 *
1241 * Requires: POLARSSL_PK_C
1242 *
1243 * Uncomment to enable generic public key parse functions.
1244 */
1245#define POLARSSL_PK_PARSE_C
1246
1247/**
1248 * \def POLARSSL_PK_WRITE_C
1249 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001250 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001251 *
1252 * Module: library/pkwrite.c
1253 * Caller: library/x509write.c
1254 *
1255 * Requires: POLARSSL_PK_C
1256 *
1257 * Uncomment to enable generic public key write functions.
1258 */
1259#define POLARSSL_PK_WRITE_C
1260
1261/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001262 * \def POLARSSL_PKCS5_C
1263 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001264 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001265 *
1266 * Module: library/pkcs5.c
1267 *
1268 * Requires: POLARSSL_MD_C
1269 *
1270 * This module adds support for the PKCS#5 functions.
1271 */
1272#define POLARSSL_PKCS5_C
1273
1274/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001275 * \def POLARSSL_PKCS11_C
1276 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001277 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001278 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001279 * Module: library/pkcs11.c
1280 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001281 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001282 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001283 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001284 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001285 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1286#define POLARSSL_PKCS11_C
1287 */
1288
1289/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001290 * \def POLARSSL_PKCS12_C
1291 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001292 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001293 * Adds algorithms for parsing PKCS#8 encrypted private keys
1294 *
1295 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001296 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001297 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001298 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1299 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001300 *
1301 * This module enables PKCS#12 functions.
1302 */
1303#define POLARSSL_PKCS12_C
1304
1305/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001306 * \def POLARSSL_RSA_C
1307 *
1308 * Enable the RSA public-key cryptosystem.
1309 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001310 * Module: library/rsa.c
1311 * Caller: library/ssl_cli.c
1312 * library/ssl_srv.c
1313 * library/ssl_tls.c
1314 * library/x509.c
1315 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001316 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001317 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001318 * This module is required for SSL/TLS and MD5-signed certificates.
1319 */
Paul Bakker40e46942009-01-03 21:51:57 +00001320#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001321
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001322/**
1323 * \def POLARSSL_SHA1_C
1324 *
1325 * Enable the SHA1 cryptographic hash algorithm.
1326 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001327 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001328 * Caller: library/md.c
1329 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001330 * library/ssl_srv.c
1331 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001332 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001333 *
1334 * This module is required for SSL/TLS and SHA1-signed certificates.
1335 */
Paul Bakker40e46942009-01-03 21:51:57 +00001336#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001337
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001338/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001339 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001340 *
1341 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001342 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001343 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001344 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001345 * Caller: library/entropy.c
1346 * library/md.c
1347 * library/ssl_cli.c
1348 * library/ssl_srv.c
1349 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001350 *
1351 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001352 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001353 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001354#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001355
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001356/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001357 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001358 *
1359 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001360 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001361 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001362 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001363 * Caller: library/entropy.c
1364 * library/md.c
1365 * library/ssl_cli.c
1366 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001367 *
1368 * This module adds support for SHA-384 and SHA-512.
1369 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001370#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001371
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001372/**
Paul Bakker0a597072012-09-25 21:55:46 +00001373 * \def POLARSSL_SSL_CACHE_C
1374 *
1375 * Enable simple SSL cache implementation.
1376 *
1377 * Module: library/ssl_cache.c
1378 * Caller:
1379 *
1380 * Requires: POLARSSL_SSL_CACHE_C
1381 */
1382#define POLARSSL_SSL_CACHE_C
1383
1384/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001385 * \def POLARSSL_SSL_CLI_C
1386 *
1387 * Enable the SSL/TLS client code.
1388 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001389 * Module: library/ssl_cli.c
1390 * Caller:
1391 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001392 * Requires: POLARSSL_SSL_TLS_C
1393 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001394 * This module is required for SSL/TLS client support.
1395 */
Paul Bakker40e46942009-01-03 21:51:57 +00001396#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001397
Paul Bakker9a736322012-11-14 12:39:52 +00001398/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001399 * \def POLARSSL_SSL_SRV_C
1400 *
1401 * Enable the SSL/TLS server code.
1402 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001403 * Module: library/ssl_srv.c
1404 * Caller:
1405 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001406 * Requires: POLARSSL_SSL_TLS_C
1407 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001408 * This module is required for SSL/TLS server support.
1409 */
Paul Bakker40e46942009-01-03 21:51:57 +00001410#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001411
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001412/**
1413 * \def POLARSSL_SSL_TLS_C
1414 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001415 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001416 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001417 * Module: library/ssl_tls.c
1418 * Caller: library/ssl_cli.c
1419 * library/ssl_srv.c
1420 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001421 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001422 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001423 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001424 * This module is required for SSL/TLS.
1425 */
Paul Bakker40e46942009-01-03 21:51:57 +00001426#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001427
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001428/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001429 * \def POLARSSL_TIMING_C
1430 *
1431 * Enable the portable timing interface.
1432 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001433 * Module: library/timing.c
1434 * Caller: library/havege.c
1435 *
1436 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001437 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001438#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001439
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001440/**
1441 * \def POLARSSL_VERSION_C
1442 *
1443 * Enable run-time version information.
1444 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001445 * Module: library/version.c
1446 *
1447 * This module provides run-time version information.
1448 */
1449#define POLARSSL_VERSION_C
1450
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001451/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001452 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001453 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001454 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001455 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001456 * Module: library/x509.c
1457 * Caller: library/x509_crl.c
1458 * library/x509_crt.c
1459 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001460 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001461 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001462 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001463 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001464 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001465 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001466#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001467
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001468/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001469 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001470 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001471 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001472 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001473 * Module: library/x509_crt.c
1474 * Caller: library/ssl_cli.c
1475 * library/ssl_srv.c
1476 * library/ssl_tls.c
1477 *
1478 * Requires: POLARSSL_X509_USE_C
1479 *
1480 * This module is required for X.509 certificate parsing.
1481 */
1482#define POLARSSL_X509_CRT_PARSE_C
1483
1484/**
1485 * \def POLARSSL_X509_CRL_PARSE_C
1486 *
1487 * Enable X.509 CRL parsing.
1488 *
1489 * Module: library/x509_crl.c
1490 * Caller: library/x509_crt.c
1491 *
1492 * Requires: POLARSSL_X509_USE_C
1493 *
1494 * This module is required for X.509 CRL parsing.
1495 */
1496#define POLARSSL_X509_CRL_PARSE_C
1497
1498/**
1499 * \def POLARSSL_X509_CSR_PARSE_C
1500 *
1501 * Enable X.509 Certificate Signing Request (CSR) parsing.
1502 *
1503 * Module: library/x509_csr.c
1504 * Caller: library/x509_crt_write.c
1505 *
1506 * Requires: POLARSSL_X509_USE_C
1507 *
1508 * This module is used for reading X.509 certificate request.
1509 */
1510#define POLARSSL_X509_CSR_PARSE_C
1511
1512/**
1513 * \def POLARSSL_X509_CREATE_C
1514 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001515 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001516 *
1517 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001518 *
Paul Bakker4606c732013-09-15 17:04:23 +02001519 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001520 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001521 * This module is the basis for creating X.509 certificates and CSRs.
1522 */
1523#define POLARSSL_X509_CREATE_C
1524
1525/**
1526 * \def POLARSSL_X509_CRT_WRITE_C
1527 *
1528 * Enable creating X.509 certificates.
1529 *
1530 * Module: library/x509_crt_write.c
1531 *
1532 * Requires: POLARSSL_CREATE_C
1533 *
1534 * This module is required for X.509 certificate creation.
1535 */
1536#define POLARSSL_X509_CRT_WRITE_C
1537
1538/**
1539 * \def POLARSSL_X509_CSR_WRITE_C
1540 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001541 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001542 *
1543 * Module: library/x509_csr_write.c
1544 *
1545 * Requires: POLARSSL_CREATE_C
1546 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001547 * This module is required for X.509 certificate request writing.
1548 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001549#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001550
1551/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001552 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001553 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001554 * Enable the XTEA block cipher.
1555 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001556 * Module: library/xtea.c
1557 * Caller:
1558 */
1559#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001560
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001561/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001562
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001563/**
1564 * \name SECTION: Module configuration options
1565 *
1566 * This section allows for the setting of module specific sizes and
1567 * configuration options. The default values are already present in the
1568 * relevant header files and should suffice for the regular use cases.
1569 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1570 * only if you have a good reason and know the consequences.
1571 *
1572 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1573 * header file take precedence.
1574 *
1575 * Please check the respective header file for documentation on these
1576 * parameters (to prevent duplicate documentation).
1577 *
1578 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1579 * \{
1580 */
1581//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1582
1583#if defined(POLARSSL_CONFIG_OPTIONS)
1584
1585// MPI / BIGNUM options
1586//
1587#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1588#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1589
1590// CTR_DRBG options
1591//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001592#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 +02001593#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1594#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1595#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1596#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1597
1598// Entropy options
1599//
1600#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1601#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1602
Paul Bakker6e339b52013-07-03 13:37:05 +02001603// Memory options
1604#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1605#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1606#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1607
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001608// SSL Cache options
1609//
1610#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1611#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1612
1613// SSL options
1614//
1615#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001616#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001617
1618#endif /* POLARSSL_CONFIG_OPTIONS */
1619
1620/* \} name */
1621
Paul Bakker7ad00f92013-04-18 23:05:25 +02001622/*
1623 * Sanity checks on defines and dependencies
1624 */
1625#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1626#error "POLARSSL_DHM_C defined, but not all prerequisites"
1627#endif
1628
1629#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1630#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1631#endif
1632
1633#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1634#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1635#endif
1636
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001637#if defined(POLARSSL_ECDSA_C) && \
1638 ( !defined(POLARSSL_ECP_C) || \
1639 !defined(POLARSSL_ASN1_PARSE_C) || \
1640 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001641#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1642#endif
1643
1644#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1645#error "POLARSSL_ECP_C defined, but not all prerequisites"
1646#endif
1647
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001648#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1649 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001650#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1651#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001652#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1653 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1654#error "CTR_DRBG_ENTROPY_LEN value too high"
1655#endif
1656#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1657 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1658#error "CTR_DRBG_ENTROPY_LEN value too high"
1659#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001660
1661#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1662#error "POLARSSL_GCM_C defined, but not all prerequisites"
1663#endif
1664
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001665#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1666#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1667#endif
1668
Paul Bakkere07f41d2013-04-19 09:08:57 +02001669#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1670#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1671#endif
1672
1673#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1674 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001675 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) || \
1676 !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001677#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1678#endif
1679
1680#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1681 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001682 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) || \
1683 !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001684#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1685#endif
1686
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001687#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1688 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001689 !defined(POLARSSL_X509_CRT_PARSE_C) || \
1690 !defined(POLARSSL_X509_CRL_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001691#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1692#endif
1693
Paul Bakkere07f41d2013-04-19 09:08:57 +02001694#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001695 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001696 !defined(POLARSSL_PKCS1_V15) || !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001697#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1698#endif
1699
1700#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001701 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001702 !defined(POLARSSL_PKCS1_V15) || !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001703#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1704#endif
1705
Paul Bakker6e339b52013-07-03 13:37:05 +02001706#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1707#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1708#endif
1709
Paul Bakker7ad00f92013-04-18 23:05:25 +02001710#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1711#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1712#endif
1713
Paul Bakkercff68422013-09-15 20:43:33 +02001714#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1715#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1716#endif
1717
1718#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1719#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001720#endif
1721
Paul Bakker4606c732013-09-15 17:04:23 +02001722#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1723#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1724#endif
1725
1726#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1727#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1728#endif
1729
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001730#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001731#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1732#endif
1733
1734#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1735 !defined(POLARSSL_OID_C) )
1736#error "POLARSSL_RSA_C defined, but not all prerequisites"
1737#endif
1738
1739#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1740#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1741#endif
1742
Paul Bakker577e0062013-08-28 11:57:20 +02001743#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001744 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001745#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1746#endif
1747
1748#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1749#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1750#endif
1751
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001752#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1753 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1754 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1755#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1756#endif
1757
1758#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1759 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1760#error "Illegal protocol selection"
1761#endif
1762
1763#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1764 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1765#error "Illegal protocol selection"
1766#endif
1767
1768#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1769 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1770 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1771#error "Illegal protocol selection"
1772#endif
1773
Paul Bakker59da0a42013-08-19 13:27:17 +02001774#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001775 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1776 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001777#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1778#endif
1779
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001780#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001781 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001782 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001783#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001784#endif
1785
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001786#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1787 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1788 !defined(POLARSSL_PK_WRITE_C) )
1789#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1790#endif
1791
1792#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1793#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1794#endif
1795
1796#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1797#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1798#endif
1799
1800#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1801#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1802#endif
1803
1804#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1805#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1806#endif
1807
1808#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1809#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001810#endif
1811
Paul Bakker5121ce52009-01-03 21:22:43 +00001812#endif /* config.h */