Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
config.h
00001 /** 00002 * \file config.h 00003 * 00004 * \brief Configuration options (set of defines) 00005 * 00006 * Copyright (C) 2006-2014, Brainspark B.V. 00007 * 00008 * This file is part of PolarSSL (http://www.polarssl.org) 00009 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> 00010 * 00011 * All rights reserved. 00012 * 00013 * This program is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License as published by 00015 * the Free Software Foundation; either version 2 of the License, or 00016 * (at your option) any later version. 00017 * 00018 * This program is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License along 00024 * with this program; if not, write to the Free Software Foundation, Inc., 00025 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00026 * 00027 * This set of compile-time options may be used to enable 00028 * or disable features selectively, and reduce the global 00029 * memory footprint. 00030 */ 00031 #ifndef POLARSSL_CONFIG_H 00032 #define POLARSSL_CONFIG_H 00033 00034 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) 00035 #define _CRT_SECURE_NO_DEPRECATE 1 00036 #endif 00037 00038 /** 00039 * \name SECTION: System support 00040 * 00041 * This section sets system specific settings. 00042 * \{ 00043 */ 00044 00045 /** 00046 * \def POLARSSL_HAVE_INT8 00047 * 00048 * The system uses 8-bit wide native integers. 00049 * 00050 * Uncomment if native integers are 8-bit wide. 00051 */ 00052 //#define POLARSSL_HAVE_INT8 00053 00054 00055 /** 00056 * \def POLARSSL_MBED 00057 * 00058 * Code generation for use with MBED. 00059 * 00060 * Uncomment if MBED code should be included. . 00061 */ 00062 #define POLARSSL_MBED 1 00063 00064 /** 00065 * \def POLARSSL_HAVE_INT16 00066 * 00067 * The system uses 16-bit wide native integers. 00068 * 00069 * Uncomment if native integers are 16-bit wide. 00070 */ 00071 //#define POLARSSL_HAVE_INT16 00072 00073 /** 00074 * \def POLARSSL_HAVE_LONGLONG 00075 * 00076 * The compiler supports the 'long long' type. 00077 * (Only used on 32-bit platforms) 00078 */ 00079 #define POLARSSL_HAVE_LONGLONG 00080 00081 /** 00082 * \def POLARSSL_HAVE_ASM 00083 * 00084 * The compiler has support for asm(). 00085 * 00086 * Requires support for asm() in compiler. 00087 * 00088 * Used in: 00089 * library/timing.c 00090 * library/padlock.c 00091 * include/polarssl/bn_mul.h 00092 * 00093 * Comment to disable the use of assembly code. 00094 */ 00095 // #define POLARSSL_HAVE_ASM 00096 00097 /** 00098 * \def POLARSSL_HAVE_SSE2 00099 * 00100 * CPU supports SSE2 instruction set. 00101 * 00102 * Uncomment if the CPU supports SSE2 (IA-32 specific). 00103 */ 00104 //#define POLARSSL_HAVE_SSE2 00105 00106 /** 00107 * \def POLARSSL_HAVE_TIME 00108 * 00109 * System has time.h and time() / localtime() / gettimeofday(). 00110 * 00111 * Comment if your system does not support time functions 00112 */ 00113 //#define POLARSSL_HAVE_TIME 00114 00115 /** 00116 * \def POLARSSL_HAVE_IPV6 00117 * 00118 * System supports the basic socket interface for IPv6 (RFC 3493), 00119 * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage. 00120 * 00121 * Note: on Windows/MingW, XP or higher is required. 00122 * 00123 * Comment if your system does not support the IPv6 socket interface 00124 */ 00125 //#define POLARSSL_HAVE_IPV6 00126 00127 /** 00128 * \def POLARSSL_PLATFORM_MEMORY 00129 * 00130 * Enable the memory allocation layer. 00131 * 00132 * By default PolarSSL uses the system-provided malloc() and free(). 00133 * This allows different allocators (self-implemented or provided) to be 00134 * provided to the platform abstraction layer. 00135 * 00136 * Enabling POLARSSL_PLATFORM_MEMORY will provide "platform_set_malloc_free()" 00137 * to allow you to set an alternative malloc() and free() function pointer. 00138 * 00139 * Requires: POLARSSL_PLATFORM_C 00140 * 00141 * Enable this layer to allow use of alternative memory allocators. 00142 */ 00143 //#define POLARSSL_PLATFORM_MEMORY 00144 00145 /** 00146 * \def POLARSSL_PLATFORM_XXX_ALT 00147 * 00148 * Uncomment a macro to let PolarSSL support the function in the platform 00149 * abstraction layer. 00150 * 00151 * Example: In case you uncomment POLARSSL_PLATFORM_PRINTF_ALT, PolarSSL will 00152 * provide a function "platform_set_printf()" that allows you to set an 00153 * alternative printf function pointer. 00154 * 00155 * All these define require POLARSSL_PLATFORM_C to be defined! 00156 * 00157 * Uncomment a macro to enable alternate implementation of specific base 00158 * platform function 00159 */ 00160 //#define POLARSSL_PLATFORM_PRINTF_ALT 00161 //#define POLARSSL_PLATFORM_FPRINTF_ALT 00162 /* \} name SECTION: System support */ 00163 00164 /** 00165 * \name SECTION: PolarSSL feature support 00166 * 00167 * This section sets support for features that are or are not needed 00168 * within the modules that are enabled. 00169 * \{ 00170 */ 00171 00172 /** 00173 * \def POLARSSL_TIMING_ALT 00174 * 00175 * Uncomment to provide your own alternate implementation for hardclock(), 00176 * get_timer(), set_alarm() and m_sleep(). 00177 * 00178 * Only works if you have POLARSSL_TIMING_C enabled. 00179 * 00180 * You will need to provide a header "timing_alt.h" and an implementation at 00181 * compile time. 00182 */ 00183 //#define POLARSSL_TIMING_ALT 00184 00185 /** 00186 * \def POLARSSL_XXX_ALT 00187 * 00188 * Uncomment a macro to let PolarSSL use your alternate core implementation of 00189 * a symmetric or hash algorithm (e.g. platform specific assembly optimized 00190 * implementations). Keep in mind that the function prototypes should remain 00191 * the same. 00192 * 00193 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer 00194 * provide the "struct aes_context" definition and omit the base function 00195 * declarations and implementations. "aes_alt.h" will be included from 00196 * "aes.h" to include the new function definitions. 00197 * 00198 * Uncomment a macro to enable alternate implementation for core algorithm 00199 * functions 00200 */ 00201 //#define POLARSSL_AES_ALT 00202 //#define POLARSSL_ARC4_ALT 00203 //#define POLARSSL_BLOWFISH_ALT 00204 //#define POLARSSL_CAMELLIA_ALT 00205 //#define POLARSSL_DES_ALT 00206 //#define POLARSSL_XTEA_ALT 00207 //#define POLARSSL_MD2_ALT 00208 //#define POLARSSL_MD4_ALT 00209 //#define POLARSSL_MD5_ALT 00210 //#define POLARSSL_RIPEMD160_ALT 00211 //#define POLARSSL_SHA1_ALT 00212 //#define POLARSSL_SHA256_ALT 00213 //#define POLARSSL_SHA512_ALT 00214 00215 /** 00216 * \def POLARSSL_AES_ROM_TABLES 00217 * 00218 * Store the AES tables in ROM. 00219 * 00220 * Uncomment this macro to store the AES tables in ROM. 00221 * 00222 */ 00223 //#define POLARSSL_AES_ROM_TABLES 00224 00225 /** 00226 * \def POLARSSL_CIPHER_MODE_CBC 00227 * 00228 * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers. 00229 */ 00230 //#define POLARSSL_CIPHER_MODE_CBC 00231 00232 /** 00233 * \def POLARSSL_CIPHER_MODE_CFB 00234 * 00235 * Enable Cipher Feedback mode (CFB) for symmetric ciphers. 00236 */ 00237 //#define POLARSSL_CIPHER_MODE_CFB 00238 00239 /** 00240 * \def POLARSSL_CIPHER_MODE_CTR 00241 * 00242 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers. 00243 */ 00244 //#define POLARSSL_CIPHER_MODE_CTR 00245 00246 /** 00247 * \def POLARSSL_CIPHER_NULL_CIPHER 00248 * 00249 * Enable NULL cipher. 00250 * Warning: Only do so when you know what you are doing. This allows for 00251 * encryption or channels without any security! 00252 * 00253 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable 00254 * the following ciphersuites: 00255 * TLS_ECDH_ECDSA_WITH_NULL_SHA 00256 * TLS_ECDH_RSA_WITH_NULL_SHA 00257 * TLS_ECDHE_ECDSA_WITH_NULL_SHA 00258 * TLS_ECDHE_RSA_WITH_NULL_SHA 00259 * TLS_ECDHE_PSK_WITH_NULL_SHA384 00260 * TLS_ECDHE_PSK_WITH_NULL_SHA256 00261 * TLS_ECDHE_PSK_WITH_NULL_SHA 00262 * TLS_DHE_PSK_WITH_NULL_SHA384 00263 * TLS_DHE_PSK_WITH_NULL_SHA256 00264 * TLS_DHE_PSK_WITH_NULL_SHA 00265 * TLS_RSA_WITH_NULL_SHA256 00266 * TLS_RSA_WITH_NULL_SHA 00267 * TLS_RSA_WITH_NULL_MD5 00268 * TLS_RSA_PSK_WITH_NULL_SHA384 00269 * TLS_RSA_PSK_WITH_NULL_SHA256 00270 * TLS_RSA_PSK_WITH_NULL_SHA 00271 * TLS_PSK_WITH_NULL_SHA384 00272 * TLS_PSK_WITH_NULL_SHA256 00273 * TLS_PSK_WITH_NULL_SHA 00274 * 00275 * Uncomment this macro to enable the NULL cipher and ciphersuites 00276 #define POLARSSL_CIPHER_NULL_CIPHER 00277 */ 00278 00279 /** 00280 * \def POLARSSL_CIPHER_PADDING_XXX 00281 * 00282 * Uncomment or comment macros to add support for specific padding modes 00283 * in the cipher layer with cipher modes that support padding (e.g. CBC) 00284 * 00285 * If you disable all padding modes, only full blocks can be used with CBC. 00286 * 00287 * Enable padding modes in the cipher layer. 00288 */ 00289 #define POLARSSL_CIPHER_PADDING_PKCS7 00290 #define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS 00291 #define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN 00292 #define POLARSSL_CIPHER_PADDING_ZEROS 00293 00294 /** 00295 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES 00296 * 00297 * Enable weak ciphersuites in SSL / TLS. 00298 * Warning: Only do so when you know what you are doing. This allows for 00299 * channels with virtually no security at all! 00300 * 00301 * This enables the following ciphersuites: 00302 * TLS_RSA_WITH_DES_CBC_SHA 00303 * TLS_DHE_RSA_WITH_DES_CBC_SHA 00304 * 00305 * Uncomment this macro to enable weak ciphersuites 00306 #define POLARSSL_ENABLE_WEAK_CIPHERSUITES 00307 */ 00308 00309 /** 00310 * \def POLARSSL_ECP_XXXX_ENABLED 00311 * 00312 * Enables specific curves within the Elliptic Curve module. 00313 * By default all supported curves are enabled. 00314 * 00315 * Comment macros to disable the curve and functions for it 00316 00317 #define POLARSSL_ECP_DP_SECP192R1_ENABLED 00318 #define POLARSSL_ECP_DP_SECP224R1_ENABLED 00319 #define POLARSSL_ECP_DP_SECP256R1_ENABLED 00320 #define POLARSSL_ECP_DP_SECP384R1_ENABLED 00321 #define POLARSSL_ECP_DP_SECP521R1_ENABLED 00322 #define POLARSSL_ECP_DP_SECP192K1_ENABLED 00323 #define POLARSSL_ECP_DP_SECP224K1_ENABLED 00324 #define POLARSSL_ECP_DP_SECP256K1_ENABLED 00325 #define POLARSSL_ECP_DP_BP256R1_ENABLED 00326 #define POLARSSL_ECP_DP_BP384R1_ENABLED 00327 #define POLARSSL_ECP_DP_BP512R1_ENABLED 00328 //#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet! 00329 #define POLARSSL_ECP_DP_M255_ENABLED 00330 //#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet! 00331 //#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet! 00332 00333 */ 00334 /** 00335 * \def POLARSSL_ECP_NIST_OPTIM 00336 * 00337 * Enable specific 'modulo p' routines for each NIST prime. 00338 * Depending on the prime and architecture, makes operations 4 to 8 times 00339 * faster on the corresponding curve. 00340 * 00341 * Comment this macro to disable NIST curves optimisation. 00342 */ 00343 //#define POLARSSL_ECP_NIST_OPTIM 00344 00345 /** 00346 * \def POLARSSL_ECDSA_DETERMINISTIC 00347 * 00348 * Enable deterministic ECDSA (RFC 6979). 00349 * Standard ECDSA is "fragile" in the sense that lack of entropy when signing 00350 * may result in a compromise of the long-term signing key. This is avoided by 00351 * the deterministic variant. 00352 * 00353 * Requires: POLARSSL_HMAC_DRBG_C 00354 * 00355 * Comment this macro to disable deterministic ECDSA. 00356 */ 00357 //#define POLARSSL_ECDSA_DETERMINISTIC 00358 00359 /** 00360 * \def POLARSSL_KEY_EXCHANGE_PSK_ENABLED 00361 * 00362 * Enable the PSK based ciphersuite modes in SSL / TLS. 00363 * 00364 * This enables the following ciphersuites (if other requisites are 00365 * enabled as well): 00366 * TLS_PSK_WITH_AES_256_GCM_SHA384 00367 * TLS_PSK_WITH_AES_256_CBC_SHA384 00368 * TLS_PSK_WITH_AES_256_CBC_SHA 00369 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 00370 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 00371 * TLS_PSK_WITH_AES_128_GCM_SHA256 00372 * TLS_PSK_WITH_AES_128_CBC_SHA256 00373 * TLS_PSK_WITH_AES_128_CBC_SHA 00374 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 00375 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 00376 * TLS_PSK_WITH_3DES_EDE_CBC_SHA 00377 * TLS_PSK_WITH_RC4_128_SHA 00378 */ 00379 #define POLARSSL_KEY_EXCHANGE_PSK_ENABLED 00380 00381 /** 00382 * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED 00383 * 00384 * Enable the DHE-PSK based ciphersuite modes in SSL / TLS. 00385 * 00386 * Requires: POLARSSL_DHM_C 00387 * 00388 * This enables the following ciphersuites (if other requisites are 00389 * enabled as well): 00390 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 00391 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 00392 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA 00393 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 00394 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 00395 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 00396 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 00397 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA 00398 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 00399 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 00400 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA 00401 * TLS_DHE_PSK_WITH_RC4_128_SHA 00402 */ 00403 //#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED 00404 00405 /** 00406 * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED 00407 * 00408 * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS. 00409 * 00410 * Requires: POLARSSL_ECDH_C 00411 * 00412 * This enables the following ciphersuites (if other requisites are 00413 * enabled as well): 00414 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 00415 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA 00416 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 00417 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 00418 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA 00419 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 00420 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 00421 * TLS_ECDHE_PSK_WITH_RC4_128_SHA 00422 */ 00423 //#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED 00424 00425 /** 00426 * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED 00427 * 00428 * Enable the RSA-PSK based ciphersuite modes in SSL / TLS. 00429 * 00430 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15, 00431 * POLARSSL_X509_CRT_PARSE_C 00432 * 00433 * This enables the following ciphersuites (if other requisites are 00434 * enabled as well): 00435 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 00436 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 00437 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA 00438 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 00439 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 00440 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 00441 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 00442 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA 00443 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 00444 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 00445 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA 00446 * TLS_RSA_PSK_WITH_RC4_128_SHA 00447 */ 00448 //#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED 00449 00450 /** 00451 * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED 00452 * 00453 * Enable the RSA-only based ciphersuite modes in SSL / TLS. 00454 * 00455 * Requires: POLARSSL_RSA_C, POLARSSL_PKCS1_V15, 00456 * POLARSSL_X509_CRT_PARSE_C 00457 * 00458 * This enables the following ciphersuites (if other requisites are 00459 * enabled as well): 00460 * TLS_RSA_WITH_AES_256_GCM_SHA384 00461 * TLS_RSA_WITH_AES_256_CBC_SHA256 00462 * TLS_RSA_WITH_AES_256_CBC_SHA 00463 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 00464 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 00465 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA 00466 * TLS_RSA_WITH_AES_128_GCM_SHA256 00467 * TLS_RSA_WITH_AES_128_CBC_SHA256 00468 * TLS_RSA_WITH_AES_128_CBC_SHA 00469 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 00470 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 00471 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA 00472 * TLS_RSA_WITH_3DES_EDE_CBC_SHA 00473 * TLS_RSA_WITH_RC4_128_SHA 00474 * TLS_RSA_WITH_RC4_128_MD5 00475 */ 00476 //#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED 00477 00478 /** 00479 * \def POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED 00480 * 00481 * Enable the DHE-RSA based ciphersuite modes in SSL / TLS. 00482 * 00483 * Requires: POLARSSL_DHM_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15, 00484 * POLARSSL_X509_CRT_PARSE_C 00485 * 00486 * This enables the following ciphersuites (if other requisites are 00487 * enabled as well): 00488 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 00489 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 00490 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA 00491 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 00492 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 00493 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 00494 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 00495 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 00496 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA 00497 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 00498 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 00499 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 00500 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA 00501 */ 00502 //#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED 00503 00504 /** 00505 * \def POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED 00506 * 00507 * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS. 00508 * 00509 * Requires: POLARSSL_ECDH_C, POLARSSL_RSA_C, POLARSSL_PKCS1_V15, 00510 * POLARSSL_X509_CRT_PARSE_C 00511 * 00512 * This enables the following ciphersuites (if other requisites are 00513 * enabled as well): 00514 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 00515 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 00516 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 00517 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 00518 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 00519 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 00520 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 00521 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 00522 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 00523 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 00524 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 00525 * TLS_ECDHE_RSA_WITH_RC4_128_SHA 00526 */ 00527 //#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED 00528 00529 /** 00530 * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED 00531 * 00532 * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS. 00533 * 00534 * Requires: POLARSSL_ECDH_C, POLARSSL_ECDSA_C, POLARSSL_X509_CRT_PARSE_C, 00535 * 00536 * This enables the following ciphersuites (if other requisites are 00537 * enabled as well): 00538 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 00539 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 00540 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 00541 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 00542 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 00543 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 00544 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 00545 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 00546 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 00547 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 00548 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA 00549 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA 00550 */ 00551 //#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED 00552 00553 /** 00554 * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED 00555 * 00556 * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS. 00557 * 00558 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C 00559 * 00560 * This enables the following ciphersuites (if other requisites are 00561 * enabled as well): 00562 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA 00563 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 00564 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 00565 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 00566 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 00567 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 00568 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 00569 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 00570 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 00571 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 00572 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 00573 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 00574 */ 00575 //#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED 00576 00577 /** 00578 * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED 00579 * 00580 * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS. 00581 * 00582 * Requires: POLARSSL_ECDH_C, POLARSSL_X509_CRT_PARSE_C 00583 * 00584 * This enables the following ciphersuites (if other requisites are 00585 * enabled as well): 00586 * TLS_ECDH_RSA_WITH_RC4_128_SHA 00587 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 00588 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 00589 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 00590 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 00591 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 00592 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 00593 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 00594 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 00595 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 00596 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 00597 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 00598 */ 00599 //#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED 00600 00601 /** 00602 * \def POLARSSL_PK_PARSE_EC_EXTENDED 00603 * 00604 * Enhance support for reading EC keys using variants of SEC1 not allowed by 00605 * RFC 5915 and RFC 5480. 00606 * 00607 * Currently this means parsing the SpecifiedECDomain choice of EC 00608 * parameters (only known groups are supported, not arbitrary domains, to 00609 * avoid validation issues). 00610 * 00611 * Disable if you only need to support RFC 5915 + 5480 key formats. 00612 */ 00613 //#define POLARSSL_PK_PARSE_EC_EXTENDED 00614 00615 /** 00616 * \def POLARSSL_ERROR_STRERROR_BC 00617 * 00618 * Make available the backward compatible error_strerror() next to the 00619 * current polarssl_strerror(). 00620 * 00621 * Disable if you run into name conflicts and want to really remove the 00622 * error_strerror() 00623 */ 00624 #define POLARSSL_ERROR_STRERROR_BC 00625 00626 /** 00627 * \def POLARSSL_ERROR_STRERROR_DUMMY 00628 * 00629 * Enable a dummy error function to make use of polarssl_strerror() in 00630 * third party libraries easier. 00631 * 00632 * Disable if you run into name conflicts and want to really remove the 00633 * polarssl_strerror() 00634 */ 00635 #define POLARSSL_ERROR_STRERROR_DUMMY 00636 00637 /** 00638 * \def POLARSSL_GENPRIME 00639 * 00640 * Enable the prime-number generation code. 00641 * 00642 * Requires: POLARSSL_BIGNUM_C 00643 */ 00644 //#define POLARSSL_GENPRIME 00645 00646 /** 00647 * \def POLARSSL_FS_IO 00648 * 00649 * Enable functions that use the filesystem. 00650 */ 00651 //#define POLARSSL_FS_IO 00652 00653 /** 00654 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES 00655 * 00656 * Do not add default entropy sources. These are the platform specific, 00657 * hardclock and HAVEGE based poll functions. 00658 * 00659 * This is useful to have more control over the added entropy sources in an 00660 * application. 00661 * 00662 * Uncomment this macro to prevent loading of default entropy functions. 00663 */ 00664 #define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES 00665 00666 /** 00667 * \def POLARSSL_NO_PLATFORM_ENTROPY 00668 * 00669 * Do not use built-in platform entropy functions. 00670 * This is useful if your platform does not support 00671 * standards like the /dev/urandom or Windows CryptoAPI. 00672 * 00673 * Uncomment this macro to disable the built-in platform entropy functions. 00674 */ 00675 #define POLARSSL_NO_PLATFORM_ENTROPY 00676 00677 /** 00678 * \def POLARSSL_ENTROPY_FORCE_SHA256 00679 * 00680 * Force the entropy accumulator to use a SHA-256 accumulator instead of the 00681 * default SHA-512 based one (if both are available). 00682 * 00683 * Requires: POLARSSL_SHA256_C 00684 * 00685 * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option 00686 * if you have performance concerns. 00687 * 00688 * This option is only useful if both POLARSSL_SHA256_C and 00689 * POLARSSL_SHA512_C are defined. Otherwise the available hash module is used. 00690 */ 00691 //#define POLARSSL_ENTROPY_FORCE_SHA256 00692 00693 /** 00694 * \def POLARSSL_MEMORY_DEBUG 00695 * 00696 * Enable debugging of buffer allocator memory issues. Automatically prints 00697 * (to stderr) all (fatal) messages on memory allocation issues. Enables 00698 * function for 'debug output' of allocated memory. 00699 * 00700 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C 00701 * 00702 * Uncomment this macro to let the buffer allocator print out error messages. 00703 */ 00704 #define POLARSSL_MEMORY_DEBUG 00705 00706 /** 00707 * \def POLARSSL_MEMORY_BACKTRACE 00708 * 00709 * Include backtrace information with each allocated block. 00710 * 00711 * Requires: POLARSSL_MEMORY_BUFFER_ALLOC_C 00712 * GLIBC-compatible backtrace() an backtrace_symbols() support 00713 * 00714 * Uncomment this macro to include backtrace information 00715 */ 00716 //#define POLARSSL_MEMORY_BACKTRACE 00717 00718 /** 00719 * \def POLARSSL_PKCS1_V15 00720 * 00721 * Enable support for PKCS#1 v1.5 encoding. 00722 * 00723 * Requires: POLARSSL_RSA_C 00724 * 00725 * This enables support for PKCS#1 v1.5 operations. 00726 */ 00727 //#define POLARSSL_PKCS1_V15 00728 00729 /** 00730 * \def POLARSSL_PKCS1_V21 00731 * 00732 * Enable support for PKCS#1 v2.1 encoding. 00733 * 00734 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C 00735 * 00736 * This enables support for RSAES-OAEP and RSASSA-PSS operations. 00737 */ 00738 //#define POLARSSL_PKCS1_V21 00739 00740 /** 00741 * \def POLARSSL_RSA_NO_CRT 00742 * 00743 * Do not use the Chinese Remainder Theorem for the RSA private operation. 00744 * 00745 * Uncomment this macro to disable the use of CRT in RSA. 00746 * 00747 */ 00748 //#define POLARSSL_RSA_NO_CRT 00749 00750 /** 00751 * \def POLARSSL_SELF_TEST 00752 * 00753 * Enable the checkup functions (*_self_test). 00754 */ 00755 #define POLARSSL_SELF_TEST 00756 00757 /** 00758 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES 00759 * 00760 * Enable sending of alert messages in case of encountered errors as per RFC. 00761 * If you choose not to send the alert messages, PolarSSL can still communicate 00762 * with other servers, only debugging of failures is harder. 00763 * 00764 * The advantage of not sending alert messages, is that no information is given 00765 * about reasons for failures thus preventing adversaries of gaining intel. 00766 * 00767 * Enable sending of all alert messages 00768 */ 00769 #define POLARSSL_SSL_ALERT_MESSAGES 00770 00771 /** 00772 * \def POLARSSL_SSL_DEBUG_ALL 00773 * 00774 * Enable the debug messages in SSL module for all issues. 00775 * Debug messages have been disabled in some places to prevent timing 00776 * attacks due to (unbalanced) debugging function calls. 00777 * 00778 * If you need all error reporting you should enable this during debugging, 00779 * but remove this for production servers that should log as well. 00780 * 00781 * Uncomment this macro to report all debug messages on errors introducing 00782 * a timing side-channel. 00783 * 00784 */ 00785 #define POLARSSL_SSL_DEBUG_ALL 00786 00787 /** 00788 * \def POLARSSL_SSL_HW_RECORD_ACCEL 00789 * 00790 * Enable hooking functions in SSL module for hardware acceleration of 00791 * individual records. 00792 * 00793 * Uncomment this macro to enable hooking functions. 00794 */ 00795 //#define POLARSSL_SSL_HW_RECORD_ACCEL 00796 00797 /** 00798 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO 00799 * 00800 * Enable support for receiving and parsing SSLv2 Client Hello messages for the 00801 * SSL Server module (POLARSSL_SSL_SRV_C). 00802 * 00803 * Comment this macro to disable support for SSLv2 Client Hello messages. 00804 */ 00805 //#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO 00806 00807 /** 00808 * \def POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE 00809 * 00810 * Pick the ciphersuite according to the client's preferences rather than ours 00811 * in the SSL Server module (POLARSSL_SSL_SRV_C). 00812 * 00813 * Uncomment this macro to respect client's ciphersuite order 00814 */ 00815 //#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE 00816 00817 /** 00818 * \def POLARSSL_SSL_MAX_FRAGMENT_LENGTH 00819 * 00820 * Enable support for RFC 6066 max_fragment_length extension in SSL. 00821 * 00822 * Comment this macro to disable support for the max_fragment_length extension 00823 */ 00824 #define POLARSSL_SSL_MAX_FRAGMENT_LENGTH 00825 00826 /** 00827 * \def POLARSSL_SSL_PROTO_SSL3 00828 * 00829 * Enable support for SSL 3.0. 00830 * 00831 * Requires: POLARSSL_MD5_C 00832 * POLARSSL_SHA1_C 00833 * 00834 * Comment this macro to disable support for SSL 3.0 00835 */ 00836 //#define POLARSSL_SSL_PROTO_SSL3 00837 00838 /** 00839 * \def POLARSSL_SSL_PROTO_TLS1 00840 * 00841 * Enable support for TLS 1.0. 00842 * 00843 * Requires: POLARSSL_MD5_C 00844 * POLARSSL_SHA1_C 00845 * 00846 * Comment this macro to disable support for TLS 1.0 00847 */ 00848 //#define POLARSSL_SSL_PROTO_TLS1 00849 00850 /** 00851 * \def POLARSSL_SSL_PROTO_TLS1_1 00852 * 00853 * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled). 00854 * 00855 * Requires: POLARSSL_MD5_C 00856 * POLARSSL_SHA1_C 00857 * 00858 * Comment this macro to disable support for TLS 1.1 / DTLS 1.0 00859 */ 00860 //#define POLARSSL_SSL_PROTO_TLS1_1 00861 00862 /** 00863 * \def POLARSSL_SSL_PROTO_TLS1_2 00864 * 00865 * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled). 00866 * 00867 * Requires: POLARSSL_SHA1_C or POLARSSL_SHA256_C or POLARSSL_SHA512_C 00868 * (Depends on ciphersuites) 00869 * 00870 * Comment this macro to disable support for TLS 1.2 / DTLS 1.2 00871 */ 00872 #define POLARSSL_SSL_PROTO_TLS1_2 00873 00874 /** 00875 * \def POLARSSL_SSL_PROTO_DTLS 00876 * 00877 * Enable support for DTLS (all available versions). 00878 * 00879 * Enable this and POLARSSL_SSL_PROTO_TLS11 to enable DTLS 1.0, 00880 * and/or this and POLARSSL_SSL_PROTO_TLS12 to enable DTLS 1.2. 00881 * 00882 * Requires: POLARSSL_SSL_PROTO_TLS11 00883 * or POLARSSL_SSL_PROTO_TLS12 00884 * 00885 * Comment this macro to disable support for DTLS 00886 */ 00887 #define POLARSSL_SSL_PROTO_DTLS 00888 00889 /** 00890 * \def POLARSSL_SSL_SESSION_TICKETS 00891 * 00892 * Enable support for RFC 5077 session tickets in SSL. 00893 * 00894 * Requires: POLARSSL_AES_C 00895 * POLARSSL_SHA256_C 00896 * POLARSSL_CIPHER_MODE_CBC 00897 * 00898 * Comment this macro to disable support for SSL session tickets 00899 */ 00900 //#define POLARSSL_SSL_SESSION_TICKETS 00901 00902 /** 00903 * \def POLARSSL_SSL_SERVER_NAME_INDICATION 00904 * 00905 * Enable support for RFC 6066 server name indication (SNI) in SSL. 00906 * 00907 * Comment this macro to disable support for server name indication in SSL 00908 */ 00909 //#define POLARSSL_SSL_SERVER_NAME_INDICATION 00910 00911 /** 00912 * \def POLARSSL_SSL_TRUNCATED_HMAC 00913 * 00914 * Enable support for RFC 6066 truncated HMAC in SSL. 00915 * 00916 * Comment this macro to disable support for truncated HMAC in SSL 00917 */ 00918 #define POLARSSL_SSL_TRUNCATED_HMAC 00919 00920 /** 00921 * \def POLARSSL_SSL_SET_CURVES 00922 * 00923 * Enable ssl_set_curves(). 00924 * 00925 * This is disabled by default since it breaks binary compatibility with the 00926 * 1.3.x line. If you choose to enable it, you will need to rebuild your 00927 * application against the new header files, relinking will not be enough. 00928 * It will be enabled by default, or no longer an option, in the 1.4 branch. 00929 * 00930 * Uncomment to make ssl_set_curves() available. 00931 */ 00932 //#define POLARSSL_SSL_SET_CURVES 00933 00934 /** 00935 * \def POLARSSL_THREADING_ALT 00936 * 00937 * Provide your own alternate threading implementation. 00938 * 00939 * Requires: POLARSSL_THREADING_C 00940 * 00941 * Uncomment this to allow your own alternate threading implementation. 00942 */ 00943 //#define POLARSSL_THREADING_ALT 00944 00945 /** 00946 * \def POLARSSL_THREADING_PTHREAD 00947 * 00948 * Enable the pthread wrapper layer for the threading layer. 00949 * 00950 * Requires: POLARSSL_THREADING_C 00951 * 00952 * Uncomment this to enable pthread mutexes. 00953 */ 00954 //#define POLARSSL_THREADING_PTHREAD 00955 00956 /** 00957 * \def POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3 00958 * 00959 * If set, the X509 parser will not break-off when parsing an X509 certificate 00960 * and encountering an extension in a v1 or v2 certificate. 00961 * 00962 * Uncomment to prevent an error. 00963 */ 00964 //#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3 00965 00966 /** 00967 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION 00968 * 00969 * If set, the X509 parser will not break-off when parsing an X509 certificate 00970 * and encountering an unknown critical extension. 00971 * 00972 * Uncomment to prevent an error. 00973 */ 00974 //#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION 00975 00976 /** 00977 * \def POLARSSL_ZLIB_SUPPORT 00978 * 00979 * If set, the SSL/TLS module uses ZLIB to support compression and 00980 * decompression of packet data. 00981 * 00982 * \warning TLS-level compression MAY REDUCE SECURITY! See for example the 00983 * CRIME attack. Before enabling this option, you should examine with care if 00984 * CRIME or similar exploits may be a applicable to your use case. 00985 * 00986 * Used in: library/ssl_tls.c 00987 * library/ssl_cli.c 00988 * library/ssl_srv.c 00989 * 00990 * This feature requires zlib library and headers to be present. 00991 * 00992 * Uncomment to enable use of ZLIB 00993 */ 00994 //#define POLARSSL_ZLIB_SUPPORT 00995 /* \} name SECTION: PolarSSL feature support */ 00996 00997 /** 00998 * \name SECTION: PolarSSL modules 00999 * 01000 * This section enables or disables entire modules in PolarSSL 01001 * \{ 01002 */ 01003 01004 /** 01005 * \def POLARSSL_AESNI_C 01006 * 01007 * Enable AES-NI support on x86-64. 01008 * 01009 * Module: library/aesni.c 01010 * Caller: library/aes.c 01011 * 01012 * Requires: POLARSSL_HAVE_ASM 01013 * 01014 * This modules adds support for the AES-NI instructions on x86-64 01015 */ 01016 //#define POLARSSL_AESNI_C 01017 01018 /** 01019 * \def POLARSSL_AES_C 01020 * 01021 * Enable the AES block cipher. 01022 * 01023 * Module: library/aes.c 01024 * Caller: library/ssl_tls.c 01025 * library/pem.c 01026 * library/ctr_drbg.c 01027 * 01028 * This module enables the following ciphersuites (if other requisites are 01029 * enabled as well): 01030 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 01031 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 01032 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 01033 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 01034 * TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 01035 * TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 01036 * TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 01037 * TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 01038 * TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 01039 * TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 01040 * TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 01041 * TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 01042 * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 01043 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 01044 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 01045 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 01046 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 01047 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 01048 * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 01049 * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 01050 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA 01051 * TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 01052 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 01053 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 01054 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 01055 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 01056 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 01057 * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 01058 * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 01059 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA 01060 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 01061 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 01062 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 01063 * TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA 01064 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA 01065 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 01066 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 01067 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 01068 * TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA 01069 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA 01070 * TLS_RSA_WITH_AES_256_GCM_SHA384 01071 * TLS_RSA_WITH_AES_256_CBC_SHA256 01072 * TLS_RSA_WITH_AES_256_CBC_SHA 01073 * TLS_RSA_WITH_AES_128_GCM_SHA256 01074 * TLS_RSA_WITH_AES_128_CBC_SHA256 01075 * TLS_RSA_WITH_AES_128_CBC_SHA 01076 * TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 01077 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 01078 * TLS_RSA_PSK_WITH_AES_256_CBC_SHA 01079 * TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 01080 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 01081 * TLS_RSA_PSK_WITH_AES_128_CBC_SHA 01082 * TLS_PSK_WITH_AES_256_GCM_SHA384 01083 * TLS_PSK_WITH_AES_256_CBC_SHA384 01084 * TLS_PSK_WITH_AES_256_CBC_SHA 01085 * TLS_PSK_WITH_AES_128_GCM_SHA256 01086 * TLS_PSK_WITH_AES_128_CBC_SHA256 01087 * TLS_PSK_WITH_AES_128_CBC_SHA 01088 * 01089 * PEM_PARSE uses AES for decrypting encrypted keys. 01090 */ 01091 #define POLARSSL_AES_C 01092 01093 /** 01094 * \def POLARSSL_ARC4_C 01095 * 01096 * Enable the ARCFOUR stream cipher. 01097 * 01098 * Module: library/arc4.c 01099 * Caller: library/ssl_tls.c 01100 * 01101 * This module enables the following ciphersuites (if other requisites are 01102 * enabled as well): 01103 * TLS_ECDH_ECDSA_WITH_RC4_128_SHA 01104 * TLS_ECDH_RSA_WITH_RC4_128_SHA 01105 * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA 01106 * TLS_ECDHE_RSA_WITH_RC4_128_SHA 01107 * TLS_ECDHE_PSK_WITH_RC4_128_SHA 01108 * TLS_DHE_PSK_WITH_RC4_128_SHA 01109 * TLS_RSA_WITH_RC4_128_SHA 01110 * TLS_RSA_WITH_RC4_128_MD5 01111 * TLS_RSA_PSK_WITH_RC4_128_SHA 01112 * TLS_PSK_WITH_RC4_128_SHA 01113 */ 01114 //#define POLARSSL_ARC4_C 01115 01116 /** 01117 * \def POLARSSL_ASN1_PARSE_C 01118 * 01119 * Enable the generic ASN1 parser. 01120 * 01121 * Module: library/asn1.c 01122 * Caller: library/x509.c 01123 * library/dhm.c 01124 * library/pkcs12.c 01125 * library/pkcs5.c 01126 * library/pkparse.c 01127 */ 01128 //#define POLARSSL_ASN1_PARSE_C 01129 01130 /** 01131 * \def POLARSSL_ASN1_WRITE_C 01132 * 01133 * Enable the generic ASN1 writer. 01134 * 01135 * Module: library/asn1write.c 01136 * Caller: library/ecdsa.c 01137 * library/pkwrite.c 01138 * library/x509_create.c 01139 * library/x509write_crt.c 01140 * library/x509write_csr.c 01141 */ 01142 //#define POLARSSL_ASN1_WRITE_C 01143 01144 /** 01145 * \def POLARSSL_BASE64_C 01146 * 01147 * Enable the Base64 module. 01148 * 01149 * Module: library/base64.c 01150 * Caller: library/pem.c 01151 * 01152 * This module is required for PEM support (required by X.509). 01153 */ 01154 //#define POLARSSL_BASE64_C 01155 01156 /** 01157 * \def POLARSSL_BIGNUM_C 01158 * 01159 * Enable the multi-precision integer library. 01160 * 01161 * Module: library/bignum.c 01162 * Caller: library/dhm.c 01163 * library/ecp.c 01164 * library/rsa.c 01165 * library/ssl_tls.c 01166 * 01167 * This module is required for RSA and DHM support. 01168 */ 01169 //#define POLARSSL_BIGNUM_C 01170 01171 /** 01172 * \def POLARSSL_BLOWFISH_C 01173 * 01174 * Enable the Blowfish block cipher. 01175 * 01176 * Module: library/blowfish.c 01177 */ 01178 //#define POLARSSL_BLOWFISH_C 01179 01180 /** 01181 * \def POLARSSL_CAMELLIA_C 01182 * 01183 * Enable the Camellia block cipher. 01184 * 01185 * Module: library/camellia.c 01186 * Caller: library/ssl_tls.c 01187 * 01188 * This module enables the following ciphersuites (if other requisites are 01189 * enabled as well): 01190 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 01191 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 01192 * TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 01193 * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 01194 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 01195 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 01196 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 01197 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 01198 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 01199 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 01200 * TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 01201 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 01202 * TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 01203 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 01204 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 01205 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 01206 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 01207 * TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 01208 * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 01209 * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 01210 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 01211 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 01212 * TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 01213 * TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 01214 * TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 01215 * TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 01216 * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 01217 * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 01218 * TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 01219 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 01220 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA 01221 * TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 01222 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 01223 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA 01224 * TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 01225 * TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 01226 * TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 01227 * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 01228 * TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 01229 * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 01230 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 01231 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 01232 */ 01233 //#define POLARSSL_CAMELLIA_C 01234 01235 /** 01236 * \def POLARSSL_CERTS_C 01237 * 01238 * Enable the test certificates. 01239 * 01240 * Module: library/certs.c 01241 * Caller: 01242 * 01243 * Requires: POLARSSL_PEM_PARSE_C 01244 * 01245 * This module is used for testing (ssl_client/server). 01246 */ 01247 //#define POLARSSL_CERTS_C 01248 01249 /** 01250 * \def POLARSSL_CIPHER_C 01251 * 01252 * Enable the generic cipher layer. 01253 * 01254 * Module: library/cipher.c 01255 * Caller: library/ssl_tls.c 01256 * 01257 * Uncomment to enable generic cipher wrappers. 01258 */ 01259 #define POLARSSL_CIPHER_C 01260 01261 /** 01262 * \def POLARSSL_CTR_DRBG_C 01263 * 01264 * Enable the CTR_DRBG AES-256-based random generator. 01265 * 01266 * Module: library/ctr_drbg.c 01267 * Caller: 01268 * 01269 * Requires: POLARSSL_AES_C 01270 * 01271 * This module provides the CTR_DRBG AES-256 random number generator. 01272 */ 01273 //#define POLARSSL_CTR_DRBG_C 01274 01275 /** 01276 * \def POLARSSL_DEBUG_C 01277 * 01278 * Enable the debug functions. 01279 * 01280 * Module: library/debug.c 01281 * Caller: library/ssl_cli.c 01282 * library/ssl_srv.c 01283 * library/ssl_tls.c 01284 * 01285 * This module provides debugging functions. 01286 */ 01287 #define POLARSSL_DEBUG_C 01288 01289 /** 01290 * \def POLARSSL_DES_C 01291 * 01292 * Enable the DES block cipher. 01293 * 01294 * Module: library/des.c 01295 * Caller: library/pem.c 01296 * library/ssl_tls.c 01297 * 01298 * This module enables the following ciphersuites (if other requisites are 01299 * enabled as well): 01300 * TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 01301 * TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 01302 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA 01303 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 01304 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA 01305 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 01306 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA 01307 * TLS_RSA_WITH_3DES_EDE_CBC_SHA 01308 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA 01309 * TLS_PSK_WITH_3DES_EDE_CBC_SHA 01310 * 01311 * PEM_PARSE uses DES/3DES for decrypting encrypted keys. 01312 */ 01313 //#define POLARSSL_DES_C 01314 01315 /** 01316 * \def POLARSSL_DHM_C 01317 * 01318 * Enable the Diffie-Hellman-Merkle module. 01319 * 01320 * Module: library/dhm.c 01321 * Caller: library/ssl_cli.c 01322 * library/ssl_srv.c 01323 * 01324 * This module is used by the following key exchanges: 01325 * DHE-RSA, DHE-PSK 01326 */ 01327 //#define POLARSSL_DHM_C 01328 01329 /** 01330 * \def POLARSSL_ECDH_C 01331 * 01332 * Enable the elliptic curve Diffie-Hellman library. 01333 * 01334 * Module: library/ecdh.c 01335 * Caller: library/ssl_cli.c 01336 * library/ssl_srv.c 01337 * 01338 * This module is used by the following key exchanges: 01339 * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK 01340 * 01341 * Requires: POLARSSL_ECP_C 01342 */ 01343 //#define POLARSSL_ECDH_C 01344 01345 /** 01346 * \def POLARSSL_ECDSA_C 01347 * 01348 * Enable the elliptic curve DSA library. 01349 * 01350 * Module: library/ecdsa.c 01351 * Caller: 01352 * 01353 * This module is used by the following key exchanges: 01354 * ECDHE-ECDSA 01355 * 01356 * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C 01357 */ 01358 //#define POLARSSL_ECDSA_C 01359 01360 /** 01361 * \def POLARSSL_ECP_C 01362 * 01363 * Enable the elliptic curve over GF(p) library. 01364 * 01365 * Module: library/ecp.c 01366 * Caller: library/ecdh.c 01367 * library/ecdsa.c 01368 * 01369 * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED 01370 */ 01371 //#define POLARSSL_ECP_C 01372 01373 /** 01374 * \def POLARSSL_ENTROPY_C 01375 * 01376 * Enable the platform-specific entropy code. 01377 * 01378 * Module: library/entropy.c 01379 * Caller: 01380 * 01381 * Requires: POLARSSL_SHA512_C or POLARSSL_SHA256_C 01382 * 01383 * This module provides a generic entropy pool 01384 */ 01385 //#define POLARSSL_ENTROPY_C 01386 01387 /** 01388 * \def POLARSSL_ERROR_C 01389 * 01390 * Enable error code to error string conversion. 01391 * 01392 * Module: library/error.c 01393 * Caller: 01394 * 01395 * This module enables err_strerror(). 01396 */ 01397 //#define POLARSSL_ERROR_C 01398 01399 /** 01400 * \def POLARSSL_GCM_C 01401 * 01402 * Enable the Galois/Counter Mode (GCM) for AES. 01403 * 01404 * Module: library/gcm.c 01405 * 01406 * Requires: POLARSSL_AES_C or POLARSSL_CAMELLIA_C 01407 * 01408 * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other 01409 * requisites are enabled as well. 01410 */ 01411 #define POLARSSL_GCM_C 01412 01413 /** 01414 * \def POLARSSL_HAVEGE_C 01415 * 01416 * Enable the HAVEGE random generator. 01417 * 01418 * Warning: the HAVEGE random generator is not suitable for virtualized 01419 * environments 01420 * 01421 * Warning: the HAVEGE random generator is dependent on timing and specific 01422 * processor traits. It is therefore not advised to use HAVEGE as 01423 * your applications primary random generator or primary entropy pool 01424 * input. As a secondary input to your entropy pool, it IS able add 01425 * the (limited) extra entropy it provides. 01426 * 01427 * Module: library/havege.c 01428 * Caller: 01429 * 01430 * Requires: POLARSSL_TIMING_C 01431 * 01432 * Uncomment to enable the HAVEGE random generator. 01433 */ 01434 //#define POLARSSL_HAVEGE_C 01435 01436 /** 01437 * \def POLARSSL_HMAC_DRBG_C 01438 * 01439 * Enable the HMAC_DRBG random generator. 01440 * 01441 * Module: library/hmac_drbg.c 01442 * Caller: 01443 * 01444 * Requires: POLARSSL_MD_C 01445 * 01446 * Uncomment to enable the HMAC_DRBG random number geerator. 01447 */ 01448 //#define POLARSSL_HMAC_DRBG_C 01449 01450 /** 01451 * \def POLARSSL_MD_C 01452 * 01453 * Enable the generic message digest layer. 01454 * 01455 * Module: library/md.c 01456 * Caller: 01457 * 01458 * Uncomment to enable generic message digest wrappers. 01459 */ 01460 #define POLARSSL_MD_C 01461 01462 /** 01463 * \def POLARSSL_MD2_C 01464 * 01465 * Enable the MD2 hash algorithm. 01466 * 01467 * Module: library/md2.c 01468 * Caller: 01469 * 01470 * Uncomment to enable support for (rare) MD2-signed X.509 certs. 01471 */ 01472 //#define POLARSSL_MD2_C 01473 01474 /** 01475 * \def POLARSSL_MD4_C 01476 * 01477 * Enable the MD4 hash algorithm. 01478 * 01479 * Module: library/md4.c 01480 * Caller: 01481 * 01482 * Uncomment to enable support for (rare) MD4-signed X.509 certs. 01483 */ 01484 //#define POLARSSL_MD4_C 01485 01486 /** 01487 * \def POLARSSL_MD5_C 01488 * 01489 * Enable the MD5 hash algorithm. 01490 * 01491 * Module: library/md5.c 01492 * Caller: library/md.c 01493 * library/pem.c 01494 * library/ssl_tls.c 01495 * 01496 * This module is required for SSL/TLS and X.509. 01497 * PEM_PARSE uses MD5 for decrypting encrypted keys. 01498 */ 01499 //#define POLARSSL_MD5_C 01500 01501 /** 01502 * \def POLARSSL_MEMORY_C 01503 * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead. 01504 */ 01505 //#define POLARSSL_MEMORY_C 01506 01507 /** 01508 * \def POLARSSL_MEMORY_BUFFER_ALLOC_C 01509 * 01510 * Enable the buffer allocator implementation that makes use of a (stack) 01511 * based buffer to 'allocate' dynamic memory. (replaces malloc() and free() 01512 * calls) 01513 * 01514 * Module: library/memory_buffer_alloc.c 01515 * 01516 * Requires: POLARSSL_PLATFORM_C 01517 * POLARSSL_PLATFORM_MEMORY (to use it within PolarSSL) 01518 * 01519 * Enable this module to enable the buffer memory allocator. 01520 */ 01521 //#define POLARSSL_MEMORY_BUFFER_ALLOC_C 01522 01523 /** 01524 * \def POLARSSL_NET_C 01525 * 01526 * Enable the TCP/IP networking routines. 01527 * 01528 * Module: library/net.c 01529 * 01530 * This module provides TCP/IP networking routines. 01531 */ 01532 //#define POLARSSL_NET_C 01533 01534 /** 01535 * \def POLARSSL_OID_C 01536 * 01537 * Enable the OID database. 01538 * 01539 * Module: library/oid.c 01540 * Caller: library/asn1write.c 01541 * library/pkcs5.c 01542 * library/pkparse.c 01543 * library/pkwrite.c 01544 * library/rsa.c 01545 * library/x509.c 01546 * library/x509_create.c 01547 * library/x509_crl.c 01548 * library/x509_crt.c 01549 * library/x509_csr.c 01550 * library/x509write_crt.c 01551 * library/x509write_csr.c 01552 * 01553 * This modules translates between OIDs and internal values. 01554 */ 01555 //#define POLARSSL_OID_C 01556 01557 /** 01558 * \def POLARSSL_PADLOCK_C 01559 * 01560 * Enable VIA Padlock support on x86. 01561 * 01562 * Module: library/padlock.c 01563 * Caller: library/aes.c 01564 * 01565 * Requires: POLARSSL_HAVE_ASM 01566 * 01567 * This modules adds support for the VIA PadLock on x86. 01568 */ 01569 //#define POLARSSL_PADLOCK_C 01570 01571 /** 01572 * \def POLARSSL_PBKDF2_C 01573 * 01574 * Enable PKCS#5 PBKDF2 key derivation function. 01575 * DEPRECATED: Use POLARSSL_PKCS5_C instead 01576 * 01577 * Module: library/pbkdf2.c 01578 * 01579 * Requires: POLARSSL_PKCS5_C 01580 * 01581 * This module adds support for the PKCS#5 PBKDF2 key derivation function. 01582 */ 01583 //#define POLARSSL_PBKDF2_C 01584 01585 /** 01586 * \def POLARSSL_PEM_PARSE_C 01587 * 01588 * Enable PEM decoding / parsing. 01589 * 01590 * Module: library/pem.c 01591 * Caller: library/dhm.c 01592 * library/pkparse.c 01593 * library/x509_crl.c 01594 * library/x509_crt.c 01595 * library/x509_csr.c 01596 * 01597 * Requires: POLARSSL_BASE64_C 01598 * 01599 * This modules adds support for decoding / parsing PEM files. 01600 */ 01601 //#define POLARSSL_PEM_PARSE_C 01602 01603 /** 01604 * \def POLARSSL_PEM_WRITE_C 01605 * 01606 * Enable PEM encoding / writing. 01607 * 01608 * Module: library/pem.c 01609 * Caller: library/pkwrite.c 01610 * library/x509write_crt.c 01611 * library/x509write_csr.c 01612 * 01613 * Requires: POLARSSL_BASE64_C 01614 * 01615 * This modules adds support for encoding / writing PEM files. 01616 */ 01617 //#define POLARSSL_PEM_WRITE_C 01618 01619 /** 01620 * \def POLARSSL_PK_C 01621 * 01622 * Enable the generic public (asymetric) key layer. 01623 * 01624 * Module: library/pk.c 01625 * Caller: library/ssl_tls.c 01626 * library/ssl_cli.c 01627 * library/ssl_srv.c 01628 * 01629 * Requires: POLARSSL_RSA_C or POLARSSL_ECP_C 01630 * 01631 * Uncomment to enable generic public key wrappers. 01632 */ 01633 //#define POLARSSL_PK_C 01634 01635 /** 01636 * \def POLARSSL_PK_PARSE_C 01637 * 01638 * Enable the generic public (asymetric) key parser. 01639 * 01640 * Module: library/pkparse.c 01641 * Caller: library/x509_crt.c 01642 * library/x509_csr.c 01643 * 01644 * Requires: POLARSSL_PK_C 01645 * 01646 * Uncomment to enable generic public key parse functions. 01647 */ 01648 //#define POLARSSL_PK_PARSE_C 01649 01650 /** 01651 * \def POLARSSL_PK_WRITE_C 01652 * 01653 * Enable the generic public (asymetric) key writer. 01654 * 01655 * Module: library/pkwrite.c 01656 * Caller: library/x509write.c 01657 * 01658 * Requires: POLARSSL_PK_C 01659 * 01660 * Uncomment to enable generic public key write functions. 01661 */ 01662 //#define POLARSSL_PK_WRITE_C 01663 01664 /** 01665 * \def POLARSSL_PKCS5_C 01666 * 01667 * Enable PKCS#5 functions. 01668 * 01669 * Module: library/pkcs5.c 01670 * 01671 * Requires: POLARSSL_MD_C 01672 * 01673 * This module adds support for the PKCS#5 functions. 01674 */ 01675 //#define POLARSSL_PKCS5_C 01676 01677 /** 01678 * \def POLARSSL_PKCS11_C 01679 * 01680 * Enable wrapper for PKCS#11 smartcard support. 01681 * 01682 * Module: library/pkcs11.c 01683 * Caller: library/pk.c 01684 * 01685 * Requires: POLARSSL_PK_C 01686 * 01687 * This module enables SSL/TLS PKCS #11 smartcard support. 01688 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper) 01689 */ 01690 //#define POLARSSL_PKCS11_C 01691 01692 /** 01693 * \def POLARSSL_PKCS12_C 01694 * 01695 * Enable PKCS#12 PBE functions. 01696 * Adds algorithms for parsing PKCS#8 encrypted private keys 01697 * 01698 * Module: library/pkcs12.c 01699 * Caller: library/pkparse.c 01700 * 01701 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C 01702 * Can use: POLARSSL_ARC4_C 01703 * 01704 * This module enables PKCS#12 functions. 01705 */ 01706 //#define POLARSSL_PKCS12_C 01707 01708 /** 01709 * \def POLARSSL_PLATFORM_C 01710 * 01711 * Enable the platform abstraction layer that allows you to re-assign 01712 * functions like malloc(), free(), printf(), fprintf() 01713 * 01714 * Module: library/platform.c 01715 * Caller: Most other .c files 01716 * 01717 * This module enables abstraction of common (libc) functions. 01718 */ 01719 #define POLARSSL_PLATFORM_C 01720 01721 /** 01722 * \def POLARSSL_RIPEMD160_C 01723 * 01724 * Enable the RIPEMD-160 hash algorithm. 01725 * 01726 * Module: library/ripemd160.c 01727 * Caller: library/md.c 01728 * 01729 */ 01730 //#define POLARSSL_RIPEMD160_C 01731 01732 /** 01733 * \def POLARSSL_RSA_C 01734 * 01735 * Enable the RSA public-key cryptosystem. 01736 * 01737 * Module: library/rsa.c 01738 * Caller: library/ssl_cli.c 01739 * library/ssl_srv.c 01740 * library/ssl_tls.c 01741 * library/x509.c 01742 * 01743 * This module is used by the following key exchanges: 01744 * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK 01745 * 01746 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C 01747 */ 01748 //#define POLARSSL_RSA_C 01749 01750 /** 01751 * \def POLARSSL_SHA1_C 01752 * 01753 * Enable the SHA1 cryptographic hash algorithm. 01754 * 01755 * Module: library/sha1.c 01756 * Caller: library/md.c 01757 * library/ssl_cli.c 01758 * library/ssl_srv.c 01759 * library/ssl_tls.c 01760 * library/x509write_crt.c 01761 * 01762 * This module is required for SSL/TLS and SHA1-signed certificates. 01763 */ 01764 //#define POLARSSL_SHA1_C 01765 01766 /** 01767 * \def POLARSSL_SHA256_C 01768 * 01769 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms. 01770 * (Used to be POLARSSL_SHA2_C) 01771 * 01772 * Module: library/sha256.c 01773 * Caller: library/entropy.c 01774 * library/md.c 01775 * library/ssl_cli.c 01776 * library/ssl_srv.c 01777 * library/ssl_tls.c 01778 * 01779 * This module adds support for SHA-224 and SHA-256. 01780 * This module is required for the SSL/TLS 1.2 PRF function. 01781 */ 01782 #define POLARSSL_SHA256_C 01783 01784 /** 01785 * \def POLARSSL_SHA512_C 01786 * 01787 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms. 01788 * (Used to be POLARSSL_SHA4_C) 01789 * 01790 * Module: library/sha512.c 01791 * Caller: library/entropy.c 01792 * library/md.c 01793 * library/ssl_cli.c 01794 * library/ssl_srv.c 01795 * 01796 * This module adds support for SHA-384 and SHA-512. 01797 */ 01798 //#define POLARSSL_SHA512_C 01799 01800 /** 01801 * \def POLARSSL_SSL_CACHE_C 01802 * 01803 * Enable simple SSL cache implementation. 01804 * 01805 * Module: library/ssl_cache.c 01806 * Caller: 01807 * 01808 * Requires: POLARSSL_SSL_CACHE_C 01809 */ 01810 #define POLARSSL_SSL_CACHE_C 01811 01812 /** 01813 * \def POLARSSL_SSL_CLI_C 01814 * 01815 * Enable the SSL/TLS client code. 01816 * 01817 * Module: library/ssl_cli.c 01818 * Caller: 01819 * 01820 * Requires: POLARSSL_SSL_TLS_C 01821 * 01822 * This module is required for SSL/TLS client support. 01823 */ 01824 #define POLARSSL_SSL_CLI_C 01825 01826 /** 01827 * \def POLARSSL_SSL_SRV_C 01828 * 01829 * Enable the SSL/TLS server code. 01830 * 01831 * Module: library/ssl_srv.c 01832 * Caller: 01833 * 01834 * Requires: POLARSSL_SSL_TLS_C 01835 * 01836 * This module is required for SSL/TLS server support. 01837 */ 01838 //#define POLARSSL_SSL_SRV_C 01839 01840 /** 01841 * \def POLARSSL_SSL_TLS_C 01842 * 01843 * Enable the generic SSL/TLS code. 01844 * 01845 * Module: library/ssl_tls.c 01846 * Caller: library/ssl_cli.c 01847 * library/ssl_srv.c 01848 * 01849 * Requires: POLARSSL_CIPHER_C, POLARSSL_MD_C 01850 * and at least one of the POLARSSL_SSL_PROTO_* defines 01851 * 01852 * This module is required for SSL/TLS. 01853 */ 01854 #define POLARSSL_SSL_TLS_C 01855 01856 /** 01857 * \def POLARSSL_THREADING_C 01858 * 01859 * Enable the threading abstraction layer. 01860 * By default PolarSSL assumes it is used in a non-threaded environment or that 01861 * contexts are not shared between threads. If you do intend to use contexts 01862 * between threads, you will need to enable this layer to prevent race 01863 * conditions. 01864 * 01865 * Module: library/threading.c 01866 * 01867 * This allows different threading implementations (self-implemented or 01868 * provided). 01869 * 01870 * You will have to enable either POLARSSL_THREADING_ALT or 01871 * POLARSSL_THREADING_PTHREAD. 01872 * 01873 * Enable this layer to allow use of mutexes within PolarSSL 01874 */ 01875 //#define POLARSSL_THREADING_C 01876 01877 /** 01878 * \def POLARSSL_TIMING_C 01879 * 01880 * Enable the portable timing interface. 01881 * 01882 * Module: library/timing.c 01883 * Caller: library/havege.c 01884 * 01885 * This module is used by the HAVEGE random number generator. 01886 */ 01887 //#define POLARSSL_TIMING_C 01888 01889 /** 01890 * \def POLARSSL_VERSION_C 01891 * 01892 * Enable run-time version information. 01893 * 01894 * Module: library/version.c 01895 * 01896 * This module provides run-time version information. 01897 */ 01898 //#define POLARSSL_VERSION_C 01899 01900 /** 01901 * \def POLARSSL_X509_USE_C 01902 * 01903 * Enable X.509 core for using certificates. 01904 * 01905 * Module: library/x509.c 01906 * Caller: library/x509_crl.c 01907 * library/x509_crt.c 01908 * library/x509_csr.c 01909 * 01910 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C, 01911 * POLARSSL_PK_PARSE_C 01912 * 01913 * This module is required for the X.509 parsing modules. 01914 */ 01915 //#define POLARSSL_X509_USE_C 01916 01917 /** 01918 * \def POLARSSL_X509_CRT_PARSE_C 01919 * 01920 * Enable X.509 certificate parsing. 01921 * 01922 * Module: library/x509_crt.c 01923 * Caller: library/ssl_cli.c 01924 * library/ssl_srv.c 01925 * library/ssl_tls.c 01926 * 01927 * Requires: POLARSSL_X509_USE_C 01928 * 01929 * This module is required for X.509 certificate parsing. 01930 */ 01931 //#define POLARSSL_X509_CRT_PARSE_C 01932 01933 /** 01934 * \def POLARSSL_X509_CRL_PARSE_C 01935 * 01936 * Enable X.509 CRL parsing. 01937 * 01938 * Module: library/x509_crl.c 01939 * Caller: library/x509_crt.c 01940 * 01941 * Requires: POLARSSL_X509_USE_C 01942 * 01943 * This module is required for X.509 CRL parsing. 01944 */ 01945 //#define POLARSSL_X509_CRL_PARSE_C 01946 01947 /** 01948 * \def POLARSSL_X509_CSR_PARSE_C 01949 * 01950 * Enable X.509 Certificate Signing Request (CSR) parsing. 01951 * 01952 * Module: library/x509_csr.c 01953 * Caller: library/x509_crt_write.c 01954 * 01955 * Requires: POLARSSL_X509_USE_C 01956 * 01957 * This module is used for reading X.509 certificate request. 01958 */ 01959 //#define POLARSSL_X509_CSR_PARSE_C 01960 01961 /** 01962 * \def POLARSSL_X509_CREATE_C 01963 * 01964 * Enable X.509 core for creating certificates. 01965 * 01966 * Module: library/x509_create.c 01967 * 01968 * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_PK_WRITE_C 01969 * 01970 * This module is the basis for creating X.509 certificates and CSRs. 01971 */ 01972 //#define POLARSSL_X509_CREATE_C 01973 01974 /** 01975 * \def POLARSSL_X509_CRT_WRITE_C 01976 * 01977 * Enable creating X.509 certificates. 01978 * 01979 * Module: library/x509_crt_write.c 01980 * 01981 * Requires: POLARSSL_CREATE_C 01982 * 01983 * This module is required for X.509 certificate creation. 01984 */ 01985 //#define POLARSSL_X509_CRT_WRITE_C 01986 01987 /** 01988 * \def POLARSSL_X509_CSR_WRITE_C 01989 * 01990 * Enable creating X.509 Certificate Signing Requests (CSR). 01991 * 01992 * Module: library/x509_csr_write.c 01993 * 01994 * Requires: POLARSSL_CREATE_C 01995 * 01996 * This module is required for X.509 certificate request writing. 01997 */ 01998 //#define POLARSSL_X509_CSR_WRITE_C 01999 02000 /** 02001 * \def POLARSSL_XTEA_C 02002 * 02003 * Enable the XTEA block cipher. 02004 * 02005 * Module: library/xtea.c 02006 * Caller: 02007 */ 02008 //#define POLARSSL_XTEA_C 02009 02010 /* \} name SECTION: PolarSSL modules */ 02011 02012 /** 02013 * \name SECTION: Module configuration options 02014 * 02015 * This section allows for the setting of module specific sizes and 02016 * configuration options. The default values are already present in the 02017 * relevant header files and should suffice for the regular use cases. 02018 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here 02019 * only if you have a good reason and know the consequences. 02020 * 02021 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module 02022 * header file take precedence. 02023 * 02024 * Please check the respective header file for documentation on these 02025 * parameters (to prevent duplicate documentation). 02026 * 02027 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here. 02028 * \{ 02029 */ 02030 #define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */ 02031 02032 #if defined(POLARSSL_CONFIG_OPTIONS) 02033 02034 // MPI / BIGNUM options 02035 // 02036 #define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */ 02037 #define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */ 02038 02039 // CTR_DRBG options 02040 // 02041 #define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */ 02042 #define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ 02043 #define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ 02044 #define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ 02045 #define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ 02046 02047 // HMAC_DRBG options 02048 // 02049 #define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ 02050 #define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ 02051 #define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ 02052 #define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ 02053 02054 // ECP options 02055 // 02056 #define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */ 02057 #define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */ 02058 #define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */ 02059 02060 // Entropy options 02061 // 02062 #define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */ 02063 #define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */ 02064 02065 // Memory buffer allocator options 02066 #define MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ 02067 02068 // Platform options 02069 #define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */ 02070 #define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */ 02071 #define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */ 02072 #define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */ 02073 02074 // SSL Cache options 02075 // 02076 #define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */ 02077 #define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */ 02078 02079 // SSL options 02080 // 02081 //#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */ 02082 #define SSL_MAX_CONTENT_LEN 1024 /**< Size of the input / output buffer */ 02083 #define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */ 02084 02085 #endif /* POLARSSL_CONFIG_OPTIONS */ 02086 02087 /* \} name */ 02088 02089 /* 02090 * Sanity checks on defines and dependencies 02091 */ 02092 #if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM) 02093 #error "POLARSSL_AESNI_C defined, but not all prerequisites" 02094 #endif 02095 02096 #if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C) 02097 #error "POLARSSL_CERTS_C defined, but not all prerequisites" 02098 #endif 02099 02100 #if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C) 02101 #error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites" 02102 #endif 02103 02104 #if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C) 02105 #error "POLARSSL_DHM_C defined, but not all prerequisites" 02106 #endif 02107 02108 #if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C) 02109 #error "POLARSSL_ECDH_C defined, but not all prerequisites" 02110 #endif 02111 02112 #if defined(POLARSSL_ECDSA_C) && \ 02113 ( !defined(POLARSSL_ECP_C) || \ 02114 !defined(POLARSSL_ASN1_PARSE_C) || \ 02115 !defined(POLARSSL_ASN1_WRITE_C) ) 02116 #error "POLARSSL_ECDSA_C defined, but not all prerequisites" 02117 #endif 02118 02119 #if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C) 02120 #error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites" 02121 #endif 02122 02123 #if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \ 02124 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \ 02125 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \ 02126 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \ 02127 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \ 02128 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \ 02129 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \ 02130 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \ 02131 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \ 02132 !defined(POLARSSL_ECP_DP_M255_ENABLED) && \ 02133 !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \ 02134 !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \ 02135 !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) ) 02136 #error "POLARSSL_ECP_C defined, but not all prerequisites" 02137 #endif 02138 02139 #if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \ 02140 !defined(POLARSSL_SHA256_C)) 02141 #error "POLARSSL_ENTROPY_C defined, but not all prerequisites" 02142 #endif 02143 #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \ 02144 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64) 02145 #error "CTR_DRBG_ENTROPY_LEN value too high" 02146 #endif 02147 #if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \ 02148 defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32) 02149 #error "CTR_DRBG_ENTROPY_LEN value too high" 02150 #endif 02151 #if defined(POLARSSL_ENTROPY_C) && \ 02152 defined(POLARSSL_ENTROPY_FORCE_SHA256) && !defined(POLARSSL_SHA256_C) 02153 #error "POLARSSL_ENTROPY_FORCE_SHA256 defined, but not all prerequisites" 02154 #endif 02155 02156 #if defined(POLARSSL_GCM_C) && ( \ 02157 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) ) 02158 #error "POLARSSL_GCM_C defined, but not all prerequisites" 02159 #endif 02160 02161 #if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C) 02162 #error "POLARSSL_HAVEGE_C defined, but not all prerequisites" 02163 #endif 02164 02165 #if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C) 02166 #error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites" 02167 #endif 02168 02169 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \ 02170 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ) 02171 #error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites" 02172 #endif 02173 02174 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \ 02175 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ) 02176 #error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites" 02177 #endif 02178 02179 #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C) 02180 #error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites" 02181 #endif 02182 02183 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \ 02184 !defined(POLARSSL_ECDH_C) 02185 #error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites" 02186 #endif 02187 02188 #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ 02189 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \ 02190 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) ) 02191 #error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" 02192 #endif 02193 02194 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ 02195 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \ 02196 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) ) 02197 #error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites" 02198 #endif 02199 02200 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \ 02201 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \ 02202 !defined(POLARSSL_X509_CRT_PARSE_C) ) 02203 #error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites" 02204 #endif 02205 02206 #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \ 02207 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\ 02208 !defined(POLARSSL_PKCS1_V15) ) 02209 #error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites" 02210 #endif 02211 02212 #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \ 02213 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\ 02214 !defined(POLARSSL_PKCS1_V15) ) 02215 #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites" 02216 #endif 02217 02218 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \ 02219 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) ) 02220 #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites" 02221 #endif 02222 02223 #if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM) 02224 #error "POLARSSL_PADLOCK_C defined, but not all prerequisites" 02225 #endif 02226 02227 #if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C) 02228 #error "POLARSSL_PBKDF2_C defined, but not all prerequisites" 02229 #endif 02230 02231 #if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C) 02232 #error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites" 02233 #endif 02234 02235 #if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C) 02236 #error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites" 02237 #endif 02238 02239 #if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C) 02240 #error "POLARSSL_PK_PARSE_C defined, but not all prerequisites" 02241 #endif 02242 02243 #if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C) 02244 #error "POLARSSL_PK_WRITE_C defined, but not all prerequisites" 02245 #endif 02246 02247 #if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C) 02248 #error "POLARSSL_PKCS11_C defined, but not all prerequisites" 02249 #endif 02250 02251 #if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \ 02252 !defined(POLARSSL_OID_C) ) 02253 #error "POLARSSL_RSA_C defined, but not all prerequisites" 02254 #endif 02255 02256 #if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \ 02257 !defined(POLARSSL_SHA1_C) ) 02258 #error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites" 02259 #endif 02260 02261 #if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \ 02262 !defined(POLARSSL_SHA1_C) ) 02263 #error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites" 02264 #endif 02265 02266 #if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \ 02267 !defined(POLARSSL_SHA1_C) ) 02268 #error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites" 02269 #endif 02270 02271 #if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \ 02272 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) ) 02273 #error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites" 02274 #endif 02275 02276 #if defined(POLARSSL_SSL_PROTO_DTLS) && ( \ 02277 !defined(POLARSSL_SSL_PROTO_TLS1_1) && \ 02278 !defined(POLARSSL_SSL_PROTO_TLS1_2) ) 02279 #error "POLARSSL_SSL_PROTO_DTLS defined, but not all prerequisites" 02280 #endif 02281 02282 #if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C) 02283 #error "POLARSSL_SSL_CLI_C defined, but not all prerequisites" 02284 #endif 02285 02286 #if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \ 02287 !defined(POLARSSL_MD_C) ) 02288 #error "POLARSSL_SSL_TLS_C defined, but not all prerequisites" 02289 #endif 02290 02291 #if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C) 02292 #error "POLARSSL_SSL_SRV_C defined, but not all prerequisites" 02293 #endif 02294 02295 #if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \ 02296 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \ 02297 !defined(POLARSSL_SSL_PROTO_TLS1_2)) 02298 #error "POLARSSL_SSL_TLS_C defined, but no protocols are active" 02299 #endif 02300 02301 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \ 02302 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1)) 02303 #error "Illegal protocol selection" 02304 #endif 02305 02306 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \ 02307 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1)) 02308 #error "Illegal protocol selection" 02309 #endif 02310 02311 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \ 02312 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \ 02313 !defined(POLARSSL_SSL_PROTO_TLS1_1))) 02314 #error "Illegal protocol selection" 02315 #endif 02316 02317 #if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \ 02318 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \ 02319 !defined(POLARSSL_CIPHER_MODE_CBC) ) 02320 #error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites" 02321 #endif 02322 02323 #if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) && \ 02324 !defined(POLARSSL_X509_CRT_PARSE_C) 02325 #error "POLARSSL_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites" 02326 #endif 02327 02328 #if defined(POLARSSL_THREADING_PTHREAD) 02329 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL) 02330 #error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites" 02331 #endif 02332 #define POLARSSL_THREADING_IMPL 02333 #endif 02334 02335 #if defined(POLARSSL_THREADING_ALT) 02336 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL) 02337 #error "POLARSSL_THREADING_ALT defined, but not all prerequisites" 02338 #endif 02339 #define POLARSSL_THREADING_IMPL 02340 #endif 02341 02342 #if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL) 02343 #error "POLARSSL_THREADING_C defined, single threading implementation required" 02344 #endif 02345 #undef POLARSSL_THREADING_IMPL 02346 02347 #if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \ 02348 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \ 02349 !defined(POLARSSL_PK_PARSE_C) ) 02350 #error "POLARSSL_X509_USE_C defined, but not all prerequisites" 02351 #endif 02352 02353 #if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \ 02354 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \ 02355 !defined(POLARSSL_PK_WRITE_C) ) 02356 #error "POLARSSL_X509_CREATE_C defined, but not all prerequisites" 02357 #endif 02358 02359 #if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) ) 02360 #error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites" 02361 #endif 02362 02363 #if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) ) 02364 #error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites" 02365 #endif 02366 02367 #if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) ) 02368 #error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites" 02369 #endif 02370 02371 #if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) ) 02372 #error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites" 02373 #endif 02374 02375 #if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) ) 02376 #error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites" 02377 #endif 02378 02379 #endif /* config.h */ 02380
Generated on Tue Jul 12 2022 19:40:15 by
1.7.2