blob: 8390511ba6442f54a20e7e7dc56b6f56c049f121 [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/**
Paul Bakker05decb22013-08-15 13:33:48 +0200635 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
636 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200637 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200638 *
639 * Comment this macro to disable support for the max_fragment_length extension
640 */
641#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
642
643/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200644 * \def POLARSSL_SSL_PROTO_SSL3
645 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200646 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200647 *
648 * Requires: POLARSSL_MD5_C
649 * POLARSSL_SHA1_C
650 *
651 * Comment this macro to disable support for SSL 3.0
652 */
653#define POLARSSL_SSL_PROTO_SSL3
654
655/**
656 * \def POLARSSL_SSL_PROTO_TLS1
657 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200658 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200659 *
660 * Requires: POLARSSL_MD5_C
661 * POLARSSL_SHA1_C
662 *
663 * Comment this macro to disable support for TLS 1.0
664 */
665#define POLARSSL_SSL_PROTO_TLS1
666
667/**
668 * \def POLARSSL_SSL_PROTO_TLS1_1
669 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200670 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200671 *
672 * Requires: POLARSSL_MD5_C
673 * POLARSSL_SHA1_C
674 *
675 * Comment this macro to disable support for TLS 1.1
676 */
677#define POLARSSL_SSL_PROTO_TLS1_1
678
679/**
680 * \def POLARSSL_SSL_PROTO_TLS1_2
681 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200682 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200683 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100684 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200685 * (Depends on ciphersuites)
686 *
687 * Comment this macro to disable support for TLS 1.2
688 */
689#define POLARSSL_SSL_PROTO_TLS1_2
690
691/**
Paul Bakkera503a632013-08-14 13:48:06 +0200692 * \def POLARSSL_SSL_SESSION_TICKETS
693 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200694 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200695 *
696 * Requires: POLARSSL_AES_C
697 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200698 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200699 *
700 * Comment this macro to disable support for SSL session tickets
701 */
702#define POLARSSL_SSL_SESSION_TICKETS
703
704/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200705 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
706 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200707 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200708 *
709 * Comment this macro to disable support for server name indication in SSL
710 */
711#define POLARSSL_SSL_SERVER_NAME_INDICATION
712
713/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200714 * \def POLARSSL_SSL_TRUNCATED_HMAC
715 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200716 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200717 *
718 * Comment this macro to disable support for truncated HMAC in SSL
719 */
720#define POLARSSL_SSL_TRUNCATED_HMAC
721
722/**
Paul Bakker2466d932013-09-28 14:40:38 +0200723 * \def POLARSSL_THREADING_ALT
724 *
725 * Provide your own alternate threading implementation.
726 *
727 * Requires: POLARSSL_THREADING_C
728 *
729 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200730 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200731//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200732
733/**
734 * \def POLARSSL_THREADING_DUMMY
735 *
736 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200737 * Warning: If you use this, all claims of thread-safety in the documentation
738 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200739 *
740 * Requires: POLARSSL_THREADING_C
741 *
742 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200743 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200744//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200745
746/**
747 * \def POLARSSL_THREADING_PTHREAD
748 *
749 * Enable the pthread wrapper layer for the threading layer.
750 *
751 * Requires: POLARSSL_THREADING_C
752 *
753 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200754 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200755//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200756
757/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200758 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
759 *
760 * If set, the X509 parser will not break-off when parsing an X509 certificate
761 * and encountering an extension in a v1 or v2 certificate.
762 *
763 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200764 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200765//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200766
767/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000768 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
769 *
770 * If set, the X509 parser will not break-off when parsing an X509 certificate
771 * and encountering an unknown critical extension.
772 *
773 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000774 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200775//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000776
777/**
778 * \def POLARSSL_ZLIB_SUPPORT
779 *
780 * If set, the SSL/TLS module uses ZLIB to support compression and
781 * decompression of packet data.
782 *
783 * Used in: library/ssl_tls.c
784 * library/ssl_cli.c
785 * library/ssl_srv.c
786 *
787 * This feature requires zlib library and headers to be present.
788 *
789 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000790 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200791//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200792/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000793
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000794/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000795 * \name SECTION: PolarSSL modules
796 *
797 * This section enables or disables entire modules in PolarSSL
798 * \{
799 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000800
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000801/**
802 * \def POLARSSL_AES_C
803 *
804 * Enable the AES block cipher.
805 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000806 * Module: library/aes.c
807 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000808 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000809 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000810 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000811 * This module enables the following ciphersuites (if other requisites are
812 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200813 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
814 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
815 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
816 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
817 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000818 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200819 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100820 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200821 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
822 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
823 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
824 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
825 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
826 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
827 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
828 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
829 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
830 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
831 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
832 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
833 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
834 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
835 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
836 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
837 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
838 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
839 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
840 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
841 * TLS_RSA_WITH_AES_256_GCM_SHA384
842 * TLS_RSA_WITH_AES_256_CBC_SHA256
843 * TLS_RSA_WITH_AES_256_CBC_SHA
844 * TLS_RSA_WITH_AES_128_GCM_SHA256
845 * TLS_RSA_WITH_AES_128_CBC_SHA256
846 * TLS_RSA_WITH_AES_128_CBC_SHA
847 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
848 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
849 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
850 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
851 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
852 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
853 * TLS_PSK_WITH_AES_256_GCM_SHA384
854 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200855 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200856 * TLS_PSK_WITH_AES_128_GCM_SHA256
857 * TLS_PSK_WITH_AES_128_CBC_SHA256
858 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100859 *
Paul Bakkercff68422013-09-15 20:43:33 +0200860 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000861 */
Paul Bakker40e46942009-01-03 21:51:57 +0000862#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000863
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000864/**
865 * \def POLARSSL_ARC4_C
866 *
867 * Enable the ARCFOUR stream cipher.
868 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000869 * Module: library/arc4.c
870 * Caller: library/ssl_tls.c
871 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100872 * This module enables the following ciphersuites (if other requisites are
873 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200874 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100875 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200876 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
877 * TLS_DHE_PSK_WITH_RC4_128_SHA
878 * TLS_RSA_WITH_RC4_128_SHA
879 * TLS_RSA_WITH_RC4_128_MD5
880 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200881 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000882 */
Paul Bakker40e46942009-01-03 21:51:57 +0000883#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000884
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000885/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000886 * \def POLARSSL_ASN1_PARSE_C
887 *
888 * Enable the generic ASN1 parser.
889 *
890 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200891 * Caller: library/x509.c
892 * library/dhm.c
893 * library/pkcs12.c
894 * library/pkcs5.c
895 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000896 */
897#define POLARSSL_ASN1_PARSE_C
898
899/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000900 * \def POLARSSL_ASN1_WRITE_C
901 *
902 * Enable the generic ASN1 writer.
903 *
904 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200905 * Caller: library/ecdsa.c
906 * library/pkwrite.c
907 * library/x509_create.c
908 * library/x509write_crt.c
909 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000910 */
911#define POLARSSL_ASN1_WRITE_C
912
913/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000914 * \def POLARSSL_BASE64_C
915 *
916 * Enable the Base64 module.
917 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000918 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000919 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000920 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000921 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000922 */
Paul Bakker40e46942009-01-03 21:51:57 +0000923#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000924
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000925/**
926 * \def POLARSSL_BIGNUM_C
927 *
Paul Bakker9a736322012-11-14 12:39:52 +0000928 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000929 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000930 * Module: library/bignum.c
931 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200932 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000933 * library/rsa.c
934 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000935 *
936 * This module is required for RSA and DHM support.
937 */
Paul Bakker40e46942009-01-03 21:51:57 +0000938#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000939
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000940/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000941 * \def POLARSSL_BLOWFISH_C
942 *
943 * Enable the Blowfish block cipher.
944 *
945 * Module: library/blowfish.c
946 */
947#define POLARSSL_BLOWFISH_C
948
949/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000950 * \def POLARSSL_CAMELLIA_C
951 *
952 * Enable the Camellia block cipher.
953 *
Paul Bakker38119b12009-01-10 23:31:23 +0000954 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000955 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000956 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000957 * This module enables the following ciphersuites (if other requisites are
958 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200959 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
960 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
961 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
962 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
963 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000964 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200965 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
966 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
967 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
968 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
969 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
970 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
971 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
972 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
973 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
974 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
975 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
976 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
977 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
978 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
979 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
980 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
981 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
982 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
983 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
984 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
985 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
986 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
987 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
988 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
989 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
990 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
991 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
992 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000993 */
994#define POLARSSL_CAMELLIA_C
995
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000996/**
997 * \def POLARSSL_CERTS_C
998 *
999 * Enable the test certificates.
1000 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001001 * Module: library/certs.c
1002 * Caller:
1003 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001004 * Requires: POLARSSL_PEM_PARSE_C
1005 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001006 * This module is used for testing (ssl_client/server).
1007 */
Paul Bakker40e46942009-01-03 21:51:57 +00001008#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001009
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001010/**
1011 * \def POLARSSL_CIPHER_C
1012 *
1013 * Enable the generic cipher layer.
1014 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001015 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001016 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001017 *
1018 * Uncomment to enable generic cipher wrappers.
1019 */
1020#define POLARSSL_CIPHER_C
1021
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001022/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001023 * \def POLARSSL_CTR_DRBG_C
1024 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001025 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001026 *
1027 * Module: library/ctr_drbg.c
1028 * Caller:
1029 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001030 * Requires: POLARSSL_AES_C
1031 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001032 * This module provides the CTR_DRBG AES-256 random number generator.
1033 */
1034#define POLARSSL_CTR_DRBG_C
1035
1036/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001037 * \def POLARSSL_DEBUG_C
1038 *
1039 * Enable the debug functions.
1040 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001041 * Module: library/debug.c
1042 * Caller: library/ssl_cli.c
1043 * library/ssl_srv.c
1044 * library/ssl_tls.c
1045 *
1046 * This module provides debugging functions.
1047 */
Paul Bakker40e46942009-01-03 21:51:57 +00001048#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001049
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001050/**
1051 * \def POLARSSL_DES_C
1052 *
1053 * Enable the DES block cipher.
1054 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001055 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001056 * Caller: library/pem.c
1057 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001058 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001059 * This module enables the following ciphersuites (if other requisites are
1060 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001061 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001062 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001063 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1064 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1065 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1066 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1067 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001068 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001069 *
Paul Bakkercff68422013-09-15 20:43:33 +02001070 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001071 */
Paul Bakker40e46942009-01-03 21:51:57 +00001072#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001073
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001074/**
1075 * \def POLARSSL_DHM_C
1076 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001077 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001078 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001079 * Module: library/dhm.c
1080 * Caller: library/ssl_cli.c
1081 * library/ssl_srv.c
1082 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001083 * This module is used by the following key exchanges:
1084 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001085 */
Paul Bakker40e46942009-01-03 21:51:57 +00001086#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001087
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001088/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001089 * \def POLARSSL_ECDH_C
1090 *
1091 * Enable the elliptic curve Diffie-Hellman library.
1092 *
1093 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001094 * Caller: library/ssl_cli.c
1095 * library/ssl_srv.c
1096 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001097 * This module is used by the following key exchanges:
1098 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001099 *
1100 * Requires: POLARSSL_ECP_C
1101 */
1102#define POLARSSL_ECDH_C
1103
1104/**
1105 * \def POLARSSL_ECDSA_C
1106 *
1107 * Enable the elliptic curve DSA library.
1108 *
1109 * Module: library/ecdsa.c
1110 * Caller:
1111 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001112 * This module is used by the following key exchanges:
1113 * ECDHE-ECDSA
1114 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001115 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001116 */
1117#define POLARSSL_ECDSA_C
1118
1119/**
1120 * \def POLARSSL_ECP_C
1121 *
1122 * Enable the elliptic curve over GF(p) library.
1123 *
1124 * Module: library/ecp.c
1125 * Caller: library/ecdh.c
1126 * library/ecdsa.c
1127 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001128 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001129 */
1130#define POLARSSL_ECP_C
1131
1132/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001133 * \def POLARSSL_ENTROPY_C
1134 *
1135 * Enable the platform-specific entropy code.
1136 *
1137 * Module: library/entropy.c
1138 * Caller:
1139 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001140 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001141 *
1142 * This module provides a generic entropy pool
1143 */
1144#define POLARSSL_ENTROPY_C
1145
1146/**
Paul Bakker9d781402011-05-09 16:17:09 +00001147 * \def POLARSSL_ERROR_C
1148 *
1149 * Enable error code to error string conversion.
1150 *
1151 * Module: library/error.c
1152 * Caller:
1153 *
1154 * This module enables err_strerror().
1155 */
1156#define POLARSSL_ERROR_C
1157
1158/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001159 * \def POLARSSL_GCM_C
1160 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001161 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001162 *
1163 * Module: library/gcm.c
1164 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001165 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001166 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001167 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1168 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001169 */
1170#define POLARSSL_GCM_C
1171
1172/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001173 * \def POLARSSL_HAVEGE_C
1174 *
1175 * Enable the HAVEGE random generator.
1176 *
Paul Bakker2a844242013-06-24 13:01:53 +02001177 * Warning: the HAVEGE random generator is not suitable for virtualized
1178 * environments
1179 *
1180 * Warning: the HAVEGE random generator is dependent on timing and specific
1181 * processor traits. It is therefore not advised to use HAVEGE as
1182 * your applications primary random generator or primary entropy pool
1183 * input. As a secondary input to your entropy pool, it IS able add
1184 * the (limited) extra entropy it provides.
1185 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001186 * Module: library/havege.c
1187 * Caller:
1188 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001189 * Requires: POLARSSL_TIMING_C
1190 *
Paul Bakker2a844242013-06-24 13:01:53 +02001191 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001192 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001193//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001194
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001195/**
1196 * \def POLARSSL_MD_C
1197 *
1198 * Enable the generic message digest layer.
1199 *
Paul Bakker17373852011-01-06 14:20:01 +00001200 * Module: library/md.c
1201 * Caller:
1202 *
1203 * Uncomment to enable generic message digest wrappers.
1204 */
1205#define POLARSSL_MD_C
1206
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001207/**
1208 * \def POLARSSL_MD2_C
1209 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001210 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001211 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001212 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001213 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001214 *
1215 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001216 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001217//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001218
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001219/**
1220 * \def POLARSSL_MD4_C
1221 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001222 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001223 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001224 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001225 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001226 *
1227 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001228 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001229//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001230
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001231/**
1232 * \def POLARSSL_MD5_C
1233 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001234 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001235 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001236 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001237 * Caller: library/md.c
1238 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001239 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001240 *
1241 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001242 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001243 */
Paul Bakker40e46942009-01-03 21:51:57 +00001244#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001245
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001246/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001247 * \def POLARSSL_MEMORY_C
1248 *
1249 * Enable the memory allocation layer.
1250 * By default PolarSSL uses the system-provided malloc() and free().
1251 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1252 * are defined and unmodified)
1253 *
1254 * This allows different allocators (self-implemented or provided)
1255 *
1256 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001257 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001258//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001259
1260/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001261 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1262 *
1263 * Enable the buffer allocator implementation that makes use of a (stack)
1264 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1265 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001266 *
1267 * Module: library/memory_buffer_alloc.c
1268 *
1269 * Requires: POLARSSL_MEMORY_C
1270 *
1271 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001272 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001273//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001274
1275/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001276 * \def POLARSSL_NET_C
1277 *
1278 * Enable the TCP/IP networking routines.
1279 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001280 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001281 *
1282 * This module provides TCP/IP networking routines.
1283 */
Paul Bakker40e46942009-01-03 21:51:57 +00001284#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001285
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001286/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001287 * \def POLARSSL_OID_C
1288 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001289 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001290 *
1291 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001292 * Caller: library/asn1write.c
1293 * library/pkcs5.c
1294 * library/pkparse.c
1295 * library/pkwrite.c
1296 * library/rsa.c
1297 * library/x509.c
1298 * library/x509_create.c
1299 * library/x509_crl.c
1300 * library/x509_crt.c
1301 * library/x509_csr.c
1302 * library/x509write_crt.c
1303 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001304 *
1305 * This modules translates between OIDs and internal values.
1306 */
1307#define POLARSSL_OID_C
1308
1309/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001310 * \def POLARSSL_PADLOCK_C
1311 *
1312 * Enable VIA Padlock support on x86.
1313 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001314 * Module: library/padlock.c
1315 * Caller: library/aes.c
1316 *
1317 * This modules adds support for the VIA PadLock on x86.
1318 */
Paul Bakker40e46942009-01-03 21:51:57 +00001319#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001320
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001321/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001322 * \def POLARSSL_PBKDF2_C
1323 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001324 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001325 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001326 *
1327 * Module: library/pbkdf2.c
1328 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001329 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001330 *
1331 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001332 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001333#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001334
1335/**
Paul Bakkercff68422013-09-15 20:43:33 +02001336 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001337 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001338 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001339 *
1340 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001341 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001342 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001343 * library/x509_crl.c
1344 * library/x509_crt.c
1345 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001346 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001347 * Requires: POLARSSL_BASE64_C
1348 *
Paul Bakkercff68422013-09-15 20:43:33 +02001349 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001350 */
Paul Bakkercff68422013-09-15 20:43:33 +02001351#define POLARSSL_PEM_PARSE_C
1352
1353/**
1354 * \def POLARSSL_PEM_WRITE_C
1355 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001356 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001357 *
1358 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001359 * Caller: library/pkwrite.c
1360 * library/x509write_crt.c
1361 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001362 *
1363 * Requires: POLARSSL_BASE64_C
1364 *
1365 * This modules adds support for encoding / writing PEM files.
1366 */
1367#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001368
1369/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001370 * \def POLARSSL_PK_C
1371 *
1372 * Enable the generic public (asymetric) key layer.
1373 *
1374 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001375 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001376 * library/ssl_cli.c
1377 * library/ssl_srv.c
1378 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001379 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1380 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001381 * Uncomment to enable generic public key wrappers.
1382 */
1383#define POLARSSL_PK_C
1384
1385/**
Paul Bakker4606c732013-09-15 17:04:23 +02001386 * \def POLARSSL_PK_PARSE_C
1387 *
1388 * Enable the generic public (asymetric) key parser.
1389 *
1390 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001391 * Caller: library/x509_crt.c
1392 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001393 *
1394 * Requires: POLARSSL_PK_C
1395 *
1396 * Uncomment to enable generic public key parse functions.
1397 */
1398#define POLARSSL_PK_PARSE_C
1399
1400/**
1401 * \def POLARSSL_PK_WRITE_C
1402 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001403 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001404 *
1405 * Module: library/pkwrite.c
1406 * Caller: library/x509write.c
1407 *
1408 * Requires: POLARSSL_PK_C
1409 *
1410 * Uncomment to enable generic public key write functions.
1411 */
1412#define POLARSSL_PK_WRITE_C
1413
1414/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001415 * \def POLARSSL_PKCS5_C
1416 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001417 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001418 *
1419 * Module: library/pkcs5.c
1420 *
1421 * Requires: POLARSSL_MD_C
1422 *
1423 * This module adds support for the PKCS#5 functions.
1424 */
1425#define POLARSSL_PKCS5_C
1426
1427/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001428 * \def POLARSSL_PKCS11_C
1429 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001430 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001431 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001432 * Module: library/pkcs11.c
1433 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001434 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001435 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001436 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001437 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001438 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001439 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001440//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001441
1442/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001443 * \def POLARSSL_PKCS12_C
1444 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001445 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001446 * Adds algorithms for parsing PKCS#8 encrypted private keys
1447 *
1448 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001449 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001450 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001451 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1452 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001453 *
1454 * This module enables PKCS#12 functions.
1455 */
1456#define POLARSSL_PKCS12_C
1457
1458/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001459 * \def POLARSSL_RSA_C
1460 *
1461 * Enable the RSA public-key cryptosystem.
1462 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001463 * Module: library/rsa.c
1464 * Caller: library/ssl_cli.c
1465 * library/ssl_srv.c
1466 * library/ssl_tls.c
1467 * library/x509.c
1468 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001469 * This module is used by the following key exchanges:
1470 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001471 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001472 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001473 */
Paul Bakker40e46942009-01-03 21:51:57 +00001474#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001475
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001476/**
1477 * \def POLARSSL_SHA1_C
1478 *
1479 * Enable the SHA1 cryptographic hash algorithm.
1480 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001481 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001482 * Caller: library/md.c
1483 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001484 * library/ssl_srv.c
1485 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001486 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001487 *
1488 * This module is required for SSL/TLS and SHA1-signed certificates.
1489 */
Paul Bakker40e46942009-01-03 21:51:57 +00001490#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001491
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001492/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001493 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001494 *
1495 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001496 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001497 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001498 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001499 * Caller: library/entropy.c
1500 * library/md.c
1501 * library/ssl_cli.c
1502 * library/ssl_srv.c
1503 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001504 *
1505 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001506 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001507 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001508#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001509
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001510/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001511 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001512 *
1513 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001514 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001515 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001516 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001517 * Caller: library/entropy.c
1518 * library/md.c
1519 * library/ssl_cli.c
1520 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001521 *
1522 * This module adds support for SHA-384 and SHA-512.
1523 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001524#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001525
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001526/**
Paul Bakker0a597072012-09-25 21:55:46 +00001527 * \def POLARSSL_SSL_CACHE_C
1528 *
1529 * Enable simple SSL cache implementation.
1530 *
1531 * Module: library/ssl_cache.c
1532 * Caller:
1533 *
1534 * Requires: POLARSSL_SSL_CACHE_C
1535 */
1536#define POLARSSL_SSL_CACHE_C
1537
1538/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001539 * \def POLARSSL_SSL_CLI_C
1540 *
1541 * Enable the SSL/TLS client code.
1542 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001543 * Module: library/ssl_cli.c
1544 * Caller:
1545 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001546 * Requires: POLARSSL_SSL_TLS_C
1547 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001548 * This module is required for SSL/TLS client support.
1549 */
Paul Bakker40e46942009-01-03 21:51:57 +00001550#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001551
Paul Bakker9a736322012-11-14 12:39:52 +00001552/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001553 * \def POLARSSL_SSL_SRV_C
1554 *
1555 * Enable the SSL/TLS server code.
1556 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001557 * Module: library/ssl_srv.c
1558 * Caller:
1559 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001560 * Requires: POLARSSL_SSL_TLS_C
1561 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001562 * This module is required for SSL/TLS server support.
1563 */
Paul Bakker40e46942009-01-03 21:51:57 +00001564#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001565
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001566/**
1567 * \def POLARSSL_SSL_TLS_C
1568 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001569 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001570 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001571 * Module: library/ssl_tls.c
1572 * Caller: library/ssl_cli.c
1573 * library/ssl_srv.c
1574 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001575 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001576 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001577 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001578 * This module is required for SSL/TLS.
1579 */
Paul Bakker40e46942009-01-03 21:51:57 +00001580#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001581
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001582/**
Paul Bakker2466d932013-09-28 14:40:38 +02001583 * \def POLARSSL_THREADING_C
1584 *
1585 * Enable the threading abstraction layer.
1586 * By default PolarSSL assumes it is used in a non-threaded environment or that
1587 * contexts are not shared between threads. If you do intend to use contexts
1588 * between threads, you will need to enable this layer to prevent race
1589 * conditions.
1590 *
1591 * Module: library/threading.c
1592 *
1593 * This allows different threading implementations (self-implemented or
1594 * provided).
1595 *
1596 * You will have to enable either POLARSSL_THREADING_ALT,
1597 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1598 *
1599 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001600 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001601//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001602
1603/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001604 * \def POLARSSL_TIMING_C
1605 *
1606 * Enable the portable timing interface.
1607 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001608 * Module: library/timing.c
1609 * Caller: library/havege.c
1610 *
1611 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001612 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001613#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001614
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001615/**
1616 * \def POLARSSL_VERSION_C
1617 *
1618 * Enable run-time version information.
1619 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001620 * Module: library/version.c
1621 *
1622 * This module provides run-time version information.
1623 */
1624#define POLARSSL_VERSION_C
1625
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001626/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001627 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001628 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001629 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001630 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001631 * Module: library/x509.c
1632 * Caller: library/x509_crl.c
1633 * library/x509_crt.c
1634 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001635 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001636 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001637 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001638 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001639 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001640 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001641#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001642
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001643/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001644 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001645 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001646 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001647 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001648 * Module: library/x509_crt.c
1649 * Caller: library/ssl_cli.c
1650 * library/ssl_srv.c
1651 * library/ssl_tls.c
1652 *
1653 * Requires: POLARSSL_X509_USE_C
1654 *
1655 * This module is required for X.509 certificate parsing.
1656 */
1657#define POLARSSL_X509_CRT_PARSE_C
1658
1659/**
1660 * \def POLARSSL_X509_CRL_PARSE_C
1661 *
1662 * Enable X.509 CRL parsing.
1663 *
1664 * Module: library/x509_crl.c
1665 * Caller: library/x509_crt.c
1666 *
1667 * Requires: POLARSSL_X509_USE_C
1668 *
1669 * This module is required for X.509 CRL parsing.
1670 */
1671#define POLARSSL_X509_CRL_PARSE_C
1672
1673/**
1674 * \def POLARSSL_X509_CSR_PARSE_C
1675 *
1676 * Enable X.509 Certificate Signing Request (CSR) parsing.
1677 *
1678 * Module: library/x509_csr.c
1679 * Caller: library/x509_crt_write.c
1680 *
1681 * Requires: POLARSSL_X509_USE_C
1682 *
1683 * This module is used for reading X.509 certificate request.
1684 */
1685#define POLARSSL_X509_CSR_PARSE_C
1686
1687/**
1688 * \def POLARSSL_X509_CREATE_C
1689 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001690 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001691 *
1692 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001693 *
Paul Bakker4606c732013-09-15 17:04:23 +02001694 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001695 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001696 * This module is the basis for creating X.509 certificates and CSRs.
1697 */
1698#define POLARSSL_X509_CREATE_C
1699
1700/**
1701 * \def POLARSSL_X509_CRT_WRITE_C
1702 *
1703 * Enable creating X.509 certificates.
1704 *
1705 * Module: library/x509_crt_write.c
1706 *
1707 * Requires: POLARSSL_CREATE_C
1708 *
1709 * This module is required for X.509 certificate creation.
1710 */
1711#define POLARSSL_X509_CRT_WRITE_C
1712
1713/**
1714 * \def POLARSSL_X509_CSR_WRITE_C
1715 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001716 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001717 *
1718 * Module: library/x509_csr_write.c
1719 *
1720 * Requires: POLARSSL_CREATE_C
1721 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001722 * This module is required for X.509 certificate request writing.
1723 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001724#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001725
1726/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001727 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001728 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001729 * Enable the XTEA block cipher.
1730 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001731 * Module: library/xtea.c
1732 * Caller:
1733 */
1734#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001735
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001736/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001737
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001738/**
1739 * \name SECTION: Module configuration options
1740 *
1741 * This section allows for the setting of module specific sizes and
1742 * configuration options. The default values are already present in the
1743 * relevant header files and should suffice for the regular use cases.
1744 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1745 * only if you have a good reason and know the consequences.
1746 *
1747 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1748 * header file take precedence.
1749 *
1750 * Please check the respective header file for documentation on these
1751 * parameters (to prevent duplicate documentation).
1752 *
1753 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1754 * \{
1755 */
1756//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1757
1758#if defined(POLARSSL_CONFIG_OPTIONS)
1759
1760// MPI / BIGNUM options
1761//
1762#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1763#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1764
1765// CTR_DRBG options
1766//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001767#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 +02001768#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1769#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1770#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1771#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1772
1773// Entropy options
1774//
1775#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1776#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1777
Paul Bakker6e339b52013-07-03 13:37:05 +02001778// Memory options
1779#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1780#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1781#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1782
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001783// SSL Cache options
1784//
1785#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1786#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1787
1788// SSL options
1789//
1790#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001791#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001792
1793#endif /* POLARSSL_CONFIG_OPTIONS */
1794
1795/* \} name */
1796
Paul Bakker7ad00f92013-04-18 23:05:25 +02001797/*
1798 * Sanity checks on defines and dependencies
1799 */
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001800#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1801#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001802#endif
1803
1804#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1805#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1806#endif
1807
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001808#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1809#error "POLARSSL_DHM_C defined, but not all prerequisites"
1810#endif
1811
Paul Bakker7ad00f92013-04-18 23:05:25 +02001812#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1813#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1814#endif
1815
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001816#if defined(POLARSSL_ECDSA_C) && \
1817 ( !defined(POLARSSL_ECP_C) || \
1818 !defined(POLARSSL_ASN1_PARSE_C) || \
1819 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001820#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1821#endif
1822
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001823#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1824 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1825 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1826 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1827 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1828 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1829 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1830 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1831 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001832#error "POLARSSL_ECP_C defined, but not all prerequisites"
1833#endif
1834
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001835#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1836 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001837#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1838#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001839#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1840 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1841#error "CTR_DRBG_ENTROPY_LEN value too high"
1842#endif
1843#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1844 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1845#error "CTR_DRBG_ENTROPY_LEN value too high"
1846#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001847
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001848#if defined(POLARSSL_GCM_C) && ( \
1849 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001850#error "POLARSSL_GCM_C defined, but not all prerequisites"
1851#endif
1852
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001853#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1854#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1855#endif
1856
Paul Bakkere07f41d2013-04-19 09:08:57 +02001857#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1858#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1859#endif
1860
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001861#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1862 !defined(POLARSSL_ECDH_C)
1863#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1864#endif
1865
Paul Bakkere07f41d2013-04-19 09:08:57 +02001866#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1867 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001868 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001869#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1870#endif
1871
1872#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1873 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001874 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001875#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1876#endif
1877
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001878#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1879 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001880 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001881#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1882#endif
1883
Paul Bakkere07f41d2013-04-19 09:08:57 +02001884#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001885 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001886 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001887#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1888#endif
1889
1890#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001891 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001892 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001893#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1894#endif
1895
Paul Bakker6e339b52013-07-03 13:37:05 +02001896#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1897#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1898#endif
1899
Paul Bakker7ad00f92013-04-18 23:05:25 +02001900#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1901#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1902#endif
1903
Paul Bakkercff68422013-09-15 20:43:33 +02001904#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1905#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1906#endif
1907
1908#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1909#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001910#endif
1911
Paul Bakker4606c732013-09-15 17:04:23 +02001912#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1913#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1914#endif
1915
1916#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1917#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1918#endif
1919
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001920#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001921#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1922#endif
1923
1924#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1925 !defined(POLARSSL_OID_C) )
1926#error "POLARSSL_RSA_C defined, but not all prerequisites"
1927#endif
1928
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01001929#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
1930 !defined(POLARSSL_SHA1_C) )
1931#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
1932#endif
1933
1934#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
1935 !defined(POLARSSL_SHA1_C) )
1936#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
1937#endif
1938
1939#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
1940 !defined(POLARSSL_SHA1_C) )
1941#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
1942#endif
1943
1944#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
1945 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
1946#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
1947#endif
1948
Paul Bakker7ad00f92013-04-18 23:05:25 +02001949#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1950#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1951#endif
1952
Paul Bakker577e0062013-08-28 11:57:20 +02001953#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001954 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001955#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1956#endif
1957
1958#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1959#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1960#endif
1961
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001962#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1963 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1964 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1965#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1966#endif
1967
1968#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1969 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1970#error "Illegal protocol selection"
1971#endif
1972
1973#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1974 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1975#error "Illegal protocol selection"
1976#endif
1977
1978#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1979 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1980 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1981#error "Illegal protocol selection"
1982#endif
1983
Paul Bakker59da0a42013-08-19 13:27:17 +02001984#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001985 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1986 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001987#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1988#endif
1989
Paul Bakker2466d932013-09-28 14:40:38 +02001990#if defined(POLARSSL_THREADING_DUMMY)
1991#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1992#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1993#endif
1994#define POLARSSL_THREADING_IMPL
1995#endif
1996
1997#if defined(POLARSSL_THREADING_PTHREAD)
1998#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1999#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2000#endif
2001#define POLARSSL_THREADING_IMPL
2002#endif
2003
2004#if defined(POLARSSL_THREADING_ALT)
2005#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2006#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2007#endif
2008#define POLARSSL_THREADING_IMPL
2009#endif
2010
2011#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2012#error "POLARSSL_THREADING_C defined, single threading implementation required"
2013#endif
2014#undef POLARSSL_THREADING_IMPL
2015
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002016#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002017 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002018 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002019#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002020#endif
2021
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002022#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2023 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2024 !defined(POLARSSL_PK_WRITE_C) )
2025#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2026#endif
2027
2028#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2029#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2030#endif
2031
2032#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2033#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2034#endif
2035
2036#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2037#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2038#endif
2039
2040#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2041#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2042#endif
2043
2044#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2045#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002046#endif
2047
Paul Bakker5121ce52009-01-03 21:22:43 +00002048#endif /* config.h */