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