blob: ca8782804338bb429d84177f8ede169b67227f3c [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakkerfc8c4362010-03-21 17:37:16 +00004 * Copyright (C) 2006-2010, Paul Bakker <polarssl_maintainer at polarssl.org>
Paul Bakker77b385e2009-07-28 17:23:11 +00005 * 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/*
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000080 * Enable run-time version information functions
81 */
82#define POLARSSL_VERSION_C
83
84/*
Paul Bakker5121ce52009-01-03 21:22:43 +000085 * Enable the prime-number generation code.
86 */
Paul Bakker40e46942009-01-03 21:51:57 +000087#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +000088
89/*
90 * Uncomment this macro to store the AES tables in ROM.
91 *
Paul Bakker40e46942009-01-03 21:51:57 +000092#define POLARSSL_AES_ROM_TABLES
Paul Bakker5121ce52009-01-03 21:22:43 +000093 */
94
95/*
96 * Module: library/aes.c
97 * Caller: library/ssl_tls.c
98 *
99 * This module enables the following ciphersuites:
100 * SSL_RSA_AES_128_SHA
101 * SSL_RSA_AES_256_SHA
102 * SSL_EDH_RSA_AES_256_SHA
103 */
Paul Bakker40e46942009-01-03 21:51:57 +0000104#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000105
106/*
107 * Module: library/arc4.c
108 * Caller: library/ssl_tls.c
109 *
110 * This module enables the following ciphersuites:
111 * SSL_RSA_RC4_128_MD5
112 * SSL_RSA_RC4_128_SHA
113 */
Paul Bakker40e46942009-01-03 21:51:57 +0000114#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000115
116/*
117 * Module: library/base64.c
118 * Caller: library/x509parse.c
119 *
120 * This module is required for X.509 support.
121 */
Paul Bakker40e46942009-01-03 21:51:57 +0000122#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000123
124/*
125 * Module: library/bignum.c
126 * Caller: library/dhm.c
127 * library/rsa.c
128 * library/ssl_tls.c
129 * library/x509parse.c
130 *
131 * This module is required for RSA and DHM support.
132 */
Paul Bakker40e46942009-01-03 21:51:57 +0000133#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000134
135/*
Paul Bakker38119b12009-01-10 23:31:23 +0000136 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000137 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000138 *
139 * This module enabled the following cipher suites:
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000140 * SSL_RSA_CAMELLIA_128_SHA
141 * SSL_RSA_CAMELLIA_256_SHA
142 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker38119b12009-01-10 23:31:23 +0000143 */
144#define POLARSSL_CAMELLIA_C
145
146/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000147 * Module: library/certs.c
148 * Caller:
149 *
150 * This module is used for testing (ssl_client/server).
151 */
Paul Bakker40e46942009-01-03 21:51:57 +0000152#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000153
154/*
155 * Module: library/debug.c
156 * Caller: library/ssl_cli.c
157 * library/ssl_srv.c
158 * library/ssl_tls.c
159 *
160 * This module provides debugging functions.
161 */
Paul Bakker40e46942009-01-03 21:51:57 +0000162#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000163
164/*
165 * Module: library/des.c
166 * Caller: library/ssl_tls.c
167 *
168 * This module enables the following ciphersuites:
169 * SSL_RSA_DES_168_SHA
170 * SSL_EDH_RSA_DES_168_SHA
171 */
Paul Bakker40e46942009-01-03 21:51:57 +0000172#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000173
174/*
175 * Module: library/dhm.c
176 * Caller: library/ssl_cli.c
177 * library/ssl_srv.c
178 *
179 * This module enables the following ciphersuites:
180 * SSL_EDH_RSA_DES_168_SHA
181 * SSL_EDH_RSA_AES_256_SHA
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000182 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000183 */
Paul Bakker40e46942009-01-03 21:51:57 +0000184#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000185
186/*
187 * Module: library/havege.c
188 * Caller:
189 *
190 * This module enables the HAVEGE random number generator.
191 */
Paul Bakker40e46942009-01-03 21:51:57 +0000192#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000193
194/*
195 * Module: library/md2.c
196 * Caller: library/x509parse.c
197 *
198 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
199 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000200#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000201 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000202
203/*
204 * Module: library/md4.c
205 * Caller: library/x509parse.c
206 *
207 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
208 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000209#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000210 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000211
212/*
213 * Module: library/md5.c
214 * Caller: library/ssl_tls.c
215 * library/x509parse.c
216 *
217 * This module is required for SSL/TLS and X.509.
218 */
Paul Bakker40e46942009-01-03 21:51:57 +0000219#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000220
221/*
222 * Module: library/net.c
223 * Caller:
224 *
225 * This module provides TCP/IP networking routines.
226 */
Paul Bakker40e46942009-01-03 21:51:57 +0000227#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000228
229/*
230 * Module: library/padlock.c
231 * Caller: library/aes.c
232 *
233 * This modules adds support for the VIA PadLock on x86.
234 */
Paul Bakker40e46942009-01-03 21:51:57 +0000235#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000236
237/*
238 * Module: library/rsa.c
239 * Caller: library/ssl_cli.c
240 * library/ssl_srv.c
241 * library/ssl_tls.c
242 * library/x509.c
243 *
244 * This module is required for SSL/TLS and MD5-signed certificates.
245 */
Paul Bakker40e46942009-01-03 21:51:57 +0000246#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000247
248/*
249 * Module: library/sha1.c
250 * Caller: library/ssl_cli.c
251 * library/ssl_srv.c
252 * library/ssl_tls.c
253 * library/x509parse.c
254 *
255 * This module is required for SSL/TLS and SHA1-signed certificates.
256 */
Paul Bakker40e46942009-01-03 21:51:57 +0000257#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000258
259/*
260 * Module: library/sha2.c
261 * Caller:
262 *
263 * This module adds support for SHA-224 and SHA-256.
264 */
Paul Bakker40e46942009-01-03 21:51:57 +0000265#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000266
267/*
268 * Module: library/sha4.c
269 * Caller:
270 *
271 * This module adds support for SHA-384 and SHA-512.
272 */
Paul Bakker40e46942009-01-03 21:51:57 +0000273#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000274
275/*
276 * Module: library/ssl_cli.c
277 * Caller:
278 *
279 * This module is required for SSL/TLS client support.
280 */
Paul Bakker40e46942009-01-03 21:51:57 +0000281#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000282
283/*
284 * Module: library/ssl_srv.c
285 * Caller:
286 *
287 * This module is required for SSL/TLS server support.
288 */
Paul Bakker40e46942009-01-03 21:51:57 +0000289#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000290
291/*
292 * Module: library/ssl_tls.c
293 * Caller: library/ssl_cli.c
294 * library/ssl_srv.c
295 *
296 * This module is required for SSL/TLS.
297 */
Paul Bakker40e46942009-01-03 21:51:57 +0000298#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000299
300/*
301 * Module: library/timing.c
302 * Caller: library/havege.c
303 *
304 * This module is used by the HAVEGE random number generator.
305 */
Paul Bakker40e46942009-01-03 21:51:57 +0000306#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000307
308/*
309 * Module: library/x509parse.c
310 * Caller: library/ssl_cli.c
311 * library/ssl_srv.c
312 * library/ssl_tls.c
313 *
314 * This module is required for X.509 certificate parsing.
315 */
Paul Bakker40e46942009-01-03 21:51:57 +0000316#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000317
318/*
319 * Module: library/x509_write.c
320 * Caller:
321 *
322 * This module is required for X.509 certificate writing.
323 */
Paul Bakker40e46942009-01-03 21:51:57 +0000324#define POLARSSL_X509_WRITE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000325
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000326/*
327 * Module: library/xtea.c
328 * Caller:
329 */
330#define POLARSSL_XTEA_C
331
Paul Bakker5121ce52009-01-03 21:22:43 +0000332#endif /* config.h */