mbed TLS library

Dependents:   HTTPClient-SSL WS_SERVER

Committer:
ansond
Date:
Thu Jun 11 03:27:03 2015 +0000
Revision:
0:137634ff4186
initial commit

Who changed what in which revision?

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