blob: 0b76f0853a1c9b6674b2ea59078ec3e1f5ac04f1 [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
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100251//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
252#define POLARSSL_ECP_DP_M255_ENABLED
253//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
254//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200255
256/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200257 * \def POLARSSL_ECP_NIST_OPTIM
258 *
259 * Enable specific 'modulo p' routines for each NIST prime.
260 * Depending on the prime and architecture, makes operations 4 to 8 times
261 * faster on the corresponding curve.
262 *
263 * Comment this macro to disable NIST curves optimisation.
264 */
265#define POLARSSL_ECP_NIST_OPTIM
266
267/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200268 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
269 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200270 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200271 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200272 * This enables the following ciphersuites (if other requisites are
273 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200274 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200275 * TLS_PSK_WITH_AES_256_CBC_SHA384
276 * TLS_PSK_WITH_AES_256_CBC_SHA
277 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
278 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
279 * TLS_PSK_WITH_AES_128_GCM_SHA256
280 * TLS_PSK_WITH_AES_128_CBC_SHA256
281 * TLS_PSK_WITH_AES_128_CBC_SHA
282 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
283 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
284 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
285 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200286 */
287#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
288
289/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200290 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
291 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200292 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200293 *
294 * Requires: POLARSSL_DHM_C
295 *
296 * This enables the following ciphersuites (if other requisites are
297 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200298 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200299 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
300 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
301 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
302 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
303 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
304 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
305 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
306 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
307 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
308 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
309 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200310 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200311#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200312
313/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200314 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
315 *
316 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
317 *
318 * Requires: POLARSSL_ECDH_C
319 *
320 * This enables the following ciphersuites (if other requisites are
321 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200322 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200323 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200324 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200325 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
326 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
327 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
328 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
329 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200330 */
331#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
332
333/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200334 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
335 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200336 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200337 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200338 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200339 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200340 *
341 * This enables the following ciphersuites (if other requisites are
342 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200343 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200344 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
345 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
346 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
347 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
348 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
349 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
350 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
351 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
352 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
353 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
354 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200355 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200356#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200357
358/**
359 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
360 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200361 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200362 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200363 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200364 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200365 *
366 * This enables the following ciphersuites (if other requisites are
367 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200368 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200369 * TLS_RSA_WITH_AES_256_CBC_SHA256
370 * TLS_RSA_WITH_AES_256_CBC_SHA
371 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200372 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200373 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
374 * TLS_RSA_WITH_AES_128_GCM_SHA256
375 * TLS_RSA_WITH_AES_128_CBC_SHA256
376 * TLS_RSA_WITH_AES_128_CBC_SHA
377 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
378 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
379 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200380 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200381 * TLS_RSA_WITH_RC4_128_SHA
382 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200383 */
384#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
385
386/**
387 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
388 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200389 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200390 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200391 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200392 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200393 *
394 * This enables the following ciphersuites (if other requisites are
395 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200396 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200397 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200398 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
399 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200400 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200401 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
402 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
403 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
404 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
405 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
406 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
407 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200408 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
409 */
410#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
411
412/**
413 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
414 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200415 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200416 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200417 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200418 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200419 *
420 * This enables the following ciphersuites (if other requisites are
421 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200422 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200423 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
424 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
425 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200426 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200427 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
428 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
429 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
430 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
431 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
432 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
433 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200434 */
435#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
436
437/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200438 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
439 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200440 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200441 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200442 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200443 *
444 * This enables the following ciphersuites (if other requisites are
445 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200446 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
447 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
448 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
449 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
450 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
451 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
452 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
453 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
454 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
455 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
456 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
457 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200458 */
459#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
460
461/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200462 * \def POLARSSL_ERROR_STRERROR_BC
463 *
464 * Make available the backward compatible error_strerror() next to the
465 * current polarssl_strerror().
466 *
467 * Disable if you run into name conflicts and want to really remove the
468 * error_strerror()
469 */
470#define POLARSSL_ERROR_STRERROR_BC
471
472/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100473 * \def POLARSSL_ERROR_STRERROR_DUMMY
474 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200475 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100476 * third party libraries easier.
477 *
478 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200479 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100480 */
481#define POLARSSL_ERROR_STRERROR_DUMMY
482
483/**
Paul Bakker15566e42011-04-24 21:19:15 +0000484 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000485 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200486 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200487 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200488 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000489 */
Paul Bakker15566e42011-04-24 21:19:15 +0000490#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000491
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000492/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000493 * \def POLARSSL_FS_IO
494 *
495 * Enable functions that use the filesystem.
496 */
497#define POLARSSL_FS_IO
498
499/**
Paul Bakker43655f42011-12-15 20:11:16 +0000500 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
501 *
502 * Do not add default entropy sources. These are the platform specific,
503 * hardclock and HAVEGE based poll functions.
504 *
505 * This is useful to have more control over the added entropy sources in an
506 * application.
507 *
508 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000509 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200510//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000511
512/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000513 * \def POLARSSL_NO_PLATFORM_ENTROPY
514 *
515 * Do not use built-in platform entropy functions.
516 * This is useful if your platform does not support
517 * standards like the /dev/urandom or Windows CryptoAPI.
518 *
519 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000520 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200521//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000522
523/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200524 * \def POLARSSL_MEMORY_DEBUG
525 *
526 * Enable debugging of buffer allocator memory issues. Automatically prints
527 * (to stderr) all (fatal) messages on memory allocation issues. Enables
528 * function for 'debug output' of allocated memory.
529 *
530 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
531 * fprintf()
532 *
533 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200534 */
535//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200536
537/**
538 * \def POLARSSL_MEMORY_BACKTRACE
539 *
540 * Include backtrace information with each allocated block.
541 *
542 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
543 * GLIBC-compatible backtrace() an backtrace_symbols() support
544 *
545 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200546 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200547//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200548
549/**
Paul Bakker48377d92013-08-30 12:06:24 +0200550 * \def POLARSSL_PKCS1_V15
551 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200552 * Enable support for PKCS#1 v1.5 encoding.
553 *
Paul Bakker48377d92013-08-30 12:06:24 +0200554 * Requires: POLARSSL_RSA_C
555 *
Paul Bakker48377d92013-08-30 12:06:24 +0200556 * This enables support for PKCS#1 v1.5 operations.
557 */
558#define POLARSSL_PKCS1_V15
559
560/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000561 * \def POLARSSL_PKCS1_V21
562 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200563 * Enable support for PKCS#1 v2.1 encoding.
564 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000565 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
566 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000567 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
568 */
569#define POLARSSL_PKCS1_V21
570
571/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000572 * \def POLARSSL_RSA_NO_CRT
573 *
574 * Do not use the Chinese Remainder Theorem for the RSA private operation.
575 *
576 * Uncomment this macro to disable the use of CRT in RSA.
577 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000578 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200579//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000580
581/**
582 * \def POLARSSL_SELF_TEST
583 *
584 * Enable the checkup functions (*_self_test).
585 */
586#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000587
588/**
Paul Bakker40865c82013-01-31 17:13:13 +0100589 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
590 *
591 * Enable sending of alert messages in case of encountered errors as per RFC.
592 * If you choose not to send the alert messages, PolarSSL can still communicate
593 * with other servers, only debugging of failures is harder.
594 *
595 * The advantage of not sending alert messages, is that no information is given
596 * about reasons for failures thus preventing adversaries of gaining intel.
597 *
598 * Enable sending of all alert messages
599 */
600#define POLARSSL_SSL_ALERT_MESSAGES
601
602/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100603 * \def POLARSSL_SSL_DEBUG_ALL
604 *
605 * Enable the debug messages in SSL module for all issues.
606 * Debug messages have been disabled in some places to prevent timing
607 * attacks due to (unbalanced) debugging function calls.
608 *
609 * If you need all error reporting you should enable this during debugging,
610 * but remove this for production servers that should log as well.
611 *
612 * Uncomment this macro to report all debug messages on errors introducing
613 * a timing side-channel.
614 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100615 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200616//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100617
618/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000619 * \def POLARSSL_SSL_HW_RECORD_ACCEL
620 *
621 * Enable hooking functions in SSL module for hardware acceleration of
622 * individual records.
623 *
624 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000625 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200626//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000627
628/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100629 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
630 *
631 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200632 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100633 *
634 * Comment this macro to disable support for SSLv2 Client Hello messages.
635 */
636#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
637
638/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100639 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
640 *
641 * Pick the ciphersuite according to the client's preferences rather than ours
642 * in the SSL Server module (POLARSSL_SSL_SRV_C).
643 *
644 * Uncomment this macro to respect client's ciphersuite order
645 */
646//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
647
648/**
Paul Bakker05decb22013-08-15 13:33:48 +0200649 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
650 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200651 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200652 *
653 * Comment this macro to disable support for the max_fragment_length extension
654 */
655#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
656
657/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200658 * \def POLARSSL_SSL_PROTO_SSL3
659 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200660 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200661 *
662 * Requires: POLARSSL_MD5_C
663 * POLARSSL_SHA1_C
664 *
665 * Comment this macro to disable support for SSL 3.0
666 */
667#define POLARSSL_SSL_PROTO_SSL3
668
669/**
670 * \def POLARSSL_SSL_PROTO_TLS1
671 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200672 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200673 *
674 * Requires: POLARSSL_MD5_C
675 * POLARSSL_SHA1_C
676 *
677 * Comment this macro to disable support for TLS 1.0
678 */
679#define POLARSSL_SSL_PROTO_TLS1
680
681/**
682 * \def POLARSSL_SSL_PROTO_TLS1_1
683 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200684 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200685 *
686 * Requires: POLARSSL_MD5_C
687 * POLARSSL_SHA1_C
688 *
689 * Comment this macro to disable support for TLS 1.1
690 */
691#define POLARSSL_SSL_PROTO_TLS1_1
692
693/**
694 * \def POLARSSL_SSL_PROTO_TLS1_2
695 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200696 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200697 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100698 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200699 * (Depends on ciphersuites)
700 *
701 * Comment this macro to disable support for TLS 1.2
702 */
703#define POLARSSL_SSL_PROTO_TLS1_2
704
705/**
Paul Bakkera503a632013-08-14 13:48:06 +0200706 * \def POLARSSL_SSL_SESSION_TICKETS
707 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200708 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200709 *
710 * Requires: POLARSSL_AES_C
711 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200712 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200713 *
714 * Comment this macro to disable support for SSL session tickets
715 */
716#define POLARSSL_SSL_SESSION_TICKETS
717
718/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200719 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
720 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200721 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200722 *
723 * Comment this macro to disable support for server name indication in SSL
724 */
725#define POLARSSL_SSL_SERVER_NAME_INDICATION
726
727/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200728 * \def POLARSSL_SSL_TRUNCATED_HMAC
729 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200730 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200731 *
732 * Comment this macro to disable support for truncated HMAC in SSL
733 */
734#define POLARSSL_SSL_TRUNCATED_HMAC
735
736/**
Paul Bakker2466d932013-09-28 14:40:38 +0200737 * \def POLARSSL_THREADING_ALT
738 *
739 * Provide your own alternate threading implementation.
740 *
741 * Requires: POLARSSL_THREADING_C
742 *
743 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200744 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200745//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200746
747/**
748 * \def POLARSSL_THREADING_DUMMY
749 *
750 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200751 * Warning: If you use this, all claims of thread-safety in the documentation
752 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200753 *
754 * Requires: POLARSSL_THREADING_C
755 *
756 * Uncomment this to enable code to compile like with threading enabled
Paul Bakker2466d932013-09-28 14:40:38 +0200757 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200758//#define POLARSSL_THREADING_DUMMY
Paul Bakker2466d932013-09-28 14:40:38 +0200759
760/**
761 * \def POLARSSL_THREADING_PTHREAD
762 *
763 * Enable the pthread wrapper layer for the threading layer.
764 *
765 * Requires: POLARSSL_THREADING_C
766 *
767 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200768 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200769//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200770
771/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200772 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
773 *
774 * If set, the X509 parser will not break-off when parsing an X509 certificate
775 * and encountering an extension in a v1 or v2 certificate.
776 *
777 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200778 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200779//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200780
781/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000782 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
783 *
784 * If set, the X509 parser will not break-off when parsing an X509 certificate
785 * and encountering an unknown critical extension.
786 *
787 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000788 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200789//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000790
791/**
792 * \def POLARSSL_ZLIB_SUPPORT
793 *
794 * If set, the SSL/TLS module uses ZLIB to support compression and
795 * decompression of packet data.
796 *
797 * Used in: library/ssl_tls.c
798 * library/ssl_cli.c
799 * library/ssl_srv.c
800 *
801 * This feature requires zlib library and headers to be present.
802 *
803 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000804 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200805//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200806/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000807
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000808/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000809 * \name SECTION: PolarSSL modules
810 *
811 * This section enables or disables entire modules in PolarSSL
812 * \{
813 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000814
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000815/**
816 * \def POLARSSL_AES_C
817 *
818 * Enable the AES block cipher.
819 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000820 * Module: library/aes.c
821 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000822 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000823 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000824 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000825 * This module enables the following ciphersuites (if other requisites are
826 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200827 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
828 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
829 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
830 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
831 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000832 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200833 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100834 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200835 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
836 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
837 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
838 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
839 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
840 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
841 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
842 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
843 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
844 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
845 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
846 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
847 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
848 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
849 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
850 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
851 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
852 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
853 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
854 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
855 * TLS_RSA_WITH_AES_256_GCM_SHA384
856 * TLS_RSA_WITH_AES_256_CBC_SHA256
857 * TLS_RSA_WITH_AES_256_CBC_SHA
858 * TLS_RSA_WITH_AES_128_GCM_SHA256
859 * TLS_RSA_WITH_AES_128_CBC_SHA256
860 * TLS_RSA_WITH_AES_128_CBC_SHA
861 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
862 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
863 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
864 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
865 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
866 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
867 * TLS_PSK_WITH_AES_256_GCM_SHA384
868 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200869 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200870 * TLS_PSK_WITH_AES_128_GCM_SHA256
871 * TLS_PSK_WITH_AES_128_CBC_SHA256
872 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100873 *
Paul Bakkercff68422013-09-15 20:43:33 +0200874 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000875 */
Paul Bakker40e46942009-01-03 21:51:57 +0000876#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000877
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000878/**
879 * \def POLARSSL_ARC4_C
880 *
881 * Enable the ARCFOUR stream cipher.
882 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000883 * Module: library/arc4.c
884 * Caller: library/ssl_tls.c
885 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100886 * This module enables the following ciphersuites (if other requisites are
887 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200888 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100889 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200890 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
891 * TLS_DHE_PSK_WITH_RC4_128_SHA
892 * TLS_RSA_WITH_RC4_128_SHA
893 * TLS_RSA_WITH_RC4_128_MD5
894 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200895 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000896 */
Paul Bakker40e46942009-01-03 21:51:57 +0000897#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000898
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000899/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000900 * \def POLARSSL_ASN1_PARSE_C
901 *
902 * Enable the generic ASN1 parser.
903 *
904 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200905 * Caller: library/x509.c
906 * library/dhm.c
907 * library/pkcs12.c
908 * library/pkcs5.c
909 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000910 */
911#define POLARSSL_ASN1_PARSE_C
912
913/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000914 * \def POLARSSL_ASN1_WRITE_C
915 *
916 * Enable the generic ASN1 writer.
917 *
918 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200919 * Caller: library/ecdsa.c
920 * library/pkwrite.c
921 * library/x509_create.c
922 * library/x509write_crt.c
923 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000924 */
925#define POLARSSL_ASN1_WRITE_C
926
927/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000928 * \def POLARSSL_BASE64_C
929 *
930 * Enable the Base64 module.
931 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000932 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000933 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000934 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000935 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000936 */
Paul Bakker40e46942009-01-03 21:51:57 +0000937#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000938
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000939/**
940 * \def POLARSSL_BIGNUM_C
941 *
Paul Bakker9a736322012-11-14 12:39:52 +0000942 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000943 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000944 * Module: library/bignum.c
945 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200946 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000947 * library/rsa.c
948 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000949 *
950 * This module is required for RSA and DHM support.
951 */
Paul Bakker40e46942009-01-03 21:51:57 +0000952#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000953
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000954/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000955 * \def POLARSSL_BLOWFISH_C
956 *
957 * Enable the Blowfish block cipher.
958 *
959 * Module: library/blowfish.c
960 */
961#define POLARSSL_BLOWFISH_C
962
963/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000964 * \def POLARSSL_CAMELLIA_C
965 *
966 * Enable the Camellia block cipher.
967 *
Paul Bakker38119b12009-01-10 23:31:23 +0000968 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000969 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000970 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000971 * This module enables the following ciphersuites (if other requisites are
972 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200973 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
974 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
975 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
976 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
977 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000978 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200979 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
980 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
981 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
982 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
983 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
984 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
985 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
986 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
987 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
988 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
989 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
990 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
991 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
992 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
993 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
994 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
995 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
996 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
997 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
998 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
999 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1000 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1001 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1002 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1003 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1004 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1005 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1006 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001007 */
1008#define POLARSSL_CAMELLIA_C
1009
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001010/**
1011 * \def POLARSSL_CERTS_C
1012 *
1013 * Enable the test certificates.
1014 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001015 * Module: library/certs.c
1016 * Caller:
1017 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001018 * Requires: POLARSSL_PEM_PARSE_C
1019 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001020 * This module is used for testing (ssl_client/server).
1021 */
Paul Bakker40e46942009-01-03 21:51:57 +00001022#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001023
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001024/**
1025 * \def POLARSSL_CIPHER_C
1026 *
1027 * Enable the generic cipher layer.
1028 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001029 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001030 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001031 *
1032 * Uncomment to enable generic cipher wrappers.
1033 */
1034#define POLARSSL_CIPHER_C
1035
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001036/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001037 * \def POLARSSL_CTR_DRBG_C
1038 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001039 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001040 *
1041 * Module: library/ctr_drbg.c
1042 * Caller:
1043 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001044 * Requires: POLARSSL_AES_C
1045 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001046 * This module provides the CTR_DRBG AES-256 random number generator.
1047 */
1048#define POLARSSL_CTR_DRBG_C
1049
1050/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001051 * \def POLARSSL_DEBUG_C
1052 *
1053 * Enable the debug functions.
1054 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001055 * Module: library/debug.c
1056 * Caller: library/ssl_cli.c
1057 * library/ssl_srv.c
1058 * library/ssl_tls.c
1059 *
1060 * This module provides debugging functions.
1061 */
Paul Bakker40e46942009-01-03 21:51:57 +00001062#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001063
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001064/**
1065 * \def POLARSSL_DES_C
1066 *
1067 * Enable the DES block cipher.
1068 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001069 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001070 * Caller: library/pem.c
1071 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001072 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001073 * This module enables the following ciphersuites (if other requisites are
1074 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001075 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001076 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001077 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1078 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1079 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1080 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1081 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001082 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001083 *
Paul Bakkercff68422013-09-15 20:43:33 +02001084 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001085 */
Paul Bakker40e46942009-01-03 21:51:57 +00001086#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001087
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001088/**
1089 * \def POLARSSL_DHM_C
1090 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001091 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001092 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001093 * Module: library/dhm.c
1094 * 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 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001099 */
Paul Bakker40e46942009-01-03 21:51:57 +00001100#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001101
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001102/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001103 * \def POLARSSL_ECDH_C
1104 *
1105 * Enable the elliptic curve Diffie-Hellman library.
1106 *
1107 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001108 * Caller: library/ssl_cli.c
1109 * library/ssl_srv.c
1110 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001111 * This module is used by the following key exchanges:
1112 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001113 *
1114 * Requires: POLARSSL_ECP_C
1115 */
1116#define POLARSSL_ECDH_C
1117
1118/**
1119 * \def POLARSSL_ECDSA_C
1120 *
1121 * Enable the elliptic curve DSA library.
1122 *
1123 * Module: library/ecdsa.c
1124 * Caller:
1125 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001126 * This module is used by the following key exchanges:
1127 * ECDHE-ECDSA
1128 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001129 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001130 */
1131#define POLARSSL_ECDSA_C
1132
1133/**
1134 * \def POLARSSL_ECP_C
1135 *
1136 * Enable the elliptic curve over GF(p) library.
1137 *
1138 * Module: library/ecp.c
1139 * Caller: library/ecdh.c
1140 * library/ecdsa.c
1141 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001142 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001143 */
1144#define POLARSSL_ECP_C
1145
1146/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001147 * \def POLARSSL_ENTROPY_C
1148 *
1149 * Enable the platform-specific entropy code.
1150 *
1151 * Module: library/entropy.c
1152 * Caller:
1153 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001154 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001155 *
1156 * This module provides a generic entropy pool
1157 */
1158#define POLARSSL_ENTROPY_C
1159
1160/**
Paul Bakker9d781402011-05-09 16:17:09 +00001161 * \def POLARSSL_ERROR_C
1162 *
1163 * Enable error code to error string conversion.
1164 *
1165 * Module: library/error.c
1166 * Caller:
1167 *
1168 * This module enables err_strerror().
1169 */
1170#define POLARSSL_ERROR_C
1171
1172/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001173 * \def POLARSSL_GCM_C
1174 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001175 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001176 *
1177 * Module: library/gcm.c
1178 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001179 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001180 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001181 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1182 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001183 */
1184#define POLARSSL_GCM_C
1185
1186/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001187 * \def POLARSSL_HAVEGE_C
1188 *
1189 * Enable the HAVEGE random generator.
1190 *
Paul Bakker2a844242013-06-24 13:01:53 +02001191 * Warning: the HAVEGE random generator is not suitable for virtualized
1192 * environments
1193 *
1194 * Warning: the HAVEGE random generator is dependent on timing and specific
1195 * processor traits. It is therefore not advised to use HAVEGE as
1196 * your applications primary random generator or primary entropy pool
1197 * input. As a secondary input to your entropy pool, it IS able add
1198 * the (limited) extra entropy it provides.
1199 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001200 * Module: library/havege.c
1201 * Caller:
1202 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001203 * Requires: POLARSSL_TIMING_C
1204 *
Paul Bakker2a844242013-06-24 13:01:53 +02001205 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001206 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001207//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001208
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001209/**
1210 * \def POLARSSL_MD_C
1211 *
1212 * Enable the generic message digest layer.
1213 *
Paul Bakker17373852011-01-06 14:20:01 +00001214 * Module: library/md.c
1215 * Caller:
1216 *
1217 * Uncomment to enable generic message digest wrappers.
1218 */
1219#define POLARSSL_MD_C
1220
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001221/**
1222 * \def POLARSSL_MD2_C
1223 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001224 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001225 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001226 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001227 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001228 *
1229 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001230 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001231//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001232
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001233/**
1234 * \def POLARSSL_MD4_C
1235 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001236 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001237 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001238 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001239 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001240 *
1241 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001242 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001243//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001244
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001245/**
1246 * \def POLARSSL_MD5_C
1247 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001248 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001249 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001250 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001251 * Caller: library/md.c
1252 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001253 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001254 *
1255 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001256 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001257 */
Paul Bakker40e46942009-01-03 21:51:57 +00001258#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001259
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001260/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001261 * \def POLARSSL_MEMORY_C
1262 *
1263 * Enable the memory allocation layer.
1264 * By default PolarSSL uses the system-provided malloc() and free().
1265 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1266 * are defined and unmodified)
1267 *
1268 * This allows different allocators (self-implemented or provided)
1269 *
1270 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001271 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001272//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001273
1274/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001275 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1276 *
1277 * Enable the buffer allocator implementation that makes use of a (stack)
1278 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1279 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001280 *
1281 * Module: library/memory_buffer_alloc.c
1282 *
1283 * Requires: POLARSSL_MEMORY_C
1284 *
1285 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001286 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001287//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001288
1289/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001290 * \def POLARSSL_NET_C
1291 *
1292 * Enable the TCP/IP networking routines.
1293 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001294 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001295 *
1296 * This module provides TCP/IP networking routines.
1297 */
Paul Bakker40e46942009-01-03 21:51:57 +00001298#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001299
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001300/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001301 * \def POLARSSL_OID_C
1302 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001303 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001304 *
1305 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001306 * Caller: library/asn1write.c
1307 * library/pkcs5.c
1308 * library/pkparse.c
1309 * library/pkwrite.c
1310 * library/rsa.c
1311 * library/x509.c
1312 * library/x509_create.c
1313 * library/x509_crl.c
1314 * library/x509_crt.c
1315 * library/x509_csr.c
1316 * library/x509write_crt.c
1317 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001318 *
1319 * This modules translates between OIDs and internal values.
1320 */
1321#define POLARSSL_OID_C
1322
1323/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001324 * \def POLARSSL_PADLOCK_C
1325 *
1326 * Enable VIA Padlock support on x86.
1327 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001328 * Module: library/padlock.c
1329 * Caller: library/aes.c
1330 *
1331 * This modules adds support for the VIA PadLock on x86.
1332 */
Paul Bakker40e46942009-01-03 21:51:57 +00001333#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001334
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001335/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001336 * \def POLARSSL_PBKDF2_C
1337 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001338 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001339 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001340 *
1341 * Module: library/pbkdf2.c
1342 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001343 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001344 *
1345 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001346 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001347#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001348
1349/**
Paul Bakkercff68422013-09-15 20:43:33 +02001350 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001351 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001352 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001353 *
1354 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001355 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001356 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001357 * library/x509_crl.c
1358 * library/x509_crt.c
1359 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001360 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001361 * Requires: POLARSSL_BASE64_C
1362 *
Paul Bakkercff68422013-09-15 20:43:33 +02001363 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001364 */
Paul Bakkercff68422013-09-15 20:43:33 +02001365#define POLARSSL_PEM_PARSE_C
1366
1367/**
1368 * \def POLARSSL_PEM_WRITE_C
1369 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001370 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001371 *
1372 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001373 * Caller: library/pkwrite.c
1374 * library/x509write_crt.c
1375 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001376 *
1377 * Requires: POLARSSL_BASE64_C
1378 *
1379 * This modules adds support for encoding / writing PEM files.
1380 */
1381#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001382
1383/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001384 * \def POLARSSL_PK_C
1385 *
1386 * Enable the generic public (asymetric) key layer.
1387 *
1388 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001389 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001390 * library/ssl_cli.c
1391 * library/ssl_srv.c
1392 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001393 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1394 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001395 * Uncomment to enable generic public key wrappers.
1396 */
1397#define POLARSSL_PK_C
1398
1399/**
Paul Bakker4606c732013-09-15 17:04:23 +02001400 * \def POLARSSL_PK_PARSE_C
1401 *
1402 * Enable the generic public (asymetric) key parser.
1403 *
1404 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001405 * Caller: library/x509_crt.c
1406 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001407 *
1408 * Requires: POLARSSL_PK_C
1409 *
1410 * Uncomment to enable generic public key parse functions.
1411 */
1412#define POLARSSL_PK_PARSE_C
1413
1414/**
1415 * \def POLARSSL_PK_WRITE_C
1416 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001417 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001418 *
1419 * Module: library/pkwrite.c
1420 * Caller: library/x509write.c
1421 *
1422 * Requires: POLARSSL_PK_C
1423 *
1424 * Uncomment to enable generic public key write functions.
1425 */
1426#define POLARSSL_PK_WRITE_C
1427
1428/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001429 * \def POLARSSL_PKCS5_C
1430 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001431 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001432 *
1433 * Module: library/pkcs5.c
1434 *
1435 * Requires: POLARSSL_MD_C
1436 *
1437 * This module adds support for the PKCS#5 functions.
1438 */
1439#define POLARSSL_PKCS5_C
1440
1441/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001442 * \def POLARSSL_PKCS11_C
1443 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001444 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001445 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001446 * Module: library/pkcs11.c
1447 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001448 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001449 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001450 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001451 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001452 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001453 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001454//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001455
1456/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001457 * \def POLARSSL_PKCS12_C
1458 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001459 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001460 * Adds algorithms for parsing PKCS#8 encrypted private keys
1461 *
1462 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001463 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001464 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001465 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1466 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001467 *
1468 * This module enables PKCS#12 functions.
1469 */
1470#define POLARSSL_PKCS12_C
1471
1472/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001473 * \def POLARSSL_RSA_C
1474 *
1475 * Enable the RSA public-key cryptosystem.
1476 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001477 * Module: library/rsa.c
1478 * Caller: library/ssl_cli.c
1479 * library/ssl_srv.c
1480 * library/ssl_tls.c
1481 * library/x509.c
1482 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001483 * This module is used by the following key exchanges:
1484 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001485 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001486 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001487 */
Paul Bakker40e46942009-01-03 21:51:57 +00001488#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001489
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001490/**
1491 * \def POLARSSL_SHA1_C
1492 *
1493 * Enable the SHA1 cryptographic hash algorithm.
1494 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001495 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001496 * Caller: library/md.c
1497 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001498 * library/ssl_srv.c
1499 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001500 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001501 *
1502 * This module is required for SSL/TLS and SHA1-signed certificates.
1503 */
Paul Bakker40e46942009-01-03 21:51:57 +00001504#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001505
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001506/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001507 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001508 *
1509 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001510 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001511 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001512 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001513 * Caller: library/entropy.c
1514 * library/md.c
1515 * library/ssl_cli.c
1516 * library/ssl_srv.c
1517 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001518 *
1519 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001520 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001521 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001522#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001523
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001524/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001525 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001526 *
1527 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001528 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001529 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001530 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001531 * Caller: library/entropy.c
1532 * library/md.c
1533 * library/ssl_cli.c
1534 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001535 *
1536 * This module adds support for SHA-384 and SHA-512.
1537 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001538#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001539
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001540/**
Paul Bakker0a597072012-09-25 21:55:46 +00001541 * \def POLARSSL_SSL_CACHE_C
1542 *
1543 * Enable simple SSL cache implementation.
1544 *
1545 * Module: library/ssl_cache.c
1546 * Caller:
1547 *
1548 * Requires: POLARSSL_SSL_CACHE_C
1549 */
1550#define POLARSSL_SSL_CACHE_C
1551
1552/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001553 * \def POLARSSL_SSL_CLI_C
1554 *
1555 * Enable the SSL/TLS client code.
1556 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001557 * Module: library/ssl_cli.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 client support.
1563 */
Paul Bakker40e46942009-01-03 21:51:57 +00001564#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001565
Paul Bakker9a736322012-11-14 12:39:52 +00001566/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001567 * \def POLARSSL_SSL_SRV_C
1568 *
1569 * Enable the SSL/TLS server code.
1570 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001571 * Module: library/ssl_srv.c
1572 * Caller:
1573 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001574 * Requires: POLARSSL_SSL_TLS_C
1575 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001576 * This module is required for SSL/TLS server support.
1577 */
Paul Bakker40e46942009-01-03 21:51:57 +00001578#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001579
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001580/**
1581 * \def POLARSSL_SSL_TLS_C
1582 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001583 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001584 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001585 * Module: library/ssl_tls.c
1586 * Caller: library/ssl_cli.c
1587 * library/ssl_srv.c
1588 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001589 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001590 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001591 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001592 * This module is required for SSL/TLS.
1593 */
Paul Bakker40e46942009-01-03 21:51:57 +00001594#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001595
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001596/**
Paul Bakker2466d932013-09-28 14:40:38 +02001597 * \def POLARSSL_THREADING_C
1598 *
1599 * Enable the threading abstraction layer.
1600 * By default PolarSSL assumes it is used in a non-threaded environment or that
1601 * contexts are not shared between threads. If you do intend to use contexts
1602 * between threads, you will need to enable this layer to prevent race
1603 * conditions.
1604 *
1605 * Module: library/threading.c
1606 *
1607 * This allows different threading implementations (self-implemented or
1608 * provided).
1609 *
1610 * You will have to enable either POLARSSL_THREADING_ALT,
1611 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1612 *
1613 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001614 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001615//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001616
1617/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001618 * \def POLARSSL_TIMING_C
1619 *
1620 * Enable the portable timing interface.
1621 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001622 * Module: library/timing.c
1623 * Caller: library/havege.c
1624 *
1625 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001626 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001627#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001628
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001629/**
1630 * \def POLARSSL_VERSION_C
1631 *
1632 * Enable run-time version information.
1633 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001634 * Module: library/version.c
1635 *
1636 * This module provides run-time version information.
1637 */
1638#define POLARSSL_VERSION_C
1639
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001640/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001641 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001642 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001643 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001644 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001645 * Module: library/x509.c
1646 * Caller: library/x509_crl.c
1647 * library/x509_crt.c
1648 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001649 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001650 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001651 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001652 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001653 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001654 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001655#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001656
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001657/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001658 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001659 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001660 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001661 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001662 * Module: library/x509_crt.c
1663 * Caller: library/ssl_cli.c
1664 * library/ssl_srv.c
1665 * library/ssl_tls.c
1666 *
1667 * Requires: POLARSSL_X509_USE_C
1668 *
1669 * This module is required for X.509 certificate parsing.
1670 */
1671#define POLARSSL_X509_CRT_PARSE_C
1672
1673/**
1674 * \def POLARSSL_X509_CRL_PARSE_C
1675 *
1676 * Enable X.509 CRL parsing.
1677 *
1678 * Module: library/x509_crl.c
1679 * Caller: library/x509_crt.c
1680 *
1681 * Requires: POLARSSL_X509_USE_C
1682 *
1683 * This module is required for X.509 CRL parsing.
1684 */
1685#define POLARSSL_X509_CRL_PARSE_C
1686
1687/**
1688 * \def POLARSSL_X509_CSR_PARSE_C
1689 *
1690 * Enable X.509 Certificate Signing Request (CSR) parsing.
1691 *
1692 * Module: library/x509_csr.c
1693 * Caller: library/x509_crt_write.c
1694 *
1695 * Requires: POLARSSL_X509_USE_C
1696 *
1697 * This module is used for reading X.509 certificate request.
1698 */
1699#define POLARSSL_X509_CSR_PARSE_C
1700
1701/**
1702 * \def POLARSSL_X509_CREATE_C
1703 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001704 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001705 *
1706 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001707 *
Paul Bakker4606c732013-09-15 17:04:23 +02001708 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001709 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001710 * This module is the basis for creating X.509 certificates and CSRs.
1711 */
1712#define POLARSSL_X509_CREATE_C
1713
1714/**
1715 * \def POLARSSL_X509_CRT_WRITE_C
1716 *
1717 * Enable creating X.509 certificates.
1718 *
1719 * Module: library/x509_crt_write.c
1720 *
1721 * Requires: POLARSSL_CREATE_C
1722 *
1723 * This module is required for X.509 certificate creation.
1724 */
1725#define POLARSSL_X509_CRT_WRITE_C
1726
1727/**
1728 * \def POLARSSL_X509_CSR_WRITE_C
1729 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001730 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001731 *
1732 * Module: library/x509_csr_write.c
1733 *
1734 * Requires: POLARSSL_CREATE_C
1735 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001736 * This module is required for X.509 certificate request writing.
1737 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001738#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001739
1740/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001741 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001742 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001743 * Enable the XTEA block cipher.
1744 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001745 * Module: library/xtea.c
1746 * Caller:
1747 */
1748#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001749
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001750/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001751
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001752/**
1753 * \name SECTION: Module configuration options
1754 *
1755 * This section allows for the setting of module specific sizes and
1756 * configuration options. The default values are already present in the
1757 * relevant header files and should suffice for the regular use cases.
1758 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1759 * only if you have a good reason and know the consequences.
1760 *
1761 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1762 * header file take precedence.
1763 *
1764 * Please check the respective header file for documentation on these
1765 * parameters (to prevent duplicate documentation).
1766 *
1767 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1768 * \{
1769 */
1770//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1771
1772#if defined(POLARSSL_CONFIG_OPTIONS)
1773
1774// MPI / BIGNUM options
1775//
1776#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1777#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1778
1779// CTR_DRBG options
1780//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001781#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 +02001782#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1783#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1784#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1785#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1786
1787// Entropy options
1788//
1789#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1790#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1791
Paul Bakker6e339b52013-07-03 13:37:05 +02001792// Memory options
1793#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1794#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1795#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1796
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001797// SSL Cache options
1798//
1799#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1800#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1801
1802// SSL options
1803//
1804#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001805#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001806
1807#endif /* POLARSSL_CONFIG_OPTIONS */
1808
1809/* \} name */
1810
Paul Bakker7ad00f92013-04-18 23:05:25 +02001811/*
1812 * Sanity checks on defines and dependencies
1813 */
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001814#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1815#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001816#endif
1817
1818#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1819#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1820#endif
1821
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001822#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1823#error "POLARSSL_DHM_C defined, but not all prerequisites"
1824#endif
1825
Paul Bakker7ad00f92013-04-18 23:05:25 +02001826#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1827#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1828#endif
1829
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001830#if defined(POLARSSL_ECDSA_C) && \
1831 ( !defined(POLARSSL_ECP_C) || \
1832 !defined(POLARSSL_ASN1_PARSE_C) || \
1833 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001834#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1835#endif
1836
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001837#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1838 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1839 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1840 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1841 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1842 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1843 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1844 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1845 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001846#error "POLARSSL_ECP_C defined, but not all prerequisites"
1847#endif
1848
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001849#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1850 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001851#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1852#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001853#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1854 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1855#error "CTR_DRBG_ENTROPY_LEN value too high"
1856#endif
1857#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1858 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1859#error "CTR_DRBG_ENTROPY_LEN value too high"
1860#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001861
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001862#if defined(POLARSSL_GCM_C) && ( \
1863 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001864#error "POLARSSL_GCM_C defined, but not all prerequisites"
1865#endif
1866
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001867#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1868#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1869#endif
1870
Paul Bakkere07f41d2013-04-19 09:08:57 +02001871#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1872#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1873#endif
1874
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001875#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1876 !defined(POLARSSL_ECDH_C)
1877#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1878#endif
1879
Paul Bakkere07f41d2013-04-19 09:08:57 +02001880#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1881 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001882 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001883#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1884#endif
1885
1886#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1887 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001888 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001889#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1890#endif
1891
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001892#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1893 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001894 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001895#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1896#endif
1897
Paul Bakkere07f41d2013-04-19 09:08:57 +02001898#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001899 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001900 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001901#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1902#endif
1903
1904#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001905 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001906 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001907#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1908#endif
1909
Paul Bakker6e339b52013-07-03 13:37:05 +02001910#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1911#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1912#endif
1913
Paul Bakker7ad00f92013-04-18 23:05:25 +02001914#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1915#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1916#endif
1917
Paul Bakkercff68422013-09-15 20:43:33 +02001918#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1919#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1920#endif
1921
1922#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1923#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001924#endif
1925
Paul Bakker4606c732013-09-15 17:04:23 +02001926#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1927#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1928#endif
1929
1930#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1931#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1932#endif
1933
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001934#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001935#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1936#endif
1937
1938#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1939 !defined(POLARSSL_OID_C) )
1940#error "POLARSSL_RSA_C defined, but not all prerequisites"
1941#endif
1942
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01001943#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
1944 !defined(POLARSSL_SHA1_C) )
1945#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
1946#endif
1947
1948#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
1949 !defined(POLARSSL_SHA1_C) )
1950#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
1951#endif
1952
1953#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
1954 !defined(POLARSSL_SHA1_C) )
1955#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
1956#endif
1957
1958#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
1959 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
1960#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
1961#endif
1962
Paul Bakker7ad00f92013-04-18 23:05:25 +02001963#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1964#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1965#endif
1966
Paul Bakker577e0062013-08-28 11:57:20 +02001967#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001968 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001969#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1970#endif
1971
1972#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1973#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1974#endif
1975
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001976#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1977 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1978 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1979#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1980#endif
1981
1982#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1983 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1984#error "Illegal protocol selection"
1985#endif
1986
1987#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1988 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1989#error "Illegal protocol selection"
1990#endif
1991
1992#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1993 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1994 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1995#error "Illegal protocol selection"
1996#endif
1997
Paul Bakker59da0a42013-08-19 13:27:17 +02001998#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001999 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2000 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002001#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2002#endif
2003
Paul Bakker2466d932013-09-28 14:40:38 +02002004#if defined(POLARSSL_THREADING_DUMMY)
2005#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2006#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
2007#endif
2008#define POLARSSL_THREADING_IMPL
2009#endif
2010
2011#if defined(POLARSSL_THREADING_PTHREAD)
2012#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2013#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2014#endif
2015#define POLARSSL_THREADING_IMPL
2016#endif
2017
2018#if defined(POLARSSL_THREADING_ALT)
2019#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2020#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2021#endif
2022#define POLARSSL_THREADING_IMPL
2023#endif
2024
2025#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2026#error "POLARSSL_THREADING_C defined, single threading implementation required"
2027#endif
2028#undef POLARSSL_THREADING_IMPL
2029
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002030#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002031 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002032 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002033#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002034#endif
2035
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002036#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2037 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2038 !defined(POLARSSL_PK_WRITE_C) )
2039#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2040#endif
2041
2042#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2043#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2044#endif
2045
2046#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2047#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2048#endif
2049
2050#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2051#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2052#endif
2053
2054#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2055#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2056#endif
2057
2058#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2059#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002060#endif
2061
Paul Bakker5121ce52009-01-03 21:22:43 +00002062#endif /* config.h */