blob: 737e5b489cffc0bcdb06682bc7a26c3e8da2616d [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 Bakkerc27c4e22013-09-23 15:01:36 +0200664 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
665 *
666 * If set, the X509 parser will not break-off when parsing an X509 certificate
667 * and encountering an extension in a v1 or v2 certificate.
668 *
669 * Uncomment to prevent an error.
670 *
671#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
672 */
673
674/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000675 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
676 *
677 * If set, the X509 parser will not break-off when parsing an X509 certificate
678 * and encountering an unknown critical extension.
679 *
680 * Uncomment to prevent an error.
681 *
682#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
683 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000684
685/**
686 * \def POLARSSL_ZLIB_SUPPORT
687 *
688 * If set, the SSL/TLS module uses ZLIB to support compression and
689 * decompression of packet data.
690 *
691 * Used in: library/ssl_tls.c
692 * library/ssl_cli.c
693 * library/ssl_srv.c
694 *
695 * This feature requires zlib library and headers to be present.
696 *
697 * Uncomment to enable use of ZLIB
698#define POLARSSL_ZLIB_SUPPORT
699 */
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200700/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000701
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000702/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000703 * \name SECTION: PolarSSL modules
704 *
705 * This section enables or disables entire modules in PolarSSL
706 * \{
707 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000708
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000709/**
710 * \def POLARSSL_AES_C
711 *
712 * Enable the AES block cipher.
713 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000714 * Module: library/aes.c
715 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000716 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000717 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000718 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000719 * This module enables the following ciphersuites (if other requisites are
720 * enabled as well):
721 * TLS_RSA_WITH_AES_128_CBC_SHA
722 * TLS_RSA_WITH_AES_256_CBC_SHA
723 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
724 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
725 * TLS_RSA_WITH_AES_128_CBC_SHA256
726 * TLS_RSA_WITH_AES_256_CBC_SHA256
727 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
728 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
729 * TLS_RSA_WITH_AES_128_GCM_SHA256
730 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100731 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
732 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200733 * TLS_PSK_WITH_AES_128_CBC_SHA
734 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100735 *
Paul Bakkercff68422013-09-15 20:43:33 +0200736 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000737 */
Paul Bakker40e46942009-01-03 21:51:57 +0000738#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000739
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000740/**
741 * \def POLARSSL_ARC4_C
742 *
743 * Enable the ARCFOUR stream cipher.
744 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000745 * Module: library/arc4.c
746 * Caller: library/ssl_tls.c
747 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100748 * This module enables the following ciphersuites (if other requisites are
749 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000750 * TLS_RSA_WITH_RC4_128_MD5
751 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100752 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200753 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000754 */
Paul Bakker40e46942009-01-03 21:51:57 +0000755#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000756
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000757/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000758 * \def POLARSSL_ASN1_PARSE_C
759 *
760 * Enable the generic ASN1 parser.
761 *
762 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200763 * Caller: library/x509.c
764 * library/dhm.c
765 * library/pkcs12.c
766 * library/pkcs5.c
767 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000768 */
769#define POLARSSL_ASN1_PARSE_C
770
771/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000772 * \def POLARSSL_ASN1_WRITE_C
773 *
774 * Enable the generic ASN1 writer.
775 *
776 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200777 * Caller: library/ecdsa.c
778 * library/pkwrite.c
779 * library/x509_create.c
780 * library/x509write_crt.c
781 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000782 */
783#define POLARSSL_ASN1_WRITE_C
784
785/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000786 * \def POLARSSL_BASE64_C
787 *
788 * Enable the Base64 module.
789 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000790 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000791 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000792 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000793 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000794 */
Paul Bakker40e46942009-01-03 21:51:57 +0000795#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000796
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000797/**
798 * \def POLARSSL_BIGNUM_C
799 *
Paul Bakker9a736322012-11-14 12:39:52 +0000800 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000801 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000802 * Module: library/bignum.c
803 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200804 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000805 * library/rsa.c
806 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000807 *
808 * This module is required for RSA and DHM support.
809 */
Paul Bakker40e46942009-01-03 21:51:57 +0000810#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000811
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000812/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000813 * \def POLARSSL_BLOWFISH_C
814 *
815 * Enable the Blowfish block cipher.
816 *
817 * Module: library/blowfish.c
818 */
819#define POLARSSL_BLOWFISH_C
820
821/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000822 * \def POLARSSL_CAMELLIA_C
823 *
824 * Enable the Camellia block cipher.
825 *
Paul Bakker38119b12009-01-10 23:31:23 +0000826 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000827 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000828 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000829 * This module enables the following ciphersuites (if other requisites are
830 * enabled as well):
831 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
832 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
833 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
834 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
835 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
836 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
837 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
838 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000839 */
840#define POLARSSL_CAMELLIA_C
841
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000842/**
843 * \def POLARSSL_CERTS_C
844 *
845 * Enable the test certificates.
846 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000847 * Module: library/certs.c
848 * Caller:
849 *
850 * This module is used for testing (ssl_client/server).
851 */
Paul Bakker40e46942009-01-03 21:51:57 +0000852#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000853
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000854/**
855 * \def POLARSSL_CIPHER_C
856 *
857 * Enable the generic cipher layer.
858 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000859 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200860 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000861 *
862 * Uncomment to enable generic cipher wrappers.
863 */
864#define POLARSSL_CIPHER_C
865
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000866/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000867 * \def POLARSSL_CTR_DRBG_C
868 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200869 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000870 *
871 * Module: library/ctr_drbg.c
872 * Caller:
873 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000874 * Requires: POLARSSL_AES_C
875 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000876 * This module provides the CTR_DRBG AES-256 random number generator.
877 */
878#define POLARSSL_CTR_DRBG_C
879
880/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000881 * \def POLARSSL_DEBUG_C
882 *
883 * Enable the debug functions.
884 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000885 * Module: library/debug.c
886 * Caller: library/ssl_cli.c
887 * library/ssl_srv.c
888 * library/ssl_tls.c
889 *
890 * This module provides debugging functions.
891 */
Paul Bakker40e46942009-01-03 21:51:57 +0000892#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000893
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000894/**
895 * \def POLARSSL_DES_C
896 *
897 * Enable the DES block cipher.
898 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000899 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100900 * Caller: library/pem.c
901 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000902 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000903 * This module enables the following ciphersuites (if other requisites are
904 * enabled as well):
905 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
906 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100907 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200908 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100909 *
Paul Bakkercff68422013-09-15 20:43:33 +0200910 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000911 */
Paul Bakker40e46942009-01-03 21:51:57 +0000912#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000913
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000914/**
915 * \def POLARSSL_DHM_C
916 *
917 * Enable the Diffie-Hellman-Merkle key exchange.
918 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000919 * Module: library/dhm.c
920 * Caller: library/ssl_cli.c
921 * library/ssl_srv.c
922 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000923 * This module enables the following ciphersuites (if other requisites are
924 * enabled as well):
925 * TLS_DHE_RSA_WITH_DES_CBC_SHA
926 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
927 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
928 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
929 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
930 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
931 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
932 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
933 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
934 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
935 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
936 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000937 */
Paul Bakker40e46942009-01-03 21:51:57 +0000938#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000939
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000940/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100941 * \def POLARSSL_ECDH_C
942 *
943 * Enable the elliptic curve Diffie-Hellman library.
944 *
945 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100946 * Caller: library/ssl_cli.c
947 * library/ssl_srv.c
948 *
949 * This module enables the following ciphersuites (if other requisites are
950 * enabled as well):
951 * TLS_ECDHE_RSA_WITH_NULL_SHA
952 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
953 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
954 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
955 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100956 *
957 * Requires: POLARSSL_ECP_C
958 */
959#define POLARSSL_ECDH_C
960
961/**
962 * \def POLARSSL_ECDSA_C
963 *
964 * Enable the elliptic curve DSA library.
965 *
966 * Module: library/ecdsa.c
967 * Caller:
968 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +0200969 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100970 */
971#define POLARSSL_ECDSA_C
972
973/**
974 * \def POLARSSL_ECP_C
975 *
976 * Enable the elliptic curve over GF(p) library.
977 *
978 * Module: library/ecp.c
979 * Caller: library/ecdh.c
980 * library/ecdsa.c
981 *
982 * Requires: POLARSSL_BIGNUM_C
983 */
984#define POLARSSL_ECP_C
985
986/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000987 * \def POLARSSL_ENTROPY_C
988 *
989 * Enable the platform-specific entropy code.
990 *
991 * Module: library/entropy.c
992 * Caller:
993 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200994 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000995 *
996 * This module provides a generic entropy pool
997 */
998#define POLARSSL_ENTROPY_C
999
1000/**
Paul Bakker9d781402011-05-09 16:17:09 +00001001 * \def POLARSSL_ERROR_C
1002 *
1003 * Enable error code to error string conversion.
1004 *
1005 * Module: library/error.c
1006 * Caller:
1007 *
1008 * This module enables err_strerror().
1009 */
1010#define POLARSSL_ERROR_C
1011
1012/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001013 * \def POLARSSL_GCM_C
1014 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001015 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001016 *
1017 * Module: library/gcm.c
1018 *
1019 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001020 *
1021 * This module enables the following ciphersuites (if other requisites are
1022 * enabled as well):
1023 * TLS_RSA_WITH_AES_128_GCM_SHA256
1024 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001025 */
1026#define POLARSSL_GCM_C
1027
1028/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001029 * \def POLARSSL_HAVEGE_C
1030 *
1031 * Enable the HAVEGE random generator.
1032 *
Paul Bakker2a844242013-06-24 13:01:53 +02001033 * Warning: the HAVEGE random generator is not suitable for virtualized
1034 * environments
1035 *
1036 * Warning: the HAVEGE random generator is dependent on timing and specific
1037 * processor traits. It is therefore not advised to use HAVEGE as
1038 * your applications primary random generator or primary entropy pool
1039 * input. As a secondary input to your entropy pool, it IS able add
1040 * the (limited) extra entropy it provides.
1041 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001042 * Module: library/havege.c
1043 * Caller:
1044 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001045 * Requires: POLARSSL_TIMING_C
1046 *
Paul Bakker2a844242013-06-24 13:01:53 +02001047 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001048#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001049 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001050
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001051/**
1052 * \def POLARSSL_MD_C
1053 *
1054 * Enable the generic message digest layer.
1055 *
Paul Bakker17373852011-01-06 14:20:01 +00001056 * Module: library/md.c
1057 * Caller:
1058 *
1059 * Uncomment to enable generic message digest wrappers.
1060 */
1061#define POLARSSL_MD_C
1062
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001063/**
1064 * \def POLARSSL_MD2_C
1065 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001066 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001067 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001068 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001069 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001070 *
1071 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1072 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001073#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001074 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001075
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001076/**
1077 * \def POLARSSL_MD4_C
1078 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001079 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001080 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001081 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001082 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001083 *
1084 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1085 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001086#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001087 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001088
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001089/**
1090 * \def POLARSSL_MD5_C
1091 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001092 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001093 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001094 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001095 * Caller: library/md.c
1096 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001097 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001098 *
1099 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001100 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001101 */
Paul Bakker40e46942009-01-03 21:51:57 +00001102#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001103
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001104/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001105 * \def POLARSSL_MEMORY_C
1106 *
1107 * Enable the memory allocation layer.
1108 * By default PolarSSL uses the system-provided malloc() and free().
1109 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1110 * are defined and unmodified)
1111 *
1112 * This allows different allocators (self-implemented or provided)
1113 *
1114 * Enable this layer to allow use of alternative memory allocators.
1115#define POLARSSL_MEMORY_C
1116 */
1117
1118/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001119 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1120 *
1121 * Enable the buffer allocator implementation that makes use of a (stack)
1122 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1123 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001124 *
1125 * Module: library/memory_buffer_alloc.c
1126 *
1127 * Requires: POLARSSL_MEMORY_C
1128 *
1129 * Enable this module to enable the buffer memory allocator.
1130#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1131 */
1132
1133/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001134 * \def POLARSSL_NET_C
1135 *
1136 * Enable the TCP/IP networking routines.
1137 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001138 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001139 *
1140 * This module provides TCP/IP networking routines.
1141 */
Paul Bakker40e46942009-01-03 21:51:57 +00001142#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001143
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001144/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001145 * \def POLARSSL_OID_C
1146 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001147 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001148 *
1149 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001150 * Caller: library/asn1write.c
1151 * library/pkcs5.c
1152 * library/pkparse.c
1153 * library/pkwrite.c
1154 * library/rsa.c
1155 * library/x509.c
1156 * library/x509_create.c
1157 * library/x509_crl.c
1158 * library/x509_crt.c
1159 * library/x509_csr.c
1160 * library/x509write_crt.c
1161 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001162 *
1163 * This modules translates between OIDs and internal values.
1164 */
1165#define POLARSSL_OID_C
1166
1167/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001168 * \def POLARSSL_PADLOCK_C
1169 *
1170 * Enable VIA Padlock support on x86.
1171 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001172 * Module: library/padlock.c
1173 * Caller: library/aes.c
1174 *
1175 * This modules adds support for the VIA PadLock on x86.
1176 */
Paul Bakker40e46942009-01-03 21:51:57 +00001177#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001178
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001179/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001180 * \def POLARSSL_PBKDF2_C
1181 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001182 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001183 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001184 *
1185 * Module: library/pbkdf2.c
1186 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001187 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001188 *
1189 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001190 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001191#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001192
1193/**
Paul Bakkercff68422013-09-15 20:43:33 +02001194 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001195 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001196 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001197 *
1198 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001199 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001200 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001201 * library/x509_crl.c
1202 * library/x509_crt.c
1203 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001204 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001205 * Requires: POLARSSL_BASE64_C
1206 *
Paul Bakkercff68422013-09-15 20:43:33 +02001207 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001208 */
Paul Bakkercff68422013-09-15 20:43:33 +02001209#define POLARSSL_PEM_PARSE_C
1210
1211/**
1212 * \def POLARSSL_PEM_WRITE_C
1213 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001214 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001215 *
1216 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001217 * Caller: library/pkwrite.c
1218 * library/x509write_crt.c
1219 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001220 *
1221 * Requires: POLARSSL_BASE64_C
1222 *
1223 * This modules adds support for encoding / writing PEM files.
1224 */
1225#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001226
1227/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001228 * \def POLARSSL_PK_C
1229 *
1230 * Enable the generic public (asymetric) key layer.
1231 *
1232 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001233 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001234 * library/ssl_cli.c
1235 * library/ssl_srv.c
1236 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001237 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1238 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001239 * Uncomment to enable generic public key wrappers.
1240 */
1241#define POLARSSL_PK_C
1242
1243/**
Paul Bakker4606c732013-09-15 17:04:23 +02001244 * \def POLARSSL_PK_PARSE_C
1245 *
1246 * Enable the generic public (asymetric) key parser.
1247 *
1248 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001249 * Caller: library/x509_crt.c
1250 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001251 *
1252 * Requires: POLARSSL_PK_C
1253 *
1254 * Uncomment to enable generic public key parse functions.
1255 */
1256#define POLARSSL_PK_PARSE_C
1257
1258/**
1259 * \def POLARSSL_PK_WRITE_C
1260 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001261 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001262 *
1263 * Module: library/pkwrite.c
1264 * Caller: library/x509write.c
1265 *
1266 * Requires: POLARSSL_PK_C
1267 *
1268 * Uncomment to enable generic public key write functions.
1269 */
1270#define POLARSSL_PK_WRITE_C
1271
1272/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001273 * \def POLARSSL_PKCS5_C
1274 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001275 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001276 *
1277 * Module: library/pkcs5.c
1278 *
1279 * Requires: POLARSSL_MD_C
1280 *
1281 * This module adds support for the PKCS#5 functions.
1282 */
1283#define POLARSSL_PKCS5_C
1284
1285/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001286 * \def POLARSSL_PKCS11_C
1287 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001288 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001289 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001290 * Module: library/pkcs11.c
1291 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001292 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001293 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001294 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001295 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001296 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1297#define POLARSSL_PKCS11_C
1298 */
1299
1300/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001301 * \def POLARSSL_PKCS12_C
1302 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001303 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001304 * Adds algorithms for parsing PKCS#8 encrypted private keys
1305 *
1306 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001307 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001308 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001309 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1310 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001311 *
1312 * This module enables PKCS#12 functions.
1313 */
1314#define POLARSSL_PKCS12_C
1315
1316/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001317 * \def POLARSSL_RSA_C
1318 *
1319 * Enable the RSA public-key cryptosystem.
1320 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001321 * Module: library/rsa.c
1322 * Caller: library/ssl_cli.c
1323 * library/ssl_srv.c
1324 * library/ssl_tls.c
1325 * library/x509.c
1326 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001327 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001328 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001329 * This module is required for SSL/TLS and MD5-signed certificates.
1330 */
Paul Bakker40e46942009-01-03 21:51:57 +00001331#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001332
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001333/**
1334 * \def POLARSSL_SHA1_C
1335 *
1336 * Enable the SHA1 cryptographic hash algorithm.
1337 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001338 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001339 * Caller: library/md.c
1340 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001341 * library/ssl_srv.c
1342 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001343 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001344 *
1345 * This module is required for SSL/TLS and SHA1-signed certificates.
1346 */
Paul Bakker40e46942009-01-03 21:51:57 +00001347#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001348
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001349/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001350 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001351 *
1352 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001353 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001354 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001355 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001356 * Caller: library/entropy.c
1357 * library/md.c
1358 * library/ssl_cli.c
1359 * library/ssl_srv.c
1360 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001361 *
1362 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001363 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001364 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001365#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001366
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001367/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001368 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001369 *
1370 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001371 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001372 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001373 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001374 * Caller: library/entropy.c
1375 * library/md.c
1376 * library/ssl_cli.c
1377 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001378 *
1379 * This module adds support for SHA-384 and SHA-512.
1380 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001381#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001382
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001383/**
Paul Bakker0a597072012-09-25 21:55:46 +00001384 * \def POLARSSL_SSL_CACHE_C
1385 *
1386 * Enable simple SSL cache implementation.
1387 *
1388 * Module: library/ssl_cache.c
1389 * Caller:
1390 *
1391 * Requires: POLARSSL_SSL_CACHE_C
1392 */
1393#define POLARSSL_SSL_CACHE_C
1394
1395/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001396 * \def POLARSSL_SSL_CLI_C
1397 *
1398 * Enable the SSL/TLS client code.
1399 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001400 * Module: library/ssl_cli.c
1401 * Caller:
1402 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001403 * Requires: POLARSSL_SSL_TLS_C
1404 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001405 * This module is required for SSL/TLS client support.
1406 */
Paul Bakker40e46942009-01-03 21:51:57 +00001407#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001408
Paul Bakker9a736322012-11-14 12:39:52 +00001409/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001410 * \def POLARSSL_SSL_SRV_C
1411 *
1412 * Enable the SSL/TLS server code.
1413 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001414 * Module: library/ssl_srv.c
1415 * Caller:
1416 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001417 * Requires: POLARSSL_SSL_TLS_C
1418 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001419 * This module is required for SSL/TLS server support.
1420 */
Paul Bakker40e46942009-01-03 21:51:57 +00001421#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001422
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001423/**
1424 * \def POLARSSL_SSL_TLS_C
1425 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001426 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001427 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001428 * Module: library/ssl_tls.c
1429 * Caller: library/ssl_cli.c
1430 * library/ssl_srv.c
1431 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001432 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001433 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001434 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001435 * This module is required for SSL/TLS.
1436 */
Paul Bakker40e46942009-01-03 21:51:57 +00001437#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001438
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001439/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001440 * \def POLARSSL_TIMING_C
1441 *
1442 * Enable the portable timing interface.
1443 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001444 * Module: library/timing.c
1445 * Caller: library/havege.c
1446 *
1447 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001448 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001449#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001450
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001451/**
1452 * \def POLARSSL_VERSION_C
1453 *
1454 * Enable run-time version information.
1455 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001456 * Module: library/version.c
1457 *
1458 * This module provides run-time version information.
1459 */
1460#define POLARSSL_VERSION_C
1461
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001462/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001463 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001464 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001465 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001466 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001467 * Module: library/x509.c
1468 * Caller: library/x509_crl.c
1469 * library/x509_crt.c
1470 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001471 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001472 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001473 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001474 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001475 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001476 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001477#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001478
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001479/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001480 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001481 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001482 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001483 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001484 * Module: library/x509_crt.c
1485 * Caller: library/ssl_cli.c
1486 * library/ssl_srv.c
1487 * library/ssl_tls.c
1488 *
1489 * Requires: POLARSSL_X509_USE_C
1490 *
1491 * This module is required for X.509 certificate parsing.
1492 */
1493#define POLARSSL_X509_CRT_PARSE_C
1494
1495/**
1496 * \def POLARSSL_X509_CRL_PARSE_C
1497 *
1498 * Enable X.509 CRL parsing.
1499 *
1500 * Module: library/x509_crl.c
1501 * Caller: library/x509_crt.c
1502 *
1503 * Requires: POLARSSL_X509_USE_C
1504 *
1505 * This module is required for X.509 CRL parsing.
1506 */
1507#define POLARSSL_X509_CRL_PARSE_C
1508
1509/**
1510 * \def POLARSSL_X509_CSR_PARSE_C
1511 *
1512 * Enable X.509 Certificate Signing Request (CSR) parsing.
1513 *
1514 * Module: library/x509_csr.c
1515 * Caller: library/x509_crt_write.c
1516 *
1517 * Requires: POLARSSL_X509_USE_C
1518 *
1519 * This module is used for reading X.509 certificate request.
1520 */
1521#define POLARSSL_X509_CSR_PARSE_C
1522
1523/**
1524 * \def POLARSSL_X509_CREATE_C
1525 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001526 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001527 *
1528 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001529 *
Paul Bakker4606c732013-09-15 17:04:23 +02001530 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001531 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001532 * This module is the basis for creating X.509 certificates and CSRs.
1533 */
1534#define POLARSSL_X509_CREATE_C
1535
1536/**
1537 * \def POLARSSL_X509_CRT_WRITE_C
1538 *
1539 * Enable creating X.509 certificates.
1540 *
1541 * Module: library/x509_crt_write.c
1542 *
1543 * Requires: POLARSSL_CREATE_C
1544 *
1545 * This module is required for X.509 certificate creation.
1546 */
1547#define POLARSSL_X509_CRT_WRITE_C
1548
1549/**
1550 * \def POLARSSL_X509_CSR_WRITE_C
1551 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001552 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001553 *
1554 * Module: library/x509_csr_write.c
1555 *
1556 * Requires: POLARSSL_CREATE_C
1557 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001558 * This module is required for X.509 certificate request writing.
1559 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001560#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001561
1562/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001563 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001564 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001565 * Enable the XTEA block cipher.
1566 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001567 * Module: library/xtea.c
1568 * Caller:
1569 */
1570#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001571
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001572/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001573
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001574/**
1575 * \name SECTION: Module configuration options
1576 *
1577 * This section allows for the setting of module specific sizes and
1578 * configuration options. The default values are already present in the
1579 * relevant header files and should suffice for the regular use cases.
1580 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1581 * only if you have a good reason and know the consequences.
1582 *
1583 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1584 * header file take precedence.
1585 *
1586 * Please check the respective header file for documentation on these
1587 * parameters (to prevent duplicate documentation).
1588 *
1589 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1590 * \{
1591 */
1592//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1593
1594#if defined(POLARSSL_CONFIG_OPTIONS)
1595
1596// MPI / BIGNUM options
1597//
1598#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1599#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1600
1601// CTR_DRBG options
1602//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001603#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 +02001604#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1605#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1606#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1607#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1608
1609// Entropy options
1610//
1611#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1612#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1613
Paul Bakker6e339b52013-07-03 13:37:05 +02001614// Memory options
1615#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1616#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1617#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1618
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001619// SSL Cache options
1620//
1621#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1622#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1623
1624// SSL options
1625//
1626#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001627#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001628
1629#endif /* POLARSSL_CONFIG_OPTIONS */
1630
1631/* \} name */
1632
Paul Bakker7ad00f92013-04-18 23:05:25 +02001633/*
1634 * Sanity checks on defines and dependencies
1635 */
1636#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1637#error "POLARSSL_DHM_C defined, but not all prerequisites"
1638#endif
1639
1640#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1641#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1642#endif
1643
1644#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1645#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1646#endif
1647
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001648#if defined(POLARSSL_ECDSA_C) && \
1649 ( !defined(POLARSSL_ECP_C) || \
1650 !defined(POLARSSL_ASN1_PARSE_C) || \
1651 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001652#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1653#endif
1654
1655#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1656#error "POLARSSL_ECP_C defined, but not all prerequisites"
1657#endif
1658
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001659#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1660 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001661#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1662#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001663#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1664 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1665#error "CTR_DRBG_ENTROPY_LEN value too high"
1666#endif
1667#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1668 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1669#error "CTR_DRBG_ENTROPY_LEN value too high"
1670#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001671
1672#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1673#error "POLARSSL_GCM_C defined, but not all prerequisites"
1674#endif
1675
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001676#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1677#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1678#endif
1679
Paul Bakkere07f41d2013-04-19 09:08:57 +02001680#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1681#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1682#endif
1683
1684#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1685 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001686 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) || \
1687 !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001688#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1689#endif
1690
1691#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1692 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001693 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) || \
1694 !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001695#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1696#endif
1697
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001698#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1699 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001700 !defined(POLARSSL_X509_CRT_PARSE_C) || \
1701 !defined(POLARSSL_X509_CRL_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001702#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1703#endif
1704
Paul Bakkere07f41d2013-04-19 09:08:57 +02001705#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001706 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001707 !defined(POLARSSL_PKCS1_V15) || !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001708#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1709#endif
1710
1711#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001712 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001713 !defined(POLARSSL_PKCS1_V15) || !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001714#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1715#endif
1716
Paul Bakker6e339b52013-07-03 13:37:05 +02001717#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1718#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1719#endif
1720
Paul Bakker7ad00f92013-04-18 23:05:25 +02001721#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1722#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1723#endif
1724
Paul Bakkercff68422013-09-15 20:43:33 +02001725#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1726#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1727#endif
1728
1729#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1730#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001731#endif
1732
Paul Bakker4606c732013-09-15 17:04:23 +02001733#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1734#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1735#endif
1736
1737#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1738#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1739#endif
1740
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001741#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001742#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1743#endif
1744
1745#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1746 !defined(POLARSSL_OID_C) )
1747#error "POLARSSL_RSA_C defined, but not all prerequisites"
1748#endif
1749
1750#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1751#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1752#endif
1753
Paul Bakker577e0062013-08-28 11:57:20 +02001754#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001755 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001756#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1757#endif
1758
1759#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1760#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1761#endif
1762
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001763#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1764 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1765 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1766#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1767#endif
1768
1769#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1770 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1771#error "Illegal protocol selection"
1772#endif
1773
1774#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1775 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1776#error "Illegal protocol selection"
1777#endif
1778
1779#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1780 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1781 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1782#error "Illegal protocol selection"
1783#endif
1784
Paul Bakker59da0a42013-08-19 13:27:17 +02001785#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001786 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1787 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001788#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1789#endif
1790
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001791#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001792 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001793 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001794#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001795#endif
1796
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001797#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1798 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1799 !defined(POLARSSL_PK_WRITE_C) )
1800#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1801#endif
1802
1803#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1804#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1805#endif
1806
1807#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1808#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1809#endif
1810
1811#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1812#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1813#endif
1814
1815#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1816#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1817#endif
1818
1819#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1820#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001821#endif
1822
Paul Bakker5121ce52009-01-03 21:22:43 +00001823#endif /* config.h */