blob: 8c92faf6463f7833507cc148fef52c396c62e77a [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 Bakker40e46942009-01-03 21:51:57 +000051#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000052 */
53
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 Bakker40e46942009-01-03 21:51:57 +000060#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000061 */
62
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 *
74 * The compiler has support for asm()
75 *
Paul Bakker5121ce52009-01-03 21:22:43 +000076 * Uncomment to enable the use of assembly code.
Paul Bakker68041ec2009-04-19 21:17:55 +000077 *
78 * Requires support for asm() in compiler.
79 *
80 * Used in:
81 * library/timing.c
82 * library/padlock.c
83 * include/polarssl/bn_mul.h
84 *
Paul Bakker5121ce52009-01-03 21:22:43 +000085 */
Paul Bakker40e46942009-01-03 21:51:57 +000086#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000087
Paul Bakkerf3b86c12011-01-27 15:24:17 +000088/**
89 * \def POLARSSL_HAVE_SSE2
90 *
Paul Bakkere23c3152012-10-01 14:42:47 +000091 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000092 *
Paul Bakker5121ce52009-01-03 21:22:43 +000093 * Uncomment if the CPU supports SSE2 (IA-32 specific).
94 *
Paul Bakker40e46942009-01-03 21:51:57 +000095#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000096 */
Paul Bakkerfa9b1002013-07-03 15:31:03 +020097
98/**
99 * \def POLARSSL_HAVE_TIME
100 *
101 * System has time.h and time() / localtime() / gettimeofday()
102 *
103 * Comment if your system does not support time functions
104 */
105#define POLARSSL_HAVE_TIME
Paul Bakker0a62cd12011-01-21 11:00:08 +0000106/* \} name */
107
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000108/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000109 * \name SECTION: PolarSSL feature support
110 *
111 * This section sets support for features that are or are not needed
112 * within the modules that are enabled.
113 * \{
114 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000115
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000116/**
Paul Bakker90995b52013-06-24 19:20:35 +0200117 * \def POLARSSL_XXX_ALT
118 *
119 * Uncomment a macro to let PolarSSL use your alternate core implementation of
120 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
121 * implementations). Keep in mind that the function prototypes should remain
122 * the same.
123 *
124 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
125 * provide the "struct aes_context" definition and omit the base function
126 * declarations and implementations. "aes_alt.h" will be included from
127 * "aes.h" to include the new function definitions.
128 *
129 * Uncomment a macro to enable alternate implementation for core algorithm
130 * functions
131#define POLARSSL_AES_ALT
132#define POLARSSL_ARC4_ALT
133#define POLARSSL_BLOWFISH_ALT
134#define POLARSSL_CAMELLIA_ALT
135#define POLARSSL_DES_ALT
136#define POLARSSL_XTEA_ALT
137#define POLARSSL_MD2_ALT
138#define POLARSSL_MD4_ALT
139#define POLARSSL_MD5_ALT
140#define POLARSSL_SHA1_ALT
Paul Bakker9e36f042013-06-30 14:34:05 +0200141#define POLARSSL_SHA256_ALT
142#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200143 */
144
145/**
Paul Bakker15566e42011-04-24 21:19:15 +0000146 * \def POLARSSL_AES_ROM_TABLES
147 *
148 * Store the AES tables in ROM.
149 *
150 * Uncomment this macro to store the AES tables in ROM.
151 *
152#define POLARSSL_AES_ROM_TABLES
153 */
154
155/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200156 * \def POLARSSL_CIPHER_MODE_CBC
157 *
158 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
159 */
160#define POLARSSL_CIPHER_MODE_CBC
161
162/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000163 * \def POLARSSL_CIPHER_MODE_CFB
164 *
165 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
166 */
167#define POLARSSL_CIPHER_MODE_CFB
168
169/**
170 * \def POLARSSL_CIPHER_MODE_CTR
171 *
172 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
173 */
174#define POLARSSL_CIPHER_MODE_CTR
175
176/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000177 * \def POLARSSL_CIPHER_NULL_CIPHER
178 *
179 * Enable NULL cipher.
180 * Warning: Only do so when you know what you are doing. This allows for
181 * encryption or channels without any security!
182 *
183 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
184 * the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000185 * TLS_RSA_WITH_NULL_MD5
186 * TLS_RSA_WITH_NULL_SHA
187 * TLS_RSA_WITH_NULL_SHA256
Paul Bakker41c83d32013-03-20 14:39:14 +0100188 * TLS_ECDHE_RSA_WITH_NULL_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200189 * TLS_PSK_WITH_NULL
190 * TLS_PSK_WITH_NULL256
191 * TLS_PSK_WITH_NULL384
192 * TLS_DHE_PSK_WITH_NULL
193 * TLS_DHE_PSK_WITH_NULL256
194 * TLS_DHE_PSK_WITH_NULL384
195 * TLS_RSA_PSK_WITH_NULL
196 * TLS_RSA_PSK_WITH_NULL256
197 * TLS_RSA_PSK_WITH_NULL384
Paul Bakkerfab5c822012-02-06 16:45:10 +0000198 *
199 * Uncomment this macro to enable the NULL cipher and ciphersuites
200#define POLARSSL_CIPHER_NULL_CIPHER
201 */
202
203/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200204 * \def POLARSSL_CIPHER_PADDING_XXX
205 *
206 * Uncomment or comment macros to add support for specific padding modes
207 * in the cipher layer with cipher modes that support padding (e.g. CBC)
208 *
209 * If you disable all padding modes, only full blocks can be used with CBC.
210 *
211 * Enable padding modes in the cipher layer.
212 */
213#define POLARSSL_CIPHER_PADDING_PKCS7
214#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
215#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
216#define POLARSSL_CIPHER_PADDING_ZEROS
217
218/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000219 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
220 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000221 * Enable weak ciphersuites in SSL / TLS
Paul Bakkerfab5c822012-02-06 16:45:10 +0000222 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000223 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000224 *
225 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000226 * TLS_RSA_WITH_DES_CBC_SHA
227 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000228 *
229 * Uncomment this macro to enable weak ciphersuites
230#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
231 */
232
233/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200234 * \def POLARSSL_ECP_XXXX_ENABLED
235 *
236 * Enables specific curves within the Elliptic Curve module.
237 * By default all supported curves are enables.
238 *
239 * Comment macros to disable the curve and functions for it
240 */
241#define POLARSSL_ECP_DP_SECP192R1_ENABLED
242#define POLARSSL_ECP_DP_SECP224R1_ENABLED
243#define POLARSSL_ECP_DP_SECP256R1_ENABLED
244#define POLARSSL_ECP_DP_SECP384R1_ENABLED
245#define POLARSSL_ECP_DP_SECP521R1_ENABLED
246
247/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200248 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
249 *
250 * Enable the PSK based ciphersuite modes in SSL / TLS
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200251 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200252 * This enables the following ciphersuites (if other requisites are
253 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200254 * TLS_PSK_WITH_RC4_128_SHA
255 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
256 * TLS_PSK_WITH_AES_128_CBC_SHA
257 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200258 * TLS_PSK_WITH_AES_128_CBC_SHA256
259 * TLS_PSK_WITH_AES_256_CBC_SHA384
260 * TLS_PSK_WITH_AES_128_GCM_SHA256
261 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200262 */
263#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
264
265/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200266 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
267 *
268 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS
269 *
270 * Requires: POLARSSL_DHM_C
271 *
272 * This enables the following ciphersuites (if other requisites are
273 * enabled as well):
274 * TLS_DHE_PSK_WITH_RC4_128_SHA
275 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
276 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
277 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200278 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
279 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
280 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
281 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200282 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200283#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200284
285/**
286 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
287 *
288 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS
Paul Bakker45bda902013-04-19 22:28:21 +0200289 * (NOT YET IMPLEMENTED)
Paul Bakker7c6b2c32013-09-16 13:49:26 +0200290 * Requires: POLARSSL_RSA_C, POLARSSL_X509_CRT_PARSE_C, POLARSSL_PKCS1_V15
Paul Bakkere07f41d2013-04-19 09:08:57 +0200291 *
292 * This enables the following ciphersuites (if other requisites are
293 * enabled as well):
294 * TLS_RSA_PSK_WITH_RC4_128_SHA
295 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
296 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
297 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200298 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
299 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
300 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
301 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200302#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
303 */
304
305/**
306 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
307 *
308 * Enable the RSA-only based ciphersuite modes in SSL / TLS
309 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +0200310 * Requires: POLARSSL_RSA_C, POLARSSL_X509_CRT_PARSE_C, POLARSSL_PKCS1_V15
Paul Bakkere07f41d2013-04-19 09:08:57 +0200311 *
312 * This enables the following ciphersuites (if other requisites are
313 * enabled as well):
314 * TLS_RSA_WITH_AES_128_CBC_SHA
315 * TLS_RSA_WITH_AES_256_CBC_SHA
316 * TLS_RSA_WITH_AES_128_CBC_SHA256
317 * TLS_RSA_WITH_AES_256_CBC_SHA256
318 * TLS_RSA_WITH_AES_128_GCM_SHA256
319 * TLS_RSA_WITH_AES_256_GCM_SHA384
320 * TLS_RSA_WITH_RC4_128_MD5
321 * TLS_RSA_WITH_RC4_128_SHA
322 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
323 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
324 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
325 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
326 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
327 */
328#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
329
330/**
331 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
332 *
333 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS
334 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +0200335 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_X509_CRT_PARSE_C,
Paul Bakker48377d92013-08-30 12:06:24 +0200336 * POLARSSL_PKCS1_V15
Paul Bakkere07f41d2013-04-19 09:08:57 +0200337 *
338 * This enables the following ciphersuites (if other requisites are
339 * enabled as well):
340 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
341 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
342 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
343 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
344 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
345 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
346 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
347 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
348 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
349 */
350#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
351
352/**
353 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
354 *
355 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS
356 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +0200357 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_X509_CRT_PARSE_C,
Paul Bakker48377d92013-08-30 12:06:24 +0200358 * POLARSSL_PKCS1_V15
Paul Bakkere07f41d2013-04-19 09:08:57 +0200359 *
360 * This enables the following ciphersuites (if other requisites are
361 * enabled as well):
362 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
363 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
364 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
365 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
366 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
367 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
368 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
369 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
370 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
371 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
372 */
373#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
374
375/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200376 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
377 *
378 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS
379 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +0200380 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200381 *
382 * This enables the following ciphersuites (if other requisites are
383 * enabled as well):
384 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
385 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
386 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
387 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
388 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
389 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
390 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
391 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
392 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
393 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
394 */
395#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
396
397/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200398 * \def POLARSSL_ERROR_STRERROR_BC
399 *
400 * Make available the backward compatible error_strerror() next to the
401 * current polarssl_strerror().
402 *
403 * Disable if you run into name conflicts and want to really remove the
404 * error_strerror()
405 */
406#define POLARSSL_ERROR_STRERROR_BC
407
408/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100409 * \def POLARSSL_ERROR_STRERROR_DUMMY
410 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200411 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100412 * third party libraries easier.
413 *
414 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200415 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100416 */
417#define POLARSSL_ERROR_STRERROR_DUMMY
418
419/**
Paul Bakker15566e42011-04-24 21:19:15 +0000420 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000421 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000422 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
423 *
Paul Bakker15566e42011-04-24 21:19:15 +0000424 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000425 */
Paul Bakker15566e42011-04-24 21:19:15 +0000426#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000427
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000428/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000429 * \def POLARSSL_FS_IO
430 *
431 * Enable functions that use the filesystem.
432 */
433#define POLARSSL_FS_IO
434
435/**
Paul Bakker43655f42011-12-15 20:11:16 +0000436 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
437 *
438 * Do not add default entropy sources. These are the platform specific,
439 * hardclock and HAVEGE based poll functions.
440 *
441 * This is useful to have more control over the added entropy sources in an
442 * application.
443 *
444 * Uncomment this macro to prevent loading of default entropy functions.
445#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
446 */
447
448/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000449 * \def POLARSSL_NO_PLATFORM_ENTROPY
450 *
451 * Do not use built-in platform entropy functions.
452 * This is useful if your platform does not support
453 * standards like the /dev/urandom or Windows CryptoAPI.
454 *
455 * Uncomment this macro to disable the built-in platform entropy functions.
456#define POLARSSL_NO_PLATFORM_ENTROPY
457 */
458
459/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200460 * \def POLARSSL_MEMORY_DEBUG
461 *
462 * Enable debugging of buffer allocator memory issues. Automatically prints
463 * (to stderr) all (fatal) messages on memory allocation issues. Enables
464 * function for 'debug output' of allocated memory.
465 *
466 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
467 * fprintf()
468 *
469 * Uncomment this macro to let the buffer allocator print out error messages.
470#define POLARSSL_MEMORY_DEBUG
471*/
472
473/**
474 * \def POLARSSL_MEMORY_BACKTRACE
475 *
476 * Include backtrace information with each allocated block.
477 *
478 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
479 * GLIBC-compatible backtrace() an backtrace_symbols() support
480 *
481 * Uncomment this macro to include backtrace information
482#define POLARSSL_MEMORY_BACKTRACE
483 */
484
485/**
Paul Bakker48377d92013-08-30 12:06:24 +0200486 * \def POLARSSL_PKCS1_V15
487 *
488 * Requires: POLARSSL_RSA_C
489 *
490 * Enable support for PKCS#1 v1.5 encoding.
491 * This enables support for PKCS#1 v1.5 operations.
492 */
493#define POLARSSL_PKCS1_V15
494
495/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000496 * \def POLARSSL_PKCS1_V21
497 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000498 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
499 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000500 * Enable support for PKCS#1 v2.1 encoding.
501 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
502 */
503#define POLARSSL_PKCS1_V21
504
505/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000506 * \def POLARSSL_RSA_NO_CRT
507 *
508 * Do not use the Chinese Remainder Theorem for the RSA private operation.
509 *
510 * Uncomment this macro to disable the use of CRT in RSA.
511 *
512#define POLARSSL_RSA_NO_CRT
513 */
Paul Bakker15566e42011-04-24 21:19:15 +0000514
515/**
516 * \def POLARSSL_SELF_TEST
517 *
518 * Enable the checkup functions (*_self_test).
519 */
520#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000521
522/**
Paul Bakker40865c82013-01-31 17:13:13 +0100523 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
524 *
525 * Enable sending of alert messages in case of encountered errors as per RFC.
526 * If you choose not to send the alert messages, PolarSSL can still communicate
527 * with other servers, only debugging of failures is harder.
528 *
529 * The advantage of not sending alert messages, is that no information is given
530 * about reasons for failures thus preventing adversaries of gaining intel.
531 *
532 * Enable sending of all alert messages
533 */
534#define POLARSSL_SSL_ALERT_MESSAGES
535
536/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100537 * \def POLARSSL_SSL_DEBUG_ALL
538 *
539 * Enable the debug messages in SSL module for all issues.
540 * Debug messages have been disabled in some places to prevent timing
541 * attacks due to (unbalanced) debugging function calls.
542 *
543 * If you need all error reporting you should enable this during debugging,
544 * but remove this for production servers that should log as well.
545 *
546 * Uncomment this macro to report all debug messages on errors introducing
547 * a timing side-channel.
548 *
549#define POLARSSL_SSL_DEBUG_ALL
550 */
551
552/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000553 * \def POLARSSL_SSL_HW_RECORD_ACCEL
554 *
555 * Enable hooking functions in SSL module for hardware acceleration of
556 * individual records.
557 *
558 * Uncomment this macro to enable hooking functions.
559#define POLARSSL_SSL_HW_RECORD_ACCEL
560 */
561
562/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100563 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
564 *
565 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
566 * SSL Server module (POLARSSL_SSL_SRV_C)
567 *
568 * Comment this macro to disable support for SSLv2 Client Hello messages.
569 */
570#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
571
572/**
Paul Bakker05decb22013-08-15 13:33:48 +0200573 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
574 *
575 * Enable support for RFC 6066 max_fragment_length extension in SSL
576 *
577 * Comment this macro to disable support for the max_fragment_length extension
578 */
579#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
580
581/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200582 * \def POLARSSL_SSL_PROTO_SSL3
583 *
584 * Enable support for SSL 3.0
585 *
586 * Requires: POLARSSL_MD5_C
587 * POLARSSL_SHA1_C
588 *
589 * Comment this macro to disable support for SSL 3.0
590 */
591#define POLARSSL_SSL_PROTO_SSL3
592
593/**
594 * \def POLARSSL_SSL_PROTO_TLS1
595 *
596 * Enable support for TLS 1.0
597 *
598 * Requires: POLARSSL_MD5_C
599 * POLARSSL_SHA1_C
600 *
601 * Comment this macro to disable support for TLS 1.0
602 */
603#define POLARSSL_SSL_PROTO_TLS1
604
605/**
606 * \def POLARSSL_SSL_PROTO_TLS1_1
607 *
608 * Enable support for TLS 1.1
609 *
610 * Requires: POLARSSL_MD5_C
611 * POLARSSL_SHA1_C
612 *
613 * Comment this macro to disable support for TLS 1.1
614 */
615#define POLARSSL_SSL_PROTO_TLS1_1
616
617/**
618 * \def POLARSSL_SSL_PROTO_TLS1_2
619 *
620 * Enable support for TLS 1.2
621 *
622 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
623 * (Depends on ciphersuites)
624 *
625 * Comment this macro to disable support for TLS 1.2
626 */
627#define POLARSSL_SSL_PROTO_TLS1_2
628
629/**
Paul Bakkera503a632013-08-14 13:48:06 +0200630 * \def POLARSSL_SSL_SESSION_TICKETS
631 *
632 * Enable support for RFC 5077 session tickets in SSL
633 *
634 * Requires: POLARSSL_AES_C
635 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200636 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200637 *
638 * Comment this macro to disable support for SSL session tickets
639 */
640#define POLARSSL_SSL_SESSION_TICKETS
641
642/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200643 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
644 *
645 * Enable support for RFC 6066 server name indication (SNI) in SSL
646 *
647 * Comment this macro to disable support for server name indication in SSL
648 */
649#define POLARSSL_SSL_SERVER_NAME_INDICATION
650
651/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200652 * \def POLARSSL_SSL_TRUNCATED_HMAC
653 *
654 * Enable support for RFC 6066 truncated HMAC in SSL
655 *
656 * Comment this macro to disable support for truncated HMAC in SSL
657 */
658#define POLARSSL_SSL_TRUNCATED_HMAC
659
660/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000661 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
662 *
663 * If set, the X509 parser will not break-off when parsing an X509 certificate
664 * and encountering an unknown critical extension.
665 *
666 * Uncomment to prevent an error.
667 *
668#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
669 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000670
671/**
672 * \def POLARSSL_ZLIB_SUPPORT
673 *
674 * If set, the SSL/TLS module uses ZLIB to support compression and
675 * decompression of packet data.
676 *
677 * Used in: library/ssl_tls.c
678 * library/ssl_cli.c
679 * library/ssl_srv.c
680 *
681 * This feature requires zlib library and headers to be present.
682 *
683 * Uncomment to enable use of ZLIB
684#define POLARSSL_ZLIB_SUPPORT
685 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000686/* \} name */
687
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000688/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000689 * \name SECTION: PolarSSL modules
690 *
691 * This section enables or disables entire modules in PolarSSL
692 * \{
693 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000694
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000695/**
696 * \def POLARSSL_AES_C
697 *
698 * Enable the AES block cipher.
699 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000700 * Module: library/aes.c
701 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000702 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000703 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000704 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000705 * This module enables the following ciphersuites (if other requisites are
706 * enabled as well):
707 * TLS_RSA_WITH_AES_128_CBC_SHA
708 * TLS_RSA_WITH_AES_256_CBC_SHA
709 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
710 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
711 * TLS_RSA_WITH_AES_128_CBC_SHA256
712 * TLS_RSA_WITH_AES_256_CBC_SHA256
713 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
714 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
715 * TLS_RSA_WITH_AES_128_GCM_SHA256
716 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100717 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
718 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200719 * TLS_PSK_WITH_AES_128_CBC_SHA
720 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100721 *
Paul Bakkercff68422013-09-15 20:43:33 +0200722 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000723 */
Paul Bakker40e46942009-01-03 21:51:57 +0000724#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000725
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000726/**
727 * \def POLARSSL_ARC4_C
728 *
729 * Enable the ARCFOUR stream cipher.
730 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000731 * Module: library/arc4.c
732 * Caller: library/ssl_tls.c
733 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100734 * This module enables the following ciphersuites (if other requisites are
735 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000736 * TLS_RSA_WITH_RC4_128_MD5
737 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100738 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200739 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000740 */
Paul Bakker40e46942009-01-03 21:51:57 +0000741#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000742
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000743/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000744 * \def POLARSSL_ASN1_PARSE_C
745 *
746 * Enable the generic ASN1 parser.
747 *
748 * Module: library/asn1.c
749 * Caller: library/x509parse.c
750 */
751#define POLARSSL_ASN1_PARSE_C
752
753/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000754 * \def POLARSSL_ASN1_WRITE_C
755 *
756 * Enable the generic ASN1 writer.
757 *
758 * Module: library/asn1write.c
759 */
760#define POLARSSL_ASN1_WRITE_C
761
762/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000763 * \def POLARSSL_BASE64_C
764 *
765 * Enable the Base64 module.
766 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000767 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000768 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000769 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000770 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000771 */
Paul Bakker40e46942009-01-03 21:51:57 +0000772#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000773
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000774/**
775 * \def POLARSSL_BIGNUM_C
776 *
Paul Bakker9a736322012-11-14 12:39:52 +0000777 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000778 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000779 * Module: library/bignum.c
780 * Caller: library/dhm.c
781 * library/rsa.c
782 * library/ssl_tls.c
783 * library/x509parse.c
784 *
785 * This module is required for RSA and DHM support.
786 */
Paul Bakker40e46942009-01-03 21:51:57 +0000787#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000788
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000789/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000790 * \def POLARSSL_BLOWFISH_C
791 *
792 * Enable the Blowfish block cipher.
793 *
794 * Module: library/blowfish.c
795 */
796#define POLARSSL_BLOWFISH_C
797
798/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000799 * \def POLARSSL_CAMELLIA_C
800 *
801 * Enable the Camellia block cipher.
802 *
Paul Bakker38119b12009-01-10 23:31:23 +0000803 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000804 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000805 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000806 * This module enables the following ciphersuites (if other requisites are
807 * enabled as well):
808 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
809 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
810 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
811 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
812 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
813 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
814 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
815 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000816 */
817#define POLARSSL_CAMELLIA_C
818
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000819/**
820 * \def POLARSSL_CERTS_C
821 *
822 * Enable the test certificates.
823 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000824 * Module: library/certs.c
825 * Caller:
826 *
827 * This module is used for testing (ssl_client/server).
828 */
Paul Bakker40e46942009-01-03 21:51:57 +0000829#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000830
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000831/**
832 * \def POLARSSL_CIPHER_C
833 *
834 * Enable the generic cipher layer.
835 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000836 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200837 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000838 *
839 * Uncomment to enable generic cipher wrappers.
840 */
841#define POLARSSL_CIPHER_C
842
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000843/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000844 * \def POLARSSL_CTR_DRBG_C
845 *
846 * Enable the CTR_DRBG AES-256-based random generator
847 *
848 * Module: library/ctr_drbg.c
849 * Caller:
850 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000851 * Requires: POLARSSL_AES_C
852 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000853 * This module provides the CTR_DRBG AES-256 random number generator.
854 */
855#define POLARSSL_CTR_DRBG_C
856
857/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000858 * \def POLARSSL_DEBUG_C
859 *
860 * Enable the debug functions.
861 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000862 * Module: library/debug.c
863 * Caller: library/ssl_cli.c
864 * library/ssl_srv.c
865 * library/ssl_tls.c
866 *
867 * This module provides debugging functions.
868 */
Paul Bakker40e46942009-01-03 21:51:57 +0000869#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000870
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000871/**
872 * \def POLARSSL_DES_C
873 *
874 * Enable the DES block cipher.
875 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000876 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100877 * Caller: library/pem.c
878 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000879 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000880 * This module enables the following ciphersuites (if other requisites are
881 * enabled as well):
882 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
883 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100884 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200885 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100886 *
Paul Bakkercff68422013-09-15 20:43:33 +0200887 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000888 */
Paul Bakker40e46942009-01-03 21:51:57 +0000889#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000890
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000891/**
892 * \def POLARSSL_DHM_C
893 *
894 * Enable the Diffie-Hellman-Merkle key exchange.
895 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000896 * Module: library/dhm.c
897 * Caller: library/ssl_cli.c
898 * library/ssl_srv.c
899 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000900 * This module enables the following ciphersuites (if other requisites are
901 * enabled as well):
902 * TLS_DHE_RSA_WITH_DES_CBC_SHA
903 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
904 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
905 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
906 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
907 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
908 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
909 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
910 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
911 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
912 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
913 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000914 */
Paul Bakker40e46942009-01-03 21:51:57 +0000915#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000916
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000917/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100918 * \def POLARSSL_ECDH_C
919 *
920 * Enable the elliptic curve Diffie-Hellman library.
921 *
922 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100923 * Caller: library/ssl_cli.c
924 * library/ssl_srv.c
925 *
926 * This module enables the following ciphersuites (if other requisites are
927 * enabled as well):
928 * TLS_ECDHE_RSA_WITH_NULL_SHA
929 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
930 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
931 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
932 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100933 *
934 * Requires: POLARSSL_ECP_C
935 */
936#define POLARSSL_ECDH_C
937
938/**
939 * \def POLARSSL_ECDSA_C
940 *
941 * Enable the elliptic curve DSA library.
942 *
943 * Module: library/ecdsa.c
944 * Caller:
945 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +0200946 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100947 */
948#define POLARSSL_ECDSA_C
949
950/**
951 * \def POLARSSL_ECP_C
952 *
953 * Enable the elliptic curve over GF(p) library.
954 *
955 * Module: library/ecp.c
956 * Caller: library/ecdh.c
957 * library/ecdsa.c
958 *
959 * Requires: POLARSSL_BIGNUM_C
960 */
961#define POLARSSL_ECP_C
962
963/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000964 * \def POLARSSL_ENTROPY_C
965 *
966 * Enable the platform-specific entropy code.
967 *
968 * Module: library/entropy.c
969 * Caller:
970 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200971 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000972 *
973 * This module provides a generic entropy pool
974 */
975#define POLARSSL_ENTROPY_C
976
977/**
Paul Bakker9d781402011-05-09 16:17:09 +0000978 * \def POLARSSL_ERROR_C
979 *
980 * Enable error code to error string conversion.
981 *
982 * Module: library/error.c
983 * Caller:
984 *
985 * This module enables err_strerror().
986 */
987#define POLARSSL_ERROR_C
988
989/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000990 * \def POLARSSL_GCM_C
991 *
992 * Enable the Galois/Counter Mode (GCM) for AES
993 *
994 * Module: library/gcm.c
995 *
996 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +0000997 *
998 * This module enables the following ciphersuites (if other requisites are
999 * enabled as well):
1000 * TLS_RSA_WITH_AES_128_GCM_SHA256
1001 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001002 */
1003#define POLARSSL_GCM_C
1004
1005/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001006 * \def POLARSSL_HAVEGE_C
1007 *
1008 * Enable the HAVEGE random generator.
1009 *
Paul Bakker2a844242013-06-24 13:01:53 +02001010 * Warning: the HAVEGE random generator is not suitable for virtualized
1011 * environments
1012 *
1013 * Warning: the HAVEGE random generator is dependent on timing and specific
1014 * processor traits. It is therefore not advised to use HAVEGE as
1015 * your applications primary random generator or primary entropy pool
1016 * input. As a secondary input to your entropy pool, it IS able add
1017 * the (limited) extra entropy it provides.
1018 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001019 * Module: library/havege.c
1020 * Caller:
1021 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001022 * Requires: POLARSSL_TIMING_C
1023 *
Paul Bakker2a844242013-06-24 13:01:53 +02001024 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001025#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001026 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001027
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001028/**
1029 * \def POLARSSL_MD_C
1030 *
1031 * Enable the generic message digest layer.
1032 *
Paul Bakker17373852011-01-06 14:20:01 +00001033 * Module: library/md.c
1034 * Caller:
1035 *
1036 * Uncomment to enable generic message digest wrappers.
1037 */
1038#define POLARSSL_MD_C
1039
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001040/**
1041 * \def POLARSSL_MD2_C
1042 *
1043 * Enable the MD2 hash algorithm
1044 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001045 * Module: library/md2.c
1046 * Caller: library/x509parse.c
1047 *
1048 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1049 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001050#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001051 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001052
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001053/**
1054 * \def POLARSSL_MD4_C
1055 *
1056 * Enable the MD4 hash algorithm
1057 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001058 * Module: library/md4.c
1059 * Caller: library/x509parse.c
1060 *
1061 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1062 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001063#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001064 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001065
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001066/**
1067 * \def POLARSSL_MD5_C
1068 *
1069 * Enable the MD5 hash algorithm
1070 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001071 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001072 * Caller: library/pem.c
1073 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001074 * library/x509parse.c
1075 *
1076 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001077 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001078 */
Paul Bakker40e46942009-01-03 21:51:57 +00001079#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001080
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001081/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001082 * \def POLARSSL_MEMORY_C
1083 *
1084 * Enable the memory allocation layer.
1085 * By default PolarSSL uses the system-provided malloc() and free().
1086 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1087 * are defined and unmodified)
1088 *
1089 * This allows different allocators (self-implemented or provided)
1090 *
1091 * Enable this layer to allow use of alternative memory allocators.
1092#define POLARSSL_MEMORY_C
1093 */
1094
1095/**
1096 * The buffer allocator implementation that makes use of a (stack) based
1097 * buffer to 'allocate' dynamic memory. (replaces malloc() and free() calls)
1098 *
1099 * Module: library/memory_buffer_alloc.c
1100 *
1101 * Requires: POLARSSL_MEMORY_C
1102 *
1103 * Enable this module to enable the buffer memory allocator.
1104#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1105 */
1106
1107/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001108 * \def POLARSSL_NET_C
1109 *
1110 * Enable the TCP/IP networking routines.
1111 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001112 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001113 *
1114 * This module provides TCP/IP networking routines.
1115 */
Paul Bakker40e46942009-01-03 21:51:57 +00001116#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001117
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001118/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001119 * \def POLARSSL_OID_C
1120 *
1121 * Enable the OID database
1122 *
1123 * Module: library/oid.c
1124 * Caller: library/rsa.c
1125 * library/x509parse.c
1126 * library/x509write.c
1127 *
1128 * This modules translates between OIDs and internal values.
1129 */
1130#define POLARSSL_OID_C
1131
1132/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001133 * \def POLARSSL_PADLOCK_C
1134 *
1135 * Enable VIA Padlock support on x86.
1136 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001137 * Module: library/padlock.c
1138 * Caller: library/aes.c
1139 *
1140 * This modules adds support for the VIA PadLock on x86.
1141 */
Paul Bakker40e46942009-01-03 21:51:57 +00001142#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001143
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001144/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001145 * \def POLARSSL_PBKDF2_C
1146 *
1147 * Enable PKCS#5 PBKDF2 key derivation function
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001148 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001149 *
1150 * Module: library/pbkdf2.c
1151 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001152 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001153 *
1154 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001155 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001156#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001157
1158/**
Paul Bakkercff68422013-09-15 20:43:33 +02001159 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001160 *
Paul Bakkercff68422013-09-15 20:43:33 +02001161 * Enable PEM decoding / parsing
Paul Bakker96743fc2011-02-12 14:30:57 +00001162 *
1163 * Module: library/pem.c
1164 * Caller: library/x509parse.c
Paul Bakkercff68422013-09-15 20:43:33 +02001165 * library/pkparse.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001166 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001167 * Requires: POLARSSL_BASE64_C
1168 *
Paul Bakkercff68422013-09-15 20:43:33 +02001169 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001170 */
Paul Bakkercff68422013-09-15 20:43:33 +02001171#define POLARSSL_PEM_PARSE_C
1172
1173/**
1174 * \def POLARSSL_PEM_WRITE_C
1175 *
1176 * Enable PEM encoding / writing
1177 *
1178 * Module: library/pem.c
1179 * Caller: library/x509write.c
1180 * library/pkwrite.c
1181 *
1182 * Requires: POLARSSL_BASE64_C
1183 *
1184 * This modules adds support for encoding / writing PEM files.
1185 */
1186#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001187
1188/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001189 * \def POLARSSL_PK_C
1190 *
1191 * Enable the generic public (asymetric) key layer.
1192 *
1193 * Module: library/pk.c
1194 * Caller: library/x509parse.c
1195 * library/ssl_tls.c
1196 * library/ssl_cli.c
1197 * library/ssl_srv.c
1198 *
1199 * Uncomment to enable generic public key wrappers.
1200 */
1201#define POLARSSL_PK_C
1202
1203/**
Paul Bakker4606c732013-09-15 17:04:23 +02001204 * \def POLARSSL_PK_PARSE_C
1205 *
1206 * Enable the generic public (asymetric) key parser.
1207 *
1208 * Module: library/pkparse.c
1209 * Caller: library/x509parse.c
1210 *
1211 * Requires: POLARSSL_PK_C
1212 *
1213 * Uncomment to enable generic public key parse functions.
1214 */
1215#define POLARSSL_PK_PARSE_C
1216
1217/**
1218 * \def POLARSSL_PK_WRITE_C
1219 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001220 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001221 *
1222 * Module: library/pkwrite.c
1223 * Caller: library/x509write.c
1224 *
1225 * Requires: POLARSSL_PK_C
1226 *
1227 * Uncomment to enable generic public key write functions.
1228 */
1229#define POLARSSL_PK_WRITE_C
1230
1231/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001232 * \def POLARSSL_PKCS5_C
1233 *
1234 * Enable PKCS#5 functions
1235 *
1236 * Module: library/pkcs5.c
1237 *
1238 * Requires: POLARSSL_MD_C
1239 *
1240 * This module adds support for the PKCS#5 functions.
1241 */
1242#define POLARSSL_PKCS5_C
1243
1244/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001245 * \def POLARSSL_PKCS11_C
1246 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001247 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001248 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001249 * Module: library/pkcs11.c
1250 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001251 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001252 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001253 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001254 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001255 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1256#define POLARSSL_PKCS11_C
1257 */
1258
1259/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001260 * \def POLARSSL_PKCS12_C
1261 *
1262 * Enable PKCS#12 PBE functions
1263 * Adds algorithms for parsing PKCS#8 encrypted private keys
1264 *
1265 * Module: library/pkcs12.c
1266 * Caller: library/x509parse.c
1267 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001268 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1269 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001270 *
1271 * This module enables PKCS#12 functions.
1272 */
1273#define POLARSSL_PKCS12_C
1274
1275/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001276 * \def POLARSSL_RSA_C
1277 *
1278 * Enable the RSA public-key cryptosystem.
1279 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001280 * Module: library/rsa.c
1281 * Caller: library/ssl_cli.c
1282 * library/ssl_srv.c
1283 * library/ssl_tls.c
1284 * library/x509.c
1285 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001286 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001287 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001288 * This module is required for SSL/TLS and MD5-signed certificates.
1289 */
Paul Bakker40e46942009-01-03 21:51:57 +00001290#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001291
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001292/**
1293 * \def POLARSSL_SHA1_C
1294 *
1295 * Enable the SHA1 cryptographic hash algorithm.
1296 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001297 * Module: library/sha1.c
1298 * Caller: library/ssl_cli.c
1299 * library/ssl_srv.c
1300 * library/ssl_tls.c
1301 * library/x509parse.c
1302 *
1303 * This module is required for SSL/TLS and SHA1-signed certificates.
1304 */
Paul Bakker40e46942009-01-03 21:51:57 +00001305#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001306
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001307/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001308 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001309 *
1310 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001311 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001312 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001313 * Module: library/sha256.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001314 * Caller: library/md_wrap.c
1315 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001316 *
1317 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001318 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001319 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001320#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001321
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001322/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001323 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001324 *
1325 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001326 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001327 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001328 * Module: library/sha512.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001329 * Caller: library/md_wrap.c
1330 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001331 *
1332 * This module adds support for SHA-384 and SHA-512.
1333 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001334#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001335
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001336/**
Paul Bakker0a597072012-09-25 21:55:46 +00001337 * \def POLARSSL_SSL_CACHE_C
1338 *
1339 * Enable simple SSL cache implementation.
1340 *
1341 * Module: library/ssl_cache.c
1342 * Caller:
1343 *
1344 * Requires: POLARSSL_SSL_CACHE_C
1345 */
1346#define POLARSSL_SSL_CACHE_C
1347
1348/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001349 * \def POLARSSL_SSL_CLI_C
1350 *
1351 * Enable the SSL/TLS client code.
1352 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001353 * Module: library/ssl_cli.c
1354 * Caller:
1355 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001356 * Requires: POLARSSL_SSL_TLS_C
1357 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001358 * This module is required for SSL/TLS client support.
1359 */
Paul Bakker40e46942009-01-03 21:51:57 +00001360#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001361
Paul Bakker9a736322012-11-14 12:39:52 +00001362/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001363 * \def POLARSSL_SSL_SRV_C
1364 *
1365 * Enable the SSL/TLS server code.
1366 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001367 * Module: library/ssl_srv.c
1368 * Caller:
1369 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001370 * Requires: POLARSSL_SSL_TLS_C
1371 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001372 * This module is required for SSL/TLS server support.
1373 */
Paul Bakker40e46942009-01-03 21:51:57 +00001374#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001375
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001376/**
1377 * \def POLARSSL_SSL_TLS_C
1378 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001379 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001380 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001381 * Module: library/ssl_tls.c
1382 * Caller: library/ssl_cli.c
1383 * library/ssl_srv.c
1384 *
Paul Bakker577e0062013-08-28 11:57:20 +02001385 * Requires: POLARSSL_CIPHER_C, POLARSSL_PK_C, POLARSSL_MD_C
1386 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001387 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001388 * This module is required for SSL/TLS.
1389 */
Paul Bakker40e46942009-01-03 21:51:57 +00001390#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001391
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001392/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001393 * \def POLARSSL_TIMING_C
1394 *
1395 * Enable the portable timing interface.
1396 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001397 * Module: library/timing.c
1398 * Caller: library/havege.c
1399 *
1400 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001401 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001402#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001403
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001404/**
1405 * \def POLARSSL_VERSION_C
1406 *
1407 * Enable run-time version information.
1408 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001409 * Module: library/version.c
1410 *
1411 * This module provides run-time version information.
1412 */
1413#define POLARSSL_VERSION_C
1414
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001415/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001416 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001417 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001418 * Enable X.509 core for using certificates
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001419 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001420 * Module: library/x509.c
1421 * Caller: library/x509_crl.c
1422 * library/x509_crt.c
1423 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001424 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001425 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001426 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001427 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001428 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001429 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001430#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001431
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001432/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001433 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001434 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001435 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001436 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001437 * Module: library/x509_crt.c
1438 * Caller: library/ssl_cli.c
1439 * library/ssl_srv.c
1440 * library/ssl_tls.c
1441 *
1442 * Requires: POLARSSL_X509_USE_C
1443 *
1444 * This module is required for X.509 certificate parsing.
1445 */
1446#define POLARSSL_X509_CRT_PARSE_C
1447
1448/**
1449 * \def POLARSSL_X509_CRL_PARSE_C
1450 *
1451 * Enable X.509 CRL parsing.
1452 *
1453 * Module: library/x509_crl.c
1454 * Caller: library/x509_crt.c
1455 *
1456 * Requires: POLARSSL_X509_USE_C
1457 *
1458 * This module is required for X.509 CRL parsing.
1459 */
1460#define POLARSSL_X509_CRL_PARSE_C
1461
1462/**
1463 * \def POLARSSL_X509_CSR_PARSE_C
1464 *
1465 * Enable X.509 Certificate Signing Request (CSR) parsing.
1466 *
1467 * Module: library/x509_csr.c
1468 * Caller: library/x509_crt_write.c
1469 *
1470 * Requires: POLARSSL_X509_USE_C
1471 *
1472 * This module is used for reading X.509 certificate request.
1473 */
1474#define POLARSSL_X509_CSR_PARSE_C
1475
1476/**
1477 * \def POLARSSL_X509_CREATE_C
1478 *
1479 * Enable X.509 core for creating certificates
1480 *
1481 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001482 *
Paul Bakker4606c732013-09-15 17:04:23 +02001483 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001484 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001485 * This module is the basis for creating X.509 certificates and CSRs.
1486 */
1487#define POLARSSL_X509_CREATE_C
1488
1489/**
1490 * \def POLARSSL_X509_CRT_WRITE_C
1491 *
1492 * Enable creating X.509 certificates.
1493 *
1494 * Module: library/x509_crt_write.c
1495 *
1496 * Requires: POLARSSL_CREATE_C
1497 *
1498 * This module is required for X.509 certificate creation.
1499 */
1500#define POLARSSL_X509_CRT_WRITE_C
1501
1502/**
1503 * \def POLARSSL_X509_CSR_WRITE_C
1504 *
1505 * Enable creating X.509 Certificate Signing Requests (CSR)
1506 *
1507 * Module: library/x509_csr_write.c
1508 *
1509 * Requires: POLARSSL_CREATE_C
1510 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001511 * This module is required for X.509 certificate request writing.
1512 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001513#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001514
1515/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001516 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001517 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001518 * Enable the XTEA block cipher.
1519 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001520 * Module: library/xtea.c
1521 * Caller:
1522 */
1523#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001524
Paul Bakker0a62cd12011-01-21 11:00:08 +00001525/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001526
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001527/**
1528 * \name SECTION: Module configuration options
1529 *
1530 * This section allows for the setting of module specific sizes and
1531 * configuration options. The default values are already present in the
1532 * relevant header files and should suffice for the regular use cases.
1533 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1534 * only if you have a good reason and know the consequences.
1535 *
1536 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1537 * header file take precedence.
1538 *
1539 * Please check the respective header file for documentation on these
1540 * parameters (to prevent duplicate documentation).
1541 *
1542 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1543 * \{
1544 */
1545//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1546
1547#if defined(POLARSSL_CONFIG_OPTIONS)
1548
1549// MPI / BIGNUM options
1550//
1551#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1552#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1553
1554// CTR_DRBG options
1555//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001556#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 +02001557#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1558#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1559#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1560#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1561
1562// Entropy options
1563//
1564#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1565#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1566
Paul Bakker6e339b52013-07-03 13:37:05 +02001567// Memory options
1568#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1569#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1570#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1571
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001572// SSL Cache options
1573//
1574#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1575#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1576
1577// SSL options
1578//
1579#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001580#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001581
1582#endif /* POLARSSL_CONFIG_OPTIONS */
1583
1584/* \} name */
1585
Paul Bakker7ad00f92013-04-18 23:05:25 +02001586/*
1587 * Sanity checks on defines and dependencies
1588 */
1589#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1590#error "POLARSSL_DHM_C defined, but not all prerequisites"
1591#endif
1592
1593#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1594#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1595#endif
1596
1597#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1598#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1599#endif
1600
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001601#if defined(POLARSSL_ECDSA_C) && \
1602 ( !defined(POLARSSL_ECP_C) || \
1603 !defined(POLARSSL_ASN1_PARSE_C) || \
1604 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001605#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1606#endif
1607
1608#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1609#error "POLARSSL_ECP_C defined, but not all prerequisites"
1610#endif
1611
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001612#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1613 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001614#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1615#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001616#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1617 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1618#error "CTR_DRBG_ENTROPY_LEN value too high"
1619#endif
1620#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1621 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1622#error "CTR_DRBG_ENTROPY_LEN value too high"
1623#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001624
1625#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1626#error "POLARSSL_GCM_C defined, but not all prerequisites"
1627#endif
1628
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001629#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1630#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1631#endif
1632
Paul Bakkere07f41d2013-04-19 09:08:57 +02001633#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1634#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1635#endif
1636
1637#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1638 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001639 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001640#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1641#endif
1642
1643#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1644 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001645 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001646#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1647#endif
1648
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001649#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1650 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001651 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001652#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1653#endif
1654
Paul Bakkere07f41d2013-04-19 09:08:57 +02001655#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001656 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Paul Bakker48377d92013-08-30 12:06:24 +02001657 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001658#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1659#endif
1660
1661#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001662 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Paul Bakker48377d92013-08-30 12:06:24 +02001663 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001664#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1665#endif
1666
Paul Bakker6e339b52013-07-03 13:37:05 +02001667#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1668#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1669#endif
1670
Paul Bakker7ad00f92013-04-18 23:05:25 +02001671#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1672#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1673#endif
1674
Paul Bakkercff68422013-09-15 20:43:33 +02001675#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1676#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1677#endif
1678
1679#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1680#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001681#endif
1682
Paul Bakker4606c732013-09-15 17:04:23 +02001683#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1684#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1685#endif
1686
1687#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1688#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1689#endif
1690
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001691#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001692#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1693#endif
1694
1695#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1696 !defined(POLARSSL_OID_C) )
1697#error "POLARSSL_RSA_C defined, but not all prerequisites"
1698#endif
1699
1700#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1701#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1702#endif
1703
Paul Bakker577e0062013-08-28 11:57:20 +02001704#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
1705 !defined(POLARSSL_PK_C) || !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001706#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1707#endif
1708
1709#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1710#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1711#endif
1712
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001713#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1714 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1715 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1716#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1717#endif
1718
1719#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1720 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1721#error "Illegal protocol selection"
1722#endif
1723
1724#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1725 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1726#error "Illegal protocol selection"
1727#endif
1728
1729#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1730 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1731 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1732#error "Illegal protocol selection"
1733#endif
1734
Paul Bakker59da0a42013-08-19 13:27:17 +02001735#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001736 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1737 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001738#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1739#endif
1740
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001741#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001742 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001743 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001744#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001745#endif
1746
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001747#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1748 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1749 !defined(POLARSSL_PK_WRITE_C) )
1750#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1751#endif
1752
1753#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1754#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1755#endif
1756
1757#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1758#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1759#endif
1760
1761#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1762#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1763#endif
1764
1765#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1766#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1767#endif
1768
1769#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1770#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001771#endif
1772
Paul Bakker5121ce52009-01-03 21:22:43 +00001773#endif /* config.h */