blob: 6208c426de2d2f69cdfa1bb2029f3014f847885f [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
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200244#define POLARSSL_ECP_DP_BP256R1_ENABLED
245#define POLARSSL_ECP_DP_BP384R1_ENABLED
246#define POLARSSL_ECP_DP_BP512R1_ENABLED
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200247
248/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200249 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
250 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200251 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200252 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200253 * This enables the following ciphersuites (if other requisites are
254 * enabled as well):
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200255 * TLS_PSK_WITH_RC4_128_SHA
256 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
257 * TLS_PSK_WITH_AES_128_CBC_SHA
258 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200259 * TLS_PSK_WITH_AES_128_CBC_SHA256
260 * TLS_PSK_WITH_AES_256_CBC_SHA384
261 * TLS_PSK_WITH_AES_128_GCM_SHA256
262 * TLS_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200263 */
264#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
265
266/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200267 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
268 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200269 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200270 *
271 * Requires: POLARSSL_DHM_C
272 *
273 * This enables the following ciphersuites (if other requisites are
274 * enabled as well):
275 * TLS_DHE_PSK_WITH_RC4_128_SHA
276 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
277 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
278 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200279 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
280 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
281 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
282 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200283 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200284#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200285
286/**
287 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
288 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200289 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Paul Bakker45bda902013-04-19 22:28:21 +0200290 * (NOT YET IMPLEMENTED)
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200291 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200292 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200293 *
294 * This enables the following ciphersuites (if other requisites are
295 * enabled as well):
296 * TLS_RSA_PSK_WITH_RC4_128_SHA
297 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
298 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
299 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
Paul Bakker45bda902013-04-19 22:28:21 +0200300 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
301 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
302 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
303 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200304#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
305 */
306
307/**
308 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
309 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200310 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200311 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200312 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200313 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200314 *
315 * This enables the following ciphersuites (if other requisites are
316 * enabled as well):
317 * TLS_RSA_WITH_AES_128_CBC_SHA
318 * TLS_RSA_WITH_AES_256_CBC_SHA
319 * TLS_RSA_WITH_AES_128_CBC_SHA256
320 * TLS_RSA_WITH_AES_256_CBC_SHA256
321 * TLS_RSA_WITH_AES_128_GCM_SHA256
322 * TLS_RSA_WITH_AES_256_GCM_SHA384
323 * TLS_RSA_WITH_RC4_128_MD5
324 * TLS_RSA_WITH_RC4_128_SHA
325 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
326 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
327 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
328 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
329 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
330 */
331#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
332
333/**
334 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
335 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200336 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200337 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200338 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200339 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200340 *
341 * This enables the following ciphersuites (if other requisites are
342 * enabled as well):
343 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
344 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
345 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
346 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
347 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
348 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
349 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
350 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
351 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
352 */
353#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
354
355/**
356 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
357 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200358 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200359 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200360 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200361 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200362 *
363 * This enables the following ciphersuites (if other requisites are
364 * enabled as well):
365 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
366 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
367 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
368 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
369 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
370 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
371 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
372 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
373 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
374 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
375 */
376#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
377
378/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200379 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
380 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200381 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200382 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200383 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_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 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200425 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200426 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200427 * Requires: POLARSSL_BIGNUM_C
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 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200491 * Enable support for PKCS#1 v1.5 encoding.
492 *
Paul Bakker48377d92013-08-30 12:06:24 +0200493 * Requires: POLARSSL_RSA_C
494 *
Paul Bakker48377d92013-08-30 12:06:24 +0200495 * This enables support for PKCS#1 v1.5 operations.
496 */
497#define POLARSSL_PKCS1_V15
498
499/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000500 * \def POLARSSL_PKCS1_V21
501 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200502 * Enable support for PKCS#1 v2.1 encoding.
503 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000504 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
505 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000506 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
507 */
508#define POLARSSL_PKCS1_V21
509
510/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000511 * \def POLARSSL_RSA_NO_CRT
512 *
513 * Do not use the Chinese Remainder Theorem for the RSA private operation.
514 *
515 * Uncomment this macro to disable the use of CRT in RSA.
516 *
517#define POLARSSL_RSA_NO_CRT
518 */
Paul Bakker15566e42011-04-24 21:19:15 +0000519
520/**
521 * \def POLARSSL_SELF_TEST
522 *
523 * Enable the checkup functions (*_self_test).
524 */
525#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000526
527/**
Paul Bakker40865c82013-01-31 17:13:13 +0100528 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
529 *
530 * Enable sending of alert messages in case of encountered errors as per RFC.
531 * If you choose not to send the alert messages, PolarSSL can still communicate
532 * with other servers, only debugging of failures is harder.
533 *
534 * The advantage of not sending alert messages, is that no information is given
535 * about reasons for failures thus preventing adversaries of gaining intel.
536 *
537 * Enable sending of all alert messages
538 */
539#define POLARSSL_SSL_ALERT_MESSAGES
540
541/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100542 * \def POLARSSL_SSL_DEBUG_ALL
543 *
544 * Enable the debug messages in SSL module for all issues.
545 * Debug messages have been disabled in some places to prevent timing
546 * attacks due to (unbalanced) debugging function calls.
547 *
548 * If you need all error reporting you should enable this during debugging,
549 * but remove this for production servers that should log as well.
550 *
551 * Uncomment this macro to report all debug messages on errors introducing
552 * a timing side-channel.
553 *
554#define POLARSSL_SSL_DEBUG_ALL
555 */
556
557/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000558 * \def POLARSSL_SSL_HW_RECORD_ACCEL
559 *
560 * Enable hooking functions in SSL module for hardware acceleration of
561 * individual records.
562 *
563 * Uncomment this macro to enable hooking functions.
564#define POLARSSL_SSL_HW_RECORD_ACCEL
565 */
566
567/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100568 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
569 *
570 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200571 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100572 *
573 * Comment this macro to disable support for SSLv2 Client Hello messages.
574 */
575#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
576
577/**
Paul Bakker05decb22013-08-15 13:33:48 +0200578 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
579 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200580 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200581 *
582 * Comment this macro to disable support for the max_fragment_length extension
583 */
584#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
585
586/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200587 * \def POLARSSL_SSL_PROTO_SSL3
588 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200589 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200590 *
591 * Requires: POLARSSL_MD5_C
592 * POLARSSL_SHA1_C
593 *
594 * Comment this macro to disable support for SSL 3.0
595 */
596#define POLARSSL_SSL_PROTO_SSL3
597
598/**
599 * \def POLARSSL_SSL_PROTO_TLS1
600 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200601 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200602 *
603 * Requires: POLARSSL_MD5_C
604 * POLARSSL_SHA1_C
605 *
606 * Comment this macro to disable support for TLS 1.0
607 */
608#define POLARSSL_SSL_PROTO_TLS1
609
610/**
611 * \def POLARSSL_SSL_PROTO_TLS1_1
612 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200613 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200614 *
615 * Requires: POLARSSL_MD5_C
616 * POLARSSL_SHA1_C
617 *
618 * Comment this macro to disable support for TLS 1.1
619 */
620#define POLARSSL_SSL_PROTO_TLS1_1
621
622/**
623 * \def POLARSSL_SSL_PROTO_TLS1_2
624 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200625 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200626 *
627 * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C
628 * (Depends on ciphersuites)
629 *
630 * Comment this macro to disable support for TLS 1.2
631 */
632#define POLARSSL_SSL_PROTO_TLS1_2
633
634/**
Paul Bakkera503a632013-08-14 13:48:06 +0200635 * \def POLARSSL_SSL_SESSION_TICKETS
636 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200637 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200638 *
639 * Requires: POLARSSL_AES_C
640 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200641 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200642 *
643 * Comment this macro to disable support for SSL session tickets
644 */
645#define POLARSSL_SSL_SESSION_TICKETS
646
647/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200648 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
649 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200650 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200651 *
652 * Comment this macro to disable support for server name indication in SSL
653 */
654#define POLARSSL_SSL_SERVER_NAME_INDICATION
655
656/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200657 * \def POLARSSL_SSL_TRUNCATED_HMAC
658 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200659 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200660 *
661 * Comment this macro to disable support for truncated HMAC in SSL
662 */
663#define POLARSSL_SSL_TRUNCATED_HMAC
664
665/**
Paul Bakker2466d932013-09-28 14:40:38 +0200666 * \def POLARSSL_THREADING_ALT
667 *
668 * Provide your own alternate threading implementation.
669 *
670 * Requires: POLARSSL_THREADING_C
671 *
672 * Uncomment this to allow your own alternate threading implementation.
673#define POLARSSL_THREADING_ALT
674 */
675
676/**
677 * \def POLARSSL_THREADING_DUMMY
678 *
679 * Provide a dummy threading implementation.
Paul Bakker6838bd12013-09-30 13:56:38 +0200680 * Warning: If you use this, all claims of thread-safety in the documentation
681 * are void!
Paul Bakker2466d932013-09-28 14:40:38 +0200682 *
683 * Requires: POLARSSL_THREADING_C
684 *
685 * Uncomment this to enable code to compile like with threading enabled
686#define POLARSSL_THREADING_DUMMY
687 */
688
689/**
690 * \def POLARSSL_THREADING_PTHREAD
691 *
692 * Enable the pthread wrapper layer for the threading layer.
693 *
694 * Requires: POLARSSL_THREADING_C
695 *
696 * Uncomment this to enable pthread mutexes.
697#define POLARSSL_THREADING_PTHREAD
698 */
699
700/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200701 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
702 *
703 * If set, the X509 parser will not break-off when parsing an X509 certificate
704 * and encountering an extension in a v1 or v2 certificate.
705 *
706 * Uncomment to prevent an error.
707 *
708#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
709 */
710
711/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000712 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
713 *
714 * If set, the X509 parser will not break-off when parsing an X509 certificate
715 * and encountering an unknown critical extension.
716 *
717 * Uncomment to prevent an error.
718 *
719#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
720 */
Paul Bakker2770fbd2012-07-03 13:30:23 +0000721
722/**
723 * \def POLARSSL_ZLIB_SUPPORT
724 *
725 * If set, the SSL/TLS module uses ZLIB to support compression and
726 * decompression of packet data.
727 *
728 * Used in: library/ssl_tls.c
729 * library/ssl_cli.c
730 * library/ssl_srv.c
731 *
732 * This feature requires zlib library and headers to be present.
733 *
734 * Uncomment to enable use of ZLIB
735#define POLARSSL_ZLIB_SUPPORT
736 */
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200737/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000738
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000739/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000740 * \name SECTION: PolarSSL modules
741 *
742 * This section enables or disables entire modules in PolarSSL
743 * \{
744 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000745
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000746/**
747 * \def POLARSSL_AES_C
748 *
749 * Enable the AES block cipher.
750 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000751 * Module: library/aes.c
752 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000753 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000754 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000755 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000756 * This module enables the following ciphersuites (if other requisites are
757 * enabled as well):
758 * TLS_RSA_WITH_AES_128_CBC_SHA
759 * TLS_RSA_WITH_AES_256_CBC_SHA
760 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
761 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
762 * TLS_RSA_WITH_AES_128_CBC_SHA256
763 * TLS_RSA_WITH_AES_256_CBC_SHA256
764 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
765 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
766 * TLS_RSA_WITH_AES_128_GCM_SHA256
767 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker41c83d32013-03-20 14:39:14 +0100768 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
769 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200770 * TLS_PSK_WITH_AES_128_CBC_SHA
771 * TLS_PSK_WITH_AES_256_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100772 *
Paul Bakkercff68422013-09-15 20:43:33 +0200773 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000774 */
Paul Bakker40e46942009-01-03 21:51:57 +0000775#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000776
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000777/**
778 * \def POLARSSL_ARC4_C
779 *
780 * Enable the ARCFOUR stream cipher.
781 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000782 * Module: library/arc4.c
783 * Caller: library/ssl_tls.c
784 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100785 * This module enables the following ciphersuites (if other requisites are
786 * enabled as well):
Paul Bakker645ce3a2012-10-31 12:32:41 +0000787 * TLS_RSA_WITH_RC4_128_MD5
788 * TLS_RSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100789 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200790 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000791 */
Paul Bakker40e46942009-01-03 21:51:57 +0000792#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000793
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000794/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000795 * \def POLARSSL_ASN1_PARSE_C
796 *
797 * Enable the generic ASN1 parser.
798 *
799 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200800 * Caller: library/x509.c
801 * library/dhm.c
802 * library/pkcs12.c
803 * library/pkcs5.c
804 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000805 */
806#define POLARSSL_ASN1_PARSE_C
807
808/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000809 * \def POLARSSL_ASN1_WRITE_C
810 *
811 * Enable the generic ASN1 writer.
812 *
813 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200814 * Caller: library/ecdsa.c
815 * library/pkwrite.c
816 * library/x509_create.c
817 * library/x509write_crt.c
818 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000819 */
820#define POLARSSL_ASN1_WRITE_C
821
822/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000823 * \def POLARSSL_BASE64_C
824 *
825 * Enable the Base64 module.
826 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000827 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +0000828 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000829 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000830 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +0000831 */
Paul Bakker40e46942009-01-03 21:51:57 +0000832#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000833
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000834/**
835 * \def POLARSSL_BIGNUM_C
836 *
Paul Bakker9a736322012-11-14 12:39:52 +0000837 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000838 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000839 * Module: library/bignum.c
840 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200841 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000842 * library/rsa.c
843 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000844 *
845 * This module is required for RSA and DHM support.
846 */
Paul Bakker40e46942009-01-03 21:51:57 +0000847#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000848
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000849/**
Paul Bakkera9379c02012-07-04 11:02:11 +0000850 * \def POLARSSL_BLOWFISH_C
851 *
852 * Enable the Blowfish block cipher.
853 *
854 * Module: library/blowfish.c
855 */
856#define POLARSSL_BLOWFISH_C
857
858/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000859 * \def POLARSSL_CAMELLIA_C
860 *
861 * Enable the Camellia block cipher.
862 *
Paul Bakker38119b12009-01-10 23:31:23 +0000863 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000864 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000865 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000866 * This module enables the following ciphersuites (if other requisites are
867 * enabled as well):
868 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
869 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
870 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
871 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
872 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
873 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
874 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
875 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +0000876 */
877#define POLARSSL_CAMELLIA_C
878
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000879/**
880 * \def POLARSSL_CERTS_C
881 *
882 * Enable the test certificates.
883 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000884 * Module: library/certs.c
885 * Caller:
886 *
887 * This module is used for testing (ssl_client/server).
888 */
Paul Bakker40e46942009-01-03 21:51:57 +0000889#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000890
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000891/**
892 * \def POLARSSL_CIPHER_C
893 *
894 * Enable the generic cipher layer.
895 *
Paul Bakker8123e9d2011-01-06 15:37:30 +0000896 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +0200897 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +0000898 *
899 * Uncomment to enable generic cipher wrappers.
900 */
901#define POLARSSL_CIPHER_C
902
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000903/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000904 * \def POLARSSL_CTR_DRBG_C
905 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200906 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000907 *
908 * Module: library/ctr_drbg.c
909 * Caller:
910 *
Paul Bakker6083fd22011-12-03 21:45:14 +0000911 * Requires: POLARSSL_AES_C
912 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000913 * This module provides the CTR_DRBG AES-256 random number generator.
914 */
915#define POLARSSL_CTR_DRBG_C
916
917/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000918 * \def POLARSSL_DEBUG_C
919 *
920 * Enable the debug functions.
921 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000922 * Module: library/debug.c
923 * Caller: library/ssl_cli.c
924 * library/ssl_srv.c
925 * library/ssl_tls.c
926 *
927 * This module provides debugging functions.
928 */
Paul Bakker40e46942009-01-03 21:51:57 +0000929#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000930
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000931/**
932 * \def POLARSSL_DES_C
933 *
934 * Enable the DES block cipher.
935 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000936 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +0100937 * Caller: library/pem.c
938 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000939 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000940 * This module enables the following ciphersuites (if other requisites are
941 * enabled as well):
942 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
943 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100944 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200945 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100946 *
Paul Bakkercff68422013-09-15 20:43:33 +0200947 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000948 */
Paul Bakker40e46942009-01-03 21:51:57 +0000949#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000950
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000951/**
952 * \def POLARSSL_DHM_C
953 *
954 * Enable the Diffie-Hellman-Merkle key exchange.
955 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000956 * Module: library/dhm.c
957 * Caller: library/ssl_cli.c
958 * library/ssl_srv.c
959 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000960 * This module enables the following ciphersuites (if other requisites are
961 * enabled as well):
962 * TLS_DHE_RSA_WITH_DES_CBC_SHA
963 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
964 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
965 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
966 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
967 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
968 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
969 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
970 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
971 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
972 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
973 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker5121ce52009-01-03 21:22:43 +0000974 */
Paul Bakker40e46942009-01-03 21:51:57 +0000975#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000976
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000977/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100978 * \def POLARSSL_ECDH_C
979 *
980 * Enable the elliptic curve Diffie-Hellman library.
981 *
982 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +0100983 * Caller: library/ssl_cli.c
984 * library/ssl_srv.c
985 *
986 * This module enables the following ciphersuites (if other requisites are
987 * enabled as well):
988 * TLS_ECDHE_RSA_WITH_NULL_SHA
989 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
990 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
991 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
992 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100993 *
994 * Requires: POLARSSL_ECP_C
995 */
996#define POLARSSL_ECDH_C
997
998/**
999 * \def POLARSSL_ECDSA_C
1000 *
1001 * Enable the elliptic curve DSA library.
1002 *
1003 * Module: library/ecdsa.c
1004 * Caller:
1005 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001006 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001007 */
1008#define POLARSSL_ECDSA_C
1009
1010/**
1011 * \def POLARSSL_ECP_C
1012 *
1013 * Enable the elliptic curve over GF(p) library.
1014 *
1015 * Module: library/ecp.c
1016 * Caller: library/ecdh.c
1017 * library/ecdsa.c
1018 *
1019 * Requires: POLARSSL_BIGNUM_C
1020 */
1021#define POLARSSL_ECP_C
1022
1023/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001024 * \def POLARSSL_ENTROPY_C
1025 *
1026 * Enable the platform-specific entropy code.
1027 *
1028 * Module: library/entropy.c
1029 * Caller:
1030 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001031 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001032 *
1033 * This module provides a generic entropy pool
1034 */
1035#define POLARSSL_ENTROPY_C
1036
1037/**
Paul Bakker9d781402011-05-09 16:17:09 +00001038 * \def POLARSSL_ERROR_C
1039 *
1040 * Enable error code to error string conversion.
1041 *
1042 * Module: library/error.c
1043 * Caller:
1044 *
1045 * This module enables err_strerror().
1046 */
1047#define POLARSSL_ERROR_C
1048
1049/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001050 * \def POLARSSL_GCM_C
1051 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001052 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001053 *
1054 * Module: library/gcm.c
1055 *
1056 * Requires: POLARSSL_AES_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001057 *
1058 * This module enables the following ciphersuites (if other requisites are
1059 * enabled as well):
1060 * TLS_RSA_WITH_AES_128_GCM_SHA256
1061 * TLS_RSA_WITH_AES_256_GCM_SHA384
Paul Bakker89e80c92012-03-20 13:50:09 +00001062 */
1063#define POLARSSL_GCM_C
1064
1065/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001066 * \def POLARSSL_HAVEGE_C
1067 *
1068 * Enable the HAVEGE random generator.
1069 *
Paul Bakker2a844242013-06-24 13:01:53 +02001070 * Warning: the HAVEGE random generator is not suitable for virtualized
1071 * environments
1072 *
1073 * Warning: the HAVEGE random generator is dependent on timing and specific
1074 * processor traits. It is therefore not advised to use HAVEGE as
1075 * your applications primary random generator or primary entropy pool
1076 * input. As a secondary input to your entropy pool, it IS able add
1077 * the (limited) extra entropy it provides.
1078 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001079 * Module: library/havege.c
1080 * Caller:
1081 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001082 * Requires: POLARSSL_TIMING_C
1083 *
Paul Bakker2a844242013-06-24 13:01:53 +02001084 * Uncomment to enable the HAVEGE random generator.
Paul Bakker40e46942009-01-03 21:51:57 +00001085#define POLARSSL_HAVEGE_C
Paul Bakker2a844242013-06-24 13:01:53 +02001086 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001087
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001088/**
1089 * \def POLARSSL_MD_C
1090 *
1091 * Enable the generic message digest layer.
1092 *
Paul Bakker17373852011-01-06 14:20:01 +00001093 * Module: library/md.c
1094 * Caller:
1095 *
1096 * Uncomment to enable generic message digest wrappers.
1097 */
1098#define POLARSSL_MD_C
1099
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001100/**
1101 * \def POLARSSL_MD2_C
1102 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001103 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001104 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001105 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001106 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001107 *
1108 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
1109 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001110#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001111 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001112
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001113/**
1114 * \def POLARSSL_MD4_C
1115 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001116 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001117 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001118 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001119 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001120 *
1121 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
1122 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001123#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +00001124 */
Paul Bakker5121ce52009-01-03 21:22:43 +00001125
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001126/**
1127 * \def POLARSSL_MD5_C
1128 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001129 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001130 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001131 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001132 * Caller: library/md.c
1133 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001134 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001135 *
1136 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001137 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001138 */
Paul Bakker40e46942009-01-03 21:51:57 +00001139#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001140
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001141/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001142 * \def POLARSSL_MEMORY_C
1143 *
1144 * Enable the memory allocation layer.
1145 * By default PolarSSL uses the system-provided malloc() and free().
1146 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1147 * are defined and unmodified)
1148 *
1149 * This allows different allocators (self-implemented or provided)
1150 *
1151 * Enable this layer to allow use of alternative memory allocators.
1152#define POLARSSL_MEMORY_C
1153 */
1154
1155/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001156 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1157 *
1158 * Enable the buffer allocator implementation that makes use of a (stack)
1159 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1160 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001161 *
1162 * Module: library/memory_buffer_alloc.c
1163 *
1164 * Requires: POLARSSL_MEMORY_C
1165 *
1166 * Enable this module to enable the buffer memory allocator.
1167#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1168 */
1169
1170/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001171 * \def POLARSSL_NET_C
1172 *
1173 * Enable the TCP/IP networking routines.
1174 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001175 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001176 *
1177 * This module provides TCP/IP networking routines.
1178 */
Paul Bakker40e46942009-01-03 21:51:57 +00001179#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001180
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001181/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001182 * \def POLARSSL_OID_C
1183 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001184 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001185 *
1186 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001187 * Caller: library/asn1write.c
1188 * library/pkcs5.c
1189 * library/pkparse.c
1190 * library/pkwrite.c
1191 * library/rsa.c
1192 * library/x509.c
1193 * library/x509_create.c
1194 * library/x509_crl.c
1195 * library/x509_crt.c
1196 * library/x509_csr.c
1197 * library/x509write_crt.c
1198 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001199 *
1200 * This modules translates between OIDs and internal values.
1201 */
1202#define POLARSSL_OID_C
1203
1204/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001205 * \def POLARSSL_PADLOCK_C
1206 *
1207 * Enable VIA Padlock support on x86.
1208 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001209 * Module: library/padlock.c
1210 * Caller: library/aes.c
1211 *
1212 * This modules adds support for the VIA PadLock on x86.
1213 */
Paul Bakker40e46942009-01-03 21:51:57 +00001214#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001215
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001216/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001217 * \def POLARSSL_PBKDF2_C
1218 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001219 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001220 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001221 *
1222 * Module: library/pbkdf2.c
1223 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001224 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001225 *
1226 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001227 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001228#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001229
1230/**
Paul Bakkercff68422013-09-15 20:43:33 +02001231 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001232 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001233 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001234 *
1235 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001236 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001237 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001238 * library/x509_crl.c
1239 * library/x509_crt.c
1240 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001241 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001242 * Requires: POLARSSL_BASE64_C
1243 *
Paul Bakkercff68422013-09-15 20:43:33 +02001244 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001245 */
Paul Bakkercff68422013-09-15 20:43:33 +02001246#define POLARSSL_PEM_PARSE_C
1247
1248/**
1249 * \def POLARSSL_PEM_WRITE_C
1250 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001251 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001252 *
1253 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001254 * Caller: library/pkwrite.c
1255 * library/x509write_crt.c
1256 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001257 *
1258 * Requires: POLARSSL_BASE64_C
1259 *
1260 * This modules adds support for encoding / writing PEM files.
1261 */
1262#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001263
1264/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001265 * \def POLARSSL_PK_C
1266 *
1267 * Enable the generic public (asymetric) key layer.
1268 *
1269 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001270 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001271 * library/ssl_cli.c
1272 * library/ssl_srv.c
1273 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001274 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1275 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001276 * Uncomment to enable generic public key wrappers.
1277 */
1278#define POLARSSL_PK_C
1279
1280/**
Paul Bakker4606c732013-09-15 17:04:23 +02001281 * \def POLARSSL_PK_PARSE_C
1282 *
1283 * Enable the generic public (asymetric) key parser.
1284 *
1285 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001286 * Caller: library/x509_crt.c
1287 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001288 *
1289 * Requires: POLARSSL_PK_C
1290 *
1291 * Uncomment to enable generic public key parse functions.
1292 */
1293#define POLARSSL_PK_PARSE_C
1294
1295/**
1296 * \def POLARSSL_PK_WRITE_C
1297 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001298 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001299 *
1300 * Module: library/pkwrite.c
1301 * Caller: library/x509write.c
1302 *
1303 * Requires: POLARSSL_PK_C
1304 *
1305 * Uncomment to enable generic public key write functions.
1306 */
1307#define POLARSSL_PK_WRITE_C
1308
1309/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001310 * \def POLARSSL_PKCS5_C
1311 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001312 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001313 *
1314 * Module: library/pkcs5.c
1315 *
1316 * Requires: POLARSSL_MD_C
1317 *
1318 * This module adds support for the PKCS#5 functions.
1319 */
1320#define POLARSSL_PKCS5_C
1321
1322/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001323 * \def POLARSSL_PKCS11_C
1324 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001325 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001326 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001327 * Module: library/pkcs11.c
1328 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001329 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001330 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001331 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001332 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001333 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
1334#define POLARSSL_PKCS11_C
1335 */
1336
1337/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001338 * \def POLARSSL_PKCS12_C
1339 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001340 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001341 * Adds algorithms for parsing PKCS#8 encrypted private keys
1342 *
1343 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001344 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001345 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001346 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1347 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001348 *
1349 * This module enables PKCS#12 functions.
1350 */
1351#define POLARSSL_PKCS12_C
1352
1353/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001354 * \def POLARSSL_RSA_C
1355 *
1356 * Enable the RSA public-key cryptosystem.
1357 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001358 * Module: library/rsa.c
1359 * Caller: library/ssl_cli.c
1360 * library/ssl_srv.c
1361 * library/ssl_tls.c
1362 * library/x509.c
1363 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001364 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001365 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001366 * This module is required for SSL/TLS and MD5-signed certificates.
1367 */
Paul Bakker40e46942009-01-03 21:51:57 +00001368#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001369
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001370/**
1371 * \def POLARSSL_SHA1_C
1372 *
1373 * Enable the SHA1 cryptographic hash algorithm.
1374 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001375 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001376 * Caller: library/md.c
1377 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001378 * library/ssl_srv.c
1379 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001380 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001381 *
1382 * This module is required for SSL/TLS and SHA1-signed certificates.
1383 */
Paul Bakker40e46942009-01-03 21:51:57 +00001384#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001385
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001386/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001387 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001388 *
1389 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001390 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001391 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001392 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001393 * Caller: library/entropy.c
1394 * library/md.c
1395 * library/ssl_cli.c
1396 * library/ssl_srv.c
1397 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001398 *
1399 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001400 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001401 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001402#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001403
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001404/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001405 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001406 *
1407 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001408 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001409 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001410 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001411 * Caller: library/entropy.c
1412 * library/md.c
1413 * library/ssl_cli.c
1414 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001415 *
1416 * This module adds support for SHA-384 and SHA-512.
1417 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001418#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001419
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001420/**
Paul Bakker0a597072012-09-25 21:55:46 +00001421 * \def POLARSSL_SSL_CACHE_C
1422 *
1423 * Enable simple SSL cache implementation.
1424 *
1425 * Module: library/ssl_cache.c
1426 * Caller:
1427 *
1428 * Requires: POLARSSL_SSL_CACHE_C
1429 */
1430#define POLARSSL_SSL_CACHE_C
1431
1432/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001433 * \def POLARSSL_SSL_CLI_C
1434 *
1435 * Enable the SSL/TLS client code.
1436 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001437 * Module: library/ssl_cli.c
1438 * Caller:
1439 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001440 * Requires: POLARSSL_SSL_TLS_C
1441 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001442 * This module is required for SSL/TLS client support.
1443 */
Paul Bakker40e46942009-01-03 21:51:57 +00001444#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001445
Paul Bakker9a736322012-11-14 12:39:52 +00001446/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001447 * \def POLARSSL_SSL_SRV_C
1448 *
1449 * Enable the SSL/TLS server code.
1450 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001451 * Module: library/ssl_srv.c
1452 * Caller:
1453 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001454 * Requires: POLARSSL_SSL_TLS_C
1455 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001456 * This module is required for SSL/TLS server support.
1457 */
Paul Bakker40e46942009-01-03 21:51:57 +00001458#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001459
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001460/**
1461 * \def POLARSSL_SSL_TLS_C
1462 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001463 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001464 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001465 * Module: library/ssl_tls.c
1466 * Caller: library/ssl_cli.c
1467 * library/ssl_srv.c
1468 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001469 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001470 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001471 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001472 * This module is required for SSL/TLS.
1473 */
Paul Bakker40e46942009-01-03 21:51:57 +00001474#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001475
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001476/**
Paul Bakker2466d932013-09-28 14:40:38 +02001477 * \def POLARSSL_THREADING_C
1478 *
1479 * Enable the threading abstraction layer.
1480 * By default PolarSSL assumes it is used in a non-threaded environment or that
1481 * contexts are not shared between threads. If you do intend to use contexts
1482 * between threads, you will need to enable this layer to prevent race
1483 * conditions.
1484 *
1485 * Module: library/threading.c
1486 *
1487 * This allows different threading implementations (self-implemented or
1488 * provided).
1489 *
1490 * You will have to enable either POLARSSL_THREADING_ALT,
1491 * POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
1492 *
1493 * Enable this layer to allow use of mutexes within PolarSSL
1494#define POLARSSL_THREADING_C
1495 */
1496
1497/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001498 * \def POLARSSL_TIMING_C
1499 *
1500 * Enable the portable timing interface.
1501 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001502 * Module: library/timing.c
1503 * Caller: library/havege.c
1504 *
1505 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001506 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001507#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001508
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001509/**
1510 * \def POLARSSL_VERSION_C
1511 *
1512 * Enable run-time version information.
1513 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001514 * Module: library/version.c
1515 *
1516 * This module provides run-time version information.
1517 */
1518#define POLARSSL_VERSION_C
1519
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001520/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001521 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001522 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001523 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001524 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001525 * Module: library/x509.c
1526 * Caller: library/x509_crl.c
1527 * library/x509_crt.c
1528 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001529 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001530 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001531 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001532 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001533 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001534 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001535#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001536
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001537/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001538 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001539 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001540 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001541 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001542 * Module: library/x509_crt.c
1543 * Caller: library/ssl_cli.c
1544 * library/ssl_srv.c
1545 * library/ssl_tls.c
1546 *
1547 * Requires: POLARSSL_X509_USE_C
1548 *
1549 * This module is required for X.509 certificate parsing.
1550 */
1551#define POLARSSL_X509_CRT_PARSE_C
1552
1553/**
1554 * \def POLARSSL_X509_CRL_PARSE_C
1555 *
1556 * Enable X.509 CRL parsing.
1557 *
1558 * Module: library/x509_crl.c
1559 * Caller: library/x509_crt.c
1560 *
1561 * Requires: POLARSSL_X509_USE_C
1562 *
1563 * This module is required for X.509 CRL parsing.
1564 */
1565#define POLARSSL_X509_CRL_PARSE_C
1566
1567/**
1568 * \def POLARSSL_X509_CSR_PARSE_C
1569 *
1570 * Enable X.509 Certificate Signing Request (CSR) parsing.
1571 *
1572 * Module: library/x509_csr.c
1573 * Caller: library/x509_crt_write.c
1574 *
1575 * Requires: POLARSSL_X509_USE_C
1576 *
1577 * This module is used for reading X.509 certificate request.
1578 */
1579#define POLARSSL_X509_CSR_PARSE_C
1580
1581/**
1582 * \def POLARSSL_X509_CREATE_C
1583 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001584 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001585 *
1586 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001587 *
Paul Bakker4606c732013-09-15 17:04:23 +02001588 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001589 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001590 * This module is the basis for creating X.509 certificates and CSRs.
1591 */
1592#define POLARSSL_X509_CREATE_C
1593
1594/**
1595 * \def POLARSSL_X509_CRT_WRITE_C
1596 *
1597 * Enable creating X.509 certificates.
1598 *
1599 * Module: library/x509_crt_write.c
1600 *
1601 * Requires: POLARSSL_CREATE_C
1602 *
1603 * This module is required for X.509 certificate creation.
1604 */
1605#define POLARSSL_X509_CRT_WRITE_C
1606
1607/**
1608 * \def POLARSSL_X509_CSR_WRITE_C
1609 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001610 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001611 *
1612 * Module: library/x509_csr_write.c
1613 *
1614 * Requires: POLARSSL_CREATE_C
1615 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001616 * This module is required for X.509 certificate request writing.
1617 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001618#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001619
1620/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001621 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001622 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001623 * Enable the XTEA block cipher.
1624 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001625 * Module: library/xtea.c
1626 * Caller:
1627 */
1628#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001629
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001630/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001631
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001632/**
1633 * \name SECTION: Module configuration options
1634 *
1635 * This section allows for the setting of module specific sizes and
1636 * configuration options. The default values are already present in the
1637 * relevant header files and should suffice for the regular use cases.
1638 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1639 * only if you have a good reason and know the consequences.
1640 *
1641 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1642 * header file take precedence.
1643 *
1644 * Please check the respective header file for documentation on these
1645 * parameters (to prevent duplicate documentation).
1646 *
1647 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1648 * \{
1649 */
1650//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1651
1652#if defined(POLARSSL_CONFIG_OPTIONS)
1653
1654// MPI / BIGNUM options
1655//
1656#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1657#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1658
1659// CTR_DRBG options
1660//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001661#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 +02001662#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1663#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1664#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1665#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1666
1667// Entropy options
1668//
1669#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1670#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1671
Paul Bakker6e339b52013-07-03 13:37:05 +02001672// Memory options
1673#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1674#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1675#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1676
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001677// SSL Cache options
1678//
1679#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1680#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1681
1682// SSL options
1683//
1684#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001685#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001686
1687#endif /* POLARSSL_CONFIG_OPTIONS */
1688
1689/* \} name */
1690
Paul Bakker7ad00f92013-04-18 23:05:25 +02001691/*
1692 * Sanity checks on defines and dependencies
1693 */
1694#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1695#error "POLARSSL_DHM_C defined, but not all prerequisites"
1696#endif
1697
1698#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1699#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1700#endif
1701
1702#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1703#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1704#endif
1705
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001706#if defined(POLARSSL_ECDSA_C) && \
1707 ( !defined(POLARSSL_ECP_C) || \
1708 !defined(POLARSSL_ASN1_PARSE_C) || \
1709 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001710#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1711#endif
1712
1713#if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C)
1714#error "POLARSSL_ECP_C defined, but not all prerequisites"
1715#endif
1716
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001717#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1718 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001719#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1720#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001721#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1722 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1723#error "CTR_DRBG_ENTROPY_LEN value too high"
1724#endif
1725#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1726 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1727#error "CTR_DRBG_ENTROPY_LEN value too high"
1728#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001729
1730#if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C)
1731#error "POLARSSL_GCM_C defined, but not all prerequisites"
1732#endif
1733
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001734#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1735#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1736#endif
1737
Paul Bakkere07f41d2013-04-19 09:08:57 +02001738#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1739#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1740#endif
1741
1742#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1743 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001744 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001745#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1746#endif
1747
1748#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1749 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001750 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001751#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1752#endif
1753
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001754#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
1755 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001756 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02001757#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
1758#endif
1759
Paul Bakkere07f41d2013-04-19 09:08:57 +02001760#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001761 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001762 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001763#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
1764#endif
1765
1766#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001767 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02001768 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02001769#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
1770#endif
1771
Paul Bakker6e339b52013-07-03 13:37:05 +02001772#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
1773#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
1774#endif
1775
Paul Bakker7ad00f92013-04-18 23:05:25 +02001776#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
1777#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
1778#endif
1779
Paul Bakkercff68422013-09-15 20:43:33 +02001780#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
1781#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
1782#endif
1783
1784#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
1785#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001786#endif
1787
Paul Bakker4606c732013-09-15 17:04:23 +02001788#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
1789#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
1790#endif
1791
1792#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
1793#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
1794#endif
1795
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001796#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02001797#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
1798#endif
1799
1800#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1801 !defined(POLARSSL_OID_C) )
1802#error "POLARSSL_RSA_C defined, but not all prerequisites"
1803#endif
1804
1805#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
1806#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
1807#endif
1808
Paul Bakker577e0062013-08-28 11:57:20 +02001809#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001810 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001811#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
1812#endif
1813
1814#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
1815#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
1816#endif
1817
Paul Bakkerd2f068e2013-08-27 21:19:20 +02001818#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
1819 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
1820 !defined(POLARSSL_SSL_PROTO_TLS1_2))
1821#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
1822#endif
1823
1824#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1825 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
1826#error "Illegal protocol selection"
1827#endif
1828
1829#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
1830 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
1831#error "Illegal protocol selection"
1832#endif
1833
1834#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
1835 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
1836 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
1837#error "Illegal protocol selection"
1838#endif
1839
Paul Bakker59da0a42013-08-19 13:27:17 +02001840#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02001841 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
1842 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02001843#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
1844#endif
1845
Paul Bakker2466d932013-09-28 14:40:38 +02001846#if defined(POLARSSL_THREADING_DUMMY)
1847#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1848#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
1849#endif
1850#define POLARSSL_THREADING_IMPL
1851#endif
1852
1853#if defined(POLARSSL_THREADING_PTHREAD)
1854#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1855#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
1856#endif
1857#define POLARSSL_THREADING_IMPL
1858#endif
1859
1860#if defined(POLARSSL_THREADING_ALT)
1861#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
1862#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
1863#endif
1864#define POLARSSL_THREADING_IMPL
1865#endif
1866
1867#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
1868#error "POLARSSL_THREADING_C defined, single threading implementation required"
1869#endif
1870#undef POLARSSL_THREADING_IMPL
1871
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001872#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02001873 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02001874 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001875#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001876#endif
1877
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001878#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
1879 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
1880 !defined(POLARSSL_PK_WRITE_C) )
1881#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
1882#endif
1883
1884#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1885#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
1886#endif
1887
1888#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1889#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
1890#endif
1891
1892#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
1893#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
1894#endif
1895
1896#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1897#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
1898#endif
1899
1900#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
1901#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001902#endif
1903
Paul Bakker5121ce52009-01-03 21:22:43 +00001904#endif /* config.h */