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