Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1 | /** |
| 2 | * \file config.h |
| 3 | * |
Paul Bakker | 37ca75d | 2011-01-06 12:28:03 +0000 | [diff] [blame] | 4 | * \brief Configuration options (set of defines) |
| 5 | * |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 6 | * Copyright (C) 2006-2013, Brainspark B.V. |
Paul Bakker | b96f154 | 2010-07-18 20:36:00 +0000 | [diff] [blame] | 7 | * |
| 8 | * This file is part of PolarSSL (http://www.polarssl.org) |
Paul Bakker | 84f12b7 | 2010-07-18 10:13:04 +0000 | [diff] [blame] | 9 | * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> |
Paul Bakker | b96f154 | 2010-07-18 20:36:00 +0000 | [diff] [blame] | 10 | * |
Paul Bakker | 77b385e | 2009-07-28 17:23:11 +0000 | [diff] [blame] | 11 | * All rights reserved. |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 12 | * |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 13 | * 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 Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 27 | * 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 Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 31 | #ifndef POLARSSL_CONFIG_H |
| 32 | #define POLARSSL_CONFIG_H |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 33 | |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 34 | #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 35 | #define _CRT_SECURE_NO_DEPRECATE 1 |
| 36 | #endif |
| 37 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 38 | /** |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 39 | * \name SECTION: System support |
| 40 | * |
| 41 | * This section sets system specific settings. |
| 42 | * \{ |
| 43 | */ |
| 44 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 45 | /** |
| 46 | * \def POLARSSL_HAVE_INT8 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 47 | * |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 48 | * The system uses 8-bit wide native integers. |
| 49 | * |
| 50 | * Uncomment if native integers are 8-bit wide. |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 51 | #define POLARSSL_HAVE_INT8 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 52 | */ |
| 53 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 54 | /** |
| 55 | * \def POLARSSL_HAVE_INT16 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 56 | * |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 57 | * The system uses 16-bit wide native integers. |
| 58 | * |
| 59 | * Uncomment if native integers are 16-bit wide. |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 60 | #define POLARSSL_HAVE_INT16 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 61 | */ |
| 62 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 63 | /** |
Paul Bakker | 62261d6 | 2012-10-02 12:19:31 +0000 | [diff] [blame] | 64 | * \def POLARSSL_HAVE_LONGLONG |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 65 | * |
Paul Bakker | 62261d6 | 2012-10-02 12:19:31 +0000 | [diff] [blame] | 66 | * The compiler supports the 'long long' type. |
| 67 | * (Only used on 32-bit platforms) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 68 | */ |
Paul Bakker | 62261d6 | 2012-10-02 12:19:31 +0000 | [diff] [blame] | 69 | #define POLARSSL_HAVE_LONGLONG |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 70 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 71 | /** |
| 72 | * \def POLARSSL_HAVE_ASM |
| 73 | * |
| 74 | * The compiler has support for asm() |
| 75 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 76 | * Uncomment to enable the use of assembly code. |
Paul Bakker | 68041ec | 2009-04-19 21:17:55 +0000 | [diff] [blame] | 77 | * |
| 78 | * Requires support for asm() in compiler. |
| 79 | * |
| 80 | * Used in: |
| 81 | * library/timing.c |
| 82 | * library/padlock.c |
| 83 | * include/polarssl/bn_mul.h |
| 84 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 85 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 86 | #define POLARSSL_HAVE_ASM |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 87 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 88 | /** |
| 89 | * \def POLARSSL_HAVE_SSE2 |
| 90 | * |
Paul Bakker | e23c315 | 2012-10-01 14:42:47 +0000 | [diff] [blame] | 91 | * CPU supports SSE2 instruction set. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 92 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 93 | * Uncomment if the CPU supports SSE2 (IA-32 specific). |
| 94 | * |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 95 | #define POLARSSL_HAVE_SSE2 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 96 | */ |
Paul Bakker | fa9b100 | 2013-07-03 15:31:03 +0200 | [diff] [blame] | 97 | |
| 98 | /** |
| 99 | * \def POLARSSL_HAVE_TIME |
| 100 | * |
| 101 | * System has time.h and time() / localtime() / gettimeofday() |
| 102 | * |
| 103 | * Comment if your system does not support time functions |
| 104 | */ |
| 105 | #define POLARSSL_HAVE_TIME |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 106 | /* \} name */ |
| 107 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 108 | /** |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 109 | * \name SECTION: PolarSSL feature support |
| 110 | * |
| 111 | * This section sets support for features that are or are not needed |
| 112 | * within the modules that are enabled. |
| 113 | * \{ |
| 114 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 115 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 116 | /** |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 117 | * \def POLARSSL_XXX_ALT |
| 118 | * |
| 119 | * Uncomment a macro to let PolarSSL use your alternate core implementation of |
| 120 | * a symmetric or hash algorithm (e.g. platform specific assembly optimized |
| 121 | * implementations). Keep in mind that the function prototypes should remain |
| 122 | * the same. |
| 123 | * |
| 124 | * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer |
| 125 | * provide the "struct aes_context" definition and omit the base function |
| 126 | * declarations and implementations. "aes_alt.h" will be included from |
| 127 | * "aes.h" to include the new function definitions. |
| 128 | * |
| 129 | * Uncomment a macro to enable alternate implementation for core algorithm |
| 130 | * functions |
| 131 | #define POLARSSL_AES_ALT |
| 132 | #define POLARSSL_ARC4_ALT |
| 133 | #define POLARSSL_BLOWFISH_ALT |
| 134 | #define POLARSSL_CAMELLIA_ALT |
| 135 | #define POLARSSL_DES_ALT |
| 136 | #define POLARSSL_XTEA_ALT |
| 137 | #define POLARSSL_MD2_ALT |
| 138 | #define POLARSSL_MD4_ALT |
| 139 | #define POLARSSL_MD5_ALT |
| 140 | #define POLARSSL_SHA1_ALT |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 141 | #define POLARSSL_SHA256_ALT |
| 142 | #define POLARSSL_SHA512_ALT |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 143 | */ |
| 144 | |
| 145 | /** |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 146 | * \def POLARSSL_AES_ROM_TABLES |
| 147 | * |
| 148 | * Store the AES tables in ROM. |
| 149 | * |
| 150 | * Uncomment this macro to store the AES tables in ROM. |
| 151 | * |
| 152 | #define POLARSSL_AES_ROM_TABLES |
| 153 | */ |
| 154 | |
| 155 | /** |
Paul Bakker | b6ecaf5 | 2011-04-19 14:29:23 +0000 | [diff] [blame] | 156 | * \def POLARSSL_CIPHER_MODE_CFB |
| 157 | * |
| 158 | * Enable Cipher Feedback mode (CFB) for symmetric ciphers. |
| 159 | */ |
| 160 | #define POLARSSL_CIPHER_MODE_CFB |
| 161 | |
| 162 | /** |
| 163 | * \def POLARSSL_CIPHER_MODE_CTR |
| 164 | * |
| 165 | * Enable Counter Block Cipher mode (CTR) for symmetric ciphers. |
| 166 | */ |
| 167 | #define POLARSSL_CIPHER_MODE_CTR |
| 168 | |
| 169 | /** |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 170 | * \def POLARSSL_CIPHER_NULL_CIPHER |
| 171 | * |
| 172 | * Enable NULL cipher. |
| 173 | * Warning: Only do so when you know what you are doing. This allows for |
| 174 | * encryption or channels without any security! |
| 175 | * |
| 176 | * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable |
| 177 | * the following ciphersuites: |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 178 | * TLS_RSA_WITH_NULL_MD5 |
| 179 | * TLS_RSA_WITH_NULL_SHA |
| 180 | * TLS_RSA_WITH_NULL_SHA256 |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 181 | * TLS_ECDHE_RSA_WITH_NULL_SHA |
Paul Bakker | 45bda90 | 2013-04-19 22:28:21 +0200 | [diff] [blame] | 182 | * TLS_PSK_WITH_NULL |
| 183 | * TLS_PSK_WITH_NULL256 |
| 184 | * TLS_PSK_WITH_NULL384 |
| 185 | * TLS_DHE_PSK_WITH_NULL |
| 186 | * TLS_DHE_PSK_WITH_NULL256 |
| 187 | * TLS_DHE_PSK_WITH_NULL384 |
| 188 | * TLS_RSA_PSK_WITH_NULL |
| 189 | * TLS_RSA_PSK_WITH_NULL256 |
| 190 | * TLS_RSA_PSK_WITH_NULL384 |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 191 | * |
| 192 | * Uncomment this macro to enable the NULL cipher and ciphersuites |
| 193 | #define POLARSSL_CIPHER_NULL_CIPHER |
| 194 | */ |
| 195 | |
| 196 | /** |
Paul Bakker | 48e93c8 | 2013-08-14 12:21:18 +0200 | [diff] [blame] | 197 | * \def POLARSSL_CIPHER_PADDING_XXX |
| 198 | * |
| 199 | * Uncomment or comment macros to add support for specific padding modes |
| 200 | * in the cipher layer with cipher modes that support padding (e.g. CBC) |
| 201 | * |
| 202 | * If you disable all padding modes, only full blocks can be used with CBC. |
| 203 | * |
| 204 | * Enable padding modes in the cipher layer. |
| 205 | */ |
| 206 | #define POLARSSL_CIPHER_PADDING_PKCS7 |
| 207 | #define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS |
| 208 | #define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN |
| 209 | #define POLARSSL_CIPHER_PADDING_ZEROS |
| 210 | |
| 211 | /** |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 212 | * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES |
| 213 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 214 | * Enable weak ciphersuites in SSL / TLS |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 215 | * Warning: Only do so when you know what you are doing. This allows for |
Paul Bakker | 9a73632 | 2012-11-14 12:39:52 +0000 | [diff] [blame] | 216 | * channels with virtually no security at all! |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 217 | * |
| 218 | * This enables the following ciphersuites: |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 219 | * TLS_RSA_WITH_DES_CBC_SHA |
| 220 | * TLS_DHE_RSA_WITH_DES_CBC_SHA |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 221 | * |
| 222 | * Uncomment this macro to enable weak ciphersuites |
| 223 | #define POLARSSL_ENABLE_WEAK_CIPHERSUITES |
| 224 | */ |
| 225 | |
| 226 | /** |
Paul Bakker | 5dc6b5f | 2013-06-29 23:26:34 +0200 | [diff] [blame] | 227 | * \def POLARSSL_ECP_XXXX_ENABLED |
| 228 | * |
| 229 | * Enables specific curves within the Elliptic Curve module. |
| 230 | * By default all supported curves are enables. |
| 231 | * |
| 232 | * Comment macros to disable the curve and functions for it |
| 233 | */ |
| 234 | #define POLARSSL_ECP_DP_SECP192R1_ENABLED |
| 235 | #define POLARSSL_ECP_DP_SECP224R1_ENABLED |
| 236 | #define POLARSSL_ECP_DP_SECP256R1_ENABLED |
| 237 | #define POLARSSL_ECP_DP_SECP384R1_ENABLED |
| 238 | #define POLARSSL_ECP_DP_SECP521R1_ENABLED |
| 239 | |
| 240 | /** |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 241 | * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED |
| 242 | * |
| 243 | * Enable the PSK based ciphersuite modes in SSL / TLS |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 244 | * |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 245 | * This enables the following ciphersuites (if other requisites are |
| 246 | * enabled as well): |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 247 | * TLS_PSK_WITH_RC4_128_SHA |
| 248 | * TLS_PSK_WITH_3DES_EDE_CBC_SHA |
| 249 | * TLS_PSK_WITH_AES_128_CBC_SHA |
| 250 | * TLS_PSK_WITH_AES_256_CBC_SHA |
Paul Bakker | 45bda90 | 2013-04-19 22:28:21 +0200 | [diff] [blame] | 251 | * TLS_PSK_WITH_AES_128_CBC_SHA256 |
| 252 | * TLS_PSK_WITH_AES_256_CBC_SHA384 |
| 253 | * TLS_PSK_WITH_AES_128_GCM_SHA256 |
| 254 | * TLS_PSK_WITH_AES_256_GCM_SHA384 |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 255 | */ |
| 256 | #define POLARSSL_KEY_EXCHANGE_PSK_ENABLED |
| 257 | |
| 258 | /** |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 259 | * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED |
| 260 | * |
| 261 | * Enable the DHE-PSK based ciphersuite modes in SSL / TLS |
| 262 | * |
| 263 | * Requires: POLARSSL_DHM_C |
| 264 | * |
| 265 | * This enables the following ciphersuites (if other requisites are |
| 266 | * enabled as well): |
| 267 | * TLS_DHE_PSK_WITH_RC4_128_SHA |
| 268 | * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA |
| 269 | * TLS_DHE_PSK_WITH_AES_128_CBC_SHA |
| 270 | * TLS_DHE_PSK_WITH_AES_256_CBC_SHA |
Paul Bakker | 45bda90 | 2013-04-19 22:28:21 +0200 | [diff] [blame] | 271 | * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 |
| 272 | * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 |
| 273 | * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 |
| 274 | * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 275 | */ |
Paul Bakker | 48f7a5d | 2013-04-19 14:30:58 +0200 | [diff] [blame] | 276 | #define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 277 | |
| 278 | /** |
| 279 | * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED |
| 280 | * |
| 281 | * Enable the RSA-PSK based ciphersuite modes in SSL / TLS |
Paul Bakker | 45bda90 | 2013-04-19 22:28:21 +0200 | [diff] [blame] | 282 | * (NOT YET IMPLEMENTED) |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 283 | * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C |
| 284 | * |
| 285 | * This enables the following ciphersuites (if other requisites are |
| 286 | * enabled as well): |
| 287 | * TLS_RSA_PSK_WITH_RC4_128_SHA |
| 288 | * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA |
| 289 | * TLS_RSA_PSK_WITH_AES_128_CBC_SHA |
| 290 | * TLS_RSA_PSK_WITH_AES_256_CBC_SHA |
Paul Bakker | 45bda90 | 2013-04-19 22:28:21 +0200 | [diff] [blame] | 291 | * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 |
| 292 | * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 |
| 293 | * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 |
| 294 | * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 295 | #define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED |
| 296 | */ |
| 297 | |
| 298 | /** |
| 299 | * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED |
| 300 | * |
| 301 | * Enable the RSA-only based ciphersuite modes in SSL / TLS |
| 302 | * |
| 303 | * Requires: POLARSSL_RSA_C, POLARSSL_X509_PARSE_C |
| 304 | * |
| 305 | * This enables the following ciphersuites (if other requisites are |
| 306 | * enabled as well): |
| 307 | * TLS_RSA_WITH_AES_128_CBC_SHA |
| 308 | * TLS_RSA_WITH_AES_256_CBC_SHA |
| 309 | * TLS_RSA_WITH_AES_128_CBC_SHA256 |
| 310 | * TLS_RSA_WITH_AES_256_CBC_SHA256 |
| 311 | * TLS_RSA_WITH_AES_128_GCM_SHA256 |
| 312 | * TLS_RSA_WITH_AES_256_GCM_SHA384 |
| 313 | * TLS_RSA_WITH_RC4_128_MD5 |
| 314 | * TLS_RSA_WITH_RC4_128_SHA |
| 315 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 316 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 317 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 318 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
| 319 | * TLS_RSA_WITH_3DES_EDE_CBC_SHA |
| 320 | */ |
| 321 | #define POLARSSL_KEY_EXCHANGE_RSA_ENABLED |
| 322 | |
| 323 | /** |
| 324 | * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED |
| 325 | * |
| 326 | * Enable the DHE-RSA based ciphersuite modes in SSL / TLS |
| 327 | * |
| 328 | * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C |
| 329 | * |
| 330 | * This enables the following ciphersuites (if other requisites are |
| 331 | * enabled as well): |
| 332 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA |
| 333 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA |
| 334 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 |
| 335 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 |
| 336 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 337 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 338 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 339 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
| 340 | * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 341 | */ |
| 342 | #define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED |
| 343 | |
| 344 | /** |
| 345 | * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED |
| 346 | * |
| 347 | * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS |
| 348 | * |
| 349 | * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_X509_PARSE_C |
| 350 | * |
| 351 | * This enables the following ciphersuites (if other requisites are |
| 352 | * enabled as well): |
| 353 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |
| 354 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |
| 355 | * TLS_ECDHE_RSA_WITH_RC4_128_SHA |
| 356 | * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 357 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 |
| 358 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 |
| 359 | * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 |
| 360 | * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 |
| 361 | * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 362 | * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 363 | */ |
| 364 | #define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED |
| 365 | |
| 366 | /** |
Manuel Pégourié-Gonnard | 32ea60a | 2013-08-17 17:39:04 +0200 | [diff] [blame] | 367 | * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
| 368 | * |
| 369 | * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS |
| 370 | * |
| 371 | * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_PARSE_C |
| 372 | * |
| 373 | * This enables the following ciphersuites (if other requisites are |
| 374 | * enabled as well): |
| 375 | * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, |
| 376 | * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, |
| 377 | * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, |
| 378 | * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, |
| 379 | * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, |
| 380 | * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, |
| 381 | * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, |
| 382 | * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, |
| 383 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, |
| 384 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, |
| 385 | */ |
| 386 | #define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
| 387 | |
| 388 | /** |
Paul Bakker | e2ab84f | 2013-06-29 18:24:32 +0200 | [diff] [blame] | 389 | * \def POLARSSL_ERROR_STRERROR_BC |
| 390 | * |
| 391 | * Make available the backward compatible error_strerror() next to the |
| 392 | * current polarssl_strerror(). |
| 393 | * |
| 394 | * Disable if you run into name conflicts and want to really remove the |
| 395 | * error_strerror() |
| 396 | */ |
| 397 | #define POLARSSL_ERROR_STRERROR_BC |
| 398 | |
| 399 | /** |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 400 | * \def POLARSSL_ERROR_STRERROR_DUMMY |
| 401 | * |
| 402 | * Enable a dummy error function to make use of error_strerror() in |
| 403 | * third party libraries easier. |
| 404 | * |
| 405 | * Disable if you run into name conflicts and want to really remove the |
| 406 | * error_strerror() |
| 407 | */ |
| 408 | #define POLARSSL_ERROR_STRERROR_DUMMY |
| 409 | |
| 410 | /** |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 411 | * \def POLARSSL_GENPRIME |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 412 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 413 | * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C |
| 414 | * |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 415 | * Enable the RSA prime-number generation code. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 416 | */ |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 417 | #define POLARSSL_GENPRIME |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 418 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 419 | /** |
Paul Bakker | 335db3f | 2011-04-25 15:28:35 +0000 | [diff] [blame] | 420 | * \def POLARSSL_FS_IO |
| 421 | * |
| 422 | * Enable functions that use the filesystem. |
| 423 | */ |
| 424 | #define POLARSSL_FS_IO |
| 425 | |
| 426 | /** |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 427 | * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES |
| 428 | * |
| 429 | * Do not add default entropy sources. These are the platform specific, |
| 430 | * hardclock and HAVEGE based poll functions. |
| 431 | * |
| 432 | * This is useful to have more control over the added entropy sources in an |
| 433 | * application. |
| 434 | * |
| 435 | * Uncomment this macro to prevent loading of default entropy functions. |
| 436 | #define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES |
| 437 | */ |
| 438 | |
| 439 | /** |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 440 | * \def POLARSSL_NO_PLATFORM_ENTROPY |
| 441 | * |
| 442 | * Do not use built-in platform entropy functions. |
| 443 | * This is useful if your platform does not support |
| 444 | * standards like the /dev/urandom or Windows CryptoAPI. |
| 445 | * |
| 446 | * Uncomment this macro to disable the built-in platform entropy functions. |
| 447 | #define POLARSSL_NO_PLATFORM_ENTROPY |
| 448 | */ |
| 449 | |
| 450 | /** |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 451 | * \def POLARSSL_MEMORY_DEBUG |
| 452 | * |
| 453 | * Enable debugging of buffer allocator memory issues. Automatically prints |
| 454 | * (to stderr) all (fatal) messages on memory allocation issues. Enables |
| 455 | * function for 'debug output' of allocated memory. |
| 456 | * |
| 457 | * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C |
| 458 | * fprintf() |
| 459 | * |
| 460 | * Uncomment this macro to let the buffer allocator print out error messages. |
| 461 | #define POLARSSL_MEMORY_DEBUG |
| 462 | */ |
| 463 | |
| 464 | /** |
| 465 | * \def POLARSSL_MEMORY_BACKTRACE |
| 466 | * |
| 467 | * Include backtrace information with each allocated block. |
| 468 | * |
| 469 | * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C |
| 470 | * GLIBC-compatible backtrace() an backtrace_symbols() support |
| 471 | * |
| 472 | * Uncomment this macro to include backtrace information |
| 473 | #define POLARSSL_MEMORY_BACKTRACE |
| 474 | */ |
| 475 | |
| 476 | /** |
Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 477 | * \def POLARSSL_PKCS1_V21 |
| 478 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 479 | * Requires: POLARSSL_MD_C, POLARSSL_RSA_C |
| 480 | * |
Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 481 | * Enable support for PKCS#1 v2.1 encoding. |
| 482 | * This enables support for RSAES-OAEP and RSASSA-PSS operations. |
| 483 | */ |
| 484 | #define POLARSSL_PKCS1_V21 |
| 485 | |
| 486 | /** |
Paul Bakker | 0216cc1 | 2011-03-26 13:40:23 +0000 | [diff] [blame] | 487 | * \def POLARSSL_RSA_NO_CRT |
| 488 | * |
| 489 | * Do not use the Chinese Remainder Theorem for the RSA private operation. |
| 490 | * |
| 491 | * Uncomment this macro to disable the use of CRT in RSA. |
| 492 | * |
| 493 | #define POLARSSL_RSA_NO_CRT |
| 494 | */ |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 495 | |
| 496 | /** |
| 497 | * \def POLARSSL_SELF_TEST |
| 498 | * |
| 499 | * Enable the checkup functions (*_self_test). |
| 500 | */ |
| 501 | #define POLARSSL_SELF_TEST |
Paul Bakker | 5c721f9 | 2011-07-27 16:51:09 +0000 | [diff] [blame] | 502 | |
| 503 | /** |
Paul Bakker | 40865c8 | 2013-01-31 17:13:13 +0100 | [diff] [blame] | 504 | * \def POLARSSL_SSL_ALL_ALERT_MESSAGES |
| 505 | * |
| 506 | * Enable sending of alert messages in case of encountered errors as per RFC. |
| 507 | * If you choose not to send the alert messages, PolarSSL can still communicate |
| 508 | * with other servers, only debugging of failures is harder. |
| 509 | * |
| 510 | * The advantage of not sending alert messages, is that no information is given |
| 511 | * about reasons for failures thus preventing adversaries of gaining intel. |
| 512 | * |
| 513 | * Enable sending of all alert messages |
| 514 | */ |
| 515 | #define POLARSSL_SSL_ALERT_MESSAGES |
| 516 | |
| 517 | /** |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 518 | * \def POLARSSL_SSL_DEBUG_ALL |
| 519 | * |
| 520 | * Enable the debug messages in SSL module for all issues. |
| 521 | * Debug messages have been disabled in some places to prevent timing |
| 522 | * attacks due to (unbalanced) debugging function calls. |
| 523 | * |
| 524 | * If you need all error reporting you should enable this during debugging, |
| 525 | * but remove this for production servers that should log as well. |
| 526 | * |
| 527 | * Uncomment this macro to report all debug messages on errors introducing |
| 528 | * a timing side-channel. |
| 529 | * |
| 530 | #define POLARSSL_SSL_DEBUG_ALL |
| 531 | */ |
| 532 | |
| 533 | /** |
Paul Bakker | 05ef835 | 2012-05-08 09:17:57 +0000 | [diff] [blame] | 534 | * \def POLARSSL_SSL_HW_RECORD_ACCEL |
| 535 | * |
| 536 | * Enable hooking functions in SSL module for hardware acceleration of |
| 537 | * individual records. |
| 538 | * |
| 539 | * Uncomment this macro to enable hooking functions. |
| 540 | #define POLARSSL_SSL_HW_RECORD_ACCEL |
| 541 | */ |
| 542 | |
| 543 | /** |
Paul Bakker | 78a8c71 | 2013-03-06 17:01:52 +0100 | [diff] [blame] | 544 | * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO |
| 545 | * |
| 546 | * Enable support for receiving and parsing SSLv2 Client Hello messages for the |
| 547 | * SSL Server module (POLARSSL_SSL_SRV_C) |
| 548 | * |
| 549 | * Comment this macro to disable support for SSLv2 Client Hello messages. |
| 550 | */ |
| 551 | #define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO |
| 552 | |
| 553 | /** |
Paul Bakker | 05decb2 | 2013-08-15 13:33:48 +0200 | [diff] [blame] | 554 | * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH |
| 555 | * |
| 556 | * Enable support for RFC 6066 max_fragment_length extension in SSL |
| 557 | * |
| 558 | * Comment this macro to disable support for the max_fragment_length extension |
| 559 | */ |
| 560 | #define POLARSSL_SSL_MAX_FRAGMENT_LENGTH |
| 561 | |
| 562 | /** |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 563 | * \def POLARSSL_SSL_PROTO_SSL3 |
| 564 | * |
| 565 | * Enable support for SSL 3.0 |
| 566 | * |
| 567 | * Requires: POLARSSL_MD5_C |
| 568 | * POLARSSL_SHA1_C |
| 569 | * |
| 570 | * Comment this macro to disable support for SSL 3.0 |
| 571 | */ |
| 572 | #define POLARSSL_SSL_PROTO_SSL3 |
| 573 | |
| 574 | /** |
| 575 | * \def POLARSSL_SSL_PROTO_TLS1 |
| 576 | * |
| 577 | * Enable support for TLS 1.0 |
| 578 | * |
| 579 | * Requires: POLARSSL_MD5_C |
| 580 | * POLARSSL_SHA1_C |
| 581 | * |
| 582 | * Comment this macro to disable support for TLS 1.0 |
| 583 | */ |
| 584 | #define POLARSSL_SSL_PROTO_TLS1 |
| 585 | |
| 586 | /** |
| 587 | * \def POLARSSL_SSL_PROTO_TLS1_1 |
| 588 | * |
| 589 | * Enable support for TLS 1.1 |
| 590 | * |
| 591 | * Requires: POLARSSL_MD5_C |
| 592 | * POLARSSL_SHA1_C |
| 593 | * |
| 594 | * Comment this macro to disable support for TLS 1.1 |
| 595 | */ |
| 596 | #define POLARSSL_SSL_PROTO_TLS1_1 |
| 597 | |
| 598 | /** |
| 599 | * \def POLARSSL_SSL_PROTO_TLS1_2 |
| 600 | * |
| 601 | * Enable support for TLS 1.2 |
| 602 | * |
| 603 | * Requires: POLARSSL_SHA256_C or POLARSSL_SHA512_C |
| 604 | * (Depends on ciphersuites) |
| 605 | * |
| 606 | * Comment this macro to disable support for TLS 1.2 |
| 607 | */ |
| 608 | #define POLARSSL_SSL_PROTO_TLS1_2 |
| 609 | |
| 610 | /** |
Paul Bakker | a503a63 | 2013-08-14 13:48:06 +0200 | [diff] [blame] | 611 | * \def POLARSSL_SSL_SESSION_TICKETS |
| 612 | * |
| 613 | * Enable support for RFC 5077 session tickets in SSL |
| 614 | * |
| 615 | * Requires: POLARSSL_AES_C |
| 616 | * POLARSSL_SHA256_C |
| 617 | * |
| 618 | * Comment this macro to disable support for SSL session tickets |
| 619 | */ |
| 620 | #define POLARSSL_SSL_SESSION_TICKETS |
| 621 | |
| 622 | /** |
Paul Bakker | 0be444a | 2013-08-27 21:55:01 +0200 | [diff] [blame] | 623 | * \def POLARSSL_SSL_SERVER_NAME_INDICATION |
| 624 | * |
| 625 | * Enable support for RFC 6066 server name indication (SNI) in SSL |
| 626 | * |
| 627 | * Comment this macro to disable support for server name indication in SSL |
| 628 | */ |
| 629 | #define POLARSSL_SSL_SERVER_NAME_INDICATION |
| 630 | |
| 631 | /** |
Paul Bakker | 1f2bc62 | 2013-08-15 13:45:55 +0200 | [diff] [blame] | 632 | * \def POLARSSL_SSL_TRUNCATED_HMAC |
| 633 | * |
| 634 | * Enable support for RFC 6066 truncated HMAC in SSL |
| 635 | * |
| 636 | * Comment this macro to disable support for truncated HMAC in SSL |
| 637 | */ |
| 638 | #define POLARSSL_SSL_TRUNCATED_HMAC |
| 639 | |
| 640 | /** |
Paul Bakker | 5c721f9 | 2011-07-27 16:51:09 +0000 | [diff] [blame] | 641 | * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION |
| 642 | * |
| 643 | * If set, the X509 parser will not break-off when parsing an X509 certificate |
| 644 | * and encountering an unknown critical extension. |
| 645 | * |
| 646 | * Uncomment to prevent an error. |
| 647 | * |
| 648 | #define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION |
| 649 | */ |
Paul Bakker | 2770fbd | 2012-07-03 13:30:23 +0000 | [diff] [blame] | 650 | |
| 651 | /** |
| 652 | * \def POLARSSL_ZLIB_SUPPORT |
| 653 | * |
| 654 | * If set, the SSL/TLS module uses ZLIB to support compression and |
| 655 | * decompression of packet data. |
| 656 | * |
| 657 | * Used in: library/ssl_tls.c |
| 658 | * library/ssl_cli.c |
| 659 | * library/ssl_srv.c |
| 660 | * |
| 661 | * This feature requires zlib library and headers to be present. |
| 662 | * |
| 663 | * Uncomment to enable use of ZLIB |
| 664 | #define POLARSSL_ZLIB_SUPPORT |
| 665 | */ |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 666 | /* \} name */ |
| 667 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 668 | /** |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 669 | * \name SECTION: PolarSSL modules |
| 670 | * |
| 671 | * This section enables or disables entire modules in PolarSSL |
| 672 | * \{ |
| 673 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 674 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 675 | /** |
| 676 | * \def POLARSSL_AES_C |
| 677 | * |
| 678 | * Enable the AES block cipher. |
| 679 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 680 | * Module: library/aes.c |
| 681 | * Caller: library/ssl_tls.c |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 682 | * library/pem.c |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 683 | * library/ctr_drbg.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 684 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 685 | * This module enables the following ciphersuites (if other requisites are |
| 686 | * enabled as well): |
| 687 | * TLS_RSA_WITH_AES_128_CBC_SHA |
| 688 | * TLS_RSA_WITH_AES_256_CBC_SHA |
| 689 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA |
| 690 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA |
| 691 | * TLS_RSA_WITH_AES_128_CBC_SHA256 |
| 692 | * TLS_RSA_WITH_AES_256_CBC_SHA256 |
| 693 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 |
| 694 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 |
| 695 | * TLS_RSA_WITH_AES_128_GCM_SHA256 |
| 696 | * TLS_RSA_WITH_AES_256_GCM_SHA384 |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 697 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |
| 698 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 699 | * TLS_PSK_WITH_AES_128_CBC_SHA |
| 700 | * TLS_PSK_WITH_AES_256_CBC_SHA |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 701 | * |
| 702 | * PEM uses AES for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 703 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 704 | #define POLARSSL_AES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 705 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 706 | /** |
| 707 | * \def POLARSSL_ARC4_C |
| 708 | * |
| 709 | * Enable the ARCFOUR stream cipher. |
| 710 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 711 | * Module: library/arc4.c |
| 712 | * Caller: library/ssl_tls.c |
| 713 | * |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 714 | * This module enables the following ciphersuites (if other requisites are |
| 715 | * enabled as well): |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 716 | * TLS_RSA_WITH_RC4_128_MD5 |
| 717 | * TLS_RSA_WITH_RC4_128_SHA |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 718 | * TLS_ECDHE_RSA_WITH_RC4_128_SHA |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 719 | * TLS_PSK_WITH_RC4_128_SHA |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 720 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 721 | #define POLARSSL_ARC4_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 722 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 723 | /** |
Paul Bakker | efc3029 | 2011-11-10 14:43:23 +0000 | [diff] [blame] | 724 | * \def POLARSSL_ASN1_PARSE_C |
| 725 | * |
| 726 | * Enable the generic ASN1 parser. |
| 727 | * |
| 728 | * Module: library/asn1.c |
| 729 | * Caller: library/x509parse.c |
| 730 | */ |
| 731 | #define POLARSSL_ASN1_PARSE_C |
| 732 | |
| 733 | /** |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 734 | * \def POLARSSL_ASN1_WRITE_C |
| 735 | * |
| 736 | * Enable the generic ASN1 writer. |
| 737 | * |
| 738 | * Module: library/asn1write.c |
| 739 | */ |
| 740 | #define POLARSSL_ASN1_WRITE_C |
| 741 | |
| 742 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 743 | * \def POLARSSL_BASE64_C |
| 744 | * |
| 745 | * Enable the Base64 module. |
| 746 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 747 | * Module: library/base64.c |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 748 | * Caller: library/pem.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 749 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 750 | * This module is required for PEM support (required by X.509). |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 751 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 752 | #define POLARSSL_BASE64_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 753 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 754 | /** |
| 755 | * \def POLARSSL_BIGNUM_C |
| 756 | * |
Paul Bakker | 9a73632 | 2012-11-14 12:39:52 +0000 | [diff] [blame] | 757 | * Enable the multi-precision integer library. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 758 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 759 | * Module: library/bignum.c |
| 760 | * Caller: library/dhm.c |
| 761 | * library/rsa.c |
| 762 | * library/ssl_tls.c |
| 763 | * library/x509parse.c |
| 764 | * |
| 765 | * This module is required for RSA and DHM support. |
| 766 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 767 | #define POLARSSL_BIGNUM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 768 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 769 | /** |
Paul Bakker | a9379c0 | 2012-07-04 11:02:11 +0000 | [diff] [blame] | 770 | * \def POLARSSL_BLOWFISH_C |
| 771 | * |
| 772 | * Enable the Blowfish block cipher. |
| 773 | * |
| 774 | * Module: library/blowfish.c |
| 775 | */ |
| 776 | #define POLARSSL_BLOWFISH_C |
| 777 | |
| 778 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 779 | * \def POLARSSL_CAMELLIA_C |
| 780 | * |
| 781 | * Enable the Camellia block cipher. |
| 782 | * |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 783 | * Module: library/camellia.c |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame] | 784 | * Caller: library/ssl_tls.c |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 785 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 786 | * This module enables the following ciphersuites (if other requisites are |
| 787 | * enabled as well): |
| 788 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 789 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 790 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 791 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 792 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 793 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
| 794 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 795 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 796 | */ |
| 797 | #define POLARSSL_CAMELLIA_C |
| 798 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 799 | /** |
| 800 | * \def POLARSSL_CERTS_C |
| 801 | * |
| 802 | * Enable the test certificates. |
| 803 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 804 | * Module: library/certs.c |
| 805 | * Caller: |
| 806 | * |
| 807 | * This module is used for testing (ssl_client/server). |
| 808 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 809 | #define POLARSSL_CERTS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 810 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 811 | /** |
| 812 | * \def POLARSSL_CIPHER_C |
| 813 | * |
| 814 | * Enable the generic cipher layer. |
| 815 | * |
Paul Bakker | 8123e9d | 2011-01-06 15:37:30 +0000 | [diff] [blame] | 816 | * Module: library/cipher.c |
Paul Bakker | 04784f5 | 2013-08-19 13:30:57 +0200 | [diff] [blame] | 817 | * Caller: library/ssl_tls.c |
Paul Bakker | 8123e9d | 2011-01-06 15:37:30 +0000 | [diff] [blame] | 818 | * |
| 819 | * Uncomment to enable generic cipher wrappers. |
| 820 | */ |
| 821 | #define POLARSSL_CIPHER_C |
| 822 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 823 | /** |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 824 | * \def POLARSSL_CTR_DRBG_C |
| 825 | * |
| 826 | * Enable the CTR_DRBG AES-256-based random generator |
| 827 | * |
| 828 | * Module: library/ctr_drbg.c |
| 829 | * Caller: |
| 830 | * |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 831 | * Requires: POLARSSL_AES_C |
| 832 | * |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 833 | * This module provides the CTR_DRBG AES-256 random number generator. |
| 834 | */ |
| 835 | #define POLARSSL_CTR_DRBG_C |
| 836 | |
| 837 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 838 | * \def POLARSSL_DEBUG_C |
| 839 | * |
| 840 | * Enable the debug functions. |
| 841 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 842 | * Module: library/debug.c |
| 843 | * Caller: library/ssl_cli.c |
| 844 | * library/ssl_srv.c |
| 845 | * library/ssl_tls.c |
| 846 | * |
| 847 | * This module provides debugging functions. |
| 848 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 849 | #define POLARSSL_DEBUG_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 850 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 851 | /** |
| 852 | * \def POLARSSL_DES_C |
| 853 | * |
| 854 | * Enable the DES block cipher. |
| 855 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 856 | * Module: library/des.c |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 857 | * Caller: library/pem.c |
| 858 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 859 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 860 | * This module enables the following ciphersuites (if other requisites are |
| 861 | * enabled as well): |
| 862 | * TLS_RSA_WITH_3DES_EDE_CBC_SHA |
| 863 | * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 864 | * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 865 | * TLS_PSK_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 866 | * |
| 867 | * PEM uses DES/3DES for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 868 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 869 | #define POLARSSL_DES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 870 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 871 | /** |
| 872 | * \def POLARSSL_DHM_C |
| 873 | * |
| 874 | * Enable the Diffie-Hellman-Merkle key exchange. |
| 875 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 876 | * Module: library/dhm.c |
| 877 | * Caller: library/ssl_cli.c |
| 878 | * library/ssl_srv.c |
| 879 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 880 | * This module enables the following ciphersuites (if other requisites are |
| 881 | * enabled as well): |
| 882 | * TLS_DHE_RSA_WITH_DES_CBC_SHA |
| 883 | * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 884 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA |
| 885 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA |
| 886 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 |
| 887 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 |
| 888 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 889 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 890 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 891 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
| 892 | * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 |
| 893 | * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 894 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 895 | #define POLARSSL_DHM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 896 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 897 | /** |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 898 | * \def POLARSSL_ECDH_C |
| 899 | * |
| 900 | * Enable the elliptic curve Diffie-Hellman library. |
| 901 | * |
| 902 | * Module: library/ecdh.c |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 903 | * Caller: library/ssl_cli.c |
| 904 | * library/ssl_srv.c |
| 905 | * |
| 906 | * This module enables the following ciphersuites (if other requisites are |
| 907 | * enabled as well): |
| 908 | * TLS_ECDHE_RSA_WITH_NULL_SHA |
| 909 | * TLS_ECDHE_RSA_WITH_RC4_128_SHA |
| 910 | * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 911 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |
| 912 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 913 | * |
| 914 | * Requires: POLARSSL_ECP_C |
| 915 | */ |
| 916 | #define POLARSSL_ECDH_C |
| 917 | |
| 918 | /** |
| 919 | * \def POLARSSL_ECDSA_C |
| 920 | * |
| 921 | * Enable the elliptic curve DSA library. |
| 922 | * |
| 923 | * Module: library/ecdsa.c |
| 924 | * Caller: |
| 925 | * |
Manuel Pégourié-Gonnard | 4846f5e | 2013-08-08 14:36:15 +0200 | [diff] [blame] | 926 | * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 927 | */ |
| 928 | #define POLARSSL_ECDSA_C |
| 929 | |
| 930 | /** |
| 931 | * \def POLARSSL_ECP_C |
| 932 | * |
| 933 | * Enable the elliptic curve over GF(p) library. |
| 934 | * |
| 935 | * Module: library/ecp.c |
| 936 | * Caller: library/ecdh.c |
| 937 | * library/ecdsa.c |
| 938 | * |
| 939 | * Requires: POLARSSL_BIGNUM_C |
| 940 | */ |
| 941 | #define POLARSSL_ECP_C |
| 942 | |
| 943 | /** |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 944 | * \def POLARSSL_ENTROPY_C |
| 945 | * |
| 946 | * Enable the platform-specific entropy code. |
| 947 | * |
| 948 | * Module: library/entropy.c |
| 949 | * Caller: |
| 950 | * |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 951 | * Requires: POLARSSL_SHA512_C |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 952 | * |
| 953 | * This module provides a generic entropy pool |
| 954 | */ |
| 955 | #define POLARSSL_ENTROPY_C |
| 956 | |
| 957 | /** |
Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 958 | * \def POLARSSL_ERROR_C |
| 959 | * |
| 960 | * Enable error code to error string conversion. |
| 961 | * |
| 962 | * Module: library/error.c |
| 963 | * Caller: |
| 964 | * |
| 965 | * This module enables err_strerror(). |
| 966 | */ |
| 967 | #define POLARSSL_ERROR_C |
| 968 | |
| 969 | /** |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 970 | * \def POLARSSL_GCM_C |
| 971 | * |
| 972 | * Enable the Galois/Counter Mode (GCM) for AES |
| 973 | * |
| 974 | * Module: library/gcm.c |
| 975 | * |
| 976 | * Requires: POLARSSL_AES_C |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 977 | * |
| 978 | * This module enables the following ciphersuites (if other requisites are |
| 979 | * enabled as well): |
| 980 | * TLS_RSA_WITH_AES_128_GCM_SHA256 |
| 981 | * TLS_RSA_WITH_AES_256_GCM_SHA384 |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 982 | */ |
| 983 | #define POLARSSL_GCM_C |
| 984 | |
| 985 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 986 | * \def POLARSSL_HAVEGE_C |
| 987 | * |
| 988 | * Enable the HAVEGE random generator. |
| 989 | * |
Paul Bakker | 2a84424 | 2013-06-24 13:01:53 +0200 | [diff] [blame] | 990 | * Warning: the HAVEGE random generator is not suitable for virtualized |
| 991 | * environments |
| 992 | * |
| 993 | * Warning: the HAVEGE random generator is dependent on timing and specific |
| 994 | * processor traits. It is therefore not advised to use HAVEGE as |
| 995 | * your applications primary random generator or primary entropy pool |
| 996 | * input. As a secondary input to your entropy pool, it IS able add |
| 997 | * the (limited) extra entropy it provides. |
| 998 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 999 | * Module: library/havege.c |
| 1000 | * Caller: |
| 1001 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1002 | * Requires: POLARSSL_TIMING_C |
| 1003 | * |
Paul Bakker | 2a84424 | 2013-06-24 13:01:53 +0200 | [diff] [blame] | 1004 | * Uncomment to enable the HAVEGE random generator. |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1005 | #define POLARSSL_HAVEGE_C |
Paul Bakker | 2a84424 | 2013-06-24 13:01:53 +0200 | [diff] [blame] | 1006 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1007 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1008 | /** |
| 1009 | * \def POLARSSL_MD_C |
| 1010 | * |
| 1011 | * Enable the generic message digest layer. |
| 1012 | * |
Paul Bakker | 1737385 | 2011-01-06 14:20:01 +0000 | [diff] [blame] | 1013 | * Module: library/md.c |
| 1014 | * Caller: |
| 1015 | * |
| 1016 | * Uncomment to enable generic message digest wrappers. |
| 1017 | */ |
| 1018 | #define POLARSSL_MD_C |
| 1019 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1020 | /** |
| 1021 | * \def POLARSSL_MD2_C |
| 1022 | * |
| 1023 | * Enable the MD2 hash algorithm |
| 1024 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1025 | * Module: library/md2.c |
| 1026 | * Caller: library/x509parse.c |
| 1027 | * |
| 1028 | * Uncomment to enable support for (rare) MD2-signed X.509 certs. |
| 1029 | * |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame] | 1030 | #define POLARSSL_MD2_C |
Paul Bakker | 6506aff | 2009-07-28 20:52:02 +0000 | [diff] [blame] | 1031 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1032 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1033 | /** |
| 1034 | * \def POLARSSL_MD4_C |
| 1035 | * |
| 1036 | * Enable the MD4 hash algorithm |
| 1037 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1038 | * Module: library/md4.c |
| 1039 | * Caller: library/x509parse.c |
| 1040 | * |
| 1041 | * Uncomment to enable support for (rare) MD4-signed X.509 certs. |
| 1042 | * |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame] | 1043 | #define POLARSSL_MD4_C |
Paul Bakker | 6506aff | 2009-07-28 20:52:02 +0000 | [diff] [blame] | 1044 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1045 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1046 | /** |
| 1047 | * \def POLARSSL_MD5_C |
| 1048 | * |
| 1049 | * Enable the MD5 hash algorithm |
| 1050 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1051 | * Module: library/md5.c |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 1052 | * Caller: library/pem.c |
| 1053 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1054 | * library/x509parse.c |
| 1055 | * |
| 1056 | * This module is required for SSL/TLS and X.509. |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 1057 | * PEM uses MD5 for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1058 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1059 | #define POLARSSL_MD5_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1060 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1061 | /** |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1062 | * \def POLARSSL_MEMORY_C |
| 1063 | * |
| 1064 | * Enable the memory allocation layer. |
| 1065 | * By default PolarSSL uses the system-provided malloc() and free(). |
| 1066 | * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE |
| 1067 | * are defined and unmodified) |
| 1068 | * |
| 1069 | * This allows different allocators (self-implemented or provided) |
| 1070 | * |
| 1071 | * Enable this layer to allow use of alternative memory allocators. |
| 1072 | #define POLARSSL_MEMORY_C |
| 1073 | */ |
| 1074 | |
| 1075 | /** |
| 1076 | * The buffer allocator implementation that makes use of a (stack) based |
| 1077 | * buffer to 'allocate' dynamic memory. (replaces malloc() and free() calls) |
| 1078 | * |
| 1079 | * Module: library/memory_buffer_alloc.c |
| 1080 | * |
| 1081 | * Requires: POLARSSL_MEMORY_C |
| 1082 | * |
| 1083 | * Enable this module to enable the buffer memory allocator. |
| 1084 | #define POLARSSL_MEMORY_BUFFER_ALLOC_C |
| 1085 | */ |
| 1086 | |
| 1087 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1088 | * \def POLARSSL_NET_C |
| 1089 | * |
| 1090 | * Enable the TCP/IP networking routines. |
| 1091 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1092 | * Module: library/net.c |
| 1093 | * Caller: |
| 1094 | * |
| 1095 | * This module provides TCP/IP networking routines. |
| 1096 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1097 | #define POLARSSL_NET_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1098 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1099 | /** |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1100 | * \def POLARSSL_OID_C |
| 1101 | * |
| 1102 | * Enable the OID database |
| 1103 | * |
| 1104 | * Module: library/oid.c |
| 1105 | * Caller: library/rsa.c |
| 1106 | * library/x509parse.c |
| 1107 | * library/x509write.c |
| 1108 | * |
| 1109 | * This modules translates between OIDs and internal values. |
| 1110 | */ |
| 1111 | #define POLARSSL_OID_C |
| 1112 | |
| 1113 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1114 | * \def POLARSSL_PADLOCK_C |
| 1115 | * |
| 1116 | * Enable VIA Padlock support on x86. |
| 1117 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1118 | * Module: library/padlock.c |
| 1119 | * Caller: library/aes.c |
| 1120 | * |
| 1121 | * This modules adds support for the VIA PadLock on x86. |
| 1122 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1123 | #define POLARSSL_PADLOCK_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1124 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1125 | /** |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1126 | * \def POLARSSL_PBKDF2_C |
| 1127 | * |
| 1128 | * Enable PKCS#5 PBKDF2 key derivation function |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1129 | * DEPRECATED: Use POLARSSL_PKCS5_C instead |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1130 | * |
| 1131 | * Module: library/pbkdf2.c |
| 1132 | * |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1133 | * Requires: POLARSSL_PKCS5_C |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1134 | * |
| 1135 | * This module adds support for the PKCS#5 PBKDF2 key derivation function. |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1136 | */ |
Paul Bakker | 370e90c | 2013-04-08 15:19:43 +0200 | [diff] [blame] | 1137 | #define POLARSSL_PBKDF2_C |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1138 | |
| 1139 | /** |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1140 | * \def POLARSSL_PEM_C |
| 1141 | * |
| 1142 | * Enable PEM decoding |
| 1143 | * |
| 1144 | * Module: library/pem.c |
| 1145 | * Caller: library/x509parse.c |
| 1146 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1147 | * Requires: POLARSSL_BASE64_C |
| 1148 | * |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1149 | * This modules adds support for decoding PEM files. |
| 1150 | */ |
| 1151 | #define POLARSSL_PEM_C |
| 1152 | |
| 1153 | /** |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1154 | * \def POLARSSL_PK_C |
| 1155 | * |
| 1156 | * Enable the generic public (asymetric) key layer. |
| 1157 | * |
| 1158 | * Module: library/pk.c |
| 1159 | * Caller: library/x509parse.c |
| 1160 | * library/ssl_tls.c |
| 1161 | * library/ssl_cli.c |
| 1162 | * library/ssl_srv.c |
| 1163 | * |
| 1164 | * Uncomment to enable generic public key wrappers. |
| 1165 | */ |
| 1166 | #define POLARSSL_PK_C |
| 1167 | |
| 1168 | /** |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1169 | * \def POLARSSL_PKCS5_C |
| 1170 | * |
| 1171 | * Enable PKCS#5 functions |
| 1172 | * |
| 1173 | * Module: library/pkcs5.c |
| 1174 | * |
| 1175 | * Requires: POLARSSL_MD_C |
| 1176 | * |
| 1177 | * This module adds support for the PKCS#5 functions. |
| 1178 | */ |
| 1179 | #define POLARSSL_PKCS5_C |
| 1180 | |
| 1181 | /** |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1182 | * \def POLARSSL_PKCS11_C |
| 1183 | * |
Paul Bakker | eb2c658 | 2012-09-27 19:15:01 +0000 | [diff] [blame] | 1184 | * Enable wrapper for PKCS#11 smartcard support. |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1185 | * |
Manuel Pégourié-Gonnard | 51be559 | 2013-08-22 13:35:53 +0200 | [diff] [blame] | 1186 | * Module: library/pkcs11.c |
| 1187 | * Caller: library/pk.c |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1188 | * |
Manuel Pégourié-Gonnard | 51be559 | 2013-08-22 13:35:53 +0200 | [diff] [blame] | 1189 | * Requires: POLARSSL_PK_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1190 | * |
Paul Bakker | eb2c658 | 2012-09-27 19:15:01 +0000 | [diff] [blame] | 1191 | * This module enables SSL/TLS PKCS #11 smartcard support. |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1192 | * Requires the presence of the PKCS#11 helper library (libpkcs11-helper) |
| 1193 | #define POLARSSL_PKCS11_C |
| 1194 | */ |
| 1195 | |
| 1196 | /** |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1197 | * \def POLARSSL_PKCS12_C |
| 1198 | * |
| 1199 | * Enable PKCS#12 PBE functions |
| 1200 | * Adds algorithms for parsing PKCS#8 encrypted private keys |
| 1201 | * |
| 1202 | * Module: library/pkcs12.c |
| 1203 | * Caller: library/x509parse.c |
| 1204 | * |
Paul Bakker | b0713c7 | 2013-06-24 19:34:08 +0200 | [diff] [blame] | 1205 | * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C |
| 1206 | * Can use: POLARSSL_ARC4_C |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1207 | * |
| 1208 | * This module enables PKCS#12 functions. |
| 1209 | */ |
| 1210 | #define POLARSSL_PKCS12_C |
| 1211 | |
| 1212 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1213 | * \def POLARSSL_RSA_C |
| 1214 | * |
| 1215 | * Enable the RSA public-key cryptosystem. |
| 1216 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1217 | * Module: library/rsa.c |
| 1218 | * Caller: library/ssl_cli.c |
| 1219 | * library/ssl_srv.c |
| 1220 | * library/ssl_tls.c |
| 1221 | * library/x509.c |
| 1222 | * |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1223 | * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1224 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1225 | * This module is required for SSL/TLS and MD5-signed certificates. |
| 1226 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1227 | #define POLARSSL_RSA_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1228 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1229 | /** |
| 1230 | * \def POLARSSL_SHA1_C |
| 1231 | * |
| 1232 | * Enable the SHA1 cryptographic hash algorithm. |
| 1233 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1234 | * Module: library/sha1.c |
| 1235 | * Caller: library/ssl_cli.c |
| 1236 | * library/ssl_srv.c |
| 1237 | * library/ssl_tls.c |
| 1238 | * library/x509parse.c |
| 1239 | * |
| 1240 | * This module is required for SSL/TLS and SHA1-signed certificates. |
| 1241 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1242 | #define POLARSSL_SHA1_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1243 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1244 | /** |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1245 | * \def POLARSSL_SHA256_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1246 | * |
| 1247 | * Enable the SHA-224 and SHA-256 cryptographic hash algorithms. |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1248 | * (Used to be POLARSSL_SHA2_C) |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1249 | * |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1250 | * Module: library/sha256.c |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1251 | * Caller: library/md_wrap.c |
| 1252 | * library/x509parse.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1253 | * |
| 1254 | * This module adds support for SHA-224 and SHA-256. |
Paul Bakker | 769075d | 2012-11-24 11:26:46 +0100 | [diff] [blame] | 1255 | * This module is required for the SSL/TLS 1.2 PRF function. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1256 | */ |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1257 | #define POLARSSL_SHA256_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1258 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1259 | /** |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1260 | * \def POLARSSL_SHA512_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1261 | * |
| 1262 | * Enable the SHA-384 and SHA-512 cryptographic hash algorithms. |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1263 | * (Used to be POLARSSL_SHA4_C) |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1264 | * |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1265 | * Module: library/sha512.c |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1266 | * Caller: library/md_wrap.c |
| 1267 | * library/x509parse.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1268 | * |
| 1269 | * This module adds support for SHA-384 and SHA-512. |
| 1270 | */ |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1271 | #define POLARSSL_SHA512_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1272 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1273 | /** |
Paul Bakker | 0a59707 | 2012-09-25 21:55:46 +0000 | [diff] [blame] | 1274 | * \def POLARSSL_SSL_CACHE_C |
| 1275 | * |
| 1276 | * Enable simple SSL cache implementation. |
| 1277 | * |
| 1278 | * Module: library/ssl_cache.c |
| 1279 | * Caller: |
| 1280 | * |
| 1281 | * Requires: POLARSSL_SSL_CACHE_C |
| 1282 | */ |
| 1283 | #define POLARSSL_SSL_CACHE_C |
| 1284 | |
| 1285 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1286 | * \def POLARSSL_SSL_CLI_C |
| 1287 | * |
| 1288 | * Enable the SSL/TLS client code. |
| 1289 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1290 | * Module: library/ssl_cli.c |
| 1291 | * Caller: |
| 1292 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1293 | * Requires: POLARSSL_SSL_TLS_C |
| 1294 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1295 | * This module is required for SSL/TLS client support. |
| 1296 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1297 | #define POLARSSL_SSL_CLI_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1298 | |
Paul Bakker | 9a73632 | 2012-11-14 12:39:52 +0000 | [diff] [blame] | 1299 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1300 | * \def POLARSSL_SSL_SRV_C |
| 1301 | * |
| 1302 | * Enable the SSL/TLS server code. |
| 1303 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1304 | * Module: library/ssl_srv.c |
| 1305 | * Caller: |
| 1306 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1307 | * Requires: POLARSSL_SSL_TLS_C |
| 1308 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1309 | * This module is required for SSL/TLS server support. |
| 1310 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1311 | #define POLARSSL_SSL_SRV_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1312 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1313 | /** |
| 1314 | * \def POLARSSL_SSL_TLS_C |
| 1315 | * |
Paul Bakker | e29ab06 | 2011-05-18 13:26:54 +0000 | [diff] [blame] | 1316 | * Enable the generic SSL/TLS code. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1317 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1318 | * Module: library/ssl_tls.c |
| 1319 | * Caller: library/ssl_cli.c |
| 1320 | * library/ssl_srv.c |
| 1321 | * |
Paul Bakker | 577e006 | 2013-08-28 11:57:20 +0200 | [diff] [blame^] | 1322 | * Requires: POLARSSL_CIPHER_C, POLARSSL_PK_C, POLARSSL_MD_C |
| 1323 | * and at least one of the POLARSSL_SSL_PROTO_* defines |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1324 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1325 | * This module is required for SSL/TLS. |
| 1326 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1327 | #define POLARSSL_SSL_TLS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1328 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1329 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1330 | * \def POLARSSL_TIMING_C |
| 1331 | * |
| 1332 | * Enable the portable timing interface. |
| 1333 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1334 | * Module: library/timing.c |
| 1335 | * Caller: library/havege.c |
| 1336 | * |
| 1337 | * This module is used by the HAVEGE random number generator. |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1338 | #define POLARSSL_TIMING_C |
Paul Bakker | ecd54fb | 2013-07-03 14:48:29 +0200 | [diff] [blame] | 1339 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1340 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1341 | /** |
| 1342 | * \def POLARSSL_VERSION_C |
| 1343 | * |
| 1344 | * Enable run-time version information. |
| 1345 | * |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 1346 | * Module: library/version.c |
| 1347 | * |
| 1348 | * This module provides run-time version information. |
| 1349 | */ |
| 1350 | #define POLARSSL_VERSION_C |
| 1351 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1352 | /** |
| 1353 | * \def POLARSSL_X509_PARSE_C |
| 1354 | * |
| 1355 | * Enable X.509 certificate parsing. |
| 1356 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1357 | * Module: library/x509parse.c |
| 1358 | * Caller: library/ssl_cli.c |
| 1359 | * library/ssl_srv.c |
| 1360 | * library/ssl_tls.c |
| 1361 | * |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1362 | * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C, |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1363 | * POLARSSL_PK_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1364 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1365 | * This module is required for X.509 certificate parsing. |
| 1366 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1367 | #define POLARSSL_X509_PARSE_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1368 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1369 | /** |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 1370 | * \def POLARSSL_X509_WRITE_C |
| 1371 | * |
| 1372 | * Enable X.509 buffer writing. |
| 1373 | * |
| 1374 | * Module: library/x509write.c |
| 1375 | * |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1376 | * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 1377 | * |
| 1378 | * This module is required for X.509 certificate request writing. |
| 1379 | */ |
| 1380 | #define POLARSSL_X509_WRITE_C |
| 1381 | |
| 1382 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1383 | * \def POLARSSL_XTEA_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1384 | * |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1385 | * Enable the XTEA block cipher. |
| 1386 | * |
Paul Bakker | 7a7c78f | 2009-01-04 18:15:48 +0000 | [diff] [blame] | 1387 | * Module: library/xtea.c |
| 1388 | * Caller: |
| 1389 | */ |
| 1390 | #define POLARSSL_XTEA_C |
Manuel Pégourié-Gonnard | 39d2adb | 2012-10-31 09:26:55 +0100 | [diff] [blame] | 1391 | |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 1392 | /* \} name */ |
Paul Bakker | 7a7c78f | 2009-01-04 18:15:48 +0000 | [diff] [blame] | 1393 | |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1394 | /** |
| 1395 | * \name SECTION: Module configuration options |
| 1396 | * |
| 1397 | * This section allows for the setting of module specific sizes and |
| 1398 | * configuration options. The default values are already present in the |
| 1399 | * relevant header files and should suffice for the regular use cases. |
| 1400 | * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here |
| 1401 | * only if you have a good reason and know the consequences. |
| 1402 | * |
| 1403 | * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module |
| 1404 | * header file take precedence. |
| 1405 | * |
| 1406 | * Please check the respective header file for documentation on these |
| 1407 | * parameters (to prevent duplicate documentation). |
| 1408 | * |
| 1409 | * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here. |
| 1410 | * \{ |
| 1411 | */ |
| 1412 | //#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */ |
| 1413 | |
| 1414 | #if defined(POLARSSL_CONFIG_OPTIONS) |
| 1415 | |
| 1416 | // MPI / BIGNUM options |
| 1417 | // |
| 1418 | #define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */ |
| 1419 | #define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */ |
| 1420 | |
| 1421 | // CTR_DRBG options |
| 1422 | // |
Paul Bakker | fb08fd2 | 2013-08-27 15:06:26 +0200 | [diff] [blame] | 1423 | #define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1424 | #define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ |
| 1425 | #define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ |
| 1426 | #define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ |
| 1427 | #define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ |
| 1428 | |
| 1429 | // Entropy options |
| 1430 | // |
| 1431 | #define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */ |
| 1432 | #define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */ |
| 1433 | |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1434 | // Memory options |
| 1435 | #define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ |
| 1436 | #define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */ |
| 1437 | #define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */ |
| 1438 | |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1439 | // SSL Cache options |
| 1440 | // |
| 1441 | #define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */ |
| 1442 | #define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */ |
| 1443 | |
| 1444 | // SSL options |
| 1445 | // |
| 1446 | #define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */ |
Paul Bakker | 606b4ba | 2013-08-14 16:52:14 +0200 | [diff] [blame] | 1447 | #define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1448 | |
| 1449 | #endif /* POLARSSL_CONFIG_OPTIONS */ |
| 1450 | |
| 1451 | /* \} name */ |
| 1452 | |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1453 | /* |
| 1454 | * Sanity checks on defines and dependencies |
| 1455 | */ |
| 1456 | #if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C) |
| 1457 | #error "POLARSSL_DHM_C defined, but not all prerequisites" |
| 1458 | #endif |
| 1459 | |
| 1460 | #if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C) |
| 1461 | #error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites" |
| 1462 | #endif |
| 1463 | |
| 1464 | #if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C) |
| 1465 | #error "POLARSSL_ECDH_C defined, but not all prerequisites" |
| 1466 | #endif |
| 1467 | |
Manuel Pégourié-Gonnard | 4846f5e | 2013-08-08 14:36:15 +0200 | [diff] [blame] | 1468 | #if defined(POLARSSL_ECDSA_C) && \ |
| 1469 | ( !defined(POLARSSL_ECP_C) || \ |
| 1470 | !defined(POLARSSL_ASN1_PARSE_C) || \ |
| 1471 | !defined(POLARSSL_ASN1_WRITE_C) ) |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1472 | #error "POLARSSL_ECDSA_C defined, but not all prerequisites" |
| 1473 | #endif |
| 1474 | |
| 1475 | #if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C) |
| 1476 | #error "POLARSSL_ECP_C defined, but not all prerequisites" |
| 1477 | #endif |
| 1478 | |
Paul Bakker | fb08fd2 | 2013-08-27 15:06:26 +0200 | [diff] [blame] | 1479 | #if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \ |
| 1480 | !defined(POLARSSL_SHA256_C)) |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1481 | #error "POLARSSL_ENTROPY_C defined, but not all prerequisites" |
| 1482 | #endif |
Paul Bakker | fb08fd2 | 2013-08-27 15:06:26 +0200 | [diff] [blame] | 1483 | #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \ |
| 1484 | defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64) |
| 1485 | #error "CTR_DRBG_ENTROPY_LEN value too high" |
| 1486 | #endif |
| 1487 | #if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \ |
| 1488 | defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32) |
| 1489 | #error "CTR_DRBG_ENTROPY_LEN value too high" |
| 1490 | #endif |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1491 | |
| 1492 | #if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C) |
| 1493 | #error "POLARSSL_GCM_C defined, but not all prerequisites" |
| 1494 | #endif |
| 1495 | |
Paul Bakker | ecd54fb | 2013-07-03 14:48:29 +0200 | [diff] [blame] | 1496 | #if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C) |
| 1497 | #error "POLARSSL_HAVEGE_C defined, but not all prerequisites" |
| 1498 | #endif |
| 1499 | |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 1500 | #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C) |
| 1501 | #error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites" |
| 1502 | #endif |
| 1503 | |
| 1504 | #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ |
| 1505 | ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \ |
| 1506 | !defined(POLARSSL_X509_PARSE_C) ) |
| 1507 | #error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" |
| 1508 | #endif |
| 1509 | |
| 1510 | #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ |
| 1511 | ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \ |
| 1512 | !defined(POLARSSL_X509_PARSE_C) ) |
| 1513 | #error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites" |
| 1514 | #endif |
| 1515 | |
Manuel Pégourié-Gonnard | 32ea60a | 2013-08-17 17:39:04 +0200 | [diff] [blame] | 1516 | #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \ |
| 1517 | ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \ |
| 1518 | !defined(POLARSSL_X509_PARSE_C) ) |
| 1519 | #error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites" |
| 1520 | #endif |
| 1521 | |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 1522 | #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \ |
| 1523 | ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) ) |
| 1524 | #error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites" |
| 1525 | #endif |
| 1526 | |
| 1527 | #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \ |
| 1528 | ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) ) |
| 1529 | #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites" |
| 1530 | #endif |
| 1531 | |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1532 | #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C) |
| 1533 | #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites" |
| 1534 | #endif |
| 1535 | |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1536 | #if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C) |
| 1537 | #error "POLARSSL_PBKDF2_C defined, but not all prerequisites" |
| 1538 | #endif |
| 1539 | |
| 1540 | #if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C) |
| 1541 | #error "POLARSSL_PEM_C defined, but not all prerequisites" |
| 1542 | #endif |
| 1543 | |
Manuel Pégourié-Gonnard | 51be559 | 2013-08-22 13:35:53 +0200 | [diff] [blame] | 1544 | #if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C) |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1545 | #error "POLARSSL_PKCS11_C defined, but not all prerequisites" |
| 1546 | #endif |
| 1547 | |
| 1548 | #if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \ |
| 1549 | !defined(POLARSSL_OID_C) ) |
| 1550 | #error "POLARSSL_RSA_C defined, but not all prerequisites" |
| 1551 | #endif |
| 1552 | |
| 1553 | #if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C) |
| 1554 | #error "POLARSSL_SSL_CLI_C defined, but not all prerequisites" |
| 1555 | #endif |
| 1556 | |
Paul Bakker | 577e006 | 2013-08-28 11:57:20 +0200 | [diff] [blame^] | 1557 | #if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \ |
| 1558 | !defined(POLARSSL_PK_C) || !defined(POLARSSL_MD_C) ) |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1559 | #error "POLARSSL_SSL_TLS_C defined, but not all prerequisites" |
| 1560 | #endif |
| 1561 | |
| 1562 | #if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C) |
| 1563 | #error "POLARSSL_SSL_SRV_C defined, but not all prerequisites" |
| 1564 | #endif |
| 1565 | |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 1566 | #if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \ |
| 1567 | !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \ |
| 1568 | !defined(POLARSSL_SSL_PROTO_TLS1_2)) |
| 1569 | #error "POLARSSL_SSL_TLS_C defined, but no protocols are active" |
| 1570 | #endif |
| 1571 | |
| 1572 | #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \ |
| 1573 | defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1)) |
| 1574 | #error "Illegal protocol selection" |
| 1575 | #endif |
| 1576 | |
| 1577 | #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \ |
| 1578 | defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1)) |
| 1579 | #error "Illegal protocol selection" |
| 1580 | #endif |
| 1581 | |
| 1582 | #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \ |
| 1583 | defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \ |
| 1584 | !defined(POLARSSL_SSL_PROTO_TLS1_1))) |
| 1585 | #error "Illegal protocol selection" |
| 1586 | #endif |
| 1587 | |
Paul Bakker | 59da0a4 | 2013-08-19 13:27:17 +0200 | [diff] [blame] | 1588 | #if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \ |
| 1589 | ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) ) |
| 1590 | #error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites" |
| 1591 | #endif |
| 1592 | |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1593 | #if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \ |
| 1594 | !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \ |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1595 | !defined(POLARSSL_PK_C) ) |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1596 | #error "POLARSSL_X509_PARSE_C defined, but not all prerequisites" |
| 1597 | #endif |
| 1598 | |
| 1599 | #if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \ |
| 1600 | !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \ |
| 1601 | !defined(POLARSSL_RSA_C) ) |
| 1602 | #error "POLARSSL_X509_WRITE_C defined, but not all prerequisites" |
| 1603 | #endif |
| 1604 | |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1605 | #endif /* config.h */ |