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