blob: 3b0c7e7ea0cce4e477287235bf14d14559a6c0ce [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/*
39 * Uncomment if native integers are 8-bit wide.
40 *
Paul Bakker40e46942009-01-03 21:51:57 +000041#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000042 */
43
44/*
45 * Uncomment if native integers are 16-bit wide.
46 *
Paul Bakker40e46942009-01-03 21:51:57 +000047#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000048 */
49
50/*
51 * Uncomment if the compiler supports long long.
52 *
Paul Bakker40e46942009-01-03 21:51:57 +000053#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000054 */
55
56/*
57 * Uncomment to enable the use of assembly code.
Paul Bakker68041ec2009-04-19 21:17:55 +000058 *
59 * Requires support for asm() in compiler.
60 *
61 * Used in:
62 * library/timing.c
63 * library/padlock.c
64 * include/polarssl/bn_mul.h
65 *
Paul Bakker5121ce52009-01-03 21:22:43 +000066 */
Paul Bakker40e46942009-01-03 21:51:57 +000067#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000068
69/*
70 * Uncomment if the CPU supports SSE2 (IA-32 specific).
71 *
Paul Bakker40e46942009-01-03 21:51:57 +000072#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000073 */
74
75/*
76 * Enable all SSL/TLS debugging messages.
77 */
Paul Bakker40e46942009-01-03 21:51:57 +000078#define POLARSSL_DEBUG_MSG
Paul Bakker5121ce52009-01-03 21:22:43 +000079
80/*
81 * Enable the checkup functions (*_self_test).
82 */
Paul Bakker40e46942009-01-03 21:51:57 +000083#define POLARSSL_SELF_TEST
Paul Bakker5121ce52009-01-03 21:22:43 +000084
85/*
Paul Bakker3ac1b2d2010-06-18 22:47:29 +000086 * Enable run-time version information functions
87 */
88#define POLARSSL_VERSION_C
89
90/*
Paul Bakker5121ce52009-01-03 21:22:43 +000091 * Enable the prime-number generation code.
92 */
Paul Bakker40e46942009-01-03 21:51:57 +000093#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +000094
95/*
96 * Uncomment this macro to store the AES tables in ROM.
97 *
Paul Bakker40e46942009-01-03 21:51:57 +000098#define POLARSSL_AES_ROM_TABLES
Paul Bakker5121ce52009-01-03 21:22:43 +000099 */
100
101/*
102 * Module: library/aes.c
103 * Caller: library/ssl_tls.c
104 *
105 * This module enables the following ciphersuites:
106 * SSL_RSA_AES_128_SHA
107 * SSL_RSA_AES_256_SHA
108 * SSL_EDH_RSA_AES_256_SHA
109 */
Paul Bakker40e46942009-01-03 21:51:57 +0000110#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000111
112/*
113 * Module: library/arc4.c
114 * Caller: library/ssl_tls.c
115 *
116 * This module enables the following ciphersuites:
117 * SSL_RSA_RC4_128_MD5
118 * SSL_RSA_RC4_128_SHA
119 */
Paul Bakker40e46942009-01-03 21:51:57 +0000120#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000121
122/*
123 * Module: library/base64.c
124 * Caller: library/x509parse.c
125 *
126 * This module is required for X.509 support.
127 */
Paul Bakker40e46942009-01-03 21:51:57 +0000128#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000129
130/*
131 * Module: library/bignum.c
132 * Caller: library/dhm.c
133 * library/rsa.c
134 * library/ssl_tls.c
135 * library/x509parse.c
136 *
137 * This module is required for RSA and DHM support.
138 */
Paul Bakker40e46942009-01-03 21:51:57 +0000139#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000140
141/*
Paul Bakker38119b12009-01-10 23:31:23 +0000142 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000143 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000144 *
145 * This module enabled the following cipher suites:
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000146 * SSL_RSA_CAMELLIA_128_SHA
147 * SSL_RSA_CAMELLIA_256_SHA
148 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker38119b12009-01-10 23:31:23 +0000149 */
150#define POLARSSL_CAMELLIA_C
151
152/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000153 * Module: library/certs.c
154 * Caller:
155 *
156 * This module is used for testing (ssl_client/server).
157 */
Paul Bakker40e46942009-01-03 21:51:57 +0000158#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000159
160/*
Paul Bakker8123e9d2011-01-06 15:37:30 +0000161 * Module: library/cipher.c
162 * Caller:
163 *
164 * Uncomment to enable generic cipher wrappers.
165 */
166#define POLARSSL_CIPHER_C
167
168/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000169 * Module: library/debug.c
170 * Caller: library/ssl_cli.c
171 * library/ssl_srv.c
172 * library/ssl_tls.c
173 *
174 * This module provides debugging functions.
175 */
Paul Bakker40e46942009-01-03 21:51:57 +0000176#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000177
178/*
179 * Module: library/des.c
180 * Caller: library/ssl_tls.c
181 *
182 * This module enables the following ciphersuites:
183 * SSL_RSA_DES_168_SHA
184 * SSL_EDH_RSA_DES_168_SHA
185 */
Paul Bakker40e46942009-01-03 21:51:57 +0000186#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000187
188/*
189 * Module: library/dhm.c
190 * Caller: library/ssl_cli.c
191 * library/ssl_srv.c
192 *
193 * This module enables the following ciphersuites:
194 * SSL_EDH_RSA_DES_168_SHA
195 * SSL_EDH_RSA_AES_256_SHA
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000196 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000197 */
Paul Bakker40e46942009-01-03 21:51:57 +0000198#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000199
200/*
201 * Module: library/havege.c
202 * Caller:
203 *
204 * This module enables the HAVEGE random number generator.
205 */
Paul Bakker40e46942009-01-03 21:51:57 +0000206#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000207
208/*
Paul Bakker17373852011-01-06 14:20:01 +0000209 * Module: library/md.c
210 * Caller:
211 *
212 * Uncomment to enable generic message digest wrappers.
213 */
214#define POLARSSL_MD_C
215
216/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000217 * Module: library/md2.c
218 * Caller: library/x509parse.c
219 *
220 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
221 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000222#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000223 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000224
225/*
226 * Module: library/md4.c
227 * Caller: library/x509parse.c
228 *
229 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
230 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000231#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000232 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000233
234/*
235 * Module: library/md5.c
236 * Caller: library/ssl_tls.c
237 * library/x509parse.c
238 *
239 * This module is required for SSL/TLS and X.509.
240 */
Paul Bakker40e46942009-01-03 21:51:57 +0000241#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000242
243/*
244 * Module: library/net.c
245 * Caller:
246 *
247 * This module provides TCP/IP networking routines.
248 */
Paul Bakker40e46942009-01-03 21:51:57 +0000249#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000250
251/*
252 * Module: library/padlock.c
253 * Caller: library/aes.c
254 *
255 * This modules adds support for the VIA PadLock on x86.
256 */
Paul Bakker40e46942009-01-03 21:51:57 +0000257#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000258
259/*
260 * Module: library/rsa.c
261 * Caller: library/ssl_cli.c
262 * library/ssl_srv.c
263 * library/ssl_tls.c
264 * library/x509.c
265 *
266 * This module is required for SSL/TLS and MD5-signed certificates.
267 */
Paul Bakker40e46942009-01-03 21:51:57 +0000268#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000269
270/*
271 * Module: library/sha1.c
272 * Caller: library/ssl_cli.c
273 * library/ssl_srv.c
274 * library/ssl_tls.c
275 * library/x509parse.c
276 *
277 * This module is required for SSL/TLS and SHA1-signed certificates.
278 */
Paul Bakker40e46942009-01-03 21:51:57 +0000279#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000280
281/*
282 * Module: library/sha2.c
283 * Caller:
284 *
285 * This module adds support for SHA-224 and SHA-256.
286 */
Paul Bakker40e46942009-01-03 21:51:57 +0000287#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000288
289/*
290 * Module: library/sha4.c
291 * Caller:
292 *
293 * This module adds support for SHA-384 and SHA-512.
294 */
Paul Bakker40e46942009-01-03 21:51:57 +0000295#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000296
297/*
298 * Module: library/ssl_cli.c
299 * Caller:
300 *
301 * This module is required for SSL/TLS client support.
302 */
Paul Bakker40e46942009-01-03 21:51:57 +0000303#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000304
305/*
306 * Module: library/ssl_srv.c
307 * Caller:
308 *
309 * This module is required for SSL/TLS server support.
310 */
Paul Bakker40e46942009-01-03 21:51:57 +0000311#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000312
313/*
314 * Module: library/ssl_tls.c
315 * Caller: library/ssl_cli.c
316 * library/ssl_srv.c
317 *
318 * This module is required for SSL/TLS.
319 */
Paul Bakker40e46942009-01-03 21:51:57 +0000320#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000321
322/*
323 * Module: library/timing.c
324 * Caller: library/havege.c
325 *
326 * This module is used by the HAVEGE random number generator.
327 */
Paul Bakker40e46942009-01-03 21:51:57 +0000328#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000329
330/*
331 * Module: library/x509parse.c
332 * Caller: library/ssl_cli.c
333 * library/ssl_srv.c
334 * library/ssl_tls.c
335 *
336 * This module is required for X.509 certificate parsing.
337 */
Paul Bakker40e46942009-01-03 21:51:57 +0000338#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000339
340/*
341 * Module: library/x509_write.c
342 * Caller:
343 *
344 * This module is required for X.509 certificate writing.
345 */
Paul Bakker40e46942009-01-03 21:51:57 +0000346#define POLARSSL_X509_WRITE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000347
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000348/*
349 * Module: library/xtea.c
350 * Caller:
351 */
352#define POLARSSL_XTEA_C
353
Paul Bakker5121ce52009-01-03 21:22:43 +0000354#endif /* config.h */