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 | /** |
Paul Bakker | e2ab84f | 2013-06-29 18:24:32 +0200 | [diff] [blame] | 367 | * \def POLARSSL_ERROR_STRERROR_BC |
| 368 | * |
| 369 | * Make available the backward compatible error_strerror() next to the |
| 370 | * current polarssl_strerror(). |
| 371 | * |
| 372 | * Disable if you run into name conflicts and want to really remove the |
| 373 | * error_strerror() |
| 374 | */ |
| 375 | #define POLARSSL_ERROR_STRERROR_BC |
| 376 | |
| 377 | /** |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 378 | * \def POLARSSL_ERROR_STRERROR_DUMMY |
| 379 | * |
| 380 | * Enable a dummy error function to make use of error_strerror() in |
| 381 | * third party libraries easier. |
| 382 | * |
| 383 | * Disable if you run into name conflicts and want to really remove the |
| 384 | * error_strerror() |
| 385 | */ |
| 386 | #define POLARSSL_ERROR_STRERROR_DUMMY |
| 387 | |
| 388 | /** |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 389 | * \def POLARSSL_GENPRIME |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 390 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 391 | * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C |
| 392 | * |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 393 | * Enable the RSA prime-number generation code. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 394 | */ |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 395 | #define POLARSSL_GENPRIME |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 396 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 397 | /** |
Paul Bakker | 335db3f | 2011-04-25 15:28:35 +0000 | [diff] [blame] | 398 | * \def POLARSSL_FS_IO |
| 399 | * |
| 400 | * Enable functions that use the filesystem. |
| 401 | */ |
| 402 | #define POLARSSL_FS_IO |
| 403 | |
| 404 | /** |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 405 | * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES |
| 406 | * |
| 407 | * Do not add default entropy sources. These are the platform specific, |
| 408 | * hardclock and HAVEGE based poll functions. |
| 409 | * |
| 410 | * This is useful to have more control over the added entropy sources in an |
| 411 | * application. |
| 412 | * |
| 413 | * Uncomment this macro to prevent loading of default entropy functions. |
| 414 | #define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES |
| 415 | */ |
| 416 | |
| 417 | /** |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 418 | * \def POLARSSL_NO_PLATFORM_ENTROPY |
| 419 | * |
| 420 | * Do not use built-in platform entropy functions. |
| 421 | * This is useful if your platform does not support |
| 422 | * standards like the /dev/urandom or Windows CryptoAPI. |
| 423 | * |
| 424 | * Uncomment this macro to disable the built-in platform entropy functions. |
| 425 | #define POLARSSL_NO_PLATFORM_ENTROPY |
| 426 | */ |
| 427 | |
| 428 | /** |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 429 | * \def POLARSSL_MEMORY_DEBUG |
| 430 | * |
| 431 | * Enable debugging of buffer allocator memory issues. Automatically prints |
| 432 | * (to stderr) all (fatal) messages on memory allocation issues. Enables |
| 433 | * function for 'debug output' of allocated memory. |
| 434 | * |
| 435 | * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C |
| 436 | * fprintf() |
| 437 | * |
| 438 | * Uncomment this macro to let the buffer allocator print out error messages. |
| 439 | #define POLARSSL_MEMORY_DEBUG |
| 440 | */ |
| 441 | |
| 442 | /** |
| 443 | * \def POLARSSL_MEMORY_BACKTRACE |
| 444 | * |
| 445 | * Include backtrace information with each allocated block. |
| 446 | * |
| 447 | * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C |
| 448 | * GLIBC-compatible backtrace() an backtrace_symbols() support |
| 449 | * |
| 450 | * Uncomment this macro to include backtrace information |
| 451 | #define POLARSSL_MEMORY_BACKTRACE |
| 452 | */ |
| 453 | |
| 454 | /** |
Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 455 | * \def POLARSSL_PKCS1_V21 |
| 456 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 457 | * Requires: POLARSSL_MD_C, POLARSSL_RSA_C |
| 458 | * |
Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 459 | * Enable support for PKCS#1 v2.1 encoding. |
| 460 | * This enables support for RSAES-OAEP and RSASSA-PSS operations. |
| 461 | */ |
| 462 | #define POLARSSL_PKCS1_V21 |
| 463 | |
| 464 | /** |
Paul Bakker | 0216cc1 | 2011-03-26 13:40:23 +0000 | [diff] [blame] | 465 | * \def POLARSSL_RSA_NO_CRT |
| 466 | * |
| 467 | * Do not use the Chinese Remainder Theorem for the RSA private operation. |
| 468 | * |
| 469 | * Uncomment this macro to disable the use of CRT in RSA. |
| 470 | * |
| 471 | #define POLARSSL_RSA_NO_CRT |
| 472 | */ |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 473 | |
| 474 | /** |
| 475 | * \def POLARSSL_SELF_TEST |
| 476 | * |
| 477 | * Enable the checkup functions (*_self_test). |
| 478 | */ |
| 479 | #define POLARSSL_SELF_TEST |
Paul Bakker | 5c721f9 | 2011-07-27 16:51:09 +0000 | [diff] [blame] | 480 | |
| 481 | /** |
Paul Bakker | 40865c8 | 2013-01-31 17:13:13 +0100 | [diff] [blame] | 482 | * \def POLARSSL_SSL_ALL_ALERT_MESSAGES |
| 483 | * |
| 484 | * Enable sending of alert messages in case of encountered errors as per RFC. |
| 485 | * If you choose not to send the alert messages, PolarSSL can still communicate |
| 486 | * with other servers, only debugging of failures is harder. |
| 487 | * |
| 488 | * The advantage of not sending alert messages, is that no information is given |
| 489 | * about reasons for failures thus preventing adversaries of gaining intel. |
| 490 | * |
| 491 | * Enable sending of all alert messages |
| 492 | */ |
| 493 | #define POLARSSL_SSL_ALERT_MESSAGES |
| 494 | |
| 495 | /** |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 496 | * \def POLARSSL_SSL_DEBUG_ALL |
| 497 | * |
| 498 | * Enable the debug messages in SSL module for all issues. |
| 499 | * Debug messages have been disabled in some places to prevent timing |
| 500 | * attacks due to (unbalanced) debugging function calls. |
| 501 | * |
| 502 | * If you need all error reporting you should enable this during debugging, |
| 503 | * but remove this for production servers that should log as well. |
| 504 | * |
| 505 | * Uncomment this macro to report all debug messages on errors introducing |
| 506 | * a timing side-channel. |
| 507 | * |
| 508 | #define POLARSSL_SSL_DEBUG_ALL |
| 509 | */ |
| 510 | |
| 511 | /** |
Paul Bakker | 05ef835 | 2012-05-08 09:17:57 +0000 | [diff] [blame] | 512 | * \def POLARSSL_SSL_HW_RECORD_ACCEL |
| 513 | * |
| 514 | * Enable hooking functions in SSL module for hardware acceleration of |
| 515 | * individual records. |
| 516 | * |
| 517 | * Uncomment this macro to enable hooking functions. |
| 518 | #define POLARSSL_SSL_HW_RECORD_ACCEL |
| 519 | */ |
| 520 | |
| 521 | /** |
Paul Bakker | 78a8c71 | 2013-03-06 17:01:52 +0100 | [diff] [blame] | 522 | * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO |
| 523 | * |
| 524 | * Enable support for receiving and parsing SSLv2 Client Hello messages for the |
| 525 | * SSL Server module (POLARSSL_SSL_SRV_C) |
| 526 | * |
| 527 | * Comment this macro to disable support for SSLv2 Client Hello messages. |
| 528 | */ |
| 529 | #define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO |
| 530 | |
| 531 | /** |
Paul Bakker | 5c721f9 | 2011-07-27 16:51:09 +0000 | [diff] [blame] | 532 | * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION |
| 533 | * |
| 534 | * If set, the X509 parser will not break-off when parsing an X509 certificate |
| 535 | * and encountering an unknown critical extension. |
| 536 | * |
| 537 | * Uncomment to prevent an error. |
| 538 | * |
| 539 | #define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION |
| 540 | */ |
Paul Bakker | 2770fbd | 2012-07-03 13:30:23 +0000 | [diff] [blame] | 541 | |
| 542 | /** |
| 543 | * \def POLARSSL_ZLIB_SUPPORT |
| 544 | * |
| 545 | * If set, the SSL/TLS module uses ZLIB to support compression and |
| 546 | * decompression of packet data. |
| 547 | * |
| 548 | * Used in: library/ssl_tls.c |
| 549 | * library/ssl_cli.c |
| 550 | * library/ssl_srv.c |
| 551 | * |
| 552 | * This feature requires zlib library and headers to be present. |
| 553 | * |
| 554 | * Uncomment to enable use of ZLIB |
| 555 | #define POLARSSL_ZLIB_SUPPORT |
| 556 | */ |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 557 | /* \} name */ |
| 558 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 559 | /** |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 560 | * \name SECTION: PolarSSL modules |
| 561 | * |
| 562 | * This section enables or disables entire modules in PolarSSL |
| 563 | * \{ |
| 564 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 565 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 566 | /** |
| 567 | * \def POLARSSL_AES_C |
| 568 | * |
| 569 | * Enable the AES block cipher. |
| 570 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 571 | * Module: library/aes.c |
| 572 | * Caller: library/ssl_tls.c |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 573 | * library/pem.c |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 574 | * library/ctr_drbg.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 575 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 576 | * This module enables the following ciphersuites (if other requisites are |
| 577 | * enabled as well): |
| 578 | * TLS_RSA_WITH_AES_128_CBC_SHA |
| 579 | * TLS_RSA_WITH_AES_256_CBC_SHA |
| 580 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA |
| 581 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA |
| 582 | * TLS_RSA_WITH_AES_128_CBC_SHA256 |
| 583 | * TLS_RSA_WITH_AES_256_CBC_SHA256 |
| 584 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 |
| 585 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 |
| 586 | * TLS_RSA_WITH_AES_128_GCM_SHA256 |
| 587 | * TLS_RSA_WITH_AES_256_GCM_SHA384 |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 588 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |
| 589 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 590 | * TLS_PSK_WITH_AES_128_CBC_SHA |
| 591 | * TLS_PSK_WITH_AES_256_CBC_SHA |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 592 | * |
| 593 | * PEM uses AES for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 594 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 595 | #define POLARSSL_AES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 596 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 597 | /** |
| 598 | * \def POLARSSL_ARC4_C |
| 599 | * |
| 600 | * Enable the ARCFOUR stream cipher. |
| 601 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 602 | * Module: library/arc4.c |
| 603 | * Caller: library/ssl_tls.c |
| 604 | * |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 605 | * This module enables the following ciphersuites (if other requisites are |
| 606 | * enabled as well): |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 607 | * TLS_RSA_WITH_RC4_128_MD5 |
| 608 | * TLS_RSA_WITH_RC4_128_SHA |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 609 | * TLS_ECDHE_RSA_WITH_RC4_128_SHA |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 610 | * TLS_PSK_WITH_RC4_128_SHA |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 611 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 612 | #define POLARSSL_ARC4_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 613 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 614 | /** |
Paul Bakker | efc3029 | 2011-11-10 14:43:23 +0000 | [diff] [blame] | 615 | * \def POLARSSL_ASN1_PARSE_C |
| 616 | * |
| 617 | * Enable the generic ASN1 parser. |
| 618 | * |
| 619 | * Module: library/asn1.c |
| 620 | * Caller: library/x509parse.c |
| 621 | */ |
| 622 | #define POLARSSL_ASN1_PARSE_C |
| 623 | |
| 624 | /** |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 625 | * \def POLARSSL_ASN1_WRITE_C |
| 626 | * |
| 627 | * Enable the generic ASN1 writer. |
| 628 | * |
| 629 | * Module: library/asn1write.c |
| 630 | */ |
| 631 | #define POLARSSL_ASN1_WRITE_C |
| 632 | |
| 633 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 634 | * \def POLARSSL_BASE64_C |
| 635 | * |
| 636 | * Enable the Base64 module. |
| 637 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 638 | * Module: library/base64.c |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 639 | * Caller: library/pem.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 640 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 641 | * This module is required for PEM support (required by X.509). |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 642 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 643 | #define POLARSSL_BASE64_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 644 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 645 | /** |
| 646 | * \def POLARSSL_BIGNUM_C |
| 647 | * |
Paul Bakker | 9a73632 | 2012-11-14 12:39:52 +0000 | [diff] [blame] | 648 | * Enable the multi-precision integer library. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 649 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 650 | * Module: library/bignum.c |
| 651 | * Caller: library/dhm.c |
| 652 | * library/rsa.c |
| 653 | * library/ssl_tls.c |
| 654 | * library/x509parse.c |
| 655 | * |
| 656 | * This module is required for RSA and DHM support. |
| 657 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 658 | #define POLARSSL_BIGNUM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 659 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 660 | /** |
Paul Bakker | a9379c0 | 2012-07-04 11:02:11 +0000 | [diff] [blame] | 661 | * \def POLARSSL_BLOWFISH_C |
| 662 | * |
| 663 | * Enable the Blowfish block cipher. |
| 664 | * |
| 665 | * Module: library/blowfish.c |
| 666 | */ |
| 667 | #define POLARSSL_BLOWFISH_C |
| 668 | |
| 669 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 670 | * \def POLARSSL_CAMELLIA_C |
| 671 | * |
| 672 | * Enable the Camellia block cipher. |
| 673 | * |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 674 | * Module: library/camellia.c |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame] | 675 | * Caller: library/ssl_tls.c |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 676 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 677 | * This module enables the following ciphersuites (if other requisites are |
| 678 | * enabled as well): |
| 679 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 680 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 681 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 682 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 683 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 684 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
| 685 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 686 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 687 | */ |
| 688 | #define POLARSSL_CAMELLIA_C |
| 689 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 690 | /** |
| 691 | * \def POLARSSL_CERTS_C |
| 692 | * |
| 693 | * Enable the test certificates. |
| 694 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 695 | * Module: library/certs.c |
| 696 | * Caller: |
| 697 | * |
| 698 | * This module is used for testing (ssl_client/server). |
| 699 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 700 | #define POLARSSL_CERTS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 701 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 702 | /** |
| 703 | * \def POLARSSL_CIPHER_C |
| 704 | * |
| 705 | * Enable the generic cipher layer. |
| 706 | * |
Paul Bakker | 8123e9d | 2011-01-06 15:37:30 +0000 | [diff] [blame] | 707 | * Module: library/cipher.c |
| 708 | * Caller: |
| 709 | * |
| 710 | * Uncomment to enable generic cipher wrappers. |
| 711 | */ |
| 712 | #define POLARSSL_CIPHER_C |
| 713 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 714 | /** |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 715 | * \def POLARSSL_CTR_DRBG_C |
| 716 | * |
| 717 | * Enable the CTR_DRBG AES-256-based random generator |
| 718 | * |
| 719 | * Module: library/ctr_drbg.c |
| 720 | * Caller: |
| 721 | * |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 722 | * Requires: POLARSSL_AES_C |
| 723 | * |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 724 | * This module provides the CTR_DRBG AES-256 random number generator. |
| 725 | */ |
| 726 | #define POLARSSL_CTR_DRBG_C |
| 727 | |
| 728 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 729 | * \def POLARSSL_DEBUG_C |
| 730 | * |
| 731 | * Enable the debug functions. |
| 732 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 733 | * Module: library/debug.c |
| 734 | * Caller: library/ssl_cli.c |
| 735 | * library/ssl_srv.c |
| 736 | * library/ssl_tls.c |
| 737 | * |
| 738 | * This module provides debugging functions. |
| 739 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 740 | #define POLARSSL_DEBUG_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 741 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 742 | /** |
| 743 | * \def POLARSSL_DES_C |
| 744 | * |
| 745 | * Enable the DES block cipher. |
| 746 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 747 | * Module: library/des.c |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 748 | * Caller: library/pem.c |
| 749 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 750 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 751 | * This module enables the following ciphersuites (if other requisites are |
| 752 | * enabled as well): |
| 753 | * TLS_RSA_WITH_3DES_EDE_CBC_SHA |
| 754 | * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 755 | * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 756 | * TLS_PSK_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 757 | * |
| 758 | * PEM uses DES/3DES for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 759 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 760 | #define POLARSSL_DES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 761 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 762 | /** |
| 763 | * \def POLARSSL_DHM_C |
| 764 | * |
| 765 | * Enable the Diffie-Hellman-Merkle key exchange. |
| 766 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 767 | * Module: library/dhm.c |
| 768 | * Caller: library/ssl_cli.c |
| 769 | * library/ssl_srv.c |
| 770 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 771 | * This module enables the following ciphersuites (if other requisites are |
| 772 | * enabled as well): |
| 773 | * TLS_DHE_RSA_WITH_DES_CBC_SHA |
| 774 | * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 775 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA |
| 776 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA |
| 777 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 |
| 778 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 |
| 779 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 780 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 781 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 782 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
| 783 | * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 |
| 784 | * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 785 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 786 | #define POLARSSL_DHM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 787 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 788 | /** |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 789 | * \def POLARSSL_ECDH_C |
| 790 | * |
| 791 | * Enable the elliptic curve Diffie-Hellman library. |
| 792 | * |
| 793 | * Module: library/ecdh.c |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 794 | * Caller: library/ssl_cli.c |
| 795 | * library/ssl_srv.c |
| 796 | * |
| 797 | * This module enables the following ciphersuites (if other requisites are |
| 798 | * enabled as well): |
| 799 | * TLS_ECDHE_RSA_WITH_NULL_SHA |
| 800 | * TLS_ECDHE_RSA_WITH_RC4_128_SHA |
| 801 | * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 802 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |
| 803 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 804 | * |
| 805 | * Requires: POLARSSL_ECP_C |
| 806 | */ |
| 807 | #define POLARSSL_ECDH_C |
| 808 | |
| 809 | /** |
| 810 | * \def POLARSSL_ECDSA_C |
| 811 | * |
| 812 | * Enable the elliptic curve DSA library. |
| 813 | * |
| 814 | * Module: library/ecdsa.c |
| 815 | * Caller: |
| 816 | * |
| 817 | * Requires: POLARSSL_ECP_C |
| 818 | */ |
| 819 | #define POLARSSL_ECDSA_C |
| 820 | |
| 821 | /** |
| 822 | * \def POLARSSL_ECP_C |
| 823 | * |
| 824 | * Enable the elliptic curve over GF(p) library. |
| 825 | * |
| 826 | * Module: library/ecp.c |
| 827 | * Caller: library/ecdh.c |
| 828 | * library/ecdsa.c |
| 829 | * |
| 830 | * Requires: POLARSSL_BIGNUM_C |
| 831 | */ |
| 832 | #define POLARSSL_ECP_C |
| 833 | |
| 834 | /** |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 835 | * \def POLARSSL_ENTROPY_C |
| 836 | * |
| 837 | * Enable the platform-specific entropy code. |
| 838 | * |
| 839 | * Module: library/entropy.c |
| 840 | * Caller: |
| 841 | * |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 842 | * Requires: POLARSSL_SHA512_C |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 843 | * |
| 844 | * This module provides a generic entropy pool |
| 845 | */ |
| 846 | #define POLARSSL_ENTROPY_C |
| 847 | |
| 848 | /** |
Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 849 | * \def POLARSSL_ERROR_C |
| 850 | * |
| 851 | * Enable error code to error string conversion. |
| 852 | * |
| 853 | * Module: library/error.c |
| 854 | * Caller: |
| 855 | * |
| 856 | * This module enables err_strerror(). |
| 857 | */ |
| 858 | #define POLARSSL_ERROR_C |
| 859 | |
| 860 | /** |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 861 | * \def POLARSSL_GCM_C |
| 862 | * |
| 863 | * Enable the Galois/Counter Mode (GCM) for AES |
| 864 | * |
| 865 | * Module: library/gcm.c |
| 866 | * |
| 867 | * Requires: POLARSSL_AES_C |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 868 | * |
| 869 | * This module enables the following ciphersuites (if other requisites are |
| 870 | * enabled as well): |
| 871 | * TLS_RSA_WITH_AES_128_GCM_SHA256 |
| 872 | * TLS_RSA_WITH_AES_256_GCM_SHA384 |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 873 | */ |
| 874 | #define POLARSSL_GCM_C |
| 875 | |
| 876 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 877 | * \def POLARSSL_HAVEGE_C |
| 878 | * |
| 879 | * Enable the HAVEGE random generator. |
| 880 | * |
Paul Bakker | 2a84424 | 2013-06-24 13:01:53 +0200 | [diff] [blame] | 881 | * Warning: the HAVEGE random generator is not suitable for virtualized |
| 882 | * environments |
| 883 | * |
| 884 | * Warning: the HAVEGE random generator is dependent on timing and specific |
| 885 | * processor traits. It is therefore not advised to use HAVEGE as |
| 886 | * your applications primary random generator or primary entropy pool |
| 887 | * input. As a secondary input to your entropy pool, it IS able add |
| 888 | * the (limited) extra entropy it provides. |
| 889 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 890 | * Module: library/havege.c |
| 891 | * Caller: |
| 892 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 893 | * Requires: POLARSSL_TIMING_C |
| 894 | * |
Paul Bakker | 2a84424 | 2013-06-24 13:01:53 +0200 | [diff] [blame] | 895 | * Uncomment to enable the HAVEGE random generator. |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 896 | #define POLARSSL_HAVEGE_C |
Paul Bakker | 2a84424 | 2013-06-24 13:01:53 +0200 | [diff] [blame] | 897 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 898 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 899 | /** |
| 900 | * \def POLARSSL_MD_C |
| 901 | * |
| 902 | * Enable the generic message digest layer. |
| 903 | * |
Paul Bakker | 1737385 | 2011-01-06 14:20:01 +0000 | [diff] [blame] | 904 | * Module: library/md.c |
| 905 | * Caller: |
| 906 | * |
| 907 | * Uncomment to enable generic message digest wrappers. |
| 908 | */ |
| 909 | #define POLARSSL_MD_C |
| 910 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 911 | /** |
| 912 | * \def POLARSSL_MD2_C |
| 913 | * |
| 914 | * Enable the MD2 hash algorithm |
| 915 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 916 | * Module: library/md2.c |
| 917 | * Caller: library/x509parse.c |
| 918 | * |
| 919 | * Uncomment to enable support for (rare) MD2-signed X.509 certs. |
| 920 | * |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame] | 921 | #define POLARSSL_MD2_C |
Paul Bakker | 6506aff | 2009-07-28 20:52:02 +0000 | [diff] [blame] | 922 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 923 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 924 | /** |
| 925 | * \def POLARSSL_MD4_C |
| 926 | * |
| 927 | * Enable the MD4 hash algorithm |
| 928 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 929 | * Module: library/md4.c |
| 930 | * Caller: library/x509parse.c |
| 931 | * |
| 932 | * Uncomment to enable support for (rare) MD4-signed X.509 certs. |
| 933 | * |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame] | 934 | #define POLARSSL_MD4_C |
Paul Bakker | 6506aff | 2009-07-28 20:52:02 +0000 | [diff] [blame] | 935 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 936 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 937 | /** |
| 938 | * \def POLARSSL_MD5_C |
| 939 | * |
| 940 | * Enable the MD5 hash algorithm |
| 941 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 942 | * Module: library/md5.c |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 943 | * Caller: library/pem.c |
| 944 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 945 | * library/x509parse.c |
| 946 | * |
| 947 | * This module is required for SSL/TLS and X.509. |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 948 | * PEM uses MD5 for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 949 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 950 | #define POLARSSL_MD5_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 951 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 952 | /** |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 953 | * \def POLARSSL_MEMORY_C |
| 954 | * |
| 955 | * Enable the memory allocation layer. |
| 956 | * By default PolarSSL uses the system-provided malloc() and free(). |
| 957 | * (As long as POLARSSL_MEMORY_STDMALLOC and POLARSSL_MEMORY_STDFREE |
| 958 | * are defined and unmodified) |
| 959 | * |
| 960 | * This allows different allocators (self-implemented or provided) |
| 961 | * |
| 962 | * Enable this layer to allow use of alternative memory allocators. |
| 963 | #define POLARSSL_MEMORY_C |
| 964 | */ |
| 965 | |
| 966 | /** |
| 967 | * The buffer allocator implementation that makes use of a (stack) based |
| 968 | * buffer to 'allocate' dynamic memory. (replaces malloc() and free() calls) |
| 969 | * |
| 970 | * Module: library/memory_buffer_alloc.c |
| 971 | * |
| 972 | * Requires: POLARSSL_MEMORY_C |
| 973 | * |
| 974 | * Enable this module to enable the buffer memory allocator. |
| 975 | #define POLARSSL_MEMORY_BUFFER_ALLOC_C |
| 976 | */ |
| 977 | |
| 978 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 979 | * \def POLARSSL_NET_C |
| 980 | * |
| 981 | * Enable the TCP/IP networking routines. |
| 982 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 983 | * Module: library/net.c |
| 984 | * Caller: |
| 985 | * |
| 986 | * This module provides TCP/IP networking routines. |
| 987 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 988 | #define POLARSSL_NET_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 989 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 990 | /** |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 991 | * \def POLARSSL_OID_C |
| 992 | * |
| 993 | * Enable the OID database |
| 994 | * |
| 995 | * Module: library/oid.c |
| 996 | * Caller: library/rsa.c |
| 997 | * library/x509parse.c |
| 998 | * library/x509write.c |
| 999 | * |
| 1000 | * This modules translates between OIDs and internal values. |
| 1001 | */ |
| 1002 | #define POLARSSL_OID_C |
| 1003 | |
| 1004 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1005 | * \def POLARSSL_PADLOCK_C |
| 1006 | * |
| 1007 | * Enable VIA Padlock support on x86. |
| 1008 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1009 | * Module: library/padlock.c |
| 1010 | * Caller: library/aes.c |
| 1011 | * |
| 1012 | * This modules adds support for the VIA PadLock on x86. |
| 1013 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1014 | #define POLARSSL_PADLOCK_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1015 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1016 | /** |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1017 | * \def POLARSSL_PBKDF2_C |
| 1018 | * |
| 1019 | * Enable PKCS#5 PBKDF2 key derivation function |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1020 | * DEPRECATED: Use POLARSSL_PKCS5_C instead |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1021 | * |
| 1022 | * Module: library/pbkdf2.c |
| 1023 | * |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1024 | * Requires: POLARSSL_PKCS5_C |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1025 | * |
| 1026 | * This module adds support for the PKCS#5 PBKDF2 key derivation function. |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1027 | */ |
Paul Bakker | 370e90c | 2013-04-08 15:19:43 +0200 | [diff] [blame] | 1028 | #define POLARSSL_PBKDF2_C |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1029 | |
| 1030 | /** |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1031 | * \def POLARSSL_PEM_C |
| 1032 | * |
| 1033 | * Enable PEM decoding |
| 1034 | * |
| 1035 | * Module: library/pem.c |
| 1036 | * Caller: library/x509parse.c |
| 1037 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1038 | * Requires: POLARSSL_BASE64_C |
| 1039 | * |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1040 | * This modules adds support for decoding PEM files. |
| 1041 | */ |
| 1042 | #define POLARSSL_PEM_C |
| 1043 | |
| 1044 | /** |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1045 | * \def POLARSSL_PKCS5_C |
| 1046 | * |
| 1047 | * Enable PKCS#5 functions |
| 1048 | * |
| 1049 | * Module: library/pkcs5.c |
| 1050 | * |
| 1051 | * Requires: POLARSSL_MD_C |
| 1052 | * |
| 1053 | * This module adds support for the PKCS#5 functions. |
| 1054 | */ |
| 1055 | #define POLARSSL_PKCS5_C |
| 1056 | |
| 1057 | /** |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1058 | * \def POLARSSL_PKCS11_C |
| 1059 | * |
Paul Bakker | eb2c658 | 2012-09-27 19:15:01 +0000 | [diff] [blame] | 1060 | * Enable wrapper for PKCS#11 smartcard support. |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1061 | * |
| 1062 | * Module: library/ssl_srv.c |
| 1063 | * Caller: library/ssl_cli.c |
| 1064 | * library/ssl_srv.c |
| 1065 | * |
| 1066 | * Requires: POLARSSL_SSL_TLS_C |
| 1067 | * |
Paul Bakker | eb2c658 | 2012-09-27 19:15:01 +0000 | [diff] [blame] | 1068 | * This module enables SSL/TLS PKCS #11 smartcard support. |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1069 | * Requires the presence of the PKCS#11 helper library (libpkcs11-helper) |
| 1070 | #define POLARSSL_PKCS11_C |
| 1071 | */ |
| 1072 | |
| 1073 | /** |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1074 | * \def POLARSSL_PKCS12_C |
| 1075 | * |
| 1076 | * Enable PKCS#12 PBE functions |
| 1077 | * Adds algorithms for parsing PKCS#8 encrypted private keys |
| 1078 | * |
| 1079 | * Module: library/pkcs12.c |
| 1080 | * Caller: library/x509parse.c |
| 1081 | * |
Paul Bakker | b0713c7 | 2013-06-24 19:34:08 +0200 | [diff] [blame] | 1082 | * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C |
| 1083 | * Can use: POLARSSL_ARC4_C |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1084 | * |
| 1085 | * This module enables PKCS#12 functions. |
| 1086 | */ |
| 1087 | #define POLARSSL_PKCS12_C |
| 1088 | |
| 1089 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1090 | * \def POLARSSL_RSA_C |
| 1091 | * |
| 1092 | * Enable the RSA public-key cryptosystem. |
| 1093 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1094 | * Module: library/rsa.c |
| 1095 | * Caller: library/ssl_cli.c |
| 1096 | * library/ssl_srv.c |
| 1097 | * library/ssl_tls.c |
| 1098 | * library/x509.c |
| 1099 | * |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1100 | * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1101 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1102 | * This module is required for SSL/TLS and MD5-signed certificates. |
| 1103 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1104 | #define POLARSSL_RSA_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1105 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1106 | /** |
| 1107 | * \def POLARSSL_SHA1_C |
| 1108 | * |
| 1109 | * Enable the SHA1 cryptographic hash algorithm. |
| 1110 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1111 | * Module: library/sha1.c |
| 1112 | * Caller: library/ssl_cli.c |
| 1113 | * library/ssl_srv.c |
| 1114 | * library/ssl_tls.c |
| 1115 | * library/x509parse.c |
| 1116 | * |
| 1117 | * This module is required for SSL/TLS and SHA1-signed certificates. |
| 1118 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1119 | #define POLARSSL_SHA1_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1120 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1121 | /** |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1122 | * \def POLARSSL_SHA256_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1123 | * |
| 1124 | * Enable the SHA-224 and SHA-256 cryptographic hash algorithms. |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1125 | * (Used to be POLARSSL_SHA2_C) |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1126 | * |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1127 | * Module: library/sha256.c |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1128 | * Caller: library/md_wrap.c |
| 1129 | * library/x509parse.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1130 | * |
| 1131 | * This module adds support for SHA-224 and SHA-256. |
Paul Bakker | 769075d | 2012-11-24 11:26:46 +0100 | [diff] [blame] | 1132 | * This module is required for the SSL/TLS 1.2 PRF function. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1133 | */ |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1134 | #define POLARSSL_SHA256_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1135 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1136 | /** |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1137 | * \def POLARSSL_SHA512_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1138 | * |
| 1139 | * Enable the SHA-384 and SHA-512 cryptographic hash algorithms. |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1140 | * (Used to be POLARSSL_SHA4_C) |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1141 | * |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1142 | * Module: library/sha512.c |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1143 | * Caller: library/md_wrap.c |
| 1144 | * library/x509parse.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1145 | * |
| 1146 | * This module adds support for SHA-384 and SHA-512. |
| 1147 | */ |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1148 | #define POLARSSL_SHA512_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1149 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1150 | /** |
Paul Bakker | 0a59707 | 2012-09-25 21:55:46 +0000 | [diff] [blame] | 1151 | * \def POLARSSL_SSL_CACHE_C |
| 1152 | * |
| 1153 | * Enable simple SSL cache implementation. |
| 1154 | * |
| 1155 | * Module: library/ssl_cache.c |
| 1156 | * Caller: |
| 1157 | * |
| 1158 | * Requires: POLARSSL_SSL_CACHE_C |
| 1159 | */ |
| 1160 | #define POLARSSL_SSL_CACHE_C |
| 1161 | |
| 1162 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1163 | * \def POLARSSL_SSL_CLI_C |
| 1164 | * |
| 1165 | * Enable the SSL/TLS client code. |
| 1166 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1167 | * Module: library/ssl_cli.c |
| 1168 | * Caller: |
| 1169 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1170 | * Requires: POLARSSL_SSL_TLS_C |
| 1171 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1172 | * This module is required for SSL/TLS client support. |
| 1173 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1174 | #define POLARSSL_SSL_CLI_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1175 | |
Paul Bakker | 9a73632 | 2012-11-14 12:39:52 +0000 | [diff] [blame] | 1176 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1177 | * \def POLARSSL_SSL_SRV_C |
| 1178 | * |
| 1179 | * Enable the SSL/TLS server code. |
| 1180 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1181 | * Module: library/ssl_srv.c |
| 1182 | * Caller: |
| 1183 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1184 | * Requires: POLARSSL_SSL_TLS_C |
| 1185 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1186 | * This module is required for SSL/TLS server support. |
| 1187 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1188 | #define POLARSSL_SSL_SRV_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1189 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1190 | /** |
| 1191 | * \def POLARSSL_SSL_TLS_C |
| 1192 | * |
Paul Bakker | e29ab06 | 2011-05-18 13:26:54 +0000 | [diff] [blame] | 1193 | * Enable the generic SSL/TLS code. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1194 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1195 | * Module: library/ssl_tls.c |
| 1196 | * Caller: library/ssl_cli.c |
| 1197 | * library/ssl_srv.c |
| 1198 | * |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1199 | * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1200 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1201 | * This module is required for SSL/TLS. |
| 1202 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1203 | #define POLARSSL_SSL_TLS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1204 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1205 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1206 | * \def POLARSSL_TIMING_C |
| 1207 | * |
| 1208 | * Enable the portable timing interface. |
| 1209 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1210 | * Module: library/timing.c |
| 1211 | * Caller: library/havege.c |
| 1212 | * |
| 1213 | * This module is used by the HAVEGE random number generator. |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1214 | #define POLARSSL_TIMING_C |
Paul Bakker | ecd54fb | 2013-07-03 14:48:29 +0200 | [diff] [blame] | 1215 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1216 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1217 | /** |
| 1218 | * \def POLARSSL_VERSION_C |
| 1219 | * |
| 1220 | * Enable run-time version information. |
| 1221 | * |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 1222 | * Module: library/version.c |
| 1223 | * |
| 1224 | * This module provides run-time version information. |
| 1225 | */ |
| 1226 | #define POLARSSL_VERSION_C |
| 1227 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1228 | /** |
| 1229 | * \def POLARSSL_X509_PARSE_C |
| 1230 | * |
| 1231 | * Enable X.509 certificate parsing. |
| 1232 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1233 | * Module: library/x509parse.c |
| 1234 | * Caller: library/ssl_cli.c |
| 1235 | * library/ssl_srv.c |
| 1236 | * library/ssl_tls.c |
| 1237 | * |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1238 | * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C, |
| 1239 | * POLARSSL_RSA_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1240 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1241 | * This module is required for X.509 certificate parsing. |
| 1242 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1243 | #define POLARSSL_X509_PARSE_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1244 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1245 | /** |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 1246 | * \def POLARSSL_X509_WRITE_C |
| 1247 | * |
| 1248 | * Enable X.509 buffer writing. |
| 1249 | * |
| 1250 | * Module: library/x509write.c |
| 1251 | * |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1252 | * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 1253 | * |
| 1254 | * This module is required for X.509 certificate request writing. |
| 1255 | */ |
| 1256 | #define POLARSSL_X509_WRITE_C |
| 1257 | |
| 1258 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1259 | * \def POLARSSL_XTEA_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1260 | * |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1261 | * Enable the XTEA block cipher. |
| 1262 | * |
Paul Bakker | 7a7c78f | 2009-01-04 18:15:48 +0000 | [diff] [blame] | 1263 | * Module: library/xtea.c |
| 1264 | * Caller: |
| 1265 | */ |
| 1266 | #define POLARSSL_XTEA_C |
Manuel Pégourié-Gonnard | 39d2adb | 2012-10-31 09:26:55 +0100 | [diff] [blame] | 1267 | |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 1268 | /* \} name */ |
Paul Bakker | 7a7c78f | 2009-01-04 18:15:48 +0000 | [diff] [blame] | 1269 | |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1270 | /** |
| 1271 | * \name SECTION: Module configuration options |
| 1272 | * |
| 1273 | * This section allows for the setting of module specific sizes and |
| 1274 | * configuration options. The default values are already present in the |
| 1275 | * relevant header files and should suffice for the regular use cases. |
| 1276 | * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here |
| 1277 | * only if you have a good reason and know the consequences. |
| 1278 | * |
| 1279 | * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module |
| 1280 | * header file take precedence. |
| 1281 | * |
| 1282 | * Please check the respective header file for documentation on these |
| 1283 | * parameters (to prevent duplicate documentation). |
| 1284 | * |
| 1285 | * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here. |
| 1286 | * \{ |
| 1287 | */ |
| 1288 | //#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */ |
| 1289 | |
| 1290 | #if defined(POLARSSL_CONFIG_OPTIONS) |
| 1291 | |
| 1292 | // MPI / BIGNUM options |
| 1293 | // |
| 1294 | #define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */ |
| 1295 | #define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */ |
| 1296 | |
| 1297 | // CTR_DRBG options |
| 1298 | // |
| 1299 | #define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default */ |
| 1300 | #define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ |
| 1301 | #define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ |
| 1302 | #define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ |
| 1303 | #define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ |
| 1304 | |
| 1305 | // Entropy options |
| 1306 | // |
| 1307 | #define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */ |
| 1308 | #define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */ |
| 1309 | |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1310 | // Memory options |
| 1311 | #define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ |
| 1312 | #define POLARSSL_MEMORY_STDMALLOC malloc /**< Default allocator to use, can be undefined */ |
| 1313 | #define POLARSSL_MEMORY_STDFREE free /**< Default free to use, can be undefined */ |
| 1314 | |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1315 | // SSL Cache options |
| 1316 | // |
| 1317 | #define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */ |
| 1318 | #define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */ |
| 1319 | |
| 1320 | // SSL options |
| 1321 | // |
| 1322 | #define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */ |
| 1323 | |
| 1324 | #endif /* POLARSSL_CONFIG_OPTIONS */ |
| 1325 | |
| 1326 | /* \} name */ |
| 1327 | |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1328 | /* |
| 1329 | * Sanity checks on defines and dependencies |
| 1330 | */ |
| 1331 | #if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C) |
| 1332 | #error "POLARSSL_DHM_C defined, but not all prerequisites" |
| 1333 | #endif |
| 1334 | |
| 1335 | #if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C) |
| 1336 | #error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites" |
| 1337 | #endif |
| 1338 | |
| 1339 | #if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C) |
| 1340 | #error "POLARSSL_ECDH_C defined, but not all prerequisites" |
| 1341 | #endif |
| 1342 | |
| 1343 | #if defined(POLARSSL_ECDSA_C) && !defined(POLARSSL_ECP_C) |
| 1344 | #error "POLARSSL_ECDSA_C defined, but not all prerequisites" |
| 1345 | #endif |
| 1346 | |
| 1347 | #if defined(POLARSSL_ECP_C) && !defined(POLARSSL_BIGNUM_C) |
| 1348 | #error "POLARSSL_ECP_C defined, but not all prerequisites" |
| 1349 | #endif |
| 1350 | |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 1351 | #if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1352 | #error "POLARSSL_ENTROPY_C defined, but not all prerequisites" |
| 1353 | #endif |
| 1354 | |
| 1355 | #if defined(POLARSSL_GCM_C) && !defined(POLARSSL_AES_C) |
| 1356 | #error "POLARSSL_GCM_C defined, but not all prerequisites" |
| 1357 | #endif |
| 1358 | |
Paul Bakker | ecd54fb | 2013-07-03 14:48:29 +0200 | [diff] [blame] | 1359 | #if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C) |
| 1360 | #error "POLARSSL_HAVEGE_C defined, but not all prerequisites" |
| 1361 | #endif |
| 1362 | |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 1363 | #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C) |
| 1364 | #error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites" |
| 1365 | #endif |
| 1366 | |
| 1367 | #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ |
| 1368 | ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \ |
| 1369 | !defined(POLARSSL_X509_PARSE_C) ) |
| 1370 | #error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" |
| 1371 | #endif |
| 1372 | |
| 1373 | #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ |
| 1374 | ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \ |
| 1375 | !defined(POLARSSL_X509_PARSE_C) ) |
| 1376 | #error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites" |
| 1377 | #endif |
| 1378 | |
| 1379 | #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \ |
| 1380 | ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) ) |
| 1381 | #error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites" |
| 1382 | #endif |
| 1383 | |
| 1384 | #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \ |
| 1385 | ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_PARSE_C) ) |
| 1386 | #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites" |
| 1387 | #endif |
| 1388 | |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1389 | #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C) |
| 1390 | #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites" |
| 1391 | #endif |
| 1392 | |
Paul Bakker | 7ad00f9 | 2013-04-18 23:05:25 +0200 | [diff] [blame] | 1393 | #if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C) |
| 1394 | #error "POLARSSL_PBKDF2_C defined, but not all prerequisites" |
| 1395 | #endif |
| 1396 | |
| 1397 | #if defined(POLARSSL_PEM_C) && !defined(POLARSSL_PEM_C) |
| 1398 | #error "POLARSSL_PEM_C defined, but not all prerequisites" |
| 1399 | #endif |
| 1400 | |
| 1401 | #if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_SSL_TLS_C) |
| 1402 | #error "POLARSSL_PKCS11_C defined, but not all prerequisites" |
| 1403 | #endif |
| 1404 | |
| 1405 | #if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \ |
| 1406 | !defined(POLARSSL_OID_C) ) |
| 1407 | #error "POLARSSL_RSA_C defined, but not all prerequisites" |
| 1408 | #endif |
| 1409 | |
| 1410 | #if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C) |
| 1411 | #error "POLARSSL_SSL_CLI_C defined, but not all prerequisites" |
| 1412 | #endif |
| 1413 | |
| 1414 | #if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_MD5_C) || \ |
| 1415 | !defined(POLARSSL_SHA1_C) ) |
| 1416 | #error "POLARSSL_SSL_TLS_C defined, but not all prerequisites" |
| 1417 | #endif |
| 1418 | |
| 1419 | #if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C) |
| 1420 | #error "POLARSSL_SSL_SRV_C defined, but not all prerequisites" |
| 1421 | #endif |
| 1422 | |
| 1423 | #if defined(POLARSSL_X509_PARSE_C) && ( !defined(POLARSSL_BIGNUM_C) || \ |
| 1424 | !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \ |
| 1425 | !defined(POLARSSL_RSA_C) ) |
| 1426 | #error "POLARSSL_X509_PARSE_C defined, but not all prerequisites" |
| 1427 | #endif |
| 1428 | |
| 1429 | #if defined(POLARSSL_X509_WRITE_C) && ( !defined(POLARSSL_BIGNUM_C) || \ |
| 1430 | !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \ |
| 1431 | !defined(POLARSSL_RSA_C) ) |
| 1432 | #error "POLARSSL_X509_WRITE_C defined, but not all prerequisites" |
| 1433 | #endif |
| 1434 | |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1435 | #endif /* config.h */ |