blob: bdd40af159b66fe127fc7f7be2c67c1e59448b12 [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é-Gonnard09fff7e2013-09-20 13:45:36 +0200104/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000105
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000106/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000107 * \name SECTION: PolarSSL feature support
108 *
109 * This section sets support for features that are or are not needed
110 * within the modules that are enabled.
111 * \{
112 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000113
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000114/**
Paul Bakker90995b52013-06-24 19:20:35 +0200115 * \def POLARSSL_XXX_ALT
116 *
117 * Uncomment a macro to let PolarSSL use your alternate core implementation of
118 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
119 * implementations). Keep in mind that the function prototypes should remain
120 * the same.
121 *
122 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
123 * provide the "struct aes_context" definition and omit the base function
124 * declarations and implementations. "aes_alt.h" will be included from
125 * "aes.h" to include the new function definitions.
126 *
127 * Uncomment a macro to enable alternate implementation for core algorithm
128 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200129 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200130//#define POLARSSL_AES_ALT
131//#define POLARSSL_ARC4_ALT
132//#define POLARSSL_BLOWFISH_ALT
133//#define POLARSSL_CAMELLIA_ALT
134//#define POLARSSL_DES_ALT
135//#define POLARSSL_XTEA_ALT
136//#define POLARSSL_MD2_ALT
137//#define POLARSSL_MD4_ALT
138//#define POLARSSL_MD5_ALT
139//#define POLARSSL_SHA1_ALT
140//#define POLARSSL_SHA256_ALT
141//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200142
143/**
Paul Bakker15566e42011-04-24 21:19:15 +0000144 * \def POLARSSL_AES_ROM_TABLES
145 *
146 * Store the AES tables in ROM.
147 *
148 * Uncomment this macro to store the AES tables in ROM.
149 *
Paul Bakker15566e42011-04-24 21:19:15 +0000150 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200151//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000152
153/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200154 * \def POLARSSL_CIPHER_MODE_CBC
155 *
156 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
157 */
158#define POLARSSL_CIPHER_MODE_CBC
159
160/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000161 * \def POLARSSL_CIPHER_MODE_CFB
162 *
163 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
164 */
165#define POLARSSL_CIPHER_MODE_CFB
166
167/**
168 * \def POLARSSL_CIPHER_MODE_CTR
169 *
170 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
171 */
172#define POLARSSL_CIPHER_MODE_CTR
173
174/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000175 * \def POLARSSL_CIPHER_NULL_CIPHER
176 *
177 * Enable NULL cipher.
178 * Warning: Only do so when you know what you are doing. This allows for
179 * encryption or channels without any security!
180 *
181 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
182 * the following ciphersuites:
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200183 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100184 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200185 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200186 * TLS_ECDHE_PSK_WITH_NULL_SHA256
187 * TLS_ECDHE_PSK_WITH_NULL_SHA
188 * TLS_DHE_PSK_WITH_NULL_SHA384
189 * TLS_DHE_PSK_WITH_NULL_SHA256
190 * TLS_DHE_PSK_WITH_NULL_SHA
191 * TLS_RSA_WITH_NULL_SHA256
192 * TLS_RSA_WITH_NULL_SHA
193 * TLS_RSA_WITH_NULL_MD5
194 * TLS_RSA_PSK_WITH_NULL_SHA384
195 * TLS_RSA_PSK_WITH_NULL_SHA256
196 * TLS_RSA_PSK_WITH_NULL_SHA
197 * TLS_PSK_WITH_NULL_SHA384
198 * TLS_PSK_WITH_NULL_SHA256
199 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000200 *
201 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200202#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000203 */
204
205/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200206 * \def POLARSSL_CIPHER_PADDING_XXX
207 *
208 * Uncomment or comment macros to add support for specific padding modes
209 * in the cipher layer with cipher modes that support padding (e.g. CBC)
210 *
211 * If you disable all padding modes, only full blocks can be used with CBC.
212 *
213 * Enable padding modes in the cipher layer.
214 */
215#define POLARSSL_CIPHER_PADDING_PKCS7
216#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
217#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
218#define POLARSSL_CIPHER_PADDING_ZEROS
219
220/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000221 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
222 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200223 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000224 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000225 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000226 *
227 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000228 * TLS_RSA_WITH_DES_CBC_SHA
229 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000230 *
231 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200232#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000233 */
234
235/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200236 * \def POLARSSL_ECP_XXXX_ENABLED
237 *
238 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200239 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200240 *
241 * Comment macros to disable the curve and functions for it
242 */
243#define POLARSSL_ECP_DP_SECP192R1_ENABLED
244#define POLARSSL_ECP_DP_SECP224R1_ENABLED
245#define POLARSSL_ECP_DP_SECP256R1_ENABLED
246#define POLARSSL_ECP_DP_SECP384R1_ENABLED
247#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200248#define POLARSSL_ECP_DP_BP256R1_ENABLED
249#define POLARSSL_ECP_DP_BP384R1_ENABLED
250#define POLARSSL_ECP_DP_BP512R1_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200251
252/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200253 * \def POLARSSL_ECP_NIST_OPTIM
254 *
255 * Enable specific 'modulo p' routines for each NIST prime.
256 * Depending on the prime and architecture, makes operations 4 to 8 times
257 * faster on the corresponding curve.
258 *
259 * Comment this macro to disable NIST curves optimisation.
260 */
261#define POLARSSL_ECP_NIST_OPTIM
262
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/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100635 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
636 *
637 * Pick the ciphersuite according to the client's preferences rather than ours
638 * in the SSL Server module (POLARSSL_SSL_SRV_C).
639 *
640 * Uncomment this macro to respect client's ciphersuite order
641 */
642//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
643
644/**
Paul Bakker05decb22013-08-15 13:33:48 +0200645 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
646 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200647 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200648 *
649 * Comment this macro to disable support for the max_fragment_length extension
650 */
651#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
652
653/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200654 * \def POLARSSL_SSL_PROTO_SSL3
655 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200656 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200657 *
658 * Requires: POLARSSL_MD5_C
659 * POLARSSL_SHA1_C
660 *
661 * Comment this macro to disable support for SSL 3.0
662 */
663#define POLARSSL_SSL_PROTO_SSL3
664
665/**
666 * \def POLARSSL_SSL_PROTO_TLS1
667 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200668 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200669 *
670 * Requires: POLARSSL_MD5_C
671 * POLARSSL_SHA1_C
672 *
673 * Comment this macro to disable support for TLS 1.0
674 */
675#define POLARSSL_SSL_PROTO_TLS1
676
677/**
678 * \def POLARSSL_SSL_PROTO_TLS1_1
679 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200680 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200681 *
682 * Requires: POLARSSL_MD5_C
683 * POLARSSL_SHA1_C
684 *
685 * Comment this macro to disable support for TLS 1.1
686 */
687#define POLARSSL_SSL_PROTO_TLS1_1
688
689/**
690 * \def POLARSSL_SSL_PROTO_TLS1_2
691 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200692 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200693 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100694 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200695 * (Depends on ciphersuites)
696 *
697 * Comment this macro to disable support for TLS 1.2
698 */
699#define POLARSSL_SSL_PROTO_TLS1_2
700
701/**
Paul Bakkera503a632013-08-14 13:48:06 +0200702 * \def POLARSSL_SSL_SESSION_TICKETS
703 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200704 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200705 *
706 * Requires: POLARSSL_AES_C
707 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200708 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200709 *
710 * Comment this macro to disable support for SSL session tickets
711 */
712#define POLARSSL_SSL_SESSION_TICKETS
713
714/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200715 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
716 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200717 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200718 *
719 * Comment this macro to disable support for server name indication in SSL
720 */
721#define POLARSSL_SSL_SERVER_NAME_INDICATION
722
723/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200724 * \def POLARSSL_SSL_TRUNCATED_HMAC
725 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200726 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200727 *
728 * Comment this macro to disable support for truncated HMAC in SSL
729 */
730#define POLARSSL_SSL_TRUNCATED_HMAC
731
732/**
Paul Bakker2466d932013-09-28 14:40:38 +0200733 * \def POLARSSL_THREADING_ALT
734 *
735 * Provide your own alternate threading implementation.
736 *
737 * Requires: POLARSSL_THREADING_C
738 *
739 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200740 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200741//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200742
743/**
744 * \def POLARSSL_THREADING_DUMMY
745 *
746 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200747 * Warning: If you use this, all claims of thread-safety in the documentation
748 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200749 *
750 * Requires: POLARSSL_THREADING_C
751 *
752 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200753 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200754//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200755
756/**
757 * \def POLARSSL_THREADING_PTHREAD
758 *
759 * Enable the pthread wrapper layer for the threading layer.
760 *
761 * Requires: POLARSSL_THREADING_C
762 *
763 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200764 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200765//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200766
767/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200768 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
769 *
770 * If set, the X509 parser will not break-off when parsing an X509 certificate
771 * and encountering an extension in a v1 or v2 certificate.
772 *
773 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200774 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200775//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200776
777/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000778 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
779 *
780 * If set, the X509 parser will not break-off when parsing an X509 certificate
781 * and encountering an unknown critical extension.
782 *
783 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000784 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200785//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000786
787/**
788 * \def POLARSSL_ZLIB_SUPPORT
789 *
790 * If set, the SSL/TLS module uses ZLIB to support compression and
791 * decompression of packet data.
792 *
793 * Used in: library/ssl_tls.c
794 * library/ssl_cli.c
795 * library/ssl_srv.c
796 *
797 * This feature requires zlib library and headers to be present.
798 *
799 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000800 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200801//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200802/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000803
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000804/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000805 * \name SECTION: PolarSSL modules
806 *
807 * This section enables or disables entire modules in PolarSSL
808 * \{
809 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000810
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000811/**
812 * \def POLARSSL_AES_C
813 *
814 * Enable the AES block cipher.
815 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000816 * Module: library/aes.c
817 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000818 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000819 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000820 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000821 * This module enables the following ciphersuites (if other requisites are
822 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200823 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
824 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
825 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
826 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
827 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000828 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200829 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100830 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200831 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
832 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
833 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
834 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
835 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
836 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
837 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
838 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
839 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
840 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
841 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
842 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
843 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
844 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
845 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
846 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
847 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
848 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
849 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
850 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
851 * TLS_RSA_WITH_AES_256_GCM_SHA384
852 * TLS_RSA_WITH_AES_256_CBC_SHA256
853 * TLS_RSA_WITH_AES_256_CBC_SHA
854 * TLS_RSA_WITH_AES_128_GCM_SHA256
855 * TLS_RSA_WITH_AES_128_CBC_SHA256
856 * TLS_RSA_WITH_AES_128_CBC_SHA
857 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
858 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
859 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
860 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
861 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
862 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
863 * TLS_PSK_WITH_AES_256_GCM_SHA384
864 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200865 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200866 * TLS_PSK_WITH_AES_128_GCM_SHA256
867 * TLS_PSK_WITH_AES_128_CBC_SHA256
868 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100869 *
Paul Bakkercff68422013-09-15 20:43:33 +0200870 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000871 */
Paul Bakker40e46942009-01-03 21:51:57 +0000872#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000873
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000874/**
875 * \def POLARSSL_ARC4_C
876 *
877 * Enable the ARCFOUR stream cipher.
878 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000879 * Module: library/arc4.c
880 * Caller: library/ssl_tls.c
881 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100882 * This module enables the following ciphersuites (if other requisites are
883 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200884 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100885 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200886 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
887 * TLS_DHE_PSK_WITH_RC4_128_SHA
888 * TLS_RSA_WITH_RC4_128_SHA
889 * TLS_RSA_WITH_RC4_128_MD5
890 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200891 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000892 */
Paul Bakker40e46942009-01-03 21:51:57 +0000893#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000894
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000895/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000896 * \def POLARSSL_ASN1_PARSE_C
897 *
898 * Enable the generic ASN1 parser.
899 *
900 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200901 * Caller: library/x509.c
902 * library/dhm.c
903 * library/pkcs12.c
904 * library/pkcs5.c
905 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000906 */
907#define POLARSSL_ASN1_PARSE_C
908
909/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000910 * \def POLARSSL_ASN1_WRITE_C
911 *
912 * Enable the generic ASN1 writer.
913 *
914 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200915 * Caller: library/ecdsa.c
916 * library/pkwrite.c
917 * library/x509_create.c
918 * library/x509write_crt.c
919 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000920 */
921#define POLARSSL_ASN1_WRITE_C
922
923/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000924 * \def POLARSSL_BASE64_C
925 *
926 * Enable the Base64 module.
927 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000928 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000929 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000930 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000931 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000932 */
Paul Bakker40e46942009-01-03 21:51:57 +0000933#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000934
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000935/**
936 * \def POLARSSL_BIGNUM_C
937 *
Paul Bakker9a736322012-11-14 12:39:52 +0000938 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000939 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000940 * Module: library/bignum.c
941 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200942 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000943 * library/rsa.c
944 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000945 *
946 * This module is required for RSA and DHM support.
947 */
Paul Bakker40e46942009-01-03 21:51:57 +0000948#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000949
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000950/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000951 * \def POLARSSL_BLOWFISH_C
952 *
953 * Enable the Blowfish block cipher.
954 *
955 * Module: library/blowfish.c
956 */
957#define POLARSSL_BLOWFISH_C
958
959/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000960 * \def POLARSSL_CAMELLIA_C
961 *
962 * Enable the Camellia block cipher.
963 *
Paul Bakker38119b12009-01-10 23:31:23 +0000964 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000965 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000966 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000967 * This module enables the following ciphersuites (if other requisites are
968 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200969 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
970 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
971 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
972 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
973 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000974 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200975 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
976 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
977 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
978 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
979 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
980 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
981 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
982 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
983 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
984 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
985 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
986 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
987 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
988 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
989 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
990 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
991 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
992 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
993 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
994 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
995 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
996 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
997 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
998 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
999 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1000 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1001 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1002 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001003 */
1004#define POLARSSL_CAMELLIA_C
1005
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001006/**
1007 * \def POLARSSL_CERTS_C
1008 *
1009 * Enable the test certificates.
1010 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001011 * Module: library/certs.c
1012 * Caller:
1013 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001014 * Requires: POLARSSL_PEM_PARSE_C
1015 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001016 * This module is used for testing (ssl_client/server).
1017 */
Paul Bakker40e46942009-01-03 21:51:57 +00001018#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001019
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001020/**
1021 * \def POLARSSL_CIPHER_C
1022 *
1023 * Enable the generic cipher layer.
1024 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001025 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001026 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001027 *
1028 * Uncomment to enable generic cipher wrappers.
1029 */
1030#define POLARSSL_CIPHER_C
1031
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001032/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001033 * \def POLARSSL_CTR_DRBG_C
1034 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001035 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001036 *
1037 * Module: library/ctr_drbg.c
1038 * Caller:
1039 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001040 * Requires: POLARSSL_AES_C
1041 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001042 * This module provides the CTR_DRBG AES-256 random number generator.
1043 */
1044#define POLARSSL_CTR_DRBG_C
1045
1046/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001047 * \def POLARSSL_DEBUG_C
1048 *
1049 * Enable the debug functions.
1050 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001051 * Module: library/debug.c
1052 * Caller: library/ssl_cli.c
1053 * library/ssl_srv.c
1054 * library/ssl_tls.c
1055 *
1056 * This module provides debugging functions.
1057 */
Paul Bakker40e46942009-01-03 21:51:57 +00001058#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001059
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001060/**
1061 * \def POLARSSL_DES_C
1062 *
1063 * Enable the DES block cipher.
1064 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001065 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001066 * Caller: library/pem.c
1067 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001068 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001069 * This module enables the following ciphersuites (if other requisites are
1070 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001071 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001072 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001073 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1074 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1075 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1076 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1077 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001078 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001079 *
Paul Bakkercff68422013-09-15 20:43:33 +02001080 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001081 */
Paul Bakker40e46942009-01-03 21:51:57 +00001082#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001083
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001084/**
1085 * \def POLARSSL_DHM_C
1086 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001087 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001088 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001089 * Module: library/dhm.c
1090 * Caller: library/ssl_cli.c
1091 * library/ssl_srv.c
1092 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001093 * This module is used by the following key exchanges:
1094 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001095 */
Paul Bakker40e46942009-01-03 21:51:57 +00001096#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001097
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001098/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001099 * \def POLARSSL_ECDH_C
1100 *
1101 * Enable the elliptic curve Diffie-Hellman library.
1102 *
1103 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001104 * 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 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001109 *
1110 * Requires: POLARSSL_ECP_C
1111 */
1112#define POLARSSL_ECDH_C
1113
1114/**
1115 * \def POLARSSL_ECDSA_C
1116 *
1117 * Enable the elliptic curve DSA library.
1118 *
1119 * Module: library/ecdsa.c
1120 * Caller:
1121 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001122 * This module is used by the following key exchanges:
1123 * ECDHE-ECDSA
1124 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001125 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001126 */
1127#define POLARSSL_ECDSA_C
1128
1129/**
1130 * \def POLARSSL_ECP_C
1131 *
1132 * Enable the elliptic curve over GF(p) library.
1133 *
1134 * Module: library/ecp.c
1135 * Caller: library/ecdh.c
1136 * library/ecdsa.c
1137 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001138 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001139 */
1140#define POLARSSL_ECP_C
1141
1142/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001143 * \def POLARSSL_ENTROPY_C
1144 *
1145 * Enable the platform-specific entropy code.
1146 *
1147 * Module: library/entropy.c
1148 * Caller:
1149 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001150 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001151 *
1152 * This module provides a generic entropy pool
1153 */
1154#define POLARSSL_ENTROPY_C
1155
1156/**
Paul Bakker9d781402011-05-09 16:17:09 +00001157 * \def POLARSSL_ERROR_C
1158 *
1159 * Enable error code to error string conversion.
1160 *
1161 * Module: library/error.c
1162 * Caller:
1163 *
1164 * This module enables err_strerror().
1165 */
1166#define POLARSSL_ERROR_C
1167
1168/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001169 * \def POLARSSL_GCM_C
1170 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001171 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001172 *
1173 * Module: library/gcm.c
1174 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001175 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001176 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001177 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1178 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001179 */
1180#define POLARSSL_GCM_C
1181
1182/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001183 * \def POLARSSL_HAVEGE_C
1184 *
1185 * Enable the HAVEGE random generator.
1186 *
Paul Bakker2a844242013-06-24 13:01:53 +02001187 * Warning: the HAVEGE random generator is not suitable for virtualized
1188 * environments
1189 *
1190 * Warning: the HAVEGE random generator is dependent on timing and specific
1191 * processor traits. It is therefore not advised to use HAVEGE as
1192 * your applications primary random generator or primary entropy pool
1193 * input. As a secondary input to your entropy pool, it IS able add
1194 * the (limited) extra entropy it provides.
1195 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001196 * Module: library/havege.c
1197 * Caller:
1198 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001199 * Requires: POLARSSL_TIMING_C
1200 *
Paul Bakker2a844242013-06-24 13:01:53 +02001201 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001202 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001203//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001204
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001205/**
1206 * \def POLARSSL_MD_C
1207 *
1208 * Enable the generic message digest layer.
1209 *
Paul Bakker17373852011-01-06 14:20:01 +00001210 * Module: library/md.c
1211 * Caller:
1212 *
1213 * Uncomment to enable generic message digest wrappers.
1214 */
1215#define POLARSSL_MD_C
1216
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001217/**
1218 * \def POLARSSL_MD2_C
1219 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001220 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001221 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001222 * Module: library/md2.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) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001226 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001227//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001228
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001229/**
1230 * \def POLARSSL_MD4_C
1231 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001232 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001233 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001234 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001235 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001236 *
1237 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001238 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001239//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001240
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001241/**
1242 * \def POLARSSL_MD5_C
1243 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001244 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001245 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001246 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001247 * Caller: library/md.c
1248 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001249 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001250 *
1251 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001252 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001253 */
Paul Bakker40e46942009-01-03 21:51:57 +00001254#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001255
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001256/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001257 * \def POLARSSL_MEMORY_C
1258 *
1259 * Enable the memory allocation layer.
1260 * By default PolarSSL uses the system-provided malloc() and free().
1261 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1262 * are defined and unmodified)
1263 *
1264 * This allows different allocators (self-implemented or provided)
1265 *
1266 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001267 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001268//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001269
1270/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001271 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1272 *
1273 * Enable the buffer allocator implementation that makes use of a (stack)
1274 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1275 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001276 *
1277 * Module: library/memory_buffer_alloc.c
1278 *
1279 * Requires: POLARSSL_MEMORY_C
1280 *
1281 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001282 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001283//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001284
1285/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001286 * \def POLARSSL_NET_C
1287 *
1288 * Enable the TCP/IP networking routines.
1289 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001290 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001291 *
1292 * This module provides TCP/IP networking routines.
1293 */
Paul Bakker40e46942009-01-03 21:51:57 +00001294#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001295
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001296/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001297 * \def POLARSSL_OID_C
1298 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001299 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001300 *
1301 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001302 * Caller: library/asn1write.c
1303 * library/pkcs5.c
1304 * library/pkparse.c
1305 * library/pkwrite.c
1306 * library/rsa.c
1307 * library/x509.c
1308 * library/x509_create.c
1309 * library/x509_crl.c
1310 * library/x509_crt.c
1311 * library/x509_csr.c
1312 * library/x509write_crt.c
1313 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001314 *
1315 * This modules translates between OIDs and internal values.
1316 */
1317#define POLARSSL_OID_C
1318
1319/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001320 * \def POLARSSL_PADLOCK_C
1321 *
1322 * Enable VIA Padlock support on x86.
1323 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001324 * Module: library/padlock.c
1325 * Caller: library/aes.c
1326 *
1327 * This modules adds support for the VIA PadLock on x86.
1328 */
Paul Bakker40e46942009-01-03 21:51:57 +00001329#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001330
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001331/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001332 * \def POLARSSL_PBKDF2_C
1333 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001334 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001335 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001336 *
1337 * Module: library/pbkdf2.c
1338 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001339 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001340 *
1341 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001342 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001343#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001344
1345/**
Paul Bakkercff68422013-09-15 20:43:33 +02001346 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001347 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001348 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001349 *
1350 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001351 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001352 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001353 * library/x509_crl.c
1354 * library/x509_crt.c
1355 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001356 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001357 * Requires: POLARSSL_BASE64_C
1358 *
Paul Bakkercff68422013-09-15 20:43:33 +02001359 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001360 */
Paul Bakkercff68422013-09-15 20:43:33 +02001361#define POLARSSL_PEM_PARSE_C
1362
1363/**
1364 * \def POLARSSL_PEM_WRITE_C
1365 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001366 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001367 *
1368 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001369 * Caller: library/pkwrite.c
1370 * library/x509write_crt.c
1371 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001372 *
1373 * Requires: POLARSSL_BASE64_C
1374 *
1375 * This modules adds support for encoding / writing PEM files.
1376 */
1377#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001378
1379/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001380 * \def POLARSSL_PK_C
1381 *
1382 * Enable the generic public (asymetric) key layer.
1383 *
1384 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001385 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001386 * library/ssl_cli.c
1387 * library/ssl_srv.c
1388 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001389 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1390 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001391 * Uncomment to enable generic public key wrappers.
1392 */
1393#define POLARSSL_PK_C
1394
1395/**
Paul Bakker4606c732013-09-15 17:04:23 +02001396 * \def POLARSSL_PK_PARSE_C
1397 *
1398 * Enable the generic public (asymetric) key parser.
1399 *
1400 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001401 * Caller: library/x509_crt.c
1402 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001403 *
1404 * Requires: POLARSSL_PK_C
1405 *
1406 * Uncomment to enable generic public key parse functions.
1407 */
1408#define POLARSSL_PK_PARSE_C
1409
1410/**
1411 * \def POLARSSL_PK_WRITE_C
1412 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001413 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001414 *
1415 * Module: library/pkwrite.c
1416 * Caller: library/x509write.c
1417 *
1418 * Requires: POLARSSL_PK_C
1419 *
1420 * Uncomment to enable generic public key write functions.
1421 */
1422#define POLARSSL_PK_WRITE_C
1423
1424/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001425 * \def POLARSSL_PKCS5_C
1426 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001427 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001428 *
1429 * Module: library/pkcs5.c
1430 *
1431 * Requires: POLARSSL_MD_C
1432 *
1433 * This module adds support for the PKCS#5 functions.
1434 */
1435#define POLARSSL_PKCS5_C
1436
1437/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001438 * \def POLARSSL_PKCS11_C
1439 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001440 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001441 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001442 * Module: library/pkcs11.c
1443 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001444 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001445 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001446 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001447 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001448 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001449 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001450//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001451
1452/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001453 * \def POLARSSL_PKCS12_C
1454 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001455 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001456 * Adds algorithms for parsing PKCS#8 encrypted private keys
1457 *
1458 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001459 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001460 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001461 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1462 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001463 *
1464 * This module enables PKCS#12 functions.
1465 */
1466#define POLARSSL_PKCS12_C
1467
1468/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001469 * \def POLARSSL_RSA_C
1470 *
1471 * Enable the RSA public-key cryptosystem.
1472 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001473 * Module: library/rsa.c
1474 * Caller: library/ssl_cli.c
1475 * library/ssl_srv.c
1476 * library/ssl_tls.c
1477 * library/x509.c
1478 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001479 * This module is used by the following key exchanges:
1480 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001481 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001482 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001483 */
Paul Bakker40e46942009-01-03 21:51:57 +00001484#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001485
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001486/**
1487 * \def POLARSSL_SHA1_C
1488 *
1489 * Enable the SHA1 cryptographic hash algorithm.
1490 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001491 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001492 * Caller: library/md.c
1493 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001494 * library/ssl_srv.c
1495 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001496 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001497 *
1498 * This module is required for SSL/TLS and SHA1-signed certificates.
1499 */
Paul Bakker40e46942009-01-03 21:51:57 +00001500#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001501
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001502/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001503 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001504 *
1505 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001506 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001507 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001508 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001509 * Caller: library/entropy.c
1510 * library/md.c
1511 * library/ssl_cli.c
1512 * library/ssl_srv.c
1513 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001514 *
1515 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001516 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001517 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001518#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001519
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001520/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001521 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001522 *
1523 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001524 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001525 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001526 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001527 * Caller: library/entropy.c
1528 * library/md.c
1529 * library/ssl_cli.c
1530 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001531 *
1532 * This module adds support for SHA-384 and SHA-512.
1533 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001534#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001535
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001536/**
Paul Bakker0a597072012-09-25 21:55:46 +00001537 * \def POLARSSL_SSL_CACHE_C
1538 *
1539 * Enable simple SSL cache implementation.
1540 *
1541 * Module: library/ssl_cache.c
1542 * Caller:
1543 *
1544 * Requires: POLARSSL_SSL_CACHE_C
1545 */
1546#define POLARSSL_SSL_CACHE_C
1547
1548/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001549 * \def POLARSSL_SSL_CLI_C
1550 *
1551 * Enable the SSL/TLS client code.
1552 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001553 * Module: library/ssl_cli.c
1554 * Caller:
1555 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001556 * Requires: POLARSSL_SSL_TLS_C
1557 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001558 * This module is required for SSL/TLS client support.
1559 */
Paul Bakker40e46942009-01-03 21:51:57 +00001560#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001561
Paul Bakker9a736322012-11-14 12:39:52 +00001562/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001563 * \def POLARSSL_SSL_SRV_C
1564 *
1565 * Enable the SSL/TLS server code.
1566 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001567 * Module: library/ssl_srv.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 server support.
1573 */
Paul Bakker40e46942009-01-03 21:51:57 +00001574#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001575
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001576/**
1577 * \def POLARSSL_SSL_TLS_C
1578 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001579 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001580 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001581 * Module: library/ssl_tls.c
1582 * Caller: library/ssl_cli.c
1583 * library/ssl_srv.c
1584 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001585 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001586 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001587 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001588 * This module is required for SSL/TLS.
1589 */
Paul Bakker40e46942009-01-03 21:51:57 +00001590#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001591
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001592/**
Paul Bakker2466d932013-09-28 14:40:38 +02001593 * \def POLARSSL_THREADING_C
1594 *
1595 * Enable the threading abstraction layer.
1596 * By default PolarSSL assumes it is used in a non-threaded environment or that
1597 * contexts are not shared between threads. If you do intend to use contexts
1598 * between threads, you will need to enable this layer to prevent race
1599 * conditions.
1600 *
1601 * Module: library/threading.c
1602 *
1603 * This allows different threading implementations (self-implemented or
1604 * provided).
1605 *
1606 * You will have to enable either POLARSSL_THREADING_ALT,
1607 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1608 *
1609 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001610 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001611//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001612
1613/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001614 * \def POLARSSL_TIMING_C
1615 *
1616 * Enable the portable timing interface.
1617 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001618 * Module: library/timing.c
1619 * Caller: library/havege.c
1620 *
1621 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001622 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001623#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001624
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001625/**
1626 * \def POLARSSL_VERSION_C
1627 *
1628 * Enable run-time version information.
1629 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001630 * Module: library/version.c
1631 *
1632 * This module provides run-time version information.
1633 */
1634#define POLARSSL_VERSION_C
1635
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001636/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001637 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001638 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001639 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001640 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001641 * Module: library/x509.c
1642 * Caller: library/x509_crl.c
1643 * library/x509_crt.c
1644 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001645 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001646 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001647 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001648 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001649 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001650 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001651#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001652
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001653/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001654 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001655 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001656 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001657 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001658 * Module: library/x509_crt.c
1659 * Caller: library/ssl_cli.c
1660 * library/ssl_srv.c
1661 * library/ssl_tls.c
1662 *
1663 * Requires: POLARSSL_X509_USE_C
1664 *
1665 * This module is required for X.509 certificate parsing.
1666 */
1667#define POLARSSL_X509_CRT_PARSE_C
1668
1669/**
1670 * \def POLARSSL_X509_CRL_PARSE_C
1671 *
1672 * Enable X.509 CRL parsing.
1673 *
1674 * Module: library/x509_crl.c
1675 * Caller: library/x509_crt.c
1676 *
1677 * Requires: POLARSSL_X509_USE_C
1678 *
1679 * This module is required for X.509 CRL parsing.
1680 */
1681#define POLARSSL_X509_CRL_PARSE_C
1682
1683/**
1684 * \def POLARSSL_X509_CSR_PARSE_C
1685 *
1686 * Enable X.509 Certificate Signing Request (CSR) parsing.
1687 *
1688 * Module: library/x509_csr.c
1689 * Caller: library/x509_crt_write.c
1690 *
1691 * Requires: POLARSSL_X509_USE_C
1692 *
1693 * This module is used for reading X.509 certificate request.
1694 */
1695#define POLARSSL_X509_CSR_PARSE_C
1696
1697/**
1698 * \def POLARSSL_X509_CREATE_C
1699 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001700 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001701 *
1702 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001703 *
Paul Bakker4606c732013-09-15 17:04:23 +02001704 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001705 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001706 * This module is the basis for creating X.509 certificates and CSRs.
1707 */
1708#define POLARSSL_X509_CREATE_C
1709
1710/**
1711 * \def POLARSSL_X509_CRT_WRITE_C
1712 *
1713 * Enable creating X.509 certificates.
1714 *
1715 * Module: library/x509_crt_write.c
1716 *
1717 * Requires: POLARSSL_CREATE_C
1718 *
1719 * This module is required for X.509 certificate creation.
1720 */
1721#define POLARSSL_X509_CRT_WRITE_C
1722
1723/**
1724 * \def POLARSSL_X509_CSR_WRITE_C
1725 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001726 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001727 *
1728 * Module: library/x509_csr_write.c
1729 *
1730 * Requires: POLARSSL_CREATE_C
1731 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001732 * This module is required for X.509 certificate request writing.
1733 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001734#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001735
1736/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001737 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001738 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001739 * Enable the XTEA block cipher.
1740 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001741 * Module: library/xtea.c
1742 * Caller:
1743 */
1744#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001745
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001746/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001747
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001748/**
1749 * \name SECTION: Module configuration options
1750 *
1751 * This section allows for the setting of module specific sizes and
1752 * configuration options. The default values are already present in the
1753 * relevant header files and should suffice for the regular use cases.
1754 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1755 * only if you have a good reason and know the consequences.
1756 *
1757 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1758 * header file take precedence.
1759 *
1760 * Please check the respective header file for documentation on these
1761 * parameters (to prevent duplicate documentation).
1762 *
1763 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1764 * \{
1765 */
1766//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1767
1768#if defined(POLARSSL_CONFIG_OPTIONS)
1769
1770// MPI / BIGNUM options
1771//
1772#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1773#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1774
1775// CTR_DRBG options
1776//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001777#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 +02001778#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1779#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1780#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1781#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1782
1783// Entropy options
1784//
1785#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1786#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1787
Paul Bakker6e339b52013-07-03 13:37:05 +02001788// Memory options
1789#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1790#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1791#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1792
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001793// SSL Cache options
1794//
1795#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1796#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1797
1798// SSL options
1799//
1800#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001801#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001802
1803#endif /* POLARSSL_CONFIG_OPTIONS */
1804
1805/* \} name */
1806
Paul Bakker7ad00f92013-04-18 23:05:25 +02001807/*
1808 * Sanity checks on defines and dependencies
1809 */
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001810#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1811#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001812#endif
1813
1814#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1815#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1816#endif
1817
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001818#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1819#error "POLARSSL_DHM_C defined, but not all prerequisites"
1820#endif
1821
Paul Bakker7ad00f92013-04-18 23:05:25 +02001822#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1823#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1824#endif
1825
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001826#if defined(POLARSSL_ECDSA_C) && \
1827 ( !defined(POLARSSL_ECP_C) || \
1828 !defined(POLARSSL_ASN1_PARSE_C) || \
1829 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001830#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1831#endif
1832
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001833#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1834 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1835 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1836 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1837 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1838 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1839 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1840 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1841 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001842#error "POLARSSL_ECP_C defined, but not all prerequisites"
1843#endif
1844
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001845#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1846 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001847#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1848#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001849#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1850 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1851#error "CTR_DRBG_ENTROPY_LEN value too high"
1852#endif
1853#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1854 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1855#error "CTR_DRBG_ENTROPY_LEN value too high"
1856#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001857
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001858#if defined(POLARSSL_GCM_C) && ( \
1859 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001860#error "POLARSSL_GCM_C defined, but not all prerequisites"
1861#endif
1862
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001863#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1864#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1865#endif
1866
Paul Bakkere07f41d2013-04-19 09:08:57 +02001867#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1868#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1869#endif
1870
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001871#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1872 !defined(POLARSSL_ECDH_C)
1873#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1874#endif
1875
Paul Bakkere07f41d2013-04-19 09:08:57 +02001876#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1877 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001878 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001879#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1880#endif
1881
1882#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1883 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001884 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001885#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1886#endif
1887
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001888#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1889 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001890 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001891#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1892#endif
1893
Paul Bakkere07f41d2013-04-19 09:08:57 +02001894#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001895 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001896 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001897#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1898#endif
1899
1900#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001901 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001902 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001903#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1904#endif
1905
Paul Bakker6e339b52013-07-03 13:37:05 +02001906#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1907#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1908#endif
1909
Paul Bakker7ad00f92013-04-18 23:05:25 +02001910#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1911#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1912#endif
1913
Paul Bakkercff68422013-09-15 20:43:33 +02001914#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1915#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1916#endif
1917
1918#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1919#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001920#endif
1921
Paul Bakker4606c732013-09-15 17:04:23 +02001922#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1923#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1924#endif
1925
1926#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1927#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1928#endif
1929
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001930#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001931#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1932#endif
1933
1934#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1935 !defined(POLARSSL_OID_C) )
1936#error "POLARSSL_RSA_C defined, but not all prerequisites"
1937#endif
1938
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01001939#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
1940 !defined(POLARSSL_SHA1_C) )
1941#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
1942#endif
1943
1944#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
1945 !defined(POLARSSL_SHA1_C) )
1946#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
1947#endif
1948
1949#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
1950 !defined(POLARSSL_SHA1_C) )
1951#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
1952#endif
1953
1954#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
1955 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
1956#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
1957#endif
1958
Paul Bakker7ad00f92013-04-18 23:05:25 +02001959#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1960#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1961#endif
1962
Paul Bakker577e0062013-08-28 11:57:20 +02001963#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001964 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001965#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1966#endif
1967
1968#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1969#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1970#endif
1971
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001972#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1973 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1974 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1975#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1976#endif
1977
1978#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1979 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1980#error "Illegal protocol selection"
1981#endif
1982
1983#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1984 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1985#error "Illegal protocol selection"
1986#endif
1987
1988#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1989 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1990 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1991#error "Illegal protocol selection"
1992#endif
1993
Paul Bakker59da0a42013-08-19 13:27:17 +02001994#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001995 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1996 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001997#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1998#endif
1999
Paul Bakker2466d932013-09-28 14:40:38 +02002000#if defined(POLARSSL_THREADING_DUMMY)
2001#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2002#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
2003#endif
2004#define POLARSSL_THREADING_IMPL
2005#endif
2006
2007#if defined(POLARSSL_THREADING_PTHREAD)
2008#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2009#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2010#endif
2011#define POLARSSL_THREADING_IMPL
2012#endif
2013
2014#if defined(POLARSSL_THREADING_ALT)
2015#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2016#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2017#endif
2018#define POLARSSL_THREADING_IMPL
2019#endif
2020
2021#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2022#error "POLARSSL_THREADING_C defined, single threading implementation required"
2023#endif
2024#undef POLARSSL_THREADING_IMPL
2025
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002026#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002027 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002028 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002029#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002030#endif
2031
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002032#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2033 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2034 !defined(POLARSSL_PK_WRITE_C) )
2035#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2036#endif
2037
2038#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2039#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2040#endif
2041
2042#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2043#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2044#endif
2045
2046#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2047#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2048#endif
2049
2050#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2051#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2052#endif
2053
2054#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2055#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002056#endif
2057
Paul Bakker5121ce52009-01-03 21:22:43 +00002058#endif /* config.h */