blob: 2372c35bd7f2bc97faf61c6a7aa0d18d7250c743 [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 Bakker84f12b72010-07-18 10:13:04 +00006 * Copyright (C) 2006-2010, 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
34#ifndef _CRT_SECURE_NO_DEPRECATE
35#define _CRT_SECURE_NO_DEPRECATE 1
36#endif
37
38/*
Paul Bakker0a62cd12011-01-21 11:00:08 +000039 * \name SECTION: System support
40 *
41 * This section sets system specific settings.
42 * \{
43 */
44
45/*
Paul Bakker5121ce52009-01-03 21:22:43 +000046 * Uncomment if native integers are 8-bit wide.
47 *
Paul Bakker40e46942009-01-03 21:51:57 +000048#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000049 */
50
51/*
52 * Uncomment if native integers are 16-bit wide.
53 *
Paul Bakker40e46942009-01-03 21:51:57 +000054#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000055 */
56
57/*
58 * Uncomment if the compiler supports long long.
59 *
Paul Bakker40e46942009-01-03 21:51:57 +000060#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000061 */
62
63/*
64 * Uncomment to enable the use of assembly code.
Paul Bakker68041ec2009-04-19 21:17:55 +000065 *
66 * Requires support for asm() in compiler.
67 *
68 * Used in:
69 * library/timing.c
70 * library/padlock.c
71 * include/polarssl/bn_mul.h
72 *
Paul Bakker5121ce52009-01-03 21:22:43 +000073 */
Paul Bakker40e46942009-01-03 21:51:57 +000074#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000075
76/*
77 * Uncomment if the CPU supports SSE2 (IA-32 specific).
78 *
Paul Bakker40e46942009-01-03 21:51:57 +000079#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000080 */
Paul Bakker0a62cd12011-01-21 11:00:08 +000081/* \} name */
82
83/*
84 * \name SECTION: PolarSSL feature support
85 *
86 * This section sets support for features that are or are not needed
87 * within the modules that are enabled.
88 * \{
89 */
Paul Bakker5121ce52009-01-03 21:22:43 +000090
91/*
92 * Enable all SSL/TLS debugging messages.
93 */
Paul Bakker40e46942009-01-03 21:51:57 +000094#define POLARSSL_DEBUG_MSG
Paul Bakker5121ce52009-01-03 21:22:43 +000095
96/*
97 * Enable the checkup functions (*_self_test).
98 */
Paul Bakker40e46942009-01-03 21:51:57 +000099#define POLARSSL_SELF_TEST
Paul Bakker5121ce52009-01-03 21:22:43 +0000100
101/*
102 * Enable the prime-number generation code.
103 */
Paul Bakker40e46942009-01-03 21:51:57 +0000104#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +0000105
106/*
107 * Uncomment this macro to store the AES tables in ROM.
108 *
Paul Bakker40e46942009-01-03 21:51:57 +0000109#define POLARSSL_AES_ROM_TABLES
Paul Bakker5121ce52009-01-03 21:22:43 +0000110 */
Paul Bakker0a62cd12011-01-21 11:00:08 +0000111/* \} name */
112
113/*
114 * \name SECTION: PolarSSL modules
115 *
116 * This section enables or disables entire modules in PolarSSL
117 * \{
118 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000119
120/*
121 * Module: library/aes.c
122 * Caller: library/ssl_tls.c
123 *
124 * This module enables the following ciphersuites:
125 * SSL_RSA_AES_128_SHA
126 * SSL_RSA_AES_256_SHA
127 * SSL_EDH_RSA_AES_256_SHA
128 */
Paul Bakker40e46942009-01-03 21:51:57 +0000129#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000130
131/*
132 * Module: library/arc4.c
133 * Caller: library/ssl_tls.c
134 *
135 * This module enables the following ciphersuites:
136 * SSL_RSA_RC4_128_MD5
137 * SSL_RSA_RC4_128_SHA
138 */
Paul Bakker40e46942009-01-03 21:51:57 +0000139#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000140
141/*
142 * Module: library/base64.c
143 * Caller: library/x509parse.c
144 *
145 * This module is required for X.509 support.
146 */
Paul Bakker40e46942009-01-03 21:51:57 +0000147#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000148
149/*
150 * Module: library/bignum.c
151 * Caller: library/dhm.c
152 * library/rsa.c
153 * library/ssl_tls.c
154 * library/x509parse.c
155 *
156 * This module is required for RSA and DHM support.
157 */
Paul Bakker40e46942009-01-03 21:51:57 +0000158#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000159
160/*
Paul Bakker38119b12009-01-10 23:31:23 +0000161 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000162 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000163 *
164 * This module enabled the following cipher suites:
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000165 * SSL_RSA_CAMELLIA_128_SHA
166 * SSL_RSA_CAMELLIA_256_SHA
167 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker38119b12009-01-10 23:31:23 +0000168 */
169#define POLARSSL_CAMELLIA_C
170
171/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000172 * Module: library/certs.c
173 * Caller:
174 *
175 * This module is used for testing (ssl_client/server).
176 */
Paul Bakker40e46942009-01-03 21:51:57 +0000177#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000178
179/*
Paul Bakker8123e9d2011-01-06 15:37:30 +0000180 * Module: library/cipher.c
181 * Caller:
182 *
183 * Uncomment to enable generic cipher wrappers.
184 */
185#define POLARSSL_CIPHER_C
186
187/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000188 * Module: library/debug.c
189 * Caller: library/ssl_cli.c
190 * library/ssl_srv.c
191 * library/ssl_tls.c
192 *
193 * This module provides debugging functions.
194 */
Paul Bakker40e46942009-01-03 21:51:57 +0000195#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000196
197/*
198 * Module: library/des.c
199 * Caller: library/ssl_tls.c
200 *
201 * This module enables the following ciphersuites:
202 * SSL_RSA_DES_168_SHA
203 * SSL_EDH_RSA_DES_168_SHA
204 */
Paul Bakker40e46942009-01-03 21:51:57 +0000205#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000206
207/*
208 * Module: library/dhm.c
209 * Caller: library/ssl_cli.c
210 * library/ssl_srv.c
211 *
212 * This module enables the following ciphersuites:
213 * SSL_EDH_RSA_DES_168_SHA
214 * SSL_EDH_RSA_AES_256_SHA
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000215 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000216 */
Paul Bakker40e46942009-01-03 21:51:57 +0000217#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000218
219/*
220 * Module: library/havege.c
221 * Caller:
222 *
223 * This module enables the HAVEGE random number generator.
224 */
Paul Bakker40e46942009-01-03 21:51:57 +0000225#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000226
227/*
Paul Bakker17373852011-01-06 14:20:01 +0000228 * Module: library/md.c
229 * Caller:
230 *
231 * Uncomment to enable generic message digest wrappers.
232 */
233#define POLARSSL_MD_C
234
235/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000236 * Module: library/md2.c
237 * Caller: library/x509parse.c
238 *
239 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
240 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000241#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000242 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000243
244/*
245 * Module: library/md4.c
246 * Caller: library/x509parse.c
247 *
248 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
249 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000250#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000251 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000252
253/*
254 * Module: library/md5.c
255 * Caller: library/ssl_tls.c
256 * library/x509parse.c
257 *
258 * This module is required for SSL/TLS and X.509.
259 */
Paul Bakker40e46942009-01-03 21:51:57 +0000260#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000261
262/*
263 * Module: library/net.c
264 * Caller:
265 *
266 * This module provides TCP/IP networking routines.
267 */
Paul Bakker40e46942009-01-03 21:51:57 +0000268#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000269
270/*
271 * Module: library/padlock.c
272 * Caller: library/aes.c
273 *
274 * This modules adds support for the VIA PadLock on x86.
275 */
Paul Bakker40e46942009-01-03 21:51:57 +0000276#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000277
278/*
279 * Module: library/rsa.c
280 * Caller: library/ssl_cli.c
281 * library/ssl_srv.c
282 * library/ssl_tls.c
283 * library/x509.c
284 *
285 * This module is required for SSL/TLS and MD5-signed certificates.
286 */
Paul Bakker40e46942009-01-03 21:51:57 +0000287#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000288
289/*
290 * Module: library/sha1.c
291 * Caller: library/ssl_cli.c
292 * library/ssl_srv.c
293 * library/ssl_tls.c
294 * library/x509parse.c
295 *
296 * This module is required for SSL/TLS and SHA1-signed certificates.
297 */
Paul Bakker40e46942009-01-03 21:51:57 +0000298#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000299
300/*
301 * Module: library/sha2.c
302 * Caller:
303 *
304 * This module adds support for SHA-224 and SHA-256.
305 */
Paul Bakker40e46942009-01-03 21:51:57 +0000306#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000307
308/*
309 * Module: library/sha4.c
310 * Caller:
311 *
312 * This module adds support for SHA-384 and SHA-512.
313 */
Paul Bakker40e46942009-01-03 21:51:57 +0000314#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000315
316/*
317 * Module: library/ssl_cli.c
318 * Caller:
319 *
320 * This module is required for SSL/TLS client support.
321 */
Paul Bakker40e46942009-01-03 21:51:57 +0000322#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000323
324/*
325 * Module: library/ssl_srv.c
326 * Caller:
327 *
328 * This module is required for SSL/TLS server support.
329 */
Paul Bakker40e46942009-01-03 21:51:57 +0000330#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000331
332/*
333 * Module: library/ssl_tls.c
334 * Caller: library/ssl_cli.c
335 * library/ssl_srv.c
336 *
337 * This module is required for SSL/TLS.
338 */
Paul Bakker40e46942009-01-03 21:51:57 +0000339#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000340
341/*
Paul Bakker43b7e352011-01-18 15:27:19 +0000342 * Module: library/ssl_srv.c
343 * Caller: library/ssl_cli.c
344 * library/ssl_srv.c
345 *
346 * This module is required for SSL/TLS PKCS #11 smartcard support.
347 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
Paul Bakker43b7e352011-01-18 15:27:19 +0000348#define POLARSSL_PKCS11_C
Paul Bakkerf917e422011-01-18 16:15:25 +0000349 */
Paul Bakker43b7e352011-01-18 15:27:19 +0000350
351/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000352 * Module: library/timing.c
353 * Caller: library/havege.c
354 *
355 * This module is used by the HAVEGE random number generator.
356 */
Paul Bakker40e46942009-01-03 21:51:57 +0000357#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000358
359/*
Paul Bakker0a62cd12011-01-21 11:00:08 +0000360 * Module: library/version.c
361 *
362 * This module provides run-time version information.
363 */
364#define POLARSSL_VERSION_C
365
366/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000367 * Module: library/x509parse.c
368 * Caller: library/ssl_cli.c
369 * library/ssl_srv.c
370 * library/ssl_tls.c
371 *
372 * This module is required for X.509 certificate parsing.
373 */
Paul Bakker40e46942009-01-03 21:51:57 +0000374#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000375
376/*
377 * Module: library/x509_write.c
378 * Caller:
379 *
380 * This module is required for X.509 certificate writing.
381 */
Paul Bakker40e46942009-01-03 21:51:57 +0000382#define POLARSSL_X509_WRITE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000383
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000384/*
385 * Module: library/xtea.c
386 * Caller:
387 */
388#define POLARSSL_XTEA_C
Paul Bakker0a62cd12011-01-21 11:00:08 +0000389/* \} name */
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000390
Paul Bakker5121ce52009-01-03 21:22:43 +0000391#endif /* config.h */