blob: ed5ae2c8ce534544291a0a75f42e00d051626323 [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 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020074 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000075 *
76 * Requires support for asm() in compiler.
77 *
78 * Used in:
79 * library/timing.c
80 * library/padlock.c
81 * include/polarssl/bn_mul.h
82 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020083 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000084 */
Paul Bakker40e46942009-01-03 21:51:57 +000085#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000086
Paul Bakkerf3b86c12011-01-27 15:24:17 +000087/**
88 * \def POLARSSL_HAVE_SSE2
89 *
Paul Bakkere23c3152012-10-01 14:42:47 +000090 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000091 *
Paul Bakker5121ce52009-01-03 21:22:43 +000092 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker40e46942009-01-03 21:51:57 +000093#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000094 */
Paul Bakkerfa9b1002013-07-03 15:31:03 +020095
96/**
97 * \def POLARSSL_HAVE_TIME
98 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020099 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200100 *
101 * Comment if your system does not support time functions
102 */
103#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200104/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000105
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000106/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000107 * \name SECTION: PolarSSL feature support
108 *
109 * This section sets support for features that are or are not needed
110 * within the modules that are enabled.
111 * \{
112 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000113
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000114/**
Paul Bakker90995b52013-06-24 19:20:35 +0200115 * \def POLARSSL_XXX_ALT
116 *
117 * Uncomment a macro to let PolarSSL use your alternate core implementation of
118 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
119 * implementations). Keep in mind that the function prototypes should remain
120 * the same.
121 *
122 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
123 * provide the "struct aes_context" definition and omit the base function
124 * declarations and implementations. "aes_alt.h" will be included from
125 * "aes.h" to include the new function definitions.
126 *
127 * Uncomment a macro to enable alternate implementation for core algorithm
128 * functions
129#define POLARSSL_AES_ALT
130#define POLARSSL_ARC4_ALT
131#define POLARSSL_BLOWFISH_ALT
132#define POLARSSL_CAMELLIA_ALT
133#define POLARSSL_DES_ALT
134#define POLARSSL_XTEA_ALT
135#define POLARSSL_MD2_ALT
136#define POLARSSL_MD4_ALT
137#define POLARSSL_MD5_ALT
138#define POLARSSL_SHA1_ALT
Paul Bakker9e36f042013-06-30 14:34:05 +0200139#define POLARSSL_SHA256_ALT
140#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200141 */
142
143/**
Paul Bakker15566e42011-04-24 21:19:15 +0000144 * \def POLARSSL_AES_ROM_TABLES
145 *
146 * Store the AES tables in ROM.
147 *
148 * Uncomment this macro to store the AES tables in ROM.
149 *
150#define POLARSSL_AES_ROM_TABLES
151 */
152
153/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200154 * \def POLARSSL_CIPHER_MODE_CBC
155 *
156 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
157 */
158#define POLARSSL_CIPHER_MODE_CBC
159
160/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000161 * \def POLARSSL_CIPHER_MODE_CFB
162 *
163 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
164 */
165#define POLARSSL_CIPHER_MODE_CFB
166
167/**
168 * \def POLARSSL_CIPHER_MODE_CTR
169 *
170 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
171 */
172#define POLARSSL_CIPHER_MODE_CTR
173
174/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000175 * \def POLARSSL_CIPHER_NULL_CIPHER
176 *
177 * Enable NULL cipher.
178 * Warning: Only do so when you know what you are doing. This allows for
179 * encryption or channels without any security!
180 *
181 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
182 * the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000183 * TLS_RSA_WITH_NULL_MD5
184 * TLS_RSA_WITH_NULL_SHA
185 * TLS_RSA_WITH_NULL_SHA256
Paul Bakker41c83d32013-03-20 14:39:14 +0100186 * TLS_ECDHE_RSA_WITH_NULL_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200187 * TLS_PSK_WITH_NULL
188 * TLS_PSK_WITH_NULL256
189 * TLS_PSK_WITH_NULL384
190 * TLS_DHE_PSK_WITH_NULL
191 * TLS_DHE_PSK_WITH_NULL256
192 * TLS_DHE_PSK_WITH_NULL384
193 * TLS_RSA_PSK_WITH_NULL
194 * TLS_RSA_PSK_WITH_NULL256
195 * TLS_RSA_PSK_WITH_NULL384
Paul Bakkerfab5c822012-02-06 16:45:10 +0000196 *
197 * Uncomment this macro to enable the NULL cipher and ciphersuites
198#define POLARSSL_CIPHER_NULL_CIPHER
199 */
200
201/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200202 * \def POLARSSL_CIPHER_PADDING_XXX
203 *
204 * Uncomment or comment macros to add support for specific padding modes
205 * in the cipher layer with cipher modes that support padding (e.g. CBC)
206 *
207 * If you disable all padding modes, only full blocks can be used with CBC.
208 *
209 * Enable padding modes in the cipher layer.
210 */
211#define POLARSSL_CIPHER_PADDING_PKCS7
212#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
213#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
214#define POLARSSL_CIPHER_PADDING_ZEROS
215
216/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000217 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
218 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200219 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000220 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000221 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000222 *
223 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000224 * TLS_RSA_WITH_DES_CBC_SHA
225 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000226 *
227 * Uncomment this macro to enable weak ciphersuites
228#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
229 */
230
231/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200232 * \def POLARSSL_ECP_XXXX_ENABLED
233 *
234 * Enables specific curves within the Elliptic Curve module.
235 * By default all supported curves are enables.
236 *
237 * Comment macros to disable the curve and functions for it
238 */
239#define POLARSSL_ECP_DP_SECP192R1_ENABLED
240#define POLARSSL_ECP_DP_SECP224R1_ENABLED
241#define POLARSSL_ECP_DP_SECP256R1_ENABLED
242#define POLARSSL_ECP_DP_SECP384R1_ENABLED
243#define POLARSSL_ECP_DP_SECP521R1_ENABLED
244
245/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200246 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
247 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200248 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200249 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200250 * This enables the following ciphersuites (if other requisites are
251 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200252 * TLS_PSK_WITH_RC4_128_SHA
253 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
254 * TLS_PSK_WITH_AES_128_CBC_SHA
255 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200256 * TLS_PSK_WITH_AES_128_CBC_SHA256
257 * TLS_PSK_WITH_AES_256_CBC_SHA384
258 * TLS_PSK_WITH_AES_128_GCM_SHA256
259 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200260 */
261#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
262
263/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200264 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
265 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200266 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200267 *
268 * Requires: POLARSSL_DHM_C
269 *
270 * This enables the following ciphersuites (if other requisites are
271 * enabled as well):
272 * TLS_DHE_PSK_WITH_RC4_128_SHA
273 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
274 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
275 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200276 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
277 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
278 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
279 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200280 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200281#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200282
283/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200284 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
285 *
286 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
287 *
288 * Requires: POLARSSL_ECDH_C
289 *
290 * This enables the following ciphersuites (if other requisites are
291 * enabled as well):
292 */
293#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
294
295/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200296 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
297 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200298 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Paul Bakker45bda902013-04-19 22:28:21 +0200299 * (NOT YET IMPLEMENTED)
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200300 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200301 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200302 *
303 * This enables the following ciphersuites (if other requisites are
304 * enabled as well):
305 * TLS_RSA_PSK_WITH_RC4_128_SHA
306 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
307 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
308 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200309 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
310 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
311 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
312 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200313#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
314 */
315
316/**
317 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
318 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200319 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200320 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200321 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200322 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200323 *
324 * This enables the following ciphersuites (if other requisites are
325 * enabled as well):
326 * TLS_RSA_WITH_AES_128_CBC_SHA
327 * TLS_RSA_WITH_AES_256_CBC_SHA
328 * TLS_RSA_WITH_AES_128_CBC_SHA256
329 * TLS_RSA_WITH_AES_256_CBC_SHA256
330 * TLS_RSA_WITH_AES_128_GCM_SHA256
331 * TLS_RSA_WITH_AES_256_GCM_SHA384
332 * TLS_RSA_WITH_RC4_128_MD5
333 * TLS_RSA_WITH_RC4_128_SHA
334 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
335 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
336 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
337 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
338 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
339 */
340#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
341
342/**
343 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
344 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200345 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200346 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200347 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200348 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200349 *
350 * This enables the following ciphersuites (if other requisites are
351 * enabled as well):
352 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
353 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
354 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
355 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
356 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
357 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
358 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
359 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
360 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
361 */
362#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
363
364/**
365 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
366 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200367 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200368 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200369 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200370 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200371 *
372 * This enables the following ciphersuites (if other requisites are
373 * enabled as well):
374 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
375 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
376 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
377 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
378 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
379 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
380 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
381 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
382 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
383 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
384 */
385#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
386
387/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200388 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
389 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200390 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200391 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200392 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200393 *
394 * This enables the following ciphersuites (if other requisites are
395 * enabled as well):
396 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
397 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
398 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
399 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
400 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
401 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
402 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
403 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
404 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
405 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
406 */
407#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
408
409/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200410 * \def POLARSSL_ERROR_STRERROR_BC
411 *
412 * Make available the backward compatible error_strerror() next to the
413 * current polarssl_strerror().
414 *
415 * Disable if you run into name conflicts and want to really remove the
416 * error_strerror()
417 */
418#define POLARSSL_ERROR_STRERROR_BC
419
420/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100421 * \def POLARSSL_ERROR_STRERROR_DUMMY
422 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200423 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100424 * third party libraries easier.
425 *
426 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200427 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100428 */
429#define POLARSSL_ERROR_STRERROR_DUMMY
430
431/**
Paul Bakker15566e42011-04-24 21:19:15 +0000432 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000433 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200434 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200435 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200436 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000437 */
Paul Bakker15566e42011-04-24 21:19:15 +0000438#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000439
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000440/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000441 * \def POLARSSL_FS_IO
442 *
443 * Enable functions that use the filesystem.
444 */
445#define POLARSSL_FS_IO
446
447/**
Paul Bakker43655f42011-12-15 20:11:16 +0000448 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
449 *
450 * Do not add default entropy sources. These are the platform specific,
451 * hardclock and HAVEGE based poll functions.
452 *
453 * This is useful to have more control over the added entropy sources in an
454 * application.
455 *
456 * Uncomment this macro to prevent loading of default entropy functions.
457#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
458 */
459
460/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000461 * \def POLARSSL_NO_PLATFORM_ENTROPY
462 *
463 * Do not use built-in platform entropy functions.
464 * This is useful if your platform does not support
465 * standards like the /dev/urandom or Windows CryptoAPI.
466 *
467 * Uncomment this macro to disable the built-in platform entropy functions.
468#define POLARSSL_NO_PLATFORM_ENTROPY
469 */
470
471/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200472 * \def POLARSSL_MEMORY_DEBUG
473 *
474 * Enable debugging of buffer allocator memory issues. Automatically prints
475 * (to stderr) all (fatal) messages on memory allocation issues. Enables
476 * function for 'debug output' of allocated memory.
477 *
478 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
479 * fprintf()
480 *
481 * Uncomment this macro to let the buffer allocator print out error messages.
482#define POLARSSL_MEMORY_DEBUG
483*/
484
485/**
486 * \def POLARSSL_MEMORY_BACKTRACE
487 *
488 * Include backtrace information with each allocated block.
489 *
490 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
491 * GLIBC-compatible backtrace() an backtrace_symbols() support
492 *
493 * Uncomment this macro to include backtrace information
494#define POLARSSL_MEMORY_BACKTRACE
495 */
496
497/**
Paul Bakker48377d92013-08-30 12:06:24 +0200498 * \def POLARSSL_PKCS1_V15
499 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200500 * Enable support for PKCS#1 v1.5 encoding.
501 *
Paul Bakker48377d92013-08-30 12:06:24 +0200502 * Requires: POLARSSL_RSA_C
503 *
Paul Bakker48377d92013-08-30 12:06:24 +0200504 * This enables support for PKCS#1 v1.5 operations.
505 */
506#define POLARSSL_PKCS1_V15
507
508/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000509 * \def POLARSSL_PKCS1_V21
510 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200511 * Enable support for PKCS#1 v2.1 encoding.
512 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000513 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
514 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000515 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
516 */
517#define POLARSSL_PKCS1_V21
518
519/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000520 * \def POLARSSL_RSA_NO_CRT
521 *
522 * Do not use the Chinese Remainder Theorem for the RSA private operation.
523 *
524 * Uncomment this macro to disable the use of CRT in RSA.
525 *
526#define POLARSSL_RSA_NO_CRT
527 */
Paul Bakker15566e42011-04-24 21:19:15 +0000528
529/**
530 * \def POLARSSL_SELF_TEST
531 *
532 * Enable the checkup functions (*_self_test).
533 */
534#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000535
536/**
Paul Bakker40865c82013-01-31 17:13:13 +0100537 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
538 *
539 * Enable sending of alert messages in case of encountered errors as per RFC.
540 * If you choose not to send the alert messages, PolarSSL can still communicate
541 * with other servers, only debugging of failures is harder.
542 *
543 * The advantage of not sending alert messages, is that no information is given
544 * about reasons for failures thus preventing adversaries of gaining intel.
545 *
546 * Enable sending of all alert messages
547 */
548#define POLARSSL_SSL_ALERT_MESSAGES
549
550/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100551 * \def POLARSSL_SSL_DEBUG_ALL
552 *
553 * Enable the debug messages in SSL module for all issues.
554 * Debug messages have been disabled in some places to prevent timing
555 * attacks due to (unbalanced) debugging function calls.
556 *
557 * If you need all error reporting you should enable this during debugging,
558 * but remove this for production servers that should log as well.
559 *
560 * Uncomment this macro to report all debug messages on errors introducing
561 * a timing side-channel.
562 *
563#define POLARSSL_SSL_DEBUG_ALL
564 */
565
566/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000567 * \def POLARSSL_SSL_HW_RECORD_ACCEL
568 *
569 * Enable hooking functions in SSL module for hardware acceleration of
570 * individual records.
571 *
572 * Uncomment this macro to enable hooking functions.
573#define POLARSSL_SSL_HW_RECORD_ACCEL
574 */
575
576/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100577 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
578 *
579 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200580 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100581 *
582 * Comment this macro to disable support for SSLv2 Client Hello messages.
583 */
584#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
585
586/**
Paul Bakker05decb22013-08-15 13:33:48 +0200587 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
588 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200589 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200590 *
591 * Comment this macro to disable support for the max_fragment_length extension
592 */
593#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
594
595/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200596 * \def POLARSSL_SSL_PROTO_SSL3
597 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200598 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200599 *
600 * Requires: POLARSSL_MD5_C
601 * POLARSSL_SHA1_C
602 *
603 * Comment this macro to disable support for SSL 3.0
604 */
605#define POLARSSL_SSL_PROTO_SSL3
606
607/**
608 * \def POLARSSL_SSL_PROTO_TLS1
609 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200610 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200611 *
612 * Requires: POLARSSL_MD5_C
613 * POLARSSL_SHA1_C
614 *
615 * Comment this macro to disable support for TLS 1.0
616 */
617#define POLARSSL_SSL_PROTO_TLS1
618
619/**
620 * \def POLARSSL_SSL_PROTO_TLS1_1
621 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200622 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200623 *
624 * Requires: POLARSSL_MD5_C
625 * POLARSSL_SHA1_C
626 *
627 * Comment this macro to disable support for TLS 1.1
628 */
629#define POLARSSL_SSL_PROTO_TLS1_1
630
631/**
632 * \def POLARSSL_SSL_PROTO_TLS1_2
633 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200634 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200635 *
636 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
637 * (Depends on ciphersuites)
638 *
639 * Comment this macro to disable support for TLS 1.2
640 */
641#define POLARSSL_SSL_PROTO_TLS1_2
642
643/**
Paul Bakkera503a632013-08-14 13:48:06 +0200644 * \def POLARSSL_SSL_SESSION_TICKETS
645 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200646 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200647 *
648 * Requires: POLARSSL_AES_C
649 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200650 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200651 *
652 * Comment this macro to disable support for SSL session tickets
653 */
654#define POLARSSL_SSL_SESSION_TICKETS
655
656/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200657 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
658 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200659 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200660 *
661 * Comment this macro to disable support for server name indication in SSL
662 */
663#define POLARSSL_SSL_SERVER_NAME_INDICATION
664
665/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200666 * \def POLARSSL_SSL_TRUNCATED_HMAC
667 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200668 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200669 *
670 * Comment this macro to disable support for truncated HMAC in SSL
671 */
672#define POLARSSL_SSL_TRUNCATED_HMAC
673
674/**
Paul Bakker2466d932013-09-28 14:40:38 +0200675 * \def POLARSSL_THREADING_ALT
676 *
677 * Provide your own alternate threading implementation.
678 *
679 * Requires: POLARSSL_THREADING_C
680 *
681 * Uncomment this to allow your own alternate threading implementation.
682#define POLARSSL_THREADING_ALT
683 */
684
685/**
686 * \def POLARSSL_THREADING_DUMMY
687 *
688 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200689 * Warning: If you use this, all claims of thread-safety in the documentation
690 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200691 *
692 * Requires: POLARSSL_THREADING_C
693 *
694 * Uncomment this to enable code to compile like with threading enabled
695#define POLARSSL_THREADING_DUMMY
696 */
697
698/**
699 * \def POLARSSL_THREADING_PTHREAD
700 *
701 * Enable the pthread wrapper layer for the threading layer.
702 *
703 * Requires: POLARSSL_THREADING_C
704 *
705 * Uncomment this to enable pthread mutexes.
706#define POLARSSL_THREADING_PTHREAD
707 */
708
709/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200710 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
711 *
712 * If set, the X509 parser will not break-off when parsing an X509 certificate
713 * and encountering an extension in a v1 or v2 certificate.
714 *
715 * Uncomment to prevent an error.
716 *
717#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
718 */
719
720/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000721 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
722 *
723 * If set, the X509 parser will not break-off when parsing an X509 certificate
724 * and encountering an unknown critical extension.
725 *
726 * Uncomment to prevent an error.
727 *
728#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
729 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000730
731/**
732 * \def POLARSSL_ZLIB_SUPPORT
733 *
734 * If set, the SSL/TLS module uses ZLIB to support compression and
735 * decompression of packet data.
736 *
737 * Used in: library/ssl_tls.c
738 * library/ssl_cli.c
739 * library/ssl_srv.c
740 *
741 * This feature requires zlib library and headers to be present.
742 *
743 * Uncomment to enable use of ZLIB
744#define POLARSSL_ZLIB_SUPPORT
745 */
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200746/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000747
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000748/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000749 * \name SECTION: PolarSSL modules
750 *
751 * This section enables or disables entire modules in PolarSSL
752 * \{
753 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000754
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000755/**
756 * \def POLARSSL_AES_C
757 *
758 * Enable the AES block cipher.
759 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000760 * Module: library/aes.c
761 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000762 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000763 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000764 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000765 * This module enables the following ciphersuites (if other requisites are
766 * enabled as well):
767 * TLS_RSA_WITH_AES_128_CBC_SHA
768 * TLS_RSA_WITH_AES_256_CBC_SHA
769 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
770 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
771 * TLS_RSA_WITH_AES_128_CBC_SHA256
772 * TLS_RSA_WITH_AES_256_CBC_SHA256
773 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
774 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
775 * TLS_RSA_WITH_AES_128_GCM_SHA256
776 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100777 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
778 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200779 * TLS_PSK_WITH_AES_128_CBC_SHA
780 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100781 *
Paul Bakkercff68422013-09-15 20:43:33 +0200782 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000783 */
Paul Bakker40e46942009-01-03 21:51:57 +0000784#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000785
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000786/**
787 * \def POLARSSL_ARC4_C
788 *
789 * Enable the ARCFOUR stream cipher.
790 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000791 * Module: library/arc4.c
792 * Caller: library/ssl_tls.c
793 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100794 * This module enables the following ciphersuites (if other requisites are
795 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000796 * TLS_RSA_WITH_RC4_128_MD5
797 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100798 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200799 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000800 */
Paul Bakker40e46942009-01-03 21:51:57 +0000801#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000802
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000803/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000804 * \def POLARSSL_ASN1_PARSE_C
805 *
806 * Enable the generic ASN1 parser.
807 *
808 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200809 * Caller: library/x509.c
810 * library/dhm.c
811 * library/pkcs12.c
812 * library/pkcs5.c
813 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000814 */
815#define POLARSSL_ASN1_PARSE_C
816
817/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000818 * \def POLARSSL_ASN1_WRITE_C
819 *
820 * Enable the generic ASN1 writer.
821 *
822 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200823 * Caller: library/ecdsa.c
824 * library/pkwrite.c
825 * library/x509_create.c
826 * library/x509write_crt.c
827 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000828 */
829#define POLARSSL_ASN1_WRITE_C
830
831/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000832 * \def POLARSSL_BASE64_C
833 *
834 * Enable the Base64 module.
835 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000836 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000837 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000838 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000839 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000840 */
Paul Bakker40e46942009-01-03 21:51:57 +0000841#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000842
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000843/**
844 * \def POLARSSL_BIGNUM_C
845 *
Paul Bakker9a736322012-11-14 12:39:52 +0000846 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000847 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000848 * Module: library/bignum.c
849 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200850 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000851 * library/rsa.c
852 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000853 *
854 * This module is required for RSA and DHM support.
855 */
Paul Bakker40e46942009-01-03 21:51:57 +0000856#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000857
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000858/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000859 * \def POLARSSL_BLOWFISH_C
860 *
861 * Enable the Blowfish block cipher.
862 *
863 * Module: library/blowfish.c
864 */
865#define POLARSSL_BLOWFISH_C
866
867/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000868 * \def POLARSSL_CAMELLIA_C
869 *
870 * Enable the Camellia block cipher.
871 *
Paul Bakker38119b12009-01-10 23:31:23 +0000872 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000873 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000874 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000875 * This module enables the following ciphersuites (if other requisites are
876 * enabled as well):
877 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
878 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
879 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
880 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
881 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
882 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
883 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
884 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000885 */
886#define POLARSSL_CAMELLIA_C
887
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000888/**
889 * \def POLARSSL_CERTS_C
890 *
891 * Enable the test certificates.
892 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000893 * Module: library/certs.c
894 * Caller:
895 *
896 * This module is used for testing (ssl_client/server).
897 */
Paul Bakker40e46942009-01-03 21:51:57 +0000898#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000899
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000900/**
901 * \def POLARSSL_CIPHER_C
902 *
903 * Enable the generic cipher layer.
904 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000905 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200906 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000907 *
908 * Uncomment to enable generic cipher wrappers.
909 */
910#define POLARSSL_CIPHER_C
911
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000912/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000913 * \def POLARSSL_CTR_DRBG_C
914 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200915 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000916 *
917 * Module: library/ctr_drbg.c
918 * Caller:
919 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000920 * Requires: POLARSSL_AES_C
921 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000922 * This module provides the CTR_DRBG AES-256 random number generator.
923 */
924#define POLARSSL_CTR_DRBG_C
925
926/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000927 * \def POLARSSL_DEBUG_C
928 *
929 * Enable the debug functions.
930 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000931 * Module: library/debug.c
932 * Caller: library/ssl_cli.c
933 * library/ssl_srv.c
934 * library/ssl_tls.c
935 *
936 * This module provides debugging functions.
937 */
Paul Bakker40e46942009-01-03 21:51:57 +0000938#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000939
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000940/**
941 * \def POLARSSL_DES_C
942 *
943 * Enable the DES block cipher.
944 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000945 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100946 * Caller: library/pem.c
947 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000948 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000949 * This module enables the following ciphersuites (if other requisites are
950 * enabled as well):
951 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
952 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100953 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200954 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100955 *
Paul Bakkercff68422013-09-15 20:43:33 +0200956 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000957 */
Paul Bakker40e46942009-01-03 21:51:57 +0000958#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000959
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000960/**
961 * \def POLARSSL_DHM_C
962 *
963 * Enable the Diffie-Hellman-Merkle key exchange.
964 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000965 * Module: library/dhm.c
966 * Caller: library/ssl_cli.c
967 * library/ssl_srv.c
968 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000969 * This module enables the following ciphersuites (if other requisites are
970 * enabled as well):
971 * TLS_DHE_RSA_WITH_DES_CBC_SHA
972 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
973 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
974 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
975 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
976 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
977 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
978 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
979 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
980 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
981 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
982 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000983 */
Paul Bakker40e46942009-01-03 21:51:57 +0000984#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000985
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000986/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100987 * \def POLARSSL_ECDH_C
988 *
989 * Enable the elliptic curve Diffie-Hellman library.
990 *
991 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100992 * Caller: library/ssl_cli.c
993 * library/ssl_srv.c
994 *
995 * This module enables the following ciphersuites (if other requisites are
996 * enabled as well):
997 * TLS_ECDHE_RSA_WITH_NULL_SHA
998 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
999 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
1000 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
1001 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001002 *
1003 * Requires: POLARSSL_ECP_C
1004 */
1005#define POLARSSL_ECDH_C
1006
1007/**
1008 * \def POLARSSL_ECDSA_C
1009 *
1010 * Enable the elliptic curve DSA library.
1011 *
1012 * Module: library/ecdsa.c
1013 * Caller:
1014 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001015 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001016 */
1017#define POLARSSL_ECDSA_C
1018
1019/**
1020 * \def POLARSSL_ECP_C
1021 *
1022 * Enable the elliptic curve over GF(p) library.
1023 *
1024 * Module: library/ecp.c
1025 * Caller: library/ecdh.c
1026 * library/ecdsa.c
1027 *
1028 * Requires: POLARSSL_BIGNUM_C
1029 */
1030#define POLARSSL_ECP_C
1031
1032/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001033 * \def POLARSSL_ENTROPY_C
1034 *
1035 * Enable the platform-specific entropy code.
1036 *
1037 * Module: library/entropy.c
1038 * Caller:
1039 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001040 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001041 *
1042 * This module provides a generic entropy pool
1043 */
1044#define POLARSSL_ENTROPY_C
1045
1046/**
Paul Bakker9d781402011-05-09 16:17:09 +00001047 * \def POLARSSL_ERROR_C
1048 *
1049 * Enable error code to error string conversion.
1050 *
1051 * Module: library/error.c
1052 * Caller:
1053 *
1054 * This module enables err_strerror().
1055 */
1056#define POLARSSL_ERROR_C
1057
1058/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001059 * \def POLARSSL_GCM_C
1060 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001061 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001062 *
1063 * Module: library/gcm.c
1064 *
1065 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001066 *
1067 * This module enables the following ciphersuites (if other requisites are
1068 * enabled as well):
1069 * TLS_RSA_WITH_AES_128_GCM_SHA256
1070 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001071 */
1072#define POLARSSL_GCM_C
1073
1074/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001075 * \def POLARSSL_HAVEGE_C
1076 *
1077 * Enable the HAVEGE random generator.
1078 *
Paul Bakker2a844242013-06-24 13:01:53 +02001079 * Warning: the HAVEGE random generator is not suitable for virtualized
1080 * environments
1081 *
1082 * Warning: the HAVEGE random generator is dependent on timing and specific
1083 * processor traits. It is therefore not advised to use HAVEGE as
1084 * your applications primary random generator or primary entropy pool
1085 * input. As a secondary input to your entropy pool, it IS able add
1086 * the (limited) extra entropy it provides.
1087 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001088 * Module: library/havege.c
1089 * Caller:
1090 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001091 * Requires: POLARSSL_TIMING_C
1092 *
Paul Bakker2a844242013-06-24 13:01:53 +02001093 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001094#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001095 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001096
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001097/**
1098 * \def POLARSSL_MD_C
1099 *
1100 * Enable the generic message digest layer.
1101 *
Paul Bakker17373852011-01-06 14:20:01 +00001102 * Module: library/md.c
1103 * Caller:
1104 *
1105 * Uncomment to enable generic message digest wrappers.
1106 */
1107#define POLARSSL_MD_C
1108
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001109/**
1110 * \def POLARSSL_MD2_C
1111 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001112 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001113 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001114 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001115 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001116 *
1117 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1118 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001119#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001120 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001121
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001122/**
1123 * \def POLARSSL_MD4_C
1124 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001125 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001126 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001127 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001128 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001129 *
1130 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1131 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001132#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001133 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001134
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001135/**
1136 * \def POLARSSL_MD5_C
1137 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001138 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001139 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001140 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001141 * Caller: library/md.c
1142 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001143 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001144 *
1145 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001146 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001147 */
Paul Bakker40e46942009-01-03 21:51:57 +00001148#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001149
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001150/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001151 * \def POLARSSL_MEMORY_C
1152 *
1153 * Enable the memory allocation layer.
1154 * By default PolarSSL uses the system-provided malloc() and free().
1155 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1156 * are defined and unmodified)
1157 *
1158 * This allows different allocators (self-implemented or provided)
1159 *
1160 * Enable this layer to allow use of alternative memory allocators.
1161#define POLARSSL_MEMORY_C
1162 */
1163
1164/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001165 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1166 *
1167 * Enable the buffer allocator implementation that makes use of a (stack)
1168 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1169 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001170 *
1171 * Module: library/memory_buffer_alloc.c
1172 *
1173 * Requires: POLARSSL_MEMORY_C
1174 *
1175 * Enable this module to enable the buffer memory allocator.
1176#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1177 */
1178
1179/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001180 * \def POLARSSL_NET_C
1181 *
1182 * Enable the TCP/IP networking routines.
1183 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001184 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001185 *
1186 * This module provides TCP/IP networking routines.
1187 */
Paul Bakker40e46942009-01-03 21:51:57 +00001188#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001189
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001190/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001191 * \def POLARSSL_OID_C
1192 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001193 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001194 *
1195 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001196 * Caller: library/asn1write.c
1197 * library/pkcs5.c
1198 * library/pkparse.c
1199 * library/pkwrite.c
1200 * library/rsa.c
1201 * library/x509.c
1202 * library/x509_create.c
1203 * library/x509_crl.c
1204 * library/x509_crt.c
1205 * library/x509_csr.c
1206 * library/x509write_crt.c
1207 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001208 *
1209 * This modules translates between OIDs and internal values.
1210 */
1211#define POLARSSL_OID_C
1212
1213/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001214 * \def POLARSSL_PADLOCK_C
1215 *
1216 * Enable VIA Padlock support on x86.
1217 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001218 * Module: library/padlock.c
1219 * Caller: library/aes.c
1220 *
1221 * This modules adds support for the VIA PadLock on x86.
1222 */
Paul Bakker40e46942009-01-03 21:51:57 +00001223#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001224
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001225/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001226 * \def POLARSSL_PBKDF2_C
1227 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001228 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001229 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001230 *
1231 * Module: library/pbkdf2.c
1232 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001233 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001234 *
1235 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001236 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001237#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001238
1239/**
Paul Bakkercff68422013-09-15 20:43:33 +02001240 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001241 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001242 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001243 *
1244 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001245 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001246 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001247 * library/x509_crl.c
1248 * library/x509_crt.c
1249 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001250 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001251 * Requires: POLARSSL_BASE64_C
1252 *
Paul Bakkercff68422013-09-15 20:43:33 +02001253 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001254 */
Paul Bakkercff68422013-09-15 20:43:33 +02001255#define POLARSSL_PEM_PARSE_C
1256
1257/**
1258 * \def POLARSSL_PEM_WRITE_C
1259 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001260 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001261 *
1262 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001263 * Caller: library/pkwrite.c
1264 * library/x509write_crt.c
1265 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001266 *
1267 * Requires: POLARSSL_BASE64_C
1268 *
1269 * This modules adds support for encoding / writing PEM files.
1270 */
1271#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001272
1273/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001274 * \def POLARSSL_PK_C
1275 *
1276 * Enable the generic public (asymetric) key layer.
1277 *
1278 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001279 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001280 * library/ssl_cli.c
1281 * library/ssl_srv.c
1282 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001283 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1284 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001285 * Uncomment to enable generic public key wrappers.
1286 */
1287#define POLARSSL_PK_C
1288
1289/**
Paul Bakker4606c732013-09-15 17:04:23 +02001290 * \def POLARSSL_PK_PARSE_C
1291 *
1292 * Enable the generic public (asymetric) key parser.
1293 *
1294 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001295 * Caller: library/x509_crt.c
1296 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001297 *
1298 * Requires: POLARSSL_PK_C
1299 *
1300 * Uncomment to enable generic public key parse functions.
1301 */
1302#define POLARSSL_PK_PARSE_C
1303
1304/**
1305 * \def POLARSSL_PK_WRITE_C
1306 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001307 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001308 *
1309 * Module: library/pkwrite.c
1310 * Caller: library/x509write.c
1311 *
1312 * Requires: POLARSSL_PK_C
1313 *
1314 * Uncomment to enable generic public key write functions.
1315 */
1316#define POLARSSL_PK_WRITE_C
1317
1318/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001319 * \def POLARSSL_PKCS5_C
1320 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001321 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001322 *
1323 * Module: library/pkcs5.c
1324 *
1325 * Requires: POLARSSL_MD_C
1326 *
1327 * This module adds support for the PKCS#5 functions.
1328 */
1329#define POLARSSL_PKCS5_C
1330
1331/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001332 * \def POLARSSL_PKCS11_C
1333 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001334 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001335 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001336 * Module: library/pkcs11.c
1337 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001338 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001339 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001340 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001341 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001342 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1343#define POLARSSL_PKCS11_C
1344 */
1345
1346/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001347 * \def POLARSSL_PKCS12_C
1348 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001349 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001350 * Adds algorithms for parsing PKCS#8 encrypted private keys
1351 *
1352 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001353 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001354 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001355 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1356 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001357 *
1358 * This module enables PKCS#12 functions.
1359 */
1360#define POLARSSL_PKCS12_C
1361
1362/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001363 * \def POLARSSL_RSA_C
1364 *
1365 * Enable the RSA public-key cryptosystem.
1366 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001367 * Module: library/rsa.c
1368 * Caller: library/ssl_cli.c
1369 * library/ssl_srv.c
1370 * library/ssl_tls.c
1371 * library/x509.c
1372 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001373 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001374 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001375 * This module is required for SSL/TLS and MD5-signed certificates.
1376 */
Paul Bakker40e46942009-01-03 21:51:57 +00001377#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001378
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001379/**
1380 * \def POLARSSL_SHA1_C
1381 *
1382 * Enable the SHA1 cryptographic hash algorithm.
1383 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001384 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001385 * Caller: library/md.c
1386 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001387 * library/ssl_srv.c
1388 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001389 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001390 *
1391 * This module is required for SSL/TLS and SHA1-signed certificates.
1392 */
Paul Bakker40e46942009-01-03 21:51:57 +00001393#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001394
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001395/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001396 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001397 *
1398 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001399 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001400 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001401 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001402 * Caller: library/entropy.c
1403 * library/md.c
1404 * library/ssl_cli.c
1405 * library/ssl_srv.c
1406 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001407 *
1408 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001409 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001410 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001411#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001412
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001413/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001414 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001415 *
1416 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001417 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001418 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001419 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001420 * Caller: library/entropy.c
1421 * library/md.c
1422 * library/ssl_cli.c
1423 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001424 *
1425 * This module adds support for SHA-384 and SHA-512.
1426 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001427#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001428
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001429/**
Paul Bakker0a597072012-09-25 21:55:46 +00001430 * \def POLARSSL_SSL_CACHE_C
1431 *
1432 * Enable simple SSL cache implementation.
1433 *
1434 * Module: library/ssl_cache.c
1435 * Caller:
1436 *
1437 * Requires: POLARSSL_SSL_CACHE_C
1438 */
1439#define POLARSSL_SSL_CACHE_C
1440
1441/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001442 * \def POLARSSL_SSL_CLI_C
1443 *
1444 * Enable the SSL/TLS client code.
1445 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001446 * Module: library/ssl_cli.c
1447 * Caller:
1448 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001449 * Requires: POLARSSL_SSL_TLS_C
1450 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001451 * This module is required for SSL/TLS client support.
1452 */
Paul Bakker40e46942009-01-03 21:51:57 +00001453#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001454
Paul Bakker9a736322012-11-14 12:39:52 +00001455/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001456 * \def POLARSSL_SSL_SRV_C
1457 *
1458 * Enable the SSL/TLS server code.
1459 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001460 * Module: library/ssl_srv.c
1461 * Caller:
1462 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001463 * Requires: POLARSSL_SSL_TLS_C
1464 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001465 * This module is required for SSL/TLS server support.
1466 */
Paul Bakker40e46942009-01-03 21:51:57 +00001467#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001468
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001469/**
1470 * \def POLARSSL_SSL_TLS_C
1471 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001472 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001473 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001474 * Module: library/ssl_tls.c
1475 * Caller: library/ssl_cli.c
1476 * library/ssl_srv.c
1477 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001478 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001479 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001480 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001481 * This module is required for SSL/TLS.
1482 */
Paul Bakker40e46942009-01-03 21:51:57 +00001483#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001484
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001485/**
Paul Bakker2466d932013-09-28 14:40:38 +02001486 * \def POLARSSL_THREADING_C
1487 *
1488 * Enable the threading abstraction layer.
1489 * By default PolarSSL assumes it is used in a non-threaded environment or that
1490 * contexts are not shared between threads. If you do intend to use contexts
1491 * between threads, you will need to enable this layer to prevent race
1492 * conditions.
1493 *
1494 * Module: library/threading.c
1495 *
1496 * This allows different threading implementations (self-implemented or
1497 * provided).
1498 *
1499 * You will have to enable either POLARSSL_THREADING_ALT,
1500 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1501 *
1502 * Enable this layer to allow use of mutexes within PolarSSL
1503#define POLARSSL_THREADING_C
1504 */
1505
1506/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001507 * \def POLARSSL_TIMING_C
1508 *
1509 * Enable the portable timing interface.
1510 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001511 * Module: library/timing.c
1512 * Caller: library/havege.c
1513 *
1514 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001515 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001516#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001517
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001518/**
1519 * \def POLARSSL_VERSION_C
1520 *
1521 * Enable run-time version information.
1522 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001523 * Module: library/version.c
1524 *
1525 * This module provides run-time version information.
1526 */
1527#define POLARSSL_VERSION_C
1528
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001529/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001530 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001531 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001532 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001533 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001534 * Module: library/x509.c
1535 * Caller: library/x509_crl.c
1536 * library/x509_crt.c
1537 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001538 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001539 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001540 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001541 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001542 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001543 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001544#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001545
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001546/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001547 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001548 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001549 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001550 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001551 * Module: library/x509_crt.c
1552 * Caller: library/ssl_cli.c
1553 * library/ssl_srv.c
1554 * library/ssl_tls.c
1555 *
1556 * Requires: POLARSSL_X509_USE_C
1557 *
1558 * This module is required for X.509 certificate parsing.
1559 */
1560#define POLARSSL_X509_CRT_PARSE_C
1561
1562/**
1563 * \def POLARSSL_X509_CRL_PARSE_C
1564 *
1565 * Enable X.509 CRL parsing.
1566 *
1567 * Module: library/x509_crl.c
1568 * Caller: library/x509_crt.c
1569 *
1570 * Requires: POLARSSL_X509_USE_C
1571 *
1572 * This module is required for X.509 CRL parsing.
1573 */
1574#define POLARSSL_X509_CRL_PARSE_C
1575
1576/**
1577 * \def POLARSSL_X509_CSR_PARSE_C
1578 *
1579 * Enable X.509 Certificate Signing Request (CSR) parsing.
1580 *
1581 * Module: library/x509_csr.c
1582 * Caller: library/x509_crt_write.c
1583 *
1584 * Requires: POLARSSL_X509_USE_C
1585 *
1586 * This module is used for reading X.509 certificate request.
1587 */
1588#define POLARSSL_X509_CSR_PARSE_C
1589
1590/**
1591 * \def POLARSSL_X509_CREATE_C
1592 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001593 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001594 *
1595 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001596 *
Paul Bakker4606c732013-09-15 17:04:23 +02001597 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001598 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001599 * This module is the basis for creating X.509 certificates and CSRs.
1600 */
1601#define POLARSSL_X509_CREATE_C
1602
1603/**
1604 * \def POLARSSL_X509_CRT_WRITE_C
1605 *
1606 * Enable creating X.509 certificates.
1607 *
1608 * Module: library/x509_crt_write.c
1609 *
1610 * Requires: POLARSSL_CREATE_C
1611 *
1612 * This module is required for X.509 certificate creation.
1613 */
1614#define POLARSSL_X509_CRT_WRITE_C
1615
1616/**
1617 * \def POLARSSL_X509_CSR_WRITE_C
1618 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001619 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001620 *
1621 * Module: library/x509_csr_write.c
1622 *
1623 * Requires: POLARSSL_CREATE_C
1624 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001625 * This module is required for X.509 certificate request writing.
1626 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001627#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001628
1629/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001630 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001631 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001632 * Enable the XTEA block cipher.
1633 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001634 * Module: library/xtea.c
1635 * Caller:
1636 */
1637#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001638
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001639/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001640
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001641/**
1642 * \name SECTION: Module configuration options
1643 *
1644 * This section allows for the setting of module specific sizes and
1645 * configuration options. The default values are already present in the
1646 * relevant header files and should suffice for the regular use cases.
1647 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1648 * only if you have a good reason and know the consequences.
1649 *
1650 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1651 * header file take precedence.
1652 *
1653 * Please check the respective header file for documentation on these
1654 * parameters (to prevent duplicate documentation).
1655 *
1656 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1657 * \{
1658 */
1659//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1660
1661#if defined(POLARSSL_CONFIG_OPTIONS)
1662
1663// MPI / BIGNUM options
1664//
1665#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1666#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1667
1668// CTR_DRBG options
1669//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001670#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 +02001671#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1672#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1673#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1674#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1675
1676// Entropy options
1677//
1678#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1679#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1680
Paul Bakker6e339b52013-07-03 13:37:05 +02001681// Memory options
1682#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1683#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1684#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1685
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001686// SSL Cache options
1687//
1688#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1689#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1690
1691// SSL options
1692//
1693#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001694#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001695
1696#endif /* POLARSSL_CONFIG_OPTIONS */
1697
1698/* \} name */
1699
Paul Bakker7ad00f92013-04-18 23:05:25 +02001700/*
1701 * Sanity checks on defines and dependencies
1702 */
1703#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1704#error "POLARSSL_DHM_C defined, but not all prerequisites"
1705#endif
1706
1707#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1708#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1709#endif
1710
1711#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1712#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1713#endif
1714
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001715#if defined(POLARSSL_ECDSA_C) && \
1716 ( !defined(POLARSSL_ECP_C) || \
1717 !defined(POLARSSL_ASN1_PARSE_C) || \
1718 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001719#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1720#endif
1721
1722#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1723#error "POLARSSL_ECP_C defined, but not all prerequisites"
1724#endif
1725
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001726#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1727 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001728#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1729#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001730#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1731 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1732#error "CTR_DRBG_ENTROPY_LEN value too high"
1733#endif
1734#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1735 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1736#error "CTR_DRBG_ENTROPY_LEN value too high"
1737#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001738
1739#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1740#error "POLARSSL_GCM_C defined, but not all prerequisites"
1741#endif
1742
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001743#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1744#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1745#endif
1746
Paul Bakkere07f41d2013-04-19 09:08:57 +02001747#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1748#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1749#endif
1750
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001751#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1752 !defined(POLARSSL_ECDH_C)
1753#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1754#endif
1755
Paul Bakkere07f41d2013-04-19 09:08:57 +02001756#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1757 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001758 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001759#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1760#endif
1761
1762#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1763 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001764 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001765#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1766#endif
1767
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001768#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1769 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001770 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001771#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1772#endif
1773
Paul Bakkere07f41d2013-04-19 09:08:57 +02001774#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001775 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001776 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001777#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1778#endif
1779
1780#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001781 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001782 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001783#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1784#endif
1785
Paul Bakker6e339b52013-07-03 13:37:05 +02001786#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1787#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1788#endif
1789
Paul Bakker7ad00f92013-04-18 23:05:25 +02001790#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1791#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1792#endif
1793
Paul Bakkercff68422013-09-15 20:43:33 +02001794#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1795#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1796#endif
1797
1798#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1799#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001800#endif
1801
Paul Bakker4606c732013-09-15 17:04:23 +02001802#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1803#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1804#endif
1805
1806#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1807#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1808#endif
1809
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001810#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001811#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1812#endif
1813
1814#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1815 !defined(POLARSSL_OID_C) )
1816#error "POLARSSL_RSA_C defined, but not all prerequisites"
1817#endif
1818
1819#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1820#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1821#endif
1822
Paul Bakker577e0062013-08-28 11:57:20 +02001823#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001824 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001825#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1826#endif
1827
1828#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1829#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1830#endif
1831
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001832#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1833 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1834 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1835#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1836#endif
1837
1838#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1839 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1840#error "Illegal protocol selection"
1841#endif
1842
1843#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1844 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1845#error "Illegal protocol selection"
1846#endif
1847
1848#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1849 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1850 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1851#error "Illegal protocol selection"
1852#endif
1853
Paul Bakker59da0a42013-08-19 13:27:17 +02001854#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001855 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1856 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001857#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1858#endif
1859
Paul Bakker2466d932013-09-28 14:40:38 +02001860#if defined(POLARSSL_THREADING_DUMMY)
1861#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1862#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1863#endif
1864#define POLARSSL_THREADING_IMPL
1865#endif
1866
1867#if defined(POLARSSL_THREADING_PTHREAD)
1868#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1869#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
1870#endif
1871#define POLARSSL_THREADING_IMPL
1872#endif
1873
1874#if defined(POLARSSL_THREADING_ALT)
1875#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1876#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
1877#endif
1878#define POLARSSL_THREADING_IMPL
1879#endif
1880
1881#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
1882#error "POLARSSL_THREADING_C defined, single threading implementation required"
1883#endif
1884#undef POLARSSL_THREADING_IMPL
1885
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001886#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001887 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001888 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001889#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001890#endif
1891
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001892#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1893 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1894 !defined(POLARSSL_PK_WRITE_C) )
1895#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1896#endif
1897
1898#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1899#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1900#endif
1901
1902#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1903#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1904#endif
1905
1906#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1907#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1908#endif
1909
1910#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1911#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1912#endif
1913
1914#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1915#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001916#endif
1917
Paul Bakker5121ce52009-01-03 21:22:43 +00001918#endif /* config.h */