blob: 934e1fa7c8c7d0c8dd150a9f50ad672845e07ffb [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/**
Paul Bakkerbe089b02013-10-14 15:51:50 +020097 * \def POLARSSL_HAVE_READDIR_R
98 *
99 * (Non Windows) System has readdir_r().
100 *
101 * Required for x509_crt_parse_path() in non-Windows systems.
102 *
103 * Comment if your system does not have support.
104 */
105#define POLARSSL_HAVE_READDIR_R
106
107/**
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200108 * \def POLARSSL_HAVE_TIME
109 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200110 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200111 *
112 * Comment if your system does not support time functions
113 */
114#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200115/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000116
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000117/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000118 * \name SECTION: PolarSSL feature support
119 *
120 * This section sets support for features that are or are not needed
121 * within the modules that are enabled.
122 * \{
123 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000124
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000125/**
Paul Bakker90995b52013-06-24 19:20:35 +0200126 * \def POLARSSL_XXX_ALT
127 *
128 * Uncomment a macro to let PolarSSL use your alternate core implementation of
129 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
130 * implementations). Keep in mind that the function prototypes should remain
131 * the same.
132 *
133 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
134 * provide the "struct aes_context" definition and omit the base function
135 * declarations and implementations. "aes_alt.h" will be included from
136 * "aes.h" to include the new function definitions.
137 *
138 * Uncomment a macro to enable alternate implementation for core algorithm
139 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200140 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200141//#define POLARSSL_AES_ALT
142//#define POLARSSL_ARC4_ALT
143//#define POLARSSL_BLOWFISH_ALT
144//#define POLARSSL_CAMELLIA_ALT
145//#define POLARSSL_DES_ALT
146//#define POLARSSL_XTEA_ALT
147//#define POLARSSL_MD2_ALT
148//#define POLARSSL_MD4_ALT
149//#define POLARSSL_MD5_ALT
150//#define POLARSSL_SHA1_ALT
151//#define POLARSSL_SHA256_ALT
152//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200153
154/**
Paul Bakker15566e42011-04-24 21:19:15 +0000155 * \def POLARSSL_AES_ROM_TABLES
156 *
157 * Store the AES tables in ROM.
158 *
159 * Uncomment this macro to store the AES tables in ROM.
160 *
Paul Bakker15566e42011-04-24 21:19:15 +0000161 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200162//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000163
164/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200165 * \def POLARSSL_CIPHER_MODE_CBC
166 *
167 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
168 */
169#define POLARSSL_CIPHER_MODE_CBC
170
171/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000172 * \def POLARSSL_CIPHER_MODE_CFB
173 *
174 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
175 */
176#define POLARSSL_CIPHER_MODE_CFB
177
178/**
179 * \def POLARSSL_CIPHER_MODE_CTR
180 *
181 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
182 */
183#define POLARSSL_CIPHER_MODE_CTR
184
185/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000186 * \def POLARSSL_CIPHER_NULL_CIPHER
187 *
188 * Enable NULL cipher.
189 * Warning: Only do so when you know what you are doing. This allows for
190 * encryption or channels without any security!
191 *
192 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
193 * the following ciphersuites:
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200194 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100195 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200196 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200197 * TLS_ECDHE_PSK_WITH_NULL_SHA256
198 * TLS_ECDHE_PSK_WITH_NULL_SHA
199 * TLS_DHE_PSK_WITH_NULL_SHA384
200 * TLS_DHE_PSK_WITH_NULL_SHA256
201 * TLS_DHE_PSK_WITH_NULL_SHA
202 * TLS_RSA_WITH_NULL_SHA256
203 * TLS_RSA_WITH_NULL_SHA
204 * TLS_RSA_WITH_NULL_MD5
205 * TLS_RSA_PSK_WITH_NULL_SHA384
206 * TLS_RSA_PSK_WITH_NULL_SHA256
207 * TLS_RSA_PSK_WITH_NULL_SHA
208 * TLS_PSK_WITH_NULL_SHA384
209 * TLS_PSK_WITH_NULL_SHA256
210 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000211 *
212 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200213#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000214 */
215
216/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200217 * \def POLARSSL_CIPHER_PADDING_XXX
218 *
219 * Uncomment or comment macros to add support for specific padding modes
220 * in the cipher layer with cipher modes that support padding (e.g. CBC)
221 *
222 * If you disable all padding modes, only full blocks can be used with CBC.
223 *
224 * Enable padding modes in the cipher layer.
225 */
226#define POLARSSL_CIPHER_PADDING_PKCS7
227#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
228#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
229#define POLARSSL_CIPHER_PADDING_ZEROS
230
231/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000232 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
233 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200234 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000235 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000236 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000237 *
238 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000239 * TLS_RSA_WITH_DES_CBC_SHA
240 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000241 *
242 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200243#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000244 */
245
246/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200247 * \def POLARSSL_ECP_XXXX_ENABLED
248 *
249 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200250 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200251 *
252 * Comment macros to disable the curve and functions for it
253 */
254#define POLARSSL_ECP_DP_SECP192R1_ENABLED
255#define POLARSSL_ECP_DP_SECP224R1_ENABLED
256#define POLARSSL_ECP_DP_SECP256R1_ENABLED
257#define POLARSSL_ECP_DP_SECP384R1_ENABLED
258#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200259#define POLARSSL_ECP_DP_BP256R1_ENABLED
260#define POLARSSL_ECP_DP_BP384R1_ENABLED
261#define POLARSSL_ECP_DP_BP512R1_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200262
263/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200264 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
265 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200266 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200267 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200268 * This enables the following ciphersuites (if other requisites are
269 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200270 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200271 * TLS_PSK_WITH_AES_256_CBC_SHA384
272 * TLS_PSK_WITH_AES_256_CBC_SHA
273 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
274 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
275 * TLS_PSK_WITH_AES_128_GCM_SHA256
276 * TLS_PSK_WITH_AES_128_CBC_SHA256
277 * TLS_PSK_WITH_AES_128_CBC_SHA
278 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
279 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
280 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
281 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200282 */
283#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
284
285/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200286 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
287 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200288 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200289 *
290 * Requires: POLARSSL_DHM_C
291 *
292 * This enables the following ciphersuites (if other requisites are
293 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200294 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200295 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
296 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
297 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
298 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
299 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
300 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
301 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
302 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
303 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
304 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
305 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200306 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200307#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200308
309/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200310 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
311 *
312 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
313 *
314 * Requires: POLARSSL_ECDH_C
315 *
316 * This enables the following ciphersuites (if other requisites are
317 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200318 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200319 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200320 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200321 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
322 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
323 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
324 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
325 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200326 */
327#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
328
329/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200330 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
331 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200332 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200333 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200334 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200335 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200336 *
337 * This enables the following ciphersuites (if other requisites are
338 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200339 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200340 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
341 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
342 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
343 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
344 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
345 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
346 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
347 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
348 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
349 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
350 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200351 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200352#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200353
354/**
355 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
356 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200357 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200358 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200359 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200360 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200361 *
362 * This enables the following ciphersuites (if other requisites are
363 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200364 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200365 * TLS_RSA_WITH_AES_256_CBC_SHA256
366 * TLS_RSA_WITH_AES_256_CBC_SHA
367 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200368 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200369 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
370 * TLS_RSA_WITH_AES_128_GCM_SHA256
371 * TLS_RSA_WITH_AES_128_CBC_SHA256
372 * TLS_RSA_WITH_AES_128_CBC_SHA
373 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
374 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
375 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200376 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200377 * TLS_RSA_WITH_RC4_128_SHA
378 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200379 */
380#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
381
382/**
383 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
384 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200385 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200386 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200387 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200388 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200389 *
390 * This enables the following ciphersuites (if other requisites are
391 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200392 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200393 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200394 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
395 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200396 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200397 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
398 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
399 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
400 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
401 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
402 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
403 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200404 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
405 */
406#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
407
408/**
409 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
410 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200411 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200412 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200413 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200414 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200415 *
416 * This enables the following ciphersuites (if other requisites are
417 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200418 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200419 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
420 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
421 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200422 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200423 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
424 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
425 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
426 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
427 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
428 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
429 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200430 */
431#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
432
433/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200434 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
435 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200436 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200437 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200438 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200439 *
440 * This enables the following ciphersuites (if other requisites are
441 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200442 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
443 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
444 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
445 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
446 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
447 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
448 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
449 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
450 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
451 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
452 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
453 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200454 */
455#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
456
457/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200458 * \def POLARSSL_ERROR_STRERROR_BC
459 *
460 * Make available the backward compatible error_strerror() next to the
461 * current polarssl_strerror().
462 *
463 * Disable if you run into name conflicts and want to really remove the
464 * error_strerror()
465 */
466#define POLARSSL_ERROR_STRERROR_BC
467
468/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100469 * \def POLARSSL_ERROR_STRERROR_DUMMY
470 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200471 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100472 * third party libraries easier.
473 *
474 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200475 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100476 */
477#define POLARSSL_ERROR_STRERROR_DUMMY
478
479/**
Paul Bakker15566e42011-04-24 21:19:15 +0000480 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000481 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200482 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200483 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200484 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000485 */
Paul Bakker15566e42011-04-24 21:19:15 +0000486#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000487
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000488/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000489 * \def POLARSSL_FS_IO
490 *
491 * Enable functions that use the filesystem.
492 */
493#define POLARSSL_FS_IO
494
495/**
Paul Bakker43655f42011-12-15 20:11:16 +0000496 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
497 *
498 * Do not add default entropy sources. These are the platform specific,
499 * hardclock and HAVEGE based poll functions.
500 *
501 * This is useful to have more control over the added entropy sources in an
502 * application.
503 *
504 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000505 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200506//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000507
508/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000509 * \def POLARSSL_NO_PLATFORM_ENTROPY
510 *
511 * Do not use built-in platform entropy functions.
512 * This is useful if your platform does not support
513 * standards like the /dev/urandom or Windows CryptoAPI.
514 *
515 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000516 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200517//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000518
519/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200520 * \def POLARSSL_MEMORY_DEBUG
521 *
522 * Enable debugging of buffer allocator memory issues. Automatically prints
523 * (to stderr) all (fatal) messages on memory allocation issues. Enables
524 * function for 'debug output' of allocated memory.
525 *
526 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
527 * fprintf()
528 *
529 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200530 */
531//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200532
533/**
534 * \def POLARSSL_MEMORY_BACKTRACE
535 *
536 * Include backtrace information with each allocated block.
537 *
538 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
539 * GLIBC-compatible backtrace() an backtrace_symbols() support
540 *
541 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200542 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200543//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200544
545/**
Paul Bakker48377d92013-08-30 12:06:24 +0200546 * \def POLARSSL_PKCS1_V15
547 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200548 * Enable support for PKCS#1 v1.5 encoding.
549 *
Paul Bakker48377d92013-08-30 12:06:24 +0200550 * Requires: POLARSSL_RSA_C
551 *
Paul Bakker48377d92013-08-30 12:06:24 +0200552 * This enables support for PKCS#1 v1.5 operations.
553 */
554#define POLARSSL_PKCS1_V15
555
556/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000557 * \def POLARSSL_PKCS1_V21
558 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200559 * Enable support for PKCS#1 v2.1 encoding.
560 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000561 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
562 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000563 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
564 */
565#define POLARSSL_PKCS1_V21
566
567/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000568 * \def POLARSSL_RSA_NO_CRT
569 *
570 * Do not use the Chinese Remainder Theorem for the RSA private operation.
571 *
572 * Uncomment this macro to disable the use of CRT in RSA.
573 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000574 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200575//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000576
577/**
578 * \def POLARSSL_SELF_TEST
579 *
580 * Enable the checkup functions (*_self_test).
581 */
582#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000583
584/**
Paul Bakker40865c82013-01-31 17:13:13 +0100585 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
586 *
587 * Enable sending of alert messages in case of encountered errors as per RFC.
588 * If you choose not to send the alert messages, PolarSSL can still communicate
589 * with other servers, only debugging of failures is harder.
590 *
591 * The advantage of not sending alert messages, is that no information is given
592 * about reasons for failures thus preventing adversaries of gaining intel.
593 *
594 * Enable sending of all alert messages
595 */
596#define POLARSSL_SSL_ALERT_MESSAGES
597
598/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100599 * \def POLARSSL_SSL_DEBUG_ALL
600 *
601 * Enable the debug messages in SSL module for all issues.
602 * Debug messages have been disabled in some places to prevent timing
603 * attacks due to (unbalanced) debugging function calls.
604 *
605 * If you need all error reporting you should enable this during debugging,
606 * but remove this for production servers that should log as well.
607 *
608 * Uncomment this macro to report all debug messages on errors introducing
609 * a timing side-channel.
610 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100611 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200612//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100613
614/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000615 * \def POLARSSL_SSL_HW_RECORD_ACCEL
616 *
617 * Enable hooking functions in SSL module for hardware acceleration of
618 * individual records.
619 *
620 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000621 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200622//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000623
624/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100625 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
626 *
627 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200628 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100629 *
630 * Comment this macro to disable support for SSLv2 Client Hello messages.
631 */
632#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
633
634/**
Paul Bakker05decb22013-08-15 13:33:48 +0200635 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
636 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200637 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200638 *
639 * Comment this macro to disable support for the max_fragment_length extension
640 */
641#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
642
643/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200644 * \def POLARSSL_SSL_PROTO_SSL3
645 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200646 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200647 *
648 * Requires: POLARSSL_MD5_C
649 * POLARSSL_SHA1_C
650 *
651 * Comment this macro to disable support for SSL 3.0
652 */
653#define POLARSSL_SSL_PROTO_SSL3
654
655/**
656 * \def POLARSSL_SSL_PROTO_TLS1
657 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200658 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200659 *
660 * Requires: POLARSSL_MD5_C
661 * POLARSSL_SHA1_C
662 *
663 * Comment this macro to disable support for TLS 1.0
664 */
665#define POLARSSL_SSL_PROTO_TLS1
666
667/**
668 * \def POLARSSL_SSL_PROTO_TLS1_1
669 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200670 * Enable support for TLS 1.1.
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 TLS 1.1
676 */
677#define POLARSSL_SSL_PROTO_TLS1_1
678
679/**
680 * \def POLARSSL_SSL_PROTO_TLS1_2
681 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200682 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200683 *
684 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
685 * (Depends on ciphersuites)
686 *
687 * Comment this macro to disable support for TLS 1.2
688 */
689#define POLARSSL_SSL_PROTO_TLS1_2
690
691/**
Paul Bakkera503a632013-08-14 13:48:06 +0200692 * \def POLARSSL_SSL_SESSION_TICKETS
693 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200694 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200695 *
696 * Requires: POLARSSL_AES_C
697 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200698 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200699 *
700 * Comment this macro to disable support for SSL session tickets
701 */
702#define POLARSSL_SSL_SESSION_TICKETS
703
704/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200705 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
706 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200707 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200708 *
709 * Comment this macro to disable support for server name indication in SSL
710 */
711#define POLARSSL_SSL_SERVER_NAME_INDICATION
712
713/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200714 * \def POLARSSL_SSL_TRUNCATED_HMAC
715 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200716 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200717 *
718 * Comment this macro to disable support for truncated HMAC in SSL
719 */
720#define POLARSSL_SSL_TRUNCATED_HMAC
721
722/**
Paul Bakker2466d932013-09-28 14:40:38 +0200723 * \def POLARSSL_THREADING_ALT
724 *
725 * Provide your own alternate threading implementation.
726 *
727 * Requires: POLARSSL_THREADING_C
728 *
729 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200730 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200731//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200732
733/**
734 * \def POLARSSL_THREADING_DUMMY
735 *
736 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200737 * Warning: If you use this, all claims of thread-safety in the documentation
738 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200739 *
740 * Requires: POLARSSL_THREADING_C
741 *
742 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200743 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200744//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200745
746/**
747 * \def POLARSSL_THREADING_PTHREAD
748 *
749 * Enable the pthread wrapper layer for the threading layer.
750 *
751 * Requires: POLARSSL_THREADING_C
752 *
753 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200754 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200755//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200756
757/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200758 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
759 *
760 * If set, the X509 parser will not break-off when parsing an X509 certificate
761 * and encountering an extension in a v1 or v2 certificate.
762 *
763 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200764 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200765//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200766
767/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000768 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
769 *
770 * If set, the X509 parser will not break-off when parsing an X509 certificate
771 * and encountering an unknown critical extension.
772 *
773 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000774 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200775//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000776
777/**
778 * \def POLARSSL_ZLIB_SUPPORT
779 *
780 * If set, the SSL/TLS module uses ZLIB to support compression and
781 * decompression of packet data.
782 *
783 * Used in: library/ssl_tls.c
784 * library/ssl_cli.c
785 * library/ssl_srv.c
786 *
787 * This feature requires zlib library and headers to be present.
788 *
789 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000790 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200791//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200792/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000793
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000794/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000795 * \name SECTION: PolarSSL modules
796 *
797 * This section enables or disables entire modules in PolarSSL
798 * \{
799 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000800
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000801/**
802 * \def POLARSSL_AES_C
803 *
804 * Enable the AES block cipher.
805 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000806 * Module: library/aes.c
807 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000808 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000809 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000810 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000811 * This module enables the following ciphersuites (if other requisites are
812 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200813 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
814 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
815 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
816 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
817 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000818 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200819 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100820 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200821 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
822 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
823 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
824 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
825 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
826 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
827 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
828 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
829 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
830 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
831 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
832 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
833 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
834 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
835 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
836 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
837 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
838 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
839 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
840 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
841 * TLS_RSA_WITH_AES_256_GCM_SHA384
842 * TLS_RSA_WITH_AES_256_CBC_SHA256
843 * TLS_RSA_WITH_AES_256_CBC_SHA
844 * TLS_RSA_WITH_AES_128_GCM_SHA256
845 * TLS_RSA_WITH_AES_128_CBC_SHA256
846 * TLS_RSA_WITH_AES_128_CBC_SHA
847 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
848 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
849 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
850 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
851 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
852 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
853 * TLS_PSK_WITH_AES_256_GCM_SHA384
854 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200855 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200856 * TLS_PSK_WITH_AES_128_GCM_SHA256
857 * TLS_PSK_WITH_AES_128_CBC_SHA256
858 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100859 *
Paul Bakkercff68422013-09-15 20:43:33 +0200860 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000861 */
Paul Bakker40e46942009-01-03 21:51:57 +0000862#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000863
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000864/**
865 * \def POLARSSL_ARC4_C
866 *
867 * Enable the ARCFOUR stream cipher.
868 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000869 * Module: library/arc4.c
870 * Caller: library/ssl_tls.c
871 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100872 * This module enables the following ciphersuites (if other requisites are
873 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200874 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100875 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200876 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
877 * TLS_DHE_PSK_WITH_RC4_128_SHA
878 * TLS_RSA_WITH_RC4_128_SHA
879 * TLS_RSA_WITH_RC4_128_MD5
880 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200881 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000882 */
Paul Bakker40e46942009-01-03 21:51:57 +0000883#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000884
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000885/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000886 * \def POLARSSL_ASN1_PARSE_C
887 *
888 * Enable the generic ASN1 parser.
889 *
890 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200891 * Caller: library/x509.c
892 * library/dhm.c
893 * library/pkcs12.c
894 * library/pkcs5.c
895 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000896 */
897#define POLARSSL_ASN1_PARSE_C
898
899/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000900 * \def POLARSSL_ASN1_WRITE_C
901 *
902 * Enable the generic ASN1 writer.
903 *
904 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200905 * Caller: library/ecdsa.c
906 * library/pkwrite.c
907 * library/x509_create.c
908 * library/x509write_crt.c
909 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000910 */
911#define POLARSSL_ASN1_WRITE_C
912
913/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000914 * \def POLARSSL_BASE64_C
915 *
916 * Enable the Base64 module.
917 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000918 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000919 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000920 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000921 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000922 */
Paul Bakker40e46942009-01-03 21:51:57 +0000923#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000924
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000925/**
926 * \def POLARSSL_BIGNUM_C
927 *
Paul Bakker9a736322012-11-14 12:39:52 +0000928 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000929 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000930 * Module: library/bignum.c
931 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200932 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000933 * library/rsa.c
934 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000935 *
936 * This module is required for RSA and DHM support.
937 */
Paul Bakker40e46942009-01-03 21:51:57 +0000938#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000939
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000940/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000941 * \def POLARSSL_BLOWFISH_C
942 *
943 * Enable the Blowfish block cipher.
944 *
945 * Module: library/blowfish.c
946 */
947#define POLARSSL_BLOWFISH_C
948
949/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000950 * \def POLARSSL_CAMELLIA_C
951 *
952 * Enable the Camellia block cipher.
953 *
Paul Bakker38119b12009-01-10 23:31:23 +0000954 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000955 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000956 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000957 * This module enables the following ciphersuites (if other requisites are
958 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200959 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
960 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
961 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
962 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
963 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000964 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200965 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
966 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
967 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
968 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
969 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
970 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
971 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
972 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
973 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
974 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
975 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
976 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
977 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
978 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
979 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
980 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
981 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
982 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
983 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
984 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
985 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
986 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
987 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
988 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
989 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
990 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
991 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
992 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000993 */
994#define POLARSSL_CAMELLIA_C
995
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000996/**
997 * \def POLARSSL_CERTS_C
998 *
999 * Enable the test certificates.
1000 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001001 * Module: library/certs.c
1002 * Caller:
1003 *
1004 * This module is used for testing (ssl_client/server).
1005 */
Paul Bakker40e46942009-01-03 21:51:57 +00001006#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001007
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001008/**
1009 * \def POLARSSL_CIPHER_C
1010 *
1011 * Enable the generic cipher layer.
1012 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001013 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001014 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001015 *
1016 * Uncomment to enable generic cipher wrappers.
1017 */
1018#define POLARSSL_CIPHER_C
1019
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001020/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001021 * \def POLARSSL_CTR_DRBG_C
1022 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001023 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001024 *
1025 * Module: library/ctr_drbg.c
1026 * Caller:
1027 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001028 * Requires: POLARSSL_AES_C
1029 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001030 * This module provides the CTR_DRBG AES-256 random number generator.
1031 */
1032#define POLARSSL_CTR_DRBG_C
1033
1034/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001035 * \def POLARSSL_DEBUG_C
1036 *
1037 * Enable the debug functions.
1038 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001039 * Module: library/debug.c
1040 * Caller: library/ssl_cli.c
1041 * library/ssl_srv.c
1042 * library/ssl_tls.c
1043 *
1044 * This module provides debugging functions.
1045 */
Paul Bakker40e46942009-01-03 21:51:57 +00001046#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001047
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001048/**
1049 * \def POLARSSL_DES_C
1050 *
1051 * Enable the DES block cipher.
1052 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001053 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001054 * Caller: library/pem.c
1055 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001056 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001057 * This module enables the following ciphersuites (if other requisites are
1058 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001059 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001060 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001061 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1062 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1063 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1064 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1065 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001066 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001067 *
Paul Bakkercff68422013-09-15 20:43:33 +02001068 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001069 */
Paul Bakker40e46942009-01-03 21:51:57 +00001070#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001071
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001072/**
1073 * \def POLARSSL_DHM_C
1074 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001075 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001076 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001077 * Module: library/dhm.c
1078 * Caller: library/ssl_cli.c
1079 * library/ssl_srv.c
1080 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001081 * This module is used by the following key exchanges:
1082 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001083 */
Paul Bakker40e46942009-01-03 21:51:57 +00001084#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001085
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001086/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001087 * \def POLARSSL_ECDH_C
1088 *
1089 * Enable the elliptic curve Diffie-Hellman library.
1090 *
1091 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001092 * Caller: library/ssl_cli.c
1093 * library/ssl_srv.c
1094 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001095 * This module is used by the following key exchanges:
1096 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001097 *
1098 * Requires: POLARSSL_ECP_C
1099 */
1100#define POLARSSL_ECDH_C
1101
1102/**
1103 * \def POLARSSL_ECDSA_C
1104 *
1105 * Enable the elliptic curve DSA library.
1106 *
1107 * Module: library/ecdsa.c
1108 * Caller:
1109 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001110 * This module is used by the following key exchanges:
1111 * ECDHE-ECDSA
1112 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001113 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001114 */
1115#define POLARSSL_ECDSA_C
1116
1117/**
1118 * \def POLARSSL_ECP_C
1119 *
1120 * Enable the elliptic curve over GF(p) library.
1121 *
1122 * Module: library/ecp.c
1123 * Caller: library/ecdh.c
1124 * library/ecdsa.c
1125 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001126 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001127 */
1128#define POLARSSL_ECP_C
1129
1130/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001131 * \def POLARSSL_ENTROPY_C
1132 *
1133 * Enable the platform-specific entropy code.
1134 *
1135 * Module: library/entropy.c
1136 * Caller:
1137 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001138 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001139 *
1140 * This module provides a generic entropy pool
1141 */
1142#define POLARSSL_ENTROPY_C
1143
1144/**
Paul Bakker9d781402011-05-09 16:17:09 +00001145 * \def POLARSSL_ERROR_C
1146 *
1147 * Enable error code to error string conversion.
1148 *
1149 * Module: library/error.c
1150 * Caller:
1151 *
1152 * This module enables err_strerror().
1153 */
1154#define POLARSSL_ERROR_C
1155
1156/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001157 * \def POLARSSL_GCM_C
1158 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001159 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001160 *
1161 * Module: library/gcm.c
1162 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001163 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001164 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001165 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1166 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001167 */
1168#define POLARSSL_GCM_C
1169
1170/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001171 * \def POLARSSL_HAVEGE_C
1172 *
1173 * Enable the HAVEGE random generator.
1174 *
Paul Bakker2a844242013-06-24 13:01:53 +02001175 * Warning: the HAVEGE random generator is not suitable for virtualized
1176 * environments
1177 *
1178 * Warning: the HAVEGE random generator is dependent on timing and specific
1179 * processor traits. It is therefore not advised to use HAVEGE as
1180 * your applications primary random generator or primary entropy pool
1181 * input. As a secondary input to your entropy pool, it IS able add
1182 * the (limited) extra entropy it provides.
1183 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001184 * Module: library/havege.c
1185 * Caller:
1186 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001187 * Requires: POLARSSL_TIMING_C
1188 *
Paul Bakker2a844242013-06-24 13:01:53 +02001189 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001190 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001191//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001192
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001193/**
1194 * \def POLARSSL_MD_C
1195 *
1196 * Enable the generic message digest layer.
1197 *
Paul Bakker17373852011-01-06 14:20:01 +00001198 * Module: library/md.c
1199 * Caller:
1200 *
1201 * Uncomment to enable generic message digest wrappers.
1202 */
1203#define POLARSSL_MD_C
1204
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001205/**
1206 * \def POLARSSL_MD2_C
1207 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001208 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001209 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001210 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001211 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001212 *
1213 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001214 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001215//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001216
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001217/**
1218 * \def POLARSSL_MD4_C
1219 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001220 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001221 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001222 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001223 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001224 *
1225 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001226 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001227//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001228
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001229/**
1230 * \def POLARSSL_MD5_C
1231 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001232 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001233 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001234 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001235 * Caller: library/md.c
1236 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001237 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001238 *
1239 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001240 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001241 */
Paul Bakker40e46942009-01-03 21:51:57 +00001242#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001243
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001244/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001245 * \def POLARSSL_MEMORY_C
1246 *
1247 * Enable the memory allocation layer.
1248 * By default PolarSSL uses the system-provided malloc() and free().
1249 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1250 * are defined and unmodified)
1251 *
1252 * This allows different allocators (self-implemented or provided)
1253 *
1254 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001255 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001256//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001257
1258/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001259 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1260 *
1261 * Enable the buffer allocator implementation that makes use of a (stack)
1262 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1263 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001264 *
1265 * Module: library/memory_buffer_alloc.c
1266 *
1267 * Requires: POLARSSL_MEMORY_C
1268 *
1269 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001270 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001271//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001272
1273/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001274 * \def POLARSSL_NET_C
1275 *
1276 * Enable the TCP/IP networking routines.
1277 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001278 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001279 *
1280 * This module provides TCP/IP networking routines.
1281 */
Paul Bakker40e46942009-01-03 21:51:57 +00001282#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001283
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001284/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001285 * \def POLARSSL_OID_C
1286 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001287 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001288 *
1289 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001290 * Caller: library/asn1write.c
1291 * library/pkcs5.c
1292 * library/pkparse.c
1293 * library/pkwrite.c
1294 * library/rsa.c
1295 * library/x509.c
1296 * library/x509_create.c
1297 * library/x509_crl.c
1298 * library/x509_crt.c
1299 * library/x509_csr.c
1300 * library/x509write_crt.c
1301 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001302 *
1303 * This modules translates between OIDs and internal values.
1304 */
1305#define POLARSSL_OID_C
1306
1307/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001308 * \def POLARSSL_PADLOCK_C
1309 *
1310 * Enable VIA Padlock support on x86.
1311 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001312 * Module: library/padlock.c
1313 * Caller: library/aes.c
1314 *
1315 * This modules adds support for the VIA PadLock on x86.
1316 */
Paul Bakker40e46942009-01-03 21:51:57 +00001317#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001318
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001319/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001320 * \def POLARSSL_PBKDF2_C
1321 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001322 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001323 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001324 *
1325 * Module: library/pbkdf2.c
1326 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001327 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001328 *
1329 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001330 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001331#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001332
1333/**
Paul Bakkercff68422013-09-15 20:43:33 +02001334 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001335 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001336 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001337 *
1338 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001339 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001340 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001341 * library/x509_crl.c
1342 * library/x509_crt.c
1343 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001344 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001345 * Requires: POLARSSL_BASE64_C
1346 *
Paul Bakkercff68422013-09-15 20:43:33 +02001347 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001348 */
Paul Bakkercff68422013-09-15 20:43:33 +02001349#define POLARSSL_PEM_PARSE_C
1350
1351/**
1352 * \def POLARSSL_PEM_WRITE_C
1353 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001354 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001355 *
1356 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001357 * Caller: library/pkwrite.c
1358 * library/x509write_crt.c
1359 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001360 *
1361 * Requires: POLARSSL_BASE64_C
1362 *
1363 * This modules adds support for encoding / writing PEM files.
1364 */
1365#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001366
1367/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001368 * \def POLARSSL_PK_C
1369 *
1370 * Enable the generic public (asymetric) key layer.
1371 *
1372 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001373 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001374 * library/ssl_cli.c
1375 * library/ssl_srv.c
1376 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001377 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1378 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001379 * Uncomment to enable generic public key wrappers.
1380 */
1381#define POLARSSL_PK_C
1382
1383/**
Paul Bakker4606c732013-09-15 17:04:23 +02001384 * \def POLARSSL_PK_PARSE_C
1385 *
1386 * Enable the generic public (asymetric) key parser.
1387 *
1388 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001389 * Caller: library/x509_crt.c
1390 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001391 *
1392 * Requires: POLARSSL_PK_C
1393 *
1394 * Uncomment to enable generic public key parse functions.
1395 */
1396#define POLARSSL_PK_PARSE_C
1397
1398/**
1399 * \def POLARSSL_PK_WRITE_C
1400 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001401 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001402 *
1403 * Module: library/pkwrite.c
1404 * Caller: library/x509write.c
1405 *
1406 * Requires: POLARSSL_PK_C
1407 *
1408 * Uncomment to enable generic public key write functions.
1409 */
1410#define POLARSSL_PK_WRITE_C
1411
1412/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001413 * \def POLARSSL_PKCS5_C
1414 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001415 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001416 *
1417 * Module: library/pkcs5.c
1418 *
1419 * Requires: POLARSSL_MD_C
1420 *
1421 * This module adds support for the PKCS#5 functions.
1422 */
1423#define POLARSSL_PKCS5_C
1424
1425/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001426 * \def POLARSSL_PKCS11_C
1427 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001428 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001429 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001430 * Module: library/pkcs11.c
1431 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001432 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001433 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001434 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001435 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001436 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001437 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001438//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001439
1440/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001441 * \def POLARSSL_PKCS12_C
1442 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001443 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001444 * Adds algorithms for parsing PKCS#8 encrypted private keys
1445 *
1446 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001447 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001448 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001449 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1450 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001451 *
1452 * This module enables PKCS#12 functions.
1453 */
1454#define POLARSSL_PKCS12_C
1455
1456/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001457 * \def POLARSSL_RSA_C
1458 *
1459 * Enable the RSA public-key cryptosystem.
1460 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001461 * Module: library/rsa.c
1462 * Caller: library/ssl_cli.c
1463 * library/ssl_srv.c
1464 * library/ssl_tls.c
1465 * library/x509.c
1466 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001467 * This module is used by the following key exchanges:
1468 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001469 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001470 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001471 */
Paul Bakker40e46942009-01-03 21:51:57 +00001472#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001473
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001474/**
1475 * \def POLARSSL_SHA1_C
1476 *
1477 * Enable the SHA1 cryptographic hash algorithm.
1478 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001479 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001480 * Caller: library/md.c
1481 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001482 * library/ssl_srv.c
1483 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001484 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001485 *
1486 * This module is required for SSL/TLS and SHA1-signed certificates.
1487 */
Paul Bakker40e46942009-01-03 21:51:57 +00001488#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001489
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001490/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001491 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001492 *
1493 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001494 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001495 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001496 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001497 * Caller: library/entropy.c
1498 * library/md.c
1499 * library/ssl_cli.c
1500 * library/ssl_srv.c
1501 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001502 *
1503 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001504 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001505 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001506#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001507
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001508/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001509 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001510 *
1511 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001512 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001513 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001514 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001515 * Caller: library/entropy.c
1516 * library/md.c
1517 * library/ssl_cli.c
1518 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001519 *
1520 * This module adds support for SHA-384 and SHA-512.
1521 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001522#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001523
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001524/**
Paul Bakker0a597072012-09-25 21:55:46 +00001525 * \def POLARSSL_SSL_CACHE_C
1526 *
1527 * Enable simple SSL cache implementation.
1528 *
1529 * Module: library/ssl_cache.c
1530 * Caller:
1531 *
1532 * Requires: POLARSSL_SSL_CACHE_C
1533 */
1534#define POLARSSL_SSL_CACHE_C
1535
1536/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001537 * \def POLARSSL_SSL_CLI_C
1538 *
1539 * Enable the SSL/TLS client code.
1540 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001541 * Module: library/ssl_cli.c
1542 * Caller:
1543 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001544 * Requires: POLARSSL_SSL_TLS_C
1545 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001546 * This module is required for SSL/TLS client support.
1547 */
Paul Bakker40e46942009-01-03 21:51:57 +00001548#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001549
Paul Bakker9a736322012-11-14 12:39:52 +00001550/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001551 * \def POLARSSL_SSL_SRV_C
1552 *
1553 * Enable the SSL/TLS server code.
1554 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001555 * Module: library/ssl_srv.c
1556 * Caller:
1557 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001558 * Requires: POLARSSL_SSL_TLS_C
1559 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001560 * This module is required for SSL/TLS server support.
1561 */
Paul Bakker40e46942009-01-03 21:51:57 +00001562#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001563
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001564/**
1565 * \def POLARSSL_SSL_TLS_C
1566 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001567 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001568 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001569 * Module: library/ssl_tls.c
1570 * Caller: library/ssl_cli.c
1571 * library/ssl_srv.c
1572 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001573 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001574 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001575 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001576 * This module is required for SSL/TLS.
1577 */
Paul Bakker40e46942009-01-03 21:51:57 +00001578#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001579
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001580/**
Paul Bakker2466d932013-09-28 14:40:38 +02001581 * \def POLARSSL_THREADING_C
1582 *
1583 * Enable the threading abstraction layer.
1584 * By default PolarSSL assumes it is used in a non-threaded environment or that
1585 * contexts are not shared between threads. If you do intend to use contexts
1586 * between threads, you will need to enable this layer to prevent race
1587 * conditions.
1588 *
1589 * Module: library/threading.c
1590 *
1591 * This allows different threading implementations (self-implemented or
1592 * provided).
1593 *
1594 * You will have to enable either POLARSSL_THREADING_ALT,
1595 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1596 *
1597 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001598 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001599//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001600
1601/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001602 * \def POLARSSL_TIMING_C
1603 *
1604 * Enable the portable timing interface.
1605 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001606 * Module: library/timing.c
1607 * Caller: library/havege.c
1608 *
1609 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001610 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001611#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001612
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001613/**
1614 * \def POLARSSL_VERSION_C
1615 *
1616 * Enable run-time version information.
1617 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001618 * Module: library/version.c
1619 *
1620 * This module provides run-time version information.
1621 */
1622#define POLARSSL_VERSION_C
1623
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001624/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001625 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001626 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001627 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001628 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001629 * Module: library/x509.c
1630 * Caller: library/x509_crl.c
1631 * library/x509_crt.c
1632 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001633 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001634 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001635 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001636 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001637 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001638 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001639#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001640
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001641/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001642 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001643 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001644 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001645 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001646 * Module: library/x509_crt.c
1647 * Caller: library/ssl_cli.c
1648 * library/ssl_srv.c
1649 * library/ssl_tls.c
1650 *
1651 * Requires: POLARSSL_X509_USE_C
1652 *
1653 * This module is required for X.509 certificate parsing.
1654 */
1655#define POLARSSL_X509_CRT_PARSE_C
1656
1657/**
1658 * \def POLARSSL_X509_CRL_PARSE_C
1659 *
1660 * Enable X.509 CRL parsing.
1661 *
1662 * Module: library/x509_crl.c
1663 * Caller: library/x509_crt.c
1664 *
1665 * Requires: POLARSSL_X509_USE_C
1666 *
1667 * This module is required for X.509 CRL parsing.
1668 */
1669#define POLARSSL_X509_CRL_PARSE_C
1670
1671/**
1672 * \def POLARSSL_X509_CSR_PARSE_C
1673 *
1674 * Enable X.509 Certificate Signing Request (CSR) parsing.
1675 *
1676 * Module: library/x509_csr.c
1677 * Caller: library/x509_crt_write.c
1678 *
1679 * Requires: POLARSSL_X509_USE_C
1680 *
1681 * This module is used for reading X.509 certificate request.
1682 */
1683#define POLARSSL_X509_CSR_PARSE_C
1684
1685/**
1686 * \def POLARSSL_X509_CREATE_C
1687 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001688 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001689 *
1690 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001691 *
Paul Bakker4606c732013-09-15 17:04:23 +02001692 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001693 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001694 * This module is the basis for creating X.509 certificates and CSRs.
1695 */
1696#define POLARSSL_X509_CREATE_C
1697
1698/**
1699 * \def POLARSSL_X509_CRT_WRITE_C
1700 *
1701 * Enable creating X.509 certificates.
1702 *
1703 * Module: library/x509_crt_write.c
1704 *
1705 * Requires: POLARSSL_CREATE_C
1706 *
1707 * This module is required for X.509 certificate creation.
1708 */
1709#define POLARSSL_X509_CRT_WRITE_C
1710
1711/**
1712 * \def POLARSSL_X509_CSR_WRITE_C
1713 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001714 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001715 *
1716 * Module: library/x509_csr_write.c
1717 *
1718 * Requires: POLARSSL_CREATE_C
1719 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001720 * This module is required for X.509 certificate request writing.
1721 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001722#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001723
1724/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001725 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001726 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001727 * Enable the XTEA block cipher.
1728 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001729 * Module: library/xtea.c
1730 * Caller:
1731 */
1732#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001733
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001734/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001735
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001736/**
1737 * \name SECTION: Module configuration options
1738 *
1739 * This section allows for the setting of module specific sizes and
1740 * configuration options. The default values are already present in the
1741 * relevant header files and should suffice for the regular use cases.
1742 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1743 * only if you have a good reason and know the consequences.
1744 *
1745 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1746 * header file take precedence.
1747 *
1748 * Please check the respective header file for documentation on these
1749 * parameters (to prevent duplicate documentation).
1750 *
1751 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1752 * \{
1753 */
1754//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1755
1756#if defined(POLARSSL_CONFIG_OPTIONS)
1757
1758// MPI / BIGNUM options
1759//
1760#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1761#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1762
1763// CTR_DRBG options
1764//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001765#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 +02001766#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1767#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1768#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1769#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1770
1771// Entropy options
1772//
1773#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1774#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1775
Paul Bakker6e339b52013-07-03 13:37:05 +02001776// Memory options
1777#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1778#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1779#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1780
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001781// SSL Cache options
1782//
1783#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1784#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1785
1786// SSL options
1787//
1788#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001789#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001790
1791#endif /* POLARSSL_CONFIG_OPTIONS */
1792
1793/* \} name */
1794
Paul Bakker7ad00f92013-04-18 23:05:25 +02001795/*
1796 * Sanity checks on defines and dependencies
1797 */
1798#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1799#error "POLARSSL_DHM_C defined, but not all prerequisites"
1800#endif
1801
1802#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1803#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1804#endif
1805
1806#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1807#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1808#endif
1809
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001810#if defined(POLARSSL_ECDSA_C) && \
1811 ( !defined(POLARSSL_ECP_C) || \
1812 !defined(POLARSSL_ASN1_PARSE_C) || \
1813 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001814#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1815#endif
1816
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001817#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C) || ( \
1818 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1819 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1820 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1821 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1822 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1823 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1824 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1825 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001826#error "POLARSSL_ECP_C defined, but not all prerequisites"
1827#endif
1828
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001829#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1830 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001831#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1832#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001833#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1834 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1835#error "CTR_DRBG_ENTROPY_LEN value too high"
1836#endif
1837#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1838 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1839#error "CTR_DRBG_ENTROPY_LEN value too high"
1840#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001841
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001842#if defined(POLARSSL_GCM_C) && ( \
1843 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001844#error "POLARSSL_GCM_C defined, but not all prerequisites"
1845#endif
1846
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001847#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1848#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1849#endif
1850
Paul Bakkere07f41d2013-04-19 09:08:57 +02001851#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1852#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1853#endif
1854
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001855#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1856 !defined(POLARSSL_ECDH_C)
1857#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1858#endif
1859
Paul Bakkere07f41d2013-04-19 09:08:57 +02001860#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1861 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001862 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001863#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1864#endif
1865
1866#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1867 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001868 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001869#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1870#endif
1871
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001872#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1873 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001874 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001875#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1876#endif
1877
Paul Bakkere07f41d2013-04-19 09:08:57 +02001878#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001879 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001880 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001881#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1882#endif
1883
1884#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001885 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001886 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001887#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1888#endif
1889
Paul Bakker6e339b52013-07-03 13:37:05 +02001890#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1891#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1892#endif
1893
Paul Bakker7ad00f92013-04-18 23:05:25 +02001894#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1895#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1896#endif
1897
Paul Bakkercff68422013-09-15 20:43:33 +02001898#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1899#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1900#endif
1901
1902#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1903#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001904#endif
1905
Paul Bakker4606c732013-09-15 17:04:23 +02001906#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1907#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1908#endif
1909
1910#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1911#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1912#endif
1913
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001914#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001915#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1916#endif
1917
1918#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1919 !defined(POLARSSL_OID_C) )
1920#error "POLARSSL_RSA_C defined, but not all prerequisites"
1921#endif
1922
1923#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1924#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1925#endif
1926
Paul Bakker577e0062013-08-28 11:57:20 +02001927#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001928 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001929#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1930#endif
1931
1932#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1933#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1934#endif
1935
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001936#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1937 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1938 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1939#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1940#endif
1941
1942#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1943 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1944#error "Illegal protocol selection"
1945#endif
1946
1947#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1948 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1949#error "Illegal protocol selection"
1950#endif
1951
1952#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1953 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1954 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1955#error "Illegal protocol selection"
1956#endif
1957
Paul Bakker59da0a42013-08-19 13:27:17 +02001958#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001959 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1960 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001961#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1962#endif
1963
Paul Bakker2466d932013-09-28 14:40:38 +02001964#if defined(POLARSSL_THREADING_DUMMY)
1965#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1966#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1967#endif
1968#define POLARSSL_THREADING_IMPL
1969#endif
1970
1971#if defined(POLARSSL_THREADING_PTHREAD)
1972#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1973#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
1974#endif
1975#define POLARSSL_THREADING_IMPL
1976#endif
1977
1978#if defined(POLARSSL_THREADING_ALT)
1979#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1980#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
1981#endif
1982#define POLARSSL_THREADING_IMPL
1983#endif
1984
1985#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
1986#error "POLARSSL_THREADING_C defined, single threading implementation required"
1987#endif
1988#undef POLARSSL_THREADING_IMPL
1989
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001990#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001991 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001992 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001993#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001994#endif
1995
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001996#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1997 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1998 !defined(POLARSSL_PK_WRITE_C) )
1999#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2000#endif
2001
2002#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2003#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2004#endif
2005
2006#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2007#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2008#endif
2009
2010#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2011#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2012#endif
2013
2014#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2015#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2016#endif
2017
2018#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2019#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002020#endif
2021
Paul Bakker5121ce52009-01-03 21:22:43 +00002022#endif /* config.h */