blob: 16b984282a79a331bc774bc2e63bd6114fbcb193 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakker77b385e2009-07-28 17:23:11 +00004 * Copyright (C) 2006-2009, Paul Bakker <polarssl_maintainer at polarssl.org>
5 * All rights reserved.
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00006 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00007 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
Paul Bakker5121ce52009-01-03 21:22:43 +000021 * This set of compile-time options may be used to enable
22 * or disable features selectively, and reduce the global
23 * memory footprint.
24 */
Paul Bakker40e46942009-01-03 21:51:57 +000025#ifndef POLARSSL_CONFIG_H
26#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000027
28#ifndef _CRT_SECURE_NO_DEPRECATE
29#define _CRT_SECURE_NO_DEPRECATE 1
30#endif
31
32/*
33 * Uncomment if native integers are 8-bit wide.
34 *
Paul Bakker40e46942009-01-03 21:51:57 +000035#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000036 */
37
38/*
39 * Uncomment if native integers are 16-bit wide.
40 *
Paul Bakker40e46942009-01-03 21:51:57 +000041#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000042 */
43
44/*
45 * Uncomment if the compiler supports long long.
46 *
Paul Bakker40e46942009-01-03 21:51:57 +000047#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000048 */
49
50/*
51 * Uncomment to enable the use of assembly code.
Paul Bakker68041ec2009-04-19 21:17:55 +000052 *
53 * Requires support for asm() in compiler.
54 *
55 * Used in:
56 * library/timing.c
57 * library/padlock.c
58 * include/polarssl/bn_mul.h
59 *
Paul Bakker5121ce52009-01-03 21:22:43 +000060 */
Paul Bakker40e46942009-01-03 21:51:57 +000061#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000062
63/*
64 * Uncomment if the CPU supports SSE2 (IA-32 specific).
65 *
Paul Bakker40e46942009-01-03 21:51:57 +000066#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000067 */
68
69/*
70 * Enable all SSL/TLS debugging messages.
71 */
Paul Bakker40e46942009-01-03 21:51:57 +000072#define POLARSSL_DEBUG_MSG
Paul Bakker5121ce52009-01-03 21:22:43 +000073
74/*
75 * Enable the checkup functions (*_self_test).
76 */
Paul Bakker40e46942009-01-03 21:51:57 +000077#define POLARSSL_SELF_TEST
Paul Bakker5121ce52009-01-03 21:22:43 +000078
79/*
80 * Enable the prime-number generation code.
81 */
Paul Bakker40e46942009-01-03 21:51:57 +000082#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +000083
84/*
85 * Uncomment this macro to store the AES tables in ROM.
86 *
Paul Bakker40e46942009-01-03 21:51:57 +000087#define POLARSSL_AES_ROM_TABLES
Paul Bakker5121ce52009-01-03 21:22:43 +000088 */
89
90/*
91 * Module: library/aes.c
92 * Caller: library/ssl_tls.c
93 *
94 * This module enables the following ciphersuites:
95 * SSL_RSA_AES_128_SHA
96 * SSL_RSA_AES_256_SHA
97 * SSL_EDH_RSA_AES_256_SHA
98 */
Paul Bakker40e46942009-01-03 21:51:57 +000099#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000100
101/*
102 * Module: library/arc4.c
103 * Caller: library/ssl_tls.c
104 *
105 * This module enables the following ciphersuites:
106 * SSL_RSA_RC4_128_MD5
107 * SSL_RSA_RC4_128_SHA
108 */
Paul Bakker40e46942009-01-03 21:51:57 +0000109#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000110
111/*
112 * Module: library/base64.c
113 * Caller: library/x509parse.c
114 *
115 * This module is required for X.509 support.
116 */
Paul Bakker40e46942009-01-03 21:51:57 +0000117#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000118
119/*
120 * Module: library/bignum.c
121 * Caller: library/dhm.c
122 * library/rsa.c
123 * library/ssl_tls.c
124 * library/x509parse.c
125 *
126 * This module is required for RSA and DHM support.
127 */
Paul Bakker40e46942009-01-03 21:51:57 +0000128#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000129
130/*
Paul Bakker38119b12009-01-10 23:31:23 +0000131 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000132 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000133 *
134 * This module enabled the following cipher suites:
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000135 * SSL_RSA_CAMELLIA_128_SHA
136 * SSL_RSA_CAMELLIA_256_SHA
137 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker38119b12009-01-10 23:31:23 +0000138 */
139#define POLARSSL_CAMELLIA_C
140
141/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000142 * Module: library/certs.c
143 * Caller:
144 *
145 * This module is used for testing (ssl_client/server).
146 */
Paul Bakker40e46942009-01-03 21:51:57 +0000147#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000148
149/*
150 * Module: library/debug.c
151 * Caller: library/ssl_cli.c
152 * library/ssl_srv.c
153 * library/ssl_tls.c
154 *
155 * This module provides debugging functions.
156 */
Paul Bakker40e46942009-01-03 21:51:57 +0000157#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000158
159/*
160 * Module: library/des.c
161 * Caller: library/ssl_tls.c
162 *
163 * This module enables the following ciphersuites:
164 * SSL_RSA_DES_168_SHA
165 * SSL_EDH_RSA_DES_168_SHA
166 */
Paul Bakker40e46942009-01-03 21:51:57 +0000167#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000168
169/*
170 * Module: library/dhm.c
171 * Caller: library/ssl_cli.c
172 * library/ssl_srv.c
173 *
174 * This module enables the following ciphersuites:
175 * SSL_EDH_RSA_DES_168_SHA
176 * SSL_EDH_RSA_AES_256_SHA
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000177 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000178 */
Paul Bakker40e46942009-01-03 21:51:57 +0000179#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000180
181/*
182 * Module: library/havege.c
183 * Caller:
184 *
185 * This module enables the HAVEGE random number generator.
186 */
Paul Bakker40e46942009-01-03 21:51:57 +0000187#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000188
189/*
190 * Module: library/md2.c
191 * Caller: library/x509parse.c
192 *
193 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
194 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000195#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000196 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000197
198/*
199 * Module: library/md4.c
200 * Caller: library/x509parse.c
201 *
202 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
203 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000204#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000205 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000206
207/*
208 * Module: library/md5.c
209 * Caller: library/ssl_tls.c
210 * library/x509parse.c
211 *
212 * This module is required for SSL/TLS and X.509.
213 */
Paul Bakker40e46942009-01-03 21:51:57 +0000214#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000215
216/*
217 * Module: library/net.c
218 * Caller:
219 *
220 * This module provides TCP/IP networking routines.
221 */
Paul Bakker40e46942009-01-03 21:51:57 +0000222#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000223
224/*
225 * Module: library/padlock.c
226 * Caller: library/aes.c
227 *
228 * This modules adds support for the VIA PadLock on x86.
229 */
Paul Bakker40e46942009-01-03 21:51:57 +0000230#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000231
232/*
233 * Module: library/rsa.c
234 * Caller: library/ssl_cli.c
235 * library/ssl_srv.c
236 * library/ssl_tls.c
237 * library/x509.c
238 *
239 * This module is required for SSL/TLS and MD5-signed certificates.
240 */
Paul Bakker40e46942009-01-03 21:51:57 +0000241#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000242
243/*
244 * Module: library/sha1.c
245 * Caller: library/ssl_cli.c
246 * library/ssl_srv.c
247 * library/ssl_tls.c
248 * library/x509parse.c
249 *
250 * This module is required for SSL/TLS and SHA1-signed certificates.
251 */
Paul Bakker40e46942009-01-03 21:51:57 +0000252#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000253
254/*
255 * Module: library/sha2.c
256 * Caller:
257 *
258 * This module adds support for SHA-224 and SHA-256.
259 */
Paul Bakker40e46942009-01-03 21:51:57 +0000260#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000261
262/*
263 * Module: library/sha4.c
264 * Caller:
265 *
266 * This module adds support for SHA-384 and SHA-512.
267 */
Paul Bakker40e46942009-01-03 21:51:57 +0000268#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000269
270/*
271 * Module: library/ssl_cli.c
272 * Caller:
273 *
274 * This module is required for SSL/TLS client support.
275 */
Paul Bakker40e46942009-01-03 21:51:57 +0000276#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000277
278/*
279 * Module: library/ssl_srv.c
280 * Caller:
281 *
282 * This module is required for SSL/TLS server support.
283 */
Paul Bakker40e46942009-01-03 21:51:57 +0000284#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000285
286/*
287 * Module: library/ssl_tls.c
288 * Caller: library/ssl_cli.c
289 * library/ssl_srv.c
290 *
291 * This module is required for SSL/TLS.
292 */
Paul Bakker40e46942009-01-03 21:51:57 +0000293#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000294
295/*
296 * Module: library/timing.c
297 * Caller: library/havege.c
298 *
299 * This module is used by the HAVEGE random number generator.
300 */
Paul Bakker40e46942009-01-03 21:51:57 +0000301#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000302
303/*
304 * Module: library/x509parse.c
305 * Caller: library/ssl_cli.c
306 * library/ssl_srv.c
307 * library/ssl_tls.c
308 *
309 * This module is required for X.509 certificate parsing.
310 */
Paul Bakker40e46942009-01-03 21:51:57 +0000311#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000312
313/*
314 * Module: library/x509_write.c
315 * Caller:
316 *
317 * This module is required for X.509 certificate writing.
318 */
Paul Bakker40e46942009-01-03 21:51:57 +0000319#define POLARSSL_X509_WRITE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000320
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000321/*
322 * Module: library/xtea.c
323 * Caller:
324 */
325#define POLARSSL_XTEA_C
326
Paul Bakker5121ce52009-01-03 21:22:43 +0000327#endif /* config.h */