blob: 6ad4e02914b9b8c9412eee22ae71eaf45ffa4085 [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),
109 * specifically getaddrinfo().
110 *
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é-Gonnard9d703732013-10-25 18:01:50 +0200193 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100194 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200195 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200196 * TLS_ECDHE_PSK_WITH_NULL_SHA256
197 * TLS_ECDHE_PSK_WITH_NULL_SHA
198 * TLS_DHE_PSK_WITH_NULL_SHA384
199 * TLS_DHE_PSK_WITH_NULL_SHA256
200 * TLS_DHE_PSK_WITH_NULL_SHA
201 * TLS_RSA_WITH_NULL_SHA256
202 * TLS_RSA_WITH_NULL_SHA
203 * TLS_RSA_WITH_NULL_MD5
204 * TLS_RSA_PSK_WITH_NULL_SHA384
205 * TLS_RSA_PSK_WITH_NULL_SHA256
206 * TLS_RSA_PSK_WITH_NULL_SHA
207 * TLS_PSK_WITH_NULL_SHA384
208 * TLS_PSK_WITH_NULL_SHA256
209 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000210 *
211 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200212#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000213 */
214
215/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200216 * \def POLARSSL_CIPHER_PADDING_XXX
217 *
218 * Uncomment or comment macros to add support for specific padding modes
219 * in the cipher layer with cipher modes that support padding (e.g. CBC)
220 *
221 * If you disable all padding modes, only full blocks can be used with CBC.
222 *
223 * Enable padding modes in the cipher layer.
224 */
225#define POLARSSL_CIPHER_PADDING_PKCS7
226#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
227#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
228#define POLARSSL_CIPHER_PADDING_ZEROS
229
230/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000231 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
232 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200233 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000234 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000235 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000236 *
237 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000238 * TLS_RSA_WITH_DES_CBC_SHA
239 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000240 *
241 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200242#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000243 */
244
245/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200246 * \def POLARSSL_ECP_XXXX_ENABLED
247 *
248 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200249 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200250 *
251 * Comment macros to disable the curve and functions for it
252 */
253#define POLARSSL_ECP_DP_SECP192R1_ENABLED
254#define POLARSSL_ECP_DP_SECP224R1_ENABLED
255#define POLARSSL_ECP_DP_SECP256R1_ENABLED
256#define POLARSSL_ECP_DP_SECP384R1_ENABLED
257#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200258#define POLARSSL_ECP_DP_BP256R1_ENABLED
259#define POLARSSL_ECP_DP_BP384R1_ENABLED
260#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100261//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
262#define POLARSSL_ECP_DP_M255_ENABLED
263//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
264//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200265
266/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200267 * \def POLARSSL_ECP_NIST_OPTIM
268 *
269 * Enable specific 'modulo p' routines for each NIST prime.
270 * Depending on the prime and architecture, makes operations 4 to 8 times
271 * faster on the corresponding curve.
272 *
273 * Comment this macro to disable NIST curves optimisation.
274 */
275#define POLARSSL_ECP_NIST_OPTIM
276
277/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200278 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
279 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200280 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200281 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200282 * This enables the following ciphersuites (if other requisites are
283 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200284 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200285 * TLS_PSK_WITH_AES_256_CBC_SHA384
286 * TLS_PSK_WITH_AES_256_CBC_SHA
287 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
288 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
289 * TLS_PSK_WITH_AES_128_GCM_SHA256
290 * TLS_PSK_WITH_AES_128_CBC_SHA256
291 * TLS_PSK_WITH_AES_128_CBC_SHA
292 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
293 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
294 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
295 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200296 */
297#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
298
299/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200300 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
301 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200302 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200303 *
304 * Requires: POLARSSL_DHM_C
305 *
306 * This enables the following ciphersuites (if other requisites are
307 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200308 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200309 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
310 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
311 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
312 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
313 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
314 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
315 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
316 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
317 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
318 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
319 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200320 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200321#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200322
323/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200324 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
325 *
326 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
327 *
328 * Requires: POLARSSL_ECDH_C
329 *
330 * This enables the following ciphersuites (if other requisites are
331 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200332 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200333 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200334 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200335 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
336 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
337 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
338 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
339 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200340 */
341#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
342
343/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200344 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
345 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200346 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200347 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200348 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200349 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200350 *
351 * This enables the following ciphersuites (if other requisites are
352 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200353 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200354 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
355 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
356 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
357 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
358 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
359 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
360 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
361 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
362 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
363 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
364 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200365 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200366#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200367
368/**
369 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
370 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200371 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200372 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200373 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200374 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200375 *
376 * This enables the following ciphersuites (if other requisites are
377 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200378 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200379 * TLS_RSA_WITH_AES_256_CBC_SHA256
380 * TLS_RSA_WITH_AES_256_CBC_SHA
381 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200382 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200383 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
384 * TLS_RSA_WITH_AES_128_GCM_SHA256
385 * TLS_RSA_WITH_AES_128_CBC_SHA256
386 * TLS_RSA_WITH_AES_128_CBC_SHA
387 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
388 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
389 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200390 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200391 * TLS_RSA_WITH_RC4_128_SHA
392 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200393 */
394#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
395
396/**
397 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
398 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200399 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200400 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200401 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200402 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200403 *
404 * This enables the following ciphersuites (if other requisites are
405 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200406 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200407 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200408 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
409 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200410 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200411 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
412 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
413 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
414 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
415 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
416 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
417 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200418 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
419 */
420#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
421
422/**
423 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
424 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200425 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200426 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200427 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200428 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200429 *
430 * This enables the following ciphersuites (if other requisites are
431 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200432 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200433 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
434 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
435 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200436 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200437 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
438 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
439 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
440 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
441 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
442 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
443 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200444 */
445#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
446
447/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200448 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
449 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200450 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200451 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200452 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200453 *
454 * This enables the following ciphersuites (if other requisites are
455 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200456 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
457 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
458 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
459 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
460 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
461 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
462 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
463 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
464 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
465 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
466 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
467 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200468 */
469#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
470
471/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200472 * \def POLARSSL_ERROR_STRERROR_BC
473 *
474 * Make available the backward compatible error_strerror() next to the
475 * current polarssl_strerror().
476 *
477 * Disable if you run into name conflicts and want to really remove the
478 * error_strerror()
479 */
480#define POLARSSL_ERROR_STRERROR_BC
481
482/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100483 * \def POLARSSL_ERROR_STRERROR_DUMMY
484 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200485 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100486 * third party libraries easier.
487 *
488 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200489 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100490 */
491#define POLARSSL_ERROR_STRERROR_DUMMY
492
493/**
Paul Bakker15566e42011-04-24 21:19:15 +0000494 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000495 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200496 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200497 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200498 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000499 */
Paul Bakker15566e42011-04-24 21:19:15 +0000500#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000501
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000502/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000503 * \def POLARSSL_FS_IO
504 *
505 * Enable functions that use the filesystem.
506 */
507#define POLARSSL_FS_IO
508
509/**
Paul Bakker43655f42011-12-15 20:11:16 +0000510 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
511 *
512 * Do not add default entropy sources. These are the platform specific,
513 * hardclock and HAVEGE based poll functions.
514 *
515 * This is useful to have more control over the added entropy sources in an
516 * application.
517 *
518 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000519 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200520//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000521
522/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000523 * \def POLARSSL_NO_PLATFORM_ENTROPY
524 *
525 * Do not use built-in platform entropy functions.
526 * This is useful if your platform does not support
527 * standards like the /dev/urandom or Windows CryptoAPI.
528 *
529 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000530 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200531//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000532
533/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200534 * \def POLARSSL_MEMORY_DEBUG
535 *
536 * Enable debugging of buffer allocator memory issues. Automatically prints
537 * (to stderr) all (fatal) messages on memory allocation issues. Enables
538 * function for 'debug output' of allocated memory.
539 *
540 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
541 * fprintf()
542 *
543 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200544 */
545//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200546
547/**
548 * \def POLARSSL_MEMORY_BACKTRACE
549 *
550 * Include backtrace information with each allocated block.
551 *
552 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
553 * GLIBC-compatible backtrace() an backtrace_symbols() support
554 *
555 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200556 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200557//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200558
559/**
Paul Bakker48377d92013-08-30 12:06:24 +0200560 * \def POLARSSL_PKCS1_V15
561 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200562 * Enable support for PKCS#1 v1.5 encoding.
563 *
Paul Bakker48377d92013-08-30 12:06:24 +0200564 * Requires: POLARSSL_RSA_C
565 *
Paul Bakker48377d92013-08-30 12:06:24 +0200566 * This enables support for PKCS#1 v1.5 operations.
567 */
568#define POLARSSL_PKCS1_V15
569
570/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000571 * \def POLARSSL_PKCS1_V21
572 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200573 * Enable support for PKCS#1 v2.1 encoding.
574 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000575 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
576 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000577 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
578 */
579#define POLARSSL_PKCS1_V21
580
581/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000582 * \def POLARSSL_RSA_NO_CRT
583 *
584 * Do not use the Chinese Remainder Theorem for the RSA private operation.
585 *
586 * Uncomment this macro to disable the use of CRT in RSA.
587 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000588 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200589//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000590
591/**
592 * \def POLARSSL_SELF_TEST
593 *
594 * Enable the checkup functions (*_self_test).
595 */
596#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000597
598/**
Paul Bakker40865c82013-01-31 17:13:13 +0100599 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
600 *
601 * Enable sending of alert messages in case of encountered errors as per RFC.
602 * If you choose not to send the alert messages, PolarSSL can still communicate
603 * with other servers, only debugging of failures is harder.
604 *
605 * The advantage of not sending alert messages, is that no information is given
606 * about reasons for failures thus preventing adversaries of gaining intel.
607 *
608 * Enable sending of all alert messages
609 */
610#define POLARSSL_SSL_ALERT_MESSAGES
611
612/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100613 * \def POLARSSL_SSL_DEBUG_ALL
614 *
615 * Enable the debug messages in SSL module for all issues.
616 * Debug messages have been disabled in some places to prevent timing
617 * attacks due to (unbalanced) debugging function calls.
618 *
619 * If you need all error reporting you should enable this during debugging,
620 * but remove this for production servers that should log as well.
621 *
622 * Uncomment this macro to report all debug messages on errors introducing
623 * a timing side-channel.
624 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100625 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200626//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100627
628/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000629 * \def POLARSSL_SSL_HW_RECORD_ACCEL
630 *
631 * Enable hooking functions in SSL module for hardware acceleration of
632 * individual records.
633 *
634 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000635 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200636//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000637
638/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100639 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
640 *
641 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200642 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100643 *
644 * Comment this macro to disable support for SSLv2 Client Hello messages.
645 */
646#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
647
648/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100649 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
650 *
651 * Pick the ciphersuite according to the client's preferences rather than ours
652 * in the SSL Server module (POLARSSL_SSL_SRV_C).
653 *
654 * Uncomment this macro to respect client's ciphersuite order
655 */
656//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
657
658/**
Paul Bakker05decb22013-08-15 13:33:48 +0200659 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
660 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200661 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200662 *
663 * Comment this macro to disable support for the max_fragment_length extension
664 */
665#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
666
667/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200668 * \def POLARSSL_SSL_PROTO_SSL3
669 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200670 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200671 *
672 * Requires: POLARSSL_MD5_C
673 * POLARSSL_SHA1_C
674 *
675 * Comment this macro to disable support for SSL 3.0
676 */
677#define POLARSSL_SSL_PROTO_SSL3
678
679/**
680 * \def POLARSSL_SSL_PROTO_TLS1
681 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200682 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200683 *
684 * Requires: POLARSSL_MD5_C
685 * POLARSSL_SHA1_C
686 *
687 * Comment this macro to disable support for TLS 1.0
688 */
689#define POLARSSL_SSL_PROTO_TLS1
690
691/**
692 * \def POLARSSL_SSL_PROTO_TLS1_1
693 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200694 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200695 *
696 * Requires: POLARSSL_MD5_C
697 * POLARSSL_SHA1_C
698 *
699 * Comment this macro to disable support for TLS 1.1
700 */
701#define POLARSSL_SSL_PROTO_TLS1_1
702
703/**
704 * \def POLARSSL_SSL_PROTO_TLS1_2
705 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200706 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200707 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100708 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200709 * (Depends on ciphersuites)
710 *
711 * Comment this macro to disable support for TLS 1.2
712 */
713#define POLARSSL_SSL_PROTO_TLS1_2
714
715/**
Paul Bakkera503a632013-08-14 13:48:06 +0200716 * \def POLARSSL_SSL_SESSION_TICKETS
717 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200718 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200719 *
720 * Requires: POLARSSL_AES_C
721 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200722 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200723 *
724 * Comment this macro to disable support for SSL session tickets
725 */
726#define POLARSSL_SSL_SESSION_TICKETS
727
728/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200729 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
730 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200731 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200732 *
733 * Comment this macro to disable support for server name indication in SSL
734 */
735#define POLARSSL_SSL_SERVER_NAME_INDICATION
736
737/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200738 * \def POLARSSL_SSL_TRUNCATED_HMAC
739 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200740 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200741 *
742 * Comment this macro to disable support for truncated HMAC in SSL
743 */
744#define POLARSSL_SSL_TRUNCATED_HMAC
745
746/**
Paul Bakker2466d932013-09-28 14:40:38 +0200747 * \def POLARSSL_THREADING_ALT
748 *
749 * Provide your own alternate threading implementation.
750 *
751 * Requires: POLARSSL_THREADING_C
752 *
753 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200754 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200755//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200756
757/**
758 * \def POLARSSL_THREADING_DUMMY
759 *
760 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200761 * Warning: If you use this, all claims of thread-safety in the documentation
762 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200763 *
764 * Requires: POLARSSL_THREADING_C
765 *
766 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200767 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200768//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200769
770/**
771 * \def POLARSSL_THREADING_PTHREAD
772 *
773 * Enable the pthread wrapper layer for the threading layer.
774 *
775 * Requires: POLARSSL_THREADING_C
776 *
777 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200778 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200779//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200780
781/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200782 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
783 *
784 * If set, the X509 parser will not break-off when parsing an X509 certificate
785 * and encountering an extension in a v1 or v2 certificate.
786 *
787 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200788 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200789//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200790
791/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000792 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
793 *
794 * If set, the X509 parser will not break-off when parsing an X509 certificate
795 * and encountering an unknown critical extension.
796 *
797 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000798 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200799//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000800
801/**
802 * \def POLARSSL_ZLIB_SUPPORT
803 *
804 * If set, the SSL/TLS module uses ZLIB to support compression and
805 * decompression of packet data.
806 *
807 * Used in: library/ssl_tls.c
808 * library/ssl_cli.c
809 * library/ssl_srv.c
810 *
811 * This feature requires zlib library and headers to be present.
812 *
813 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000814 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200815//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200816/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000817
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000818/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000819 * \name SECTION: PolarSSL modules
820 *
821 * This section enables or disables entire modules in PolarSSL
822 * \{
823 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000824
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000825/**
826 * \def POLARSSL_AES_C
827 *
828 * Enable the AES block cipher.
829 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000830 * Module: library/aes.c
831 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000832 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000833 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000834 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000835 * This module enables the following ciphersuites (if other requisites are
836 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200837 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
838 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
839 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
840 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
841 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000842 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200843 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100844 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200845 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
846 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
847 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
848 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
849 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
850 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
851 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
852 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
853 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
854 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
855 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
856 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
857 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
858 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
859 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
860 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
861 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
862 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
863 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
864 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
865 * TLS_RSA_WITH_AES_256_GCM_SHA384
866 * TLS_RSA_WITH_AES_256_CBC_SHA256
867 * TLS_RSA_WITH_AES_256_CBC_SHA
868 * TLS_RSA_WITH_AES_128_GCM_SHA256
869 * TLS_RSA_WITH_AES_128_CBC_SHA256
870 * TLS_RSA_WITH_AES_128_CBC_SHA
871 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
872 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
873 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
874 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
875 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
876 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
877 * TLS_PSK_WITH_AES_256_GCM_SHA384
878 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200879 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200880 * TLS_PSK_WITH_AES_128_GCM_SHA256
881 * TLS_PSK_WITH_AES_128_CBC_SHA256
882 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100883 *
Paul Bakkercff68422013-09-15 20:43:33 +0200884 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000885 */
Paul Bakker40e46942009-01-03 21:51:57 +0000886#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000887
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000888/**
889 * \def POLARSSL_ARC4_C
890 *
891 * Enable the ARCFOUR stream cipher.
892 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000893 * Module: library/arc4.c
894 * Caller: library/ssl_tls.c
895 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100896 * This module enables the following ciphersuites (if other requisites are
897 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200898 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100899 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200900 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
901 * TLS_DHE_PSK_WITH_RC4_128_SHA
902 * TLS_RSA_WITH_RC4_128_SHA
903 * TLS_RSA_WITH_RC4_128_MD5
904 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200905 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000906 */
Paul Bakker40e46942009-01-03 21:51:57 +0000907#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000908
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000909/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000910 * \def POLARSSL_ASN1_PARSE_C
911 *
912 * Enable the generic ASN1 parser.
913 *
914 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200915 * Caller: library/x509.c
916 * library/dhm.c
917 * library/pkcs12.c
918 * library/pkcs5.c
919 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000920 */
921#define POLARSSL_ASN1_PARSE_C
922
923/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000924 * \def POLARSSL_ASN1_WRITE_C
925 *
926 * Enable the generic ASN1 writer.
927 *
928 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200929 * Caller: library/ecdsa.c
930 * library/pkwrite.c
931 * library/x509_create.c
932 * library/x509write_crt.c
933 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000934 */
935#define POLARSSL_ASN1_WRITE_C
936
937/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000938 * \def POLARSSL_BASE64_C
939 *
940 * Enable the Base64 module.
941 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000942 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000943 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000944 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000945 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000946 */
Paul Bakker40e46942009-01-03 21:51:57 +0000947#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000948
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000949/**
950 * \def POLARSSL_BIGNUM_C
951 *
Paul Bakker9a736322012-11-14 12:39:52 +0000952 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000953 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000954 * Module: library/bignum.c
955 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200956 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000957 * library/rsa.c
958 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000959 *
960 * This module is required for RSA and DHM support.
961 */
Paul Bakker40e46942009-01-03 21:51:57 +0000962#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000963
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000964/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000965 * \def POLARSSL_BLOWFISH_C
966 *
967 * Enable the Blowfish block cipher.
968 *
969 * Module: library/blowfish.c
970 */
971#define POLARSSL_BLOWFISH_C
972
973/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000974 * \def POLARSSL_CAMELLIA_C
975 *
976 * Enable the Camellia block cipher.
977 *
Paul Bakker38119b12009-01-10 23:31:23 +0000978 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000979 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000980 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000981 * This module enables the following ciphersuites (if other requisites are
982 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200983 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
984 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
985 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
986 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
987 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000988 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200989 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
990 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
991 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
992 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
993 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
994 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
995 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
996 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
997 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
998 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
999 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1000 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1001 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1002 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1003 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1004 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1005 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1006 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1007 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1008 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1009 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1010 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1011 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1012 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1013 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1014 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1015 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1016 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001017 */
1018#define POLARSSL_CAMELLIA_C
1019
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001020/**
1021 * \def POLARSSL_CERTS_C
1022 *
1023 * Enable the test certificates.
1024 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001025 * Module: library/certs.c
1026 * Caller:
1027 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001028 * Requires: POLARSSL_PEM_PARSE_C
1029 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001030 * This module is used for testing (ssl_client/server).
1031 */
Paul Bakker40e46942009-01-03 21:51:57 +00001032#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001033
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001034/**
1035 * \def POLARSSL_CIPHER_C
1036 *
1037 * Enable the generic cipher layer.
1038 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001039 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001040 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001041 *
1042 * Uncomment to enable generic cipher wrappers.
1043 */
1044#define POLARSSL_CIPHER_C
1045
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001046/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001047 * \def POLARSSL_CTR_DRBG_C
1048 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001049 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001050 *
1051 * Module: library/ctr_drbg.c
1052 * Caller:
1053 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001054 * Requires: POLARSSL_AES_C
1055 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001056 * This module provides the CTR_DRBG AES-256 random number generator.
1057 */
1058#define POLARSSL_CTR_DRBG_C
1059
1060/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001061 * \def POLARSSL_DEBUG_C
1062 *
1063 * Enable the debug functions.
1064 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001065 * Module: library/debug.c
1066 * Caller: library/ssl_cli.c
1067 * library/ssl_srv.c
1068 * library/ssl_tls.c
1069 *
1070 * This module provides debugging functions.
1071 */
Paul Bakker40e46942009-01-03 21:51:57 +00001072#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001073
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001074/**
1075 * \def POLARSSL_DES_C
1076 *
1077 * Enable the DES block cipher.
1078 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001079 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001080 * Caller: library/pem.c
1081 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001082 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001083 * This module enables the following ciphersuites (if other requisites are
1084 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001085 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001086 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001087 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1088 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1089 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1090 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1091 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001092 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001093 *
Paul Bakkercff68422013-09-15 20:43:33 +02001094 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001095 */
Paul Bakker40e46942009-01-03 21:51:57 +00001096#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001097
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001098/**
1099 * \def POLARSSL_DHM_C
1100 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001101 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001102 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001103 * Module: library/dhm.c
1104 * Caller: library/ssl_cli.c
1105 * library/ssl_srv.c
1106 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001107 * This module is used by the following key exchanges:
1108 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001109 */
Paul Bakker40e46942009-01-03 21:51:57 +00001110#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001111
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001112/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001113 * \def POLARSSL_ECDH_C
1114 *
1115 * Enable the elliptic curve Diffie-Hellman library.
1116 *
1117 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001118 * Caller: library/ssl_cli.c
1119 * library/ssl_srv.c
1120 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001121 * This module is used by the following key exchanges:
1122 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001123 *
1124 * Requires: POLARSSL_ECP_C
1125 */
1126#define POLARSSL_ECDH_C
1127
1128/**
1129 * \def POLARSSL_ECDSA_C
1130 *
1131 * Enable the elliptic curve DSA library.
1132 *
1133 * Module: library/ecdsa.c
1134 * Caller:
1135 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001136 * This module is used by the following key exchanges:
1137 * ECDHE-ECDSA
1138 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001139 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001140 */
1141#define POLARSSL_ECDSA_C
1142
1143/**
1144 * \def POLARSSL_ECP_C
1145 *
1146 * Enable the elliptic curve over GF(p) library.
1147 *
1148 * Module: library/ecp.c
1149 * Caller: library/ecdh.c
1150 * library/ecdsa.c
1151 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001152 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001153 */
1154#define POLARSSL_ECP_C
1155
1156/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001157 * \def POLARSSL_ENTROPY_C
1158 *
1159 * Enable the platform-specific entropy code.
1160 *
1161 * Module: library/entropy.c
1162 * Caller:
1163 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001164 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001165 *
1166 * This module provides a generic entropy pool
1167 */
1168#define POLARSSL_ENTROPY_C
1169
1170/**
Paul Bakker9d781402011-05-09 16:17:09 +00001171 * \def POLARSSL_ERROR_C
1172 *
1173 * Enable error code to error string conversion.
1174 *
1175 * Module: library/error.c
1176 * Caller:
1177 *
1178 * This module enables err_strerror().
1179 */
1180#define POLARSSL_ERROR_C
1181
1182/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001183 * \def POLARSSL_GCM_C
1184 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001185 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001186 *
1187 * Module: library/gcm.c
1188 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001189 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001190 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001191 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1192 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001193 */
1194#define POLARSSL_GCM_C
1195
1196/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001197 * \def POLARSSL_HAVEGE_C
1198 *
1199 * Enable the HAVEGE random generator.
1200 *
Paul Bakker2a844242013-06-24 13:01:53 +02001201 * Warning: the HAVEGE random generator is not suitable for virtualized
1202 * environments
1203 *
1204 * Warning: the HAVEGE random generator is dependent on timing and specific
1205 * processor traits. It is therefore not advised to use HAVEGE as
1206 * your applications primary random generator or primary entropy pool
1207 * input. As a secondary input to your entropy pool, it IS able add
1208 * the (limited) extra entropy it provides.
1209 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001210 * Module: library/havege.c
1211 * Caller:
1212 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001213 * Requires: POLARSSL_TIMING_C
1214 *
Paul Bakker2a844242013-06-24 13:01:53 +02001215 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001216 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001217//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001218
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001219/**
1220 * \def POLARSSL_MD_C
1221 *
1222 * Enable the generic message digest layer.
1223 *
Paul Bakker17373852011-01-06 14:20:01 +00001224 * Module: library/md.c
1225 * Caller:
1226 *
1227 * Uncomment to enable generic message digest wrappers.
1228 */
1229#define POLARSSL_MD_C
1230
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001231/**
1232 * \def POLARSSL_MD2_C
1233 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001234 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001235 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001236 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001237 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001238 *
1239 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001240 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001241//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001242
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001243/**
1244 * \def POLARSSL_MD4_C
1245 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001246 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001247 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001248 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001249 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001250 *
1251 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001252 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001253//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001254
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001255/**
1256 * \def POLARSSL_MD5_C
1257 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001258 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001259 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001260 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001261 * Caller: library/md.c
1262 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001263 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001264 *
1265 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001266 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001267 */
Paul Bakker40e46942009-01-03 21:51:57 +00001268#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001269
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001270/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001271 * \def POLARSSL_MEMORY_C
1272 *
1273 * Enable the memory allocation layer.
1274 * By default PolarSSL uses the system-provided malloc() and free().
1275 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1276 * are defined and unmodified)
1277 *
1278 * This allows different allocators (self-implemented or provided)
1279 *
1280 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001281 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001282//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001283
1284/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001285 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1286 *
1287 * Enable the buffer allocator implementation that makes use of a (stack)
1288 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1289 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001290 *
1291 * Module: library/memory_buffer_alloc.c
1292 *
1293 * Requires: POLARSSL_MEMORY_C
1294 *
1295 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001296 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001297//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001298
1299/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001300 * \def POLARSSL_NET_C
1301 *
1302 * Enable the TCP/IP networking routines.
1303 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001304 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001305 *
1306 * This module provides TCP/IP networking routines.
1307 */
Paul Bakker40e46942009-01-03 21:51:57 +00001308#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001309
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001310/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001311 * \def POLARSSL_OID_C
1312 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001313 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001314 *
1315 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001316 * Caller: library/asn1write.c
1317 * library/pkcs5.c
1318 * library/pkparse.c
1319 * library/pkwrite.c
1320 * library/rsa.c
1321 * library/x509.c
1322 * library/x509_create.c
1323 * library/x509_crl.c
1324 * library/x509_crt.c
1325 * library/x509_csr.c
1326 * library/x509write_crt.c
1327 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001328 *
1329 * This modules translates between OIDs and internal values.
1330 */
1331#define POLARSSL_OID_C
1332
1333/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001334 * \def POLARSSL_PADLOCK_C
1335 *
1336 * Enable VIA Padlock support on x86.
1337 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001338 * Module: library/padlock.c
1339 * Caller: library/aes.c
1340 *
1341 * This modules adds support for the VIA PadLock on x86.
1342 */
Paul Bakker40e46942009-01-03 21:51:57 +00001343#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001344
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001345/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001346 * \def POLARSSL_PBKDF2_C
1347 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001348 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001349 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001350 *
1351 * Module: library/pbkdf2.c
1352 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001353 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001354 *
1355 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001356 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001357#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001358
1359/**
Paul Bakkercff68422013-09-15 20:43:33 +02001360 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001361 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001362 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001363 *
1364 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001365 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001366 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001367 * library/x509_crl.c
1368 * library/x509_crt.c
1369 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001370 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001371 * Requires: POLARSSL_BASE64_C
1372 *
Paul Bakkercff68422013-09-15 20:43:33 +02001373 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001374 */
Paul Bakkercff68422013-09-15 20:43:33 +02001375#define POLARSSL_PEM_PARSE_C
1376
1377/**
1378 * \def POLARSSL_PEM_WRITE_C
1379 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001380 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001381 *
1382 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001383 * Caller: library/pkwrite.c
1384 * library/x509write_crt.c
1385 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001386 *
1387 * Requires: POLARSSL_BASE64_C
1388 *
1389 * This modules adds support for encoding / writing PEM files.
1390 */
1391#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001392
1393/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001394 * \def POLARSSL_PK_C
1395 *
1396 * Enable the generic public (asymetric) key layer.
1397 *
1398 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001399 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001400 * library/ssl_cli.c
1401 * library/ssl_srv.c
1402 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001403 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1404 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001405 * Uncomment to enable generic public key wrappers.
1406 */
1407#define POLARSSL_PK_C
1408
1409/**
Paul Bakker4606c732013-09-15 17:04:23 +02001410 * \def POLARSSL_PK_PARSE_C
1411 *
1412 * Enable the generic public (asymetric) key parser.
1413 *
1414 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001415 * Caller: library/x509_crt.c
1416 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001417 *
1418 * Requires: POLARSSL_PK_C
1419 *
1420 * Uncomment to enable generic public key parse functions.
1421 */
1422#define POLARSSL_PK_PARSE_C
1423
1424/**
1425 * \def POLARSSL_PK_WRITE_C
1426 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001427 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001428 *
1429 * Module: library/pkwrite.c
1430 * Caller: library/x509write.c
1431 *
1432 * Requires: POLARSSL_PK_C
1433 *
1434 * Uncomment to enable generic public key write functions.
1435 */
1436#define POLARSSL_PK_WRITE_C
1437
1438/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001439 * \def POLARSSL_PKCS5_C
1440 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001441 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001442 *
1443 * Module: library/pkcs5.c
1444 *
1445 * Requires: POLARSSL_MD_C
1446 *
1447 * This module adds support for the PKCS#5 functions.
1448 */
1449#define POLARSSL_PKCS5_C
1450
1451/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001452 * \def POLARSSL_PKCS11_C
1453 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001454 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001455 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001456 * Module: library/pkcs11.c
1457 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001458 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001459 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001460 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001461 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001462 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001463 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001464//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001465
1466/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001467 * \def POLARSSL_PKCS12_C
1468 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001469 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001470 * Adds algorithms for parsing PKCS#8 encrypted private keys
1471 *
1472 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001473 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001474 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001475 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1476 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001477 *
1478 * This module enables PKCS#12 functions.
1479 */
1480#define POLARSSL_PKCS12_C
1481
1482/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001483 * \def POLARSSL_RSA_C
1484 *
1485 * Enable the RSA public-key cryptosystem.
1486 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001487 * Module: library/rsa.c
1488 * Caller: library/ssl_cli.c
1489 * library/ssl_srv.c
1490 * library/ssl_tls.c
1491 * library/x509.c
1492 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001493 * This module is used by the following key exchanges:
1494 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001495 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001496 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001497 */
Paul Bakker40e46942009-01-03 21:51:57 +00001498#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001499
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001500/**
1501 * \def POLARSSL_SHA1_C
1502 *
1503 * Enable the SHA1 cryptographic hash algorithm.
1504 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001505 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001506 * Caller: library/md.c
1507 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001508 * library/ssl_srv.c
1509 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001510 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001511 *
1512 * This module is required for SSL/TLS and SHA1-signed certificates.
1513 */
Paul Bakker40e46942009-01-03 21:51:57 +00001514#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001515
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001516/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001517 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001518 *
1519 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001520 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001521 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001522 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001523 * Caller: library/entropy.c
1524 * library/md.c
1525 * library/ssl_cli.c
1526 * library/ssl_srv.c
1527 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001528 *
1529 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001530 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001531 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001532#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001533
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001534/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001535 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001536 *
1537 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001538 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001539 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001540 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001541 * Caller: library/entropy.c
1542 * library/md.c
1543 * library/ssl_cli.c
1544 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001545 *
1546 * This module adds support for SHA-384 and SHA-512.
1547 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001548#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001549
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001550/**
Paul Bakker0a597072012-09-25 21:55:46 +00001551 * \def POLARSSL_SSL_CACHE_C
1552 *
1553 * Enable simple SSL cache implementation.
1554 *
1555 * Module: library/ssl_cache.c
1556 * Caller:
1557 *
1558 * Requires: POLARSSL_SSL_CACHE_C
1559 */
1560#define POLARSSL_SSL_CACHE_C
1561
1562/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001563 * \def POLARSSL_SSL_CLI_C
1564 *
1565 * Enable the SSL/TLS client code.
1566 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001567 * Module: library/ssl_cli.c
1568 * Caller:
1569 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001570 * Requires: POLARSSL_SSL_TLS_C
1571 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001572 * This module is required for SSL/TLS client support.
1573 */
Paul Bakker40e46942009-01-03 21:51:57 +00001574#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001575
Paul Bakker9a736322012-11-14 12:39:52 +00001576/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001577 * \def POLARSSL_SSL_SRV_C
1578 *
1579 * Enable the SSL/TLS server code.
1580 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001581 * Module: library/ssl_srv.c
1582 * Caller:
1583 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001584 * Requires: POLARSSL_SSL_TLS_C
1585 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001586 * This module is required for SSL/TLS server support.
1587 */
Paul Bakker40e46942009-01-03 21:51:57 +00001588#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001589
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001590/**
1591 * \def POLARSSL_SSL_TLS_C
1592 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001593 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001594 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001595 * Module: library/ssl_tls.c
1596 * Caller: library/ssl_cli.c
1597 * library/ssl_srv.c
1598 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001599 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001600 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001601 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001602 * This module is required for SSL/TLS.
1603 */
Paul Bakker40e46942009-01-03 21:51:57 +00001604#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001605
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001606/**
Paul Bakker2466d932013-09-28 14:40:38 +02001607 * \def POLARSSL_THREADING_C
1608 *
1609 * Enable the threading abstraction layer.
1610 * By default PolarSSL assumes it is used in a non-threaded environment or that
1611 * contexts are not shared between threads. If you do intend to use contexts
1612 * between threads, you will need to enable this layer to prevent race
1613 * conditions.
1614 *
1615 * Module: library/threading.c
1616 *
1617 * This allows different threading implementations (self-implemented or
1618 * provided).
1619 *
1620 * You will have to enable either POLARSSL_THREADING_ALT,
1621 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1622 *
1623 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001624 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001625//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001626
1627/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001628 * \def POLARSSL_TIMING_C
1629 *
1630 * Enable the portable timing interface.
1631 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001632 * Module: library/timing.c
1633 * Caller: library/havege.c
1634 *
1635 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001636 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001637#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001638
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001639/**
1640 * \def POLARSSL_VERSION_C
1641 *
1642 * Enable run-time version information.
1643 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001644 * Module: library/version.c
1645 *
1646 * This module provides run-time version information.
1647 */
1648#define POLARSSL_VERSION_C
1649
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001650/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001651 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001652 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001653 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001654 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001655 * Module: library/x509.c
1656 * Caller: library/x509_crl.c
1657 * library/x509_crt.c
1658 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001659 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001660 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001661 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001662 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001663 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001664 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001665#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001666
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001667/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001668 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001669 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001670 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001671 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001672 * Module: library/x509_crt.c
1673 * Caller: library/ssl_cli.c
1674 * library/ssl_srv.c
1675 * library/ssl_tls.c
1676 *
1677 * Requires: POLARSSL_X509_USE_C
1678 *
1679 * This module is required for X.509 certificate parsing.
1680 */
1681#define POLARSSL_X509_CRT_PARSE_C
1682
1683/**
1684 * \def POLARSSL_X509_CRL_PARSE_C
1685 *
1686 * Enable X.509 CRL parsing.
1687 *
1688 * Module: library/x509_crl.c
1689 * Caller: library/x509_crt.c
1690 *
1691 * Requires: POLARSSL_X509_USE_C
1692 *
1693 * This module is required for X.509 CRL parsing.
1694 */
1695#define POLARSSL_X509_CRL_PARSE_C
1696
1697/**
1698 * \def POLARSSL_X509_CSR_PARSE_C
1699 *
1700 * Enable X.509 Certificate Signing Request (CSR) parsing.
1701 *
1702 * Module: library/x509_csr.c
1703 * Caller: library/x509_crt_write.c
1704 *
1705 * Requires: POLARSSL_X509_USE_C
1706 *
1707 * This module is used for reading X.509 certificate request.
1708 */
1709#define POLARSSL_X509_CSR_PARSE_C
1710
1711/**
1712 * \def POLARSSL_X509_CREATE_C
1713 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001714 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001715 *
1716 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001717 *
Paul Bakker4606c732013-09-15 17:04:23 +02001718 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001719 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001720 * This module is the basis for creating X.509 certificates and CSRs.
1721 */
1722#define POLARSSL_X509_CREATE_C
1723
1724/**
1725 * \def POLARSSL_X509_CRT_WRITE_C
1726 *
1727 * Enable creating X.509 certificates.
1728 *
1729 * Module: library/x509_crt_write.c
1730 *
1731 * Requires: POLARSSL_CREATE_C
1732 *
1733 * This module is required for X.509 certificate creation.
1734 */
1735#define POLARSSL_X509_CRT_WRITE_C
1736
1737/**
1738 * \def POLARSSL_X509_CSR_WRITE_C
1739 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001740 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001741 *
1742 * Module: library/x509_csr_write.c
1743 *
1744 * Requires: POLARSSL_CREATE_C
1745 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001746 * This module is required for X.509 certificate request writing.
1747 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001748#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001749
1750/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001751 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001752 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001753 * Enable the XTEA block cipher.
1754 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001755 * Module: library/xtea.c
1756 * Caller:
1757 */
1758#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001759
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001760/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001761
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001762/**
1763 * \name SECTION: Module configuration options
1764 *
1765 * This section allows for the setting of module specific sizes and
1766 * configuration options. The default values are already present in the
1767 * relevant header files and should suffice for the regular use cases.
1768 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1769 * only if you have a good reason and know the consequences.
1770 *
1771 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1772 * header file take precedence.
1773 *
1774 * Please check the respective header file for documentation on these
1775 * parameters (to prevent duplicate documentation).
1776 *
1777 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1778 * \{
1779 */
1780//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1781
1782#if defined(POLARSSL_CONFIG_OPTIONS)
1783
1784// MPI / BIGNUM options
1785//
1786#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1787#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1788
1789// CTR_DRBG options
1790//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001791#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 +02001792#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1793#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1794#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1795#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1796
Paul Bakkere1b665e2013-12-11 16:02:58 +01001797// ECP options
1798//
1799#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
1800#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
1801
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001802// Entropy options
1803//
1804#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1805#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1806
Paul Bakker6e339b52013-07-03 13:37:05 +02001807// Memory options
1808#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1809#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1810#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1811
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001812// SSL Cache options
1813//
1814#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1815#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1816
1817// SSL options
1818//
1819#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001820#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001821
1822#endif /* POLARSSL_CONFIG_OPTIONS */
1823
1824/* \} name */
1825
Paul Bakker7ad00f92013-04-18 23:05:25 +02001826/*
1827 * Sanity checks on defines and dependencies
1828 */
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001829#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1830#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001831#endif
1832
1833#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1834#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1835#endif
1836
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001837#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1838#error "POLARSSL_DHM_C defined, but not all prerequisites"
1839#endif
1840
Paul Bakker7ad00f92013-04-18 23:05:25 +02001841#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1842#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1843#endif
1844
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001845#if defined(POLARSSL_ECDSA_C) && \
1846 ( !defined(POLARSSL_ECP_C) || \
1847 !defined(POLARSSL_ASN1_PARSE_C) || \
1848 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001849#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1850#endif
1851
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001852#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1853 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1854 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1855 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1856 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1857 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1858 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1859 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1860 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001861#error "POLARSSL_ECP_C defined, but not all prerequisites"
1862#endif
1863
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001864#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1865 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001866#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1867#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001868#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1869 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1870#error "CTR_DRBG_ENTROPY_LEN value too high"
1871#endif
1872#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1873 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1874#error "CTR_DRBG_ENTROPY_LEN value too high"
1875#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001876
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001877#if defined(POLARSSL_GCM_C) && ( \
1878 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001879#error "POLARSSL_GCM_C defined, but not all prerequisites"
1880#endif
1881
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001882#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1883#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1884#endif
1885
Paul Bakkere07f41d2013-04-19 09:08:57 +02001886#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1887#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1888#endif
1889
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001890#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1891 !defined(POLARSSL_ECDH_C)
1892#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1893#endif
1894
Paul Bakkere07f41d2013-04-19 09:08:57 +02001895#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1896 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001897 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001898#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1899#endif
1900
1901#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1902 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001903 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001904#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1905#endif
1906
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001907#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1908 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001909 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001910#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1911#endif
1912
Paul Bakkere07f41d2013-04-19 09:08:57 +02001913#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001914 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001915 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001916#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1917#endif
1918
1919#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001920 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001921 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001922#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1923#endif
1924
Paul Bakker6e339b52013-07-03 13:37:05 +02001925#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1926#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1927#endif
1928
Paul Bakker7ad00f92013-04-18 23:05:25 +02001929#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1930#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1931#endif
1932
Paul Bakkercff68422013-09-15 20:43:33 +02001933#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1934#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1935#endif
1936
1937#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1938#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001939#endif
1940
Paul Bakker4606c732013-09-15 17:04:23 +02001941#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1942#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1943#endif
1944
1945#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1946#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1947#endif
1948
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001949#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001950#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1951#endif
1952
1953#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1954 !defined(POLARSSL_OID_C) )
1955#error "POLARSSL_RSA_C defined, but not all prerequisites"
1956#endif
1957
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01001958#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
1959 !defined(POLARSSL_SHA1_C) )
1960#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
1961#endif
1962
1963#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
1964 !defined(POLARSSL_SHA1_C) )
1965#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
1966#endif
1967
1968#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
1969 !defined(POLARSSL_SHA1_C) )
1970#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
1971#endif
1972
1973#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
1974 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
1975#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
1976#endif
1977
Paul Bakker7ad00f92013-04-18 23:05:25 +02001978#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1979#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1980#endif
1981
Paul Bakker577e0062013-08-28 11:57:20 +02001982#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001983 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001984#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1985#endif
1986
1987#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1988#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1989#endif
1990
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001991#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1992 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1993 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1994#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1995#endif
1996
1997#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1998 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1999#error "Illegal protocol selection"
2000#endif
2001
2002#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2003 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2004#error "Illegal protocol selection"
2005#endif
2006
2007#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2008 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2009 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2010#error "Illegal protocol selection"
2011#endif
2012
Paul Bakker59da0a42013-08-19 13:27:17 +02002013#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002014 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2015 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002016#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2017#endif
2018
Paul Bakker2466d932013-09-28 14:40:38 +02002019#if defined(POLARSSL_THREADING_DUMMY)
2020#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2021#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
2022#endif
2023#define POLARSSL_THREADING_IMPL
2024#endif
2025
2026#if defined(POLARSSL_THREADING_PTHREAD)
2027#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2028#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2029#endif
2030#define POLARSSL_THREADING_IMPL
2031#endif
2032
2033#if defined(POLARSSL_THREADING_ALT)
2034#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2035#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2036#endif
2037#define POLARSSL_THREADING_IMPL
2038#endif
2039
2040#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2041#error "POLARSSL_THREADING_C defined, single threading implementation required"
2042#endif
2043#undef POLARSSL_THREADING_IMPL
2044
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002045#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002046 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002047 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002048#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002049#endif
2050
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002051#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2052 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2053 !defined(POLARSSL_PK_WRITE_C) )
2054#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2055#endif
2056
2057#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2058#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2059#endif
2060
2061#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2062#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2063#endif
2064
2065#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2066#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2067#endif
2068
2069#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2070#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2071#endif
2072
2073#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2074#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002075#endif
2076
Paul Bakker5121ce52009-01-03 21:22:43 +00002077#endif /* config.h */