blob: 785e54cbc7522bdce9b8b34f15002aa4d2fe9ac6 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00004 * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine
5 *
Paul Bakker785a9ee2009-01-25 14:15:10 +00006 * Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org>
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00007 *
8 * 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/*
81 * Enable the prime-number generation code.
82 */
Paul Bakker40e46942009-01-03 21:51:57 +000083#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +000084
85/*
86 * Uncomment this macro to store the AES tables in ROM.
87 *
Paul Bakker40e46942009-01-03 21:51:57 +000088#define POLARSSL_AES_ROM_TABLES
Paul Bakker5121ce52009-01-03 21:22:43 +000089 */
90
91/*
92 * Module: library/aes.c
93 * Caller: library/ssl_tls.c
94 *
95 * This module enables the following ciphersuites:
96 * SSL_RSA_AES_128_SHA
97 * SSL_RSA_AES_256_SHA
98 * SSL_EDH_RSA_AES_256_SHA
99 */
Paul Bakker40e46942009-01-03 21:51:57 +0000100#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000101
102/*
103 * Module: library/arc4.c
104 * Caller: library/ssl_tls.c
105 *
106 * This module enables the following ciphersuites:
107 * SSL_RSA_RC4_128_MD5
108 * SSL_RSA_RC4_128_SHA
109 */
Paul Bakker40e46942009-01-03 21:51:57 +0000110#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000111
112/*
113 * Module: library/base64.c
114 * Caller: library/x509parse.c
115 *
116 * This module is required for X.509 support.
117 */
Paul Bakker40e46942009-01-03 21:51:57 +0000118#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000119
120/*
121 * Module: library/bignum.c
122 * Caller: library/dhm.c
123 * library/rsa.c
124 * library/ssl_tls.c
125 * library/x509parse.c
126 *
127 * This module is required for RSA and DHM support.
128 */
Paul Bakker40e46942009-01-03 21:51:57 +0000129#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000130
131/*
Paul Bakker38119b12009-01-10 23:31:23 +0000132 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000133 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000134 *
135 * This module enabled the following cipher suites:
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000136 * SSL_RSA_CAMELLIA_128_SHA
137 * SSL_RSA_CAMELLIA_256_SHA
138 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker38119b12009-01-10 23:31:23 +0000139 */
140#define POLARSSL_CAMELLIA_C
141
142/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000143 * Module: library/certs.c
144 * Caller:
145 *
146 * This module is used for testing (ssl_client/server).
147 */
Paul Bakker40e46942009-01-03 21:51:57 +0000148#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000149
150/*
151 * Module: library/debug.c
152 * Caller: library/ssl_cli.c
153 * library/ssl_srv.c
154 * library/ssl_tls.c
155 *
156 * This module provides debugging functions.
157 */
Paul Bakker40e46942009-01-03 21:51:57 +0000158#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000159
160/*
161 * Module: library/des.c
162 * Caller: library/ssl_tls.c
163 *
164 * This module enables the following ciphersuites:
165 * SSL_RSA_DES_168_SHA
166 * SSL_EDH_RSA_DES_168_SHA
167 */
Paul Bakker40e46942009-01-03 21:51:57 +0000168#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000169
170/*
171 * Module: library/dhm.c
172 * Caller: library/ssl_cli.c
173 * library/ssl_srv.c
174 *
175 * This module enables the following ciphersuites:
176 * SSL_EDH_RSA_DES_168_SHA
177 * SSL_EDH_RSA_AES_256_SHA
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000178 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000179 */
Paul Bakker40e46942009-01-03 21:51:57 +0000180#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000181
182/*
183 * Module: library/havege.c
184 * Caller:
185 *
186 * This module enables the HAVEGE random number generator.
187 */
Paul Bakker40e46942009-01-03 21:51:57 +0000188#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000189
190/*
191 * Module: library/md2.c
192 * Caller: library/x509parse.c
193 *
194 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
195 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000196 */
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000197#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000198
199/*
200 * Module: library/md4.c
201 * Caller: library/x509parse.c
202 *
203 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
204 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000205 */
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000206#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000207
208/*
209 * Module: library/md5.c
210 * Caller: library/ssl_tls.c
211 * library/x509parse.c
212 *
213 * This module is required for SSL/TLS and X.509.
214 */
Paul Bakker40e46942009-01-03 21:51:57 +0000215#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000216
217/*
218 * Module: library/net.c
219 * Caller:
220 *
221 * This module provides TCP/IP networking routines.
222 */
Paul Bakker40e46942009-01-03 21:51:57 +0000223#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000224
225/*
226 * Module: library/padlock.c
227 * Caller: library/aes.c
228 *
229 * This modules adds support for the VIA PadLock on x86.
230 */
Paul Bakker40e46942009-01-03 21:51:57 +0000231#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000232
233/*
234 * Module: library/rsa.c
235 * Caller: library/ssl_cli.c
236 * library/ssl_srv.c
237 * library/ssl_tls.c
238 * library/x509.c
239 *
240 * This module is required for SSL/TLS and MD5-signed certificates.
241 */
Paul Bakker40e46942009-01-03 21:51:57 +0000242#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000243
244/*
245 * Module: library/sha1.c
246 * Caller: library/ssl_cli.c
247 * library/ssl_srv.c
248 * library/ssl_tls.c
249 * library/x509parse.c
250 *
251 * This module is required for SSL/TLS and SHA1-signed certificates.
252 */
Paul Bakker40e46942009-01-03 21:51:57 +0000253#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000254
255/*
256 * Module: library/sha2.c
257 * Caller:
258 *
259 * This module adds support for SHA-224 and SHA-256.
260 */
Paul Bakker40e46942009-01-03 21:51:57 +0000261#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000262
263/*
264 * Module: library/sha4.c
265 * Caller:
266 *
267 * This module adds support for SHA-384 and SHA-512.
268 */
Paul Bakker40e46942009-01-03 21:51:57 +0000269#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000270
271/*
272 * Module: library/ssl_cli.c
273 * Caller:
274 *
275 * This module is required for SSL/TLS client support.
276 */
Paul Bakker40e46942009-01-03 21:51:57 +0000277#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000278
279/*
280 * Module: library/ssl_srv.c
281 * Caller:
282 *
283 * This module is required for SSL/TLS server support.
284 */
Paul Bakker40e46942009-01-03 21:51:57 +0000285#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000286
287/*
288 * Module: library/ssl_tls.c
289 * Caller: library/ssl_cli.c
290 * library/ssl_srv.c
291 *
292 * This module is required for SSL/TLS.
293 */
Paul Bakker40e46942009-01-03 21:51:57 +0000294#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000295
296/*
297 * Module: library/timing.c
298 * Caller: library/havege.c
299 *
300 * This module is used by the HAVEGE random number generator.
301 */
Paul Bakker40e46942009-01-03 21:51:57 +0000302#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000303
304/*
305 * Module: library/x509parse.c
306 * Caller: library/ssl_cli.c
307 * library/ssl_srv.c
308 * library/ssl_tls.c
309 *
310 * This module is required for X.509 certificate parsing.
311 */
Paul Bakker40e46942009-01-03 21:51:57 +0000312#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000313
314/*
315 * Module: library/x509_write.c
316 * Caller:
317 *
318 * This module is required for X.509 certificate writing.
319 */
Paul Bakker40e46942009-01-03 21:51:57 +0000320#define POLARSSL_X509_WRITE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000321
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000322/*
323 * Module: library/xtea.c
324 * Caller:
325 */
326#define POLARSSL_XTEA_C
327
Paul Bakker5121ce52009-01-03 21:22:43 +0000328#endif /* config.h */