blob: 89fd261c5dfd6a52b320083c9e1fa1f9ea990df8 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakker37ca75d2011-01-06 12:28:03 +00004 * \brief Configuration options (set of defines)
5 *
Paul Bakker9bcf16c2013-06-24 19:31:17 +02006 * Copyright (C) 2006-2013, Brainspark B.V.
Paul Bakkerb96f1542010-07-18 20:36:00 +00007 *
8 * This file is part of PolarSSL (http://www.polarssl.org)
Paul Bakker84f12b72010-07-18 10:13:04 +00009 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakkerb96f1542010-07-18 20:36:00 +000010 *
Paul Bakker77b385e2009-07-28 17:23:11 +000011 * All rights reserved.
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000012 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +000013 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 *
Paul Bakker5121ce52009-01-03 21:22:43 +000027 * This set of compile-time options may be used to enable
28 * or disable features selectively, and reduce the global
29 * memory footprint.
30 */
Paul Bakker40e46942009-01-03 21:51:57 +000031#ifndef POLARSSL_CONFIG_H
32#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000033
Paul Bakkercce9d772011-11-18 14:26:47 +000034#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
Paul Bakker5121ce52009-01-03 21:22:43 +000035#define _CRT_SECURE_NO_DEPRECATE 1
36#endif
37
Paul Bakkerf3b86c12011-01-27 15:24:17 +000038/**
Paul Bakker0a62cd12011-01-21 11:00:08 +000039 * \name SECTION: System support
40 *
41 * This section sets system specific settings.
42 * \{
43 */
44
Paul Bakkerf3b86c12011-01-27 15:24:17 +000045/**
46 * \def POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000047 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000048 * The system uses 8-bit wide native integers.
49 *
50 * Uncomment if native integers are 8-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000051 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020052//#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000053
Paul Bakkerf3b86c12011-01-27 15:24:17 +000054/**
55 * \def POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000056 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +000057 * The system uses 16-bit wide native integers.
58 *
59 * Uncomment if native integers are 16-bit wide.
Paul Bakker5121ce52009-01-03 21:22:43 +000060 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020061//#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000062
Paul Bakkerf3b86c12011-01-27 15:24:17 +000063/**
Paul Bakker62261d62012-10-02 12:19:31 +000064 * \def POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000065 *
Paul Bakker62261d62012-10-02 12:19:31 +000066 * The compiler supports the 'long long' type.
67 * (Only used on 32-bit platforms)
Paul Bakker5121ce52009-01-03 21:22:43 +000068 */
Paul Bakker62261d62012-10-02 12:19:31 +000069#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000070
Paul Bakkerf3b86c12011-01-27 15:24:17 +000071/**
72 * \def POLARSSL_HAVE_ASM
73 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020074 * The compiler has support for asm().
Paul Bakker68041ec2009-04-19 21:17:55 +000075 *
76 * Requires support for asm() in compiler.
77 *
78 * Used in:
79 * library/timing.c
80 * library/padlock.c
81 * include/polarssl/bn_mul.h
82 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020083 * Comment to disable the use of assembly code.
Paul Bakker5121ce52009-01-03 21:22:43 +000084 */
Paul Bakker40e46942009-01-03 21:51:57 +000085#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000086
Paul Bakkerf3b86c12011-01-27 15:24:17 +000087/**
88 * \def POLARSSL_HAVE_SSE2
89 *
Paul Bakkere23c3152012-10-01 14:42:47 +000090 * CPU supports SSE2 instruction set.
Paul Bakkerf3b86c12011-01-27 15:24:17 +000091 *
Paul Bakker5121ce52009-01-03 21:22:43 +000092 * Uncomment if the CPU supports SSE2 (IA-32 specific).
Paul Bakker5121ce52009-01-03 21:22:43 +000093 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +020094//#define POLARSSL_HAVE_SSE2
Paul Bakkerfa9b1002013-07-03 15:31:03 +020095
96/**
97 * \def POLARSSL_HAVE_TIME
98 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +020099 * System has time.h and time() / localtime() / gettimeofday().
Paul Bakkerfa9b1002013-07-03 15:31:03 +0200100 *
101 * Comment if your system does not support time functions
102 */
103#define POLARSSL_HAVE_TIME
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100104
105/**
106 * \def POLARSSL_HAVE_IPV6
107 *
108 * System supports the basic socket interface for IPv6 (RFC 3493),
Manuel Pégourié-Gonnard767f02c2013-12-13 16:23:39 +0100109 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100110 *
Manuel Pégourié-Gonnard13211352013-12-17 17:38:55 +0100111 * Note: on Windows/MingW, XP or higher is required.
112 *
Manuel Pégourié-Gonnard10934de2013-12-13 12:54:09 +0100113 * Comment if your system does not support the IPv6 socket interface
114 */
115#define POLARSSL_HAVE_IPV6
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200116/* \} name SECTION: System support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000117
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000118/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000119 * \name SECTION: PolarSSL feature support
120 *
121 * This section sets support for features that are or are not needed
122 * within the modules that are enabled.
123 * \{
124 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000125
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000126/**
Paul Bakker90995b52013-06-24 19:20:35 +0200127 * \def POLARSSL_XXX_ALT
128 *
129 * Uncomment a macro to let PolarSSL use your alternate core implementation of
130 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
131 * implementations). Keep in mind that the function prototypes should remain
132 * the same.
133 *
134 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
135 * provide the "struct aes_context" definition and omit the base function
136 * declarations and implementations. "aes_alt.h" will be included from
137 * "aes.h" to include the new function definitions.
138 *
139 * Uncomment a macro to enable alternate implementation for core algorithm
140 * functions
Paul Bakker90995b52013-06-24 19:20:35 +0200141 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200142//#define POLARSSL_AES_ALT
143//#define POLARSSL_ARC4_ALT
144//#define POLARSSL_BLOWFISH_ALT
145//#define POLARSSL_CAMELLIA_ALT
146//#define POLARSSL_DES_ALT
147//#define POLARSSL_XTEA_ALT
148//#define POLARSSL_MD2_ALT
149//#define POLARSSL_MD4_ALT
150//#define POLARSSL_MD5_ALT
Paul Bakker9f4c1622014-01-22 14:14:26 +0100151//#define POLARSSL_RIPEMD160_ALT
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200152//#define POLARSSL_SHA1_ALT
153//#define POLARSSL_SHA256_ALT
154//#define POLARSSL_SHA512_ALT
Paul Bakker90995b52013-06-24 19:20:35 +0200155
156/**
Paul Bakker15566e42011-04-24 21:19:15 +0000157 * \def POLARSSL_AES_ROM_TABLES
158 *
159 * Store the AES tables in ROM.
160 *
161 * Uncomment this macro to store the AES tables in ROM.
162 *
Paul Bakker15566e42011-04-24 21:19:15 +0000163 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200164//#define POLARSSL_AES_ROM_TABLES
Paul Bakker15566e42011-04-24 21:19:15 +0000165
166/**
Manuel Pégourié-Gonnardf7dc3782013-09-13 14:10:44 +0200167 * \def POLARSSL_CIPHER_MODE_CBC
168 *
169 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
170 */
171#define POLARSSL_CIPHER_MODE_CBC
172
173/**
Paul Bakkerb6ecaf52011-04-19 14:29:23 +0000174 * \def POLARSSL_CIPHER_MODE_CFB
175 *
176 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
177 */
178#define POLARSSL_CIPHER_MODE_CFB
179
180/**
181 * \def POLARSSL_CIPHER_MODE_CTR
182 *
183 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
184 */
185#define POLARSSL_CIPHER_MODE_CTR
186
187/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000188 * \def POLARSSL_CIPHER_NULL_CIPHER
189 *
190 * Enable NULL cipher.
191 * Warning: Only do so when you know what you are doing. This allows for
192 * encryption or channels without any security!
193 *
194 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
195 * the following ciphersuites:
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100196 * TLS_ECDH_ECDSA_WITH_NULL_SHA
197 * TLS_ECDH_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200198 * TLS_ECDHE_ECDSA_WITH_NULL_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100199 * TLS_ECDHE_RSA_WITH_NULL_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200200 * TLS_ECDHE_PSK_WITH_NULL_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200201 * TLS_ECDHE_PSK_WITH_NULL_SHA256
202 * TLS_ECDHE_PSK_WITH_NULL_SHA
203 * TLS_DHE_PSK_WITH_NULL_SHA384
204 * TLS_DHE_PSK_WITH_NULL_SHA256
205 * TLS_DHE_PSK_WITH_NULL_SHA
206 * TLS_RSA_WITH_NULL_SHA256
207 * TLS_RSA_WITH_NULL_SHA
208 * TLS_RSA_WITH_NULL_MD5
209 * TLS_RSA_PSK_WITH_NULL_SHA384
210 * TLS_RSA_PSK_WITH_NULL_SHA256
211 * TLS_RSA_PSK_WITH_NULL_SHA
212 * TLS_PSK_WITH_NULL_SHA384
213 * TLS_PSK_WITH_NULL_SHA256
214 * TLS_PSK_WITH_NULL_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000215 *
216 * Uncomment this macro to enable the NULL cipher and ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200217#define POLARSSL_CIPHER_NULL_CIPHER
Paul Bakkerfab5c822012-02-06 16:45:10 +0000218 */
219
220/**
Paul Bakker48e93c82013-08-14 12:21:18 +0200221 * \def POLARSSL_CIPHER_PADDING_XXX
222 *
223 * Uncomment or comment macros to add support for specific padding modes
224 * in the cipher layer with cipher modes that support padding (e.g. CBC)
225 *
226 * If you disable all padding modes, only full blocks can be used with CBC.
227 *
228 * Enable padding modes in the cipher layer.
229 */
230#define POLARSSL_CIPHER_PADDING_PKCS7
231#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
232#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
233#define POLARSSL_CIPHER_PADDING_ZEROS
234
235/**
Paul Bakkerfab5c822012-02-06 16:45:10 +0000236 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
237 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200238 * Enable weak ciphersuites in SSL / TLS.
Paul Bakkerfab5c822012-02-06 16:45:10 +0000239 * Warning: Only do so when you know what you are doing. This allows for
Paul Bakker9a736322012-11-14 12:39:52 +0000240 * channels with virtually no security at all!
Paul Bakkerfab5c822012-02-06 16:45:10 +0000241 *
242 * This enables the following ciphersuites:
Paul Bakker645ce3a2012-10-31 12:32:41 +0000243 * TLS_RSA_WITH_DES_CBC_SHA
244 * TLS_DHE_RSA_WITH_DES_CBC_SHA
Paul Bakkerfab5c822012-02-06 16:45:10 +0000245 *
246 * Uncomment this macro to enable weak ciphersuites
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200247#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
Paul Bakkerfab5c822012-02-06 16:45:10 +0000248 */
249
250/**
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200251 * \def POLARSSL_ECP_XXXX_ENABLED
252 *
253 * Enables specific curves within the Elliptic Curve module.
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200254 * By default all supported curves are enabled.
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200255 *
256 * Comment macros to disable the curve and functions for it
257 */
258#define POLARSSL_ECP_DP_SECP192R1_ENABLED
259#define POLARSSL_ECP_DP_SECP224R1_ENABLED
260#define POLARSSL_ECP_DP_SECP256R1_ENABLED
261#define POLARSSL_ECP_DP_SECP384R1_ENABLED
262#define POLARSSL_ECP_DP_SECP521R1_ENABLED
Manuel Pégourié-Gonnard8195c1a2013-10-07 19:40:41 +0200263#define POLARSSL_ECP_DP_BP256R1_ENABLED
264#define POLARSSL_ECP_DP_BP384R1_ENABLED
265#define POLARSSL_ECP_DP_BP512R1_ENABLED
Manuel Pégourié-Gonnard66153662013-12-03 14:12:26 +0100266//#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
267#define POLARSSL_ECP_DP_M255_ENABLED
268//#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
269//#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
Paul Bakker5dc6b5f2013-06-29 23:26:34 +0200270
271/**
Manuel Pégourié-Gonnardc04c5302013-10-23 16:11:52 +0200272 * \def POLARSSL_ECP_NIST_OPTIM
273 *
274 * Enable specific 'modulo p' routines for each NIST prime.
275 * Depending on the prime and architecture, makes operations 4 to 8 times
276 * faster on the corresponding curve.
277 *
278 * Comment this macro to disable NIST curves optimisation.
279 */
280#define POLARSSL_ECP_NIST_OPTIM
281
282/**
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200283 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED
284 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200285 * Enable the PSK based ciphersuite modes in SSL / TLS.
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200286 *
Paul Bakkere07f41d2013-04-19 09:08:57 +0200287 * This enables the following ciphersuites (if other requisites are
288 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200289 * TLS_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200290 * TLS_PSK_WITH_AES_256_CBC_SHA384
291 * TLS_PSK_WITH_AES_256_CBC_SHA
292 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
293 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
294 * TLS_PSK_WITH_AES_128_GCM_SHA256
295 * TLS_PSK_WITH_AES_128_CBC_SHA256
296 * TLS_PSK_WITH_AES_128_CBC_SHA
297 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
298 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
299 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
300 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200301 */
302#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
303
304/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200305 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
306 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200307 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200308 *
309 * Requires: POLARSSL_DHM_C
310 *
311 * This enables the following ciphersuites (if other requisites are
312 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200313 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200314 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
315 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
316 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
317 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
318 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
319 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
320 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
321 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
322 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
323 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
324 * TLS_DHE_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200325 */
Paul Bakker48f7a5d2013-04-19 14:30:58 +0200326#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200327
328/**
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200329 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
330 *
331 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
332 *
333 * Requires: POLARSSL_ECDH_C
334 *
335 * This enables the following ciphersuites (if other requisites are
336 * enabled as well):
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200337 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200338 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard225d6aa2013-10-11 19:07:56 +0200339 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200340 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
341 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
342 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
343 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
344 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +0200345 */
346#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
347
348/**
Paul Bakkere07f41d2013-04-19 09:08:57 +0200349 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
350 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200351 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200352 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200353 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200354 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200355 *
356 * This enables the following ciphersuites (if other requisites are
357 * enabled as well):
Paul Bakker45bda902013-04-19 22:28:21 +0200358 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200359 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
360 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
361 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
362 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
363 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
364 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
365 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
366 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
367 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
368 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
369 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200370 */
Manuel Pégourié-Gonnard0fae60b2013-10-14 17:39:48 +0200371#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
Paul Bakkere07f41d2013-04-19 09:08:57 +0200372
373/**
374 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED
375 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200376 * Enable the RSA-only based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200377 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200378 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200379 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200380 *
381 * This enables the following ciphersuites (if other requisites are
382 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200383 * TLS_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200384 * TLS_RSA_WITH_AES_256_CBC_SHA256
385 * TLS_RSA_WITH_AES_256_CBC_SHA
386 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200387 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200388 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
389 * TLS_RSA_WITH_AES_128_GCM_SHA256
390 * TLS_RSA_WITH_AES_128_CBC_SHA256
391 * TLS_RSA_WITH_AES_128_CBC_SHA
392 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
393 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
394 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200395 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200396 * TLS_RSA_WITH_RC4_128_SHA
397 * TLS_RSA_WITH_RC4_128_MD5
Paul Bakkere07f41d2013-04-19 09:08:57 +0200398 */
399#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
400
401/**
402 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
403 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200404 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200405 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200406 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200407 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200408 *
409 * This enables the following ciphersuites (if other requisites are
410 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200411 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200412 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200413 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
414 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200415 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200416 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
417 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
418 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
419 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
420 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
421 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
422 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200423 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
424 */
425#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
426
427/**
428 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
429 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200430 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
Paul Bakkere07f41d2013-04-19 09:08:57 +0200431 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200432 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15,
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +0200433 * POLARSSL_X509_CRT_PARSE_C
Paul Bakkere07f41d2013-04-19 09:08:57 +0200434 *
435 * This enables the following ciphersuites (if other requisites are
436 * enabled as well):
Paul Bakkere07f41d2013-04-19 09:08:57 +0200437 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200438 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
439 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
440 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
Paul Bakkere07f41d2013-04-19 09:08:57 +0200441 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200442 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
443 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
444 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
445 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
446 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
447 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
448 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Paul Bakkere07f41d2013-04-19 09:08:57 +0200449 */
450#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
451
452/**
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200453 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
454 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200455 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200456 *
Manuel Pégourié-Gonnard1032c1d2013-09-18 17:18:34 +0200457 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C,
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200458 *
459 * This enables the following ciphersuites (if other requisites are
460 * enabled as well):
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200461 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
462 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
463 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
464 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
465 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
466 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
467 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
468 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
469 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
470 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
471 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
472 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +0200473 */
474#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
475
476/**
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100477 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
478 *
479 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
480 *
481 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
482 *
483 * This enables the following ciphersuites (if other requisites are
484 * enabled as well):
485 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
486 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
487 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
488 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
489 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
490 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
491 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
492 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
493 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
494 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
495 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
496 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
497 */
498#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
499
500/**
501 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
502 *
503 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
504 *
505 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C
506 *
507 * This enables the following ciphersuites (if other requisites are
508 * enabled as well):
509 * TLS_ECDH_RSA_WITH_RC4_128_SHA
510 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
511 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
512 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
513 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
514 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
515 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
516 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
517 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
518 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
519 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
520 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
521 */
522#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
523
524/**
Paul Bakkere2ab84f2013-06-29 18:24:32 +0200525 * \def POLARSSL_ERROR_STRERROR_BC
526 *
527 * Make available the backward compatible error_strerror() next to the
528 * current polarssl_strerror().
529 *
530 * Disable if you run into name conflicts and want to really remove the
531 * error_strerror()
532 */
533#define POLARSSL_ERROR_STRERROR_BC
534
535/**
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100536 * \def POLARSSL_ERROR_STRERROR_DUMMY
537 *
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200538 * Enable a dummy error function to make use of polarssl_strerror() in
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100539 * third party libraries easier.
540 *
541 * Disable if you run into name conflicts and want to really remove the
Paul Bakkereba3ccf2013-09-09 15:55:12 +0200542 * polarssl_strerror()
Paul Bakker8fe40dc2013-02-02 12:43:08 +0100543 */
544#define POLARSSL_ERROR_STRERROR_DUMMY
545
546/**
Paul Bakker15566e42011-04-24 21:19:15 +0000547 * \def POLARSSL_GENPRIME
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000548 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200549 * Enable the prime-number generation code.
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200550 *
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200551 * Requires: POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000552 */
Paul Bakker15566e42011-04-24 21:19:15 +0000553#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000554
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000555/**
Paul Bakker335db3f2011-04-25 15:28:35 +0000556 * \def POLARSSL_FS_IO
557 *
558 * Enable functions that use the filesystem.
559 */
560#define POLARSSL_FS_IO
561
562/**
Paul Bakker43655f42011-12-15 20:11:16 +0000563 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
564 *
565 * Do not add default entropy sources. These are the platform specific,
566 * hardclock and HAVEGE based poll functions.
567 *
568 * This is useful to have more control over the added entropy sources in an
569 * application.
570 *
571 * Uncomment this macro to prevent loading of default entropy functions.
Paul Bakker43655f42011-12-15 20:11:16 +0000572 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200573//#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
Paul Bakker43655f42011-12-15 20:11:16 +0000574
575/**
Paul Bakker6083fd22011-12-03 21:45:14 +0000576 * \def POLARSSL_NO_PLATFORM_ENTROPY
577 *
578 * Do not use built-in platform entropy functions.
579 * This is useful if your platform does not support
580 * standards like the /dev/urandom or Windows CryptoAPI.
581 *
582 * Uncomment this macro to disable the built-in platform entropy functions.
Paul Bakker6083fd22011-12-03 21:45:14 +0000583 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200584//#define POLARSSL_NO_PLATFORM_ENTROPY
Paul Bakker6083fd22011-12-03 21:45:14 +0000585
586/**
Paul Bakker6e339b52013-07-03 13:37:05 +0200587 * \def POLARSSL_MEMORY_DEBUG
588 *
589 * Enable debugging of buffer allocator memory issues. Automatically prints
590 * (to stderr) all (fatal) messages on memory allocation issues. Enables
591 * function for 'debug output' of allocated memory.
592 *
593 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
594 * fprintf()
595 *
596 * Uncomment this macro to let the buffer allocator print out error messages.
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200597 */
598//#define POLARSSL_MEMORY_DEBUG
Paul Bakker6e339b52013-07-03 13:37:05 +0200599
600/**
601 * \def POLARSSL_MEMORY_BACKTRACE
602 *
603 * Include backtrace information with each allocated block.
604 *
605 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C
606 * GLIBC-compatible backtrace() an backtrace_symbols() support
607 *
608 * Uncomment this macro to include backtrace information
Paul Bakker6e339b52013-07-03 13:37:05 +0200609 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200610//#define POLARSSL_MEMORY_BACKTRACE
Paul Bakker6e339b52013-07-03 13:37:05 +0200611
612/**
Paul Bakker48377d92013-08-30 12:06:24 +0200613 * \def POLARSSL_PKCS1_V15
614 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200615 * Enable support for PKCS#1 v1.5 encoding.
616 *
Paul Bakker48377d92013-08-30 12:06:24 +0200617 * Requires: POLARSSL_RSA_C
618 *
Paul Bakker48377d92013-08-30 12:06:24 +0200619 * This enables support for PKCS#1 v1.5 operations.
620 */
621#define POLARSSL_PKCS1_V15
622
623/**
Paul Bakker9dcc3222011-03-08 14:16:06 +0000624 * \def POLARSSL_PKCS1_V21
625 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200626 * Enable support for PKCS#1 v2.1 encoding.
627 *
Paul Bakker5690efc2011-05-26 13:16:06 +0000628 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
629 *
Paul Bakker9dcc3222011-03-08 14:16:06 +0000630 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
631 */
632#define POLARSSL_PKCS1_V21
633
634/**
Paul Bakker0216cc12011-03-26 13:40:23 +0000635 * \def POLARSSL_RSA_NO_CRT
636 *
637 * Do not use the Chinese Remainder Theorem for the RSA private operation.
638 *
639 * Uncomment this macro to disable the use of CRT in RSA.
640 *
Paul Bakker0216cc12011-03-26 13:40:23 +0000641 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200642//#define POLARSSL_RSA_NO_CRT
Paul Bakker15566e42011-04-24 21:19:15 +0000643
644/**
645 * \def POLARSSL_SELF_TEST
646 *
647 * Enable the checkup functions (*_self_test).
648 */
649#define POLARSSL_SELF_TEST
Paul Bakker5c721f92011-07-27 16:51:09 +0000650
651/**
Paul Bakker40865c82013-01-31 17:13:13 +0100652 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
653 *
654 * Enable sending of alert messages in case of encountered errors as per RFC.
655 * If you choose not to send the alert messages, PolarSSL can still communicate
656 * with other servers, only debugging of failures is harder.
657 *
658 * The advantage of not sending alert messages, is that no information is given
659 * about reasons for failures thus preventing adversaries of gaining intel.
660 *
661 * Enable sending of all alert messages
662 */
663#define POLARSSL_SSL_ALERT_MESSAGES
664
665/**
Paul Bakkerd66f0702013-01-31 16:57:45 +0100666 * \def POLARSSL_SSL_DEBUG_ALL
667 *
668 * Enable the debug messages in SSL module for all issues.
669 * Debug messages have been disabled in some places to prevent timing
670 * attacks due to (unbalanced) debugging function calls.
671 *
672 * If you need all error reporting you should enable this during debugging,
673 * but remove this for production servers that should log as well.
674 *
675 * Uncomment this macro to report all debug messages on errors introducing
676 * a timing side-channel.
677 *
Paul Bakkerd66f0702013-01-31 16:57:45 +0100678 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200679//#define POLARSSL_SSL_DEBUG_ALL
Paul Bakkerd66f0702013-01-31 16:57:45 +0100680
681/**
Paul Bakker05ef8352012-05-08 09:17:57 +0000682 * \def POLARSSL_SSL_HW_RECORD_ACCEL
683 *
684 * Enable hooking functions in SSL module for hardware acceleration of
685 * individual records.
686 *
687 * Uncomment this macro to enable hooking functions.
Paul Bakker05ef8352012-05-08 09:17:57 +0000688 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200689//#define POLARSSL_SSL_HW_RECORD_ACCEL
Paul Bakker05ef8352012-05-08 09:17:57 +0000690
691/**
Paul Bakker78a8c712013-03-06 17:01:52 +0100692 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
693 *
694 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200695 * SSL Server module (POLARSSL_SSL_SRV_C).
Paul Bakker78a8c712013-03-06 17:01:52 +0100696 *
697 * Comment this macro to disable support for SSLv2 Client Hello messages.
698 */
699#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
700
701/**
Manuel Pégourié-Gonnard1a9f2c72013-11-30 18:30:06 +0100702 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
703 *
704 * Pick the ciphersuite according to the client's preferences rather than ours
705 * in the SSL Server module (POLARSSL_SSL_SRV_C).
706 *
707 * Uncomment this macro to respect client's ciphersuite order
708 */
709//#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
710
711/**
Paul Bakker05decb22013-08-15 13:33:48 +0200712 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH
713 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200714 * Enable support for RFC 6066 max_fragment_length extension in SSL.
Paul Bakker05decb22013-08-15 13:33:48 +0200715 *
716 * Comment this macro to disable support for the max_fragment_length extension
717 */
718#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
719
720/**
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200721 * \def POLARSSL_SSL_PROTO_SSL3
722 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200723 * Enable support for SSL 3.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200724 *
725 * Requires: POLARSSL_MD5_C
726 * POLARSSL_SHA1_C
727 *
728 * Comment this macro to disable support for SSL 3.0
729 */
730#define POLARSSL_SSL_PROTO_SSL3
731
732/**
733 * \def POLARSSL_SSL_PROTO_TLS1
734 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200735 * Enable support for TLS 1.0.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200736 *
737 * Requires: POLARSSL_MD5_C
738 * POLARSSL_SHA1_C
739 *
740 * Comment this macro to disable support for TLS 1.0
741 */
742#define POLARSSL_SSL_PROTO_TLS1
743
744/**
745 * \def POLARSSL_SSL_PROTO_TLS1_1
746 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200747 * Enable support for TLS 1.1.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200748 *
749 * Requires: POLARSSL_MD5_C
750 * POLARSSL_SHA1_C
751 *
752 * Comment this macro to disable support for TLS 1.1
753 */
754#define POLARSSL_SSL_PROTO_TLS1_1
755
756/**
757 * \def POLARSSL_SSL_PROTO_TLS1_2
758 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200759 * Enable support for TLS 1.2.
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200760 *
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +0100761 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C
Paul Bakkerd2f068e2013-08-27 21:19:20 +0200762 * (Depends on ciphersuites)
763 *
764 * Comment this macro to disable support for TLS 1.2
765 */
766#define POLARSSL_SSL_PROTO_TLS1_2
767
768/**
Paul Bakkera503a632013-08-14 13:48:06 +0200769 * \def POLARSSL_SSL_SESSION_TICKETS
770 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200771 * Enable support for RFC 5077 session tickets in SSL.
Paul Bakkera503a632013-08-14 13:48:06 +0200772 *
773 * Requires: POLARSSL_AES_C
774 * POLARSSL_SHA256_C
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +0200775 * POLARSSL_CIPHER_MODE_CBC
Paul Bakkera503a632013-08-14 13:48:06 +0200776 *
777 * Comment this macro to disable support for SSL session tickets
778 */
779#define POLARSSL_SSL_SESSION_TICKETS
780
781/**
Paul Bakker0be444a2013-08-27 21:55:01 +0200782 * \def POLARSSL_SSL_SERVER_NAME_INDICATION
783 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200784 * Enable support for RFC 6066 server name indication (SNI) in SSL.
Paul Bakker0be444a2013-08-27 21:55:01 +0200785 *
786 * Comment this macro to disable support for server name indication in SSL
787 */
788#define POLARSSL_SSL_SERVER_NAME_INDICATION
789
790/**
Paul Bakker1f2bc622013-08-15 13:45:55 +0200791 * \def POLARSSL_SSL_TRUNCATED_HMAC
792 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200793 * Enable support for RFC 6066 truncated HMAC in SSL.
Paul Bakker1f2bc622013-08-15 13:45:55 +0200794 *
795 * Comment this macro to disable support for truncated HMAC in SSL
796 */
797#define POLARSSL_SSL_TRUNCATED_HMAC
798
799/**
Paul Bakker2466d932013-09-28 14:40:38 +0200800 * \def POLARSSL_THREADING_ALT
801 *
802 * Provide your own alternate threading implementation.
803 *
804 * Requires: POLARSSL_THREADING_C
805 *
806 * Uncomment this to allow your own alternate threading implementation.
Paul Bakker2466d932013-09-28 14:40:38 +0200807 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200808//#define POLARSSL_THREADING_ALT
Paul Bakker2466d932013-09-28 14:40:38 +0200809
810/**
Paul Bakker2466d932013-09-28 14:40:38 +0200811 * \def POLARSSL_THREADING_PTHREAD
812 *
813 * Enable the pthread wrapper layer for the threading layer.
814 *
815 * Requires: POLARSSL_THREADING_C
816 *
817 * Uncomment this to enable pthread mutexes.
Paul Bakker2466d932013-09-28 14:40:38 +0200818 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200819//#define POLARSSL_THREADING_PTHREAD
Paul Bakker2466d932013-09-28 14:40:38 +0200820
821/**
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200822 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
823 *
824 * If set, the X509 parser will not break-off when parsing an X509 certificate
825 * and encountering an extension in a v1 or v2 certificate.
826 *
827 * Uncomment to prevent an error.
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200828 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200829//#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
Paul Bakkerc27c4e22013-09-23 15:01:36 +0200830
831/**
Paul Bakker5c721f92011-07-27 16:51:09 +0000832 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
833 *
834 * If set, the X509 parser will not break-off when parsing an X509 certificate
835 * and encountering an unknown critical extension.
836 *
837 * Uncomment to prevent an error.
Paul Bakker5c721f92011-07-27 16:51:09 +0000838 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200839//#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
Paul Bakker2770fbd2012-07-03 13:30:23 +0000840
841/**
842 * \def POLARSSL_ZLIB_SUPPORT
843 *
844 * If set, the SSL/TLS module uses ZLIB to support compression and
845 * decompression of packet data.
846 *
847 * Used in: library/ssl_tls.c
848 * library/ssl_cli.c
849 * library/ssl_srv.c
850 *
851 * This feature requires zlib library and headers to be present.
852 *
853 * Uncomment to enable use of ZLIB
Paul Bakker2770fbd2012-07-03 13:30:23 +0000854 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +0200855//#define POLARSSL_ZLIB_SUPPORT
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +0200856/* \} name SECTION: PolarSSL feature support */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000857
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000858/**
Paul Bakker0a62cd12011-01-21 11:00:08 +0000859 * \name SECTION: PolarSSL modules
860 *
861 * This section enables or disables entire modules in PolarSSL
862 * \{
863 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000864
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000865/**
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +0100866 * \def POLARSSL_AESNI_C
867 *
868 * Enable AES-NI support on x86-64.
869 *
870 * Module: library/aesni.c
871 * Caller: library/aes.c
872 *
873 * Requires: POLARSSL_HAVE_ASM
874 *
875 * This modules adds support for the AES-NI instructions on x86-64
876 */
877#define POLARSSL_AESNI_C
878
879/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000880 * \def POLARSSL_AES_C
881 *
882 * Enable the AES block cipher.
883 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000884 * Module: library/aes.c
885 * Caller: library/ssl_tls.c
Paul Bakker96743fc2011-02-12 14:30:57 +0000886 * library/pem.c
Paul Bakker6083fd22011-12-03 21:45:14 +0000887 * library/ctr_drbg.c
Paul Bakker5121ce52009-01-03 21:22:43 +0000888 *
Paul Bakker645ce3a2012-10-31 12:32:41 +0000889 * This module enables the following ciphersuites (if other requisites are
890 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100891 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
892 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
893 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
894 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
895 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
896 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
897 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
898 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
899 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
900 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
901 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
902 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200903 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
904 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
905 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
906 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
907 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +0000908 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200909 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100910 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200911 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
912 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
913 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
914 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
915 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
916 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
917 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
918 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
919 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
920 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
921 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
922 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
923 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
924 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
925 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA
926 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
927 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
928 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
929 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
930 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA
931 * TLS_RSA_WITH_AES_256_GCM_SHA384
932 * TLS_RSA_WITH_AES_256_CBC_SHA256
933 * TLS_RSA_WITH_AES_256_CBC_SHA
934 * TLS_RSA_WITH_AES_128_GCM_SHA256
935 * TLS_RSA_WITH_AES_128_CBC_SHA256
936 * TLS_RSA_WITH_AES_128_CBC_SHA
937 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
938 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
939 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA
940 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
941 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
942 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA
943 * TLS_PSK_WITH_AES_256_GCM_SHA384
944 * TLS_PSK_WITH_AES_256_CBC_SHA384
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200945 * TLS_PSK_WITH_AES_256_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200946 * TLS_PSK_WITH_AES_128_GCM_SHA256
947 * TLS_PSK_WITH_AES_128_CBC_SHA256
948 * TLS_PSK_WITH_AES_128_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +0100949 *
Paul Bakkercff68422013-09-15 20:43:33 +0200950 * PEM_PARSE uses AES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +0000951 */
Paul Bakker40e46942009-01-03 21:51:57 +0000952#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000953
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000954/**
955 * \def POLARSSL_ARC4_C
956 *
957 * Enable the ARCFOUR stream cipher.
958 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000959 * Module: library/arc4.c
960 * Caller: library/ssl_tls.c
961 *
Paul Bakker41c83d32013-03-20 14:39:14 +0100962 * This module enables the following ciphersuites (if other requisites are
963 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +0100964 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA
965 * TLS_ECDH_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200966 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +0100967 * TLS_ECDHE_RSA_WITH_RC4_128_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +0200968 * TLS_ECDHE_PSK_WITH_RC4_128_SHA
969 * TLS_DHE_PSK_WITH_RC4_128_SHA
970 * TLS_RSA_WITH_RC4_128_SHA
971 * TLS_RSA_WITH_RC4_128_MD5
972 * TLS_RSA_PSK_WITH_RC4_128_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +0200973 * TLS_PSK_WITH_RC4_128_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000974 */
Paul Bakker40e46942009-01-03 21:51:57 +0000975#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000976
Paul Bakkerf3b86c12011-01-27 15:24:17 +0000977/**
Paul Bakkerefc30292011-11-10 14:43:23 +0000978 * \def POLARSSL_ASN1_PARSE_C
979 *
980 * Enable the generic ASN1 parser.
981 *
982 * Module: library/asn1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200983 * Caller: library/x509.c
984 * library/dhm.c
985 * library/pkcs12.c
986 * library/pkcs5.c
987 * library/pkparse.c
Paul Bakkerefc30292011-11-10 14:43:23 +0000988 */
989#define POLARSSL_ASN1_PARSE_C
990
991/**
Paul Bakkerbdb912d2012-02-13 23:11:30 +0000992 * \def POLARSSL_ASN1_WRITE_C
993 *
994 * Enable the generic ASN1 writer.
995 *
996 * Module: library/asn1write.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +0200997 * Caller: library/ecdsa.c
998 * library/pkwrite.c
999 * library/x509_create.c
1000 * library/x509write_crt.c
1001 * library/x509write_csr.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001002 */
1003#define POLARSSL_ASN1_WRITE_C
1004
1005/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001006 * \def POLARSSL_BASE64_C
1007 *
1008 * Enable the Base64 module.
1009 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001010 * Module: library/base64.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001011 * Caller: library/pem.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001012 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001013 * This module is required for PEM support (required by X.509).
Paul Bakker5121ce52009-01-03 21:22:43 +00001014 */
Paul Bakker40e46942009-01-03 21:51:57 +00001015#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001016
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001017/**
1018 * \def POLARSSL_BIGNUM_C
1019 *
Paul Bakker9a736322012-11-14 12:39:52 +00001020 * Enable the multi-precision integer library.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001021 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001022 * Module: library/bignum.c
1023 * Caller: library/dhm.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001024 * library/ecp.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001025 * library/rsa.c
1026 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001027 *
1028 * This module is required for RSA and DHM support.
1029 */
Paul Bakker40e46942009-01-03 21:51:57 +00001030#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001031
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001032/**
Paul Bakkera9379c02012-07-04 11:02:11 +00001033 * \def POLARSSL_BLOWFISH_C
1034 *
1035 * Enable the Blowfish block cipher.
1036 *
1037 * Module: library/blowfish.c
1038 */
1039#define POLARSSL_BLOWFISH_C
1040
1041/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001042 * \def POLARSSL_CAMELLIA_C
1043 *
1044 * Enable the Camellia block cipher.
1045 *
Paul Bakker38119b12009-01-10 23:31:23 +00001046 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +00001047 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +00001048 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001049 * This module enables the following ciphersuites (if other requisites are
1050 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001051 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1052 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1053 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
1054 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
1055 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1056 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1057 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
1058 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001059 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
1060 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1061 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
1062 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
1063 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
Paul Bakker645ce3a2012-10-31 12:32:41 +00001064 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001065 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
1066 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
1067 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1068 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
1069 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
1070 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1071 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
1072 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
1073 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
1074 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1075 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
1076 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
1077 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1078 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
1079 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
1080 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
1081 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
1082 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
1083 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
1084 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
1085 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
1086 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
1087 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
1088 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
1089 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
1090 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
1091 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
1092 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
Paul Bakker38119b12009-01-10 23:31:23 +00001093 */
1094#define POLARSSL_CAMELLIA_C
1095
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001096/**
1097 * \def POLARSSL_CERTS_C
1098 *
1099 * Enable the test certificates.
1100 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001101 * Module: library/certs.c
1102 * Caller:
1103 *
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001104 * Requires: POLARSSL_PEM_PARSE_C
1105 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001106 * This module is used for testing (ssl_client/server).
1107 */
Paul Bakker40e46942009-01-03 21:51:57 +00001108#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001109
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001110/**
1111 * \def POLARSSL_CIPHER_C
1112 *
1113 * Enable the generic cipher layer.
1114 *
Paul Bakker8123e9d2011-01-06 15:37:30 +00001115 * Module: library/cipher.c
Paul Bakker04784f52013-08-19 13:30:57 +02001116 * Caller: library/ssl_tls.c
Paul Bakker8123e9d2011-01-06 15:37:30 +00001117 *
1118 * Uncomment to enable generic cipher wrappers.
1119 */
1120#define POLARSSL_CIPHER_C
1121
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001122/**
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001123 * \def POLARSSL_CTR_DRBG_C
1124 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001125 * Enable the CTR_DRBG AES-256-based random generator.
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001126 *
1127 * Module: library/ctr_drbg.c
1128 * Caller:
1129 *
Paul Bakker6083fd22011-12-03 21:45:14 +00001130 * Requires: POLARSSL_AES_C
1131 *
Paul Bakker0e04d0e2011-11-27 14:46:59 +00001132 * This module provides the CTR_DRBG AES-256 random number generator.
1133 */
1134#define POLARSSL_CTR_DRBG_C
1135
1136/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001137 * \def POLARSSL_DEBUG_C
1138 *
1139 * Enable the debug functions.
1140 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001141 * Module: library/debug.c
1142 * Caller: library/ssl_cli.c
1143 * library/ssl_srv.c
1144 * library/ssl_tls.c
1145 *
1146 * This module provides debugging functions.
1147 */
Paul Bakker40e46942009-01-03 21:51:57 +00001148#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001149
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001150/**
1151 * \def POLARSSL_DES_C
1152 *
1153 * Enable the DES block cipher.
1154 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001155 * Module: library/des.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001156 * Caller: library/pem.c
1157 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001158 *
Paul Bakker645ce3a2012-10-31 12:32:41 +00001159 * This module enables the following ciphersuites (if other requisites are
1160 * enabled as well):
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001161 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
1162 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001163 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
Paul Bakker41c83d32013-03-20 14:39:14 +01001164 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001165 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
1166 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
1167 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
1168 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
1169 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakkerd4a56ec2013-04-16 18:05:29 +02001170 * TLS_PSK_WITH_3DES_EDE_CBC_SHA
Paul Bakker6deb37e2013-02-19 13:17:08 +01001171 *
Paul Bakkercff68422013-09-15 20:43:33 +02001172 * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001173 */
Paul Bakker40e46942009-01-03 21:51:57 +00001174#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001175
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001176/**
1177 * \def POLARSSL_DHM_C
1178 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001179 * Enable the Diffie-Hellman-Merkle module.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001180 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001181 * Module: library/dhm.c
1182 * Caller: library/ssl_cli.c
1183 * library/ssl_srv.c
1184 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001185 * This module is used by the following key exchanges:
1186 * DHE-RSA, DHE-PSK
Paul Bakker5121ce52009-01-03 21:22:43 +00001187 */
Paul Bakker40e46942009-01-03 21:51:57 +00001188#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001189
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001190/**
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001191 * \def POLARSSL_ECDH_C
1192 *
1193 * Enable the elliptic curve Diffie-Hellman library.
1194 *
1195 * Module: library/ecdh.c
Paul Bakker41c83d32013-03-20 14:39:14 +01001196 * Caller: library/ssl_cli.c
1197 * library/ssl_srv.c
1198 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001199 * This module is used by the following key exchanges:
1200 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001201 *
1202 * Requires: POLARSSL_ECP_C
1203 */
1204#define POLARSSL_ECDH_C
1205
1206/**
1207 * \def POLARSSL_ECDSA_C
1208 *
1209 * Enable the elliptic curve DSA library.
1210 *
1211 * Module: library/ecdsa.c
1212 * Caller:
1213 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001214 * This module is used by the following key exchanges:
1215 * ECDHE-ECDSA
1216 *
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001217 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001218 */
1219#define POLARSSL_ECDSA_C
1220
1221/**
1222 * \def POLARSSL_ECP_C
1223 *
1224 * Enable the elliptic curve over GF(p) library.
1225 *
1226 * Module: library/ecp.c
1227 * Caller: library/ecdh.c
1228 * library/ecdsa.c
1229 *
Manuel Pégourié-Gonnardb8012fc2013-10-10 15:40:49 +02001230 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED
Paul Bakkerd589a0d2013-03-13 16:30:17 +01001231 */
1232#define POLARSSL_ECP_C
1233
1234/**
Paul Bakker6083fd22011-12-03 21:45:14 +00001235 * \def POLARSSL_ENTROPY_C
1236 *
1237 * Enable the platform-specific entropy code.
1238 *
1239 * Module: library/entropy.c
1240 * Caller:
1241 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001242 * Requires: POLARSSL_SHA512_C
Paul Bakker6083fd22011-12-03 21:45:14 +00001243 *
1244 * This module provides a generic entropy pool
1245 */
1246#define POLARSSL_ENTROPY_C
1247
1248/**
Paul Bakker9d781402011-05-09 16:17:09 +00001249 * \def POLARSSL_ERROR_C
1250 *
1251 * Enable error code to error string conversion.
1252 *
1253 * Module: library/error.c
1254 * Caller:
1255 *
1256 * This module enables err_strerror().
1257 */
1258#define POLARSSL_ERROR_C
1259
1260/**
Paul Bakker89e80c92012-03-20 13:50:09 +00001261 * \def POLARSSL_GCM_C
1262 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001263 * Enable the Galois/Counter Mode (GCM) for AES.
Paul Bakker89e80c92012-03-20 13:50:09 +00001264 *
1265 * Module: library/gcm.c
1266 *
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001267 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C
Paul Bakker645ce3a2012-10-31 12:32:41 +00001268 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001269 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
1270 * requisites are enabled as well.
Paul Bakker89e80c92012-03-20 13:50:09 +00001271 */
1272#define POLARSSL_GCM_C
1273
1274/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001275 * \def POLARSSL_HAVEGE_C
1276 *
1277 * Enable the HAVEGE random generator.
1278 *
Paul Bakker2a844242013-06-24 13:01:53 +02001279 * Warning: the HAVEGE random generator is not suitable for virtualized
1280 * environments
1281 *
1282 * Warning: the HAVEGE random generator is dependent on timing and specific
1283 * processor traits. It is therefore not advised to use HAVEGE as
1284 * your applications primary random generator or primary entropy pool
1285 * input. As a secondary input to your entropy pool, it IS able add
1286 * the (limited) extra entropy it provides.
1287 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001288 * Module: library/havege.c
1289 * Caller:
1290 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001291 * Requires: POLARSSL_TIMING_C
1292 *
Paul Bakker2a844242013-06-24 13:01:53 +02001293 * Uncomment to enable the HAVEGE random generator.
Paul Bakker2a844242013-06-24 13:01:53 +02001294 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001295//#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001296
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001297/**
1298 * \def POLARSSL_MD_C
1299 *
1300 * Enable the generic message digest layer.
1301 *
Paul Bakker17373852011-01-06 14:20:01 +00001302 * Module: library/md.c
1303 * Caller:
1304 *
1305 * Uncomment to enable generic message digest wrappers.
1306 */
1307#define POLARSSL_MD_C
1308
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001309/**
1310 * \def POLARSSL_MD2_C
1311 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001312 * Enable the MD2 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001313 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001314 * Module: library/md2.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001315 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001316 *
1317 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001318 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001319//#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001320
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001321/**
1322 * \def POLARSSL_MD4_C
1323 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001324 * Enable the MD4 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001325 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001326 * Module: library/md4.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001327 * Caller:
Paul Bakker5121ce52009-01-03 21:22:43 +00001328 *
1329 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
Paul Bakker6506aff2009-07-28 20:52:02 +00001330 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001331//#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001332
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001333/**
1334 * \def POLARSSL_MD5_C
1335 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001336 * Enable the MD5 hash algorithm.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001337 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001338 * Module: library/md5.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001339 * Caller: library/md.c
1340 * library/pem.c
Paul Bakker6deb37e2013-02-19 13:17:08 +01001341 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001342 *
1343 * This module is required for SSL/TLS and X.509.
Paul Bakkercff68422013-09-15 20:43:33 +02001344 * PEM_PARSE uses MD5 for decrypting encrypted keys.
Paul Bakker5121ce52009-01-03 21:22:43 +00001345 */
Paul Bakker40e46942009-01-03 21:51:57 +00001346#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001347
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001348/**
Paul Bakker6e339b52013-07-03 13:37:05 +02001349 * \def POLARSSL_MEMORY_C
1350 *
1351 * Enable the memory allocation layer.
1352 * By default PolarSSL uses the system-provided malloc() and free().
1353 * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE
1354 * are defined and unmodified)
1355 *
1356 * This allows different allocators (self-implemented or provided)
1357 *
1358 * Enable this layer to allow use of alternative memory allocators.
Paul Bakker6e339b52013-07-03 13:37:05 +02001359 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001360//#define POLARSSL_MEMORY_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001361
1362/**
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001363 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C
1364 *
1365 * Enable the buffer allocator implementation that makes use of a (stack)
1366 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free()
1367 * calls)
Paul Bakker6e339b52013-07-03 13:37:05 +02001368 *
1369 * Module: library/memory_buffer_alloc.c
1370 *
1371 * Requires: POLARSSL_MEMORY_C
1372 *
1373 * Enable this module to enable the buffer memory allocator.
Paul Bakker6e339b52013-07-03 13:37:05 +02001374 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001375//#define POLARSSL_MEMORY_BUFFER_ALLOC_C
Paul Bakker6e339b52013-07-03 13:37:05 +02001376
1377/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001378 * \def POLARSSL_NET_C
1379 *
1380 * Enable the TCP/IP networking routines.
1381 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001382 * Module: library/net.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001383 *
1384 * This module provides TCP/IP networking routines.
1385 */
Paul Bakker40e46942009-01-03 21:51:57 +00001386#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001387
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001388/**
Paul Bakkerc70b9822013-04-07 22:00:46 +02001389 * \def POLARSSL_OID_C
1390 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001391 * Enable the OID database.
Paul Bakkerc70b9822013-04-07 22:00:46 +02001392 *
1393 * Module: library/oid.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001394 * Caller: library/asn1write.c
1395 * library/pkcs5.c
1396 * library/pkparse.c
1397 * library/pkwrite.c
1398 * library/rsa.c
1399 * library/x509.c
1400 * library/x509_create.c
1401 * library/x509_crl.c
1402 * library/x509_crt.c
1403 * library/x509_csr.c
1404 * library/x509write_crt.c
1405 * library/x509write_csr.c
Paul Bakkerc70b9822013-04-07 22:00:46 +02001406 *
1407 * This modules translates between OIDs and internal values.
1408 */
1409#define POLARSSL_OID_C
1410
1411/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001412 * \def POLARSSL_PADLOCK_C
1413 *
1414 * Enable VIA Padlock support on x86.
1415 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001416 * Module: library/padlock.c
1417 * Caller: library/aes.c
1418 *
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001419 * Requires: POLARSSL_HAVE_ASM
1420 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001421 * This modules adds support for the VIA PadLock on x86.
1422 */
Paul Bakker40e46942009-01-03 21:51:57 +00001423#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001424
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001425/**
Paul Bakkerf518b162012-08-23 13:03:18 +00001426 * \def POLARSSL_PBKDF2_C
1427 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001428 * Enable PKCS#5 PBKDF2 key derivation function.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001429 * DEPRECATED: Use POLARSSL_PKCS5_C instead
Paul Bakkerf518b162012-08-23 13:03:18 +00001430 *
1431 * Module: library/pbkdf2.c
1432 *
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001433 * Requires: POLARSSL_PKCS5_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001434 *
1435 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
Paul Bakkerf518b162012-08-23 13:03:18 +00001436 */
Paul Bakker370e90c2013-04-08 15:19:43 +02001437#define POLARSSL_PBKDF2_C
Paul Bakkerf518b162012-08-23 13:03:18 +00001438
1439/**
Paul Bakkercff68422013-09-15 20:43:33 +02001440 * \def POLARSSL_PEM_PARSE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001441 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001442 * Enable PEM decoding / parsing.
Paul Bakker96743fc2011-02-12 14:30:57 +00001443 *
1444 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001445 * Caller: library/dhm.c
Paul Bakkercff68422013-09-15 20:43:33 +02001446 * library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001447 * library/x509_crl.c
1448 * library/x509_crt.c
1449 * library/x509_csr.c
Paul Bakker96743fc2011-02-12 14:30:57 +00001450 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001451 * Requires: POLARSSL_BASE64_C
1452 *
Paul Bakkercff68422013-09-15 20:43:33 +02001453 * This modules adds support for decoding / parsing PEM files.
Paul Bakker96743fc2011-02-12 14:30:57 +00001454 */
Paul Bakkercff68422013-09-15 20:43:33 +02001455#define POLARSSL_PEM_PARSE_C
1456
1457/**
1458 * \def POLARSSL_PEM_WRITE_C
1459 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001460 * Enable PEM encoding / writing.
Paul Bakkercff68422013-09-15 20:43:33 +02001461 *
1462 * Module: library/pem.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001463 * Caller: library/pkwrite.c
1464 * library/x509write_crt.c
1465 * library/x509write_csr.c
Paul Bakkercff68422013-09-15 20:43:33 +02001466 *
1467 * Requires: POLARSSL_BASE64_C
1468 *
1469 * This modules adds support for encoding / writing PEM files.
1470 */
1471#define POLARSSL_PEM_WRITE_C
Paul Bakker96743fc2011-02-12 14:30:57 +00001472
1473/**
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001474 * \def POLARSSL_PK_C
1475 *
1476 * Enable the generic public (asymetric) key layer.
1477 *
1478 * Module: library/pk.c
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001479 * Caller: library/ssl_tls.c
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001480 * library/ssl_cli.c
1481 * library/ssl_srv.c
1482 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001483 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C
1484 *
Manuel Pégourié-Gonnardc40b4c32013-08-22 13:29:31 +02001485 * Uncomment to enable generic public key wrappers.
1486 */
1487#define POLARSSL_PK_C
1488
1489/**
Paul Bakker4606c732013-09-15 17:04:23 +02001490 * \def POLARSSL_PK_PARSE_C
1491 *
1492 * Enable the generic public (asymetric) key parser.
1493 *
1494 * Module: library/pkparse.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001495 * Caller: library/x509_crt.c
1496 * library/x509_csr.c
Paul Bakker4606c732013-09-15 17:04:23 +02001497 *
1498 * Requires: POLARSSL_PK_C
1499 *
1500 * Uncomment to enable generic public key parse functions.
1501 */
1502#define POLARSSL_PK_PARSE_C
1503
1504/**
1505 * \def POLARSSL_PK_WRITE_C
1506 *
Paul Bakkerf20ba4b2013-09-16 22:46:20 +02001507 * Enable the generic public (asymetric) key writer.
Paul Bakker4606c732013-09-15 17:04:23 +02001508 *
1509 * Module: library/pkwrite.c
1510 * Caller: library/x509write.c
1511 *
1512 * Requires: POLARSSL_PK_C
1513 *
1514 * Uncomment to enable generic public key write functions.
1515 */
1516#define POLARSSL_PK_WRITE_C
1517
1518/**
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001519 * \def POLARSSL_PKCS5_C
1520 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001521 * Enable PKCS#5 functions.
Paul Bakkerb0c19a42013-06-24 19:26:38 +02001522 *
1523 * Module: library/pkcs5.c
1524 *
1525 * Requires: POLARSSL_MD_C
1526 *
1527 * This module adds support for the PKCS#5 functions.
1528 */
1529#define POLARSSL_PKCS5_C
1530
1531/**
Paul Bakker5690efc2011-05-26 13:16:06 +00001532 * \def POLARSSL_PKCS11_C
1533 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001534 * Enable wrapper for PKCS#11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001535 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001536 * Module: library/pkcs11.c
1537 * Caller: library/pk.c
Paul Bakker5690efc2011-05-26 13:16:06 +00001538 *
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02001539 * Requires: POLARSSL_PK_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001540 *
Paul Bakkereb2c6582012-09-27 19:15:01 +00001541 * This module enables SSL/TLS PKCS #11 smartcard support.
Paul Bakker5690efc2011-05-26 13:16:06 +00001542 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker5690efc2011-05-26 13:16:06 +00001543 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001544//#define POLARSSL_PKCS11_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001545
1546/**
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001547 * \def POLARSSL_PKCS12_C
1548 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001549 * Enable PKCS#12 PBE functions.
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001550 * Adds algorithms for parsing PKCS#8 encrypted private keys
1551 *
1552 * Module: library/pkcs12.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001553 * Caller: library/pkparse.c
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001554 *
Paul Bakkerb0713c72013-06-24 19:34:08 +02001555 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
1556 * Can use: POLARSSL_ARC4_C
Paul Bakkerf1f21fe2013-06-24 19:17:19 +02001557 *
1558 * This module enables PKCS#12 functions.
1559 */
1560#define POLARSSL_PKCS12_C
1561
1562/**
Paul Bakker61b699e2014-01-22 13:35:29 +01001563 * \def POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001564 *
1565 * Enable the RIPEMD-160 hash algorithm.
1566 *
Paul Bakker61b699e2014-01-22 13:35:29 +01001567 * Module: library/ripemd160.c
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001568 * Caller: library/md.c
1569 *
1570 */
Paul Bakker61b699e2014-01-22 13:35:29 +01001571#define POLARSSL_RIPEMD160_C
Manuel Pégourié-Gonnardcab4a882014-01-17 12:42:35 +01001572
1573/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001574 * \def POLARSSL_RSA_C
1575 *
1576 * Enable the RSA public-key cryptosystem.
1577 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001578 * Module: library/rsa.c
1579 * Caller: library/ssl_cli.c
1580 * library/ssl_srv.c
1581 * library/ssl_tls.c
1582 * library/x509.c
1583 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001584 * This module is used by the following key exchanges:
1585 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
Paul Bakker5690efc2011-05-26 13:16:06 +00001586 *
Manuel Pégourié-Gonnard9d703732013-10-25 18:01:50 +02001587 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001588 */
Paul Bakker40e46942009-01-03 21:51:57 +00001589#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001590
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001591/**
1592 * \def POLARSSL_SHA1_C
1593 *
1594 * Enable the SHA1 cryptographic hash algorithm.
1595 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001596 * Module: library/sha1.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001597 * Caller: library/md.c
1598 * library/ssl_cli.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001599 * library/ssl_srv.c
1600 * library/ssl_tls.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001601 * library/x509write_crt.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001602 *
1603 * This module is required for SSL/TLS and SHA1-signed certificates.
1604 */
Paul Bakker40e46942009-01-03 21:51:57 +00001605#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001606
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001607/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001608 * \def POLARSSL_SHA256_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001609 *
1610 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001611 * (Used to be POLARSSL_SHA2_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001612 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001613 * Module: library/sha256.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001614 * Caller: library/entropy.c
1615 * library/md.c
1616 * library/ssl_cli.c
1617 * library/ssl_srv.c
1618 * library/ssl_tls.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001619 *
1620 * This module adds support for SHA-224 and SHA-256.
Paul Bakker769075d2012-11-24 11:26:46 +01001621 * This module is required for the SSL/TLS 1.2 PRF function.
Paul Bakker5121ce52009-01-03 21:22:43 +00001622 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001623#define POLARSSL_SHA256_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001624
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001625/**
Paul Bakker9e36f042013-06-30 14:34:05 +02001626 * \def POLARSSL_SHA512_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001627 *
1628 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
Paul Bakker9e36f042013-06-30 14:34:05 +02001629 * (Used to be POLARSSL_SHA4_C)
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001630 *
Paul Bakker9e36f042013-06-30 14:34:05 +02001631 * Module: library/sha512.c
Manuel Pégourié-Gonnardfe286462013-09-20 14:10:14 +02001632 * Caller: library/entropy.c
1633 * library/md.c
1634 * library/ssl_cli.c
1635 * library/ssl_srv.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001636 *
1637 * This module adds support for SHA-384 and SHA-512.
1638 */
Paul Bakker9e36f042013-06-30 14:34:05 +02001639#define POLARSSL_SHA512_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001640
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001641/**
Paul Bakker0a597072012-09-25 21:55:46 +00001642 * \def POLARSSL_SSL_CACHE_C
1643 *
1644 * Enable simple SSL cache implementation.
1645 *
1646 * Module: library/ssl_cache.c
1647 * Caller:
1648 *
1649 * Requires: POLARSSL_SSL_CACHE_C
1650 */
1651#define POLARSSL_SSL_CACHE_C
1652
1653/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001654 * \def POLARSSL_SSL_CLI_C
1655 *
1656 * Enable the SSL/TLS client code.
1657 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001658 * Module: library/ssl_cli.c
1659 * Caller:
1660 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001661 * Requires: POLARSSL_SSL_TLS_C
1662 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001663 * This module is required for SSL/TLS client support.
1664 */
Paul Bakker40e46942009-01-03 21:51:57 +00001665#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001666
Paul Bakker9a736322012-11-14 12:39:52 +00001667/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001668 * \def POLARSSL_SSL_SRV_C
1669 *
1670 * Enable the SSL/TLS server code.
1671 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001672 * Module: library/ssl_srv.c
1673 * Caller:
1674 *
Paul Bakker5690efc2011-05-26 13:16:06 +00001675 * Requires: POLARSSL_SSL_TLS_C
1676 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001677 * This module is required for SSL/TLS server support.
1678 */
Paul Bakker40e46942009-01-03 21:51:57 +00001679#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001680
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001681/**
1682 * \def POLARSSL_SSL_TLS_C
1683 *
Paul Bakkere29ab062011-05-18 13:26:54 +00001684 * Enable the generic SSL/TLS code.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001685 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001686 * Module: library/ssl_tls.c
1687 * Caller: library/ssl_cli.c
1688 * library/ssl_srv.c
1689 *
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02001690 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C
Paul Bakker577e0062013-08-28 11:57:20 +02001691 * and at least one of the POLARSSL_SSL_PROTO_* defines
Paul Bakker5690efc2011-05-26 13:16:06 +00001692 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001693 * This module is required for SSL/TLS.
1694 */
Paul Bakker40e46942009-01-03 21:51:57 +00001695#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001696
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001697/**
Paul Bakker2466d932013-09-28 14:40:38 +02001698 * \def POLARSSL_THREADING_C
1699 *
1700 * Enable the threading abstraction layer.
1701 * By default PolarSSL assumes it is used in a non-threaded environment or that
1702 * contexts are not shared between threads. If you do intend to use contexts
1703 * between threads, you will need to enable this layer to prevent race
1704 * conditions.
1705 *
1706 * Module: library/threading.c
1707 *
1708 * This allows different threading implementations (self-implemented or
1709 * provided).
1710 *
Paul Bakkera8fd3e32013-12-31 11:54:08 +01001711 * You will have to enable either POLARSSL_THREADING_ALT or
1712 * POLARSSL_THREADING_PTHREAD.
Paul Bakker2466d932013-09-28 14:40:38 +02001713 *
1714 * Enable this layer to allow use of mutexes within PolarSSL
Paul Bakker2466d932013-09-28 14:40:38 +02001715 */
Paul Bakkera7ea6a52013-10-15 11:55:10 +02001716//#define POLARSSL_THREADING_C
Paul Bakker2466d932013-09-28 14:40:38 +02001717
1718/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001719 * \def POLARSSL_TIMING_C
1720 *
1721 * Enable the portable timing interface.
1722 *
Paul Bakker5121ce52009-01-03 21:22:43 +00001723 * Module: library/timing.c
1724 * Caller: library/havege.c
1725 *
1726 * This module is used by the HAVEGE random number generator.
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001727 */
Paul Bakkerdcbfdcc2013-09-10 16:16:50 +02001728#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001729
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001730/**
1731 * \def POLARSSL_VERSION_C
1732 *
1733 * Enable run-time version information.
1734 *
Paul Bakker0a62cd12011-01-21 11:00:08 +00001735 * Module: library/version.c
1736 *
1737 * This module provides run-time version information.
1738 */
1739#define POLARSSL_VERSION_C
1740
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001741/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001742 * \def POLARSSL_X509_USE_C
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001743 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001744 * Enable X.509 core for using certificates.
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001745 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001746 * Module: library/x509.c
1747 * Caller: library/x509_crl.c
1748 * library/x509_crt.c
1749 * library/x509_csr.c
Paul Bakker5121ce52009-01-03 21:22:43 +00001750 *
Paul Bakkerc70b9822013-04-07 22:00:46 +02001751 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
Paul Bakker4606c732013-09-15 17:04:23 +02001752 * POLARSSL_PK_PARSE_C
Paul Bakker5690efc2011-05-26 13:16:06 +00001753 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001754 * This module is required for the X.509 parsing modules.
Paul Bakker5121ce52009-01-03 21:22:43 +00001755 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001756#define POLARSSL_X509_USE_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001757
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001758/**
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001759 * \def POLARSSL_X509_CRT_PARSE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001760 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001761 * Enable X.509 certificate parsing.
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001762 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001763 * Module: library/x509_crt.c
1764 * Caller: library/ssl_cli.c
1765 * library/ssl_srv.c
1766 * library/ssl_tls.c
1767 *
1768 * Requires: POLARSSL_X509_USE_C
1769 *
1770 * This module is required for X.509 certificate parsing.
1771 */
1772#define POLARSSL_X509_CRT_PARSE_C
1773
1774/**
1775 * \def POLARSSL_X509_CRL_PARSE_C
1776 *
1777 * Enable X.509 CRL parsing.
1778 *
1779 * Module: library/x509_crl.c
1780 * Caller: library/x509_crt.c
1781 *
1782 * Requires: POLARSSL_X509_USE_C
1783 *
1784 * This module is required for X.509 CRL parsing.
1785 */
1786#define POLARSSL_X509_CRL_PARSE_C
1787
1788/**
1789 * \def POLARSSL_X509_CSR_PARSE_C
1790 *
1791 * Enable X.509 Certificate Signing Request (CSR) parsing.
1792 *
1793 * Module: library/x509_csr.c
1794 * Caller: library/x509_crt_write.c
1795 *
1796 * Requires: POLARSSL_X509_USE_C
1797 *
1798 * This module is used for reading X.509 certificate request.
1799 */
1800#define POLARSSL_X509_CSR_PARSE_C
1801
1802/**
1803 * \def POLARSSL_X509_CREATE_C
1804 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001805 * Enable X.509 core for creating certificates.
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001806 *
1807 * Module: library/x509_create.c
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001808 *
Paul Bakker4606c732013-09-15 17:04:23 +02001809 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001810 *
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001811 * This module is the basis for creating X.509 certificates and CSRs.
1812 */
1813#define POLARSSL_X509_CREATE_C
1814
1815/**
1816 * \def POLARSSL_X509_CRT_WRITE_C
1817 *
1818 * Enable creating X.509 certificates.
1819 *
1820 * Module: library/x509_crt_write.c
1821 *
1822 * Requires: POLARSSL_CREATE_C
1823 *
1824 * This module is required for X.509 certificate creation.
1825 */
1826#define POLARSSL_X509_CRT_WRITE_C
1827
1828/**
1829 * \def POLARSSL_X509_CSR_WRITE_C
1830 *
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001831 * Enable creating X.509 Certificate Signing Requests (CSR).
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001832 *
1833 * Module: library/x509_csr_write.c
1834 *
1835 * Requires: POLARSSL_CREATE_C
1836 *
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001837 * This module is required for X.509 certificate request writing.
1838 */
Paul Bakker7c6b2c32013-09-16 13:49:26 +02001839#define POLARSSL_X509_CSR_WRITE_C
Paul Bakkerbdb912d2012-02-13 23:11:30 +00001840
1841/**
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001842 * \def POLARSSL_XTEA_C
Paul Bakker5121ce52009-01-03 21:22:43 +00001843 *
Paul Bakkerf3b86c12011-01-27 15:24:17 +00001844 * Enable the XTEA block cipher.
1845 *
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001846 * Module: library/xtea.c
1847 * Caller:
1848 */
1849#define POLARSSL_XTEA_C
Manuel Pégourié-Gonnard39d2adb2012-10-31 09:26:55 +01001850
Manuel Pégourié-Gonnard09fff7e2013-09-20 13:45:36 +02001851/* \} name SECTION: PolarSSL modules */
Paul Bakker7a7c78f2009-01-04 18:15:48 +00001852
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001853/**
1854 * \name SECTION: Module configuration options
1855 *
1856 * This section allows for the setting of module specific sizes and
1857 * configuration options. The default values are already present in the
1858 * relevant header files and should suffice for the regular use cases.
1859 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
1860 * only if you have a good reason and know the consequences.
1861 *
1862 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
1863 * header file take precedence.
1864 *
1865 * Please check the respective header file for documentation on these
1866 * parameters (to prevent duplicate documentation).
1867 *
1868 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
1869 * \{
1870 */
1871//#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1872
1873#if defined(POLARSSL_CONFIG_OPTIONS)
1874
1875// MPI / BIGNUM options
1876//
1877#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
1878#define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
1879
1880// CTR_DRBG options
1881//
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001882#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 +02001883#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
1884#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
1885#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
1886#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
1887
Paul Bakkere1b665e2013-12-11 16:02:58 +01001888// ECP options
1889//
1890#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
1891#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
Manuel Pégourié-Gonnard9e4191c2013-12-30 18:41:16 +01001892#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
Paul Bakkere1b665e2013-12-11 16:02:58 +01001893
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001894// Entropy options
1895//
1896#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
1897#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1898
Paul Bakker6e339b52013-07-03 13:37:05 +02001899// Memory options
1900#define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
1901#define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */
1902#define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */
1903
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001904// SSL Cache options
1905//
1906#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1907#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1908
1909// SSL options
1910//
1911#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
Paul Bakker606b4ba2013-08-14 16:52:14 +02001912#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
Paul Bakker9bcf16c2013-06-24 19:31:17 +02001913
1914#endif /* POLARSSL_CONFIG_OPTIONS */
1915
1916/* \} name */
1917
Paul Bakker7ad00f92013-04-18 23:05:25 +02001918/*
1919 * Sanity checks on defines and dependencies
1920 */
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01001921#if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
1922#error "POLARSSL_AESNI_C defined, but not all prerequisites"
1923#endif
1924
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001925#if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1926#error "POLARSSL_CERTS_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02001927#endif
1928
1929#if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1930#error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1931#endif
1932
Manuel Pégourié-Gonnard18dc0e22013-10-27 14:35:02 +01001933#if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1934#error "POLARSSL_DHM_C defined, but not all prerequisites"
1935#endif
1936
Paul Bakker7ad00f92013-04-18 23:05:25 +02001937#if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1938#error "POLARSSL_ECDH_C defined, but not all prerequisites"
1939#endif
1940
Manuel Pégourié-Gonnard4846f5e2013-08-08 14:36:15 +02001941#if defined(POLARSSL_ECDSA_C) && \
1942 ( !defined(POLARSSL_ECP_C) || \
1943 !defined(POLARSSL_ASN1_PARSE_C) || \
1944 !defined(POLARSSL_ASN1_WRITE_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001945#error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1946#endif
1947
Manuel Pégourié-Gonnardc59c9c12013-10-27 14:04:59 +01001948#if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1949 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1950 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1951 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1952 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1953 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1954 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1955 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1956 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001957#error "POLARSSL_ECP_C defined, but not all prerequisites"
1958#endif
1959
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001960#if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1961 !defined(POLARSSL_SHA256_C))
Paul Bakker7ad00f92013-04-18 23:05:25 +02001962#error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1963#endif
Paul Bakkerfb08fd22013-08-27 15:06:26 +02001964#if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1965 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1966#error "CTR_DRBG_ENTROPY_LEN value too high"
1967#endif
1968#if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1969 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1970#error "CTR_DRBG_ENTROPY_LEN value too high"
1971#endif
Paul Bakker7ad00f92013-04-18 23:05:25 +02001972
Manuel Pégourié-Gonnard7bd8a992013-10-24 13:39:39 +02001973#if defined(POLARSSL_GCM_C) && ( \
1974 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02001975#error "POLARSSL_GCM_C defined, but not all prerequisites"
1976#endif
1977
Paul Bakkerecd54fb2013-07-03 14:48:29 +02001978#if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1979#error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1980#endif
1981
Manuel Pégourié-Gonnard25781b22013-12-11 16:17:10 +01001982#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
1983 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1984#error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
1985#endif
1986
1987#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
1988 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1989#error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
1990#endif
1991
Paul Bakkere07f41d2013-04-19 09:08:57 +02001992#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1993#error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1994#endif
1995
Manuel Pégourié-Gonnard3ce3bbd2013-10-11 16:53:50 +02001996#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1997 !defined(POLARSSL_ECDH_C)
1998#error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1999#endif
2000
Paul Bakkere07f41d2013-04-19 09:08:57 +02002001#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2002 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002003 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002004#error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2005#endif
2006
2007#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2008 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002009 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002010#error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2011#endif
2012
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002013#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2014 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002015 !defined(POLARSSL_X509_CRT_PARSE_C) )
Manuel Pégourié-Gonnard32ea60a2013-08-17 17:39:04 +02002016#error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2017#endif
2018
Paul Bakkere07f41d2013-04-19 09:08:57 +02002019#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002020 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002021 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002022#error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2023#endif
2024
2025#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002026 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
Manuel Pégourié-Gonnardcbf3ef32013-09-23 12:20:02 +02002027 !defined(POLARSSL_PKCS1_V15) )
Paul Bakkere07f41d2013-04-19 09:08:57 +02002028#error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2029#endif
2030
Paul Bakker6e339b52013-07-03 13:37:05 +02002031#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
2032#error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2033#endif
2034
Manuel Pégourié-Gonnard92ac76f2013-12-16 17:12:53 +01002035#if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2036#error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2037#endif
2038
Paul Bakker7ad00f92013-04-18 23:05:25 +02002039#if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2040#error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2041#endif
2042
Paul Bakkercff68422013-09-15 20:43:33 +02002043#if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2044#error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2045#endif
2046
2047#if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2048#error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002049#endif
2050
Paul Bakker4606c732013-09-15 17:04:23 +02002051#if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2052#error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2053#endif
2054
2055#if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2056#error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2057#endif
2058
Manuel Pégourié-Gonnard51be5592013-08-22 13:35:53 +02002059#if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
Paul Bakker7ad00f92013-04-18 23:05:25 +02002060#error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2061#endif
2062
2063#if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2064 !defined(POLARSSL_OID_C) )
2065#error "POLARSSL_RSA_C defined, but not all prerequisites"
2066#endif
2067
Manuel Pégourié-Gonnard7c3291e2013-10-27 14:29:51 +01002068#if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2069 !defined(POLARSSL_SHA1_C) )
2070#error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2071#endif
2072
2073#if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2074 !defined(POLARSSL_SHA1_C) )
2075#error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2076#endif
2077
2078#if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2079 !defined(POLARSSL_SHA1_C) )
2080#error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2081#endif
2082
2083#if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2084 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2085#error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2086#endif
2087
Paul Bakker7ad00f92013-04-18 23:05:25 +02002088#if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2089#error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2090#endif
2091
Paul Bakker577e0062013-08-28 11:57:20 +02002092#if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
Manuel Pégourié-Gonnard1a483832013-09-20 12:29:15 +02002093 !defined(POLARSSL_MD_C) )
Paul Bakker7ad00f92013-04-18 23:05:25 +02002094#error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2095#endif
2096
2097#if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2098#error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2099#endif
2100
Paul Bakkerd2f068e2013-08-27 21:19:20 +02002101#if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2102 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2103 !defined(POLARSSL_SSL_PROTO_TLS1_2))
2104#error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2105#endif
2106
2107#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2108 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2109#error "Illegal protocol selection"
2110#endif
2111
2112#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2113 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2114#error "Illegal protocol selection"
2115#endif
2116
2117#if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2118 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2119 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2120#error "Illegal protocol selection"
2121#endif
2122
Paul Bakker59da0a42013-08-19 13:27:17 +02002123#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
Manuel Pégourié-Gonnard92cb1d32013-09-13 16:24:20 +02002124 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2125 !defined(POLARSSL_CIPHER_MODE_CBC) )
Paul Bakker59da0a42013-08-19 13:27:17 +02002126#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2127#endif
2128
Paul Bakker2466d932013-09-28 14:40:38 +02002129#if defined(POLARSSL_THREADING_PTHREAD)
2130#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2131#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2132#endif
2133#define POLARSSL_THREADING_IMPL
2134#endif
2135
2136#if defined(POLARSSL_THREADING_ALT)
2137#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2138#error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2139#endif
2140#define POLARSSL_THREADING_IMPL
2141#endif
2142
2143#if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2144#error "POLARSSL_THREADING_C defined, single threading implementation required"
2145#endif
2146#undef POLARSSL_THREADING_IMPL
2147
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002148#if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
Paul Bakker7ad00f92013-04-18 23:05:25 +02002149 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
Paul Bakker4606c732013-09-15 17:04:23 +02002150 !defined(POLARSSL_PK_PARSE_C) )
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002151#error "POLARSSL_X509_USE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002152#endif
2153
Paul Bakker7c6b2c32013-09-16 13:49:26 +02002154#if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2155 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2156 !defined(POLARSSL_PK_WRITE_C) )
2157#error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2158#endif
2159
2160#if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2161#error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2162#endif
2163
2164#if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2165#error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2166#endif
2167
2168#if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2169#error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2170#endif
2171
2172#if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2173#error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2174#endif
2175
2176#if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2177#error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
Paul Bakker7ad00f92013-04-18 23:05:25 +02002178#endif
2179
Paul Bakker5121ce52009-01-03 21:22:43 +00002180#endif /* config.h */