blob: bd123439631e548485b18dc5fc8f67366373234a [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 Bakker2466d932013-09-28 14:40:38 +0200663 * \def POLARSSL_THREADING_ALT
664 *
665 * Provide your own alternate threading implementation.
666 *
667 * Requires: POLARSSL_THREADING_C
668 *
669 * Uncomment this to allow your own alternate threading implementation.
670#define POLARSSL_THREADING_ALT
671 */
672
673/**
674 * \def POLARSSL_THREADING_DUMMY
675 *
676 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200677 * Warning: If you use this, all claims of thread-safety in the documentation
678 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200679 *
680 * Requires: POLARSSL_THREADING_C
681 *
682 * Uncomment this to enable code to compile like with threading enabled
683#define POLARSSL_THREADING_DUMMY
684 */
685
686/**
687 * \def POLARSSL_THREADING_PTHREAD
688 *
689 * Enable the pthread wrapper layer for the threading layer.
690 *
691 * Requires: POLARSSL_THREADING_C
692 *
693 * Uncomment this to enable pthread mutexes.
694#define POLARSSL_THREADING_PTHREAD
695 */
696
697/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200698 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
699 *
700 * If set, the X509 parser will not break-off when parsing an X509 certificate
701 * and encountering an extension in a v1 or v2 certificate.
702 *
703 * Uncomment to prevent an error.
704 *
705#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
706 */
707
708/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000709 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
710 *
711 * If set, the X509 parser will not break-off when parsing an X509 certificate
712 * and encountering an unknown critical extension.
713 *
714 * Uncomment to prevent an error.
715 *
716#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
717 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000718
719/**
720 * \def POLARSSL_ZLIB_SUPPORT
721 *
722 * If set, the SSL/TLS module uses ZLIB to support compression and
723 * decompression of packet data.
724 *
725 * Used in: library/ssl_tls.c
726 * library/ssl_cli.c
727 * library/ssl_srv.c
728 *
729 * This feature requires zlib library and headers to be present.
730 *
731 * Uncomment to enable use of ZLIB
732#define POLARSSL_ZLIB_SUPPORT
733 */
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200734/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000735
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000736/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000737 * \name SECTION: PolarSSL modules
738 *
739 * This section enables or disables entire modules in PolarSSL
740 * \{
741 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000742
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000743/**
744 * \def POLARSSL_AES_C
745 *
746 * Enable the AES block cipher.
747 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000748 * Module: library/aes.c
749 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000750 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000751 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000752 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000753 * This module enables the following ciphersuites (if other requisites are
754 * enabled as well):
755 * TLS_RSA_WITH_AES_128_CBC_SHA
756 * TLS_RSA_WITH_AES_256_CBC_SHA
757 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
758 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
759 * TLS_RSA_WITH_AES_128_CBC_SHA256
760 * TLS_RSA_WITH_AES_256_CBC_SHA256
761 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
762 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
763 * TLS_RSA_WITH_AES_128_GCM_SHA256
764 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100765 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
766 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200767 * TLS_PSK_WITH_AES_128_CBC_SHA
768 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100769 *
Paul Bakkercff68422013-09-15 20:43:33 +0200770 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000771 */
Paul Bakker40e46942009-01-03 21:51:57 +0000772#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000773
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000774/**
775 * \def POLARSSL_ARC4_C
776 *
777 * Enable the ARCFOUR stream cipher.
778 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000779 * Module: library/arc4.c
780 * Caller: library/ssl_tls.c
781 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100782 * This module enables the following ciphersuites (if other requisites are
783 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000784 * TLS_RSA_WITH_RC4_128_MD5
785 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100786 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200787 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000788 */
Paul Bakker40e46942009-01-03 21:51:57 +0000789#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000790
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000791/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000792 * \def POLARSSL_ASN1_PARSE_C
793 *
794 * Enable the generic ASN1 parser.
795 *
796 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200797 * Caller: library/x509.c
798 * library/dhm.c
799 * library/pkcs12.c
800 * library/pkcs5.c
801 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000802 */
803#define POLARSSL_ASN1_PARSE_C
804
805/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000806 * \def POLARSSL_ASN1_WRITE_C
807 *
808 * Enable the generic ASN1 writer.
809 *
810 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200811 * Caller: library/ecdsa.c
812 * library/pkwrite.c
813 * library/x509_create.c
814 * library/x509write_crt.c
815 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000816 */
817#define POLARSSL_ASN1_WRITE_C
818
819/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000820 * \def POLARSSL_BASE64_C
821 *
822 * Enable the Base64 module.
823 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000824 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000825 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000826 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000827 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000828 */
Paul Bakker40e46942009-01-03 21:51:57 +0000829#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000830
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000831/**
832 * \def POLARSSL_BIGNUM_C
833 *
Paul Bakker9a736322012-11-14 12:39:52 +0000834 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000835 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000836 * Module: library/bignum.c
837 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200838 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000839 * library/rsa.c
840 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000841 *
842 * This module is required for RSA and DHM support.
843 */
Paul Bakker40e46942009-01-03 21:51:57 +0000844#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000845
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000846/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000847 * \def POLARSSL_BLOWFISH_C
848 *
849 * Enable the Blowfish block cipher.
850 *
851 * Module: library/blowfish.c
852 */
853#define POLARSSL_BLOWFISH_C
854
855/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000856 * \def POLARSSL_CAMELLIA_C
857 *
858 * Enable the Camellia block cipher.
859 *
Paul Bakker38119b12009-01-10 23:31:23 +0000860 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000861 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000862 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000863 * This module enables the following ciphersuites (if other requisites are
864 * enabled as well):
865 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
866 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
867 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
868 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
869 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
870 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
871 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
872 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000873 */
874#define POLARSSL_CAMELLIA_C
875
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000876/**
877 * \def POLARSSL_CERTS_C
878 *
879 * Enable the test certificates.
880 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000881 * Module: library/certs.c
882 * Caller:
883 *
884 * This module is used for testing (ssl_client/server).
885 */
Paul Bakker40e46942009-01-03 21:51:57 +0000886#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000887
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000888/**
889 * \def POLARSSL_CIPHER_C
890 *
891 * Enable the generic cipher layer.
892 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000893 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200894 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000895 *
896 * Uncomment to enable generic cipher wrappers.
897 */
898#define POLARSSL_CIPHER_C
899
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000900/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000901 * \def POLARSSL_CTR_DRBG_C
902 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200903 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000904 *
905 * Module: library/ctr_drbg.c
906 * Caller:
907 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000908 * Requires: POLARSSL_AES_C
909 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000910 * This module provides the CTR_DRBG AES-256 random number generator.
911 */
912#define POLARSSL_CTR_DRBG_C
913
914/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000915 * \def POLARSSL_DEBUG_C
916 *
917 * Enable the debug functions.
918 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000919 * Module: library/debug.c
920 * Caller: library/ssl_cli.c
921 * library/ssl_srv.c
922 * library/ssl_tls.c
923 *
924 * This module provides debugging functions.
925 */
Paul Bakker40e46942009-01-03 21:51:57 +0000926#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000927
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000928/**
929 * \def POLARSSL_DES_C
930 *
931 * Enable the DES block cipher.
932 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000933 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100934 * Caller: library/pem.c
935 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000936 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000937 * This module enables the following ciphersuites (if other requisites are
938 * enabled as well):
939 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
940 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100941 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200942 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100943 *
Paul Bakkercff68422013-09-15 20:43:33 +0200944 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000945 */
Paul Bakker40e46942009-01-03 21:51:57 +0000946#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000947
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000948/**
949 * \def POLARSSL_DHM_C
950 *
951 * Enable the Diffie-Hellman-Merkle key exchange.
952 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000953 * Module: library/dhm.c
954 * Caller: library/ssl_cli.c
955 * library/ssl_srv.c
956 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000957 * This module enables the following ciphersuites (if other requisites are
958 * enabled as well):
959 * TLS_DHE_RSA_WITH_DES_CBC_SHA
960 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
961 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
962 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
963 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
964 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
965 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
966 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
967 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
968 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
969 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
970 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000971 */
Paul Bakker40e46942009-01-03 21:51:57 +0000972#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000973
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000974/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100975 * \def POLARSSL_ECDH_C
976 *
977 * Enable the elliptic curve Diffie-Hellman library.
978 *
979 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100980 * Caller: library/ssl_cli.c
981 * library/ssl_srv.c
982 *
983 * This module enables the following ciphersuites (if other requisites are
984 * enabled as well):
985 * TLS_ECDHE_RSA_WITH_NULL_SHA
986 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
987 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
988 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
989 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100990 *
991 * Requires: POLARSSL_ECP_C
992 */
993#define POLARSSL_ECDH_C
994
995/**
996 * \def POLARSSL_ECDSA_C
997 *
998 * Enable the elliptic curve DSA library.
999 *
1000 * Module: library/ecdsa.c
1001 * Caller:
1002 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001003 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001004 */
1005#define POLARSSL_ECDSA_C
1006
1007/**
1008 * \def POLARSSL_ECP_C
1009 *
1010 * Enable the elliptic curve over GF(p) library.
1011 *
1012 * Module: library/ecp.c
1013 * Caller: library/ecdh.c
1014 * library/ecdsa.c
1015 *
1016 * Requires: POLARSSL_BIGNUM_C
1017 */
1018#define POLARSSL_ECP_C
1019
1020/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001021 * \def POLARSSL_ENTROPY_C
1022 *
1023 * Enable the platform-specific entropy code.
1024 *
1025 * Module: library/entropy.c
1026 * Caller:
1027 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001028 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001029 *
1030 * This module provides a generic entropy pool
1031 */
1032#define POLARSSL_ENTROPY_C
1033
1034/**
Paul Bakker9d781402011-05-09 16:17:09 +00001035 * \def POLARSSL_ERROR_C
1036 *
1037 * Enable error code to error string conversion.
1038 *
1039 * Module: library/error.c
1040 * Caller:
1041 *
1042 * This module enables err_strerror().
1043 */
1044#define POLARSSL_ERROR_C
1045
1046/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001047 * \def POLARSSL_GCM_C
1048 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001049 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001050 *
1051 * Module: library/gcm.c
1052 *
1053 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001054 *
1055 * This module enables the following ciphersuites (if other requisites are
1056 * enabled as well):
1057 * TLS_RSA_WITH_AES_128_GCM_SHA256
1058 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001059 */
1060#define POLARSSL_GCM_C
1061
1062/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001063 * \def POLARSSL_HAVEGE_C
1064 *
1065 * Enable the HAVEGE random generator.
1066 *
Paul Bakker2a844242013-06-24 13:01:53 +02001067 * Warning: the HAVEGE random generator is not suitable for virtualized
1068 * environments
1069 *
1070 * Warning: the HAVEGE random generator is dependent on timing and specific
1071 * processor traits. It is therefore not advised to use HAVEGE as
1072 * your applications primary random generator or primary entropy pool
1073 * input. As a secondary input to your entropy pool, it IS able add
1074 * the (limited) extra entropy it provides.
1075 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001076 * Module: library/havege.c
1077 * Caller:
1078 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001079 * Requires: POLARSSL_TIMING_C
1080 *
Paul Bakker2a844242013-06-24 13:01:53 +02001081 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001082#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001083 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001084
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001085/**
1086 * \def POLARSSL_MD_C
1087 *
1088 * Enable the generic message digest layer.
1089 *
Paul Bakker17373852011-01-06 14:20:01 +00001090 * Module: library/md.c
1091 * Caller:
1092 *
1093 * Uncomment to enable generic message digest wrappers.
1094 */
1095#define POLARSSL_MD_C
1096
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001097/**
1098 * \def POLARSSL_MD2_C
1099 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001100 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001101 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001102 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001103 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001104 *
1105 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1106 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001107#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001108 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001109
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001110/**
1111 * \def POLARSSL_MD4_C
1112 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001113 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001114 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001115 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001116 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001117 *
1118 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1119 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001120#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001121 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001122
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001123/**
1124 * \def POLARSSL_MD5_C
1125 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001126 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001127 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001128 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001129 * Caller: library/md.c
1130 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001131 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001132 *
1133 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001134 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001135 */
Paul Bakker40e46942009-01-03 21:51:57 +00001136#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001137
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001138/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001139 * \def POLARSSL_MEMORY_C
1140 *
1141 * Enable the memory allocation layer.
1142 * By default PolarSSL uses the system-provided malloc() and free().
1143 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1144 * are defined and unmodified)
1145 *
1146 * This allows different allocators (self-implemented or provided)
1147 *
1148 * Enable this layer to allow use of alternative memory allocators.
1149#define POLARSSL_MEMORY_C
1150 */
1151
1152/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001153 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1154 *
1155 * Enable the buffer allocator implementation that makes use of a (stack)
1156 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1157 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001158 *
1159 * Module: library/memory_buffer_alloc.c
1160 *
1161 * Requires: POLARSSL_MEMORY_C
1162 *
1163 * Enable this module to enable the buffer memory allocator.
1164#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1165 */
1166
1167/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001168 * \def POLARSSL_NET_C
1169 *
1170 * Enable the TCP/IP networking routines.
1171 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001172 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001173 *
1174 * This module provides TCP/IP networking routines.
1175 */
Paul Bakker40e46942009-01-03 21:51:57 +00001176#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001177
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001178/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001179 * \def POLARSSL_OID_C
1180 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001181 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001182 *
1183 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001184 * Caller: library/asn1write.c
1185 * library/pkcs5.c
1186 * library/pkparse.c
1187 * library/pkwrite.c
1188 * library/rsa.c
1189 * library/x509.c
1190 * library/x509_create.c
1191 * library/x509_crl.c
1192 * library/x509_crt.c
1193 * library/x509_csr.c
1194 * library/x509write_crt.c
1195 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001196 *
1197 * This modules translates between OIDs and internal values.
1198 */
1199#define POLARSSL_OID_C
1200
1201/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001202 * \def POLARSSL_PADLOCK_C
1203 *
1204 * Enable VIA Padlock support on x86.
1205 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001206 * Module: library/padlock.c
1207 * Caller: library/aes.c
1208 *
1209 * This modules adds support for the VIA PadLock on x86.
1210 */
Paul Bakker40e46942009-01-03 21:51:57 +00001211#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001212
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001213/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001214 * \def POLARSSL_PBKDF2_C
1215 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001216 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001217 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001218 *
1219 * Module: library/pbkdf2.c
1220 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001221 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001222 *
1223 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001224 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001225#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001226
1227/**
Paul Bakkercff68422013-09-15 20:43:33 +02001228 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001229 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001230 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001231 *
1232 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001233 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001234 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001235 * library/x509_crl.c
1236 * library/x509_crt.c
1237 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001238 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001239 * Requires: POLARSSL_BASE64_C
1240 *
Paul Bakkercff68422013-09-15 20:43:33 +02001241 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001242 */
Paul Bakkercff68422013-09-15 20:43:33 +02001243#define POLARSSL_PEM_PARSE_C
1244
1245/**
1246 * \def POLARSSL_PEM_WRITE_C
1247 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001248 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001249 *
1250 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001251 * Caller: library/pkwrite.c
1252 * library/x509write_crt.c
1253 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001254 *
1255 * Requires: POLARSSL_BASE64_C
1256 *
1257 * This modules adds support for encoding / writing PEM files.
1258 */
1259#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001260
1261/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001262 * \def POLARSSL_PK_C
1263 *
1264 * Enable the generic public (asymetric) key layer.
1265 *
1266 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001267 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001268 * library/ssl_cli.c
1269 * library/ssl_srv.c
1270 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001271 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1272 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001273 * Uncomment to enable generic public key wrappers.
1274 */
1275#define POLARSSL_PK_C
1276
1277/**
Paul Bakker4606c732013-09-15 17:04:23 +02001278 * \def POLARSSL_PK_PARSE_C
1279 *
1280 * Enable the generic public (asymetric) key parser.
1281 *
1282 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001283 * Caller: library/x509_crt.c
1284 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001285 *
1286 * Requires: POLARSSL_PK_C
1287 *
1288 * Uncomment to enable generic public key parse functions.
1289 */
1290#define POLARSSL_PK_PARSE_C
1291
1292/**
1293 * \def POLARSSL_PK_WRITE_C
1294 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001295 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001296 *
1297 * Module: library/pkwrite.c
1298 * Caller: library/x509write.c
1299 *
1300 * Requires: POLARSSL_PK_C
1301 *
1302 * Uncomment to enable generic public key write functions.
1303 */
1304#define POLARSSL_PK_WRITE_C
1305
1306/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001307 * \def POLARSSL_PKCS5_C
1308 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001309 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001310 *
1311 * Module: library/pkcs5.c
1312 *
1313 * Requires: POLARSSL_MD_C
1314 *
1315 * This module adds support for the PKCS#5 functions.
1316 */
1317#define POLARSSL_PKCS5_C
1318
1319/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001320 * \def POLARSSL_PKCS11_C
1321 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001322 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001323 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001324 * Module: library/pkcs11.c
1325 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001326 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001327 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001328 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001329 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001330 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1331#define POLARSSL_PKCS11_C
1332 */
1333
1334/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001335 * \def POLARSSL_PKCS12_C
1336 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001337 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001338 * Adds algorithms for parsing PKCS#8 encrypted private keys
1339 *
1340 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001341 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001342 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001343 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1344 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001345 *
1346 * This module enables PKCS#12 functions.
1347 */
1348#define POLARSSL_PKCS12_C
1349
1350/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001351 * \def POLARSSL_RSA_C
1352 *
1353 * Enable the RSA public-key cryptosystem.
1354 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001355 * Module: library/rsa.c
1356 * Caller: library/ssl_cli.c
1357 * library/ssl_srv.c
1358 * library/ssl_tls.c
1359 * library/x509.c
1360 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001361 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001362 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001363 * This module is required for SSL/TLS and MD5-signed certificates.
1364 */
Paul Bakker40e46942009-01-03 21:51:57 +00001365#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001366
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001367/**
1368 * \def POLARSSL_SHA1_C
1369 *
1370 * Enable the SHA1 cryptographic hash algorithm.
1371 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001372 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001373 * Caller: library/md.c
1374 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001375 * library/ssl_srv.c
1376 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001377 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001378 *
1379 * This module is required for SSL/TLS and SHA1-signed certificates.
1380 */
Paul Bakker40e46942009-01-03 21:51:57 +00001381#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001382
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001383/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001384 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001385 *
1386 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001387 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001388 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001389 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001390 * Caller: library/entropy.c
1391 * library/md.c
1392 * library/ssl_cli.c
1393 * library/ssl_srv.c
1394 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001395 *
1396 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001397 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001398 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001399#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001400
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001401/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001402 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001403 *
1404 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001405 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001406 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001407 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001408 * Caller: library/entropy.c
1409 * library/md.c
1410 * library/ssl_cli.c
1411 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001412 *
1413 * This module adds support for SHA-384 and SHA-512.
1414 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001415#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001416
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001417/**
Paul Bakker0a597072012-09-25 21:55:46 +00001418 * \def POLARSSL_SSL_CACHE_C
1419 *
1420 * Enable simple SSL cache implementation.
1421 *
1422 * Module: library/ssl_cache.c
1423 * Caller:
1424 *
1425 * Requires: POLARSSL_SSL_CACHE_C
1426 */
1427#define POLARSSL_SSL_CACHE_C
1428
1429/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001430 * \def POLARSSL_SSL_CLI_C
1431 *
1432 * Enable the SSL/TLS client code.
1433 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001434 * Module: library/ssl_cli.c
1435 * Caller:
1436 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001437 * Requires: POLARSSL_SSL_TLS_C
1438 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001439 * This module is required for SSL/TLS client support.
1440 */
Paul Bakker40e46942009-01-03 21:51:57 +00001441#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001442
Paul Bakker9a736322012-11-14 12:39:52 +00001443/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001444 * \def POLARSSL_SSL_SRV_C
1445 *
1446 * Enable the SSL/TLS server code.
1447 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001448 * Module: library/ssl_srv.c
1449 * Caller:
1450 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001451 * Requires: POLARSSL_SSL_TLS_C
1452 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001453 * This module is required for SSL/TLS server support.
1454 */
Paul Bakker40e46942009-01-03 21:51:57 +00001455#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001456
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001457/**
1458 * \def POLARSSL_SSL_TLS_C
1459 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001460 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001461 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001462 * Module: library/ssl_tls.c
1463 * Caller: library/ssl_cli.c
1464 * library/ssl_srv.c
1465 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001466 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001467 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001468 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001469 * This module is required for SSL/TLS.
1470 */
Paul Bakker40e46942009-01-03 21:51:57 +00001471#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001472
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001473/**
Paul Bakker2466d932013-09-28 14:40:38 +02001474 * \def POLARSSL_THREADING_C
1475 *
1476 * Enable the threading abstraction layer.
1477 * By default PolarSSL assumes it is used in a non-threaded environment or that
1478 * contexts are not shared between threads. If you do intend to use contexts
1479 * between threads, you will need to enable this layer to prevent race
1480 * conditions.
1481 *
1482 * Module: library/threading.c
1483 *
1484 * This allows different threading implementations (self-implemented or
1485 * provided).
1486 *
1487 * You will have to enable either POLARSSL_THREADING_ALT,
1488 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1489 *
1490 * Enable this layer to allow use of mutexes within PolarSSL
1491#define POLARSSL_THREADING_C
1492 */
1493
1494/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001495 * \def POLARSSL_TIMING_C
1496 *
1497 * Enable the portable timing interface.
1498 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001499 * Module: library/timing.c
1500 * Caller: library/havege.c
1501 *
1502 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001503 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001504#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001505
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001506/**
1507 * \def POLARSSL_VERSION_C
1508 *
1509 * Enable run-time version information.
1510 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001511 * Module: library/version.c
1512 *
1513 * This module provides run-time version information.
1514 */
1515#define POLARSSL_VERSION_C
1516
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001517/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001518 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001519 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001520 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001521 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001522 * Module: library/x509.c
1523 * Caller: library/x509_crl.c
1524 * library/x509_crt.c
1525 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001526 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001527 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001528 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001529 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001530 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001531 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001532#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001533
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001534/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001535 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001536 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001537 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001538 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001539 * Module: library/x509_crt.c
1540 * Caller: library/ssl_cli.c
1541 * library/ssl_srv.c
1542 * library/ssl_tls.c
1543 *
1544 * Requires: POLARSSL_X509_USE_C
1545 *
1546 * This module is required for X.509 certificate parsing.
1547 */
1548#define POLARSSL_X509_CRT_PARSE_C
1549
1550/**
1551 * \def POLARSSL_X509_CRL_PARSE_C
1552 *
1553 * Enable X.509 CRL parsing.
1554 *
1555 * Module: library/x509_crl.c
1556 * Caller: library/x509_crt.c
1557 *
1558 * Requires: POLARSSL_X509_USE_C
1559 *
1560 * This module is required for X.509 CRL parsing.
1561 */
1562#define POLARSSL_X509_CRL_PARSE_C
1563
1564/**
1565 * \def POLARSSL_X509_CSR_PARSE_C
1566 *
1567 * Enable X.509 Certificate Signing Request (CSR) parsing.
1568 *
1569 * Module: library/x509_csr.c
1570 * Caller: library/x509_crt_write.c
1571 *
1572 * Requires: POLARSSL_X509_USE_C
1573 *
1574 * This module is used for reading X.509 certificate request.
1575 */
1576#define POLARSSL_X509_CSR_PARSE_C
1577
1578/**
1579 * \def POLARSSL_X509_CREATE_C
1580 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001581 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001582 *
1583 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001584 *
Paul Bakker4606c732013-09-15 17:04:23 +02001585 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001586 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001587 * This module is the basis for creating X.509 certificates and CSRs.
1588 */
1589#define POLARSSL_X509_CREATE_C
1590
1591/**
1592 * \def POLARSSL_X509_CRT_WRITE_C
1593 *
1594 * Enable creating X.509 certificates.
1595 *
1596 * Module: library/x509_crt_write.c
1597 *
1598 * Requires: POLARSSL_CREATE_C
1599 *
1600 * This module is required for X.509 certificate creation.
1601 */
1602#define POLARSSL_X509_CRT_WRITE_C
1603
1604/**
1605 * \def POLARSSL_X509_CSR_WRITE_C
1606 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001607 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001608 *
1609 * Module: library/x509_csr_write.c
1610 *
1611 * Requires: POLARSSL_CREATE_C
1612 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001613 * This module is required for X.509 certificate request writing.
1614 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001615#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001616
1617/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001618 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001619 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001620 * Enable the XTEA block cipher.
1621 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001622 * Module: library/xtea.c
1623 * Caller:
1624 */
1625#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001626
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001627/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001628
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001629/**
1630 * \name SECTION: Module configuration options
1631 *
1632 * This section allows for the setting of module specific sizes and
1633 * configuration options. The default values are already present in the
1634 * relevant header files and should suffice for the regular use cases.
1635 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1636 * only if you have a good reason and know the consequences.
1637 *
1638 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1639 * header file take precedence.
1640 *
1641 * Please check the respective header file for documentation on these
1642 * parameters (to prevent duplicate documentation).
1643 *
1644 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1645 * \{
1646 */
1647//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1648
1649#if defined(POLARSSL_CONFIG_OPTIONS)
1650
1651// MPI / BIGNUM options
1652//
1653#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1654#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1655
1656// CTR_DRBG options
1657//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001658#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 +02001659#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1660#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1661#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1662#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1663
1664// Entropy options
1665//
1666#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1667#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1668
Paul Bakker6e339b52013-07-03 13:37:05 +02001669// Memory options
1670#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1671#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1672#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1673
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001674// SSL Cache options
1675//
1676#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1677#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1678
1679// SSL options
1680//
1681#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001682#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001683
1684#endif /* POLARSSL_CONFIG_OPTIONS */
1685
1686/* \} name */
1687
Paul Bakker7ad00f92013-04-18 23:05:25 +02001688/*
1689 * Sanity checks on defines and dependencies
1690 */
1691#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1692#error "POLARSSL_DHM_C defined, but not all prerequisites"
1693#endif
1694
1695#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1696#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1697#endif
1698
1699#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1700#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1701#endif
1702
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001703#if defined(POLARSSL_ECDSA_C) && \
1704 ( !defined(POLARSSL_ECP_C) || \
1705 !defined(POLARSSL_ASN1_PARSE_C) || \
1706 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001707#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1708#endif
1709
1710#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1711#error "POLARSSL_ECP_C defined, but not all prerequisites"
1712#endif
1713
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001714#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1715 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001716#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1717#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001718#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1719 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1720#error "CTR_DRBG_ENTROPY_LEN value too high"
1721#endif
1722#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1723 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1724#error "CTR_DRBG_ENTROPY_LEN value too high"
1725#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001726
1727#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1728#error "POLARSSL_GCM_C defined, but not all prerequisites"
1729#endif
1730
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001731#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1732#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1733#endif
1734
Paul Bakkere07f41d2013-04-19 09:08:57 +02001735#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1736#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1737#endif
1738
1739#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1740 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001741 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001742#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1743#endif
1744
1745#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1746 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001747 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001748#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1749#endif
1750
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001751#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1752 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001753 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001754#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1755#endif
1756
Paul Bakkere07f41d2013-04-19 09:08:57 +02001757#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001758 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001759 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001760#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1761#endif
1762
1763#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001764 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001765 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001766#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1767#endif
1768
Paul Bakker6e339b52013-07-03 13:37:05 +02001769#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1770#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1771#endif
1772
Paul Bakker7ad00f92013-04-18 23:05:25 +02001773#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1774#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1775#endif
1776
Paul Bakkercff68422013-09-15 20:43:33 +02001777#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1778#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1779#endif
1780
1781#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1782#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001783#endif
1784
Paul Bakker4606c732013-09-15 17:04:23 +02001785#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1786#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1787#endif
1788
1789#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1790#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1791#endif
1792
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001793#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001794#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1795#endif
1796
1797#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1798 !defined(POLARSSL_OID_C) )
1799#error "POLARSSL_RSA_C defined, but not all prerequisites"
1800#endif
1801
1802#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1803#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1804#endif
1805
Paul Bakker577e0062013-08-28 11:57:20 +02001806#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001807 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001808#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1809#endif
1810
1811#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1812#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1813#endif
1814
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001815#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1816 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1817 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1818#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1819#endif
1820
1821#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1822 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1823#error "Illegal protocol selection"
1824#endif
1825
1826#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1827 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1828#error "Illegal protocol selection"
1829#endif
1830
1831#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1832 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1833 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1834#error "Illegal protocol selection"
1835#endif
1836
Paul Bakker59da0a42013-08-19 13:27:17 +02001837#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001838 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1839 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001840#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1841#endif
1842
Paul Bakker2466d932013-09-28 14:40:38 +02001843#if defined(POLARSSL_THREADING_DUMMY)
1844#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1845#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1846#endif
1847#define POLARSSL_THREADING_IMPL
1848#endif
1849
1850#if defined(POLARSSL_THREADING_PTHREAD)
1851#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1852#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
1853#endif
1854#define POLARSSL_THREADING_IMPL
1855#endif
1856
1857#if defined(POLARSSL_THREADING_ALT)
1858#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1859#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
1860#endif
1861#define POLARSSL_THREADING_IMPL
1862#endif
1863
1864#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
1865#error "POLARSSL_THREADING_C defined, single threading implementation required"
1866#endif
1867#undef POLARSSL_THREADING_IMPL
1868
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001869#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001870 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001871 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001872#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001873#endif
1874
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001875#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1876 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1877 !defined(POLARSSL_PK_WRITE_C) )
1878#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1879#endif
1880
1881#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1882#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1883#endif
1884
1885#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1886#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1887#endif
1888
1889#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1890#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1891#endif
1892
1893#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1894#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1895#endif
1896
1897#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1898#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001899#endif
1900
Paul Bakker5121ce52009-01-03 21:22:43 +00001901#endif /* config.h */