Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1 | /** |
| 2 | * \file config.h |
| 3 | * |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 4 | * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine |
| 5 | * |
Paul Bakker | 785a9ee | 2009-01-25 14:15:10 +0000 | [diff] [blame] | 6 | * Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org> |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 7 | * |
| 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 Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 22 | * 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 Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 26 | #ifndef POLARSSL_CONFIG_H |
| 27 | #define POLARSSL_CONFIG_H |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 28 | |
| 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 Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 36 | #define POLARSSL_HAVE_INT8 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 37 | */ |
| 38 | |
| 39 | /* |
| 40 | * Uncomment if native integers are 16-bit wide. |
| 41 | * |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 42 | #define POLARSSL_HAVE_INT16 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 43 | */ |
| 44 | |
| 45 | /* |
| 46 | * Uncomment if the compiler supports long long. |
| 47 | * |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 48 | #define POLARSSL_HAVE_LONGLONG |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 49 | */ |
| 50 | |
| 51 | /* |
| 52 | * Uncomment to enable the use of assembly code. |
Paul Bakker | 68041ec | 2009-04-19 21:17:55 +0000 | [diff] [blame] | 53 | * |
| 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 Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 61 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 62 | #define POLARSSL_HAVE_ASM |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 63 | |
| 64 | /* |
| 65 | * Uncomment if the CPU supports SSE2 (IA-32 specific). |
| 66 | * |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 67 | #define POLARSSL_HAVE_SSE2 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 68 | */ |
| 69 | |
| 70 | /* |
| 71 | * Enable all SSL/TLS debugging messages. |
| 72 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 73 | #define POLARSSL_DEBUG_MSG |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 74 | |
| 75 | /* |
| 76 | * Enable the checkup functions (*_self_test). |
| 77 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 78 | #define POLARSSL_SELF_TEST |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 79 | |
| 80 | /* |
| 81 | * Enable the prime-number generation code. |
| 82 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 83 | #define POLARSSL_GENPRIME |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 84 | |
| 85 | /* |
| 86 | * Uncomment this macro to store the AES tables in ROM. |
| 87 | * |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 88 | #define POLARSSL_AES_ROM_TABLES |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 89 | */ |
| 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 Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 100 | #define POLARSSL_AES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 101 | |
| 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 Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 110 | #define POLARSSL_ARC4_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 111 | |
| 112 | /* |
| 113 | * Module: library/base64.c |
| 114 | * Caller: library/x509parse.c |
| 115 | * |
| 116 | * This module is required for X.509 support. |
| 117 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 118 | #define POLARSSL_BASE64_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 119 | |
| 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 Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 129 | #define POLARSSL_BIGNUM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 130 | |
| 131 | /* |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 132 | * Module: library/camellia.c |
| 133 | * Caller: |
| 134 | * |
| 135 | * This module enabled the following cipher suites: |
| 136 | */ |
| 137 | #define POLARSSL_CAMELLIA_C |
| 138 | |
| 139 | /* |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 140 | * Module: library/certs.c |
| 141 | * Caller: |
| 142 | * |
| 143 | * This module is used for testing (ssl_client/server). |
| 144 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 145 | #define POLARSSL_CERTS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 146 | |
| 147 | /* |
| 148 | * Module: library/debug.c |
| 149 | * Caller: library/ssl_cli.c |
| 150 | * library/ssl_srv.c |
| 151 | * library/ssl_tls.c |
| 152 | * |
| 153 | * This module provides debugging functions. |
| 154 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 155 | #define POLARSSL_DEBUG_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 156 | |
| 157 | /* |
| 158 | * Module: library/des.c |
| 159 | * Caller: library/ssl_tls.c |
| 160 | * |
| 161 | * This module enables the following ciphersuites: |
| 162 | * SSL_RSA_DES_168_SHA |
| 163 | * SSL_EDH_RSA_DES_168_SHA |
| 164 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 165 | #define POLARSSL_DES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 166 | |
| 167 | /* |
| 168 | * Module: library/dhm.c |
| 169 | * Caller: library/ssl_cli.c |
| 170 | * library/ssl_srv.c |
| 171 | * |
| 172 | * This module enables the following ciphersuites: |
| 173 | * SSL_EDH_RSA_DES_168_SHA |
| 174 | * SSL_EDH_RSA_AES_256_SHA |
| 175 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 176 | #define POLARSSL_DHM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 177 | |
| 178 | /* |
| 179 | * Module: library/havege.c |
| 180 | * Caller: |
| 181 | * |
| 182 | * This module enables the HAVEGE random number generator. |
| 183 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 184 | #define POLARSSL_HAVEGE_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 185 | |
| 186 | /* |
| 187 | * Module: library/md2.c |
| 188 | * Caller: library/x509parse.c |
| 189 | * |
| 190 | * Uncomment to enable support for (rare) MD2-signed X.509 certs. |
| 191 | * |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 192 | #define POLARSSL_MD2_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 193 | */ |
| 194 | |
| 195 | /* |
| 196 | * Module: library/md4.c |
| 197 | * Caller: library/x509parse.c |
| 198 | * |
| 199 | * Uncomment to enable support for (rare) MD4-signed X.509 certs. |
| 200 | * |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 201 | #define POLARSSL_MD4_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 202 | */ |
| 203 | |
| 204 | /* |
| 205 | * Module: library/md5.c |
| 206 | * Caller: library/ssl_tls.c |
| 207 | * library/x509parse.c |
| 208 | * |
| 209 | * This module is required for SSL/TLS and X.509. |
| 210 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 211 | #define POLARSSL_MD5_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 212 | |
| 213 | /* |
| 214 | * Module: library/net.c |
| 215 | * Caller: |
| 216 | * |
| 217 | * This module provides TCP/IP networking routines. |
| 218 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 219 | #define POLARSSL_NET_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 220 | |
| 221 | /* |
| 222 | * Module: library/padlock.c |
| 223 | * Caller: library/aes.c |
| 224 | * |
| 225 | * This modules adds support for the VIA PadLock on x86. |
| 226 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 227 | #define POLARSSL_PADLOCK_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 228 | |
| 229 | /* |
| 230 | * Module: library/rsa.c |
| 231 | * Caller: library/ssl_cli.c |
| 232 | * library/ssl_srv.c |
| 233 | * library/ssl_tls.c |
| 234 | * library/x509.c |
| 235 | * |
| 236 | * This module is required for SSL/TLS and MD5-signed certificates. |
| 237 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 238 | #define POLARSSL_RSA_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 239 | |
| 240 | /* |
| 241 | * Module: library/sha1.c |
| 242 | * Caller: library/ssl_cli.c |
| 243 | * library/ssl_srv.c |
| 244 | * library/ssl_tls.c |
| 245 | * library/x509parse.c |
| 246 | * |
| 247 | * This module is required for SSL/TLS and SHA1-signed certificates. |
| 248 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 249 | #define POLARSSL_SHA1_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 250 | |
| 251 | /* |
| 252 | * Module: library/sha2.c |
| 253 | * Caller: |
| 254 | * |
| 255 | * This module adds support for SHA-224 and SHA-256. |
| 256 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 257 | #define POLARSSL_SHA2_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 258 | |
| 259 | /* |
| 260 | * Module: library/sha4.c |
| 261 | * Caller: |
| 262 | * |
| 263 | * This module adds support for SHA-384 and SHA-512. |
| 264 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 265 | #define POLARSSL_SHA4_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 266 | |
| 267 | /* |
| 268 | * Module: library/ssl_cli.c |
| 269 | * Caller: |
| 270 | * |
| 271 | * This module is required for SSL/TLS client support. |
| 272 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 273 | #define POLARSSL_SSL_CLI_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 274 | |
| 275 | /* |
| 276 | * Module: library/ssl_srv.c |
| 277 | * Caller: |
| 278 | * |
| 279 | * This module is required for SSL/TLS server support. |
| 280 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 281 | #define POLARSSL_SSL_SRV_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 282 | |
| 283 | /* |
| 284 | * Module: library/ssl_tls.c |
| 285 | * Caller: library/ssl_cli.c |
| 286 | * library/ssl_srv.c |
| 287 | * |
| 288 | * This module is required for SSL/TLS. |
| 289 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 290 | #define POLARSSL_SSL_TLS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 291 | |
| 292 | /* |
| 293 | * Module: library/timing.c |
| 294 | * Caller: library/havege.c |
| 295 | * |
| 296 | * This module is used by the HAVEGE random number generator. |
| 297 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 298 | #define POLARSSL_TIMING_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 299 | |
| 300 | /* |
| 301 | * Module: library/x509parse.c |
| 302 | * Caller: library/ssl_cli.c |
| 303 | * library/ssl_srv.c |
| 304 | * library/ssl_tls.c |
| 305 | * |
| 306 | * This module is required for X.509 certificate parsing. |
| 307 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 308 | #define POLARSSL_X509_PARSE_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 309 | |
| 310 | /* |
| 311 | * Module: library/x509_write.c |
| 312 | * Caller: |
| 313 | * |
| 314 | * This module is required for X.509 certificate writing. |
| 315 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 316 | #define POLARSSL_X509_WRITE_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 317 | |
Paul Bakker | 7a7c78f | 2009-01-04 18:15:48 +0000 | [diff] [blame] | 318 | /* |
| 319 | * Module: library/xtea.c |
| 320 | * Caller: |
| 321 | */ |
| 322 | #define POLARSSL_XTEA_C |
| 323 | |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 324 | #endif /* config.h */ |