blob: aeee124b8c8699ba03d98609cb461da2d5ee9edd [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakker84f12b72010-07-18 10:13:04 +00004 * Copyright (C) 2006-2010, Brainspark B.V.
5 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakker77b385e2009-07-28 17:23:11 +00006 * All rights reserved.
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00007 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00008 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
Paul Bakker5121ce52009-01-03 21:22:43 +000022 * This set of compile-time options may be used to enable
23 * or disable features selectively, and reduce the global
24 * memory footprint.
25 */
Paul Bakker40e46942009-01-03 21:51:57 +000026#ifndef POLARSSL_CONFIG_H
27#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000028
29#ifndef _CRT_SECURE_NO_DEPRECATE
30#define _CRT_SECURE_NO_DEPRECATE 1
31#endif
32
33/*
34 * Uncomment if native integers are 8-bit wide.
35 *
Paul Bakker40e46942009-01-03 21:51:57 +000036#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000037 */
38
39/*
40 * Uncomment if native integers are 16-bit wide.
41 *
Paul Bakker40e46942009-01-03 21:51:57 +000042#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000043 */
44
45/*
46 * Uncomment if the compiler supports long long.
47 *
Paul Bakker40e46942009-01-03 21:51:57 +000048#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000049 */
50
51/*
52 * Uncomment to enable the use of assembly code.
Paul Bakker68041ec2009-04-19 21:17:55 +000053 *
54 * Requires support for asm() in compiler.
55 *
56 * Used in:
57 * library/timing.c
58 * library/padlock.c
59 * include/polarssl/bn_mul.h
60 *
Paul Bakker5121ce52009-01-03 21:22:43 +000061 */
Paul Bakker40e46942009-01-03 21:51:57 +000062#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000063
64/*
65 * Uncomment if the CPU supports SSE2 (IA-32 specific).
66 *
Paul Bakker40e46942009-01-03 21:51:57 +000067#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000068 */
69
70/*
71 * Enable all SSL/TLS debugging messages.
72 */
Paul Bakker40e46942009-01-03 21:51:57 +000073#define POLARSSL_DEBUG_MSG
Paul Bakker5121ce52009-01-03 21:22:43 +000074
75/*
76 * Enable the checkup functions (*_self_test).
77 */
Paul Bakker40e46942009-01-03 21:51:57 +000078#define POLARSSL_SELF_TEST
Paul Bakker5121ce52009-01-03 21:22:43 +000079
80/*
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000081 * Enable run-time version information functions
82 */
83#define POLARSSL_VERSION_C
84
85/*
Paul Bakker5121ce52009-01-03 21:22:43 +000086 * Enable the prime-number generation code.
87 */
Paul Bakker40e46942009-01-03 21:51:57 +000088#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +000089
90/*
91 * Uncomment this macro to store the AES tables in ROM.
92 *
Paul Bakker40e46942009-01-03 21:51:57 +000093#define POLARSSL_AES_ROM_TABLES
Paul Bakker5121ce52009-01-03 21:22:43 +000094 */
95
96/*
97 * Module: library/aes.c
98 * Caller: library/ssl_tls.c
99 *
100 * This module enables the following ciphersuites:
101 * SSL_RSA_AES_128_SHA
102 * SSL_RSA_AES_256_SHA
103 * SSL_EDH_RSA_AES_256_SHA
104 */
Paul Bakker40e46942009-01-03 21:51:57 +0000105#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000106
107/*
108 * Module: library/arc4.c
109 * Caller: library/ssl_tls.c
110 *
111 * This module enables the following ciphersuites:
112 * SSL_RSA_RC4_128_MD5
113 * SSL_RSA_RC4_128_SHA
114 */
Paul Bakker40e46942009-01-03 21:51:57 +0000115#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000116
117/*
118 * Module: library/base64.c
119 * Caller: library/x509parse.c
120 *
121 * This module is required for X.509 support.
122 */
Paul Bakker40e46942009-01-03 21:51:57 +0000123#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000124
125/*
126 * Module: library/bignum.c
127 * Caller: library/dhm.c
128 * library/rsa.c
129 * library/ssl_tls.c
130 * library/x509parse.c
131 *
132 * This module is required for RSA and DHM support.
133 */
Paul Bakker40e46942009-01-03 21:51:57 +0000134#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000135
136/*
Paul Bakker38119b12009-01-10 23:31:23 +0000137 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000138 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000139 *
140 * This module enabled the following cipher suites:
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000141 * SSL_RSA_CAMELLIA_128_SHA
142 * SSL_RSA_CAMELLIA_256_SHA
143 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker38119b12009-01-10 23:31:23 +0000144 */
145#define POLARSSL_CAMELLIA_C
146
147/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000148 * Module: library/certs.c
149 * Caller:
150 *
151 * This module is used for testing (ssl_client/server).
152 */
Paul Bakker40e46942009-01-03 21:51:57 +0000153#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000154
155/*
156 * Module: library/debug.c
157 * Caller: library/ssl_cli.c
158 * library/ssl_srv.c
159 * library/ssl_tls.c
160 *
161 * This module provides debugging functions.
162 */
Paul Bakker40e46942009-01-03 21:51:57 +0000163#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000164
165/*
166 * Module: library/des.c
167 * Caller: library/ssl_tls.c
168 *
169 * This module enables the following ciphersuites:
170 * SSL_RSA_DES_168_SHA
171 * SSL_EDH_RSA_DES_168_SHA
172 */
Paul Bakker40e46942009-01-03 21:51:57 +0000173#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000174
175/*
176 * Module: library/dhm.c
177 * Caller: library/ssl_cli.c
178 * library/ssl_srv.c
179 *
180 * This module enables the following ciphersuites:
181 * SSL_EDH_RSA_DES_168_SHA
182 * SSL_EDH_RSA_AES_256_SHA
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000183 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000184 */
Paul Bakker40e46942009-01-03 21:51:57 +0000185#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000186
187/*
188 * Module: library/havege.c
189 * Caller:
190 *
191 * This module enables the HAVEGE random number generator.
192 */
Paul Bakker40e46942009-01-03 21:51:57 +0000193#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000194
195/*
196 * Module: library/md2.c
197 * Caller: library/x509parse.c
198 *
199 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
200 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000201#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000202 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000203
204/*
205 * Module: library/md4.c
206 * Caller: library/x509parse.c
207 *
208 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
209 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000210#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000211 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000212
213/*
214 * Module: library/md5.c
215 * Caller: library/ssl_tls.c
216 * library/x509parse.c
217 *
218 * This module is required for SSL/TLS and X.509.
219 */
Paul Bakker40e46942009-01-03 21:51:57 +0000220#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000221
222/*
223 * Module: library/net.c
224 * Caller:
225 *
226 * This module provides TCP/IP networking routines.
227 */
Paul Bakker40e46942009-01-03 21:51:57 +0000228#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000229
230/*
231 * Module: library/padlock.c
232 * Caller: library/aes.c
233 *
234 * This modules adds support for the VIA PadLock on x86.
235 */
Paul Bakker40e46942009-01-03 21:51:57 +0000236#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000237
238/*
239 * Module: library/rsa.c
240 * Caller: library/ssl_cli.c
241 * library/ssl_srv.c
242 * library/ssl_tls.c
243 * library/x509.c
244 *
245 * This module is required for SSL/TLS and MD5-signed certificates.
246 */
Paul Bakker40e46942009-01-03 21:51:57 +0000247#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000248
249/*
250 * Module: library/sha1.c
251 * Caller: library/ssl_cli.c
252 * library/ssl_srv.c
253 * library/ssl_tls.c
254 * library/x509parse.c
255 *
256 * This module is required for SSL/TLS and SHA1-signed certificates.
257 */
Paul Bakker40e46942009-01-03 21:51:57 +0000258#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000259
260/*
261 * Module: library/sha2.c
262 * Caller:
263 *
264 * This module adds support for SHA-224 and SHA-256.
265 */
Paul Bakker40e46942009-01-03 21:51:57 +0000266#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000267
268/*
269 * Module: library/sha4.c
270 * Caller:
271 *
272 * This module adds support for SHA-384 and SHA-512.
273 */
Paul Bakker40e46942009-01-03 21:51:57 +0000274#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000275
276/*
277 * Module: library/ssl_cli.c
278 * Caller:
279 *
280 * This module is required for SSL/TLS client support.
281 */
Paul Bakker40e46942009-01-03 21:51:57 +0000282#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000283
284/*
285 * Module: library/ssl_srv.c
286 * Caller:
287 *
288 * This module is required for SSL/TLS server support.
289 */
Paul Bakker40e46942009-01-03 21:51:57 +0000290#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000291
292/*
293 * Module: library/ssl_tls.c
294 * Caller: library/ssl_cli.c
295 * library/ssl_srv.c
296 *
297 * This module is required for SSL/TLS.
298 */
Paul Bakker40e46942009-01-03 21:51:57 +0000299#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000300
301/*
302 * Module: library/timing.c
303 * Caller: library/havege.c
304 *
305 * This module is used by the HAVEGE random number generator.
306 */
Paul Bakker40e46942009-01-03 21:51:57 +0000307#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000308
309/*
310 * Module: library/x509parse.c
311 * Caller: library/ssl_cli.c
312 * library/ssl_srv.c
313 * library/ssl_tls.c
314 *
315 * This module is required for X.509 certificate parsing.
316 */
Paul Bakker40e46942009-01-03 21:51:57 +0000317#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000318
319/*
320 * Module: library/x509_write.c
321 * Caller:
322 *
323 * This module is required for X.509 certificate writing.
324 */
Paul Bakker40e46942009-01-03 21:51:57 +0000325#define POLARSSL_X509_WRITE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000326
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000327/*
328 * Module: library/xtea.c
329 * Caller:
330 */
331#define POLARSSL_XTEA_C
332
Paul Bakker5121ce52009-01-03 21:22:43 +0000333#endif /* config.h */