blob: 34daaa13155c9ccfd5619afe148d7413b7a74f9a [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)
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200290 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
291 * POLARSSL_X509_CRT_PARSE_C, POLARSSL_X509_CRL_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200292 *
293 * This enables the following ciphersuites (if other requisites are
294 * enabled as well):
295 * TLS_RSA_PSK_WITH_RC4_128_SHA
296 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
297 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
298 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200299 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
300 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
301 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
302 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200303#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
304 */
305
306/**
307 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
308 *
309 * Enable the RSA-only based ciphersuite modes in SSL / TLS
310 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200311 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
312 * POLARSSL_X509_CRT_PARSE_C, POLARSSL_X509_CRL_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200313 *
314 * This enables the following ciphersuites (if other requisites are
315 * enabled as well):
316 * TLS_RSA_WITH_AES_128_CBC_SHA
317 * TLS_RSA_WITH_AES_256_CBC_SHA
318 * TLS_RSA_WITH_AES_128_CBC_SHA256
319 * TLS_RSA_WITH_AES_256_CBC_SHA256
320 * TLS_RSA_WITH_AES_128_GCM_SHA256
321 * TLS_RSA_WITH_AES_256_GCM_SHA384
322 * TLS_RSA_WITH_RC4_128_MD5
323 * TLS_RSA_WITH_RC4_128_SHA
324 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
325 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
326 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
327 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
328 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
329 */
330#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
331
332/**
333 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
334 *
335 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS
336 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200337 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
338 * POLARSSL_X509_CRT_PARSE_C, POLARSSL_X509_CRL_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200339 *
340 * This enables the following ciphersuites (if other requisites are
341 * enabled as well):
342 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
343 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
344 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
345 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
346 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
347 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
348 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
349 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
350 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
351 */
352#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
353
354/**
355 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
356 *
357 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS
358 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200359 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
360 * POLARSSL_X509_CRT_PARSE_C, POLARSSL_X509_CRL_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200361 *
362 * This enables the following ciphersuites (if other requisites are
363 * enabled as well):
364 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
365 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
366 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
367 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
368 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
369 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
370 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
371 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
372 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
373 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
374 */
375#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
376
377/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200378 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
379 *
380 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS
381 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200382 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
383 * POLARSSL_X509_CRL_PARSE_C
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200384 *
385 * This enables the following ciphersuites (if other requisites are
386 * enabled as well):
387 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
388 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
389 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
390 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
391 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
392 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
393 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
394 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
395 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
396 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
397 */
398#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
399
400/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200401 * \def POLARSSL_ERROR_STRERROR_BC
402 *
403 * Make available the backward compatible error_strerror() next to the
404 * current polarssl_strerror().
405 *
406 * Disable if you run into name conflicts and want to really remove the
407 * error_strerror()
408 */
409#define POLARSSL_ERROR_STRERROR_BC
410
411/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100412 * \def POLARSSL_ERROR_STRERROR_DUMMY
413 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200414 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100415 * third party libraries easier.
416 *
417 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200418 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100419 */
420#define POLARSSL_ERROR_STRERROR_DUMMY
421
422/**
Paul Bakker15566e42011-04-24 21:19:15 +0000423 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000424 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000425 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
426 *
Paul Bakker15566e42011-04-24 21:19:15 +0000427 * Enable the RSA prime-number generation code.
Paul Bakker5121ce52009-01-03 21:22:43 +0000428 */
Paul Bakker15566e42011-04-24 21:19:15 +0000429#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000430
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000431/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000432 * \def POLARSSL_FS_IO
433 *
434 * Enable functions that use the filesystem.
435 */
436#define POLARSSL_FS_IO
437
438/**
Paul Bakker43655f42011-12-15 20:11:16 +0000439 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
440 *
441 * Do not add default entropy sources. These are the platform specific,
442 * hardclock and HAVEGE based poll functions.
443 *
444 * This is useful to have more control over the added entropy sources in an
445 * application.
446 *
447 * Uncomment this macro to prevent loading of default entropy functions.
448#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
449 */
450
451/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000452 * \def POLARSSL_NO_PLATFORM_ENTROPY
453 *
454 * Do not use built-in platform entropy functions.
455 * This is useful if your platform does not support
456 * standards like the /dev/urandom or Windows CryptoAPI.
457 *
458 * Uncomment this macro to disable the built-in platform entropy functions.
459#define POLARSSL_NO_PLATFORM_ENTROPY
460 */
461
462/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200463 * \def POLARSSL_MEMORY_DEBUG
464 *
465 * Enable debugging of buffer allocator memory issues. Automatically prints
466 * (to stderr) all (fatal) messages on memory allocation issues. Enables
467 * function for 'debug output' of allocated memory.
468 *
469 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
470 * fprintf()
471 *
472 * Uncomment this macro to let the buffer allocator print out error messages.
473#define POLARSSL_MEMORY_DEBUG
474*/
475
476/**
477 * \def POLARSSL_MEMORY_BACKTRACE
478 *
479 * Include backtrace information with each allocated block.
480 *
481 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
482 * GLIBC-compatible backtrace() an backtrace_symbols() support
483 *
484 * Uncomment this macro to include backtrace information
485#define POLARSSL_MEMORY_BACKTRACE
486 */
487
488/**
Paul Bakker48377d92013-08-30 12:06:24 +0200489 * \def POLARSSL_PKCS1_V15
490 *
491 * Requires: POLARSSL_RSA_C
492 *
493 * Enable support for PKCS#1 v1.5 encoding.
494 * This enables support for PKCS#1 v1.5 operations.
495 */
496#define POLARSSL_PKCS1_V15
497
498/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000499 * \def POLARSSL_PKCS1_V21
500 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000501 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
502 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000503 * Enable support for PKCS#1 v2.1 encoding.
504 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
505 */
506#define POLARSSL_PKCS1_V21
507
508/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000509 * \def POLARSSL_RSA_NO_CRT
510 *
511 * Do not use the Chinese Remainder Theorem for the RSA private operation.
512 *
513 * Uncomment this macro to disable the use of CRT in RSA.
514 *
515#define POLARSSL_RSA_NO_CRT
516 */
Paul Bakker15566e42011-04-24 21:19:15 +0000517
518/**
519 * \def POLARSSL_SELF_TEST
520 *
521 * Enable the checkup functions (*_self_test).
522 */
523#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000524
525/**
Paul Bakker40865c82013-01-31 17:13:13 +0100526 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
527 *
528 * Enable sending of alert messages in case of encountered errors as per RFC.
529 * If you choose not to send the alert messages, PolarSSL can still communicate
530 * with other servers, only debugging of failures is harder.
531 *
532 * The advantage of not sending alert messages, is that no information is given
533 * about reasons for failures thus preventing adversaries of gaining intel.
534 *
535 * Enable sending of all alert messages
536 */
537#define POLARSSL_SSL_ALERT_MESSAGES
538
539/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100540 * \def POLARSSL_SSL_DEBUG_ALL
541 *
542 * Enable the debug messages in SSL module for all issues.
543 * Debug messages have been disabled in some places to prevent timing
544 * attacks due to (unbalanced) debugging function calls.
545 *
546 * If you need all error reporting you should enable this during debugging,
547 * but remove this for production servers that should log as well.
548 *
549 * Uncomment this macro to report all debug messages on errors introducing
550 * a timing side-channel.
551 *
552#define POLARSSL_SSL_DEBUG_ALL
553 */
554
555/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000556 * \def POLARSSL_SSL_HW_RECORD_ACCEL
557 *
558 * Enable hooking functions in SSL module for hardware acceleration of
559 * individual records.
560 *
561 * Uncomment this macro to enable hooking functions.
562#define POLARSSL_SSL_HW_RECORD_ACCEL
563 */
564
565/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100566 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
567 *
568 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
569 * SSL Server module (POLARSSL_SSL_SRV_C)
570 *
571 * Comment this macro to disable support for SSLv2 Client Hello messages.
572 */
573#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
574
575/**
Paul Bakker05decb22013-08-15 13:33:48 +0200576 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
577 *
578 * Enable support for RFC 6066 max_fragment_length extension in SSL
579 *
580 * Comment this macro to disable support for the max_fragment_length extension
581 */
582#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
583
584/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200585 * \def POLARSSL_SSL_PROTO_SSL3
586 *
587 * Enable support for SSL 3.0
588 *
589 * Requires: POLARSSL_MD5_C
590 * POLARSSL_SHA1_C
591 *
592 * Comment this macro to disable support for SSL 3.0
593 */
594#define POLARSSL_SSL_PROTO_SSL3
595
596/**
597 * \def POLARSSL_SSL_PROTO_TLS1
598 *
599 * Enable support for TLS 1.0
600 *
601 * Requires: POLARSSL_MD5_C
602 * POLARSSL_SHA1_C
603 *
604 * Comment this macro to disable support for TLS 1.0
605 */
606#define POLARSSL_SSL_PROTO_TLS1
607
608/**
609 * \def POLARSSL_SSL_PROTO_TLS1_1
610 *
611 * Enable support for TLS 1.1
612 *
613 * Requires: POLARSSL_MD5_C
614 * POLARSSL_SHA1_C
615 *
616 * Comment this macro to disable support for TLS 1.1
617 */
618#define POLARSSL_SSL_PROTO_TLS1_1
619
620/**
621 * \def POLARSSL_SSL_PROTO_TLS1_2
622 *
623 * Enable support for TLS 1.2
624 *
625 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
626 * (Depends on ciphersuites)
627 *
628 * Comment this macro to disable support for TLS 1.2
629 */
630#define POLARSSL_SSL_PROTO_TLS1_2
631
632/**
Paul Bakkera503a632013-08-14 13:48:06 +0200633 * \def POLARSSL_SSL_SESSION_TICKETS
634 *
635 * Enable support for RFC 5077 session tickets in SSL
636 *
637 * Requires: POLARSSL_AES_C
638 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200639 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200640 *
641 * Comment this macro to disable support for SSL session tickets
642 */
643#define POLARSSL_SSL_SESSION_TICKETS
644
645/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200646 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
647 *
648 * Enable support for RFC 6066 server name indication (SNI) in SSL
649 *
650 * Comment this macro to disable support for server name indication in SSL
651 */
652#define POLARSSL_SSL_SERVER_NAME_INDICATION
653
654/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200655 * \def POLARSSL_SSL_TRUNCATED_HMAC
656 *
657 * Enable support for RFC 6066 truncated HMAC in SSL
658 *
659 * Comment this macro to disable support for truncated HMAC in SSL
660 */
661#define POLARSSL_SSL_TRUNCATED_HMAC
662
663/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000664 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
665 *
666 * If set, the X509 parser will not break-off when parsing an X509 certificate
667 * and encountering an unknown critical extension.
668 *
669 * Uncomment to prevent an error.
670 *
671#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
672 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000673
674/**
675 * \def POLARSSL_ZLIB_SUPPORT
676 *
677 * If set, the SSL/TLS module uses ZLIB to support compression and
678 * decompression of packet data.
679 *
680 * Used in: library/ssl_tls.c
681 * library/ssl_cli.c
682 * library/ssl_srv.c
683 *
684 * This feature requires zlib library and headers to be present.
685 *
686 * Uncomment to enable use of ZLIB
687#define POLARSSL_ZLIB_SUPPORT
688 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000689/* \} name */
690
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000691/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000692 * \name SECTION: PolarSSL modules
693 *
694 * This section enables or disables entire modules in PolarSSL
695 * \{
696 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000697
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000698/**
699 * \def POLARSSL_AES_C
700 *
701 * Enable the AES block cipher.
702 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000703 * Module: library/aes.c
704 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000705 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000706 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000707 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000708 * This module enables the following ciphersuites (if other requisites are
709 * enabled as well):
710 * TLS_RSA_WITH_AES_128_CBC_SHA
711 * TLS_RSA_WITH_AES_256_CBC_SHA
712 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
713 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
714 * TLS_RSA_WITH_AES_128_CBC_SHA256
715 * TLS_RSA_WITH_AES_256_CBC_SHA256
716 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
717 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
718 * TLS_RSA_WITH_AES_128_GCM_SHA256
719 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100720 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
721 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200722 * TLS_PSK_WITH_AES_128_CBC_SHA
723 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100724 *
Paul Bakkercff68422013-09-15 20:43:33 +0200725 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000726 */
Paul Bakker40e46942009-01-03 21:51:57 +0000727#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000728
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000729/**
730 * \def POLARSSL_ARC4_C
731 *
732 * Enable the ARCFOUR stream cipher.
733 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000734 * Module: library/arc4.c
735 * Caller: library/ssl_tls.c
736 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100737 * This module enables the following ciphersuites (if other requisites are
738 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000739 * TLS_RSA_WITH_RC4_128_MD5
740 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100741 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200742 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000743 */
Paul Bakker40e46942009-01-03 21:51:57 +0000744#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000745
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000746/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000747 * \def POLARSSL_ASN1_PARSE_C
748 *
749 * Enable the generic ASN1 parser.
750 *
751 * Module: library/asn1.c
752 * Caller: library/x509parse.c
753 */
754#define POLARSSL_ASN1_PARSE_C
755
756/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000757 * \def POLARSSL_ASN1_WRITE_C
758 *
759 * Enable the generic ASN1 writer.
760 *
761 * Module: library/asn1write.c
762 */
763#define POLARSSL_ASN1_WRITE_C
764
765/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000766 * \def POLARSSL_BASE64_C
767 *
768 * Enable the Base64 module.
769 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000770 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000771 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000772 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000773 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000774 */
Paul Bakker40e46942009-01-03 21:51:57 +0000775#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000776
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000777/**
778 * \def POLARSSL_BIGNUM_C
779 *
Paul Bakker9a736322012-11-14 12:39:52 +0000780 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000781 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000782 * Module: library/bignum.c
783 * Caller: library/dhm.c
784 * library/rsa.c
785 * library/ssl_tls.c
786 * library/x509parse.c
787 *
788 * This module is required for RSA and DHM support.
789 */
Paul Bakker40e46942009-01-03 21:51:57 +0000790#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000791
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000792/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000793 * \def POLARSSL_BLOWFISH_C
794 *
795 * Enable the Blowfish block cipher.
796 *
797 * Module: library/blowfish.c
798 */
799#define POLARSSL_BLOWFISH_C
800
801/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000802 * \def POLARSSL_CAMELLIA_C
803 *
804 * Enable the Camellia block cipher.
805 *
Paul Bakker38119b12009-01-10 23:31:23 +0000806 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000807 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000808 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000809 * This module enables the following ciphersuites (if other requisites are
810 * enabled as well):
811 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
812 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
813 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
814 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
815 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
816 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
817 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
818 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000819 */
820#define POLARSSL_CAMELLIA_C
821
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000822/**
823 * \def POLARSSL_CERTS_C
824 *
825 * Enable the test certificates.
826 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000827 * Module: library/certs.c
828 * Caller:
829 *
830 * This module is used for testing (ssl_client/server).
831 */
Paul Bakker40e46942009-01-03 21:51:57 +0000832#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000833
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000834/**
835 * \def POLARSSL_CIPHER_C
836 *
837 * Enable the generic cipher layer.
838 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000839 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200840 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000841 *
842 * Uncomment to enable generic cipher wrappers.
843 */
844#define POLARSSL_CIPHER_C
845
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000846/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000847 * \def POLARSSL_CTR_DRBG_C
848 *
849 * Enable the CTR_DRBG AES-256-based random generator
850 *
851 * Module: library/ctr_drbg.c
852 * Caller:
853 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000854 * Requires: POLARSSL_AES_C
855 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000856 * This module provides the CTR_DRBG AES-256 random number generator.
857 */
858#define POLARSSL_CTR_DRBG_C
859
860/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000861 * \def POLARSSL_DEBUG_C
862 *
863 * Enable the debug functions.
864 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000865 * Module: library/debug.c
866 * Caller: library/ssl_cli.c
867 * library/ssl_srv.c
868 * library/ssl_tls.c
869 *
870 * This module provides debugging functions.
871 */
Paul Bakker40e46942009-01-03 21:51:57 +0000872#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000873
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000874/**
875 * \def POLARSSL_DES_C
876 *
877 * Enable the DES block cipher.
878 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000879 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100880 * Caller: library/pem.c
881 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000882 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000883 * This module enables the following ciphersuites (if other requisites are
884 * enabled as well):
885 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
886 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100887 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200888 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100889 *
Paul Bakkercff68422013-09-15 20:43:33 +0200890 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000891 */
Paul Bakker40e46942009-01-03 21:51:57 +0000892#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000893
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000894/**
895 * \def POLARSSL_DHM_C
896 *
897 * Enable the Diffie-Hellman-Merkle key exchange.
898 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000899 * Module: library/dhm.c
900 * Caller: library/ssl_cli.c
901 * library/ssl_srv.c
902 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000903 * This module enables the following ciphersuites (if other requisites are
904 * enabled as well):
905 * TLS_DHE_RSA_WITH_DES_CBC_SHA
906 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
907 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
908 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
909 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
910 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
911 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
912 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
913 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
914 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
915 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
916 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000917 */
Paul Bakker40e46942009-01-03 21:51:57 +0000918#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000919
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000920/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100921 * \def POLARSSL_ECDH_C
922 *
923 * Enable the elliptic curve Diffie-Hellman library.
924 *
925 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100926 * Caller: library/ssl_cli.c
927 * library/ssl_srv.c
928 *
929 * This module enables the following ciphersuites (if other requisites are
930 * enabled as well):
931 * TLS_ECDHE_RSA_WITH_NULL_SHA
932 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
933 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
934 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
935 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100936 *
937 * Requires: POLARSSL_ECP_C
938 */
939#define POLARSSL_ECDH_C
940
941/**
942 * \def POLARSSL_ECDSA_C
943 *
944 * Enable the elliptic curve DSA library.
945 *
946 * Module: library/ecdsa.c
947 * Caller:
948 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +0200949 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100950 */
951#define POLARSSL_ECDSA_C
952
953/**
954 * \def POLARSSL_ECP_C
955 *
956 * Enable the elliptic curve over GF(p) library.
957 *
958 * Module: library/ecp.c
959 * Caller: library/ecdh.c
960 * library/ecdsa.c
961 *
962 * Requires: POLARSSL_BIGNUM_C
963 */
964#define POLARSSL_ECP_C
965
966/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000967 * \def POLARSSL_ENTROPY_C
968 *
969 * Enable the platform-specific entropy code.
970 *
971 * Module: library/entropy.c
972 * Caller:
973 *
Paul Bakker9e36f042013-06-30 14:34:05 +0200974 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +0000975 *
976 * This module provides a generic entropy pool
977 */
978#define POLARSSL_ENTROPY_C
979
980/**
Paul Bakker9d781402011-05-09 16:17:09 +0000981 * \def POLARSSL_ERROR_C
982 *
983 * Enable error code to error string conversion.
984 *
985 * Module: library/error.c
986 * Caller:
987 *
988 * This module enables err_strerror().
989 */
990#define POLARSSL_ERROR_C
991
992/**
Paul Bakker89e80c92012-03-20 13:50:09 +0000993 * \def POLARSSL_GCM_C
994 *
995 * Enable the Galois/Counter Mode (GCM) for AES
996 *
997 * Module: library/gcm.c
998 *
999 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001000 *
1001 * This module enables the following ciphersuites (if other requisites are
1002 * enabled as well):
1003 * TLS_RSA_WITH_AES_128_GCM_SHA256
1004 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001005 */
1006#define POLARSSL_GCM_C
1007
1008/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001009 * \def POLARSSL_HAVEGE_C
1010 *
1011 * Enable the HAVEGE random generator.
1012 *
Paul Bakker2a844242013-06-24 13:01:53 +02001013 * Warning: the HAVEGE random generator is not suitable for virtualized
1014 * environments
1015 *
1016 * Warning: the HAVEGE random generator is dependent on timing and specific
1017 * processor traits. It is therefore not advised to use HAVEGE as
1018 * your applications primary random generator or primary entropy pool
1019 * input. As a secondary input to your entropy pool, it IS able add
1020 * the (limited) extra entropy it provides.
1021 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001022 * Module: library/havege.c
1023 * Caller:
1024 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001025 * Requires: POLARSSL_TIMING_C
1026 *
Paul Bakker2a844242013-06-24 13:01:53 +02001027 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001028#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001029 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001030
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001031/**
1032 * \def POLARSSL_MD_C
1033 *
1034 * Enable the generic message digest layer.
1035 *
Paul Bakker17373852011-01-06 14:20:01 +00001036 * Module: library/md.c
1037 * Caller:
1038 *
1039 * Uncomment to enable generic message digest wrappers.
1040 */
1041#define POLARSSL_MD_C
1042
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001043/**
1044 * \def POLARSSL_MD2_C
1045 *
1046 * Enable the MD2 hash algorithm
1047 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001048 * Module: library/md2.c
1049 * Caller: library/x509parse.c
1050 *
1051 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1052 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001053#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001054 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001055
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001056/**
1057 * \def POLARSSL_MD4_C
1058 *
1059 * Enable the MD4 hash algorithm
1060 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001061 * Module: library/md4.c
1062 * Caller: library/x509parse.c
1063 *
1064 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1065 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001066#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001067 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001068
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001069/**
1070 * \def POLARSSL_MD5_C
1071 *
1072 * Enable the MD5 hash algorithm
1073 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001074 * Module: library/md5.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001075 * Caller: library/pem.c
1076 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001077 * library/x509parse.c
1078 *
1079 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001080 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001081 */
Paul Bakker40e46942009-01-03 21:51:57 +00001082#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001083
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001084/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001085 * \def POLARSSL_MEMORY_C
1086 *
1087 * Enable the memory allocation layer.
1088 * By default PolarSSL uses the system-provided malloc() and free().
1089 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1090 * are defined and unmodified)
1091 *
1092 * This allows different allocators (self-implemented or provided)
1093 *
1094 * Enable this layer to allow use of alternative memory allocators.
1095#define POLARSSL_MEMORY_C
1096 */
1097
1098/**
1099 * The buffer allocator implementation that makes use of a (stack) based
1100 * buffer to 'allocate' dynamic memory. (replaces malloc() and free() calls)
1101 *
1102 * Module: library/memory_buffer_alloc.c
1103 *
1104 * Requires: POLARSSL_MEMORY_C
1105 *
1106 * Enable this module to enable the buffer memory allocator.
1107#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1108 */
1109
1110/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001111 * \def POLARSSL_NET_C
1112 *
1113 * Enable the TCP/IP networking routines.
1114 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001115 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001116 *
1117 * This module provides TCP/IP networking routines.
1118 */
Paul Bakker40e46942009-01-03 21:51:57 +00001119#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001120
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001121/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001122 * \def POLARSSL_OID_C
1123 *
1124 * Enable the OID database
1125 *
1126 * Module: library/oid.c
1127 * Caller: library/rsa.c
1128 * library/x509parse.c
1129 * library/x509write.c
1130 *
1131 * This modules translates between OIDs and internal values.
1132 */
1133#define POLARSSL_OID_C
1134
1135/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001136 * \def POLARSSL_PADLOCK_C
1137 *
1138 * Enable VIA Padlock support on x86.
1139 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001140 * Module: library/padlock.c
1141 * Caller: library/aes.c
1142 *
1143 * This modules adds support for the VIA PadLock on x86.
1144 */
Paul Bakker40e46942009-01-03 21:51:57 +00001145#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001146
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001147/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001148 * \def POLARSSL_PBKDF2_C
1149 *
1150 * Enable PKCS#5 PBKDF2 key derivation function
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001151 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001152 *
1153 * Module: library/pbkdf2.c
1154 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001155 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001156 *
1157 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001158 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001159#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001160
1161/**
Paul Bakkercff68422013-09-15 20:43:33 +02001162 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001163 *
Paul Bakkercff68422013-09-15 20:43:33 +02001164 * Enable PEM decoding / parsing
Paul Bakker96743fc2011-02-12 14:30:57 +00001165 *
1166 * Module: library/pem.c
1167 * Caller: library/x509parse.c
Paul Bakkercff68422013-09-15 20:43:33 +02001168 * library/pkparse.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001169 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001170 * Requires: POLARSSL_BASE64_C
1171 *
Paul Bakkercff68422013-09-15 20:43:33 +02001172 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001173 */
Paul Bakkercff68422013-09-15 20:43:33 +02001174#define POLARSSL_PEM_PARSE_C
1175
1176/**
1177 * \def POLARSSL_PEM_WRITE_C
1178 *
1179 * Enable PEM encoding / writing
1180 *
1181 * Module: library/pem.c
1182 * Caller: library/x509write.c
1183 * library/pkwrite.c
1184 *
1185 * Requires: POLARSSL_BASE64_C
1186 *
1187 * This modules adds support for encoding / writing PEM files.
1188 */
1189#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001190
1191/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001192 * \def POLARSSL_PK_C
1193 *
1194 * Enable the generic public (asymetric) key layer.
1195 *
1196 * Module: library/pk.c
1197 * Caller: library/x509parse.c
1198 * library/ssl_tls.c
1199 * library/ssl_cli.c
1200 * library/ssl_srv.c
1201 *
1202 * Uncomment to enable generic public key wrappers.
1203 */
1204#define POLARSSL_PK_C
1205
1206/**
Paul Bakker4606c732013-09-15 17:04:23 +02001207 * \def POLARSSL_PK_PARSE_C
1208 *
1209 * Enable the generic public (asymetric) key parser.
1210 *
1211 * Module: library/pkparse.c
1212 * Caller: library/x509parse.c
1213 *
1214 * Requires: POLARSSL_PK_C
1215 *
1216 * Uncomment to enable generic public key parse functions.
1217 */
1218#define POLARSSL_PK_PARSE_C
1219
1220/**
1221 * \def POLARSSL_PK_WRITE_C
1222 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001223 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001224 *
1225 * Module: library/pkwrite.c
1226 * Caller: library/x509write.c
1227 *
1228 * Requires: POLARSSL_PK_C
1229 *
1230 * Uncomment to enable generic public key write functions.
1231 */
1232#define POLARSSL_PK_WRITE_C
1233
1234/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001235 * \def POLARSSL_PKCS5_C
1236 *
1237 * Enable PKCS#5 functions
1238 *
1239 * Module: library/pkcs5.c
1240 *
1241 * Requires: POLARSSL_MD_C
1242 *
1243 * This module adds support for the PKCS#5 functions.
1244 */
1245#define POLARSSL_PKCS5_C
1246
1247/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001248 * \def POLARSSL_PKCS11_C
1249 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001250 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001251 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001252 * Module: library/pkcs11.c
1253 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001254 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001255 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001256 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001257 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001258 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1259#define POLARSSL_PKCS11_C
1260 */
1261
1262/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001263 * \def POLARSSL_PKCS12_C
1264 *
1265 * Enable PKCS#12 PBE functions
1266 * Adds algorithms for parsing PKCS#8 encrypted private keys
1267 *
1268 * Module: library/pkcs12.c
1269 * Caller: library/x509parse.c
1270 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001271 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1272 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001273 *
1274 * This module enables PKCS#12 functions.
1275 */
1276#define POLARSSL_PKCS12_C
1277
1278/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001279 * \def POLARSSL_RSA_C
1280 *
1281 * Enable the RSA public-key cryptosystem.
1282 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001283 * Module: library/rsa.c
1284 * Caller: library/ssl_cli.c
1285 * library/ssl_srv.c
1286 * library/ssl_tls.c
1287 * library/x509.c
1288 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001289 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001290 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001291 * This module is required for SSL/TLS and MD5-signed certificates.
1292 */
Paul Bakker40e46942009-01-03 21:51:57 +00001293#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001294
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001295/**
1296 * \def POLARSSL_SHA1_C
1297 *
1298 * Enable the SHA1 cryptographic hash algorithm.
1299 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001300 * Module: library/sha1.c
1301 * Caller: library/ssl_cli.c
1302 * library/ssl_srv.c
1303 * library/ssl_tls.c
1304 * library/x509parse.c
1305 *
1306 * This module is required for SSL/TLS and SHA1-signed certificates.
1307 */
Paul Bakker40e46942009-01-03 21:51:57 +00001308#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001309
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001310/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001311 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001312 *
1313 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001314 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001315 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001316 * Module: library/sha256.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001317 * Caller: library/md_wrap.c
1318 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001319 *
1320 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001321 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001322 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001323#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001324
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001325/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001326 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001327 *
1328 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001329 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001330 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001331 * Module: library/sha512.c
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001332 * Caller: library/md_wrap.c
1333 * library/x509parse.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001334 *
1335 * This module adds support for SHA-384 and SHA-512.
1336 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001337#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001338
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001339/**
Paul Bakker0a597072012-09-25 21:55:46 +00001340 * \def POLARSSL_SSL_CACHE_C
1341 *
1342 * Enable simple SSL cache implementation.
1343 *
1344 * Module: library/ssl_cache.c
1345 * Caller:
1346 *
1347 * Requires: POLARSSL_SSL_CACHE_C
1348 */
1349#define POLARSSL_SSL_CACHE_C
1350
1351/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001352 * \def POLARSSL_SSL_CLI_C
1353 *
1354 * Enable the SSL/TLS client code.
1355 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001356 * Module: library/ssl_cli.c
1357 * Caller:
1358 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001359 * Requires: POLARSSL_SSL_TLS_C
1360 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001361 * This module is required for SSL/TLS client support.
1362 */
Paul Bakker40e46942009-01-03 21:51:57 +00001363#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001364
Paul Bakker9a736322012-11-14 12:39:52 +00001365/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001366 * \def POLARSSL_SSL_SRV_C
1367 *
1368 * Enable the SSL/TLS server code.
1369 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001370 * Module: library/ssl_srv.c
1371 * Caller:
1372 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001373 * Requires: POLARSSL_SSL_TLS_C
1374 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001375 * This module is required for SSL/TLS server support.
1376 */
Paul Bakker40e46942009-01-03 21:51:57 +00001377#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001378
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001379/**
1380 * \def POLARSSL_SSL_TLS_C
1381 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001382 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001383 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001384 * Module: library/ssl_tls.c
1385 * Caller: library/ssl_cli.c
1386 * library/ssl_srv.c
1387 *
Paul Bakker577e0062013-08-28 11:57:20 +02001388 * Requires: POLARSSL_CIPHER_C, POLARSSL_PK_C, POLARSSL_MD_C
1389 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001390 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001391 * This module is required for SSL/TLS.
1392 */
Paul Bakker40e46942009-01-03 21:51:57 +00001393#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001394
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001395/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001396 * \def POLARSSL_TIMING_C
1397 *
1398 * Enable the portable timing interface.
1399 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001400 * Module: library/timing.c
1401 * Caller: library/havege.c
1402 *
1403 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001404 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001405#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001406
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001407/**
1408 * \def POLARSSL_VERSION_C
1409 *
1410 * Enable run-time version information.
1411 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001412 * Module: library/version.c
1413 *
1414 * This module provides run-time version information.
1415 */
1416#define POLARSSL_VERSION_C
1417
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001418/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001419 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001420 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001421 * Enable X.509 core for using certificates
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001422 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001423 * Module: library/x509.c
1424 * Caller: library/x509_crl.c
1425 * library/x509_crt.c
1426 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001427 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001428 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001429 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001430 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001431 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001432 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001433#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001434
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001435/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001436 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001437 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001438 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001439 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001440 * Module: library/x509_crt.c
1441 * Caller: library/ssl_cli.c
1442 * library/ssl_srv.c
1443 * library/ssl_tls.c
1444 *
1445 * Requires: POLARSSL_X509_USE_C
1446 *
1447 * This module is required for X.509 certificate parsing.
1448 */
1449#define POLARSSL_X509_CRT_PARSE_C
1450
1451/**
1452 * \def POLARSSL_X509_CRL_PARSE_C
1453 *
1454 * Enable X.509 CRL parsing.
1455 *
1456 * Module: library/x509_crl.c
1457 * Caller: library/x509_crt.c
1458 *
1459 * Requires: POLARSSL_X509_USE_C
1460 *
1461 * This module is required for X.509 CRL parsing.
1462 */
1463#define POLARSSL_X509_CRL_PARSE_C
1464
1465/**
1466 * \def POLARSSL_X509_CSR_PARSE_C
1467 *
1468 * Enable X.509 Certificate Signing Request (CSR) parsing.
1469 *
1470 * Module: library/x509_csr.c
1471 * Caller: library/x509_crt_write.c
1472 *
1473 * Requires: POLARSSL_X509_USE_C
1474 *
1475 * This module is used for reading X.509 certificate request.
1476 */
1477#define POLARSSL_X509_CSR_PARSE_C
1478
1479/**
1480 * \def POLARSSL_X509_CREATE_C
1481 *
1482 * Enable X.509 core for creating certificates
1483 *
1484 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001485 *
Paul Bakker4606c732013-09-15 17:04:23 +02001486 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001487 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001488 * This module is the basis for creating X.509 certificates and CSRs.
1489 */
1490#define POLARSSL_X509_CREATE_C
1491
1492/**
1493 * \def POLARSSL_X509_CRT_WRITE_C
1494 *
1495 * Enable creating X.509 certificates.
1496 *
1497 * Module: library/x509_crt_write.c
1498 *
1499 * Requires: POLARSSL_CREATE_C
1500 *
1501 * This module is required for X.509 certificate creation.
1502 */
1503#define POLARSSL_X509_CRT_WRITE_C
1504
1505/**
1506 * \def POLARSSL_X509_CSR_WRITE_C
1507 *
1508 * Enable creating X.509 Certificate Signing Requests (CSR)
1509 *
1510 * Module: library/x509_csr_write.c
1511 *
1512 * Requires: POLARSSL_CREATE_C
1513 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001514 * This module is required for X.509 certificate request writing.
1515 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001516#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001517
1518/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001519 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001520 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001521 * Enable the XTEA block cipher.
1522 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001523 * Module: library/xtea.c
1524 * Caller:
1525 */
1526#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001527
Paul Bakker0a62cd12011-01-21 11:00:08 +00001528/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001529
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001530/**
1531 * \name SECTION: Module configuration options
1532 *
1533 * This section allows for the setting of module specific sizes and
1534 * configuration options. The default values are already present in the
1535 * relevant header files and should suffice for the regular use cases.
1536 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1537 * only if you have a good reason and know the consequences.
1538 *
1539 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1540 * header file take precedence.
1541 *
1542 * Please check the respective header file for documentation on these
1543 * parameters (to prevent duplicate documentation).
1544 *
1545 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1546 * \{
1547 */
1548//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1549
1550#if defined(POLARSSL_CONFIG_OPTIONS)
1551
1552// MPI / BIGNUM options
1553//
1554#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1555#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1556
1557// CTR_DRBG options
1558//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001559#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 +02001560#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1561#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1562#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1563#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1564
1565// Entropy options
1566//
1567#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1568#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1569
Paul Bakker6e339b52013-07-03 13:37:05 +02001570// Memory options
1571#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1572#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1573#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1574
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001575// SSL Cache options
1576//
1577#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1578#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1579
1580// SSL options
1581//
1582#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001583#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001584
1585#endif /* POLARSSL_CONFIG_OPTIONS */
1586
1587/* \} name */
1588
Paul Bakker7ad00f92013-04-18 23:05:25 +02001589/*
1590 * Sanity checks on defines and dependencies
1591 */
1592#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1593#error "POLARSSL_DHM_C defined, but not all prerequisites"
1594#endif
1595
1596#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1597#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1598#endif
1599
1600#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1601#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1602#endif
1603
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001604#if defined(POLARSSL_ECDSA_C) && \
1605 ( !defined(POLARSSL_ECP_C) || \
1606 !defined(POLARSSL_ASN1_PARSE_C) || \
1607 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001608#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1609#endif
1610
1611#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1612#error "POLARSSL_ECP_C defined, but not all prerequisites"
1613#endif
1614
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001615#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1616 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001617#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1618#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001619#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1620 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1621#error "CTR_DRBG_ENTROPY_LEN value too high"
1622#endif
1623#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1624 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1625#error "CTR_DRBG_ENTROPY_LEN value too high"
1626#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001627
1628#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1629#error "POLARSSL_GCM_C defined, but not all prerequisites"
1630#endif
1631
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001632#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1633#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1634#endif
1635
Paul Bakkere07f41d2013-04-19 09:08:57 +02001636#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1637#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1638#endif
1639
1640#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1641 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001642 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) || \
1643 !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001644#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1645#endif
1646
1647#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1648 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001649 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) || \
1650 !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001651#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1652#endif
1653
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001654#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1655 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001656 !defined(POLARSSL_X509_CRT_PARSE_C) || \
1657 !defined(POLARSSL_X509_CRL_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001658#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1659#endif
1660
Paul Bakkere07f41d2013-04-19 09:08:57 +02001661#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001662 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001663 !defined(POLARSSL_PKCS1_V15) || !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001664#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1665#endif
1666
1667#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001668 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +02001669 !defined(POLARSSL_PKCS1_V15) || !defined(POLARSSL_X509_CRL_PARSE_C) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001670#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1671#endif
1672
Paul Bakker6e339b52013-07-03 13:37:05 +02001673#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1674#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1675#endif
1676
Paul Bakker7ad00f92013-04-18 23:05:25 +02001677#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1678#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1679#endif
1680
Paul Bakkercff68422013-09-15 20:43:33 +02001681#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1682#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1683#endif
1684
1685#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1686#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001687#endif
1688
Paul Bakker4606c732013-09-15 17:04:23 +02001689#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1690#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1691#endif
1692
1693#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1694#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1695#endif
1696
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001697#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001698#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1699#endif
1700
1701#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1702 !defined(POLARSSL_OID_C) )
1703#error "POLARSSL_RSA_C defined, but not all prerequisites"
1704#endif
1705
1706#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1707#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1708#endif
1709
Paul Bakker577e0062013-08-28 11:57:20 +02001710#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
1711 !defined(POLARSSL_PK_C) || !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001712#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1713#endif
1714
1715#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1716#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1717#endif
1718
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001719#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1720 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1721 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1722#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1723#endif
1724
1725#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1726 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1727#error "Illegal protocol selection"
1728#endif
1729
1730#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1731 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1732#error "Illegal protocol selection"
1733#endif
1734
1735#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1736 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1737 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1738#error "Illegal protocol selection"
1739#endif
1740
Paul Bakker59da0a42013-08-19 13:27:17 +02001741#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001742 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1743 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001744#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1745#endif
1746
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001747#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001748 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001749 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001750#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001751#endif
1752
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001753#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1754 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1755 !defined(POLARSSL_PK_WRITE_C) )
1756#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1757#endif
1758
1759#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1760#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1761#endif
1762
1763#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1764#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1765#endif
1766
1767#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1768#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1769#endif
1770
1771#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1772#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1773#endif
1774
1775#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1776#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001777#endif
1778
Paul Bakker5121ce52009-01-03 21:22:43 +00001779#endif /* config.h */