blob: c7df39ce41b3777c9b1ad32cec6629ff0393118d [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 Bakker77b385e2009-07-28 17:23:11 +00007 * Joined copyright on original XySSL code with: Christophe Devine
Paul Bakkere0ccd0a2009-01-04 16:27:10 +00008 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 *
Paul Bakker5121ce52009-01-03 21:22:43 +000023 * This set of compile-time options may be used to enable
24 * or disable features selectively, and reduce the global
25 * memory footprint.
26 */
Paul Bakker40e46942009-01-03 21:51:57 +000027#ifndef POLARSSL_CONFIG_H
28#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000029
30#ifndef _CRT_SECURE_NO_DEPRECATE
31#define _CRT_SECURE_NO_DEPRECATE 1
32#endif
33
34/*
35 * Uncomment if native integers are 8-bit wide.
36 *
Paul Bakker40e46942009-01-03 21:51:57 +000037#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000038 */
39
40/*
41 * Uncomment if native integers are 16-bit wide.
42 *
Paul Bakker40e46942009-01-03 21:51:57 +000043#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000044 */
45
46/*
47 * Uncomment if the compiler supports long long.
48 *
Paul Bakker40e46942009-01-03 21:51:57 +000049#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000050 */
51
52/*
53 * Uncomment to enable the use of assembly code.
Paul Bakker68041ec2009-04-19 21:17:55 +000054 *
55 * Requires support for asm() in compiler.
56 *
57 * Used in:
58 * library/timing.c
59 * library/padlock.c
60 * include/polarssl/bn_mul.h
61 *
Paul Bakker5121ce52009-01-03 21:22:43 +000062 */
Paul Bakker40e46942009-01-03 21:51:57 +000063#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000064
65/*
66 * Uncomment if the CPU supports SSE2 (IA-32 specific).
67 *
Paul Bakker40e46942009-01-03 21:51:57 +000068#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000069 */
70
71/*
72 * Enable all SSL/TLS debugging messages.
73 */
Paul Bakker40e46942009-01-03 21:51:57 +000074#define POLARSSL_DEBUG_MSG
Paul Bakker5121ce52009-01-03 21:22:43 +000075
76/*
77 * Enable the checkup functions (*_self_test).
78 */
Paul Bakker40e46942009-01-03 21:51:57 +000079#define POLARSSL_SELF_TEST
Paul Bakker5121ce52009-01-03 21:22:43 +000080
81/*
82 * Enable the prime-number generation code.
83 */
Paul Bakker40e46942009-01-03 21:51:57 +000084#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +000085
86/*
87 * Uncomment this macro to store the AES tables in ROM.
88 *
Paul Bakker40e46942009-01-03 21:51:57 +000089#define POLARSSL_AES_ROM_TABLES
Paul Bakker5121ce52009-01-03 21:22:43 +000090 */
91
92/*
93 * Module: library/aes.c
94 * Caller: library/ssl_tls.c
95 *
96 * This module enables the following ciphersuites:
97 * SSL_RSA_AES_128_SHA
98 * SSL_RSA_AES_256_SHA
99 * SSL_EDH_RSA_AES_256_SHA
100 */
Paul Bakker40e46942009-01-03 21:51:57 +0000101#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000102
103/*
104 * Module: library/arc4.c
105 * Caller: library/ssl_tls.c
106 *
107 * This module enables the following ciphersuites:
108 * SSL_RSA_RC4_128_MD5
109 * SSL_RSA_RC4_128_SHA
110 */
Paul Bakker40e46942009-01-03 21:51:57 +0000111#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000112
113/*
114 * Module: library/base64.c
115 * Caller: library/x509parse.c
116 *
117 * This module is required for X.509 support.
118 */
Paul Bakker40e46942009-01-03 21:51:57 +0000119#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000120
121/*
122 * Module: library/bignum.c
123 * Caller: library/dhm.c
124 * library/rsa.c
125 * library/ssl_tls.c
126 * library/x509parse.c
127 *
128 * This module is required for RSA and DHM support.
129 */
Paul Bakker40e46942009-01-03 21:51:57 +0000130#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000131
132/*
Paul Bakker38119b12009-01-10 23:31:23 +0000133 * Module: library/camellia.c
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000134 * Caller: library/ssl_tls.c
Paul Bakker38119b12009-01-10 23:31:23 +0000135 *
136 * This module enabled the following cipher suites:
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000137 * SSL_RSA_CAMELLIA_128_SHA
138 * SSL_RSA_CAMELLIA_256_SHA
139 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker38119b12009-01-10 23:31:23 +0000140 */
141#define POLARSSL_CAMELLIA_C
142
143/*
Paul Bakker5121ce52009-01-03 21:22:43 +0000144 * Module: library/certs.c
145 * Caller:
146 *
147 * This module is used for testing (ssl_client/server).
148 */
Paul Bakker40e46942009-01-03 21:51:57 +0000149#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000150
151/*
152 * Module: library/debug.c
153 * Caller: library/ssl_cli.c
154 * library/ssl_srv.c
155 * library/ssl_tls.c
156 *
157 * This module provides debugging functions.
158 */
Paul Bakker40e46942009-01-03 21:51:57 +0000159#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000160
161/*
162 * Module: library/des.c
163 * Caller: library/ssl_tls.c
164 *
165 * This module enables the following ciphersuites:
166 * SSL_RSA_DES_168_SHA
167 * SSL_EDH_RSA_DES_168_SHA
168 */
Paul Bakker40e46942009-01-03 21:51:57 +0000169#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000170
171/*
172 * Module: library/dhm.c
173 * Caller: library/ssl_cli.c
174 * library/ssl_srv.c
175 *
176 * This module enables the following ciphersuites:
177 * SSL_EDH_RSA_DES_168_SHA
178 * SSL_EDH_RSA_AES_256_SHA
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000179 * SSL_EDH_RSA_CAMELLIA_256_SHA
Paul Bakker5121ce52009-01-03 21:22:43 +0000180 */
Paul Bakker40e46942009-01-03 21:51:57 +0000181#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000182
183/*
184 * Module: library/havege.c
185 * Caller:
186 *
187 * This module enables the HAVEGE random number generator.
188 */
Paul Bakker40e46942009-01-03 21:51:57 +0000189#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000190
191/*
192 * Module: library/md2.c
193 * Caller: library/x509parse.c
194 *
195 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
196 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000197 */
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000198#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000199
200/*
201 * Module: library/md4.c
202 * Caller: library/x509parse.c
203 *
204 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
205 *
Paul Bakker5121ce52009-01-03 21:22:43 +0000206 */
Paul Bakker13e2dfe2009-07-28 07:18:38 +0000207#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000208
209/*
210 * Module: library/md5.c
211 * Caller: library/ssl_tls.c
212 * library/x509parse.c
213 *
214 * This module is required for SSL/TLS and X.509.
215 */
Paul Bakker40e46942009-01-03 21:51:57 +0000216#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000217
218/*
219 * Module: library/net.c
220 * Caller:
221 *
222 * This module provides TCP/IP networking routines.
223 */
Paul Bakker40e46942009-01-03 21:51:57 +0000224#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000225
226/*
227 * Module: library/padlock.c
228 * Caller: library/aes.c
229 *
230 * This modules adds support for the VIA PadLock on x86.
231 */
Paul Bakker40e46942009-01-03 21:51:57 +0000232#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000233
234/*
235 * Module: library/rsa.c
236 * Caller: library/ssl_cli.c
237 * library/ssl_srv.c
238 * library/ssl_tls.c
239 * library/x509.c
240 *
241 * This module is required for SSL/TLS and MD5-signed certificates.
242 */
Paul Bakker40e46942009-01-03 21:51:57 +0000243#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000244
245/*
246 * Module: library/sha1.c
247 * Caller: library/ssl_cli.c
248 * library/ssl_srv.c
249 * library/ssl_tls.c
250 * library/x509parse.c
251 *
252 * This module is required for SSL/TLS and SHA1-signed certificates.
253 */
Paul Bakker40e46942009-01-03 21:51:57 +0000254#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000255
256/*
257 * Module: library/sha2.c
258 * Caller:
259 *
260 * This module adds support for SHA-224 and SHA-256.
261 */
Paul Bakker40e46942009-01-03 21:51:57 +0000262#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000263
264/*
265 * Module: library/sha4.c
266 * Caller:
267 *
268 * This module adds support for SHA-384 and SHA-512.
269 */
Paul Bakker40e46942009-01-03 21:51:57 +0000270#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000271
272/*
273 * Module: library/ssl_cli.c
274 * Caller:
275 *
276 * This module is required for SSL/TLS client support.
277 */
Paul Bakker40e46942009-01-03 21:51:57 +0000278#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000279
280/*
281 * Module: library/ssl_srv.c
282 * Caller:
283 *
284 * This module is required for SSL/TLS server support.
285 */
Paul Bakker40e46942009-01-03 21:51:57 +0000286#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000287
288/*
289 * Module: library/ssl_tls.c
290 * Caller: library/ssl_cli.c
291 * library/ssl_srv.c
292 *
293 * This module is required for SSL/TLS.
294 */
Paul Bakker40e46942009-01-03 21:51:57 +0000295#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000296
297/*
298 * Module: library/timing.c
299 * Caller: library/havege.c
300 *
301 * This module is used by the HAVEGE random number generator.
302 */
Paul Bakker40e46942009-01-03 21:51:57 +0000303#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000304
305/*
306 * Module: library/x509parse.c
307 * Caller: library/ssl_cli.c
308 * library/ssl_srv.c
309 * library/ssl_tls.c
310 *
311 * This module is required for X.509 certificate parsing.
312 */
Paul Bakker40e46942009-01-03 21:51:57 +0000313#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000314
315/*
316 * Module: library/x509_write.c
317 * Caller:
318 *
319 * This module is required for X.509 certificate writing.
320 */
Paul Bakker40e46942009-01-03 21:51:57 +0000321#define POLARSSL_X509_WRITE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000322
Paul Bakker7a7c78f2009-01-04 18:15:48 +0000323/*
324 * Module: library/xtea.c
325 * Caller:
326 */
327#define POLARSSL_XTEA_C
328
Paul Bakker5121ce52009-01-03 21:22:43 +0000329#endif /* config.h */