blob: 7bbef55226db5223836ea2b3c51bc412358c8761 [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 Bakker5121ce52009-01-03 21:22:43 +000051 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020052//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000053
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 Bakker5121ce52009-01-03 21:22:43 +000060 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020061//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000062
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 Bakker5121ce52009-01-03 21:22:43 +000093 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020094//#define POLARSSL_HAVE_SSE2
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é-Gonnard10934de2013-12-13 12:54:09 +0100104
105/**
106 * \def POLARSSL_HAVE_IPV6
107 *
108 * System supports the basic socket interface for IPv6 (RFC 3493),
Manuel Pégourié-Gonnard767f02c2013-12-13 16:23:39 +0100109 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100110 *
111 * Comment if your system does not support the IPv6 socket interface
112 */
113#define POLARSSL_HAVE_IPV6
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200114/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000115
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000116/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000117 * \name SECTION: PolarSSL feature support
118 *
119 * This section sets support for features that are or are not needed
120 * within the modules that are enabled.
121 * \{
122 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000123
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000124/**
Paul Bakker90995b52013-06-24 19:20:35 +0200125 * \def POLARSSL_XXX_ALT
126 *
127 * Uncomment a macro to let PolarSSL use your alternate core implementation of
128 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
129 * implementations). Keep in mind that the function prototypes should remain
130 * the same.
131 *
132 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
133 * provide the "struct aes_context" definition and omit the base function
134 * declarations and implementations. "aes_alt.h" will be included from
135 * "aes.h" to include the new function definitions.
136 *
137 * Uncomment a macro to enable alternate implementation for core algorithm
138 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200139 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200140//#define POLARSSL_AES_ALT
141//#define POLARSSL_ARC4_ALT
142//#define POLARSSL_BLOWFISH_ALT
143//#define POLARSSL_CAMELLIA_ALT
144//#define POLARSSL_DES_ALT
145//#define POLARSSL_XTEA_ALT
146//#define POLARSSL_MD2_ALT
147//#define POLARSSL_MD4_ALT
148//#define POLARSSL_MD5_ALT
149//#define POLARSSL_SHA1_ALT
150//#define POLARSSL_SHA256_ALT
151//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200152
153/**
Paul Bakker15566e42011-04-24 21:19:15 +0000154 * \def POLARSSL_AES_ROM_TABLES
155 *
156 * Store the AES tables in ROM.
157 *
158 * Uncomment this macro to store the AES tables in ROM.
159 *
Paul Bakker15566e42011-04-24 21:19:15 +0000160 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200161//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000162
163/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200164 * \def POLARSSL_CIPHER_MODE_CBC
165 *
166 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
167 */
168#define POLARSSL_CIPHER_MODE_CBC
169
170/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000171 * \def POLARSSL_CIPHER_MODE_CFB
172 *
173 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
174 */
175#define POLARSSL_CIPHER_MODE_CFB
176
177/**
178 * \def POLARSSL_CIPHER_MODE_CTR
179 *
180 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
181 */
182#define POLARSSL_CIPHER_MODE_CTR
183
184/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000185 * \def POLARSSL_CIPHER_NULL_CIPHER
186 *
187 * Enable NULL cipher.
188 * Warning: Only do so when you know what you are doing. This allows for
189 * encryption or channels without any security!
190 *
191 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
192 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100193 * TLS_ECDH_ECDSA_WITH_NULL_SHA
194 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200195 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100196 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200197 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200198 * TLS_ECDHE_PSK_WITH_NULL_SHA256
199 * TLS_ECDHE_PSK_WITH_NULL_SHA
200 * TLS_DHE_PSK_WITH_NULL_SHA384
201 * TLS_DHE_PSK_WITH_NULL_SHA256
202 * TLS_DHE_PSK_WITH_NULL_SHA
203 * TLS_RSA_WITH_NULL_SHA256
204 * TLS_RSA_WITH_NULL_SHA
205 * TLS_RSA_WITH_NULL_MD5
206 * TLS_RSA_PSK_WITH_NULL_SHA384
207 * TLS_RSA_PSK_WITH_NULL_SHA256
208 * TLS_RSA_PSK_WITH_NULL_SHA
209 * TLS_PSK_WITH_NULL_SHA384
210 * TLS_PSK_WITH_NULL_SHA256
211 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000212 *
213 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200214#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000215 */
216
217/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200218 * \def POLARSSL_CIPHER_PADDING_XXX
219 *
220 * Uncomment or comment macros to add support for specific padding modes
221 * in the cipher layer with cipher modes that support padding (e.g. CBC)
222 *
223 * If you disable all padding modes, only full blocks can be used with CBC.
224 *
225 * Enable padding modes in the cipher layer.
226 */
227#define POLARSSL_CIPHER_PADDING_PKCS7
228#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
229#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
230#define POLARSSL_CIPHER_PADDING_ZEROS
231
232/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000233 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
234 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200235 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000236 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000237 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000238 *
239 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000240 * TLS_RSA_WITH_DES_CBC_SHA
241 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000242 *
243 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200244#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000245 */
246
247/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200248 * \def POLARSSL_ECP_XXXX_ENABLED
249 *
250 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200251 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200252 *
253 * Comment macros to disable the curve and functions for it
254 */
255#define POLARSSL_ECP_DP_SECP192R1_ENABLED
256#define POLARSSL_ECP_DP_SECP224R1_ENABLED
257#define POLARSSL_ECP_DP_SECP256R1_ENABLED
258#define POLARSSL_ECP_DP_SECP384R1_ENABLED
259#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200260#define POLARSSL_ECP_DP_BP256R1_ENABLED
261#define POLARSSL_ECP_DP_BP384R1_ENABLED
262#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100263//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
264#define POLARSSL_ECP_DP_M255_ENABLED
265//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
266//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200267
268/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200269 * \def POLARSSL_ECP_NIST_OPTIM
270 *
271 * Enable specific 'modulo p' routines for each NIST prime.
272 * Depending on the prime and architecture, makes operations 4 to 8 times
273 * faster on the corresponding curve.
274 *
275 * Comment this macro to disable NIST curves optimisation.
276 */
277#define POLARSSL_ECP_NIST_OPTIM
278
279/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200280 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
281 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200282 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200283 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200284 * This enables the following ciphersuites (if other requisites are
285 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200286 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200287 * TLS_PSK_WITH_AES_256_CBC_SHA384
288 * TLS_PSK_WITH_AES_256_CBC_SHA
289 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
290 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
291 * TLS_PSK_WITH_AES_128_GCM_SHA256
292 * TLS_PSK_WITH_AES_128_CBC_SHA256
293 * TLS_PSK_WITH_AES_128_CBC_SHA
294 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
295 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
296 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
297 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200298 */
299#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
300
301/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200302 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
303 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200304 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200305 *
306 * Requires: POLARSSL_DHM_C
307 *
308 * This enables the following ciphersuites (if other requisites are
309 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200310 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200311 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
312 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
313 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
314 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
315 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
316 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
317 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
318 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
319 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
320 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
321 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200322 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200323#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200324
325/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200326 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
327 *
328 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
329 *
330 * Requires: POLARSSL_ECDH_C
331 *
332 * This enables the following ciphersuites (if other requisites are
333 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200334 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200335 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200336 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200337 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
338 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
339 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
340 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
341 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200342 */
343#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
344
345/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200346 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
347 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200348 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200349 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200350 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200351 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200352 *
353 * This enables the following ciphersuites (if other requisites are
354 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200355 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200356 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
357 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
358 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
359 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
360 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
361 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
362 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
363 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
364 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
365 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
366 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200367 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200368#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200369
370/**
371 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
372 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200373 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200374 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200375 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200376 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200377 *
378 * This enables the following ciphersuites (if other requisites are
379 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200380 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200381 * TLS_RSA_WITH_AES_256_CBC_SHA256
382 * TLS_RSA_WITH_AES_256_CBC_SHA
383 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200384 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200385 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
386 * TLS_RSA_WITH_AES_128_GCM_SHA256
387 * TLS_RSA_WITH_AES_128_CBC_SHA256
388 * TLS_RSA_WITH_AES_128_CBC_SHA
389 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
390 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
391 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200392 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200393 * TLS_RSA_WITH_RC4_128_SHA
394 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200395 */
396#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
397
398/**
399 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
400 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200401 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200402 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200403 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200404 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200405 *
406 * This enables the following ciphersuites (if other requisites are
407 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200408 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200409 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200410 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
411 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200412 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200413 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
414 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
415 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
416 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
417 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
418 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
419 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200420 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
421 */
422#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
423
424/**
425 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
426 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200427 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200428 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200429 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200430 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200431 *
432 * This enables the following ciphersuites (if other requisites are
433 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200434 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200435 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
436 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
437 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200438 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200439 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
440 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
441 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
442 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
443 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
444 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
445 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200446 */
447#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
448
449/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200450 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
451 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200452 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200453 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200454 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200455 *
456 * This enables the following ciphersuites (if other requisites are
457 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200458 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
459 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
460 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
461 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
462 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
463 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
464 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
465 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
466 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
467 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
468 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
469 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200470 */
471#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
472
473/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100474 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
475 *
476 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
477 *
478 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
479 *
480 * This enables the following ciphersuites (if other requisites are
481 * enabled as well):
482 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
483 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
484 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
485 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
486 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
487 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
488 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
489 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
490 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
491 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
492 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
493 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
494 */
495#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
496
497/**
498 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
499 *
500 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
501 *
502 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
503 *
504 * This enables the following ciphersuites (if other requisites are
505 * enabled as well):
506 * TLS_ECDH_RSA_WITH_RC4_128_SHA
507 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
508 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
509 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
510 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
511 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
512 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
513 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
514 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
515 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
516 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
517 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
518 */
519#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
520
521/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200522 * \def POLARSSL_ERROR_STRERROR_BC
523 *
524 * Make available the backward compatible error_strerror() next to the
525 * current polarssl_strerror().
526 *
527 * Disable if you run into name conflicts and want to really remove the
528 * error_strerror()
529 */
530#define POLARSSL_ERROR_STRERROR_BC
531
532/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100533 * \def POLARSSL_ERROR_STRERROR_DUMMY
534 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200535 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100536 * third party libraries easier.
537 *
538 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200539 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100540 */
541#define POLARSSL_ERROR_STRERROR_DUMMY
542
543/**
Paul Bakker15566e42011-04-24 21:19:15 +0000544 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000545 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200546 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200547 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200548 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000549 */
Paul Bakker15566e42011-04-24 21:19:15 +0000550#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000551
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000552/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000553 * \def POLARSSL_FS_IO
554 *
555 * Enable functions that use the filesystem.
556 */
557#define POLARSSL_FS_IO
558
559/**
Paul Bakker43655f42011-12-15 20:11:16 +0000560 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
561 *
562 * Do not add default entropy sources. These are the platform specific,
563 * hardclock and HAVEGE based poll functions.
564 *
565 * This is useful to have more control over the added entropy sources in an
566 * application.
567 *
568 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000569 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200570//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000571
572/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000573 * \def POLARSSL_NO_PLATFORM_ENTROPY
574 *
575 * Do not use built-in platform entropy functions.
576 * This is useful if your platform does not support
577 * standards like the /dev/urandom or Windows CryptoAPI.
578 *
579 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000580 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200581//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000582
583/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200584 * \def POLARSSL_MEMORY_DEBUG
585 *
586 * Enable debugging of buffer allocator memory issues. Automatically prints
587 * (to stderr) all (fatal) messages on memory allocation issues. Enables
588 * function for 'debug output' of allocated memory.
589 *
590 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
591 * fprintf()
592 *
593 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200594 */
595//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200596
597/**
598 * \def POLARSSL_MEMORY_BACKTRACE
599 *
600 * Include backtrace information with each allocated block.
601 *
602 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
603 * GLIBC-compatible backtrace() an backtrace_symbols() support
604 *
605 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200606 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200607//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200608
609/**
Paul Bakker48377d92013-08-30 12:06:24 +0200610 * \def POLARSSL_PKCS1_V15
611 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200612 * Enable support for PKCS#1 v1.5 encoding.
613 *
Paul Bakker48377d92013-08-30 12:06:24 +0200614 * Requires: POLARSSL_RSA_C
615 *
Paul Bakker48377d92013-08-30 12:06:24 +0200616 * This enables support for PKCS#1 v1.5 operations.
617 */
618#define POLARSSL_PKCS1_V15
619
620/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000621 * \def POLARSSL_PKCS1_V21
622 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200623 * Enable support for PKCS#1 v2.1 encoding.
624 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000625 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
626 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000627 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
628 */
629#define POLARSSL_PKCS1_V21
630
631/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000632 * \def POLARSSL_RSA_NO_CRT
633 *
634 * Do not use the Chinese Remainder Theorem for the RSA private operation.
635 *
636 * Uncomment this macro to disable the use of CRT in RSA.
637 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000638 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200639//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000640
641/**
642 * \def POLARSSL_SELF_TEST
643 *
644 * Enable the checkup functions (*_self_test).
645 */
646#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000647
648/**
Paul Bakker40865c82013-01-31 17:13:13 +0100649 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
650 *
651 * Enable sending of alert messages in case of encountered errors as per RFC.
652 * If you choose not to send the alert messages, PolarSSL can still communicate
653 * with other servers, only debugging of failures is harder.
654 *
655 * The advantage of not sending alert messages, is that no information is given
656 * about reasons for failures thus preventing adversaries of gaining intel.
657 *
658 * Enable sending of all alert messages
659 */
660#define POLARSSL_SSL_ALERT_MESSAGES
661
662/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100663 * \def POLARSSL_SSL_DEBUG_ALL
664 *
665 * Enable the debug messages in SSL module for all issues.
666 * Debug messages have been disabled in some places to prevent timing
667 * attacks due to (unbalanced) debugging function calls.
668 *
669 * If you need all error reporting you should enable this during debugging,
670 * but remove this for production servers that should log as well.
671 *
672 * Uncomment this macro to report all debug messages on errors introducing
673 * a timing side-channel.
674 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100675 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200676//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100677
678/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000679 * \def POLARSSL_SSL_HW_RECORD_ACCEL
680 *
681 * Enable hooking functions in SSL module for hardware acceleration of
682 * individual records.
683 *
684 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000685 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200686//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000687
688/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100689 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
690 *
691 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200692 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100693 *
694 * Comment this macro to disable support for SSLv2 Client Hello messages.
695 */
696#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
697
698/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100699 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
700 *
701 * Pick the ciphersuite according to the client's preferences rather than ours
702 * in the SSL Server module (POLARSSL_SSL_SRV_C).
703 *
704 * Uncomment this macro to respect client's ciphersuite order
705 */
706//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
707
708/**
Paul Bakker05decb22013-08-15 13:33:48 +0200709 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
710 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200711 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200712 *
713 * Comment this macro to disable support for the max_fragment_length extension
714 */
715#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
716
717/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200718 * \def POLARSSL_SSL_PROTO_SSL3
719 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200720 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200721 *
722 * Requires: POLARSSL_MD5_C
723 * POLARSSL_SHA1_C
724 *
725 * Comment this macro to disable support for SSL 3.0
726 */
727#define POLARSSL_SSL_PROTO_SSL3
728
729/**
730 * \def POLARSSL_SSL_PROTO_TLS1
731 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200732 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200733 *
734 * Requires: POLARSSL_MD5_C
735 * POLARSSL_SHA1_C
736 *
737 * Comment this macro to disable support for TLS 1.0
738 */
739#define POLARSSL_SSL_PROTO_TLS1
740
741/**
742 * \def POLARSSL_SSL_PROTO_TLS1_1
743 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200744 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200745 *
746 * Requires: POLARSSL_MD5_C
747 * POLARSSL_SHA1_C
748 *
749 * Comment this macro to disable support for TLS 1.1
750 */
751#define POLARSSL_SSL_PROTO_TLS1_1
752
753/**
754 * \def POLARSSL_SSL_PROTO_TLS1_2
755 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200756 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200757 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100758 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200759 * (Depends on ciphersuites)
760 *
761 * Comment this macro to disable support for TLS 1.2
762 */
763#define POLARSSL_SSL_PROTO_TLS1_2
764
765/**
Paul Bakkera503a632013-08-14 13:48:06 +0200766 * \def POLARSSL_SSL_SESSION_TICKETS
767 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200768 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200769 *
770 * Requires: POLARSSL_AES_C
771 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200772 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200773 *
774 * Comment this macro to disable support for SSL session tickets
775 */
776#define POLARSSL_SSL_SESSION_TICKETS
777
778/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200779 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
780 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200781 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200782 *
783 * Comment this macro to disable support for server name indication in SSL
784 */
785#define POLARSSL_SSL_SERVER_NAME_INDICATION
786
787/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200788 * \def POLARSSL_SSL_TRUNCATED_HMAC
789 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200790 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200791 *
792 * Comment this macro to disable support for truncated HMAC in SSL
793 */
794#define POLARSSL_SSL_TRUNCATED_HMAC
795
796/**
Paul Bakker2466d932013-09-28 14:40:38 +0200797 * \def POLARSSL_THREADING_ALT
798 *
799 * Provide your own alternate threading implementation.
800 *
801 * Requires: POLARSSL_THREADING_C
802 *
803 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200804 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200805//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200806
807/**
808 * \def POLARSSL_THREADING_DUMMY
809 *
810 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200811 * Warning: If you use this, all claims of thread-safety in the documentation
812 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200813 *
814 * Requires: POLARSSL_THREADING_C
815 *
816 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200817 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200818//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200819
820/**
821 * \def POLARSSL_THREADING_PTHREAD
822 *
823 * Enable the pthread wrapper layer for the threading layer.
824 *
825 * Requires: POLARSSL_THREADING_C
826 *
827 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200828 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200829//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200830
831/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200832 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
833 *
834 * If set, the X509 parser will not break-off when parsing an X509 certificate
835 * and encountering an extension in a v1 or v2 certificate.
836 *
837 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200838 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200839//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200840
841/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000842 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
843 *
844 * If set, the X509 parser will not break-off when parsing an X509 certificate
845 * and encountering an unknown critical extension.
846 *
847 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000848 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200849//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000850
851/**
852 * \def POLARSSL_ZLIB_SUPPORT
853 *
854 * If set, the SSL/TLS module uses ZLIB to support compression and
855 * decompression of packet data.
856 *
857 * Used in: library/ssl_tls.c
858 * library/ssl_cli.c
859 * library/ssl_srv.c
860 *
861 * This feature requires zlib library and headers to be present.
862 *
863 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000864 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200865//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200866/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000867
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000868/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000869 * \name SECTION: PolarSSL modules
870 *
871 * This section enables or disables entire modules in PolarSSL
872 * \{
873 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000874
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000875/**
876 * \def POLARSSL_AES_C
877 *
878 * Enable the AES block cipher.
879 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000880 * Module: library/aes.c
881 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000882 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000883 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000884 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000885 * This module enables the following ciphersuites (if other requisites are
886 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100887 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
888 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
889 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
890 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
891 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
892 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
893 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
894 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
895 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
896 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
897 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
898 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200899 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
900 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
901 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
902 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
903 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000904 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200905 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100906 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200907 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
908 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
909 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
910 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
911 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
912 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
913 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
914 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
915 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
916 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
917 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
918 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
919 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
920 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
921 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
922 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
923 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
924 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
925 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
926 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
927 * TLS_RSA_WITH_AES_256_GCM_SHA384
928 * TLS_RSA_WITH_AES_256_CBC_SHA256
929 * TLS_RSA_WITH_AES_256_CBC_SHA
930 * TLS_RSA_WITH_AES_128_GCM_SHA256
931 * TLS_RSA_WITH_AES_128_CBC_SHA256
932 * TLS_RSA_WITH_AES_128_CBC_SHA
933 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
934 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
935 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
936 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
937 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
938 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
939 * TLS_PSK_WITH_AES_256_GCM_SHA384
940 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200941 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200942 * TLS_PSK_WITH_AES_128_GCM_SHA256
943 * TLS_PSK_WITH_AES_128_CBC_SHA256
944 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100945 *
Paul Bakkercff68422013-09-15 20:43:33 +0200946 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000947 */
Paul Bakker40e46942009-01-03 21:51:57 +0000948#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000949
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000950/**
951 * \def POLARSSL_ARC4_C
952 *
953 * Enable the ARCFOUR stream cipher.
954 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000955 * Module: library/arc4.c
956 * Caller: library/ssl_tls.c
957 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100958 * This module enables the following ciphersuites (if other requisites are
959 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100960 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
961 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200962 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100963 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200964 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
965 * TLS_DHE_PSK_WITH_RC4_128_SHA
966 * TLS_RSA_WITH_RC4_128_SHA
967 * TLS_RSA_WITH_RC4_128_MD5
968 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200969 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000970 */
Paul Bakker40e46942009-01-03 21:51:57 +0000971#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000972
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000973/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000974 * \def POLARSSL_ASN1_PARSE_C
975 *
976 * Enable the generic ASN1 parser.
977 *
978 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200979 * Caller: library/x509.c
980 * library/dhm.c
981 * library/pkcs12.c
982 * library/pkcs5.c
983 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000984 */
985#define POLARSSL_ASN1_PARSE_C
986
987/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000988 * \def POLARSSL_ASN1_WRITE_C
989 *
990 * Enable the generic ASN1 writer.
991 *
992 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200993 * Caller: library/ecdsa.c
994 * library/pkwrite.c
995 * library/x509_create.c
996 * library/x509write_crt.c
997 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000998 */
999#define POLARSSL_ASN1_WRITE_C
1000
1001/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001002 * \def POLARSSL_BASE64_C
1003 *
1004 * Enable the Base64 module.
1005 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001006 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001007 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001008 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001009 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001010 */
Paul Bakker40e46942009-01-03 21:51:57 +00001011#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001012
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001013/**
1014 * \def POLARSSL_BIGNUM_C
1015 *
Paul Bakker9a736322012-11-14 12:39:52 +00001016 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001017 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001018 * Module: library/bignum.c
1019 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001020 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001021 * library/rsa.c
1022 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001023 *
1024 * This module is required for RSA and DHM support.
1025 */
Paul Bakker40e46942009-01-03 21:51:57 +00001026#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001027
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001028/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001029 * \def POLARSSL_BLOWFISH_C
1030 *
1031 * Enable the Blowfish block cipher.
1032 *
1033 * Module: library/blowfish.c
1034 */
1035#define POLARSSL_BLOWFISH_C
1036
1037/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001038 * \def POLARSSL_CAMELLIA_C
1039 *
1040 * Enable the Camellia block cipher.
1041 *
Paul Bakker38119b12009-01-10 23:31:23 +00001042 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001043 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001044 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001045 * This module enables the following ciphersuites (if other requisites are
1046 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001047 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1048 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1049 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1050 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1051 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1052 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1053 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1054 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001055 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1056 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1057 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1058 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1059 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001060 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001061 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1062 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1063 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1064 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1065 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1066 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1067 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1068 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1069 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1070 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1071 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1072 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1073 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1074 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1075 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1076 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1077 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1078 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1079 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1080 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1081 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1082 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1083 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1084 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1085 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1086 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1087 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1088 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001089 */
1090#define POLARSSL_CAMELLIA_C
1091
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001092/**
1093 * \def POLARSSL_CERTS_C
1094 *
1095 * Enable the test certificates.
1096 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001097 * Module: library/certs.c
1098 * Caller:
1099 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001100 * Requires: POLARSSL_PEM_PARSE_C
1101 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001102 * This module is used for testing (ssl_client/server).
1103 */
Paul Bakker40e46942009-01-03 21:51:57 +00001104#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001105
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001106/**
1107 * \def POLARSSL_CIPHER_C
1108 *
1109 * Enable the generic cipher layer.
1110 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001111 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001112 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001113 *
1114 * Uncomment to enable generic cipher wrappers.
1115 */
1116#define POLARSSL_CIPHER_C
1117
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001118/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001119 * \def POLARSSL_CTR_DRBG_C
1120 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001121 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001122 *
1123 * Module: library/ctr_drbg.c
1124 * Caller:
1125 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001126 * Requires: POLARSSL_AES_C
1127 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001128 * This module provides the CTR_DRBG AES-256 random number generator.
1129 */
1130#define POLARSSL_CTR_DRBG_C
1131
1132/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001133 * \def POLARSSL_DEBUG_C
1134 *
1135 * Enable the debug functions.
1136 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001137 * Module: library/debug.c
1138 * Caller: library/ssl_cli.c
1139 * library/ssl_srv.c
1140 * library/ssl_tls.c
1141 *
1142 * This module provides debugging functions.
1143 */
Paul Bakker40e46942009-01-03 21:51:57 +00001144#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001145
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001146/**
1147 * \def POLARSSL_DES_C
1148 *
1149 * Enable the DES block cipher.
1150 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001151 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001152 * Caller: library/pem.c
1153 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001154 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001155 * This module enables the following ciphersuites (if other requisites are
1156 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001157 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1158 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001159 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001160 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001161 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1162 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1163 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1164 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1165 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001166 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001167 *
Paul Bakkercff68422013-09-15 20:43:33 +02001168 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001169 */
Paul Bakker40e46942009-01-03 21:51:57 +00001170#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001171
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001172/**
1173 * \def POLARSSL_DHM_C
1174 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001175 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001176 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001177 * Module: library/dhm.c
1178 * Caller: library/ssl_cli.c
1179 * library/ssl_srv.c
1180 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001181 * This module is used by the following key exchanges:
1182 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001183 */
Paul Bakker40e46942009-01-03 21:51:57 +00001184#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001185
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001186/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001187 * \def POLARSSL_ECDH_C
1188 *
1189 * Enable the elliptic curve Diffie-Hellman library.
1190 *
1191 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001192 * Caller: library/ssl_cli.c
1193 * library/ssl_srv.c
1194 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001195 * This module is used by the following key exchanges:
1196 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001197 *
1198 * Requires: POLARSSL_ECP_C
1199 */
1200#define POLARSSL_ECDH_C
1201
1202/**
1203 * \def POLARSSL_ECDSA_C
1204 *
1205 * Enable the elliptic curve DSA library.
1206 *
1207 * Module: library/ecdsa.c
1208 * Caller:
1209 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001210 * This module is used by the following key exchanges:
1211 * ECDHE-ECDSA
1212 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001213 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001214 */
1215#define POLARSSL_ECDSA_C
1216
1217/**
1218 * \def POLARSSL_ECP_C
1219 *
1220 * Enable the elliptic curve over GF(p) library.
1221 *
1222 * Module: library/ecp.c
1223 * Caller: library/ecdh.c
1224 * library/ecdsa.c
1225 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001226 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001227 */
1228#define POLARSSL_ECP_C
1229
1230/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001231 * \def POLARSSL_ENTROPY_C
1232 *
1233 * Enable the platform-specific entropy code.
1234 *
1235 * Module: library/entropy.c
1236 * Caller:
1237 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001238 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001239 *
1240 * This module provides a generic entropy pool
1241 */
1242#define POLARSSL_ENTROPY_C
1243
1244/**
Paul Bakker9d781402011-05-09 16:17:09 +00001245 * \def POLARSSL_ERROR_C
1246 *
1247 * Enable error code to error string conversion.
1248 *
1249 * Module: library/error.c
1250 * Caller:
1251 *
1252 * This module enables err_strerror().
1253 */
1254#define POLARSSL_ERROR_C
1255
1256/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001257 * \def POLARSSL_GCM_C
1258 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001259 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001260 *
1261 * Module: library/gcm.c
1262 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001263 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001264 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001265 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1266 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001267 */
1268#define POLARSSL_GCM_C
1269
1270/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001271 * \def POLARSSL_HAVEGE_C
1272 *
1273 * Enable the HAVEGE random generator.
1274 *
Paul Bakker2a844242013-06-24 13:01:53 +02001275 * Warning: the HAVEGE random generator is not suitable for virtualized
1276 * environments
1277 *
1278 * Warning: the HAVEGE random generator is dependent on timing and specific
1279 * processor traits. It is therefore not advised to use HAVEGE as
1280 * your applications primary random generator or primary entropy pool
1281 * input. As a secondary input to your entropy pool, it IS able add
1282 * the (limited) extra entropy it provides.
1283 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001284 * Module: library/havege.c
1285 * Caller:
1286 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001287 * Requires: POLARSSL_TIMING_C
1288 *
Paul Bakker2a844242013-06-24 13:01:53 +02001289 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001290 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001291//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001292
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001293/**
1294 * \def POLARSSL_MD_C
1295 *
1296 * Enable the generic message digest layer.
1297 *
Paul Bakker17373852011-01-06 14:20:01 +00001298 * Module: library/md.c
1299 * Caller:
1300 *
1301 * Uncomment to enable generic message digest wrappers.
1302 */
1303#define POLARSSL_MD_C
1304
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001305/**
1306 * \def POLARSSL_MD2_C
1307 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001308 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001309 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001310 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001311 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001312 *
1313 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001314 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001315//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001316
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001317/**
1318 * \def POLARSSL_MD4_C
1319 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001320 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001321 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001322 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001323 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001324 *
1325 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001326 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001327//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001328
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001329/**
1330 * \def POLARSSL_MD5_C
1331 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001332 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001333 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001334 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001335 * Caller: library/md.c
1336 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001337 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001338 *
1339 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001340 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001341 */
Paul Bakker40e46942009-01-03 21:51:57 +00001342#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001343
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001344/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001345 * \def POLARSSL_MEMORY_C
1346 *
1347 * Enable the memory allocation layer.
1348 * By default PolarSSL uses the system-provided malloc() and free().
1349 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1350 * are defined and unmodified)
1351 *
1352 * This allows different allocators (self-implemented or provided)
1353 *
1354 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001355 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001356//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001357
1358/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001359 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1360 *
1361 * Enable the buffer allocator implementation that makes use of a (stack)
1362 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1363 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001364 *
1365 * Module: library/memory_buffer_alloc.c
1366 *
1367 * Requires: POLARSSL_MEMORY_C
1368 *
1369 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001370 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001371//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001372
1373/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001374 * \def POLARSSL_NET_C
1375 *
1376 * Enable the TCP/IP networking routines.
1377 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001378 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001379 *
1380 * This module provides TCP/IP networking routines.
1381 */
Paul Bakker40e46942009-01-03 21:51:57 +00001382#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001383
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001384/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001385 * \def POLARSSL_OID_C
1386 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001387 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001388 *
1389 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001390 * Caller: library/asn1write.c
1391 * library/pkcs5.c
1392 * library/pkparse.c
1393 * library/pkwrite.c
1394 * library/rsa.c
1395 * library/x509.c
1396 * library/x509_create.c
1397 * library/x509_crl.c
1398 * library/x509_crt.c
1399 * library/x509_csr.c
1400 * library/x509write_crt.c
1401 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001402 *
1403 * This modules translates between OIDs and internal values.
1404 */
1405#define POLARSSL_OID_C
1406
1407/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001408 * \def POLARSSL_PADLOCK_C
1409 *
1410 * Enable VIA Padlock support on x86.
1411 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001412 * Module: library/padlock.c
1413 * Caller: library/aes.c
1414 *
1415 * This modules adds support for the VIA PadLock on x86.
1416 */
Paul Bakker40e46942009-01-03 21:51:57 +00001417#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001418
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001419/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001420 * \def POLARSSL_PBKDF2_C
1421 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001422 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001423 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001424 *
1425 * Module: library/pbkdf2.c
1426 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001427 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001428 *
1429 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001430 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001431#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001432
1433/**
Paul Bakkercff68422013-09-15 20:43:33 +02001434 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001435 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001436 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001437 *
1438 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001439 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001440 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001441 * library/x509_crl.c
1442 * library/x509_crt.c
1443 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001444 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001445 * Requires: POLARSSL_BASE64_C
1446 *
Paul Bakkercff68422013-09-15 20:43:33 +02001447 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001448 */
Paul Bakkercff68422013-09-15 20:43:33 +02001449#define POLARSSL_PEM_PARSE_C
1450
1451/**
1452 * \def POLARSSL_PEM_WRITE_C
1453 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001454 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001455 *
1456 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001457 * Caller: library/pkwrite.c
1458 * library/x509write_crt.c
1459 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001460 *
1461 * Requires: POLARSSL_BASE64_C
1462 *
1463 * This modules adds support for encoding / writing PEM files.
1464 */
1465#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001466
1467/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001468 * \def POLARSSL_PK_C
1469 *
1470 * Enable the generic public (asymetric) key layer.
1471 *
1472 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001473 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001474 * library/ssl_cli.c
1475 * library/ssl_srv.c
1476 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001477 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1478 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001479 * Uncomment to enable generic public key wrappers.
1480 */
1481#define POLARSSL_PK_C
1482
1483/**
Paul Bakker4606c732013-09-15 17:04:23 +02001484 * \def POLARSSL_PK_PARSE_C
1485 *
1486 * Enable the generic public (asymetric) key parser.
1487 *
1488 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001489 * Caller: library/x509_crt.c
1490 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001491 *
1492 * Requires: POLARSSL_PK_C
1493 *
1494 * Uncomment to enable generic public key parse functions.
1495 */
1496#define POLARSSL_PK_PARSE_C
1497
1498/**
1499 * \def POLARSSL_PK_WRITE_C
1500 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001501 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001502 *
1503 * Module: library/pkwrite.c
1504 * Caller: library/x509write.c
1505 *
1506 * Requires: POLARSSL_PK_C
1507 *
1508 * Uncomment to enable generic public key write functions.
1509 */
1510#define POLARSSL_PK_WRITE_C
1511
1512/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001513 * \def POLARSSL_PKCS5_C
1514 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001515 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001516 *
1517 * Module: library/pkcs5.c
1518 *
1519 * Requires: POLARSSL_MD_C
1520 *
1521 * This module adds support for the PKCS#5 functions.
1522 */
1523#define POLARSSL_PKCS5_C
1524
1525/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001526 * \def POLARSSL_PKCS11_C
1527 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001528 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001529 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001530 * Module: library/pkcs11.c
1531 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001532 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001533 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001534 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001535 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001536 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001537 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001538//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001539
1540/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001541 * \def POLARSSL_PKCS12_C
1542 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001543 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001544 * Adds algorithms for parsing PKCS#8 encrypted private keys
1545 *
1546 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001547 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001548 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001549 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1550 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001551 *
1552 * This module enables PKCS#12 functions.
1553 */
1554#define POLARSSL_PKCS12_C
1555
1556/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001557 * \def POLARSSL_RSA_C
1558 *
1559 * Enable the RSA public-key cryptosystem.
1560 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001561 * Module: library/rsa.c
1562 * Caller: library/ssl_cli.c
1563 * library/ssl_srv.c
1564 * library/ssl_tls.c
1565 * library/x509.c
1566 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001567 * This module is used by the following key exchanges:
1568 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001569 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001570 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001571 */
Paul Bakker40e46942009-01-03 21:51:57 +00001572#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001573
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001574/**
1575 * \def POLARSSL_SHA1_C
1576 *
1577 * Enable the SHA1 cryptographic hash algorithm.
1578 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001579 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001580 * Caller: library/md.c
1581 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001582 * library/ssl_srv.c
1583 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001584 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001585 *
1586 * This module is required for SSL/TLS and SHA1-signed certificates.
1587 */
Paul Bakker40e46942009-01-03 21:51:57 +00001588#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001589
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001590/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001591 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001592 *
1593 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001594 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001595 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001596 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001597 * Caller: library/entropy.c
1598 * library/md.c
1599 * library/ssl_cli.c
1600 * library/ssl_srv.c
1601 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001602 *
1603 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001604 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001605 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001606#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001607
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001608/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001609 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001610 *
1611 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001612 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001613 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001614 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001615 * Caller: library/entropy.c
1616 * library/md.c
1617 * library/ssl_cli.c
1618 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001619 *
1620 * This module adds support for SHA-384 and SHA-512.
1621 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001622#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001623
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001624/**
Paul Bakker0a597072012-09-25 21:55:46 +00001625 * \def POLARSSL_SSL_CACHE_C
1626 *
1627 * Enable simple SSL cache implementation.
1628 *
1629 * Module: library/ssl_cache.c
1630 * Caller:
1631 *
1632 * Requires: POLARSSL_SSL_CACHE_C
1633 */
1634#define POLARSSL_SSL_CACHE_C
1635
1636/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001637 * \def POLARSSL_SSL_CLI_C
1638 *
1639 * Enable the SSL/TLS client code.
1640 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001641 * Module: library/ssl_cli.c
1642 * Caller:
1643 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001644 * Requires: POLARSSL_SSL_TLS_C
1645 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001646 * This module is required for SSL/TLS client support.
1647 */
Paul Bakker40e46942009-01-03 21:51:57 +00001648#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001649
Paul Bakker9a736322012-11-14 12:39:52 +00001650/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001651 * \def POLARSSL_SSL_SRV_C
1652 *
1653 * Enable the SSL/TLS server code.
1654 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001655 * Module: library/ssl_srv.c
1656 * Caller:
1657 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001658 * Requires: POLARSSL_SSL_TLS_C
1659 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001660 * This module is required for SSL/TLS server support.
1661 */
Paul Bakker40e46942009-01-03 21:51:57 +00001662#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001663
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001664/**
1665 * \def POLARSSL_SSL_TLS_C
1666 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001667 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001668 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001669 * Module: library/ssl_tls.c
1670 * Caller: library/ssl_cli.c
1671 * library/ssl_srv.c
1672 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001673 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001674 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001675 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001676 * This module is required for SSL/TLS.
1677 */
Paul Bakker40e46942009-01-03 21:51:57 +00001678#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001679
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001680/**
Paul Bakker2466d932013-09-28 14:40:38 +02001681 * \def POLARSSL_THREADING_C
1682 *
1683 * Enable the threading abstraction layer.
1684 * By default PolarSSL assumes it is used in a non-threaded environment or that
1685 * contexts are not shared between threads. If you do intend to use contexts
1686 * between threads, you will need to enable this layer to prevent race
1687 * conditions.
1688 *
1689 * Module: library/threading.c
1690 *
1691 * This allows different threading implementations (self-implemented or
1692 * provided).
1693 *
1694 * You will have to enable either POLARSSL_THREADING_ALT,
1695 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1696 *
1697 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001698 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001699//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001700
1701/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001702 * \def POLARSSL_TIMING_C
1703 *
1704 * Enable the portable timing interface.
1705 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001706 * Module: library/timing.c
1707 * Caller: library/havege.c
1708 *
1709 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001710 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001711#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001712
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001713/**
1714 * \def POLARSSL_VERSION_C
1715 *
1716 * Enable run-time version information.
1717 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001718 * Module: library/version.c
1719 *
1720 * This module provides run-time version information.
1721 */
1722#define POLARSSL_VERSION_C
1723
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001724/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001725 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001726 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001727 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001728 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001729 * Module: library/x509.c
1730 * Caller: library/x509_crl.c
1731 * library/x509_crt.c
1732 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001733 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001734 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001735 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001736 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001737 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001738 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001739#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001740
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001741/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001742 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001743 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001744 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001745 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001746 * Module: library/x509_crt.c
1747 * Caller: library/ssl_cli.c
1748 * library/ssl_srv.c
1749 * library/ssl_tls.c
1750 *
1751 * Requires: POLARSSL_X509_USE_C
1752 *
1753 * This module is required for X.509 certificate parsing.
1754 */
1755#define POLARSSL_X509_CRT_PARSE_C
1756
1757/**
1758 * \def POLARSSL_X509_CRL_PARSE_C
1759 *
1760 * Enable X.509 CRL parsing.
1761 *
1762 * Module: library/x509_crl.c
1763 * Caller: library/x509_crt.c
1764 *
1765 * Requires: POLARSSL_X509_USE_C
1766 *
1767 * This module is required for X.509 CRL parsing.
1768 */
1769#define POLARSSL_X509_CRL_PARSE_C
1770
1771/**
1772 * \def POLARSSL_X509_CSR_PARSE_C
1773 *
1774 * Enable X.509 Certificate Signing Request (CSR) parsing.
1775 *
1776 * Module: library/x509_csr.c
1777 * Caller: library/x509_crt_write.c
1778 *
1779 * Requires: POLARSSL_X509_USE_C
1780 *
1781 * This module is used for reading X.509 certificate request.
1782 */
1783#define POLARSSL_X509_CSR_PARSE_C
1784
1785/**
1786 * \def POLARSSL_X509_CREATE_C
1787 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001788 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001789 *
1790 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001791 *
Paul Bakker4606c732013-09-15 17:04:23 +02001792 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001793 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001794 * This module is the basis for creating X.509 certificates and CSRs.
1795 */
1796#define POLARSSL_X509_CREATE_C
1797
1798/**
1799 * \def POLARSSL_X509_CRT_WRITE_C
1800 *
1801 * Enable creating X.509 certificates.
1802 *
1803 * Module: library/x509_crt_write.c
1804 *
1805 * Requires: POLARSSL_CREATE_C
1806 *
1807 * This module is required for X.509 certificate creation.
1808 */
1809#define POLARSSL_X509_CRT_WRITE_C
1810
1811/**
1812 * \def POLARSSL_X509_CSR_WRITE_C
1813 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001814 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001815 *
1816 * Module: library/x509_csr_write.c
1817 *
1818 * Requires: POLARSSL_CREATE_C
1819 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001820 * This module is required for X.509 certificate request writing.
1821 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001822#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001823
1824/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001825 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001826 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001827 * Enable the XTEA block cipher.
1828 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001829 * Module: library/xtea.c
1830 * Caller:
1831 */
1832#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001833
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001834/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001835
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001836/**
1837 * \name SECTION: Module configuration options
1838 *
1839 * This section allows for the setting of module specific sizes and
1840 * configuration options. The default values are already present in the
1841 * relevant header files and should suffice for the regular use cases.
1842 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1843 * only if you have a good reason and know the consequences.
1844 *
1845 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1846 * header file take precedence.
1847 *
1848 * Please check the respective header file for documentation on these
1849 * parameters (to prevent duplicate documentation).
1850 *
1851 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1852 * \{
1853 */
1854//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1855
1856#if defined(POLARSSL_CONFIG_OPTIONS)
1857
1858// MPI / BIGNUM options
1859//
1860#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1861#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1862
1863// CTR_DRBG options
1864//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001865#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 +02001866#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1867#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1868#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1869#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1870
Paul Bakkere1b665e2013-12-11 16:02:58 +01001871// ECP options
1872//
1873#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
1874#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
1875
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001876// Entropy options
1877//
1878#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1879#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1880
Paul Bakker6e339b52013-07-03 13:37:05 +02001881// Memory options
1882#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1883#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1884#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1885
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001886// SSL Cache options
1887//
1888#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1889#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1890
1891// SSL options
1892//
1893#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001894#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001895
1896#endif /* POLARSSL_CONFIG_OPTIONS */
1897
1898/* \} name */
1899
Paul Bakker7ad00f92013-04-18 23:05:25 +02001900/*
1901 * Sanity checks on defines and dependencies
1902 */
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001903#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1904#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001905#endif
1906
1907#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1908#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1909#endif
1910
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001911#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1912#error "POLARSSL_DHM_C defined, but not all prerequisites"
1913#endif
1914
Paul Bakker7ad00f92013-04-18 23:05:25 +02001915#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1916#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1917#endif
1918
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001919#if defined(POLARSSL_ECDSA_C) && \
1920 ( !defined(POLARSSL_ECP_C) || \
1921 !defined(POLARSSL_ASN1_PARSE_C) || \
1922 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001923#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1924#endif
1925
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001926#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1927 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1928 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1929 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1930 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1931 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1932 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1933 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1934 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001935#error "POLARSSL_ECP_C defined, but not all prerequisites"
1936#endif
1937
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001938#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1939 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001940#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1941#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001942#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1943 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1944#error "CTR_DRBG_ENTROPY_LEN value too high"
1945#endif
1946#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1947 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1948#error "CTR_DRBG_ENTROPY_LEN value too high"
1949#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001950
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001951#if defined(POLARSSL_GCM_C) && ( \
1952 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001953#error "POLARSSL_GCM_C defined, but not all prerequisites"
1954#endif
1955
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001956#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1957#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1958#endif
1959
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001960#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
1961 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1962#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
1963#endif
1964
1965#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
1966 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1967#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
1968#endif
1969
Paul Bakkere07f41d2013-04-19 09:08:57 +02001970#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1971#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1972#endif
1973
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001974#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1975 !defined(POLARSSL_ECDH_C)
1976#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1977#endif
1978
Paul Bakkere07f41d2013-04-19 09:08:57 +02001979#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1980 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001981 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001982#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1983#endif
1984
1985#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1986 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001987 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001988#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1989#endif
1990
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001991#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1992 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001993 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001994#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1995#endif
1996
Paul Bakkere07f41d2013-04-19 09:08:57 +02001997#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001998 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001999 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002000#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2001#endif
2002
2003#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002004 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002005 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002006#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2007#endif
2008
Paul Bakker6e339b52013-07-03 13:37:05 +02002009#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
2010#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2011#endif
2012
Paul Bakker7ad00f92013-04-18 23:05:25 +02002013#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2014#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2015#endif
2016
Paul Bakkercff68422013-09-15 20:43:33 +02002017#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2018#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2019#endif
2020
2021#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2022#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002023#endif
2024
Paul Bakker4606c732013-09-15 17:04:23 +02002025#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2026#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2027#endif
2028
2029#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2030#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2031#endif
2032
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002033#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002034#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2035#endif
2036
2037#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2038 !defined(POLARSSL_OID_C) )
2039#error "POLARSSL_RSA_C defined, but not all prerequisites"
2040#endif
2041
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002042#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2043 !defined(POLARSSL_SHA1_C) )
2044#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2045#endif
2046
2047#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2048 !defined(POLARSSL_SHA1_C) )
2049#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2050#endif
2051
2052#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2053 !defined(POLARSSL_SHA1_C) )
2054#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2055#endif
2056
2057#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2058 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2059#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2060#endif
2061
Paul Bakker7ad00f92013-04-18 23:05:25 +02002062#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2063#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2064#endif
2065
Paul Bakker577e0062013-08-28 11:57:20 +02002066#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002067 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002068#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2069#endif
2070
2071#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2072#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2073#endif
2074
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002075#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2076 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2077 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2078#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2079#endif
2080
2081#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2082 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2083#error "Illegal protocol selection"
2084#endif
2085
2086#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2087 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2088#error "Illegal protocol selection"
2089#endif
2090
2091#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2092 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2093 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2094#error "Illegal protocol selection"
2095#endif
2096
Paul Bakker59da0a42013-08-19 13:27:17 +02002097#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002098 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2099 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002100#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2101#endif
2102
Paul Bakker2466d932013-09-28 14:40:38 +02002103#if defined(POLARSSL_THREADING_DUMMY)
2104#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2105#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
2106#endif
2107#define POLARSSL_THREADING_IMPL
2108#endif
2109
2110#if defined(POLARSSL_THREADING_PTHREAD)
2111#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2112#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2113#endif
2114#define POLARSSL_THREADING_IMPL
2115#endif
2116
2117#if defined(POLARSSL_THREADING_ALT)
2118#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2119#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2120#endif
2121#define POLARSSL_THREADING_IMPL
2122#endif
2123
2124#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2125#error "POLARSSL_THREADING_C defined, single threading implementation required"
2126#endif
2127#undef POLARSSL_THREADING_IMPL
2128
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002129#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002130 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002131 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002132#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002133#endif
2134
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002135#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2136 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2137 !defined(POLARSSL_PK_WRITE_C) )
2138#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2139#endif
2140
2141#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2142#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2143#endif
2144
2145#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2146#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2147#endif
2148
2149#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2150#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2151#endif
2152
2153#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2154#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2155#endif
2156
2157#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2158#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002159#endif
2160
Paul Bakker5121ce52009-01-03 21:22:43 +00002161#endif /* config.h */