blob: 1dbbfbbb0e3adf93f203435f6d95c8426621dfdc [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/*
161 * Module: library/debug.c
162 * Caller: library/ssl_cli.c
163 * library/ssl_srv.c
164 * library/ssl_tls.c
165 *
166 * This module provides debugging functions.
167 */
Paul Bakker40e46942009-01-03 21:51:57 +0000168#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000169
170/*
171 * Module: library/des.c
172 * Caller: library/ssl_tls.c
173 *
174 * This module enables the following ciphersuites:
175 * SSL_RSA_DES_168_SHA
176 * SSL_EDH_RSA_DES_168_SHA
177 */
Paul Bakker40e46942009-01-03 21:51:57 +0000178#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000179
180/*
181 * Module: library/dhm.c
182 * Caller: library/ssl_cli.c
183 * library/ssl_srv.c
184 *
185 * This module enables the following ciphersuites:
186 * SSL_EDH_RSA_DES_168_SHA
187 * SSL_EDH_RSA_AES_256_SHA
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000188 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000189 */
Paul Bakker40e46942009-01-03 21:51:57 +0000190#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000191
192/*
193 * Module: library/havege.c
194 * Caller:
195 *
196 * This module enables the HAVEGE random number generator.
197 */
Paul Bakker40e46942009-01-03 21:51:57 +0000198#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000199
200/*
201 * Module: library/md2.c
202 * Caller: library/x509parse.c
203 *
204 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
205 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000206#define POLARSSL_MD2_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000207 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000208
209/*
210 * Module: library/md4.c
211 * Caller: library/x509parse.c
212 *
213 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
214 *
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000215#define POLARSSL_MD4_C
Paul Bakker6506aff2009-07-28 20:52:02 +0000216 */
Paul Bakker5121ce52009-01-03 21:22:43 +0000217
218/*
219 * Module: library/md5.c
220 * Caller: library/ssl_tls.c
221 * library/x509parse.c
222 *
223 * This module is required for SSL/TLS and X.509.
224 */
Paul Bakker40e46942009-01-03 21:51:57 +0000225#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000226
227/*
228 * Module: library/net.c
229 * Caller:
230 *
231 * This module provides TCP/IP networking routines.
232 */
Paul Bakker40e46942009-01-03 21:51:57 +0000233#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000234
235/*
236 * Module: library/padlock.c
237 * Caller: library/aes.c
238 *
239 * This modules adds support for the VIA PadLock on x86.
240 */
Paul Bakker40e46942009-01-03 21:51:57 +0000241#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000242
243/*
244 * Module: library/rsa.c
245 * Caller: library/ssl_cli.c
246 * library/ssl_srv.c
247 * library/ssl_tls.c
248 * library/x509.c
249 *
250 * This module is required for SSL/TLS and MD5-signed certificates.
251 */
Paul Bakker40e46942009-01-03 21:51:57 +0000252#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000253
254/*
255 * Module: library/sha1.c
256 * Caller: library/ssl_cli.c
257 * library/ssl_srv.c
258 * library/ssl_tls.c
259 * library/x509parse.c
260 *
261 * This module is required for SSL/TLS and SHA1-signed certificates.
262 */
Paul Bakker40e46942009-01-03 21:51:57 +0000263#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000264
265/*
266 * Module: library/sha2.c
267 * Caller:
268 *
269 * This module adds support for SHA-224 and SHA-256.
270 */
Paul Bakker40e46942009-01-03 21:51:57 +0000271#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000272
273/*
274 * Module: library/sha4.c
275 * Caller:
276 *
277 * This module adds support for SHA-384 and SHA-512.
278 */
Paul Bakker40e46942009-01-03 21:51:57 +0000279#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000280
281/*
282 * Module: library/ssl_cli.c
283 * Caller:
284 *
285 * This module is required for SSL/TLS client support.
286 */
Paul Bakker40e46942009-01-03 21:51:57 +0000287#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000288
289/*
290 * Module: library/ssl_srv.c
291 * Caller:
292 *
293 * This module is required for SSL/TLS server support.
294 */
Paul Bakker40e46942009-01-03 21:51:57 +0000295#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000296
297/*
298 * Module: library/ssl_tls.c
299 * Caller: library/ssl_cli.c
300 * library/ssl_srv.c
301 *
302 * This module is required for SSL/TLS.
303 */
Paul Bakker40e46942009-01-03 21:51:57 +0000304#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000305
306/*
307 * Module: library/timing.c
308 * Caller: library/havege.c
309 *
310 * This module is used by the HAVEGE random number generator.
311 */
Paul Bakker40e46942009-01-03 21:51:57 +0000312#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000313
314/*
315 * Module: library/x509parse.c
316 * Caller: library/ssl_cli.c
317 * library/ssl_srv.c
318 * library/ssl_tls.c
319 *
320 * This module is required for X.509 certificate parsing.
321 */
Paul Bakker40e46942009-01-03 21:51:57 +0000322#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000323
324/*
325 * Module: library/x509_write.c
326 * Caller:
327 *
328 * This module is required for X.509 certificate writing.
329 */
Paul Bakker40e46942009-01-03 21:51:57 +0000330#define POLARSSL_X509_WRITE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000331
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000332/*
333 * Module: library/xtea.c
334 * Caller:
335 */
336#define POLARSSL_XTEA_C
337
Paul Bakker5121ce52009-01-03 21:22:43 +0000338#endif /* config.h */