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