blob: 6fcbc26cfda215b82f58c047ec076bf4fabafa4c [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file config.h
3 *
4 * This set of compile-time options may be used to enable
5 * or disable features selectively, and reduce the global
6 * memory footprint.
7 */
Paul Bakker40e46942009-01-03 21:51:57 +00008#ifndef POLARSSL_CONFIG_H
9#define POLARSSL_CONFIG_H
Paul Bakker5121ce52009-01-03 21:22:43 +000010
11#ifndef _CRT_SECURE_NO_DEPRECATE
12#define _CRT_SECURE_NO_DEPRECATE 1
13#endif
14
15/*
16 * Uncomment if native integers are 8-bit wide.
17 *
Paul Bakker40e46942009-01-03 21:51:57 +000018#define POLARSSL_HAVE_INT8
Paul Bakker5121ce52009-01-03 21:22:43 +000019 */
20
21/*
22 * Uncomment if native integers are 16-bit wide.
23 *
Paul Bakker40e46942009-01-03 21:51:57 +000024#define POLARSSL_HAVE_INT16
Paul Bakker5121ce52009-01-03 21:22:43 +000025 */
26
27/*
28 * Uncomment if the compiler supports long long.
29 *
Paul Bakker40e46942009-01-03 21:51:57 +000030#define POLARSSL_HAVE_LONGLONG
Paul Bakker5121ce52009-01-03 21:22:43 +000031 */
32
33/*
34 * Uncomment to enable the use of assembly code.
35 */
Paul Bakker40e46942009-01-03 21:51:57 +000036#define POLARSSL_HAVE_ASM
Paul Bakker5121ce52009-01-03 21:22:43 +000037
38/*
39 * Uncomment if the CPU supports SSE2 (IA-32 specific).
40 *
Paul Bakker40e46942009-01-03 21:51:57 +000041#define POLARSSL_HAVE_SSE2
Paul Bakker5121ce52009-01-03 21:22:43 +000042 */
43
44/*
45 * Enable all SSL/TLS debugging messages.
46 */
Paul Bakker40e46942009-01-03 21:51:57 +000047#define POLARSSL_DEBUG_MSG
Paul Bakker5121ce52009-01-03 21:22:43 +000048
49/*
50 * Enable the checkup functions (*_self_test).
51 */
Paul Bakker40e46942009-01-03 21:51:57 +000052#define POLARSSL_SELF_TEST
Paul Bakker5121ce52009-01-03 21:22:43 +000053
54/*
55 * Enable the prime-number generation code.
56 */
Paul Bakker40e46942009-01-03 21:51:57 +000057#define POLARSSL_GENPRIME
Paul Bakker5121ce52009-01-03 21:22:43 +000058
59/*
60 * Uncomment this macro to store the AES tables in ROM.
61 *
Paul Bakker40e46942009-01-03 21:51:57 +000062#define POLARSSL_AES_ROM_TABLES
Paul Bakker5121ce52009-01-03 21:22:43 +000063 */
64
65/*
66 * Module: library/aes.c
67 * Caller: library/ssl_tls.c
68 *
69 * This module enables the following ciphersuites:
70 * SSL_RSA_AES_128_SHA
71 * SSL_RSA_AES_256_SHA
72 * SSL_EDH_RSA_AES_256_SHA
73 */
Paul Bakker40e46942009-01-03 21:51:57 +000074#define POLARSSL_AES_C
Paul Bakker5121ce52009-01-03 21:22:43 +000075
76/*
77 * Module: library/arc4.c
78 * Caller: library/ssl_tls.c
79 *
80 * This module enables the following ciphersuites:
81 * SSL_RSA_RC4_128_MD5
82 * SSL_RSA_RC4_128_SHA
83 */
Paul Bakker40e46942009-01-03 21:51:57 +000084#define POLARSSL_ARC4_C
Paul Bakker5121ce52009-01-03 21:22:43 +000085
86/*
87 * Module: library/base64.c
88 * Caller: library/x509parse.c
89 *
90 * This module is required for X.509 support.
91 */
Paul Bakker40e46942009-01-03 21:51:57 +000092#define POLARSSL_BASE64_C
Paul Bakker5121ce52009-01-03 21:22:43 +000093
94/*
95 * Module: library/bignum.c
96 * Caller: library/dhm.c
97 * library/rsa.c
98 * library/ssl_tls.c
99 * library/x509parse.c
100 *
101 * This module is required for RSA and DHM support.
102 */
Paul Bakker40e46942009-01-03 21:51:57 +0000103#define POLARSSL_BIGNUM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000104
105/*
106 * Module: library/certs.c
107 * Caller:
108 *
109 * This module is used for testing (ssl_client/server).
110 */
Paul Bakker40e46942009-01-03 21:51:57 +0000111#define POLARSSL_CERTS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000112
113/*
114 * Module: library/debug.c
115 * Caller: library/ssl_cli.c
116 * library/ssl_srv.c
117 * library/ssl_tls.c
118 *
119 * This module provides debugging functions.
120 */
Paul Bakker40e46942009-01-03 21:51:57 +0000121#define POLARSSL_DEBUG_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000122
123/*
124 * Module: library/des.c
125 * Caller: library/ssl_tls.c
126 *
127 * This module enables the following ciphersuites:
128 * SSL_RSA_DES_168_SHA
129 * SSL_EDH_RSA_DES_168_SHA
130 */
Paul Bakker40e46942009-01-03 21:51:57 +0000131#define POLARSSL_DES_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000132
133/*
134 * Module: library/dhm.c
135 * Caller: library/ssl_cli.c
136 * library/ssl_srv.c
137 *
138 * This module enables the following ciphersuites:
139 * SSL_EDH_RSA_DES_168_SHA
140 * SSL_EDH_RSA_AES_256_SHA
141 */
Paul Bakker40e46942009-01-03 21:51:57 +0000142#define POLARSSL_DHM_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000143
144/*
145 * Module: library/havege.c
146 * Caller:
147 *
148 * This module enables the HAVEGE random number generator.
149 */
Paul Bakker40e46942009-01-03 21:51:57 +0000150#define POLARSSL_HAVEGE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000151
152/*
153 * Module: library/md2.c
154 * Caller: library/x509parse.c
155 *
156 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
157 *
Paul Bakker40e46942009-01-03 21:51:57 +0000158#define POLARSSL_MD2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000159 */
160
161/*
162 * Module: library/md4.c
163 * Caller: library/x509parse.c
164 *
165 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
166 *
Paul Bakker40e46942009-01-03 21:51:57 +0000167#define POLARSSL_MD4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000168 */
169
170/*
171 * Module: library/md5.c
172 * Caller: library/ssl_tls.c
173 * library/x509parse.c
174 *
175 * This module is required for SSL/TLS and X.509.
176 */
Paul Bakker40e46942009-01-03 21:51:57 +0000177#define POLARSSL_MD5_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000178
179/*
180 * Module: library/net.c
181 * Caller:
182 *
183 * This module provides TCP/IP networking routines.
184 */
Paul Bakker40e46942009-01-03 21:51:57 +0000185#define POLARSSL_NET_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000186
187/*
188 * Module: library/padlock.c
189 * Caller: library/aes.c
190 *
191 * This modules adds support for the VIA PadLock on x86.
192 */
Paul Bakker40e46942009-01-03 21:51:57 +0000193#define POLARSSL_PADLOCK_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000194
195/*
196 * Module: library/rsa.c
197 * Caller: library/ssl_cli.c
198 * library/ssl_srv.c
199 * library/ssl_tls.c
200 * library/x509.c
201 *
202 * This module is required for SSL/TLS and MD5-signed certificates.
203 */
Paul Bakker40e46942009-01-03 21:51:57 +0000204#define POLARSSL_RSA_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000205
206/*
207 * Module: library/sha1.c
208 * Caller: library/ssl_cli.c
209 * library/ssl_srv.c
210 * library/ssl_tls.c
211 * library/x509parse.c
212 *
213 * This module is required for SSL/TLS and SHA1-signed certificates.
214 */
Paul Bakker40e46942009-01-03 21:51:57 +0000215#define POLARSSL_SHA1_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000216
217/*
218 * Module: library/sha2.c
219 * Caller:
220 *
221 * This module adds support for SHA-224 and SHA-256.
222 */
Paul Bakker40e46942009-01-03 21:51:57 +0000223#define POLARSSL_SHA2_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000224
225/*
226 * Module: library/sha4.c
227 * Caller:
228 *
229 * This module adds support for SHA-384 and SHA-512.
230 */
Paul Bakker40e46942009-01-03 21:51:57 +0000231#define POLARSSL_SHA4_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000232
233/*
234 * Module: library/ssl_cli.c
235 * Caller:
236 *
237 * This module is required for SSL/TLS client support.
238 */
Paul Bakker40e46942009-01-03 21:51:57 +0000239#define POLARSSL_SSL_CLI_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000240
241/*
242 * Module: library/ssl_srv.c
243 * Caller:
244 *
245 * This module is required for SSL/TLS server support.
246 */
Paul Bakker40e46942009-01-03 21:51:57 +0000247#define POLARSSL_SSL_SRV_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000248
249/*
250 * Module: library/ssl_tls.c
251 * Caller: library/ssl_cli.c
252 * library/ssl_srv.c
253 *
254 * This module is required for SSL/TLS.
255 */
Paul Bakker40e46942009-01-03 21:51:57 +0000256#define POLARSSL_SSL_TLS_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000257
258/*
259 * Module: library/timing.c
260 * Caller: library/havege.c
261 *
262 * This module is used by the HAVEGE random number generator.
263 */
Paul Bakker40e46942009-01-03 21:51:57 +0000264#define POLARSSL_TIMING_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000265
266/*
267 * Module: library/x509parse.c
268 * Caller: library/ssl_cli.c
269 * library/ssl_srv.c
270 * library/ssl_tls.c
271 *
272 * This module is required for X.509 certificate parsing.
273 */
Paul Bakker40e46942009-01-03 21:51:57 +0000274#define POLARSSL_X509_PARSE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000275
276/*
277 * Module: library/x509_write.c
278 * Caller:
279 *
280 * This module is required for X.509 certificate writing.
281 */
Paul Bakker40e46942009-01-03 21:51:57 +0000282#define POLARSSL_X509_WRITE_C
Paul Bakker5121ce52009-01-03 21:22:43 +0000283
284#endif /* config.h */