blob: f2ac41c6780927b1a1eb14990e95fac6bad930d9 [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,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200289 * POLARSSL_X509_CRT_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,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200310 * POLARSSL_X509_CRT_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,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200336 * POLARSSL_X509_CRT_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,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200358 * POLARSSL_X509_CRT_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,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200381 *
382 * This enables the following ciphersuites (if other requisites are
383 * enabled as well):
384 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
385 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
386 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
387 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
388 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
389 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
390 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
391 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
392 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
393 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
394 */
395#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
396
397/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200398 * \def POLARSSL_ERROR_STRERROR_BC
399 *
400 * Make available the backward compatible error_strerror() next to the
401 * current polarssl_strerror().
402 *
403 * Disable if you run into name conflicts and want to really remove the
404 * error_strerror()
405 */
406#define POLARSSL_ERROR_STRERROR_BC
407
408/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100409 * \def POLARSSL_ERROR_STRERROR_DUMMY
410 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200411 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100412 * third party libraries easier.
413 *
414 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200415 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100416 */
417#define POLARSSL_ERROR_STRERROR_DUMMY
418
419/**
Paul Bakker15566e42011-04-24 21:19:15 +0000420 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000421 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200422 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200423 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200424 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000425 */
Paul Bakker15566e42011-04-24 21:19:15 +0000426#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000427
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000428/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000429 * \def POLARSSL_FS_IO
430 *
431 * Enable functions that use the filesystem.
432 */
433#define POLARSSL_FS_IO
434
435/**
Paul Bakker43655f42011-12-15 20:11:16 +0000436 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
437 *
438 * Do not add default entropy sources. These are the platform specific,
439 * hardclock and HAVEGE based poll functions.
440 *
441 * This is useful to have more control over the added entropy sources in an
442 * application.
443 *
444 * Uncomment this macro to prevent loading of default entropy functions.
445#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
446 */
447
448/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000449 * \def POLARSSL_NO_PLATFORM_ENTROPY
450 *
451 * Do not use built-in platform entropy functions.
452 * This is useful if your platform does not support
453 * standards like the /dev/urandom or Windows CryptoAPI.
454 *
455 * Uncomment this macro to disable the built-in platform entropy functions.
456#define POLARSSL_NO_PLATFORM_ENTROPY
457 */
458
459/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200460 * \def POLARSSL_MEMORY_DEBUG
461 *
462 * Enable debugging of buffer allocator memory issues. Automatically prints
463 * (to stderr) all (fatal) messages on memory allocation issues. Enables
464 * function for 'debug output' of allocated memory.
465 *
466 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
467 * fprintf()
468 *
469 * Uncomment this macro to let the buffer allocator print out error messages.
470#define POLARSSL_MEMORY_DEBUG
471*/
472
473/**
474 * \def POLARSSL_MEMORY_BACKTRACE
475 *
476 * Include backtrace information with each allocated block.
477 *
478 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
479 * GLIBC-compatible backtrace() an backtrace_symbols() support
480 *
481 * Uncomment this macro to include backtrace information
482#define POLARSSL_MEMORY_BACKTRACE
483 */
484
485/**
Paul Bakker48377d92013-08-30 12:06:24 +0200486 * \def POLARSSL_PKCS1_V15
487 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200488 * Enable support for PKCS#1 v1.5 encoding.
489 *
Paul Bakker48377d92013-08-30 12:06:24 +0200490 * Requires: POLARSSL_RSA_C
491 *
Paul Bakker48377d92013-08-30 12:06:24 +0200492 * This enables support for PKCS#1 v1.5 operations.
493 */
494#define POLARSSL_PKCS1_V15
495
496/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000497 * \def POLARSSL_PKCS1_V21
498 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200499 * Enable support for PKCS#1 v2.1 encoding.
500 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000501 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
502 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000503 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
504 */
505#define POLARSSL_PKCS1_V21
506
507/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000508 * \def POLARSSL_RSA_NO_CRT
509 *
510 * Do not use the Chinese Remainder Theorem for the RSA private operation.
511 *
512 * Uncomment this macro to disable the use of CRT in RSA.
513 *
514#define POLARSSL_RSA_NO_CRT
515 */
Paul Bakker15566e42011-04-24 21:19:15 +0000516
517/**
518 * \def POLARSSL_SELF_TEST
519 *
520 * Enable the checkup functions (*_self_test).
521 */
522#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000523
524/**
Paul Bakker40865c82013-01-31 17:13:13 +0100525 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
526 *
527 * Enable sending of alert messages in case of encountered errors as per RFC.
528 * If you choose not to send the alert messages, PolarSSL can still communicate
529 * with other servers, only debugging of failures is harder.
530 *
531 * The advantage of not sending alert messages, is that no information is given
532 * about reasons for failures thus preventing adversaries of gaining intel.
533 *
534 * Enable sending of all alert messages
535 */
536#define POLARSSL_SSL_ALERT_MESSAGES
537
538/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100539 * \def POLARSSL_SSL_DEBUG_ALL
540 *
541 * Enable the debug messages in SSL module for all issues.
542 * Debug messages have been disabled in some places to prevent timing
543 * attacks due to (unbalanced) debugging function calls.
544 *
545 * If you need all error reporting you should enable this during debugging,
546 * but remove this for production servers that should log as well.
547 *
548 * Uncomment this macro to report all debug messages on errors introducing
549 * a timing side-channel.
550 *
551#define POLARSSL_SSL_DEBUG_ALL
552 */
553
554/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000555 * \def POLARSSL_SSL_HW_RECORD_ACCEL
556 *
557 * Enable hooking functions in SSL module for hardware acceleration of
558 * individual records.
559 *
560 * Uncomment this macro to enable hooking functions.
561#define POLARSSL_SSL_HW_RECORD_ACCEL
562 */
563
564/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100565 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
566 *
567 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200568 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100569 *
570 * Comment this macro to disable support for SSLv2 Client Hello messages.
571 */
572#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
573
574/**
Paul Bakker05decb22013-08-15 13:33:48 +0200575 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
576 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200577 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200578 *
579 * Comment this macro to disable support for the max_fragment_length extension
580 */
581#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
582
583/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200584 * \def POLARSSL_SSL_PROTO_SSL3
585 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200586 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200587 *
588 * Requires: POLARSSL_MD5_C
589 * POLARSSL_SHA1_C
590 *
591 * Comment this macro to disable support for SSL 3.0
592 */
593#define POLARSSL_SSL_PROTO_SSL3
594
595/**
596 * \def POLARSSL_SSL_PROTO_TLS1
597 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200598 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200599 *
600 * Requires: POLARSSL_MD5_C
601 * POLARSSL_SHA1_C
602 *
603 * Comment this macro to disable support for TLS 1.0
604 */
605#define POLARSSL_SSL_PROTO_TLS1
606
607/**
608 * \def POLARSSL_SSL_PROTO_TLS1_1
609 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200610 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200611 *
612 * Requires: POLARSSL_MD5_C
613 * POLARSSL_SHA1_C
614 *
615 * Comment this macro to disable support for TLS 1.1
616 */
617#define POLARSSL_SSL_PROTO_TLS1_1
618
619/**
620 * \def POLARSSL_SSL_PROTO_TLS1_2
621 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200622 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200623 *
624 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
625 * (Depends on ciphersuites)
626 *
627 * Comment this macro to disable support for TLS 1.2
628 */
629#define POLARSSL_SSL_PROTO_TLS1_2
630
631/**
Paul Bakkera503a632013-08-14 13:48:06 +0200632 * \def POLARSSL_SSL_SESSION_TICKETS
633 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200634 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200635 *
636 * Requires: POLARSSL_AES_C
637 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200638 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200639 *
640 * Comment this macro to disable support for SSL session tickets
641 */
642#define POLARSSL_SSL_SESSION_TICKETS
643
644/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200645 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
646 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200647 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200648 *
649 * Comment this macro to disable support for server name indication in SSL
650 */
651#define POLARSSL_SSL_SERVER_NAME_INDICATION
652
653/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200654 * \def POLARSSL_SSL_TRUNCATED_HMAC
655 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200656 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200657 *
658 * Comment this macro to disable support for truncated HMAC in SSL
659 */
660#define POLARSSL_SSL_TRUNCATED_HMAC
661
662/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200663 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
664 *
665 * If set, the X509 parser will not break-off when parsing an X509 certificate
666 * and encountering an extension in a v1 or v2 certificate.
667 *
668 * Uncomment to prevent an error.
669 *
670#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
671 */
672
673/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000674 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
675 *
676 * If set, the X509 parser will not break-off when parsing an X509 certificate
677 * and encountering an unknown critical extension.
678 *
679 * Uncomment to prevent an error.
680 *
681#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
682 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000683
684/**
685 * \def POLARSSL_ZLIB_SUPPORT
686 *
687 * If set, the SSL/TLS module uses ZLIB to support compression and
688 * decompression of packet data.
689 *
690 * Used in: library/ssl_tls.c
691 * library/ssl_cli.c
692 * library/ssl_srv.c
693 *
694 * This feature requires zlib library and headers to be present.
695 *
696 * Uncomment to enable use of ZLIB
697#define POLARSSL_ZLIB_SUPPORT
698 */
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200699/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000700
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000701/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000702 * \name SECTION: PolarSSL modules
703 *
704 * This section enables or disables entire modules in PolarSSL
705 * \{
706 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000707
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000708/**
709 * \def POLARSSL_AES_C
710 *
711 * Enable the AES block cipher.
712 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000713 * Module: library/aes.c
714 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000715 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000716 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000717 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000718 * This module enables the following ciphersuites (if other requisites are
719 * enabled as well):
720 * TLS_RSA_WITH_AES_128_CBC_SHA
721 * TLS_RSA_WITH_AES_256_CBC_SHA
722 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
723 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
724 * TLS_RSA_WITH_AES_128_CBC_SHA256
725 * TLS_RSA_WITH_AES_256_CBC_SHA256
726 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
727 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
728 * TLS_RSA_WITH_AES_128_GCM_SHA256
729 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100730 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
731 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200732 * TLS_PSK_WITH_AES_128_CBC_SHA
733 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100734 *
Paul Bakkercff68422013-09-15 20:43:33 +0200735 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000736 */
Paul Bakker40e46942009-01-03 21:51:57 +0000737#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000738
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000739/**
740 * \def POLARSSL_ARC4_C
741 *
742 * Enable the ARCFOUR stream cipher.
743 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000744 * Module: library/arc4.c
745 * Caller: library/ssl_tls.c
746 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100747 * This module enables the following ciphersuites (if other requisites are
748 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000749 * TLS_RSA_WITH_RC4_128_MD5
750 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100751 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200752 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000753 */
Paul Bakker40e46942009-01-03 21:51:57 +0000754#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000755
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000756/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000757 * \def POLARSSL_ASN1_PARSE_C
758 *
759 * Enable the generic ASN1 parser.
760 *
761 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200762 * Caller: library/x509.c
763 * library/dhm.c
764 * library/pkcs12.c
765 * library/pkcs5.c
766 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000767 */
768#define POLARSSL_ASN1_PARSE_C
769
770/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000771 * \def POLARSSL_ASN1_WRITE_C
772 *
773 * Enable the generic ASN1 writer.
774 *
775 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200776 * Caller: library/ecdsa.c
777 * library/pkwrite.c
778 * library/x509_create.c
779 * library/x509write_crt.c
780 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000781 */
782#define POLARSSL_ASN1_WRITE_C
783
784/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000785 * \def POLARSSL_BASE64_C
786 *
787 * Enable the Base64 module.
788 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000789 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000790 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000791 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000792 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000793 */
Paul Bakker40e46942009-01-03 21:51:57 +0000794#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000795
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000796/**
797 * \def POLARSSL_BIGNUM_C
798 *
Paul Bakker9a736322012-11-14 12:39:52 +0000799 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000800 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000801 * Module: library/bignum.c
802 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200803 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000804 * library/rsa.c
805 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000806 *
807 * This module is required for RSA and DHM support.
808 */
Paul Bakker40e46942009-01-03 21:51:57 +0000809#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000810
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000811/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000812 * \def POLARSSL_BLOWFISH_C
813 *
814 * Enable the Blowfish block cipher.
815 *
816 * Module: library/blowfish.c
817 */
818#define POLARSSL_BLOWFISH_C
819
820/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000821 * \def POLARSSL_CAMELLIA_C
822 *
823 * Enable the Camellia block cipher.
824 *
Paul Bakker38119b12009-01-10 23:31:23 +0000825 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000826 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000827 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000828 * This module enables the following ciphersuites (if other requisites are
829 * enabled as well):
830 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
831 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
832 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
833 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
834 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
835 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
836 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
837 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000838 */
839#define POLARSSL_CAMELLIA_C
840
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000841/**
842 * \def POLARSSL_CERTS_C
843 *
844 * Enable the test certificates.
845 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000846 * Module: library/certs.c
847 * Caller:
848 *
849 * This module is used for testing (ssl_client/server).
850 */
Paul Bakker40e46942009-01-03 21:51:57 +0000851#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000852
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000853/**
854 * \def POLARSSL_CIPHER_C
855 *
856 * Enable the generic cipher layer.
857 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000858 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200859 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000860 *
861 * Uncomment to enable generic cipher wrappers.
862 */
863#define POLARSSL_CIPHER_C
864
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000865/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000866 * \def POLARSSL_CTR_DRBG_C
867 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200868 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000869 *
870 * Module: library/ctr_drbg.c
871 * Caller:
872 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000873 * Requires: POLARSSL_AES_C
874 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000875 * This module provides the CTR_DRBG AES-256 random number generator.
876 */
877#define POLARSSL_CTR_DRBG_C
878
879/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000880 * \def POLARSSL_DEBUG_C
881 *
882 * Enable the debug functions.
883 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000884 * Module: library/debug.c
885 * Caller: library/ssl_cli.c
886 * library/ssl_srv.c
887 * library/ssl_tls.c
888 *
889 * This module provides debugging functions.
890 */
Paul Bakker40e46942009-01-03 21:51:57 +0000891#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000892
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000893/**
894 * \def POLARSSL_DES_C
895 *
896 * Enable the DES block cipher.
897 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000898 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100899 * Caller: library/pem.c
900 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000901 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000902 * This module enables the following ciphersuites (if other requisites are
903 * enabled as well):
904 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
905 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100906 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200907 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100908 *
Paul Bakkercff68422013-09-15 20:43:33 +0200909 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000910 */
Paul Bakker40e46942009-01-03 21:51:57 +0000911#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000912
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000913/**
914 * \def POLARSSL_DHM_C
915 *
916 * Enable the Diffie-Hellman-Merkle key exchange.
917 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000918 * Module: library/dhm.c
919 * Caller: library/ssl_cli.c
920 * library/ssl_srv.c
921 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000922 * This module enables the following ciphersuites (if other requisites are
923 * enabled as well):
924 * TLS_DHE_RSA_WITH_DES_CBC_SHA
925 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
926 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
927 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
928 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
929 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
930 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
931 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
932 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
933 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
934 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
935 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000936 */
Paul Bakker40e46942009-01-03 21:51:57 +0000937#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000938
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000939/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100940 * \def POLARSSL_ECDH_C
941 *
942 * Enable the elliptic curve Diffie-Hellman library.
943 *
944 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100945 * Caller: library/ssl_cli.c
946 * library/ssl_srv.c
947 *
948 * This module enables the following ciphersuites (if other requisites are
949 * enabled as well):
950 * TLS_ECDHE_RSA_WITH_NULL_SHA
951 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
952 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
953 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
954 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100955 *
956 * Requires: POLARSSL_ECP_C
957 */
958#define POLARSSL_ECDH_C
959
960/**
961 * \def POLARSSL_ECDSA_C
962 *
963 * Enable the elliptic curve DSA library.
964 *
965 * Module: library/ecdsa.c
966 * Caller:
967 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +0200968 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100969 */
970#define POLARSSL_ECDSA_C
971
972/**
973 * \def POLARSSL_ECP_C
974 *
975 * Enable the elliptic curve over GF(p) library.
976 *
977 * Module: library/ecp.c
978 * Caller: library/ecdh.c
979 * library/ecdsa.c
980 *
981 * Requires: POLARSSL_BIGNUM_C
982 */
983#define POLARSSL_ECP_C
984
985/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000986 * \def POLARSSL_ENTROPY_C
987 *
988 * Enable the platform-specific entropy code.
989 *
990 * Module: library/entropy.c
991 * Caller:
992 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200993 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000994 *
995 * This module provides a generic entropy pool
996 */
997#define POLARSSL_ENTROPY_C
998
999/**
Paul Bakker9d781402011-05-09 16:17:09 +00001000 * \def POLARSSL_ERROR_C
1001 *
1002 * Enable error code to error string conversion.
1003 *
1004 * Module: library/error.c
1005 * Caller:
1006 *
1007 * This module enables err_strerror().
1008 */
1009#define POLARSSL_ERROR_C
1010
1011/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001012 * \def POLARSSL_GCM_C
1013 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001014 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001015 *
1016 * Module: library/gcm.c
1017 *
1018 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001019 *
1020 * This module enables the following ciphersuites (if other requisites are
1021 * enabled as well):
1022 * TLS_RSA_WITH_AES_128_GCM_SHA256
1023 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001024 */
1025#define POLARSSL_GCM_C
1026
1027/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001028 * \def POLARSSL_HAVEGE_C
1029 *
1030 * Enable the HAVEGE random generator.
1031 *
Paul Bakker2a844242013-06-24 13:01:53 +02001032 * Warning: the HAVEGE random generator is not suitable for virtualized
1033 * environments
1034 *
1035 * Warning: the HAVEGE random generator is dependent on timing and specific
1036 * processor traits. It is therefore not advised to use HAVEGE as
1037 * your applications primary random generator or primary entropy pool
1038 * input. As a secondary input to your entropy pool, it IS able add
1039 * the (limited) extra entropy it provides.
1040 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001041 * Module: library/havege.c
1042 * Caller:
1043 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001044 * Requires: POLARSSL_TIMING_C
1045 *
Paul Bakker2a844242013-06-24 13:01:53 +02001046 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001047#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001048 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001049
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001050/**
1051 * \def POLARSSL_MD_C
1052 *
1053 * Enable the generic message digest layer.
1054 *
Paul Bakker17373852011-01-06 14:20:01 +00001055 * Module: library/md.c
1056 * Caller:
1057 *
1058 * Uncomment to enable generic message digest wrappers.
1059 */
1060#define POLARSSL_MD_C
1061
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001062/**
1063 * \def POLARSSL_MD2_C
1064 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001065 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001066 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001067 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001068 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001069 *
1070 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1071 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001072#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001073 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001074
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001075/**
1076 * \def POLARSSL_MD4_C
1077 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001078 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001079 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001080 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001081 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001082 *
1083 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1084 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001085#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001086 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001087
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001088/**
1089 * \def POLARSSL_MD5_C
1090 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001091 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001092 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001093 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001094 * Caller: library/md.c
1095 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001096 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001097 *
1098 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001099 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001100 */
Paul Bakker40e46942009-01-03 21:51:57 +00001101#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001102
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001103/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001104 * \def POLARSSL_MEMORY_C
1105 *
1106 * Enable the memory allocation layer.
1107 * By default PolarSSL uses the system-provided malloc() and free().
1108 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1109 * are defined and unmodified)
1110 *
1111 * This allows different allocators (self-implemented or provided)
1112 *
1113 * Enable this layer to allow use of alternative memory allocators.
1114#define POLARSSL_MEMORY_C
1115 */
1116
1117/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001118 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1119 *
1120 * Enable the buffer allocator implementation that makes use of a (stack)
1121 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1122 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001123 *
1124 * Module: library/memory_buffer_alloc.c
1125 *
1126 * Requires: POLARSSL_MEMORY_C
1127 *
1128 * Enable this module to enable the buffer memory allocator.
1129#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1130 */
1131
1132/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001133 * \def POLARSSL_NET_C
1134 *
1135 * Enable the TCP/IP networking routines.
1136 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001137 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001138 *
1139 * This module provides TCP/IP networking routines.
1140 */
Paul Bakker40e46942009-01-03 21:51:57 +00001141#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001142
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001143/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001144 * \def POLARSSL_OID_C
1145 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001146 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001147 *
1148 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001149 * Caller: library/asn1write.c
1150 * library/pkcs5.c
1151 * library/pkparse.c
1152 * library/pkwrite.c
1153 * library/rsa.c
1154 * library/x509.c
1155 * library/x509_create.c
1156 * library/x509_crl.c
1157 * library/x509_crt.c
1158 * library/x509_csr.c
1159 * library/x509write_crt.c
1160 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001161 *
1162 * This modules translates between OIDs and internal values.
1163 */
1164#define POLARSSL_OID_C
1165
1166/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001167 * \def POLARSSL_PADLOCK_C
1168 *
1169 * Enable VIA Padlock support on x86.
1170 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001171 * Module: library/padlock.c
1172 * Caller: library/aes.c
1173 *
1174 * This modules adds support for the VIA PadLock on x86.
1175 */
Paul Bakker40e46942009-01-03 21:51:57 +00001176#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001177
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001178/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001179 * \def POLARSSL_PBKDF2_C
1180 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001181 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001182 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001183 *
1184 * Module: library/pbkdf2.c
1185 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001186 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001187 *
1188 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001189 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001190#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001191
1192/**
Paul Bakkercff68422013-09-15 20:43:33 +02001193 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001194 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001195 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001196 *
1197 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001198 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001199 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001200 * library/x509_crl.c
1201 * library/x509_crt.c
1202 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001203 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001204 * Requires: POLARSSL_BASE64_C
1205 *
Paul Bakkercff68422013-09-15 20:43:33 +02001206 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001207 */
Paul Bakkercff68422013-09-15 20:43:33 +02001208#define POLARSSL_PEM_PARSE_C
1209
1210/**
1211 * \def POLARSSL_PEM_WRITE_C
1212 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001213 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001214 *
1215 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001216 * Caller: library/pkwrite.c
1217 * library/x509write_crt.c
1218 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001219 *
1220 * Requires: POLARSSL_BASE64_C
1221 *
1222 * This modules adds support for encoding / writing PEM files.
1223 */
1224#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001225
1226/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001227 * \def POLARSSL_PK_C
1228 *
1229 * Enable the generic public (asymetric) key layer.
1230 *
1231 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001232 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001233 * library/ssl_cli.c
1234 * library/ssl_srv.c
1235 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001236 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1237 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001238 * Uncomment to enable generic public key wrappers.
1239 */
1240#define POLARSSL_PK_C
1241
1242/**
Paul Bakker4606c732013-09-15 17:04:23 +02001243 * \def POLARSSL_PK_PARSE_C
1244 *
1245 * Enable the generic public (asymetric) key parser.
1246 *
1247 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001248 * Caller: library/x509_crt.c
1249 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001250 *
1251 * Requires: POLARSSL_PK_C
1252 *
1253 * Uncomment to enable generic public key parse functions.
1254 */
1255#define POLARSSL_PK_PARSE_C
1256
1257/**
1258 * \def POLARSSL_PK_WRITE_C
1259 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001260 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001261 *
1262 * Module: library/pkwrite.c
1263 * Caller: library/x509write.c
1264 *
1265 * Requires: POLARSSL_PK_C
1266 *
1267 * Uncomment to enable generic public key write functions.
1268 */
1269#define POLARSSL_PK_WRITE_C
1270
1271/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001272 * \def POLARSSL_PKCS5_C
1273 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001274 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001275 *
1276 * Module: library/pkcs5.c
1277 *
1278 * Requires: POLARSSL_MD_C
1279 *
1280 * This module adds support for the PKCS#5 functions.
1281 */
1282#define POLARSSL_PKCS5_C
1283
1284/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001285 * \def POLARSSL_PKCS11_C
1286 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001287 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001288 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001289 * Module: library/pkcs11.c
1290 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001291 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001292 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001293 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001294 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001295 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1296#define POLARSSL_PKCS11_C
1297 */
1298
1299/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001300 * \def POLARSSL_PKCS12_C
1301 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001302 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001303 * Adds algorithms for parsing PKCS#8 encrypted private keys
1304 *
1305 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001306 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001307 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001308 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1309 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001310 *
1311 * This module enables PKCS#12 functions.
1312 */
1313#define POLARSSL_PKCS12_C
1314
1315/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001316 * \def POLARSSL_RSA_C
1317 *
1318 * Enable the RSA public-key cryptosystem.
1319 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001320 * Module: library/rsa.c
1321 * Caller: library/ssl_cli.c
1322 * library/ssl_srv.c
1323 * library/ssl_tls.c
1324 * library/x509.c
1325 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001326 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001327 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001328 * This module is required for SSL/TLS and MD5-signed certificates.
1329 */
Paul Bakker40e46942009-01-03 21:51:57 +00001330#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001331
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001332/**
1333 * \def POLARSSL_SHA1_C
1334 *
1335 * Enable the SHA1 cryptographic hash algorithm.
1336 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001337 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001338 * Caller: library/md.c
1339 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001340 * library/ssl_srv.c
1341 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001342 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001343 *
1344 * This module is required for SSL/TLS and SHA1-signed certificates.
1345 */
Paul Bakker40e46942009-01-03 21:51:57 +00001346#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001347
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001348/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001349 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001350 *
1351 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001352 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001353 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001354 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001355 * Caller: library/entropy.c
1356 * library/md.c
1357 * library/ssl_cli.c
1358 * library/ssl_srv.c
1359 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001360 *
1361 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001362 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001363 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001364#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001365
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001366/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001367 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001368 *
1369 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001370 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001371 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001372 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001373 * Caller: library/entropy.c
1374 * library/md.c
1375 * library/ssl_cli.c
1376 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001377 *
1378 * This module adds support for SHA-384 and SHA-512.
1379 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001380#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001381
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001382/**
Paul Bakker0a597072012-09-25 21:55:46 +00001383 * \def POLARSSL_SSL_CACHE_C
1384 *
1385 * Enable simple SSL cache implementation.
1386 *
1387 * Module: library/ssl_cache.c
1388 * Caller:
1389 *
1390 * Requires: POLARSSL_SSL_CACHE_C
1391 */
1392#define POLARSSL_SSL_CACHE_C
1393
1394/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001395 * \def POLARSSL_SSL_CLI_C
1396 *
1397 * Enable the SSL/TLS client code.
1398 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001399 * Module: library/ssl_cli.c
1400 * Caller:
1401 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001402 * Requires: POLARSSL_SSL_TLS_C
1403 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001404 * This module is required for SSL/TLS client support.
1405 */
Paul Bakker40e46942009-01-03 21:51:57 +00001406#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001407
Paul Bakker9a736322012-11-14 12:39:52 +00001408/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001409 * \def POLARSSL_SSL_SRV_C
1410 *
1411 * Enable the SSL/TLS server code.
1412 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001413 * Module: library/ssl_srv.c
1414 * Caller:
1415 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001416 * Requires: POLARSSL_SSL_TLS_C
1417 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001418 * This module is required for SSL/TLS server support.
1419 */
Paul Bakker40e46942009-01-03 21:51:57 +00001420#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001421
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001422/**
1423 * \def POLARSSL_SSL_TLS_C
1424 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001425 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001426 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001427 * Module: library/ssl_tls.c
1428 * Caller: library/ssl_cli.c
1429 * library/ssl_srv.c
1430 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001431 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001432 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001433 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001434 * This module is required for SSL/TLS.
1435 */
Paul Bakker40e46942009-01-03 21:51:57 +00001436#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001437
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001438/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001439 * \def POLARSSL_TIMING_C
1440 *
1441 * Enable the portable timing interface.
1442 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001443 * Module: library/timing.c
1444 * Caller: library/havege.c
1445 *
1446 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001447 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001448#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001449
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001450/**
1451 * \def POLARSSL_VERSION_C
1452 *
1453 * Enable run-time version information.
1454 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001455 * Module: library/version.c
1456 *
1457 * This module provides run-time version information.
1458 */
1459#define POLARSSL_VERSION_C
1460
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001461/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001462 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001463 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001464 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001465 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001466 * Module: library/x509.c
1467 * Caller: library/x509_crl.c
1468 * library/x509_crt.c
1469 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001470 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001471 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001472 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001473 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001474 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001475 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001476#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001477
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001478/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001479 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001480 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001481 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001482 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001483 * Module: library/x509_crt.c
1484 * Caller: library/ssl_cli.c
1485 * library/ssl_srv.c
1486 * library/ssl_tls.c
1487 *
1488 * Requires: POLARSSL_X509_USE_C
1489 *
1490 * This module is required for X.509 certificate parsing.
1491 */
1492#define POLARSSL_X509_CRT_PARSE_C
1493
1494/**
1495 * \def POLARSSL_X509_CRL_PARSE_C
1496 *
1497 * Enable X.509 CRL parsing.
1498 *
1499 * Module: library/x509_crl.c
1500 * Caller: library/x509_crt.c
1501 *
1502 * Requires: POLARSSL_X509_USE_C
1503 *
1504 * This module is required for X.509 CRL parsing.
1505 */
1506#define POLARSSL_X509_CRL_PARSE_C
1507
1508/**
1509 * \def POLARSSL_X509_CSR_PARSE_C
1510 *
1511 * Enable X.509 Certificate Signing Request (CSR) parsing.
1512 *
1513 * Module: library/x509_csr.c
1514 * Caller: library/x509_crt_write.c
1515 *
1516 * Requires: POLARSSL_X509_USE_C
1517 *
1518 * This module is used for reading X.509 certificate request.
1519 */
1520#define POLARSSL_X509_CSR_PARSE_C
1521
1522/**
1523 * \def POLARSSL_X509_CREATE_C
1524 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001525 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001526 *
1527 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001528 *
Paul Bakker4606c732013-09-15 17:04:23 +02001529 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001530 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001531 * This module is the basis for creating X.509 certificates and CSRs.
1532 */
1533#define POLARSSL_X509_CREATE_C
1534
1535/**
1536 * \def POLARSSL_X509_CRT_WRITE_C
1537 *
1538 * Enable creating X.509 certificates.
1539 *
1540 * Module: library/x509_crt_write.c
1541 *
1542 * Requires: POLARSSL_CREATE_C
1543 *
1544 * This module is required for X.509 certificate creation.
1545 */
1546#define POLARSSL_X509_CRT_WRITE_C
1547
1548/**
1549 * \def POLARSSL_X509_CSR_WRITE_C
1550 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001551 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001552 *
1553 * Module: library/x509_csr_write.c
1554 *
1555 * Requires: POLARSSL_CREATE_C
1556 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001557 * This module is required for X.509 certificate request writing.
1558 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001559#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001560
1561/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001562 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001563 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001564 * Enable the XTEA block cipher.
1565 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001566 * Module: library/xtea.c
1567 * Caller:
1568 */
1569#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001570
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001571/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001572
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001573/**
1574 * \name SECTION: Module configuration options
1575 *
1576 * This section allows for the setting of module specific sizes and
1577 * configuration options. The default values are already present in the
1578 * relevant header files and should suffice for the regular use cases.
1579 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1580 * only if you have a good reason and know the consequences.
1581 *
1582 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1583 * header file take precedence.
1584 *
1585 * Please check the respective header file for documentation on these
1586 * parameters (to prevent duplicate documentation).
1587 *
1588 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1589 * \{
1590 */
1591//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1592
1593#if defined(POLARSSL_CONFIG_OPTIONS)
1594
1595// MPI / BIGNUM options
1596//
1597#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1598#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1599
1600// CTR_DRBG options
1601//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001602#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 +02001603#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1604#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1605#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1606#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1607
1608// Entropy options
1609//
1610#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1611#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1612
Paul Bakker6e339b52013-07-03 13:37:05 +02001613// Memory options
1614#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1615#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1616#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1617
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001618// SSL Cache options
1619//
1620#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1621#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1622
1623// SSL options
1624//
1625#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001626#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001627
1628#endif /* POLARSSL_CONFIG_OPTIONS */
1629
1630/* \} name */
1631
Paul Bakker7ad00f92013-04-18 23:05:25 +02001632/*
1633 * Sanity checks on defines and dependencies
1634 */
1635#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1636#error "POLARSSL_DHM_C defined, but not all prerequisites"
1637#endif
1638
1639#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1640#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1641#endif
1642
1643#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1644#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1645#endif
1646
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001647#if defined(POLARSSL_ECDSA_C) && \
1648 ( !defined(POLARSSL_ECP_C) || \
1649 !defined(POLARSSL_ASN1_PARSE_C) || \
1650 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001651#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1652#endif
1653
1654#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1655#error "POLARSSL_ECP_C defined, but not all prerequisites"
1656#endif
1657
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001658#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1659 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001660#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1661#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001662#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1663 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1664#error "CTR_DRBG_ENTROPY_LEN value too high"
1665#endif
1666#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1667 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1668#error "CTR_DRBG_ENTROPY_LEN value too high"
1669#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001670
1671#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1672#error "POLARSSL_GCM_C defined, but not all prerequisites"
1673#endif
1674
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001675#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1676#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1677#endif
1678
Paul Bakkere07f41d2013-04-19 09:08:57 +02001679#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1680#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1681#endif
1682
1683#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1684 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001685 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001686#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1687#endif
1688
1689#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1690 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001691 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001692#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1693#endif
1694
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001695#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1696 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001697 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001698#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1699#endif
1700
Paul Bakkere07f41d2013-04-19 09:08:57 +02001701#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001702 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001703 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001704#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1705#endif
1706
1707#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001708 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001709 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001710#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1711#endif
1712
Paul Bakker6e339b52013-07-03 13:37:05 +02001713#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1714#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1715#endif
1716
Paul Bakker7ad00f92013-04-18 23:05:25 +02001717#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1718#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1719#endif
1720
Paul Bakkercff68422013-09-15 20:43:33 +02001721#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1722#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1723#endif
1724
1725#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1726#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001727#endif
1728
Paul Bakker4606c732013-09-15 17:04:23 +02001729#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1730#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1731#endif
1732
1733#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1734#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1735#endif
1736
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001737#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001738#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1739#endif
1740
1741#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1742 !defined(POLARSSL_OID_C) )
1743#error "POLARSSL_RSA_C defined, but not all prerequisites"
1744#endif
1745
1746#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1747#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1748#endif
1749
Paul Bakker577e0062013-08-28 11:57:20 +02001750#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001751 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001752#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1753#endif
1754
1755#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1756#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1757#endif
1758
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001759#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1760 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1761 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1762#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1763#endif
1764
1765#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1766 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1767#error "Illegal protocol selection"
1768#endif
1769
1770#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1771 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1772#error "Illegal protocol selection"
1773#endif
1774
1775#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1776 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1777 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1778#error "Illegal protocol selection"
1779#endif
1780
Paul Bakker59da0a42013-08-19 13:27:17 +02001781#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001782 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1783 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001784#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1785#endif
1786
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001787#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001788 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001789 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001790#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001791#endif
1792
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001793#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1794 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1795 !defined(POLARSSL_PK_WRITE_C) )
1796#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1797#endif
1798
1799#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1800#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1801#endif
1802
1803#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1804#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1805#endif
1806
1807#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1808#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1809#endif
1810
1811#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1812#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1813#endif
1814
1815#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1816#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001817#endif
1818
Paul Bakker5121ce52009-01-03 21:22:43 +00001819#endif /* config.h */