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 | * |
Manuel Pégourié-Gonnard | a658a40 | 2015-01-23 09:45:19 +0000 | [diff] [blame] | 6 | * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved |
Paul Bakker | b96f154 | 2010-07-18 20:36:00 +0000 | [diff] [blame] | 7 | * |
Manuel Pégourié-Gonnard | 860b516 | 2015-01-28 17:12:07 +0000 | [diff] [blame] | 8 | * This file is part of mbed TLS (https://polarssl.org) |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 9 | * |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by |
| 12 | * the Free Software Foundation; either version 2 of the License, or |
| 13 | * (at your option) any later version. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License along |
| 21 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 22 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 23 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 24 | * This set of compile-time options may be used to enable |
| 25 | * or disable features selectively, and reduce the global |
| 26 | * memory footprint. |
| 27 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 28 | #ifndef POLARSSL_CONFIG_H |
| 29 | #define POLARSSL_CONFIG_H |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 30 | |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 31 | #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 32 | #define _CRT_SECURE_NO_DEPRECATE 1 |
| 33 | #endif |
| 34 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 35 | /** |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 36 | * \name SECTION: System support |
| 37 | * |
| 38 | * This section sets system specific settings. |
| 39 | * \{ |
| 40 | */ |
| 41 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 42 | /** |
| 43 | * \def POLARSSL_HAVE_INT8 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 44 | * |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 45 | * The system uses 8-bit wide native integers. |
| 46 | * |
| 47 | * Uncomment if native integers are 8-bit wide. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 48 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 49 | //#define POLARSSL_HAVE_INT8 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 50 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 51 | /** |
| 52 | * \def POLARSSL_HAVE_INT16 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 53 | * |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 54 | * The system uses 16-bit wide native integers. |
| 55 | * |
| 56 | * Uncomment if native integers are 16-bit wide. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 57 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 58 | //#define POLARSSL_HAVE_INT16 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 59 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 60 | /** |
Paul Bakker | 62261d6 | 2012-10-02 12:19:31 +0000 | [diff] [blame] | 61 | * \def POLARSSL_HAVE_LONGLONG |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 62 | * |
Paul Bakker | 62261d6 | 2012-10-02 12:19:31 +0000 | [diff] [blame] | 63 | * The compiler supports the 'long long' type. |
| 64 | * (Only used on 32-bit platforms) |
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 | #define POLARSSL_HAVE_LONGLONG |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 67 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 68 | /** |
| 69 | * \def POLARSSL_HAVE_ASM |
| 70 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 71 | * The compiler has support for asm(). |
Paul Bakker | 68041ec | 2009-04-19 21:17:55 +0000 | [diff] [blame] | 72 | * |
| 73 | * Requires support for asm() in compiler. |
| 74 | * |
| 75 | * Used in: |
| 76 | * library/timing.c |
| 77 | * library/padlock.c |
| 78 | * include/polarssl/bn_mul.h |
| 79 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 80 | * Comment to disable the use of assembly code. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 81 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 82 | #define POLARSSL_HAVE_ASM |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 83 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 84 | /** |
| 85 | * \def POLARSSL_HAVE_SSE2 |
| 86 | * |
Paul Bakker | e23c315 | 2012-10-01 14:42:47 +0000 | [diff] [blame] | 87 | * CPU supports SSE2 instruction set. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 88 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 89 | * Uncomment if the CPU supports SSE2 (IA-32 specific). |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 90 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 91 | //#define POLARSSL_HAVE_SSE2 |
Paul Bakker | fa9b100 | 2013-07-03 15:31:03 +0200 | [diff] [blame] | 92 | |
| 93 | /** |
| 94 | * \def POLARSSL_HAVE_TIME |
| 95 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 96 | * System has time.h and time() / localtime() / gettimeofday(). |
Paul Bakker | fa9b100 | 2013-07-03 15:31:03 +0200 | [diff] [blame] | 97 | * |
| 98 | * Comment if your system does not support time functions |
| 99 | */ |
| 100 | #define POLARSSL_HAVE_TIME |
Manuel Pégourié-Gonnard | 10934de | 2013-12-13 12:54:09 +0100 | [diff] [blame] | 101 | |
| 102 | /** |
| 103 | * \def POLARSSL_HAVE_IPV6 |
| 104 | * |
| 105 | * System supports the basic socket interface for IPv6 (RFC 3493), |
Manuel Pégourié-Gonnard | 767f02c | 2013-12-13 16:23:39 +0100 | [diff] [blame] | 106 | * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage. |
Manuel Pégourié-Gonnard | 10934de | 2013-12-13 12:54:09 +0100 | [diff] [blame] | 107 | * |
Manuel Pégourié-Gonnard | 1321135 | 2013-12-17 17:38:55 +0100 | [diff] [blame] | 108 | * Note: on Windows/MingW, XP or higher is required. |
| 109 | * |
Manuel Pégourié-Gonnard | 10934de | 2013-12-13 12:54:09 +0100 | [diff] [blame] | 110 | * Comment if your system does not support the IPv6 socket interface |
| 111 | */ |
| 112 | #define POLARSSL_HAVE_IPV6 |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 113 | |
| 114 | /** |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 115 | * \def POLARSSL_PLATFORM_MEMORY |
| 116 | * |
| 117 | * Enable the memory allocation layer. |
| 118 | * |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 119 | * By default mbed TLS uses the system-provided malloc() and free(). |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 120 | * This allows different allocators (self-implemented or provided) to be |
| 121 | * provided to the platform abstraction layer. |
| 122 | * |
Rich Evans | 16f8cd8 | 2015-02-06 16:14:34 +0000 | [diff] [blame] | 123 | * Enabling POLARSSL_PLATFORM_MEMORY without the |
| 124 | * POLARSSL_PLATFORM_{FREE,MALLOC}_MACROs will provide |
| 125 | * "platform_set_malloc_free()" allowing you to set an alternative malloc() and |
| 126 | * free() function pointer at runtime. |
| 127 | * |
| 128 | * Enabling POLARSSL_PLATFORM_MEMORY and specifying |
| 129 | * POLARSSL_PLATFORM_{MALLOC,FREE}_MACROs will allow you to specify the |
| 130 | * alternate function at compile time. |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 131 | * |
| 132 | * Requires: POLARSSL_PLATFORM_C |
| 133 | * |
| 134 | * Enable this layer to allow use of alternative memory allocators. |
| 135 | */ |
| 136 | //#define POLARSSL_PLATFORM_MEMORY |
| 137 | |
| 138 | /** |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 139 | * \def POLARSSL_PLATFORM_NO_STD_FUNCTIONS |
| 140 | * |
| 141 | * Do not assign standard functions in the platform layer (e.g. malloc() to |
| 142 | * POLARSSL_PLATFORM_STD_MALLOC and printf() to POLARSSL_PLATFORM_STD_PRINTF) |
| 143 | * |
| 144 | * This makes sure there are no linking errors on platforms that do not support |
| 145 | * these functions. You will HAVE to provide alternatives, either at runtime |
| 146 | * via the platform_set_xxx() functions or at compile time by setting |
Rich Evans | 16f8cd8 | 2015-02-06 16:14:34 +0000 | [diff] [blame] | 147 | * the POLARSSL_PLATFORM_STD_XXX defines, or enabling a |
| 148 | * POLARSSL_PLATFORM_XXX_MACRO. |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 149 | * |
| 150 | * Requires: POLARSSL_PLATFORM_C |
| 151 | * |
| 152 | * Uncomment to prevent default assignment of standard functions in the |
| 153 | * platform layer. |
| 154 | */ |
| 155 | //#define POLARSSL_PLATFORM_NO_STD_FUNCTIONS |
| 156 | |
| 157 | /** |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 158 | * \def POLARSSL_PLATFORM_XXX_ALT |
| 159 | * |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 160 | * Uncomment a macro to let mbed TLS support the function in the platform |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 161 | * abstraction layer. |
| 162 | * |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 163 | * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, mbed TLS will |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 164 | * provide a function "platform_set_printf()" that allows you to set an |
| 165 | * alternative printf function pointer. |
| 166 | * |
| 167 | * All these define require POLARSSL_PLATFORM_C to be defined! |
| 168 | * |
Rich Evans | 46b0a8d | 2015-01-30 10:47:32 +0000 | [diff] [blame] | 169 | * WARNING: POLARSSL_PLATFORM_SNPRINTF_ALT is not available on Windows |
| 170 | * for compatibility reasons. |
| 171 | * |
Rich Evans | 16f8cd8 | 2015-02-06 16:14:34 +0000 | [diff] [blame] | 172 | * WARNING: POLARSSL_PLATFORM_XXX_ALT cannot be defined at the same time as |
| 173 | * POLARSSL_PLATFORM_XXX_MACRO! |
| 174 | * |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 175 | * Uncomment a macro to enable alternate implementation of specific base |
| 176 | * platform function |
| 177 | */ |
Rich Evans | c39cb49 | 2015-01-30 12:01:34 +0000 | [diff] [blame] | 178 | //#define POLARSSL_PLATFORM_EXIT_ALT |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 179 | //#define POLARSSL_PLATFORM_FPRINTF_ALT |
Rich Evans | 98081c5 | 2015-02-03 11:00:54 +0000 | [diff] [blame] | 180 | //#define POLARSSL_PLATFORM_PRINTF_ALT |
| 181 | //#define POLARSSL_PLATFORM_SNPRINTF_ALT |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 182 | /* \} name SECTION: System support */ |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 183 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 184 | /** |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 185 | * \name SECTION: mbed TLS feature support |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 186 | * |
| 187 | * This section sets support for features that are or are not needed |
| 188 | * within the modules that are enabled. |
| 189 | * \{ |
| 190 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 191 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 192 | /** |
Paul Bakker | f2561b3 | 2014-02-06 15:11:55 +0100 | [diff] [blame] | 193 | * \def POLARSSL_TIMING_ALT |
| 194 | * |
| 195 | * Uncomment to provide your own alternate implementation for hardclock(), |
| 196 | * get_timer(), set_alarm() and m_sleep(). |
| 197 | * |
| 198 | * Only works if you have POLARSSL_TIMING_C enabled. |
| 199 | * |
| 200 | * You will need to provide a header "timing_alt.h" and an implementation at |
| 201 | * compile time. |
| 202 | */ |
| 203 | //#define POLARSSL_TIMING_ALT |
| 204 | |
| 205 | /** |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 206 | * \def POLARSSL_XXX_ALT |
| 207 | * |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 208 | * Uncomment a macro to let mbed TLS use your alternate core implementation of |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 209 | * a symmetric or hash algorithm (e.g. platform specific assembly optimized |
| 210 | * implementations). Keep in mind that the function prototypes should remain |
| 211 | * the same. |
| 212 | * |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 213 | * Example: In case you uncomment POLARSSL_AES_ALT, mbed TLS will no longer |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 214 | * provide the "struct aes_context" definition and omit the base function |
| 215 | * declarations and implementations. "aes_alt.h" will be included from |
| 216 | * "aes.h" to include the new function definitions. |
| 217 | * |
| 218 | * Uncomment a macro to enable alternate implementation for core algorithm |
| 219 | * functions |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 220 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 221 | //#define POLARSSL_AES_ALT |
| 222 | //#define POLARSSL_ARC4_ALT |
| 223 | //#define POLARSSL_BLOWFISH_ALT |
| 224 | //#define POLARSSL_CAMELLIA_ALT |
| 225 | //#define POLARSSL_DES_ALT |
| 226 | //#define POLARSSL_XTEA_ALT |
| 227 | //#define POLARSSL_MD2_ALT |
| 228 | //#define POLARSSL_MD4_ALT |
| 229 | //#define POLARSSL_MD5_ALT |
Paul Bakker | 9f4c162 | 2014-01-22 14:14:26 +0100 | [diff] [blame] | 230 | //#define POLARSSL_RIPEMD160_ALT |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 231 | //#define POLARSSL_SHA1_ALT |
| 232 | //#define POLARSSL_SHA256_ALT |
| 233 | //#define POLARSSL_SHA512_ALT |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 234 | |
| 235 | /** |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 236 | * \def POLARSSL_AES_ROM_TABLES |
| 237 | * |
| 238 | * Store the AES tables in ROM. |
| 239 | * |
| 240 | * Uncomment this macro to store the AES tables in ROM. |
| 241 | * |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 242 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 243 | //#define POLARSSL_AES_ROM_TABLES |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 244 | |
| 245 | /** |
Manuel Pégourié-Gonnard | f7dc378 | 2013-09-13 14:10:44 +0200 | [diff] [blame] | 246 | * \def POLARSSL_CIPHER_MODE_CBC |
| 247 | * |
| 248 | * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers. |
| 249 | */ |
| 250 | #define POLARSSL_CIPHER_MODE_CBC |
| 251 | |
| 252 | /** |
Paul Bakker | b6ecaf5 | 2011-04-19 14:29:23 +0000 | [diff] [blame] | 253 | * \def POLARSSL_CIPHER_MODE_CFB |
| 254 | * |
| 255 | * Enable Cipher Feedback mode (CFB) for symmetric ciphers. |
| 256 | */ |
| 257 | #define POLARSSL_CIPHER_MODE_CFB |
| 258 | |
| 259 | /** |
| 260 | * \def POLARSSL_CIPHER_MODE_CTR |
| 261 | * |
| 262 | * Enable Counter Block Cipher mode (CTR) for symmetric ciphers. |
| 263 | */ |
| 264 | #define POLARSSL_CIPHER_MODE_CTR |
| 265 | |
| 266 | /** |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 267 | * \def POLARSSL_CIPHER_NULL_CIPHER |
| 268 | * |
| 269 | * Enable NULL cipher. |
| 270 | * Warning: Only do so when you know what you are doing. This allows for |
| 271 | * encryption or channels without any security! |
| 272 | * |
| 273 | * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable |
| 274 | * the following ciphersuites: |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 275 | * TLS_ECDH_ECDSA_WITH_NULL_SHA |
| 276 | * TLS_ECDH_RSA_WITH_NULL_SHA |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 277 | * TLS_ECDHE_ECDSA_WITH_NULL_SHA |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 278 | * TLS_ECDHE_RSA_WITH_NULL_SHA |
Manuel Pégourié-Gonnard | 225d6aa | 2013-10-11 19:07:56 +0200 | [diff] [blame] | 279 | * TLS_ECDHE_PSK_WITH_NULL_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 280 | * TLS_ECDHE_PSK_WITH_NULL_SHA256 |
| 281 | * TLS_ECDHE_PSK_WITH_NULL_SHA |
| 282 | * TLS_DHE_PSK_WITH_NULL_SHA384 |
| 283 | * TLS_DHE_PSK_WITH_NULL_SHA256 |
| 284 | * TLS_DHE_PSK_WITH_NULL_SHA |
| 285 | * TLS_RSA_WITH_NULL_SHA256 |
| 286 | * TLS_RSA_WITH_NULL_SHA |
| 287 | * TLS_RSA_WITH_NULL_MD5 |
| 288 | * TLS_RSA_PSK_WITH_NULL_SHA384 |
| 289 | * TLS_RSA_PSK_WITH_NULL_SHA256 |
| 290 | * TLS_RSA_PSK_WITH_NULL_SHA |
| 291 | * TLS_PSK_WITH_NULL_SHA384 |
| 292 | * TLS_PSK_WITH_NULL_SHA256 |
| 293 | * TLS_PSK_WITH_NULL_SHA |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 294 | * |
| 295 | * Uncomment this macro to enable the NULL cipher and ciphersuites |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 296 | */ |
Paul Bakker | 03b6a46 | 2014-04-17 16:22:31 +0200 | [diff] [blame] | 297 | //#define POLARSSL_CIPHER_NULL_CIPHER |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 298 | |
| 299 | /** |
Paul Bakker | 48e93c8 | 2013-08-14 12:21:18 +0200 | [diff] [blame] | 300 | * \def POLARSSL_CIPHER_PADDING_XXX |
| 301 | * |
| 302 | * Uncomment or comment macros to add support for specific padding modes |
| 303 | * in the cipher layer with cipher modes that support padding (e.g. CBC) |
| 304 | * |
| 305 | * If you disable all padding modes, only full blocks can be used with CBC. |
| 306 | * |
| 307 | * Enable padding modes in the cipher layer. |
| 308 | */ |
| 309 | #define POLARSSL_CIPHER_PADDING_PKCS7 |
| 310 | #define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS |
| 311 | #define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN |
| 312 | #define POLARSSL_CIPHER_PADDING_ZEROS |
| 313 | |
| 314 | /** |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 315 | * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES |
| 316 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 317 | * Enable weak ciphersuites in SSL / TLS. |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 318 | * 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] | 319 | * channels with virtually no security at all! |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 320 | * |
| 321 | * This enables the following ciphersuites: |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 322 | * TLS_RSA_WITH_DES_CBC_SHA |
| 323 | * TLS_DHE_RSA_WITH_DES_CBC_SHA |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 324 | * |
| 325 | * Uncomment this macro to enable weak ciphersuites |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 326 | */ |
Paul Bakker | 03b6a46 | 2014-04-17 16:22:31 +0200 | [diff] [blame] | 327 | //#define POLARSSL_ENABLE_WEAK_CIPHERSUITES |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 328 | |
| 329 | /** |
Manuel Pégourié-Gonnard | 01edb10 | 2014-06-24 22:42:34 +0200 | [diff] [blame] | 330 | * \def POLARSSL_REMOVE_ARC4_CIPHERSUITES |
| 331 | * |
| 332 | * Remove RC4 ciphersuites by default in SSL / TLS. |
| 333 | * This flag removes the ciphersuites based on RC4 from the default list as |
| 334 | * returned by ssl_list_ciphersuites(). However, it is still possible to |
| 335 | * enable (some of) them with ssl_set_ciphersuites() by including them |
| 336 | * explicitly. |
| 337 | * |
| 338 | * Uncomment this macro to remove RC4 ciphersuites by default. |
| 339 | */ |
| 340 | //#define POLARSSL_REMOVE_ARC4_CIPHERSUITES |
| 341 | |
| 342 | /** |
Paul Bakker | 5dc6b5f | 2013-06-29 23:26:34 +0200 | [diff] [blame] | 343 | * \def POLARSSL_ECP_XXXX_ENABLED |
| 344 | * |
| 345 | * Enables specific curves within the Elliptic Curve module. |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 346 | * By default all supported curves are enabled. |
Paul Bakker | 5dc6b5f | 2013-06-29 23:26:34 +0200 | [diff] [blame] | 347 | * |
| 348 | * Comment macros to disable the curve and functions for it |
| 349 | */ |
| 350 | #define POLARSSL_ECP_DP_SECP192R1_ENABLED |
| 351 | #define POLARSSL_ECP_DP_SECP224R1_ENABLED |
| 352 | #define POLARSSL_ECP_DP_SECP256R1_ENABLED |
| 353 | #define POLARSSL_ECP_DP_SECP384R1_ENABLED |
| 354 | #define POLARSSL_ECP_DP_SECP521R1_ENABLED |
Manuel Pégourié-Gonnard | ea499a7 | 2014-01-11 15:58:47 +0100 | [diff] [blame] | 355 | #define POLARSSL_ECP_DP_SECP192K1_ENABLED |
Manuel Pégourié-Gonnard | 18e3ec9 | 2014-01-11 15:22:07 +0100 | [diff] [blame] | 356 | #define POLARSSL_ECP_DP_SECP224K1_ENABLED |
Manuel Pégourié-Gonnard | f51c8fc | 2014-01-10 18:17:18 +0100 | [diff] [blame] | 357 | #define POLARSSL_ECP_DP_SECP256K1_ENABLED |
Manuel Pégourié-Gonnard | 8195c1a | 2013-10-07 19:40:41 +0200 | [diff] [blame] | 358 | #define POLARSSL_ECP_DP_BP256R1_ENABLED |
| 359 | #define POLARSSL_ECP_DP_BP384R1_ENABLED |
| 360 | #define POLARSSL_ECP_DP_BP512R1_ENABLED |
Manuel Pégourié-Gonnard | 6615366 | 2013-12-03 14:12:26 +0100 | [diff] [blame] | 361 | //#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet! |
| 362 | #define POLARSSL_ECP_DP_M255_ENABLED |
| 363 | //#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet! |
| 364 | //#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet! |
Paul Bakker | 5dc6b5f | 2013-06-29 23:26:34 +0200 | [diff] [blame] | 365 | |
| 366 | /** |
Manuel Pégourié-Gonnard | c04c530 | 2013-10-23 16:11:52 +0200 | [diff] [blame] | 367 | * \def POLARSSL_ECP_NIST_OPTIM |
| 368 | * |
| 369 | * Enable specific 'modulo p' routines for each NIST prime. |
| 370 | * Depending on the prime and architecture, makes operations 4 to 8 times |
| 371 | * faster on the corresponding curve. |
| 372 | * |
| 373 | * Comment this macro to disable NIST curves optimisation. |
| 374 | */ |
| 375 | #define POLARSSL_ECP_NIST_OPTIM |
| 376 | |
| 377 | /** |
Manuel Pégourié-Gonnard | 461d416 | 2014-01-06 10:16:28 +0100 | [diff] [blame] | 378 | * \def POLARSSL_ECDSA_DETERMINISTIC |
| 379 | * |
| 380 | * Enable deterministic ECDSA (RFC 6979). |
| 381 | * Standard ECDSA is "fragile" in the sense that lack of entropy when signing |
| 382 | * may result in a compromise of the long-term signing key. This is avoided by |
| 383 | * the deterministic variant. |
| 384 | * |
Manuel Pégourié-Gonnard | 7845fc0 | 2014-01-27 14:24:03 +0100 | [diff] [blame] | 385 | * Requires: POLARSSL_HMAC_DRBG_C |
Manuel Pégourié-Gonnard | 5b1a573 | 2014-01-07 16:46:17 +0100 | [diff] [blame] | 386 | * |
Manuel Pégourié-Gonnard | 461d416 | 2014-01-06 10:16:28 +0100 | [diff] [blame] | 387 | * Comment this macro to disable deterministic ECDSA. |
| 388 | */ |
| 389 | #define POLARSSL_ECDSA_DETERMINISTIC |
| 390 | |
| 391 | /** |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 392 | * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED |
| 393 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 394 | * Enable the PSK based ciphersuite modes in SSL / TLS. |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 395 | * |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 396 | * This enables the following ciphersuites (if other requisites are |
| 397 | * enabled as well): |
Paul Bakker | 45bda90 | 2013-04-19 22:28:21 +0200 | [diff] [blame] | 398 | * TLS_PSK_WITH_AES_256_GCM_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 399 | * TLS_PSK_WITH_AES_256_CBC_SHA384 |
| 400 | * TLS_PSK_WITH_AES_256_CBC_SHA |
| 401 | * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 402 | * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 403 | * TLS_PSK_WITH_AES_128_GCM_SHA256 |
| 404 | * TLS_PSK_WITH_AES_128_CBC_SHA256 |
| 405 | * TLS_PSK_WITH_AES_128_CBC_SHA |
| 406 | * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 407 | * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 408 | * TLS_PSK_WITH_3DES_EDE_CBC_SHA |
| 409 | * TLS_PSK_WITH_RC4_128_SHA |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 410 | */ |
| 411 | #define POLARSSL_KEY_EXCHANGE_PSK_ENABLED |
| 412 | |
| 413 | /** |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 414 | * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED |
| 415 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 416 | * Enable the DHE-PSK based ciphersuite modes in SSL / TLS. |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 417 | * |
| 418 | * Requires: POLARSSL_DHM_C |
| 419 | * |
| 420 | * This enables the following ciphersuites (if other requisites are |
| 421 | * enabled as well): |
Paul Bakker | 45bda90 | 2013-04-19 22:28:21 +0200 | [diff] [blame] | 422 | * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 423 | * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 |
| 424 | * TLS_DHE_PSK_WITH_AES_256_CBC_SHA |
| 425 | * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 426 | * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 427 | * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 |
| 428 | * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 |
| 429 | * TLS_DHE_PSK_WITH_AES_128_CBC_SHA |
| 430 | * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 431 | * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 432 | * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA |
| 433 | * TLS_DHE_PSK_WITH_RC4_128_SHA |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 434 | */ |
Paul Bakker | 48f7a5d | 2013-04-19 14:30:58 +0200 | [diff] [blame] | 435 | #define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 436 | |
| 437 | /** |
Manuel Pégourié-Gonnard | 3ce3bbd | 2013-10-11 16:53:50 +0200 | [diff] [blame] | 438 | * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED |
| 439 | * |
| 440 | * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS. |
| 441 | * |
| 442 | * Requires: POLARSSL_ECDH_C |
| 443 | * |
| 444 | * This enables the following ciphersuites (if other requisites are |
| 445 | * enabled as well): |
Manuel Pégourié-Gonnard | 225d6aa | 2013-10-11 19:07:56 +0200 | [diff] [blame] | 446 | * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 447 | * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA |
Manuel Pégourié-Gonnard | 225d6aa | 2013-10-11 19:07:56 +0200 | [diff] [blame] | 448 | * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 449 | * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 |
| 450 | * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA |
| 451 | * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 452 | * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA |
| 453 | * TLS_ECDHE_PSK_WITH_RC4_128_SHA |
Manuel Pégourié-Gonnard | 3ce3bbd | 2013-10-11 16:53:50 +0200 | [diff] [blame] | 454 | */ |
| 455 | #define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED |
| 456 | |
| 457 | /** |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 458 | * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED |
| 459 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 460 | * Enable the RSA-PSK based ciphersuite modes in SSL / TLS. |
Manuel Pégourié-Gonnard | 0fae60b | 2013-10-14 17:39:48 +0200 | [diff] [blame] | 461 | * |
Manuel Pégourié-Gonnard | 1032c1d | 2013-09-18 17:18:34 +0200 | [diff] [blame] | 462 | * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15, |
Manuel Pégourié-Gonnard | cbf3ef3 | 2013-09-23 12:20:02 +0200 | [diff] [blame] | 463 | * POLARSSL_X509_CRT_PARSE_C |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 464 | * |
| 465 | * This enables the following ciphersuites (if other requisites are |
| 466 | * enabled as well): |
Paul Bakker | 45bda90 | 2013-04-19 22:28:21 +0200 | [diff] [blame] | 467 | * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 468 | * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 |
| 469 | * TLS_RSA_PSK_WITH_AES_256_CBC_SHA |
| 470 | * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 471 | * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 472 | * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 |
| 473 | * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 |
| 474 | * TLS_RSA_PSK_WITH_AES_128_CBC_SHA |
| 475 | * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 476 | * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 477 | * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA |
| 478 | * TLS_RSA_PSK_WITH_RC4_128_SHA |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 479 | */ |
Manuel Pégourié-Gonnard | 0fae60b | 2013-10-14 17:39:48 +0200 | [diff] [blame] | 480 | #define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 481 | |
| 482 | /** |
| 483 | * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED |
| 484 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 485 | * Enable the RSA-only based ciphersuite modes in SSL / TLS. |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 486 | * |
Manuel Pégourié-Gonnard | 1032c1d | 2013-09-18 17:18:34 +0200 | [diff] [blame] | 487 | * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15, |
Manuel Pégourié-Gonnard | cbf3ef3 | 2013-09-23 12:20:02 +0200 | [diff] [blame] | 488 | * POLARSSL_X509_CRT_PARSE_C |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 489 | * |
| 490 | * This enables the following ciphersuites (if other requisites are |
| 491 | * enabled as well): |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 492 | * TLS_RSA_WITH_AES_256_GCM_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 493 | * TLS_RSA_WITH_AES_256_CBC_SHA256 |
| 494 | * TLS_RSA_WITH_AES_256_CBC_SHA |
| 495 | * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 496 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 497 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 498 | * TLS_RSA_WITH_AES_128_GCM_SHA256 |
| 499 | * TLS_RSA_WITH_AES_128_CBC_SHA256 |
| 500 | * TLS_RSA_WITH_AES_128_CBC_SHA |
| 501 | * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 502 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 503 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 504 | * TLS_RSA_WITH_3DES_EDE_CBC_SHA |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 505 | * TLS_RSA_WITH_RC4_128_SHA |
| 506 | * TLS_RSA_WITH_RC4_128_MD5 |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 507 | */ |
| 508 | #define POLARSSL_KEY_EXCHANGE_RSA_ENABLED |
| 509 | |
| 510 | /** |
| 511 | * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED |
| 512 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 513 | * Enable the DHE-RSA based ciphersuite modes in SSL / TLS. |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 514 | * |
Manuel Pégourié-Gonnard | 1032c1d | 2013-09-18 17:18:34 +0200 | [diff] [blame] | 515 | * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15, |
Manuel Pégourié-Gonnard | cbf3ef3 | 2013-09-23 12:20:02 +0200 | [diff] [blame] | 516 | * POLARSSL_X509_CRT_PARSE_C |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 517 | * |
| 518 | * This enables the following ciphersuites (if other requisites are |
| 519 | * enabled as well): |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 520 | * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 521 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 522 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA |
| 523 | * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 524 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 525 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 526 | * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 |
| 527 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 |
| 528 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA |
| 529 | * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 530 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 531 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 532 | * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 533 | */ |
| 534 | #define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED |
| 535 | |
| 536 | /** |
| 537 | * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED |
| 538 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 539 | * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS. |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 540 | * |
Manuel Pégourié-Gonnard | 1032c1d | 2013-09-18 17:18:34 +0200 | [diff] [blame] | 541 | * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15, |
Manuel Pégourié-Gonnard | cbf3ef3 | 2013-09-23 12:20:02 +0200 | [diff] [blame] | 542 | * POLARSSL_X509_CRT_PARSE_C |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 543 | * |
| 544 | * This enables the following ciphersuites (if other requisites are |
| 545 | * enabled as well): |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 546 | * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 547 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 |
| 548 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |
| 549 | * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 550 | * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 551 | * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 |
| 552 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 |
| 553 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |
| 554 | * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 555 | * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 556 | * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 557 | * TLS_ECDHE_RSA_WITH_RC4_128_SHA |
Paul Bakker | e07f41d | 2013-04-19 09:08:57 +0200 | [diff] [blame] | 558 | */ |
| 559 | #define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED |
| 560 | |
| 561 | /** |
Manuel Pégourié-Gonnard | 32ea60a | 2013-08-17 17:39:04 +0200 | [diff] [blame] | 562 | * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
| 563 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 564 | * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS. |
Manuel Pégourié-Gonnard | 32ea60a | 2013-08-17 17:39:04 +0200 | [diff] [blame] | 565 | * |
Manuel Pégourié-Gonnard | 1032c1d | 2013-09-18 17:18:34 +0200 | [diff] [blame] | 566 | * 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] | 567 | * |
| 568 | * This enables the following ciphersuites (if other requisites are |
| 569 | * enabled as well): |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 570 | * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 |
| 571 | * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 |
| 572 | * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA |
| 573 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 574 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 575 | * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
| 576 | * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 |
| 577 | * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA |
| 578 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 579 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 580 | * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA |
| 581 | * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA |
Manuel Pégourié-Gonnard | 32ea60a | 2013-08-17 17:39:04 +0200 | [diff] [blame] | 582 | */ |
| 583 | #define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
| 584 | |
| 585 | /** |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 586 | * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED |
| 587 | * |
| 588 | * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS. |
| 589 | * |
| 590 | * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C |
| 591 | * |
| 592 | * This enables the following ciphersuites (if other requisites are |
| 593 | * enabled as well): |
| 594 | * TLS_ECDH_ECDSA_WITH_RC4_128_SHA |
| 595 | * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA |
| 596 | * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA |
| 597 | * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA |
| 598 | * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 |
| 599 | * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 |
| 600 | * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 |
| 601 | * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 |
| 602 | * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 603 | * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 604 | * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 605 | * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 606 | */ |
| 607 | #define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED |
| 608 | |
| 609 | /** |
| 610 | * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED |
| 611 | * |
| 612 | * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS. |
| 613 | * |
| 614 | * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C |
| 615 | * |
| 616 | * This enables the following ciphersuites (if other requisites are |
| 617 | * enabled as well): |
| 618 | * TLS_ECDH_RSA_WITH_RC4_128_SHA |
| 619 | * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA |
| 620 | * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA |
| 621 | * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA |
| 622 | * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 |
| 623 | * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 |
| 624 | * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 |
| 625 | * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 |
| 626 | * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 627 | * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 628 | * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 629 | * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 630 | */ |
| 631 | #define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED |
| 632 | |
| 633 | /** |
Manuel Pégourié-Gonnard | 6fac351 | 2014-03-19 16:39:52 +0100 | [diff] [blame] | 634 | * \def POLARSSL_PK_PARSE_EC_EXTENDED |
| 635 | * |
| 636 | * Enhance support for reading EC keys using variants of SEC1 not allowed by |
| 637 | * RFC 5915 and RFC 5480. |
| 638 | * |
| 639 | * Currently this means parsing the SpecifiedECDomain choice of EC |
| 640 | * parameters (only known groups are supported, not arbitrary domains, to |
| 641 | * avoid validation issues). |
| 642 | * |
| 643 | * Disable if you only need to support RFC 5915 + 5480 key formats. |
| 644 | */ |
| 645 | #define POLARSSL_PK_PARSE_EC_EXTENDED |
| 646 | |
| 647 | /** |
Paul Bakker | e2ab84f | 2013-06-29 18:24:32 +0200 | [diff] [blame] | 648 | * \def POLARSSL_ERROR_STRERROR_BC |
| 649 | * |
| 650 | * Make available the backward compatible error_strerror() next to the |
| 651 | * current polarssl_strerror(). |
| 652 | * |
Manuel Pégourié-Gonnard | dc16aa7 | 2014-06-25 12:55:12 +0200 | [diff] [blame] | 653 | * For new code, it is recommended to use polarssl_strerror() instead and |
Paul Bakker | 237a847 | 2014-06-25 14:45:24 +0200 | [diff] [blame] | 654 | * disable this. |
Manuel Pégourié-Gonnard | dc16aa7 | 2014-06-25 12:55:12 +0200 | [diff] [blame] | 655 | * |
Paul Bakker | e2ab84f | 2013-06-29 18:24:32 +0200 | [diff] [blame] | 656 | * Disable if you run into name conflicts and want to really remove the |
| 657 | * error_strerror() |
| 658 | */ |
| 659 | #define POLARSSL_ERROR_STRERROR_BC |
| 660 | |
| 661 | /** |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 662 | * \def POLARSSL_ERROR_STRERROR_DUMMY |
| 663 | * |
Paul Bakker | eba3ccf | 2013-09-09 15:55:12 +0200 | [diff] [blame] | 664 | * Enable a dummy error function to make use of polarssl_strerror() in |
Manuel Pégourié-Gonnard | dc16aa7 | 2014-06-25 12:55:12 +0200 | [diff] [blame] | 665 | * third party libraries easier when POLARSSL_ERROR_C is disabled |
| 666 | * (no effect when POLARSSL_ERROR_C is enabled). |
| 667 | * |
| 668 | * You can safely disable this if POLARSSL_ERROR_C is enabled, or if you're |
| 669 | * not using polarssl_strerror() or error_strerror() in your application. |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 670 | * |
| 671 | * 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] | 672 | * polarssl_strerror() |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 673 | */ |
| 674 | #define POLARSSL_ERROR_STRERROR_DUMMY |
| 675 | |
| 676 | /** |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 677 | * \def POLARSSL_GENPRIME |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 678 | * |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 679 | * Enable the prime-number generation code. |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 680 | * |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 681 | * Requires: POLARSSL_BIGNUM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 682 | */ |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 683 | #define POLARSSL_GENPRIME |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 684 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 685 | /** |
Paul Bakker | 335db3f | 2011-04-25 15:28:35 +0000 | [diff] [blame] | 686 | * \def POLARSSL_FS_IO |
| 687 | * |
| 688 | * Enable functions that use the filesystem. |
| 689 | */ |
| 690 | #define POLARSSL_FS_IO |
| 691 | |
| 692 | /** |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 693 | * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES |
| 694 | * |
| 695 | * Do not add default entropy sources. These are the platform specific, |
| 696 | * hardclock and HAVEGE based poll functions. |
| 697 | * |
Shuo Chen | 95a0d11 | 2014-04-04 21:04:40 -0700 | [diff] [blame] | 698 | * This is useful to have more control over the added entropy sources in an |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 699 | * application. |
| 700 | * |
| 701 | * Uncomment this macro to prevent loading of default entropy functions. |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 702 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 703 | //#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 704 | |
| 705 | /** |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 706 | * \def POLARSSL_NO_PLATFORM_ENTROPY |
| 707 | * |
| 708 | * Do not use built-in platform entropy functions. |
| 709 | * This is useful if your platform does not support |
| 710 | * standards like the /dev/urandom or Windows CryptoAPI. |
| 711 | * |
| 712 | * Uncomment this macro to disable the built-in platform entropy functions. |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 713 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 714 | //#define POLARSSL_NO_PLATFORM_ENTROPY |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 715 | |
| 716 | /** |
Paul Bakker | 2ceda57 | 2014-02-06 15:55:25 +0100 | [diff] [blame] | 717 | * \def POLARSSL_ENTROPY_FORCE_SHA256 |
| 718 | * |
| 719 | * Force the entropy accumulator to use a SHA-256 accumulator instead of the |
| 720 | * default SHA-512 based one (if both are available). |
| 721 | * |
| 722 | * Requires: POLARSSL_SHA256_C |
| 723 | * |
| 724 | * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option |
| 725 | * if you have performance concerns. |
| 726 | * |
| 727 | * This option is only useful if both POLARSSL_SHA256_C and |
| 728 | * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used. |
| 729 | */ |
| 730 | //#define POLARSSL_ENTROPY_FORCE_SHA256 |
| 731 | |
| 732 | /** |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 733 | * \def POLARSSL_MEMORY_DEBUG |
| 734 | * |
| 735 | * Enable debugging of buffer allocator memory issues. Automatically prints |
| 736 | * (to stderr) all (fatal) messages on memory allocation issues. Enables |
| 737 | * function for 'debug output' of allocated memory. |
| 738 | * |
| 739 | * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 740 | * |
| 741 | * Uncomment this macro to let the buffer allocator print out error messages. |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 742 | */ |
| 743 | //#define POLARSSL_MEMORY_DEBUG |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 744 | |
| 745 | /** |
| 746 | * \def POLARSSL_MEMORY_BACKTRACE |
| 747 | * |
| 748 | * Include backtrace information with each allocated block. |
| 749 | * |
| 750 | * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C |
| 751 | * GLIBC-compatible backtrace() an backtrace_symbols() support |
| 752 | * |
| 753 | * Uncomment this macro to include backtrace information |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 754 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 755 | //#define POLARSSL_MEMORY_BACKTRACE |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 756 | |
| 757 | /** |
Paul Bakker | 48377d9 | 2013-08-30 12:06:24 +0200 | [diff] [blame] | 758 | * \def POLARSSL_PKCS1_V15 |
| 759 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 760 | * Enable support for PKCS#1 v1.5 encoding. |
| 761 | * |
Paul Bakker | 48377d9 | 2013-08-30 12:06:24 +0200 | [diff] [blame] | 762 | * Requires: POLARSSL_RSA_C |
| 763 | * |
Paul Bakker | 48377d9 | 2013-08-30 12:06:24 +0200 | [diff] [blame] | 764 | * This enables support for PKCS#1 v1.5 operations. |
| 765 | */ |
| 766 | #define POLARSSL_PKCS1_V15 |
| 767 | |
| 768 | /** |
Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 769 | * \def POLARSSL_PKCS1_V21 |
| 770 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 771 | * Enable support for PKCS#1 v2.1 encoding. |
| 772 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 773 | * Requires: POLARSSL_MD_C, POLARSSL_RSA_C |
| 774 | * |
Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 775 | * This enables support for RSAES-OAEP and RSASSA-PSS operations. |
| 776 | */ |
| 777 | #define POLARSSL_PKCS1_V21 |
| 778 | |
| 779 | /** |
Paul Bakker | 0216cc1 | 2011-03-26 13:40:23 +0000 | [diff] [blame] | 780 | * \def POLARSSL_RSA_NO_CRT |
| 781 | * |
| 782 | * Do not use the Chinese Remainder Theorem for the RSA private operation. |
| 783 | * |
| 784 | * Uncomment this macro to disable the use of CRT in RSA. |
| 785 | * |
Paul Bakker | 0216cc1 | 2011-03-26 13:40:23 +0000 | [diff] [blame] | 786 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 787 | //#define POLARSSL_RSA_NO_CRT |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 788 | |
| 789 | /** |
| 790 | * \def POLARSSL_SELF_TEST |
| 791 | * |
| 792 | * Enable the checkup functions (*_self_test). |
| 793 | */ |
| 794 | #define POLARSSL_SELF_TEST |
Paul Bakker | 5c721f9 | 2011-07-27 16:51:09 +0000 | [diff] [blame] | 795 | |
| 796 | /** |
Manuel Pégourié-Gonnard | d056ce0 | 2014-10-29 22:29:20 +0100 | [diff] [blame] | 797 | * \def POLARSSL_SSL_AEAD_RANDOM_IV |
| 798 | * |
| 799 | * Generate a random IV rather than using the record sequence number as a |
| 800 | * nonce for ciphersuites using and AEAD algorithm (GCM or CCM). |
| 801 | * |
| 802 | * Using the sequence number is generally recommended. |
| 803 | * |
| 804 | * Uncomment this macro to always use random IVs with AEAD ciphersuites. |
| 805 | */ |
| 806 | //#define POLARSSL_SSL_AEAD_RANDOM_IV |
| 807 | |
| 808 | /** |
Paul Bakker | 40865c8 | 2013-01-31 17:13:13 +0100 | [diff] [blame] | 809 | * \def POLARSSL_SSL_ALL_ALERT_MESSAGES |
| 810 | * |
| 811 | * Enable sending of alert messages in case of encountered errors as per RFC. |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 812 | * If you choose not to send the alert messages, mbed TLS can still communicate |
Paul Bakker | 40865c8 | 2013-01-31 17:13:13 +0100 | [diff] [blame] | 813 | * with other servers, only debugging of failures is harder. |
| 814 | * |
| 815 | * The advantage of not sending alert messages, is that no information is given |
| 816 | * about reasons for failures thus preventing adversaries of gaining intel. |
| 817 | * |
| 818 | * Enable sending of all alert messages |
| 819 | */ |
| 820 | #define POLARSSL_SSL_ALERT_MESSAGES |
| 821 | |
| 822 | /** |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 823 | * \def POLARSSL_SSL_DEBUG_ALL |
| 824 | * |
| 825 | * Enable the debug messages in SSL module for all issues. |
| 826 | * Debug messages have been disabled in some places to prevent timing |
| 827 | * attacks due to (unbalanced) debugging function calls. |
| 828 | * |
| 829 | * If you need all error reporting you should enable this during debugging, |
| 830 | * but remove this for production servers that should log as well. |
| 831 | * |
| 832 | * Uncomment this macro to report all debug messages on errors introducing |
| 833 | * a timing side-channel. |
| 834 | * |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 835 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 836 | //#define POLARSSL_SSL_DEBUG_ALL |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 837 | |
Manuel Pégourié-Gonnard | 699cafa | 2014-10-27 13:57:03 +0100 | [diff] [blame] | 838 | /** \def POLARSSL_SSL_ENCRYPT_THEN_MAC |
| 839 | * |
| 840 | * Enable support for Encrypt-then-MAC, RFC 7366. |
| 841 | * |
| 842 | * This allows peers that both support it to use a more robust protection for |
| 843 | * ciphersuites using CBC, providing deep resistance against timing attacks |
| 844 | * on the padding or underlying cipher. |
| 845 | * |
| 846 | * This only affects CBC ciphersuites, and is useless if none is defined. |
| 847 | * |
| 848 | * Requires: POLARSSL_SSL_PROTO_TLS1 or |
| 849 | * POLARSSL_SSL_PROTO_TLS1_1 or |
| 850 | * POLARSSL_SSL_PROTO_TLS1_2 |
| 851 | * |
| 852 | * Comment this macro to disable support for Encrypt-then-MAC |
| 853 | */ |
| 854 | #define POLARSSL_SSL_ENCRYPT_THEN_MAC |
| 855 | |
Manuel Pégourié-Gonnard | 367381f | 2014-10-20 18:40:56 +0200 | [diff] [blame] | 856 | /** \def POLARSSL_SSL_EXTENDED_MASTER_SECRET |
| 857 | * |
| 858 | * Enable support for Extended Master Secret, aka Session Hash |
| 859 | * (draft-ietf-tls-session-hash-02). |
| 860 | * |
| 861 | * This was introduced as "the proper fix" to the Triple Handshake familiy of |
| 862 | * attacks, but it is recommended to always use it (even if you disable |
| 863 | * renegotiation), since it actually fixes a more fundamental issue in the |
| 864 | * original SSL/TLS design, and has implications beyond Triple Handshake. |
| 865 | * |
Manuel Pégourié-Gonnard | 769c6b6 | 2014-10-28 14:13:55 +0100 | [diff] [blame] | 866 | * Requires: POLARSSL_SSL_PROTO_TLS1 or |
| 867 | * POLARSSL_SSL_PROTO_TLS1_1 or |
| 868 | * POLARSSL_SSL_PROTO_TLS1_2 |
| 869 | * |
Manuel Pégourié-Gonnard | 367381f | 2014-10-20 18:40:56 +0200 | [diff] [blame] | 870 | * Comment this macro to disable support for Extended Master Secret. |
| 871 | */ |
| 872 | #define POLARSSL_SSL_EXTENDED_MASTER_SECRET |
| 873 | |
Paul Bakker | d66f070 | 2013-01-31 16:57:45 +0100 | [diff] [blame] | 874 | /** |
Manuel Pégourié-Gonnard | 1cbd39d | 2014-10-20 13:34:59 +0200 | [diff] [blame] | 875 | * \def POLARSSL_SSL_FALLBACK_SCSV |
| 876 | * |
| 877 | * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00). |
| 878 | * |
| 879 | * For servers, it is recommended to always enable this, unless you support |
| 880 | * only one version of TLS, or know for sure that none of your clients |
| 881 | * implements a fallback strategy. |
| 882 | * |
| 883 | * For clients, you only need this if you're using a fallback strategy, which |
| 884 | * is not recommended in the first place, unless you absolutely need it to |
| 885 | * interoperate with buggy (version-intolerant) servers. |
| 886 | * |
| 887 | * Comment this macro to disable support for FALLBACK_SCSV |
| 888 | */ |
| 889 | #define POLARSSL_SSL_FALLBACK_SCSV |
| 890 | |
| 891 | /** |
Paul Bakker | 05ef835 | 2012-05-08 09:17:57 +0000 | [diff] [blame] | 892 | * \def POLARSSL_SSL_HW_RECORD_ACCEL |
| 893 | * |
| 894 | * Enable hooking functions in SSL module for hardware acceleration of |
| 895 | * individual records. |
| 896 | * |
| 897 | * Uncomment this macro to enable hooking functions. |
Paul Bakker | 05ef835 | 2012-05-08 09:17:57 +0000 | [diff] [blame] | 898 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 899 | //#define POLARSSL_SSL_HW_RECORD_ACCEL |
Paul Bakker | 05ef835 | 2012-05-08 09:17:57 +0000 | [diff] [blame] | 900 | |
| 901 | /** |
Manuel Pégourié-Gonnard | d76314c | 2015-01-07 12:39:44 +0100 | [diff] [blame] | 902 | * \def POLARSSL_SSL_CBC_RECORD_SPLITTING |
| 903 | * |
| 904 | * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0. |
| 905 | * |
| 906 | * This is a countermeasure to the BEAST attack, which also minimizes the risk |
| 907 | * of interoperability issues compared to sending 0-length records. |
| 908 | * |
| 909 | * Comment this macro to disable 1/n-1 record splitting. |
| 910 | */ |
| 911 | #define POLARSSL_SSL_CBC_RECORD_SPLITTING |
| 912 | |
| 913 | /** |
Manuel Pégourié-Gonnard | 0371704 | 2014-11-04 19:52:10 +0100 | [diff] [blame] | 914 | * \def POLARSSL_SSL_DISABLE_RENEGOTIATION |
Manuel Pégourié-Gonnard | 615e677 | 2014-11-03 08:23:14 +0100 | [diff] [blame] | 915 | * |
Manuel Pégourié-Gonnard | 0371704 | 2014-11-04 19:52:10 +0100 | [diff] [blame] | 916 | * Disable support for TLS renegotiation. |
Manuel Pégourié-Gonnard | 615e677 | 2014-11-03 08:23:14 +0100 | [diff] [blame] | 917 | * |
| 918 | * The two main uses of renegotiation are (1) refresh keys on long-lived |
| 919 | * connections and (2) client authentication after the initial handshake. |
| 920 | * If you don't need renegotiation, it's probably better to disable it, since |
| 921 | * it has been associated with security issues in the past and is easy to |
| 922 | * misuse/misunderstand. |
Manuel Pégourié-Gonnard | 0371704 | 2014-11-04 19:52:10 +0100 | [diff] [blame] | 923 | * |
| 924 | * Warning: in the next stable branch, this switch will be replaced by |
| 925 | * POLARSSL_SSL_RENEGOTIATION to enable support for renegotiation. |
| 926 | * |
| 927 | * Uncomment this to disable support for renegotiation. |
Manuel Pégourié-Gonnard | 615e677 | 2014-11-03 08:23:14 +0100 | [diff] [blame] | 928 | */ |
Manuel Pégourié-Gonnard | 0371704 | 2014-11-04 19:52:10 +0100 | [diff] [blame] | 929 | //#define POLARSSL_SSL_DISABLE_RENEGOTIATION |
Manuel Pégourié-Gonnard | 615e677 | 2014-11-03 08:23:14 +0100 | [diff] [blame] | 930 | |
| 931 | /** |
Paul Bakker | 78a8c71 | 2013-03-06 17:01:52 +0100 | [diff] [blame] | 932 | * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO |
| 933 | * |
| 934 | * 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] | 935 | * SSL Server module (POLARSSL_SSL_SRV_C). |
Paul Bakker | 78a8c71 | 2013-03-06 17:01:52 +0100 | [diff] [blame] | 936 | * |
| 937 | * Comment this macro to disable support for SSLv2 Client Hello messages. |
| 938 | */ |
| 939 | #define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO |
| 940 | |
| 941 | /** |
Manuel Pégourié-Gonnard | 1a9f2c7 | 2013-11-30 18:30:06 +0100 | [diff] [blame] | 942 | * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE |
| 943 | * |
| 944 | * Pick the ciphersuite according to the client's preferences rather than ours |
| 945 | * in the SSL Server module (POLARSSL_SSL_SRV_C). |
| 946 | * |
| 947 | * Uncomment this macro to respect client's ciphersuite order |
| 948 | */ |
| 949 | //#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE |
| 950 | |
| 951 | /** |
Paul Bakker | 05decb2 | 2013-08-15 13:33:48 +0200 | [diff] [blame] | 952 | * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH |
| 953 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 954 | * Enable support for RFC 6066 max_fragment_length extension in SSL. |
Paul Bakker | 05decb2 | 2013-08-15 13:33:48 +0200 | [diff] [blame] | 955 | * |
| 956 | * Comment this macro to disable support for the max_fragment_length extension |
| 957 | */ |
| 958 | #define POLARSSL_SSL_MAX_FRAGMENT_LENGTH |
| 959 | |
| 960 | /** |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 961 | * \def POLARSSL_SSL_PROTO_SSL3 |
| 962 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 963 | * Enable support for SSL 3.0. |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 964 | * |
| 965 | * Requires: POLARSSL_MD5_C |
| 966 | * POLARSSL_SHA1_C |
| 967 | * |
| 968 | * Comment this macro to disable support for SSL 3.0 |
| 969 | */ |
| 970 | #define POLARSSL_SSL_PROTO_SSL3 |
| 971 | |
| 972 | /** |
| 973 | * \def POLARSSL_SSL_PROTO_TLS1 |
| 974 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 975 | * Enable support for TLS 1.0. |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 976 | * |
| 977 | * Requires: POLARSSL_MD5_C |
| 978 | * POLARSSL_SHA1_C |
| 979 | * |
| 980 | * Comment this macro to disable support for TLS 1.0 |
| 981 | */ |
| 982 | #define POLARSSL_SSL_PROTO_TLS1 |
| 983 | |
| 984 | /** |
| 985 | * \def POLARSSL_SSL_PROTO_TLS1_1 |
| 986 | * |
Manuel Pégourié-Gonnard | 0b1ff29 | 2014-02-06 13:04:16 +0100 | [diff] [blame] | 987 | * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled). |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 988 | * |
| 989 | * Requires: POLARSSL_MD5_C |
| 990 | * POLARSSL_SHA1_C |
| 991 | * |
Manuel Pégourié-Gonnard | 0b1ff29 | 2014-02-06 13:04:16 +0100 | [diff] [blame] | 992 | * Comment this macro to disable support for TLS 1.1 / DTLS 1.0 |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 993 | */ |
| 994 | #define POLARSSL_SSL_PROTO_TLS1_1 |
| 995 | |
| 996 | /** |
| 997 | * \def POLARSSL_SSL_PROTO_TLS1_2 |
| 998 | * |
Manuel Pégourié-Gonnard | 0b1ff29 | 2014-02-06 13:04:16 +0100 | [diff] [blame] | 999 | * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled). |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 1000 | * |
Manuel Pégourié-Gonnard | 7c3291e | 2013-10-27 14:29:51 +0100 | [diff] [blame] | 1001 | * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 1002 | * (Depends on ciphersuites) |
| 1003 | * |
Manuel Pégourié-Gonnard | 0b1ff29 | 2014-02-06 13:04:16 +0100 | [diff] [blame] | 1004 | * Comment this macro to disable support for TLS 1.2 / DTLS 1.2 |
Paul Bakker | d2f068e | 2013-08-27 21:19:20 +0200 | [diff] [blame] | 1005 | */ |
| 1006 | #define POLARSSL_SSL_PROTO_TLS1_2 |
| 1007 | |
| 1008 | /** |
Manuel Pégourié-Gonnard | 0b1ff29 | 2014-02-06 13:04:16 +0100 | [diff] [blame] | 1009 | * \def POLARSSL_SSL_PROTO_DTLS |
| 1010 | * |
| 1011 | * Enable support for DTLS (all available versions). |
| 1012 | * |
| 1013 | * Enable this and POLARSSL_SSL_PROTO_TLS1_1 to enable DTLS 1.0, |
| 1014 | * and/or this and POLARSSL_SSL_PROTO_TLS1_2 to enable DTLS 1.2. |
| 1015 | * |
| 1016 | * Requires: POLARSSL_SSL_PROTO_TLS1_1 |
| 1017 | * or POLARSSL_SSL_PROTO_TLS1_2 |
Manuel Pégourié-Gonnard | 8e704f0 | 2014-10-14 20:03:35 +0200 | [diff] [blame] | 1018 | * POLARSSL_TIMING_C |
| 1019 | * |
| 1020 | * \note Dependency on TIMING_C may be replaced by something more flexible |
| 1021 | * (callbacks or abstraction layer in the next major version). Please contact |
| 1022 | * us if you're having issues with this dependency. |
Manuel Pégourié-Gonnard | 0b1ff29 | 2014-02-06 13:04:16 +0100 | [diff] [blame] | 1023 | * |
| 1024 | * Comment this macro to disable support for DTLS |
| 1025 | */ |
| 1026 | #define POLARSSL_SSL_PROTO_DTLS |
| 1027 | |
| 1028 | /** |
Manuel Pégourié-Gonnard | 7e250d4 | 2014-04-04 16:08:41 +0200 | [diff] [blame] | 1029 | * \def POLARSSL_SSL_ALPN |
| 1030 | * |
Manuel Pégourié-Gonnard | 6b298e6 | 2014-11-20 18:28:50 +0100 | [diff] [blame] | 1031 | * Enable support for RFC 7301 Application Layer Protocol Negotiation. |
Manuel Pégourié-Gonnard | 7e250d4 | 2014-04-04 16:08:41 +0200 | [diff] [blame] | 1032 | * |
Paul Bakker | 27e36d3 | 2014-04-08 12:33:37 +0200 | [diff] [blame] | 1033 | * Comment this macro to disable support for ALPN. |
Manuel Pégourié-Gonnard | 7e250d4 | 2014-04-04 16:08:41 +0200 | [diff] [blame] | 1034 | */ |
Paul Bakker | 27e36d3 | 2014-04-08 12:33:37 +0200 | [diff] [blame] | 1035 | #define POLARSSL_SSL_ALPN |
Manuel Pégourié-Gonnard | 7e250d4 | 2014-04-04 16:08:41 +0200 | [diff] [blame] | 1036 | |
| 1037 | /** |
Manuel Pégourié-Gonnard | 8464a46 | 2014-09-24 14:05:32 +0200 | [diff] [blame] | 1038 | * \def POLARSSL_SSL_DTLS_ANTI_REPLAY |
| 1039 | * |
| 1040 | * Enable support for the anti-replay mechanism in DTLS. |
| 1041 | * |
| 1042 | * Requires: POLARSSL_SSL_TLS_C |
Manuel Pégourié-Gonnard | b0643d1 | 2014-10-14 18:30:36 +0200 | [diff] [blame] | 1043 | * POLARSSL_SSL_PROTO_DTLS |
Manuel Pégourié-Gonnard | 8464a46 | 2014-09-24 14:05:32 +0200 | [diff] [blame] | 1044 | * |
Manuel Pégourié-Gonnard | a6fcffe | 2014-10-13 18:15:52 +0200 | [diff] [blame] | 1045 | * \warning Disabling this is often a security risk! |
| 1046 | * See ssl_set_dtls_anti_replay() for details. |
| 1047 | * |
Manuel Pégourié-Gonnard | 8464a46 | 2014-09-24 14:05:32 +0200 | [diff] [blame] | 1048 | * Comment this to disable anti-replay in DTLS. |
| 1049 | */ |
| 1050 | #define POLARSSL_SSL_DTLS_ANTI_REPLAY |
| 1051 | |
| 1052 | /** |
Manuel Pégourié-Gonnard | 82202f0 | 2014-07-23 00:28:58 +0200 | [diff] [blame] | 1053 | * \def POLARSSL_SSL_DTLS_HELLO_VERIFY |
| 1054 | * |
| 1055 | * Enable support for HelloVerifyRequest on DTLS servers. |
| 1056 | * |
| 1057 | * This feature is highly recommended to prevent DTLS servers being used as |
| 1058 | * amplifiers in DoS attacks against other hosts. It should always be enabled |
| 1059 | * unless you know for sure amplification cannot be a problem in the |
| 1060 | * environment in which your server operates. |
| 1061 | * |
Manuel Pégourié-Gonnard | a6fcffe | 2014-10-13 18:15:52 +0200 | [diff] [blame] | 1062 | * \warning Disabling this can ba a security risk! (see above) |
| 1063 | * |
Manuel Pégourié-Gonnard | 82202f0 | 2014-07-23 00:28:58 +0200 | [diff] [blame] | 1064 | * Requires: POLARSSL_SSL_SRV_C |
Manuel Pégourié-Gonnard | b0643d1 | 2014-10-14 18:30:36 +0200 | [diff] [blame] | 1065 | * POLARSSL_SSL_PROTO_DTLS |
Manuel Pégourié-Gonnard | 82202f0 | 2014-07-23 00:28:58 +0200 | [diff] [blame] | 1066 | * |
| 1067 | * Comment this to disable support for HelloVerifyRequest. |
| 1068 | */ |
| 1069 | #define POLARSSL_SSL_DTLS_HELLO_VERIFY |
| 1070 | |
| 1071 | /** |
Manuel Pégourié-Gonnard | b0643d1 | 2014-10-14 18:30:36 +0200 | [diff] [blame] | 1072 | * \def POLARSSL_SSL_DTLS_BADMAC_LIMIT |
| 1073 | * |
| 1074 | * Enable support for a limit of records with bad MAC. |
| 1075 | * |
| 1076 | * See ssl_set_dtls_badmac_limit(). |
| 1077 | * |
| 1078 | * Requires: POLARSSL_SSL_PROTO_DTLS |
| 1079 | */ |
| 1080 | #define POLARSSL_SSL_DTLS_BADMAC_LIMIT |
| 1081 | |
| 1082 | /** |
Paul Bakker | a503a63 | 2013-08-14 13:48:06 +0200 | [diff] [blame] | 1083 | * \def POLARSSL_SSL_SESSION_TICKETS |
| 1084 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1085 | * Enable support for RFC 5077 session tickets in SSL. |
Paul Bakker | a503a63 | 2013-08-14 13:48:06 +0200 | [diff] [blame] | 1086 | * |
| 1087 | * Requires: POLARSSL_AES_C |
| 1088 | * POLARSSL_SHA256_C |
Manuel Pégourié-Gonnard | 92cb1d3 | 2013-09-13 16:24:20 +0200 | [diff] [blame] | 1089 | * POLARSSL_CIPHER_MODE_CBC |
Paul Bakker | a503a63 | 2013-08-14 13:48:06 +0200 | [diff] [blame] | 1090 | * |
| 1091 | * Comment this macro to disable support for SSL session tickets |
| 1092 | */ |
| 1093 | #define POLARSSL_SSL_SESSION_TICKETS |
| 1094 | |
| 1095 | /** |
Paul Bakker | 0be444a | 2013-08-27 21:55:01 +0200 | [diff] [blame] | 1096 | * \def POLARSSL_SSL_SERVER_NAME_INDICATION |
| 1097 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1098 | * Enable support for RFC 6066 server name indication (SNI) in SSL. |
Paul Bakker | 0be444a | 2013-08-27 21:55:01 +0200 | [diff] [blame] | 1099 | * |
Manuel Pégourié-Gonnard | bbbb3cf | 2015-01-28 16:44:37 +0000 | [diff] [blame] | 1100 | * Requires: POLARSSL_X509_CRT_PARSE_C |
| 1101 | * |
Paul Bakker | 0be444a | 2013-08-27 21:55:01 +0200 | [diff] [blame] | 1102 | * Comment this macro to disable support for server name indication in SSL |
| 1103 | */ |
| 1104 | #define POLARSSL_SSL_SERVER_NAME_INDICATION |
| 1105 | |
| 1106 | /** |
Paul Bakker | 1f2bc62 | 2013-08-15 13:45:55 +0200 | [diff] [blame] | 1107 | * \def POLARSSL_SSL_TRUNCATED_HMAC |
| 1108 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1109 | * Enable support for RFC 6066 truncated HMAC in SSL. |
Paul Bakker | 1f2bc62 | 2013-08-15 13:45:55 +0200 | [diff] [blame] | 1110 | * |
| 1111 | * Comment this macro to disable support for truncated HMAC in SSL |
| 1112 | */ |
| 1113 | #define POLARSSL_SSL_TRUNCATED_HMAC |
| 1114 | |
| 1115 | /** |
Manuel Pégourié-Gonnard | de05390 | 2014-02-04 13:58:39 +0100 | [diff] [blame] | 1116 | * \def POLARSSL_SSL_SET_CURVES |
Manuel Pégourié-Gonnard | 5de2580 | 2014-02-03 15:56:49 +0100 | [diff] [blame] | 1117 | * |
Manuel Pégourié-Gonnard | de05390 | 2014-02-04 13:58:39 +0100 | [diff] [blame] | 1118 | * Enable ssl_set_curves(). |
Manuel Pégourié-Gonnard | 5de2580 | 2014-02-03 15:56:49 +0100 | [diff] [blame] | 1119 | * |
| 1120 | * This is disabled by default since it breaks binary compatibility with the |
| 1121 | * 1.3.x line. If you choose to enable it, you will need to rebuild your |
| 1122 | * application against the new header files, relinking will not be enough. |
| 1123 | * It will be enabled by default, or no longer an option, in the 1.4 branch. |
| 1124 | * |
Manuel Pégourié-Gonnard | de05390 | 2014-02-04 13:58:39 +0100 | [diff] [blame] | 1125 | * Uncomment to make ssl_set_curves() available. |
Manuel Pégourié-Gonnard | 5de2580 | 2014-02-03 15:56:49 +0100 | [diff] [blame] | 1126 | */ |
Manuel Pégourié-Gonnard | 7926570 | 2014-02-06 10:23:14 +0100 | [diff] [blame] | 1127 | //#define POLARSSL_SSL_SET_CURVES |
Manuel Pégourié-Gonnard | 5de2580 | 2014-02-03 15:56:49 +0100 | [diff] [blame] | 1128 | |
| 1129 | /** |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1130 | * \def POLARSSL_THREADING_ALT |
| 1131 | * |
| 1132 | * Provide your own alternate threading implementation. |
| 1133 | * |
| 1134 | * Requires: POLARSSL_THREADING_C |
| 1135 | * |
| 1136 | * Uncomment this to allow your own alternate threading implementation. |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1137 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1138 | //#define POLARSSL_THREADING_ALT |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1139 | |
| 1140 | /** |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1141 | * \def POLARSSL_THREADING_PTHREAD |
| 1142 | * |
| 1143 | * Enable the pthread wrapper layer for the threading layer. |
| 1144 | * |
| 1145 | * Requires: POLARSSL_THREADING_C |
| 1146 | * |
| 1147 | * Uncomment this to enable pthread mutexes. |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1148 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1149 | //#define POLARSSL_THREADING_PTHREAD |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1150 | |
| 1151 | /** |
Paul Bakker | 0f90d7d | 2014-04-30 11:49:44 +0200 | [diff] [blame] | 1152 | * \def POLARSSL_VERSION_FEATURES |
| 1153 | * |
| 1154 | * Allow run-time checking of compile-time enabled features. Thus allowing users |
| 1155 | * to check at run-time if the library is for instance compiled with threading |
| 1156 | * support via version_check_feature(). |
| 1157 | * |
| 1158 | * Requires: POLARSSL_VERSION_C |
| 1159 | * |
| 1160 | * Comment this to disable run-time checking and save ROM space |
| 1161 | */ |
| 1162 | #define POLARSSL_VERSION_FEATURES |
| 1163 | |
| 1164 | /** |
Paul Bakker | c27c4e2 | 2013-09-23 15:01:36 +0200 | [diff] [blame] | 1165 | * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3 |
| 1166 | * |
| 1167 | * If set, the X509 parser will not break-off when parsing an X509 certificate |
| 1168 | * and encountering an extension in a v1 or v2 certificate. |
| 1169 | * |
| 1170 | * Uncomment to prevent an error. |
Paul Bakker | c27c4e2 | 2013-09-23 15:01:36 +0200 | [diff] [blame] | 1171 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1172 | //#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3 |
Paul Bakker | c27c4e2 | 2013-09-23 15:01:36 +0200 | [diff] [blame] | 1173 | |
| 1174 | /** |
Paul Bakker | 5c721f9 | 2011-07-27 16:51:09 +0000 | [diff] [blame] | 1175 | * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION |
| 1176 | * |
| 1177 | * If set, the X509 parser will not break-off when parsing an X509 certificate |
| 1178 | * and encountering an unknown critical extension. |
| 1179 | * |
| 1180 | * Uncomment to prevent an error. |
Paul Bakker | 5c721f9 | 2011-07-27 16:51:09 +0000 | [diff] [blame] | 1181 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1182 | //#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION |
Paul Bakker | 2770fbd | 2012-07-03 13:30:23 +0000 | [diff] [blame] | 1183 | |
| 1184 | /** |
Manuel Pégourié-Gonnard | 603116c | 2014-04-09 09:50:03 +0200 | [diff] [blame] | 1185 | * \def POLARSSL_X509_CHECK_KEY_USAGE |
| 1186 | * |
| 1187 | * Enable verification of the keyUsage extension (CA and leaf certificates). |
| 1188 | * |
| 1189 | * Disabling this avoids problems with mis-issued and/or misused |
| 1190 | * (intermediate) CA and leaf certificates. |
| 1191 | * |
| 1192 | * \warning Depending on your PKI use, disabling this can be a security risk! |
| 1193 | * |
| 1194 | * Comment to skip keyUsage checking for both CA and leaf certificates. |
| 1195 | */ |
| 1196 | #define POLARSSL_X509_CHECK_KEY_USAGE |
| 1197 | |
| 1198 | /** |
Manuel Pégourié-Gonnard | 7afb8a0 | 2014-04-10 17:53:56 +0200 | [diff] [blame] | 1199 | * \def POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE |
| 1200 | * |
| 1201 | * Enable verification of the extendedKeyUsage extension (leaf certificates). |
| 1202 | * |
| 1203 | * Disabling this avoids problems with mis-issued and/or misused certificates. |
| 1204 | * |
| 1205 | * \warning Depending on your PKI use, disabling this can be a security risk! |
| 1206 | * |
| 1207 | * Comment to skip extendedKeyUsage checking for certificates. |
| 1208 | */ |
| 1209 | #define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE |
| 1210 | |
| 1211 | /** |
Manuel Pégourié-Gonnard | d1539b1 | 2014-06-06 16:42:37 +0200 | [diff] [blame] | 1212 | * \def POLARSSL_X509_RSASSA_PSS_SUPPORT |
| 1213 | * |
| 1214 | * Enable parsing and verification of X.509 certificates, CRLs and CSRS |
| 1215 | * signed with RSASSA-PSS (aka PKCS#1 v2.1). |
| 1216 | * |
| 1217 | * Comment this macro to disallow using RSASSA-PSS in certificates. |
| 1218 | */ |
| 1219 | #define POLARSSL_X509_RSASSA_PSS_SUPPORT |
| 1220 | |
| 1221 | /** |
Paul Bakker | 2770fbd | 2012-07-03 13:30:23 +0000 | [diff] [blame] | 1222 | * \def POLARSSL_ZLIB_SUPPORT |
| 1223 | * |
| 1224 | * If set, the SSL/TLS module uses ZLIB to support compression and |
| 1225 | * decompression of packet data. |
| 1226 | * |
Manuel Pégourié-Gonnard | bb4dd37 | 2014-03-11 10:30:38 +0100 | [diff] [blame] | 1227 | * \warning TLS-level compression MAY REDUCE SECURITY! See for example the |
| 1228 | * CRIME attack. Before enabling this option, you should examine with care if |
| 1229 | * CRIME or similar exploits may be a applicable to your use case. |
| 1230 | * |
Manuel Pégourié-Gonnard | a0e1632 | 2014-07-14 17:38:41 +0200 | [diff] [blame] | 1231 | * \note Currently compression can't bu used with DTLS. |
| 1232 | * |
Paul Bakker | 2770fbd | 2012-07-03 13:30:23 +0000 | [diff] [blame] | 1233 | * Used in: library/ssl_tls.c |
| 1234 | * library/ssl_cli.c |
| 1235 | * library/ssl_srv.c |
| 1236 | * |
| 1237 | * This feature requires zlib library and headers to be present. |
| 1238 | * |
| 1239 | * Uncomment to enable use of ZLIB |
Paul Bakker | 2770fbd | 2012-07-03 13:30:23 +0000 | [diff] [blame] | 1240 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1241 | //#define POLARSSL_ZLIB_SUPPORT |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 1242 | /* \} name SECTION: mbed TLS feature support */ |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 1243 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1244 | /** |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 1245 | * \name SECTION: mbed TLS modules |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 1246 | * |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 1247 | * This section enables or disables entire modules in mbed TLS |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 1248 | * \{ |
| 1249 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1250 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1251 | /** |
Manuel Pégourié-Gonnard | 92ac76f | 2013-12-16 17:12:53 +0100 | [diff] [blame] | 1252 | * \def POLARSSL_AESNI_C |
| 1253 | * |
| 1254 | * Enable AES-NI support on x86-64. |
| 1255 | * |
| 1256 | * Module: library/aesni.c |
| 1257 | * Caller: library/aes.c |
| 1258 | * |
| 1259 | * Requires: POLARSSL_HAVE_ASM |
| 1260 | * |
| 1261 | * This modules adds support for the AES-NI instructions on x86-64 |
| 1262 | */ |
| 1263 | #define POLARSSL_AESNI_C |
| 1264 | |
| 1265 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1266 | * \def POLARSSL_AES_C |
| 1267 | * |
| 1268 | * Enable the AES block cipher. |
| 1269 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1270 | * Module: library/aes.c |
| 1271 | * Caller: library/ssl_tls.c |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1272 | * library/pem.c |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 1273 | * library/ctr_drbg.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1274 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 1275 | * This module enables the following ciphersuites (if other requisites are |
| 1276 | * enabled as well): |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 1277 | * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA |
| 1278 | * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA |
| 1279 | * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA |
| 1280 | * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA |
| 1281 | * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 |
| 1282 | * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 |
| 1283 | * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 |
| 1284 | * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 |
| 1285 | * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 |
| 1286 | * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 |
| 1287 | * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 |
| 1288 | * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1289 | * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 |
| 1290 | * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 |
| 1291 | * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 |
| 1292 | * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 |
| 1293 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 1294 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1295 | * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 1296 | * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1297 | * TLS_DHE_RSA_WITH_AES_256_CBC_SHA |
| 1298 | * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
| 1299 | * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 |
| 1300 | * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 |
| 1301 | * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 |
| 1302 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 |
| 1303 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 |
| 1304 | * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA |
| 1305 | * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |
| 1306 | * TLS_DHE_RSA_WITH_AES_128_CBC_SHA |
| 1307 | * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 |
| 1308 | * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 |
| 1309 | * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 |
| 1310 | * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA |
| 1311 | * TLS_DHE_PSK_WITH_AES_256_CBC_SHA |
| 1312 | * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 |
| 1313 | * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 |
| 1314 | * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 |
| 1315 | * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA |
| 1316 | * TLS_DHE_PSK_WITH_AES_128_CBC_SHA |
| 1317 | * TLS_RSA_WITH_AES_256_GCM_SHA384 |
| 1318 | * TLS_RSA_WITH_AES_256_CBC_SHA256 |
| 1319 | * TLS_RSA_WITH_AES_256_CBC_SHA |
| 1320 | * TLS_RSA_WITH_AES_128_GCM_SHA256 |
| 1321 | * TLS_RSA_WITH_AES_128_CBC_SHA256 |
| 1322 | * TLS_RSA_WITH_AES_128_CBC_SHA |
| 1323 | * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 |
| 1324 | * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 |
| 1325 | * TLS_RSA_PSK_WITH_AES_256_CBC_SHA |
| 1326 | * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 |
| 1327 | * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 |
| 1328 | * TLS_RSA_PSK_WITH_AES_128_CBC_SHA |
| 1329 | * TLS_PSK_WITH_AES_256_GCM_SHA384 |
| 1330 | * TLS_PSK_WITH_AES_256_CBC_SHA384 |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 1331 | * TLS_PSK_WITH_AES_256_CBC_SHA |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1332 | * TLS_PSK_WITH_AES_128_GCM_SHA256 |
| 1333 | * TLS_PSK_WITH_AES_128_CBC_SHA256 |
| 1334 | * TLS_PSK_WITH_AES_128_CBC_SHA |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 1335 | * |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1336 | * PEM_PARSE uses AES for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1337 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1338 | #define POLARSSL_AES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1339 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1340 | /** |
| 1341 | * \def POLARSSL_ARC4_C |
| 1342 | * |
| 1343 | * Enable the ARCFOUR stream cipher. |
| 1344 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1345 | * Module: library/arc4.c |
| 1346 | * Caller: library/ssl_tls.c |
| 1347 | * |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 1348 | * This module enables the following ciphersuites (if other requisites are |
| 1349 | * enabled as well): |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 1350 | * TLS_ECDH_ECDSA_WITH_RC4_128_SHA |
| 1351 | * TLS_ECDH_RSA_WITH_RC4_128_SHA |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1352 | * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 1353 | * TLS_ECDHE_RSA_WITH_RC4_128_SHA |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1354 | * TLS_ECDHE_PSK_WITH_RC4_128_SHA |
| 1355 | * TLS_DHE_PSK_WITH_RC4_128_SHA |
| 1356 | * TLS_RSA_WITH_RC4_128_SHA |
| 1357 | * TLS_RSA_WITH_RC4_128_MD5 |
| 1358 | * TLS_RSA_PSK_WITH_RC4_128_SHA |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 1359 | * TLS_PSK_WITH_RC4_128_SHA |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1360 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1361 | #define POLARSSL_ARC4_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1362 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1363 | /** |
Paul Bakker | efc3029 | 2011-11-10 14:43:23 +0000 | [diff] [blame] | 1364 | * \def POLARSSL_ASN1_PARSE_C |
| 1365 | * |
| 1366 | * Enable the generic ASN1 parser. |
| 1367 | * |
| 1368 | * Module: library/asn1.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1369 | * Caller: library/x509.c |
| 1370 | * library/dhm.c |
| 1371 | * library/pkcs12.c |
| 1372 | * library/pkcs5.c |
| 1373 | * library/pkparse.c |
Paul Bakker | efc3029 | 2011-11-10 14:43:23 +0000 | [diff] [blame] | 1374 | */ |
| 1375 | #define POLARSSL_ASN1_PARSE_C |
| 1376 | |
| 1377 | /** |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 1378 | * \def POLARSSL_ASN1_WRITE_C |
| 1379 | * |
| 1380 | * Enable the generic ASN1 writer. |
| 1381 | * |
| 1382 | * Module: library/asn1write.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1383 | * Caller: library/ecdsa.c |
| 1384 | * library/pkwrite.c |
| 1385 | * library/x509_create.c |
| 1386 | * library/x509write_crt.c |
| 1387 | * library/x509write_csr.c |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 1388 | */ |
| 1389 | #define POLARSSL_ASN1_WRITE_C |
| 1390 | |
| 1391 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1392 | * \def POLARSSL_BASE64_C |
| 1393 | * |
| 1394 | * Enable the Base64 module. |
| 1395 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1396 | * Module: library/base64.c |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1397 | * Caller: library/pem.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1398 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1399 | * This module is required for PEM support (required by X.509). |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1400 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1401 | #define POLARSSL_BASE64_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1402 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1403 | /** |
| 1404 | * \def POLARSSL_BIGNUM_C |
| 1405 | * |
Paul Bakker | 9a73632 | 2012-11-14 12:39:52 +0000 | [diff] [blame] | 1406 | * Enable the multi-precision integer library. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1407 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1408 | * Module: library/bignum.c |
| 1409 | * Caller: library/dhm.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1410 | * library/ecp.c |
Manuel Pégourié-Gonnard | bf31977 | 2014-06-25 13:00:17 +0200 | [diff] [blame] | 1411 | * library/ecdsa.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1412 | * library/rsa.c |
| 1413 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1414 | * |
Manuel Pégourié-Gonnard | bf31977 | 2014-06-25 13:00:17 +0200 | [diff] [blame] | 1415 | * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1416 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1417 | #define POLARSSL_BIGNUM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1418 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1419 | /** |
Paul Bakker | a9379c0 | 2012-07-04 11:02:11 +0000 | [diff] [blame] | 1420 | * \def POLARSSL_BLOWFISH_C |
| 1421 | * |
| 1422 | * Enable the Blowfish block cipher. |
| 1423 | * |
| 1424 | * Module: library/blowfish.c |
| 1425 | */ |
| 1426 | #define POLARSSL_BLOWFISH_C |
| 1427 | |
| 1428 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1429 | * \def POLARSSL_CAMELLIA_C |
| 1430 | * |
| 1431 | * Enable the Camellia block cipher. |
| 1432 | * |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 1433 | * Module: library/camellia.c |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame] | 1434 | * Caller: library/ssl_tls.c |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 1435 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 1436 | * This module enables the following ciphersuites (if other requisites are |
| 1437 | * enabled as well): |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 1438 | * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1439 | * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 1440 | * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1441 | * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 1442 | * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1443 | * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1444 | * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1445 | * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1446 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1447 | * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1448 | * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1449 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 1450 | * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 1451 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1452 | * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 1453 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1454 | * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1455 | * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1456 | * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1457 | * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1458 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1459 | * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 1460 | * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 1461 | * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 1462 | * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 1463 | * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 1464 | * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 1465 | * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 1466 | * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1467 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
| 1468 | * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 1469 | * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1470 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1471 | * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 1472 | * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 1473 | * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 1474 | * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 1475 | * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 1476 | * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 1477 | * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 1478 | * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 1479 | * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 1480 | */ |
| 1481 | #define POLARSSL_CAMELLIA_C |
| 1482 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1483 | /** |
Paul Bakker | 64a96ea | 2014-05-22 15:13:02 +0200 | [diff] [blame] | 1484 | * \def POLARSSL_CCM_C |
Manuel Pégourié-Gonnard | a6916fa | 2014-05-02 15:17:29 +0200 | [diff] [blame] | 1485 | * |
| 1486 | * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher. |
| 1487 | * |
| 1488 | * Module: library/ccm.c |
| 1489 | * |
| 1490 | * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C |
| 1491 | * |
| 1492 | * This module enables the AES-CCM ciphersuites, if other requisites are |
| 1493 | * enabled as well. |
| 1494 | */ |
| 1495 | #define POLARSSL_CCM_C |
| 1496 | |
| 1497 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1498 | * \def POLARSSL_CERTS_C |
| 1499 | * |
| 1500 | * Enable the test certificates. |
| 1501 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1502 | * Module: library/certs.c |
| 1503 | * Caller: |
| 1504 | * |
Manuel Pégourié-Gonnard | 18dc0e2 | 2013-10-27 14:35:02 +0100 | [diff] [blame] | 1505 | * Requires: POLARSSL_PEM_PARSE_C |
| 1506 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1507 | * This module is used for testing (ssl_client/server). |
| 1508 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1509 | #define POLARSSL_CERTS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1510 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1511 | /** |
| 1512 | * \def POLARSSL_CIPHER_C |
| 1513 | * |
| 1514 | * Enable the generic cipher layer. |
| 1515 | * |
Paul Bakker | 8123e9d | 2011-01-06 15:37:30 +0000 | [diff] [blame] | 1516 | * Module: library/cipher.c |
Paul Bakker | 04784f5 | 2013-08-19 13:30:57 +0200 | [diff] [blame] | 1517 | * Caller: library/ssl_tls.c |
Paul Bakker | 8123e9d | 2011-01-06 15:37:30 +0000 | [diff] [blame] | 1518 | * |
| 1519 | * Uncomment to enable generic cipher wrappers. |
| 1520 | */ |
| 1521 | #define POLARSSL_CIPHER_C |
| 1522 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1523 | /** |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 1524 | * \def POLARSSL_CTR_DRBG_C |
| 1525 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1526 | * Enable the CTR_DRBG AES-256-based random generator. |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 1527 | * |
| 1528 | * Module: library/ctr_drbg.c |
| 1529 | * Caller: |
| 1530 | * |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 1531 | * Requires: POLARSSL_AES_C |
| 1532 | * |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 1533 | * This module provides the CTR_DRBG AES-256 random number generator. |
| 1534 | */ |
| 1535 | #define POLARSSL_CTR_DRBG_C |
| 1536 | |
| 1537 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1538 | * \def POLARSSL_DEBUG_C |
| 1539 | * |
| 1540 | * Enable the debug functions. |
| 1541 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1542 | * Module: library/debug.c |
| 1543 | * Caller: library/ssl_cli.c |
| 1544 | * library/ssl_srv.c |
| 1545 | * library/ssl_tls.c |
| 1546 | * |
| 1547 | * This module provides debugging functions. |
| 1548 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1549 | #define POLARSSL_DEBUG_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1550 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1551 | /** |
| 1552 | * \def POLARSSL_DES_C |
| 1553 | * |
| 1554 | * Enable the DES block cipher. |
| 1555 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1556 | * Module: library/des.c |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 1557 | * Caller: library/pem.c |
| 1558 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1559 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 1560 | * This module enables the following ciphersuites (if other requisites are |
| 1561 | * enabled as well): |
Manuel Pégourié-Gonnard | 25781b2 | 2013-12-11 16:17:10 +0100 | [diff] [blame] | 1562 | * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA |
| 1563 | * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1564 | * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 1565 | * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1566 | * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 1567 | * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA |
| 1568 | * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA |
| 1569 | * TLS_RSA_WITH_3DES_EDE_CBC_SHA |
| 1570 | * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | d4a56ec | 2013-04-16 18:05:29 +0200 | [diff] [blame] | 1571 | * TLS_PSK_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 1572 | * |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1573 | * PEM_PARSE uses DES/3DES for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1574 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1575 | #define POLARSSL_DES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1576 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1577 | /** |
| 1578 | * \def POLARSSL_DHM_C |
| 1579 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1580 | * Enable the Diffie-Hellman-Merkle module. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1581 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1582 | * Module: library/dhm.c |
| 1583 | * Caller: library/ssl_cli.c |
| 1584 | * library/ssl_srv.c |
| 1585 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1586 | * This module is used by the following key exchanges: |
| 1587 | * DHE-RSA, DHE-PSK |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1588 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1589 | #define POLARSSL_DHM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1590 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1591 | /** |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1592 | * \def POLARSSL_ECDH_C |
| 1593 | * |
| 1594 | * Enable the elliptic curve Diffie-Hellman library. |
| 1595 | * |
| 1596 | * Module: library/ecdh.c |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 1597 | * Caller: library/ssl_cli.c |
| 1598 | * library/ssl_srv.c |
| 1599 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1600 | * This module is used by the following key exchanges: |
| 1601 | * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1602 | * |
| 1603 | * Requires: POLARSSL_ECP_C |
| 1604 | */ |
| 1605 | #define POLARSSL_ECDH_C |
| 1606 | |
| 1607 | /** |
| 1608 | * \def POLARSSL_ECDSA_C |
| 1609 | * |
| 1610 | * Enable the elliptic curve DSA library. |
| 1611 | * |
| 1612 | * Module: library/ecdsa.c |
| 1613 | * Caller: |
| 1614 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1615 | * This module is used by the following key exchanges: |
| 1616 | * ECDHE-ECDSA |
| 1617 | * |
Manuel Pégourié-Gonnard | 4846f5e | 2013-08-08 14:36:15 +0200 | [diff] [blame] | 1618 | * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1619 | */ |
| 1620 | #define POLARSSL_ECDSA_C |
| 1621 | |
| 1622 | /** |
| 1623 | * \def POLARSSL_ECP_C |
| 1624 | * |
| 1625 | * Enable the elliptic curve over GF(p) library. |
| 1626 | * |
| 1627 | * Module: library/ecp.c |
| 1628 | * Caller: library/ecdh.c |
| 1629 | * library/ecdsa.c |
| 1630 | * |
Manuel Pégourié-Gonnard | b8012fc | 2013-10-10 15:40:49 +0200 | [diff] [blame] | 1631 | * 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] | 1632 | */ |
| 1633 | #define POLARSSL_ECP_C |
| 1634 | |
| 1635 | /** |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 1636 | * \def POLARSSL_ENTROPY_C |
| 1637 | * |
| 1638 | * Enable the platform-specific entropy code. |
| 1639 | * |
| 1640 | * Module: library/entropy.c |
| 1641 | * Caller: |
| 1642 | * |
Paul Bakker | 2ceda57 | 2014-02-06 15:55:25 +0100 | [diff] [blame] | 1643 | * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 1644 | * |
| 1645 | * This module provides a generic entropy pool |
| 1646 | */ |
| 1647 | #define POLARSSL_ENTROPY_C |
| 1648 | |
| 1649 | /** |
Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 1650 | * \def POLARSSL_ERROR_C |
| 1651 | * |
| 1652 | * Enable error code to error string conversion. |
| 1653 | * |
| 1654 | * Module: library/error.c |
| 1655 | * Caller: |
| 1656 | * |
Shuo Chen | 95a0d11 | 2014-04-04 21:04:40 -0700 | [diff] [blame] | 1657 | * This module enables polarssl_strerror(). |
Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 1658 | */ |
| 1659 | #define POLARSSL_ERROR_C |
| 1660 | |
| 1661 | /** |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 1662 | * \def POLARSSL_GCM_C |
| 1663 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1664 | * Enable the Galois/Counter Mode (GCM) for AES. |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 1665 | * |
| 1666 | * Module: library/gcm.c |
| 1667 | * |
Manuel Pégourié-Gonnard | 7bd8a99 | 2013-10-24 13:39:39 +0200 | [diff] [blame] | 1668 | * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 1669 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1670 | * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other |
| 1671 | * requisites are enabled as well. |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 1672 | */ |
| 1673 | #define POLARSSL_GCM_C |
| 1674 | |
| 1675 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1676 | * \def POLARSSL_HAVEGE_C |
| 1677 | * |
| 1678 | * Enable the HAVEGE random generator. |
| 1679 | * |
Paul Bakker | 2a84424 | 2013-06-24 13:01:53 +0200 | [diff] [blame] | 1680 | * Warning: the HAVEGE random generator is not suitable for virtualized |
| 1681 | * environments |
| 1682 | * |
| 1683 | * Warning: the HAVEGE random generator is dependent on timing and specific |
| 1684 | * processor traits. It is therefore not advised to use HAVEGE as |
| 1685 | * your applications primary random generator or primary entropy pool |
| 1686 | * input. As a secondary input to your entropy pool, it IS able add |
| 1687 | * the (limited) extra entropy it provides. |
| 1688 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1689 | * Module: library/havege.c |
| 1690 | * Caller: |
| 1691 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1692 | * Requires: POLARSSL_TIMING_C |
| 1693 | * |
Paul Bakker | 2a84424 | 2013-06-24 13:01:53 +0200 | [diff] [blame] | 1694 | * Uncomment to enable the HAVEGE random generator. |
Paul Bakker | 2a84424 | 2013-06-24 13:01:53 +0200 | [diff] [blame] | 1695 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1696 | //#define POLARSSL_HAVEGE_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1697 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1698 | /** |
Manuel Pégourié-Gonnard | 490bdf3 | 2014-01-27 14:03:10 +0100 | [diff] [blame] | 1699 | * \def POLARSSL_HMAC_DRBG_C |
| 1700 | * |
| 1701 | * Enable the HMAC_DRBG random generator. |
| 1702 | * |
| 1703 | * Module: library/hmac_drbg.c |
| 1704 | * Caller: |
| 1705 | * |
| 1706 | * Requires: POLARSSL_MD_C |
| 1707 | * |
| 1708 | * Uncomment to enable the HMAC_DRBG random number geerator. |
| 1709 | */ |
| 1710 | #define POLARSSL_HMAC_DRBG_C |
| 1711 | |
| 1712 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1713 | * \def POLARSSL_MD_C |
| 1714 | * |
| 1715 | * Enable the generic message digest layer. |
| 1716 | * |
Paul Bakker | 1737385 | 2011-01-06 14:20:01 +0000 | [diff] [blame] | 1717 | * Module: library/md.c |
| 1718 | * Caller: |
| 1719 | * |
| 1720 | * Uncomment to enable generic message digest wrappers. |
| 1721 | */ |
| 1722 | #define POLARSSL_MD_C |
| 1723 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1724 | /** |
| 1725 | * \def POLARSSL_MD2_C |
| 1726 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1727 | * Enable the MD2 hash algorithm. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1728 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1729 | * Module: library/md2.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1730 | * Caller: |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1731 | * |
| 1732 | * Uncomment to enable support for (rare) MD2-signed X.509 certs. |
Paul Bakker | 6506aff | 2009-07-28 20:52:02 +0000 | [diff] [blame] | 1733 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1734 | //#define POLARSSL_MD2_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1735 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1736 | /** |
| 1737 | * \def POLARSSL_MD4_C |
| 1738 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1739 | * Enable the MD4 hash algorithm. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1740 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1741 | * Module: library/md4.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1742 | * Caller: |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1743 | * |
| 1744 | * Uncomment to enable support for (rare) MD4-signed X.509 certs. |
Paul Bakker | 6506aff | 2009-07-28 20:52:02 +0000 | [diff] [blame] | 1745 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1746 | //#define POLARSSL_MD4_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1747 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1748 | /** |
| 1749 | * \def POLARSSL_MD5_C |
| 1750 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1751 | * Enable the MD5 hash algorithm. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1752 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1753 | * Module: library/md5.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1754 | * Caller: library/md.c |
| 1755 | * library/pem.c |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 1756 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1757 | * |
| 1758 | * This module is required for SSL/TLS and X.509. |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1759 | * PEM_PARSE uses MD5 for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1760 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1761 | #define POLARSSL_MD5_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1762 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1763 | /** |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1764 | * \def POLARSSL_MEMORY_C |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 1765 | * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead. |
Manuel Pégourié-Gonnard | 0a155b8 | 2015-01-23 17:28:27 +0000 | [diff] [blame] | 1766 | * Depends on: POLARSSL_PLATFORM_C |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1767 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1768 | //#define POLARSSL_MEMORY_C |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1769 | |
| 1770 | /** |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1771 | * \def POLARSSL_MEMORY_BUFFER_ALLOC_C |
| 1772 | * |
| 1773 | * Enable the buffer allocator implementation that makes use of a (stack) |
| 1774 | * based buffer to 'allocate' dynamic memory. (replaces malloc() and free() |
| 1775 | * calls) |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1776 | * |
| 1777 | * Module: library/memory_buffer_alloc.c |
| 1778 | * |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 1779 | * Requires: POLARSSL_PLATFORM_C |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 1780 | * POLARSSL_PLATFORM_MEMORY (to use it within mbed TLS) |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1781 | * |
| 1782 | * Enable this module to enable the buffer memory allocator. |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1783 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1784 | //#define POLARSSL_MEMORY_BUFFER_ALLOC_C |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1785 | |
| 1786 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1787 | * \def POLARSSL_NET_C |
| 1788 | * |
| 1789 | * Enable the TCP/IP networking routines. |
| 1790 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1791 | * Module: library/net.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1792 | * |
| 1793 | * This module provides TCP/IP networking routines. |
| 1794 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1795 | #define POLARSSL_NET_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1796 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1797 | /** |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1798 | * \def POLARSSL_OID_C |
| 1799 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1800 | * Enable the OID database. |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1801 | * |
| 1802 | * Module: library/oid.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1803 | * Caller: library/asn1write.c |
| 1804 | * library/pkcs5.c |
| 1805 | * library/pkparse.c |
| 1806 | * library/pkwrite.c |
| 1807 | * library/rsa.c |
| 1808 | * library/x509.c |
| 1809 | * library/x509_create.c |
| 1810 | * library/x509_crl.c |
| 1811 | * library/x509_crt.c |
| 1812 | * library/x509_csr.c |
| 1813 | * library/x509write_crt.c |
| 1814 | * library/x509write_csr.c |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1815 | * |
| 1816 | * This modules translates between OIDs and internal values. |
| 1817 | */ |
| 1818 | #define POLARSSL_OID_C |
| 1819 | |
| 1820 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1821 | * \def POLARSSL_PADLOCK_C |
| 1822 | * |
| 1823 | * Enable VIA Padlock support on x86. |
| 1824 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1825 | * Module: library/padlock.c |
| 1826 | * Caller: library/aes.c |
| 1827 | * |
Manuel Pégourié-Gonnard | 92ac76f | 2013-12-16 17:12:53 +0100 | [diff] [blame] | 1828 | * Requires: POLARSSL_HAVE_ASM |
| 1829 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1830 | * This modules adds support for the VIA PadLock on x86. |
| 1831 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 1832 | #define POLARSSL_PADLOCK_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1833 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1834 | /** |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1835 | * \def POLARSSL_PBKDF2_C |
| 1836 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1837 | * Enable PKCS#5 PBKDF2 key derivation function. |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1838 | * DEPRECATED: Use POLARSSL_PKCS5_C instead |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1839 | * |
| 1840 | * Module: library/pbkdf2.c |
| 1841 | * |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1842 | * Requires: POLARSSL_PKCS5_C |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1843 | * |
| 1844 | * This module adds support for the PKCS#5 PBKDF2 key derivation function. |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1845 | */ |
Paul Bakker | 370e90c | 2013-04-08 15:19:43 +0200 | [diff] [blame] | 1846 | #define POLARSSL_PBKDF2_C |
Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 1847 | |
| 1848 | /** |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1849 | * \def POLARSSL_PEM_PARSE_C |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1850 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1851 | * Enable PEM decoding / parsing. |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1852 | * |
| 1853 | * Module: library/pem.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1854 | * Caller: library/dhm.c |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1855 | * library/pkparse.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1856 | * library/x509_crl.c |
| 1857 | * library/x509_crt.c |
| 1858 | * library/x509_csr.c |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1859 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1860 | * Requires: POLARSSL_BASE64_C |
| 1861 | * |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1862 | * This modules adds support for decoding / parsing PEM files. |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1863 | */ |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1864 | #define POLARSSL_PEM_PARSE_C |
| 1865 | |
| 1866 | /** |
| 1867 | * \def POLARSSL_PEM_WRITE_C |
| 1868 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1869 | * Enable PEM encoding / writing. |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1870 | * |
| 1871 | * Module: library/pem.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1872 | * Caller: library/pkwrite.c |
| 1873 | * library/x509write_crt.c |
| 1874 | * library/x509write_csr.c |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1875 | * |
| 1876 | * Requires: POLARSSL_BASE64_C |
| 1877 | * |
| 1878 | * This modules adds support for encoding / writing PEM files. |
| 1879 | */ |
| 1880 | #define POLARSSL_PEM_WRITE_C |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1881 | |
| 1882 | /** |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1883 | * \def POLARSSL_PK_C |
| 1884 | * |
| 1885 | * Enable the generic public (asymetric) key layer. |
| 1886 | * |
| 1887 | * Module: library/pk.c |
Manuel Pégourié-Gonnard | 1a48383 | 2013-09-20 12:29:15 +0200 | [diff] [blame] | 1888 | * Caller: library/ssl_tls.c |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1889 | * library/ssl_cli.c |
| 1890 | * library/ssl_srv.c |
| 1891 | * |
Manuel Pégourié-Gonnard | 1a48383 | 2013-09-20 12:29:15 +0200 | [diff] [blame] | 1892 | * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C |
| 1893 | * |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1894 | * Uncomment to enable generic public key wrappers. |
| 1895 | */ |
| 1896 | #define POLARSSL_PK_C |
| 1897 | |
| 1898 | /** |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1899 | * \def POLARSSL_PK_PARSE_C |
| 1900 | * |
| 1901 | * Enable the generic public (asymetric) key parser. |
| 1902 | * |
| 1903 | * Module: library/pkparse.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1904 | * Caller: library/x509_crt.c |
| 1905 | * library/x509_csr.c |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1906 | * |
| 1907 | * Requires: POLARSSL_PK_C |
| 1908 | * |
| 1909 | * Uncomment to enable generic public key parse functions. |
| 1910 | */ |
| 1911 | #define POLARSSL_PK_PARSE_C |
| 1912 | |
| 1913 | /** |
| 1914 | * \def POLARSSL_PK_WRITE_C |
| 1915 | * |
Paul Bakker | f20ba4b | 2013-09-16 22:46:20 +0200 | [diff] [blame] | 1916 | * Enable the generic public (asymetric) key writer. |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1917 | * |
| 1918 | * Module: library/pkwrite.c |
| 1919 | * Caller: library/x509write.c |
| 1920 | * |
| 1921 | * Requires: POLARSSL_PK_C |
| 1922 | * |
| 1923 | * Uncomment to enable generic public key write functions. |
| 1924 | */ |
| 1925 | #define POLARSSL_PK_WRITE_C |
| 1926 | |
| 1927 | /** |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1928 | * \def POLARSSL_PKCS5_C |
| 1929 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1930 | * Enable PKCS#5 functions. |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1931 | * |
| 1932 | * Module: library/pkcs5.c |
| 1933 | * |
| 1934 | * Requires: POLARSSL_MD_C |
| 1935 | * |
| 1936 | * This module adds support for the PKCS#5 functions. |
| 1937 | */ |
| 1938 | #define POLARSSL_PKCS5_C |
| 1939 | |
| 1940 | /** |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1941 | * \def POLARSSL_PKCS11_C |
| 1942 | * |
Paul Bakker | eb2c658 | 2012-09-27 19:15:01 +0000 | [diff] [blame] | 1943 | * Enable wrapper for PKCS#11 smartcard support. |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1944 | * |
Manuel Pégourié-Gonnard | 51be559 | 2013-08-22 13:35:53 +0200 | [diff] [blame] | 1945 | * Module: library/pkcs11.c |
| 1946 | * Caller: library/pk.c |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1947 | * |
Manuel Pégourié-Gonnard | 51be559 | 2013-08-22 13:35:53 +0200 | [diff] [blame] | 1948 | * Requires: POLARSSL_PK_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1949 | * |
Paul Bakker | eb2c658 | 2012-09-27 19:15:01 +0000 | [diff] [blame] | 1950 | * This module enables SSL/TLS PKCS #11 smartcard support. |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1951 | * Requires the presence of the PKCS#11 helper library (libpkcs11-helper) |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1952 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 1953 | //#define POLARSSL_PKCS11_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1954 | |
| 1955 | /** |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1956 | * \def POLARSSL_PKCS12_C |
| 1957 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1958 | * Enable PKCS#12 PBE functions. |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1959 | * Adds algorithms for parsing PKCS#8 encrypted private keys |
| 1960 | * |
| 1961 | * Module: library/pkcs12.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1962 | * Caller: library/pkparse.c |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1963 | * |
Paul Bakker | b0713c7 | 2013-06-24 19:34:08 +0200 | [diff] [blame] | 1964 | * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C |
| 1965 | * Can use: POLARSSL_ARC4_C |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1966 | * |
| 1967 | * This module enables PKCS#12 functions. |
| 1968 | */ |
| 1969 | #define POLARSSL_PKCS12_C |
| 1970 | |
| 1971 | /** |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 1972 | * \def POLARSSL_PLATFORM_C |
| 1973 | * |
| 1974 | * Enable the platform abstraction layer that allows you to re-assign |
Rich Evans | c39cb49 | 2015-01-30 12:01:34 +0000 | [diff] [blame] | 1975 | * functions like malloc(), free(), snprintf(), printf(), fprintf(), exit() |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 1976 | * |
Rich Evans | 16f8cd8 | 2015-02-06 16:14:34 +0000 | [diff] [blame] | 1977 | * Enabling POLARSSL_PLATFORM_C enables to use of POLARSSL_PLATFORM_XXX_ALT |
| 1978 | * or POLARSSL_PLATFORM_XXX_MACRO directives, allowing the functions mentioned |
| 1979 | * above to be specified at runtime or compile time respectively. |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 1980 | * |
| 1981 | * Module: library/platform.c |
| 1982 | * Caller: Most other .c files |
| 1983 | * |
| 1984 | * This module enables abstraction of common (libc) functions. |
| 1985 | */ |
| 1986 | #define POLARSSL_PLATFORM_C |
| 1987 | |
| 1988 | /** |
Paul Bakker | 61b699e | 2014-01-22 13:35:29 +0100 | [diff] [blame] | 1989 | * \def POLARSSL_RIPEMD160_C |
Manuel Pégourié-Gonnard | cab4a88 | 2014-01-17 12:42:35 +0100 | [diff] [blame] | 1990 | * |
| 1991 | * Enable the RIPEMD-160 hash algorithm. |
| 1992 | * |
Paul Bakker | 61b699e | 2014-01-22 13:35:29 +0100 | [diff] [blame] | 1993 | * Module: library/ripemd160.c |
Manuel Pégourié-Gonnard | cab4a88 | 2014-01-17 12:42:35 +0100 | [diff] [blame] | 1994 | * Caller: library/md.c |
| 1995 | * |
| 1996 | */ |
Paul Bakker | 61b699e | 2014-01-22 13:35:29 +0100 | [diff] [blame] | 1997 | #define POLARSSL_RIPEMD160_C |
Manuel Pégourié-Gonnard | cab4a88 | 2014-01-17 12:42:35 +0100 | [diff] [blame] | 1998 | |
| 1999 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2000 | * \def POLARSSL_RSA_C |
| 2001 | * |
| 2002 | * Enable the RSA public-key cryptosystem. |
| 2003 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2004 | * Module: library/rsa.c |
| 2005 | * Caller: library/ssl_cli.c |
| 2006 | * library/ssl_srv.c |
| 2007 | * library/ssl_tls.c |
| 2008 | * library/x509.c |
| 2009 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 2010 | * This module is used by the following key exchanges: |
| 2011 | * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 2012 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 2013 | * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2014 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 2015 | #define POLARSSL_RSA_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2016 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2017 | /** |
| 2018 | * \def POLARSSL_SHA1_C |
| 2019 | * |
| 2020 | * Enable the SHA1 cryptographic hash algorithm. |
| 2021 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2022 | * Module: library/sha1.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 2023 | * Caller: library/md.c |
| 2024 | * library/ssl_cli.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2025 | * library/ssl_srv.c |
| 2026 | * library/ssl_tls.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 2027 | * library/x509write_crt.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2028 | * |
| 2029 | * This module is required for SSL/TLS and SHA1-signed certificates. |
| 2030 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 2031 | #define POLARSSL_SHA1_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2032 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2033 | /** |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 2034 | * \def POLARSSL_SHA256_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2035 | * |
| 2036 | * Enable the SHA-224 and SHA-256 cryptographic hash algorithms. |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 2037 | * (Used to be POLARSSL_SHA2_C) |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2038 | * |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 2039 | * Module: library/sha256.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 2040 | * Caller: library/entropy.c |
| 2041 | * library/md.c |
| 2042 | * library/ssl_cli.c |
| 2043 | * library/ssl_srv.c |
| 2044 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2045 | * |
| 2046 | * This module adds support for SHA-224 and SHA-256. |
Paul Bakker | 769075d | 2012-11-24 11:26:46 +0100 | [diff] [blame] | 2047 | * This module is required for the SSL/TLS 1.2 PRF function. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2048 | */ |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 2049 | #define POLARSSL_SHA256_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2050 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2051 | /** |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 2052 | * \def POLARSSL_SHA512_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2053 | * |
| 2054 | * Enable the SHA-384 and SHA-512 cryptographic hash algorithms. |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 2055 | * (Used to be POLARSSL_SHA4_C) |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2056 | * |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 2057 | * Module: library/sha512.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 2058 | * Caller: library/entropy.c |
| 2059 | * library/md.c |
| 2060 | * library/ssl_cli.c |
| 2061 | * library/ssl_srv.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2062 | * |
| 2063 | * This module adds support for SHA-384 and SHA-512. |
| 2064 | */ |
Paul Bakker | 9e36f04 | 2013-06-30 14:34:05 +0200 | [diff] [blame] | 2065 | #define POLARSSL_SHA512_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2066 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2067 | /** |
Paul Bakker | 0a59707 | 2012-09-25 21:55:46 +0000 | [diff] [blame] | 2068 | * \def POLARSSL_SSL_CACHE_C |
| 2069 | * |
| 2070 | * Enable simple SSL cache implementation. |
| 2071 | * |
| 2072 | * Module: library/ssl_cache.c |
| 2073 | * Caller: |
| 2074 | * |
| 2075 | * Requires: POLARSSL_SSL_CACHE_C |
| 2076 | */ |
| 2077 | #define POLARSSL_SSL_CACHE_C |
| 2078 | |
| 2079 | /** |
Manuel Pégourié-Gonnard | a64acd4 | 2014-07-23 18:30:45 +0200 | [diff] [blame] | 2080 | * \def POLARSSL_SSL_COOKIE_C |
| 2081 | * |
| 2082 | * Enable basic implementation of DTLS cookies for hello verification. |
| 2083 | * |
| 2084 | * Module: library/ssl_cookie.c |
| 2085 | * Caller: |
| 2086 | * |
| 2087 | * Requires: POLARSSL_SSL_DTLS_HELLO_VERIFY |
| 2088 | */ |
| 2089 | #define POLARSSL_SSL_COOKIE_C |
| 2090 | |
| 2091 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2092 | * \def POLARSSL_SSL_CLI_C |
| 2093 | * |
| 2094 | * Enable the SSL/TLS client code. |
| 2095 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2096 | * Module: library/ssl_cli.c |
| 2097 | * Caller: |
| 2098 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 2099 | * Requires: POLARSSL_SSL_TLS_C |
| 2100 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2101 | * This module is required for SSL/TLS client support. |
| 2102 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 2103 | #define POLARSSL_SSL_CLI_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2104 | |
Paul Bakker | 9a73632 | 2012-11-14 12:39:52 +0000 | [diff] [blame] | 2105 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2106 | * \def POLARSSL_SSL_SRV_C |
| 2107 | * |
| 2108 | * Enable the SSL/TLS server code. |
| 2109 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2110 | * Module: library/ssl_srv.c |
| 2111 | * Caller: |
| 2112 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 2113 | * Requires: POLARSSL_SSL_TLS_C |
| 2114 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2115 | * This module is required for SSL/TLS server support. |
| 2116 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 2117 | #define POLARSSL_SSL_SRV_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2118 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2119 | /** |
| 2120 | * \def POLARSSL_SSL_TLS_C |
| 2121 | * |
Paul Bakker | e29ab06 | 2011-05-18 13:26:54 +0000 | [diff] [blame] | 2122 | * Enable the generic SSL/TLS code. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2123 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2124 | * Module: library/ssl_tls.c |
| 2125 | * Caller: library/ssl_cli.c |
| 2126 | * library/ssl_srv.c |
| 2127 | * |
Manuel Pégourié-Gonnard | 1a48383 | 2013-09-20 12:29:15 +0200 | [diff] [blame] | 2128 | * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C |
Paul Bakker | 577e006 | 2013-08-28 11:57:20 +0200 | [diff] [blame] | 2129 | * and at least one of the POLARSSL_SSL_PROTO_* defines |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 2130 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2131 | * This module is required for SSL/TLS. |
| 2132 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 2133 | #define POLARSSL_SSL_TLS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2134 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2135 | /** |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 2136 | * \def POLARSSL_THREADING_C |
| 2137 | * |
| 2138 | * Enable the threading abstraction layer. |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 2139 | * By default mbed TLS assumes it is used in a non-threaded environment or that |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 2140 | * contexts are not shared between threads. If you do intend to use contexts |
| 2141 | * between threads, you will need to enable this layer to prevent race |
| 2142 | * conditions. |
| 2143 | * |
| 2144 | * Module: library/threading.c |
| 2145 | * |
| 2146 | * This allows different threading implementations (self-implemented or |
| 2147 | * provided). |
| 2148 | * |
Paul Bakker | a8fd3e3 | 2013-12-31 11:54:08 +0100 | [diff] [blame] | 2149 | * You will have to enable either POLARSSL_THREADING_ALT or |
| 2150 | * POLARSSL_THREADING_PTHREAD. |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 2151 | * |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 2152 | * Enable this layer to allow use of mutexes within mbed TLS |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 2153 | */ |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 2154 | //#define POLARSSL_THREADING_C |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 2155 | |
| 2156 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2157 | * \def POLARSSL_TIMING_C |
| 2158 | * |
| 2159 | * Enable the portable timing interface. |
| 2160 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2161 | * Module: library/timing.c |
| 2162 | * Caller: library/havege.c |
| 2163 | * |
| 2164 | * This module is used by the HAVEGE random number generator. |
Paul Bakker | ecd54fb | 2013-07-03 14:48:29 +0200 | [diff] [blame] | 2165 | */ |
Paul Bakker | dcbfdcc | 2013-09-10 16:16:50 +0200 | [diff] [blame] | 2166 | #define POLARSSL_TIMING_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2167 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2168 | /** |
| 2169 | * \def POLARSSL_VERSION_C |
| 2170 | * |
| 2171 | * Enable run-time version information. |
| 2172 | * |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 2173 | * Module: library/version.c |
| 2174 | * |
| 2175 | * This module provides run-time version information. |
| 2176 | */ |
| 2177 | #define POLARSSL_VERSION_C |
| 2178 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2179 | /** |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2180 | * \def POLARSSL_X509_USE_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2181 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 2182 | * Enable X.509 core for using certificates. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2183 | * |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2184 | * Module: library/x509.c |
| 2185 | * Caller: library/x509_crl.c |
| 2186 | * library/x509_crt.c |
| 2187 | * library/x509_csr.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2188 | * |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 2189 | * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C, |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 2190 | * POLARSSL_PK_PARSE_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 2191 | * |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2192 | * This module is required for the X.509 parsing modules. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2193 | */ |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2194 | #define POLARSSL_X509_USE_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2195 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2196 | /** |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2197 | * \def POLARSSL_X509_CRT_PARSE_C |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 2198 | * |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2199 | * Enable X.509 certificate parsing. |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 2200 | * |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2201 | * Module: library/x509_crt.c |
| 2202 | * Caller: library/ssl_cli.c |
| 2203 | * library/ssl_srv.c |
| 2204 | * library/ssl_tls.c |
| 2205 | * |
| 2206 | * Requires: POLARSSL_X509_USE_C |
| 2207 | * |
| 2208 | * This module is required for X.509 certificate parsing. |
| 2209 | */ |
| 2210 | #define POLARSSL_X509_CRT_PARSE_C |
| 2211 | |
| 2212 | /** |
| 2213 | * \def POLARSSL_X509_CRL_PARSE_C |
| 2214 | * |
| 2215 | * Enable X.509 CRL parsing. |
| 2216 | * |
| 2217 | * Module: library/x509_crl.c |
| 2218 | * Caller: library/x509_crt.c |
| 2219 | * |
| 2220 | * Requires: POLARSSL_X509_USE_C |
| 2221 | * |
| 2222 | * This module is required for X.509 CRL parsing. |
| 2223 | */ |
| 2224 | #define POLARSSL_X509_CRL_PARSE_C |
| 2225 | |
| 2226 | /** |
| 2227 | * \def POLARSSL_X509_CSR_PARSE_C |
| 2228 | * |
| 2229 | * Enable X.509 Certificate Signing Request (CSR) parsing. |
| 2230 | * |
| 2231 | * Module: library/x509_csr.c |
| 2232 | * Caller: library/x509_crt_write.c |
| 2233 | * |
| 2234 | * Requires: POLARSSL_X509_USE_C |
| 2235 | * |
| 2236 | * This module is used for reading X.509 certificate request. |
| 2237 | */ |
| 2238 | #define POLARSSL_X509_CSR_PARSE_C |
| 2239 | |
| 2240 | /** |
| 2241 | * \def POLARSSL_X509_CREATE_C |
| 2242 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 2243 | * Enable X.509 core for creating certificates. |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2244 | * |
| 2245 | * Module: library/x509_create.c |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 2246 | * |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 2247 | * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 2248 | * |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2249 | * This module is the basis for creating X.509 certificates and CSRs. |
| 2250 | */ |
| 2251 | #define POLARSSL_X509_CREATE_C |
| 2252 | |
| 2253 | /** |
| 2254 | * \def POLARSSL_X509_CRT_WRITE_C |
| 2255 | * |
| 2256 | * Enable creating X.509 certificates. |
| 2257 | * |
| 2258 | * Module: library/x509_crt_write.c |
| 2259 | * |
| 2260 | * Requires: POLARSSL_CREATE_C |
| 2261 | * |
| 2262 | * This module is required for X.509 certificate creation. |
| 2263 | */ |
| 2264 | #define POLARSSL_X509_CRT_WRITE_C |
| 2265 | |
| 2266 | /** |
| 2267 | * \def POLARSSL_X509_CSR_WRITE_C |
| 2268 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 2269 | * Enable creating X.509 Certificate Signing Requests (CSR). |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2270 | * |
| 2271 | * Module: library/x509_csr_write.c |
| 2272 | * |
| 2273 | * Requires: POLARSSL_CREATE_C |
| 2274 | * |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 2275 | * This module is required for X.509 certificate request writing. |
| 2276 | */ |
Paul Bakker | 7c6b2c3 | 2013-09-16 13:49:26 +0200 | [diff] [blame] | 2277 | #define POLARSSL_X509_CSR_WRITE_C |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 2278 | |
| 2279 | /** |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2280 | * \def POLARSSL_XTEA_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 2281 | * |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 2282 | * Enable the XTEA block cipher. |
| 2283 | * |
Paul Bakker | 7a7c78f | 2009-01-04 18:15:48 +0000 | [diff] [blame] | 2284 | * Module: library/xtea.c |
| 2285 | * Caller: |
| 2286 | */ |
| 2287 | #define POLARSSL_XTEA_C |
Manuel Pégourié-Gonnard | 39d2adb | 2012-10-31 09:26:55 +0100 | [diff] [blame] | 2288 | |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 2289 | /* \} name SECTION: mbed TLS modules */ |
Paul Bakker | 7a7c78f | 2009-01-04 18:15:48 +0000 | [diff] [blame] | 2290 | |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2291 | /** |
| 2292 | * \name SECTION: Module configuration options |
| 2293 | * |
| 2294 | * This section allows for the setting of module specific sizes and |
| 2295 | * configuration options. The default values are already present in the |
| 2296 | * relevant header files and should suffice for the regular use cases. |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2297 | * |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2298 | * Our advice is to enable options and change their values here |
| 2299 | * only if you have a good reason and know the consequences. |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2300 | * |
| 2301 | * Please check the respective header file for documentation on these |
| 2302 | * parameters (to prevent duplicate documentation). |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2303 | * \{ |
| 2304 | */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2305 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2306 | /* MPI / BIGNUM options */ |
| 2307 | //#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */ |
Manuel Pégourié-Gonnard | da1b4de | 2014-09-08 17:03:50 +0200 | [diff] [blame] | 2308 | //#define POLARSSL_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2309 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2310 | /* CTR_DRBG options */ |
| 2311 | //#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */ |
| 2312 | //#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ |
| 2313 | //#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ |
| 2314 | //#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ |
| 2315 | //#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2316 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2317 | /* HMAC_DRBG options */ |
| 2318 | //#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ |
| 2319 | //#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ |
| 2320 | //#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ |
| 2321 | //#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2322 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2323 | /* ECP options */ |
| 2324 | //#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */ |
| 2325 | //#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */ |
| 2326 | //#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */ |
Manuel Pégourié-Gonnard | 0520b60 | 2014-01-30 19:43:46 +0100 | [diff] [blame] | 2327 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2328 | /* Entropy options */ |
| 2329 | //#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */ |
| 2330 | //#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */ |
Paul Bakker | e1b665e | 2013-12-11 16:02:58 +0100 | [diff] [blame] | 2331 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2332 | /* Memory buffer allocator options */ |
Manuel Pégourié-Gonnard | 4d8db4a | 2014-05-05 14:04:28 +0200 | [diff] [blame] | 2333 | //#define POLARSSL_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2334 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2335 | /* Platform options */ |
Rich Evans | 98081c5 | 2015-02-03 11:00:54 +0000 | [diff] [blame] | 2336 | //#define POLARSSL_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if POLARSSL_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */ |
| 2337 | //#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */ |
| 2338 | //#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */ |
| 2339 | //#define POLARSSL_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */ |
| 2340 | //#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */ |
| 2341 | //#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */ |
Rich Evans | c39cb49 | 2015-01-30 12:01:34 +0000 | [diff] [blame] | 2342 | //#define POLARSSL_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */ |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 2343 | |
Rich Evans | 16f8cd8 | 2015-02-06 16:14:34 +0000 | [diff] [blame] | 2344 | /* To Use Function Macros POLARSSL_PLATFORM_C must be enabled */ |
| 2345 | /* POLARSSL_PLATFORM_XXX_MACRO and POLARSSL_PLATFORM_XXX_ALT cannot both be defined */ |
Rich Evans | 4cc8a22 | 2015-02-03 11:26:31 +0000 | [diff] [blame] | 2346 | //#define POLARSSL_PLATFORM_MALLOC_MACRO malloc /**< Default allocator macro to use, can be undefined */ |
| 2347 | //#define POLARSSL_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */ |
| 2348 | //#define POLARSSL_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */ |
| 2349 | //#define POLARSSL_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */ |
| 2350 | //#define POLARSSL_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */ |
| 2351 | //#define POLARSSL_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2352 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2353 | /* SSL Cache options */ |
| 2354 | //#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */ |
| 2355 | //#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2356 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 2357 | /* SSL options */ |
| 2358 | //#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */ |
| 2359 | //#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */ |
Manuel Pégourié-Gonnard | 481fcfd | 2014-07-03 16:12:50 +0200 | [diff] [blame] | 2360 | //#define POLARSSL_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */ |
Manuel Pégourié-Gonnard | bef8f09 | 2014-07-23 23:40:29 +0200 | [diff] [blame] | 2361 | //#define POLARSSL_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2362 | |
Manuel Pégourié-Gonnard | dfc7df0 | 2014-06-30 17:59:55 +0200 | [diff] [blame] | 2363 | /** |
| 2364 | * Complete list of ciphersuites to use, in order of preference. |
| 2365 | * |
| 2366 | * \warning No dependency checking is done on that field! This option can only |
| 2367 | * be used to restrict the set of available ciphersuites. It is your |
| 2368 | * responsibility to make sure the needed modules are active. |
| 2369 | * |
| 2370 | * Use this to save a few hundred bytes of ROM (default ordering of all |
| 2371 | * available ciphersuites) and a few to a few hundred bytes of RAM. |
| 2372 | * |
| 2373 | * The value below is only an example, not the default. |
| 2374 | */ |
| 2375 | //#define SSL_CIPHERSUITES TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
| 2376 | |
Paul Bakker | eaebbd5 | 2014-04-25 15:04:14 +0200 | [diff] [blame] | 2377 | /* Debug options */ |
| 2378 | //#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */ |
| 2379 | |
Manuel Pégourié-Gonnard | fd6c85c | 2014-11-20 16:34:20 +0100 | [diff] [blame] | 2380 | /* X509 options */ |
| 2381 | //#define POLARSSL_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */ |
| 2382 | |
Paul Bakker | 0f90d7d | 2014-04-30 11:49:44 +0200 | [diff] [blame] | 2383 | /* \} name SECTION: Module configuration options */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 2384 | |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 2385 | #include "check_config.h" |
Manuel Pégourié-Gonnard | 92ac76f | 2013-12-16 17:12:53 +0100 | [diff] [blame] | 2386 | |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 2387 | #endif /* POLARSSL_CONFIG_H */ |