Mbed Cloud example program for workshop in W27 2018.

Dependencies:   MMA7660 LM75B

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mbedTLSConfig_Linux.h Source File

mbedTLSConfig_Linux.h

00001 /**
00002  * \file config.h
00003  *
00004  * \brief Configuration options (set of defines)
00005  *
00006  *  This set of compile-time options may be used to enable
00007  *  or disable features selectively, and reduce the global
00008  *  memory footprint.
00009  *
00010  *  Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
00011  *  SPDX-License-Identifier: Apache-2.0
00012  *
00013  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
00014  *  not use this file except in compliance with the License.
00015  *  You may obtain a copy of the License at
00016  *
00017  *  http://www.apache.org/licenses/LICENSE-2.0
00018  *
00019  *  Unless required by applicable law or agreed to in writing, software
00020  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00021  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00022  *  See the License for the specific language governing permissions and
00023  *  limitations under the License.
00024  *
00025  *  This file is part of mbed TLS (https://tls.mbed.org)
00026  */
00027 
00028 #ifndef MBEDTLS_CONFIG_H
00029 #define MBEDTLS_CONFIG_H
00030 
00031 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
00032 #define _CRT_SECURE_NO_DEPRECATE 1
00033 #endif
00034 
00035 /**
00036  * \name SECTION: System support
00037  *
00038  * This section sets system specific settings.
00039  * \{
00040  */
00041 
00042 /**
00043  * \def MBEDTLS_HAVE_ASM
00044  *
00045  * The compiler has support for asm().
00046  *
00047  * Requires support for asm() in compiler.
00048  *
00049  * Used in:
00050  *      library/timing.c
00051  *      library/padlock.c
00052  *      include/mbedtls/bn_mul.h
00053  *
00054  * Comment to disable the use of assembly code.
00055  */
00056 #define MBEDTLS_HAVE_ASM
00057 
00058 /**
00059  * \def MBEDTLS_HAVE_SSE2
00060  *
00061  * CPU supports SSE2 instruction set.
00062  *
00063  * Uncomment if the CPU supports SSE2 (IA-32 specific).
00064  */
00065 //#define MBEDTLS_HAVE_SSE2
00066 
00067 /**
00068  * \def MBEDTLS_HAVE_TIME
00069  *
00070  * System has time.h and time().
00071  * The time does not need to be correct, only time differences are used,
00072  * by contrast with MBEDTLS_HAVE_TIME_DATE
00073  *
00074  * Defining MBEDTLS_HAVE_TIME allows you to specify MBEDTLS_PLATFORM_TIME_ALT,
00075  * MBEDTLS_PLATFORM_TIME_MACRO, MBEDTLS_PLATFORM_TIME_TYPE_MACRO and
00076  * MBEDTLS_PLATFORM_STD_TIME.
00077  *
00078  * Comment if your system does not support time functions
00079  */
00080 #define MBEDTLS_HAVE_TIME
00081 
00082 /**
00083  * \def MBEDTLS_HAVE_TIME_DATE
00084  *
00085  * System has time.h and time(), gmtime() and the clock is correct.
00086  * The time needs to be correct (not necesarily very accurate, but at least
00087  * the date should be correct). This is used to verify the validity period of
00088  * X.509 certificates.
00089  *
00090  * Comment if your system does not have a correct clock.
00091  */
00092 //#define MBEDTLS_HAVE_TIME_DATE
00093 
00094 /**
00095  * \def MBEDTLS_PLATFORM_MEMORY
00096  *
00097  * Enable the memory allocation layer.
00098  *
00099  * By default mbed TLS uses the system-provided calloc() and free().
00100  * This allows different allocators (self-implemented or provided) to be
00101  * provided to the platform abstraction layer.
00102  *
00103  * Enabling MBEDTLS_PLATFORM_MEMORY without the
00104  * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide
00105  * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and
00106  * free() function pointer at runtime.
00107  *
00108  * Enabling MBEDTLS_PLATFORM_MEMORY and specifying
00109  * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the
00110  * alternate function at compile time.
00111  *
00112  * Requires: MBEDTLS_PLATFORM_C
00113  *
00114  * Enable this layer to allow use of alternative memory allocators.
00115  */
00116 //#define MBEDTLS_PLATFORM_MEMORY
00117 
00118 /**
00119  * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
00120  *
00121  * Do not assign standard functions in the platform layer (e.g. calloc() to
00122  * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF)
00123  *
00124  * This makes sure there are no linking errors on platforms that do not support
00125  * these functions. You will HAVE to provide alternatives, either at runtime
00126  * via the platform_set_xxx() functions or at compile time by setting
00127  * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a
00128  * MBEDTLS_PLATFORM_XXX_MACRO.
00129  *
00130  * Requires: MBEDTLS_PLATFORM_C
00131  *
00132  * Uncomment to prevent default assignment of standard functions in the
00133  * platform layer.
00134  */
00135 //#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
00136 
00137 /**
00138  * \def MBEDTLS_PLATFORM_EXIT_ALT
00139  *
00140  * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the
00141  * function in the platform abstraction layer.
00142  *
00143  * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will
00144  * provide a function "mbedtls_platform_set_printf()" that allows you to set an
00145  * alternative printf function pointer.
00146  *
00147  * All these define require MBEDTLS_PLATFORM_C to be defined!
00148  *
00149  * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows;
00150  * it will be enabled automatically by check_config.h
00151  *
00152  * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
00153  * MBEDTLS_PLATFORM_XXX_MACRO!
00154  *
00155  * Requires: MBEDTLS_PLATFORM_TIME_ALT requires MBEDTLS_HAVE_TIME
00156  *
00157  * Uncomment a macro to enable alternate implementation of specific base
00158  * platform function
00159  */
00160 //#define MBEDTLS_PLATFORM_EXIT_ALT
00161 //#define MBEDTLS_PLATFORM_TIME_ALT
00162 //#define MBEDTLS_PLATFORM_FPRINTF_ALT
00163 //#define MBEDTLS_PLATFORM_PRINTF_ALT
00164 //#define MBEDTLS_PLATFORM_SNPRINTF_ALT
00165 //#define MBEDTLS_PLATFORM_NV_SEED_ALT
00166 
00167 /**
00168  * \def MBEDTLS_DEPRECATED_WARNING
00169  *
00170  * Mark deprecated functions so that they generate a warning if used.
00171  * Functions deprecated in one version will usually be removed in the next
00172  * version. You can enable this to help you prepare the transition to a new
00173  * major version by making sure your code is not using these functions.
00174  *
00175  * This only works with GCC and Clang. With other compilers, you may want to
00176  * use MBEDTLS_DEPRECATED_REMOVED
00177  *
00178  * Uncomment to get warnings on using deprecated functions.
00179  */
00180 //#define MBEDTLS_DEPRECATED_WARNING
00181 
00182 /**
00183  * \def MBEDTLS_DEPRECATED_REMOVED
00184  *
00185  * Remove deprecated functions so that they generate an error if used.
00186  * Functions deprecated in one version will usually be removed in the next
00187  * version. You can enable this to help you prepare the transition to a new
00188  * major version by making sure your code is not using these functions.
00189  *
00190  * Uncomment to get errors on using deprecated functions.
00191  */
00192 //#define MBEDTLS_DEPRECATED_REMOVED
00193 
00194 /* \} name SECTION: System support */
00195 
00196 /**
00197  * \name SECTION: mbed TLS feature support
00198  *
00199  * This section sets support for features that are or are not needed
00200  * within the modules that are enabled.
00201  * \{
00202  */
00203 
00204 /**
00205  * \def MBEDTLS_TIMING_ALT
00206  *
00207  * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(),
00208  * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
00209  *
00210  * Only works if you have MBEDTLS_TIMING_C enabled.
00211  *
00212  * You will need to provide a header "timing_alt.h" and an implementation at
00213  * compile time.
00214  */
00215 //#define MBEDTLS_TIMING_ALT
00216 
00217 /**
00218  * \def MBEDTLS_AES_ALT
00219  *
00220  * MBEDTLS__MODULE_NAME__ALT: Uncomment a macro to let mbed TLS use your
00221  * alternate core implementation of a symmetric crypto, an arithmetic or hash
00222  * module (e.g. platform specific assembly optimized implementations). Keep
00223  * in mind that the function prototypes should remain the same.
00224  *
00225  * This replaces the whole module. If you only want to replace one of the
00226  * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags.
00227  *
00228  * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer
00229  * provide the "struct mbedtls_aes_context" definition and omit the base
00230  * function declarations and implementations. "aes_alt.h" will be included from
00231  * "aes.h" to include the new function definitions.
00232  *
00233  * Uncomment a macro to enable alternate implementation of the corresponding
00234  * module.
00235  */
00236 //#define MBEDTLS_AES_ALT
00237 //#define MBEDTLS_ARC4_ALT
00238 //#define MBEDTLS_BLOWFISH_ALT
00239 //#define MBEDTLS_CAMELLIA_ALT
00240 //#define MBEDTLS_DES_ALT
00241 //#define MBEDTLS_XTEA_ALT
00242 //#define MBEDTLS_MD2_ALT
00243 //#define MBEDTLS_MD4_ALT
00244 //#define MBEDTLS_MD5_ALT
00245 //#define MBEDTLS_RIPEMD160_ALT
00246 //#define MBEDTLS_SHA1_ALT
00247 //#define MBEDTLS_SHA256_ALT
00248 //#define MBEDTLS_SHA512_ALT
00249 /*
00250  * When replacing the elliptic curve module, pleace consider, that it is
00251  * implemented with two .c files:
00252  *      - ecp.c
00253  *      - ecp_curves.c
00254  * You can replace them very much like all the other MBEDTLS__MODULE_NAME__ALT
00255  * macros as described above. The only difference is that you have to make sure
00256  * that you provide functionality for both .c files.
00257  */
00258 //#define MBEDTLS_ECP_ALT
00259 
00260 /**
00261  * \def MBEDTLS_MD2_PROCESS_ALT
00262  *
00263  * MBEDTLS__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use you
00264  * alternate core implementation of symmetric crypto or hash function. Keep in
00265  * mind that function prototypes should remain the same.
00266  *
00267  * This replaces only one function. The header file from mbed TLS is still
00268  * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags.
00269  *
00270  * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will
00271  * no longer provide the mbedtls_sha1_process() function, but it will still provide
00272  * the other function (using your mbedtls_sha1_process() function) and the definition
00273  * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible
00274  * with this definition.
00275  *
00276  * Note: if you use the AES_xxx_ALT macros, then is is recommended to also set
00277  * MBEDTLS_AES_ROM_TABLES in order to help the linker garbage-collect the AES
00278  * tables.
00279  *
00280  * Uncomment a macro to enable alternate implementation of the corresponding
00281  * function.
00282  */
00283 //#define MBEDTLS_MD2_PROCESS_ALT
00284 //#define MBEDTLS_MD4_PROCESS_ALT
00285 //#define MBEDTLS_MD5_PROCESS_ALT
00286 //#define MBEDTLS_RIPEMD160_PROCESS_ALT
00287 //#define MBEDTLS_SHA1_PROCESS_ALT
00288 //#define MBEDTLS_SHA256_PROCESS_ALT
00289 //#define MBEDTLS_SHA512_PROCESS_ALT
00290 //#define MBEDTLS_DES_SETKEY_ALT
00291 //#define MBEDTLS_DES_CRYPT_ECB_ALT
00292 //#define MBEDTLS_DES3_CRYPT_ECB_ALT
00293 //#define MBEDTLS_AES_SETKEY_ENC_ALT
00294 //#define MBEDTLS_AES_SETKEY_DEC_ALT
00295 //#define MBEDTLS_AES_ENCRYPT_ALT
00296 //#define MBEDTLS_AES_DECRYPT_ALT
00297 
00298 /**
00299  * \def MBEDTLS_ECP_INTERNAL_ALT
00300  *
00301  * Expose a part of the internal interface of the Elliptic Curve Point module.
00302  *
00303  * MBEDTLS_ECP__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use your
00304  * alternative core implementation of elliptic curve arithmetic. Keep in mind
00305  * that function prototypes should remain the same.
00306  *
00307  * This partially replaces one function. The header file from mbed TLS is still
00308  * used, in contrast to the MBEDTLS_ECP_ALT flag. The original implementation
00309  * is still present and it is used for group structures not supported by the
00310  * alternative.
00311  *
00312  * Any of these options become available by defining MBEDTLS_ECP_INTERNAL_ALT
00313  * and implementing the following functions:
00314  *      unsigned char mbedtls_internal_ecp_grp_capable(
00315  *          const mbedtls_ecp_group *grp )
00316  *      int  mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp )
00317  *      void mbedtls_internal_ecp_deinit( const mbedtls_ecp_group *grp )
00318  * The mbedtls_internal_ecp_grp_capable function should return 1 if the
00319  * replacement functions implement arithmetic for the given group and 0
00320  * otherwise.
00321  * The functions mbedtls_internal_ecp_init and mbedtls_internal_ecp_deinit are
00322  * called before and after each point operation and provide an opportunity to
00323  * implement optimized set up and tear down instructions.
00324  *
00325  * Example: In case you uncomment MBEDTLS_ECP_INTERNAL_ALT and
00326  * MBEDTLS_ECP_DOUBLE_JAC_ALT, mbed TLS will still provide the ecp_double_jac
00327  * function, but will use your mbedtls_internal_ecp_double_jac if the group is
00328  * supported (your mbedtls_internal_ecp_grp_capable function returns 1 when
00329  * receives it as an argument). If the group is not supported then the original
00330  * implementation is used. The other functions and the definition of
00331  * mbedtls_ecp_group and mbedtls_ecp_point will not change, so your
00332  * implementation of mbedtls_internal_ecp_double_jac and
00333  * mbedtls_internal_ecp_grp_capable must be compatible with this definition.
00334  *
00335  * Uncomment a macro to enable alternate implementation of the corresponding
00336  * function.
00337  */
00338 /* Required for all the functions in this section */
00339 //#define MBEDTLS_ECP_INTERNAL_ALT
00340 /* Support for Weierstrass curves with Jacobi representation */
00341 //#define MBEDTLS_ECP_RANDOMIZE_JAC_ALT
00342 //#define MBEDTLS_ECP_ADD_MIXED_ALT
00343 //#define MBEDTLS_ECP_DOUBLE_JAC_ALT
00344 //#define MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT
00345 //#define MBEDTLS_ECP_NORMALIZE_JAC_ALT
00346 /* Support for curves with Montgomery arithmetic */
00347 //#define MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT
00348 //#define MBEDTLS_ECP_RANDOMIZE_MXZ_ALT
00349 //#define MBEDTLS_ECP_NORMALIZE_MXZ_ALT
00350 
00351 /**
00352  * \def MBEDTLS_TEST_NULL_ENTROPY
00353  *
00354  * Enables testing and use of mbed TLS without any configured entropy sources.
00355  * This permits use of the library on platforms before an entropy source has
00356  * been integrated (see for example the MBEDTLS_ENTROPY_HARDWARE_ALT or the
00357  * MBEDTLS_ENTROPY_NV_SEED switches).
00358  *
00359  * WARNING! This switch MUST be disabled in production builds, and is suitable
00360  * only for development.
00361  * Enabling the switch negates any security provided by the library.
00362  *
00363  * Requires MBEDTLS_ENTROPY_C, MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
00364  *
00365  */
00366 //#define MBEDTLS_TEST_NULL_ENTROPY
00367 
00368 /**
00369  * \def MBEDTLS_ENTROPY_HARDWARE_ALT
00370  *
00371  * Uncomment this macro to let mbed TLS use your own implementation of a
00372  * hardware entropy collector.
00373  *
00374  * Your function must be called \c mbedtls_hardware_poll(), have the same
00375  * prototype as declared in entropy_poll.h, and accept NULL as first argument.
00376  *
00377  * Uncomment to use your own hardware entropy collector.
00378  */
00379 //#define MBEDTLS_ENTROPY_HARDWARE_ALT
00380 
00381 /**
00382  * \def MBEDTLS_AES_ROM_TABLES
00383  *
00384  * Store the AES tables in ROM.
00385  *
00386  * Uncomment this macro to store the AES tables in ROM.
00387  */
00388 //#define MBEDTLS_AES_ROM_TABLES
00389 
00390 /**
00391  * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
00392  *
00393  * Use less ROM for the Camellia implementation (saves about 768 bytes).
00394  *
00395  * Uncomment this macro to use less memory for Camellia.
00396  */
00397 //#define MBEDTLS_CAMELLIA_SMALL_MEMORY
00398 
00399 /**
00400  * \def MBEDTLS_CIPHER_MODE_CBC
00401  *
00402  * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
00403  */
00404 #define MBEDTLS_CIPHER_MODE_CBC
00405 
00406 /**
00407  * \def MBEDTLS_CIPHER_MODE_CFB
00408  *
00409  * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
00410  */
00411 //#define MBEDTLS_CIPHER_MODE_CFB
00412 
00413 /**
00414  * \def MBEDTLS_CIPHER_MODE_CTR
00415  *
00416  * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
00417  */
00418 #define MBEDTLS_CIPHER_MODE_CTR
00419 
00420 /**
00421  * \def MBEDTLS_CIPHER_NULL_CIPHER
00422  *
00423  * Enable NULL cipher.
00424  * Warning: Only do so when you know what you are doing. This allows for
00425  * encryption or channels without any security!
00426  *
00427  * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable
00428  * the following ciphersuites:
00429  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA
00430  *      MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA
00431  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA
00432  *      MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA
00433  *      MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384
00434  *      MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256
00435  *      MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA
00436  *      MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384
00437  *      MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256
00438  *      MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA
00439  *      MBEDTLS_TLS_RSA_WITH_NULL_SHA256
00440  *      MBEDTLS_TLS_RSA_WITH_NULL_SHA
00441  *      MBEDTLS_TLS_RSA_WITH_NULL_MD5
00442  *      MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384
00443  *      MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256
00444  *      MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA
00445  *      MBEDTLS_TLS_PSK_WITH_NULL_SHA384
00446  *      MBEDTLS_TLS_PSK_WITH_NULL_SHA256
00447  *      MBEDTLS_TLS_PSK_WITH_NULL_SHA
00448  *
00449  * Uncomment this macro to enable the NULL cipher and ciphersuites
00450  */
00451 //#define MBEDTLS_CIPHER_NULL_CIPHER
00452 
00453 /**
00454  * \def MBEDTLS_CIPHER_PADDING_PKCS7
00455  *
00456  * MBEDTLS_CIPHER_PADDING_XXX: Uncomment or comment macros to add support for
00457  * specific padding modes in the cipher layer with cipher modes that support
00458  * padding (e.g. CBC)
00459  *
00460  * If you disable all padding modes, only full blocks can be used with CBC.
00461  *
00462  * Enable padding modes in the cipher layer.
00463  */
00464 #define MBEDTLS_CIPHER_PADDING_PKCS7
00465 //#define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
00466 //#define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
00467 //#define MBEDTLS_CIPHER_PADDING_ZEROS
00468 
00469 /**
00470  * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES
00471  *
00472  * Enable weak ciphersuites in SSL / TLS.
00473  * Warning: Only do so when you know what you are doing. This allows for
00474  * channels with virtually no security at all!
00475  *
00476  * This enables the following ciphersuites:
00477  *      MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA
00478  *      MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA
00479  *
00480  * Uncomment this macro to enable weak ciphersuites
00481  */
00482 //#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
00483 
00484 /**
00485  * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES
00486  *
00487  * Remove RC4 ciphersuites by default in SSL / TLS.
00488  * This flag removes the ciphersuites based on RC4 from the default list as
00489  * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to
00490  * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them
00491  * explicitly.
00492  *
00493  * Uncomment this macro to remove RC4 ciphersuites by default.
00494  */
00495 #define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
00496 
00497 /**
00498  * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED
00499  *
00500  * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve
00501  * module.  By default all supported curves are enabled.
00502  *
00503  * Comment macros to disable the curve and functions for it
00504  */
00505 //#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
00506 //#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
00507 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
00508 #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
00509 //#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
00510 //#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
00511 //#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
00512 //#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
00513 //#define MBEDTLS_ECP_DP_BP256R1_ENABLED
00514 //#define MBEDTLS_ECP_DP_BP384R1_ENABLED
00515 //#define MBEDTLS_ECP_DP_BP512R1_ENABLED
00516 //#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
00517 
00518 /**
00519  * \def MBEDTLS_ECP_NIST_OPTIM
00520  *
00521  * Enable specific 'modulo p' routines for each NIST prime.
00522  * Depending on the prime and architecture, makes operations 4 to 8 times
00523  * faster on the corresponding curve.
00524  *
00525  * Comment this macro to disable NIST curves optimisation.
00526  */
00527 #define MBEDTLS_ECP_NIST_OPTIM
00528 
00529 /**
00530  * \def MBEDTLS_ECDSA_DETERMINISTIC
00531  *
00532  * Enable deterministic ECDSA (RFC 6979).
00533  * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
00534  * may result in a compromise of the long-term signing key. This is avoided by
00535  * the deterministic variant.
00536  *
00537  * Requires: MBEDTLS_HMAC_DRBG_C
00538  *
00539  * Comment this macro to disable deterministic ECDSA.
00540  */
00541 #define MBEDTLS_ECDSA_DETERMINISTIC
00542 
00543 /**
00544  * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
00545  *
00546  * Enable the PSK based ciphersuite modes in SSL / TLS.
00547  *
00548  * This enables the following ciphersuites (if other requisites are
00549  * enabled as well):
00550  *      MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
00551  *      MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
00552  *      MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
00553  *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
00554  *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
00555  *      MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
00556  *      MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
00557  *      MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
00558  *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
00559  *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
00560  *      MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
00561  *      MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
00562  */
00563 //#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
00564 
00565 /**
00566  * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
00567  *
00568  * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
00569  *
00570  * Requires: MBEDTLS_DHM_C
00571  *
00572  * This enables the following ciphersuites (if other requisites are
00573  * enabled as well):
00574  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
00575  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
00576  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
00577  *      MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
00578  *      MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
00579  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
00580  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
00581  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
00582  *      MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
00583  *      MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
00584  *      MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
00585  *      MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
00586  */
00587 //#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
00588 
00589 /**
00590  * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
00591  *
00592  * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
00593  *
00594  * Requires: MBEDTLS_ECDH_C
00595  *
00596  * This enables the following ciphersuites (if other requisites are
00597  * enabled as well):
00598  *      MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
00599  *      MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
00600  *      MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
00601  *      MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
00602  *      MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
00603  *      MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
00604  *      MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
00605  *      MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
00606  */
00607 #define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
00608 
00609 /**
00610  * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
00611  *
00612  * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
00613  *
00614  * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
00615  *           MBEDTLS_X509_CRT_PARSE_C
00616  *
00617  * This enables the following ciphersuites (if other requisites are
00618  * enabled as well):
00619  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
00620  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
00621  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
00622  *      MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
00623  *      MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
00624  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
00625  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
00626  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
00627  *      MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
00628  *      MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
00629  *      MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
00630  *      MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
00631  */
00632 //#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
00633 
00634 /**
00635  * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
00636  *
00637  * Enable the RSA-only based ciphersuite modes in SSL / TLS.
00638  *
00639  * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
00640  *           MBEDTLS_X509_CRT_PARSE_C
00641  *
00642  * This enables the following ciphersuites (if other requisites are
00643  * enabled as well):
00644  *      MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
00645  *      MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
00646  *      MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
00647  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
00648  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
00649  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
00650  *      MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
00651  *      MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
00652  *      MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
00653  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
00654  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
00655  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
00656  *      MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
00657  *      MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
00658  *      MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
00659  */
00660 //#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
00661 
00662 /**
00663  * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
00664  *
00665  * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
00666  *
00667  * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
00668  *           MBEDTLS_X509_CRT_PARSE_C
00669  *
00670  * This enables the following ciphersuites (if other requisites are
00671  * enabled as well):
00672  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
00673  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
00674  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
00675  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
00676  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
00677  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
00678  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
00679  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
00680  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
00681  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
00682  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
00683  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
00684  *      MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
00685  */
00686 //#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
00687 
00688 /**
00689  * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
00690  *
00691  * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
00692  *
00693  * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
00694  *           MBEDTLS_X509_CRT_PARSE_C
00695  *
00696  * This enables the following ciphersuites (if other requisites are
00697  * enabled as well):
00698  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
00699  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
00700  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
00701  *      MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
00702  *      MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
00703  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
00704  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
00705  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
00706  *      MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
00707  *      MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
00708  *      MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
00709  *      MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
00710  */
00711 //#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
00712 
00713 /**
00714  * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
00715  *
00716  * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
00717  *
00718  * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
00719  *
00720  * This enables the following ciphersuites (if other requisites are
00721  * enabled as well):
00722  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
00723  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
00724  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
00725  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
00726  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
00727  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
00728  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
00729  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
00730  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
00731  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
00732  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
00733  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
00734  */
00735 #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
00736 
00737 /**
00738  * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
00739  *
00740  * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
00741  *
00742  * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
00743  *
00744  * This enables the following ciphersuites (if other requisites are
00745  * enabled as well):
00746  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
00747  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
00748  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
00749  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
00750  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
00751  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
00752  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
00753  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
00754  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
00755  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
00756  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
00757  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
00758  */
00759 //#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
00760 
00761 /**
00762  * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
00763  *
00764  * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
00765  *
00766  * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
00767  *
00768  * This enables the following ciphersuites (if other requisites are
00769  * enabled as well):
00770  *      MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
00771  *      MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
00772  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
00773  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
00774  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
00775  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
00776  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
00777  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
00778  *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
00779  *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
00780  *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
00781  *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
00782  */
00783 //#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
00784 
00785 /**
00786  * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
00787  *
00788  * Enable the ECJPAKE based ciphersuite modes in SSL / TLS.
00789  *
00790  * \warning This is currently experimental. EC J-PAKE support is based on the
00791  * Thread v1.0.0 specification; incompatible changes to the specification
00792  * might still happen. For this reason, this is disabled by default.
00793  *
00794  * Requires: MBEDTLS_ECJPAKE_C
00795  *           MBEDTLS_SHA256_C
00796  *           MBEDTLS_ECP_DP_SECP256R1_ENABLED
00797  *
00798  * This enables the following ciphersuites (if other requisites are
00799  * enabled as well):
00800  *      MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
00801  */
00802 //#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
00803 
00804 /**
00805  * \def MBEDTLS_PK_PARSE_EC_EXTENDED
00806  *
00807  * Enhance support for reading EC keys using variants of SEC1 not allowed by
00808  * RFC 5915 and RFC 5480.
00809  *
00810  * Currently this means parsing the SpecifiedECDomain choice of EC
00811  * parameters (only known groups are supported, not arbitrary domains, to
00812  * avoid validation issues).
00813  *
00814  * Disable if you only need to support RFC 5915 + 5480 key formats.
00815  */
00816 //#define MBEDTLS_PK_PARSE_EC_EXTENDED
00817 
00818 /**
00819  * \def MBEDTLS_ERROR_STRERROR_DUMMY
00820  *
00821  * Enable a dummy error function to make use of mbedtls_strerror() in
00822  * third party libraries easier when MBEDTLS_ERROR_C is disabled
00823  * (no effect when MBEDTLS_ERROR_C is enabled).
00824  *
00825  * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
00826  * not using mbedtls_strerror() or error_strerror() in your application.
00827  *
00828  * Disable if you run into name conflicts and want to really remove the
00829  * mbedtls_strerror()
00830  */
00831 //#define MBEDTLS_ERROR_STRERROR_DUMMY
00832 
00833 /**
00834  * \def MBEDTLS_GENPRIME
00835  *
00836  * Enable the prime-number generation code.
00837  *
00838  * Requires: MBEDTLS_BIGNUM_C
00839  */
00840 //#define MBEDTLS_GENPRIME
00841 
00842 /**
00843  * \def MBEDTLS_FS_IO
00844  *
00845  * Enable functions that use the filesystem.
00846  */
00847 //#define MBEDTLS_FS_IO
00848 
00849 /**
00850  * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
00851  *
00852  * Do not add default entropy sources. These are the platform specific,
00853  * mbedtls_timing_hardclock and HAVEGE based poll functions.
00854  *
00855  * This is useful to have more control over the added entropy sources in an
00856  * application.
00857  *
00858  * Uncomment this macro to prevent loading of default entropy functions.
00859  */
00860 //#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
00861 
00862 /**
00863  * \def MBEDTLS_NO_PLATFORM_ENTROPY
00864  *
00865  * Do not use built-in platform entropy functions.
00866  * This is useful if your platform does not support
00867  * standards like the /dev/urandom or Windows CryptoAPI.
00868  *
00869  * Uncomment this macro to disable the built-in platform entropy functions.
00870  */
00871 //#define MBEDTLS_NO_PLATFORM_ENTROPY
00872 
00873 /**
00874  * \def MBEDTLS_ENTROPY_FORCE_SHA256
00875  *
00876  * Force the entropy accumulator to use a SHA-256 accumulator instead of the
00877  * default SHA-512 based one (if both are available).
00878  *
00879  * Requires: MBEDTLS_SHA256_C
00880  *
00881  * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
00882  * if you have performance concerns.
00883  *
00884  * This option is only useful if both MBEDTLS_SHA256_C and
00885  * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
00886  */
00887 //#define MBEDTLS_ENTROPY_FORCE_SHA256
00888 
00889 /**
00890  * \def MBEDTLS_ENTROPY_NV_SEED
00891  *
00892  * Enable the non-volatile (NV) seed file-based entropy source.
00893  * (Also enables the NV seed read/write functions in the platform layer)
00894  *
00895  * This is crucial (if not required) on systems that do not have a
00896  * cryptographic entropy source (in hardware or kernel) available.
00897  *
00898  * Requires: MBEDTLS_ENTROPY_C, MBEDTLS_PLATFORM_C
00899  *
00900  * \note The read/write functions that are used by the entropy source are
00901  *       determined in the platform layer, and can be modified at runtime and/or
00902  *       compile-time depending on the flags (MBEDTLS_PLATFORM_NV_SEED_*) used.
00903  *
00904  * \note If you use the default implementation functions that read a seedfile
00905  *       with regular fopen(), please make sure you make a seedfile with the
00906  *       proper name (defined in MBEDTLS_PLATFORM_STD_NV_SEED_FILE) and at
00907  *       least MBEDTLS_ENTROPY_BLOCK_SIZE bytes in size that can be read from
00908  *       and written to or you will get an entropy source error! The default
00909  *       implementation will only use the first MBEDTLS_ENTROPY_BLOCK_SIZE
00910  *       bytes from the file.
00911  *
00912  * \note The entropy collector will write to the seed file before entropy is
00913  *       given to an external source, to update it.
00914  */
00915 //#define MBEDTLS_ENTROPY_NV_SEED
00916 
00917 /**
00918  * \def MBEDTLS_MEMORY_DEBUG
00919  *
00920  * Enable debugging of buffer allocator memory issues. Automatically prints
00921  * (to stderr) all (fatal) messages on memory allocation issues. Enables
00922  * function for 'debug output' of allocated memory.
00923  *
00924  * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
00925  *
00926  * Uncomment this macro to let the buffer allocator print out error messages.
00927  */
00928 //#define MBEDTLS_MEMORY_DEBUG
00929 
00930 /**
00931  * \def MBEDTLS_MEMORY_BACKTRACE
00932  *
00933  * Include backtrace information with each allocated block.
00934  *
00935  * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
00936  *           GLIBC-compatible backtrace() an backtrace_symbols() support
00937  *
00938  * Uncomment this macro to include backtrace information
00939  */
00940 //#define MBEDTLS_MEMORY_BACKTRACE
00941 
00942 /**
00943  * \def MBEDTLS_PK_RSA_ALT_SUPPORT
00944  *
00945  * Support external private RSA keys (eg from a HSM) in the PK layer.
00946  *
00947  * Comment this macro to disable support for external private RSA keys.
00948  */
00949 //#define MBEDTLS_PK_RSA_ALT_SUPPORT
00950 
00951 /**
00952  * \def MBEDTLS_PKCS1_V15
00953  *
00954  * Enable support for PKCS#1 v1.5 encoding.
00955  *
00956  * Requires: MBEDTLS_RSA_C
00957  *
00958  * This enables support for PKCS#1 v1.5 operations.
00959  */
00960 #define MBEDTLS_PKCS1_V15
00961 
00962 /**
00963  * \def MBEDTLS_PKCS1_V21
00964  *
00965  * Enable support for PKCS#1 v2.1 encoding.
00966  *
00967  * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C
00968  *
00969  * This enables support for RSAES-OAEP and RSASSA-PSS operations.
00970  */
00971 #define MBEDTLS_PKCS1_V21
00972 
00973 /**
00974  * \def MBEDTLS_RSA_NO_CRT
00975  *
00976  * Do not use the Chinese Remainder Theorem for the RSA private operation.
00977  *
00978  * Uncomment this macro to disable the use of CRT in RSA.
00979  *
00980  */
00981 //#define MBEDTLS_RSA_NO_CRT
00982 
00983 /**
00984  * \def MBEDTLS_SELF_TEST
00985  *
00986  * Enable the checkup functions (*_self_test).
00987  */
00988 //#define MBEDTLS_SELF_TEST
00989 
00990 /**
00991  * \def MBEDTLS_SHA256_SMALLER
00992  *
00993  * Enable an implementation of SHA-256 that has lower ROM footprint but also
00994  * lower performance.
00995  *
00996  * The default implementation is meant to be a reasonnable compromise between
00997  * performance and size. This version optimizes more aggressively for size at
00998  * the expense of performance. Eg on Cortex-M4 it reduces the size of
00999  * mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of about
01000  * 30%.
01001  *
01002  * Uncomment to enable the smaller implementation of SHA256.
01003  */
01004 //#define MBEDTLS_SHA256_SMALLER
01005 
01006 /**
01007  * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
01008  *
01009  * Enable sending of alert messages in case of encountered errors as per RFC.
01010  * If you choose not to send the alert messages, mbed TLS can still communicate
01011  * with other servers, only debugging of failures is harder.
01012  *
01013  * The advantage of not sending alert messages, is that no information is given
01014  * about reasons for failures thus preventing adversaries of gaining intel.
01015  *
01016  * Enable sending of all alert messages
01017  */
01018 #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
01019 
01020 /**
01021  * \def MBEDTLS_SSL_DEBUG_ALL
01022  *
01023  * Enable the debug messages in SSL module for all issues.
01024  * Debug messages have been disabled in some places to prevent timing
01025  * attacks due to (unbalanced) debugging function calls.
01026  *
01027  * If you need all error reporting you should enable this during debugging,
01028  * but remove this for production servers that should log as well.
01029  *
01030  * Uncomment this macro to report all debug messages on errors introducing
01031  * a timing side-channel.
01032  *
01033  */
01034 //#define MBEDTLS_SSL_DEBUG_ALL
01035 
01036 /** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
01037  *
01038  * Enable support for Encrypt-then-MAC, RFC 7366.
01039  *
01040  * This allows peers that both support it to use a more robust protection for
01041  * ciphersuites using CBC, providing deep resistance against timing attacks
01042  * on the padding or underlying cipher.
01043  *
01044  * This only affects CBC ciphersuites, and is useless if none is defined.
01045  *
01046  * Requires: MBEDTLS_SSL_PROTO_TLS1    or
01047  *           MBEDTLS_SSL_PROTO_TLS1_1  or
01048  *           MBEDTLS_SSL_PROTO_TLS1_2
01049  *
01050  * Comment this macro to disable support for Encrypt-then-MAC
01051  */
01052 #define MBEDTLS_SSL_ENCRYPT_THEN_MAC
01053 
01054 /** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
01055  *
01056  * Enable support for Extended Master Secret, aka Session Hash
01057  * (draft-ietf-tls-session-hash-02).
01058  *
01059  * This was introduced as "the proper fix" to the Triple Handshake familiy of
01060  * attacks, but it is recommended to always use it (even if you disable
01061  * renegotiation), since it actually fixes a more fundamental issue in the
01062  * original SSL/TLS design, and has implications beyond Triple Handshake.
01063  *
01064  * Requires: MBEDTLS_SSL_PROTO_TLS1    or
01065  *           MBEDTLS_SSL_PROTO_TLS1_1  or
01066  *           MBEDTLS_SSL_PROTO_TLS1_2
01067  *
01068  * Comment this macro to disable support for Extended Master Secret.
01069  */
01070 #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
01071 
01072 /**
01073  * \def MBEDTLS_SSL_FALLBACK_SCSV
01074  *
01075  * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
01076  *
01077  * For servers, it is recommended to always enable this, unless you support
01078  * only one version of TLS, or know for sure that none of your clients
01079  * implements a fallback strategy.
01080  *
01081  * For clients, you only need this if you're using a fallback strategy, which
01082  * is not recommended in the first place, unless you absolutely need it to
01083  * interoperate with buggy (version-intolerant) servers.
01084  *
01085  * Comment this macro to disable support for FALLBACK_SCSV
01086  */
01087 //#define MBEDTLS_SSL_FALLBACK_SCSV
01088 
01089 /**
01090  * \def MBEDTLS_SSL_HW_RECORD_ACCEL
01091  *
01092  * Enable hooking functions in SSL module for hardware acceleration of
01093  * individual records.
01094  *
01095  * Uncomment this macro to enable hooking functions.
01096  */
01097 //#define MBEDTLS_SSL_HW_RECORD_ACCEL
01098 
01099 /**
01100  * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING
01101  *
01102  * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
01103  *
01104  * This is a countermeasure to the BEAST attack, which also minimizes the risk
01105  * of interoperability issues compared to sending 0-length records.
01106  *
01107  * Comment this macro to disable 1/n-1 record splitting.
01108  */
01109 //#define MBEDTLS_SSL_CBC_RECORD_SPLITTING
01110 
01111 /**
01112  * \def MBEDTLS_SSL_RENEGOTIATION
01113  *
01114  * Disable support for TLS renegotiation.
01115  *
01116  * The two main uses of renegotiation are (1) refresh keys on long-lived
01117  * connections and (2) client authentication after the initial handshake.
01118  * If you don't need renegotiation, it's probably better to disable it, since
01119  * it has been associated with security issues in the past and is easy to
01120  * misuse/misunderstand.
01121  *
01122  * Comment this to disable support for renegotiation.
01123  */
01124 #define MBEDTLS_SSL_RENEGOTIATION
01125 
01126 /**
01127  * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
01128  *
01129  * Enable support for receiving and parsing SSLv2 Client Hello messages for the
01130  * SSL Server module (MBEDTLS_SSL_SRV_C).
01131  *
01132  * Uncomment this macro to enable support for SSLv2 Client Hello messages.
01133  */
01134 //#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
01135 
01136 /**
01137  * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
01138  *
01139  * Pick the ciphersuite according to the client's preferences rather than ours
01140  * in the SSL Server module (MBEDTLS_SSL_SRV_C).
01141  *
01142  * Uncomment this macro to respect client's ciphersuite order
01143  */
01144 //#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
01145 
01146 /**
01147  * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
01148  *
01149  * Enable support for RFC 6066 max_fragment_length extension in SSL.
01150  *
01151  * Comment this macro to disable support for the max_fragment_length extension
01152  */
01153 #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
01154 
01155 /**
01156  * \def MBEDTLS_SSL_PROTO_SSL3
01157  *
01158  * Enable support for SSL 3.0.
01159  *
01160  * Requires: MBEDTLS_MD5_C
01161  *           MBEDTLS_SHA1_C
01162  *
01163  * Comment this macro to disable support for SSL 3.0
01164  */
01165 //#define MBEDTLS_SSL_PROTO_SSL3
01166 
01167 /**
01168  * \def MBEDTLS_SSL_PROTO_TLS1
01169  *
01170  * Enable support for TLS 1.0.
01171  *
01172  * Requires: MBEDTLS_MD5_C
01173  *           MBEDTLS_SHA1_C
01174  *
01175  * Comment this macro to disable support for TLS 1.0
01176  */
01177 //#define MBEDTLS_SSL_PROTO_TLS1
01178 
01179 /**
01180  * \def MBEDTLS_SSL_PROTO_TLS1_1
01181  *
01182  * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
01183  *
01184  * Requires: MBEDTLS_MD5_C
01185  *           MBEDTLS_SHA1_C
01186  *
01187  * Comment this macro to disable support for TLS 1.1 / DTLS 1.0
01188  */
01189 //#define MBEDTLS_SSL_PROTO_TLS1_1
01190 
01191 /**
01192  * \def MBEDTLS_SSL_PROTO_TLS1_2
01193  *
01194  * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
01195  *
01196  * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C
01197  *           (Depends on ciphersuites)
01198  *
01199  * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
01200  */
01201 #define MBEDTLS_SSL_PROTO_TLS1_2
01202 
01203 /**
01204  * \def MBEDTLS_SSL_PROTO_DTLS
01205  *
01206  * Enable support for DTLS (all available versions).
01207  *
01208  * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0,
01209  * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
01210  *
01211  * Requires: MBEDTLS_SSL_PROTO_TLS1_1
01212  *        or MBEDTLS_SSL_PROTO_TLS1_2
01213  *
01214  * Comment this macro to disable support for DTLS
01215  */
01216 #define MBEDTLS_SSL_PROTO_DTLS
01217 
01218 /**
01219  * \def MBEDTLS_SSL_ALPN
01220  *
01221  * Enable support for RFC 7301 Application Layer Protocol Negotiation.
01222  *
01223  * Comment this macro to disable support for ALPN.
01224  */
01225 #define MBEDTLS_SSL_ALPN
01226 
01227 /**
01228  * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
01229  *
01230  * Enable support for the anti-replay mechanism in DTLS.
01231  *
01232  * Requires: MBEDTLS_SSL_TLS_C
01233  *           MBEDTLS_SSL_PROTO_DTLS
01234  *
01235  * \warning Disabling this is often a security risk!
01236  * See mbedtls_ssl_conf_dtls_anti_replay() for details.
01237  *
01238  * Comment this to disable anti-replay in DTLS.
01239  */
01240 #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
01241 
01242 /**
01243  * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
01244  *
01245  * Enable support for HelloVerifyRequest on DTLS servers.
01246  *
01247  * This feature is highly recommended to prevent DTLS servers being used as
01248  * amplifiers in DoS attacks against other hosts. It should always be enabled
01249  * unless you know for sure amplification cannot be a problem in the
01250  * environment in which your server operates.
01251  *
01252  * \warning Disabling this can ba a security risk! (see above)
01253  *
01254  * Requires: MBEDTLS_SSL_PROTO_DTLS
01255  *
01256  * Comment this to disable support for HelloVerifyRequest.
01257  */
01258 #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
01259 
01260 /**
01261  * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
01262  *
01263  * Enable server-side support for clients that reconnect from the same port.
01264  *
01265  * Some clients unexpectedly close the connection and try to reconnect using the
01266  * same source port. This needs special support from the server to handle the
01267  * new connection securely, as described in section 4.2.8 of RFC 6347. This
01268  * flag enables that support.
01269  *
01270  * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
01271  *
01272  * Comment this to disable support for clients reusing the source port.
01273  */
01274 #define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
01275 
01276 /**
01277  * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
01278  *
01279  * Enable support for a limit of records with bad MAC.
01280  *
01281  * See mbedtls_ssl_conf_dtls_badmac_limit().
01282  *
01283  * Requires: MBEDTLS_SSL_PROTO_DTLS
01284  */
01285 #define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
01286 
01287 /**
01288  * \def MBEDTLS_SSL_SESSION_TICKETS
01289  *
01290  * Enable support for RFC 5077 session tickets in SSL.
01291  * Client-side, provides full support for session tickets (maintainance of a
01292  * session store remains the responsibility of the application, though).
01293  * Server-side, you also need to provide callbacks for writing and parsing
01294  * tickets, including authenticated encryption and key management. Example
01295  * callbacks are provided by MBEDTLS_SSL_TICKET_C.
01296  *
01297  * Comment this macro to disable support for SSL session tickets
01298  */
01299 #define MBEDTLS_SSL_SESSION_TICKETS
01300 
01301 /**
01302  * \def MBEDTLS_SSL_EXPORT_KEYS
01303  *
01304  * Enable support for exporting key block and master secret.
01305  * This is required for certain users of TLS, e.g. EAP-TLS.
01306  *
01307  * Comment this macro to disable support for key export
01308  */
01309 #define MBEDTLS_SSL_EXPORT_KEYS
01310 
01311 /**
01312  * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
01313  *
01314  * Enable support for RFC 6066 server name indication (SNI) in SSL.
01315  *
01316  * Requires: MBEDTLS_X509_CRT_PARSE_C
01317  *
01318  * Comment this macro to disable support for server name indication in SSL
01319  */
01320 #define MBEDTLS_SSL_SERVER_NAME_INDICATION
01321 
01322 /**
01323  * \def MBEDTLS_SSL_TRUNCATED_HMAC
01324  *
01325  * Enable support for RFC 6066 truncated HMAC in SSL.
01326  *
01327  * Comment this macro to disable support for truncated HMAC in SSL
01328  */
01329 //#define MBEDTLS_SSL_TRUNCATED_HMAC
01330 
01331 /**
01332  * \def MBEDTLS_THREADING_ALT
01333  *
01334  * Provide your own alternate threading implementation.
01335  *
01336  * Requires: MBEDTLS_THREADING_C
01337  *
01338  * Uncomment this to allow your own alternate threading implementation.
01339  */
01340 //#define MBEDTLS_THREADING_ALT
01341 
01342 /**
01343  * \def MBEDTLS_THREADING_PTHREAD
01344  *
01345  * Enable the pthread wrapper layer for the threading layer.
01346  *
01347  * Requires: MBEDTLS_THREADING_C
01348  *
01349  * Uncomment this to enable pthread mutexes.
01350  */
01351 //#define MBEDTLS_THREADING_PTHREAD
01352 
01353 /**
01354  * \def MBEDTLS_VERSION_FEATURES
01355  *
01356  * Allow run-time checking of compile-time enabled features. Thus allowing users
01357  * to check at run-time if the library is for instance compiled with threading
01358  * support via mbedtls_version_check_feature().
01359  *
01360  * Requires: MBEDTLS_VERSION_C
01361  *
01362  * Comment this to disable run-time checking and save ROM space
01363  */
01364 //#define MBEDTLS_VERSION_FEATURES
01365 
01366 /**
01367  * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
01368  *
01369  * If set, the X509 parser will not break-off when parsing an X509 certificate
01370  * and encountering an extension in a v1 or v2 certificate.
01371  *
01372  * Uncomment to prevent an error.
01373  */
01374 //#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
01375 
01376 /**
01377  * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
01378  *
01379  * If set, the X509 parser will not break-off when parsing an X509 certificate
01380  * and encountering an unknown critical extension.
01381  *
01382  * \warning Depending on your PKI use, enabling this can be a security risk!
01383  *
01384  * Uncomment to prevent an error.
01385  */
01386 //#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
01387 
01388 /**
01389  * \def MBEDTLS_X509_CHECK_KEY_USAGE
01390  *
01391  * Enable verification of the keyUsage extension (CA and leaf certificates).
01392  *
01393  * Disabling this avoids problems with mis-issued and/or misused
01394  * (intermediate) CA and leaf certificates.
01395  *
01396  * \warning Depending on your PKI use, disabling this can be a security risk!
01397  *
01398  * Comment to skip keyUsage checking for both CA and leaf certificates.
01399  */
01400 #define MBEDTLS_X509_CHECK_KEY_USAGE
01401 
01402 /**
01403  * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
01404  *
01405  * Enable verification of the extendedKeyUsage extension (leaf certificates).
01406  *
01407  * Disabling this avoids problems with mis-issued and/or misused certificates.
01408  *
01409  * \warning Depending on your PKI use, disabling this can be a security risk!
01410  *
01411  * Comment to skip extendedKeyUsage checking for certificates.
01412  */
01413 #define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
01414 
01415 /**
01416  * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
01417  *
01418  * Enable parsing and verification of X.509 certificates, CRLs and CSRS
01419  * signed with RSASSA-PSS (aka PKCS#1 v2.1).
01420  *
01421  * Comment this macro to disallow using RSASSA-PSS in certificates.
01422  */
01423 //#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
01424 
01425 /**
01426  * \def MBEDTLS_ZLIB_SUPPORT
01427  *
01428  * If set, the SSL/TLS module uses ZLIB to support compression and
01429  * decompression of packet data.
01430  *
01431  * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
01432  * CRIME attack. Before enabling this option, you should examine with care if
01433  * CRIME or similar exploits may be a applicable to your use case.
01434  *
01435  * \note Currently compression can't be used with DTLS.
01436  *
01437  * Used in: library/ssl_tls.c
01438  *          library/ssl_cli.c
01439  *          library/ssl_srv.c
01440  *
01441  * This feature requires zlib library and headers to be present.
01442  *
01443  * Uncomment to enable use of ZLIB
01444  */
01445 //#define MBEDTLS_ZLIB_SUPPORT
01446 /* \} name SECTION: mbed TLS feature support */
01447 
01448 /**
01449  * \name SECTION: mbed TLS modules
01450  *
01451  * This section enables or disables entire modules in mbed TLS
01452  * \{
01453  */
01454 
01455 /**
01456  * \def MBEDTLS_AESNI_C
01457  *
01458  * Enable AES-NI support on x86-64.
01459  *
01460  * Module:  library/aesni.c
01461  * Caller:  library/aes.c
01462  *
01463  * Requires: MBEDTLS_HAVE_ASM
01464  *
01465  * This modules adds support for the AES-NI instructions on x86-64
01466  */
01467 //#define MBEDTLS_AESNI_C
01468 
01469 /**
01470  * \def MBEDTLS_AES_C
01471  *
01472  * Enable the AES block cipher.
01473  *
01474  * Module:  library/aes.c
01475  * Caller:  library/ssl_tls.c
01476  *          library/pem.c
01477  *          library/ctr_drbg.c
01478  *
01479  * This module enables the following ciphersuites (if other requisites are
01480  * enabled as well):
01481  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
01482  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
01483  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
01484  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
01485  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
01486  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
01487  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
01488  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
01489  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
01490  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
01491  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
01492  *      MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
01493  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
01494  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
01495  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
01496  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
01497  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
01498  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
01499  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
01500  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
01501  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
01502  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
01503  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
01504  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
01505  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
01506  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
01507  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
01508  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
01509  *      MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
01510  *      MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
01511  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
01512  *      MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
01513  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
01514  *      MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
01515  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
01516  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
01517  *      MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
01518  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
01519  *      MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
01520  *      MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
01521  *      MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
01522  *      MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
01523  *      MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
01524  *      MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
01525  *      MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
01526  *      MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
01527  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
01528  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
01529  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
01530  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
01531  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
01532  *      MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
01533  *      MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
01534  *      MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
01535  *      MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
01536  *      MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
01537  *      MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
01538  *      MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
01539  *
01540  * PEM_PARSE uses AES for decrypting encrypted keys.
01541  */
01542 #define MBEDTLS_AES_C
01543 
01544 /**
01545  * \def MBEDTLS_ARC4_C
01546  *
01547  * Enable the ARCFOUR stream cipher.
01548  *
01549  * Module:  library/arc4.c
01550  * Caller:  library/ssl_tls.c
01551  *
01552  * This module enables the following ciphersuites (if other requisites are
01553  * enabled as well):
01554  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
01555  *      MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
01556  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
01557  *      MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
01558  *      MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
01559  *      MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
01560  *      MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
01561  *      MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
01562  *      MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
01563  *      MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
01564  */
01565 //#define MBEDTLS_ARC4_C
01566 
01567 /**
01568  * \def MBEDTLS_ASN1_PARSE_C
01569  *
01570  * Enable the generic ASN1 parser.
01571  *
01572  * Module:  library/asn1.c
01573  * Caller:  library/x509.c
01574  *          library/dhm.c
01575  *          library/pkcs12.c
01576  *          library/pkcs5.c
01577  *          library/pkparse.c
01578  */
01579 #define MBEDTLS_ASN1_PARSE_C
01580 
01581 /**
01582  * \def MBEDTLS_ASN1_WRITE_C
01583  *
01584  * Enable the generic ASN1 writer.
01585  *
01586  * Module:  library/asn1write.c
01587  * Caller:  library/ecdsa.c
01588  *          library/pkwrite.c
01589  *          library/x509_create.c
01590  *          library/x509write_crt.c
01591  *          library/x509write_csr.c
01592  */
01593 #define MBEDTLS_ASN1_WRITE_C
01594 
01595 /**
01596  * \def MBEDTLS_BASE64_C
01597  *
01598  * Enable the Base64 module.
01599  *
01600  * Module:  library/base64.c
01601  * Caller:  library/pem.c
01602  *
01603  * This module is required for PEM support (required by X.509).
01604  */
01605 //#define MBEDTLS_BASE64_C
01606 
01607 /**
01608  * \def MBEDTLS_BIGNUM_C
01609  *
01610  * Enable the multi-precision integer library.
01611  *
01612  * Module:  library/bignum.c
01613  * Caller:  library/dhm.c
01614  *          library/ecp.c
01615  *          library/ecdsa.c
01616  *          library/rsa.c
01617  *          library/ssl_tls.c
01618  *
01619  * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
01620  */
01621 #define MBEDTLS_BIGNUM_C
01622 
01623 /**
01624  * \def MBEDTLS_BLOWFISH_C
01625  *
01626  * Enable the Blowfish block cipher.
01627  *
01628  * Module:  library/blowfish.c
01629  */
01630 //#define MBEDTLS_BLOWFISH_C
01631 
01632 /**
01633  * \def MBEDTLS_CAMELLIA_C
01634  *
01635  * Enable the Camellia block cipher.
01636  *
01637  * Module:  library/camellia.c
01638  * Caller:  library/ssl_tls.c
01639  *
01640  * This module enables the following ciphersuites (if other requisites are
01641  * enabled as well):
01642  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
01643  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
01644  *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
01645  *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
01646  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
01647  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
01648  *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
01649  *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
01650  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
01651  *      MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
01652  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
01653  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
01654  *      MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
01655  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
01656  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
01657  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
01658  *      MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
01659  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
01660  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
01661  *      MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
01662  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
01663  *      MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
01664  *      MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
01665  *      MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
01666  *      MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
01667  *      MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
01668  *      MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
01669  *      MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
01670  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
01671  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
01672  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
01673  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
01674  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
01675  *      MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
01676  *      MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
01677  *      MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
01678  *      MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
01679  *      MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
01680  *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
01681  *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
01682  *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
01683  *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
01684  */
01685 //#define MBEDTLS_CAMELLIA_C
01686 
01687 /**
01688  * \def MBEDTLS_CCM_C
01689  *
01690  * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
01691  *
01692  * Module:  library/ccm.c
01693  *
01694  * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
01695  *
01696  * This module enables the AES-CCM ciphersuites, if other requisites are
01697  * enabled as well.
01698  */
01699 #define MBEDTLS_CCM_C
01700 
01701 /**
01702  * \def MBEDTLS_CERTS_C
01703  *
01704  * Enable the test certificates.
01705  *
01706  * Module:  library/certs.c
01707  * Caller:
01708  *
01709  * This module is used for testing (ssl_client/server).
01710  */
01711 //#define MBEDTLS_CERTS_C
01712 
01713 /**
01714  * \def MBEDTLS_CIPHER_C
01715  *
01716  * Enable the generic cipher layer.
01717  *
01718  * Module:  library/cipher.c
01719  * Caller:  library/ssl_tls.c
01720  *
01721  * Uncomment to enable generic cipher wrappers.
01722  */
01723 #define MBEDTLS_CIPHER_C
01724 
01725 /**
01726  * \def MBEDTLS_CMAC_C
01727  *
01728  * Enable the CMAC (Cipher-based Message Authentication Code) mode for block
01729  * ciphers.
01730  *
01731  * Module:  library/cmac.c
01732  *
01733  * Requires: MBEDTLS_AES_C or MBEDTLS_DES_C
01734  *
01735  */
01736 #define MBEDTLS_CMAC_C
01737 
01738 /**
01739  * \def MBEDTLS_CTR_DRBG_C
01740  *
01741  * Enable the CTR_DRBG AES-256-based random generator.
01742  *
01743  * Module:  library/ctr_drbg.c
01744  * Caller:
01745  *
01746  * Requires: MBEDTLS_AES_C
01747  *
01748  * This module provides the CTR_DRBG AES-256 random number generator.
01749  */
01750 #define MBEDTLS_CTR_DRBG_C
01751 
01752 /**
01753  * \def MBEDTLS_DEBUG_C
01754  *
01755  * Enable the debug functions.
01756  *
01757  * Module:  library/debug.c
01758  * Caller:  library/ssl_cli.c
01759  *          library/ssl_srv.c
01760  *          library/ssl_tls.c
01761  *
01762  * This module provides debugging functions.
01763  */
01764 //#define MBEDTLS_DEBUG_C
01765 
01766 /**
01767  * \def MBEDTLS_DES_C
01768  *
01769  * Enable the DES block cipher.
01770  *
01771  * Module:  library/des.c
01772  * Caller:  library/pem.c
01773  *          library/ssl_tls.c
01774  *
01775  * This module enables the following ciphersuites (if other requisites are
01776  * enabled as well):
01777  *      MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
01778  *      MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
01779  *      MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
01780  *      MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
01781  *      MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
01782  *      MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
01783  *      MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
01784  *      MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
01785  *      MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
01786  *      MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
01787  *
01788  * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
01789  */
01790 //#define MBEDTLS_DES_C
01791 
01792 /**
01793  * \def MBEDTLS_DHM_C
01794  *
01795  * Enable the Diffie-Hellman-Merkle module.
01796  *
01797  * Module:  library/dhm.c
01798  * Caller:  library/ssl_cli.c
01799  *          library/ssl_srv.c
01800  *
01801  * This module is used by the following key exchanges:
01802  *      DHE-RSA, DHE-PSK
01803  */
01804 //#define MBEDTLS_DHM_C
01805 
01806 /**
01807  * \def MBEDTLS_ECDH_C
01808  *
01809  * Enable the elliptic curve Diffie-Hellman library.
01810  *
01811  * Module:  library/ecdh.c
01812  * Caller:  library/ssl_cli.c
01813  *          library/ssl_srv.c
01814  *
01815  * This module is used by the following key exchanges:
01816  *      ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
01817  *
01818  * Requires: MBEDTLS_ECP_C
01819  */
01820 #define MBEDTLS_ECDH_C
01821 
01822 /**
01823  * \def MBEDTLS_ECDSA_C
01824  *
01825  * Enable the elliptic curve DSA library.
01826  *
01827  * Module:  library/ecdsa.c
01828  * Caller:
01829  *
01830  * This module is used by the following key exchanges:
01831  *      ECDHE-ECDSA
01832  *
01833  * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
01834  */
01835 #define MBEDTLS_ECDSA_C
01836 
01837 /**
01838  * \def MBEDTLS_ECJPAKE_C
01839  *
01840  * Enable the elliptic curve J-PAKE library.
01841  *
01842  * \warning This is currently experimental. EC J-PAKE support is based on the
01843  * Thread v1.0.0 specification; incompatible changes to the specification
01844  * might still happen. For this reason, this is disabled by default.
01845  *
01846  * Module:  library/ecjpake.c
01847  * Caller:
01848  *
01849  * This module is used by the following key exchanges:
01850  *      ECJPAKE
01851  *
01852  * Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C
01853  */
01854 //#define MBEDTLS_ECJPAKE_C
01855 
01856 /**
01857  * \def MBEDTLS_ECP_C
01858  *
01859  * Enable the elliptic curve over GF(p) library.
01860  *
01861  * Module:  library/ecp.c
01862  * Caller:  library/ecdh.c
01863  *          library/ecdsa.c
01864  *          library/ecjpake.c
01865  *
01866  * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
01867  */
01868 #define MBEDTLS_ECP_C
01869 
01870 /**
01871  * \def MBEDTLS_ENTROPY_C
01872  *
01873  * Enable the platform-specific entropy code.
01874  *
01875  * Module:  library/entropy.c
01876  * Caller:
01877  *
01878  * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
01879  *
01880  * This module provides a generic entropy pool
01881  */
01882 #define MBEDTLS_ENTROPY_C
01883 
01884 /**
01885  * \def MBEDTLS_ERROR_C
01886  *
01887  * Enable error code to error string conversion.
01888  *
01889  * Module:  library/error.c
01890  * Caller:
01891  *
01892  * This module enables mbedtls_strerror().
01893  */
01894 //#define MBEDTLS_ERROR_C
01895 
01896 /**
01897  * \def MBEDTLS_GCM_C
01898  *
01899  * Enable the Galois/Counter Mode (GCM) for AES.
01900  *
01901  * Module:  library/gcm.c
01902  *
01903  * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
01904  *
01905  * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
01906  * requisites are enabled as well.
01907  */
01908 //#define MBEDTLS_GCM_C
01909 
01910 /**
01911  * \def MBEDTLS_HAVEGE_C
01912  *
01913  * Enable the HAVEGE random generator.
01914  *
01915  * Warning: the HAVEGE random generator is not suitable for virtualized
01916  *          environments
01917  *
01918  * Warning: the HAVEGE random generator is dependent on timing and specific
01919  *          processor traits. It is therefore not advised to use HAVEGE as
01920  *          your applications primary random generator or primary entropy pool
01921  *          input. As a secondary input to your entropy pool, it IS able add
01922  *          the (limited) extra entropy it provides.
01923  *
01924  * Module:  library/havege.c
01925  * Caller:
01926  *
01927  * Requires: MBEDTLS_TIMING_C
01928  *
01929  * Uncomment to enable the HAVEGE random generator.
01930  */
01931 //#define MBEDTLS_HAVEGE_C
01932 
01933 /**
01934  * \def MBEDTLS_HMAC_DRBG_C
01935  *
01936  * Enable the HMAC_DRBG random generator.
01937  *
01938  * Module:  library/hmac_drbg.c
01939  * Caller:
01940  *
01941  * Requires: MBEDTLS_MD_C
01942  *
01943  * Uncomment to enable the HMAC_DRBG random number geerator.
01944  */
01945 #define MBEDTLS_HMAC_DRBG_C
01946 
01947 /**
01948  * \def MBEDTLS_MD_C
01949  *
01950  * Enable the generic message digest layer.
01951  *
01952  * Module:  library/md.c
01953  * Caller:
01954  *
01955  * Uncomment to enable generic message digest wrappers.
01956  */
01957 #define MBEDTLS_MD_C
01958 
01959 /**
01960  * \def MBEDTLS_MD2_C
01961  *
01962  * Enable the MD2 hash algorithm.
01963  *
01964  * Module:  library/md2.c
01965  * Caller:
01966  *
01967  * Uncomment to enable support for (rare) MD2-signed X.509 certs.
01968  */
01969 //#define MBEDTLS_MD2_C
01970 
01971 /**
01972  * \def MBEDTLS_MD4_C
01973  *
01974  * Enable the MD4 hash algorithm.
01975  *
01976  * Module:  library/md4.c
01977  * Caller:
01978  *
01979  * Uncomment to enable support for (rare) MD4-signed X.509 certs.
01980  */
01981 //#define MBEDTLS_MD4_C
01982 
01983 /**
01984  * \def MBEDTLS_MD5_C
01985  *
01986  * Enable the MD5 hash algorithm.
01987  *
01988  * Module:  library/md5.c
01989  * Caller:  library/md.c
01990  *          library/pem.c
01991  *          library/ssl_tls.c
01992  *
01993  * This module is required for SSL/TLS and X.509.
01994  * PEM_PARSE uses MD5 for decrypting encrypted keys.
01995  */
01996 //#define MBEDTLS_MD5_C
01997 
01998 /**
01999  * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
02000  *
02001  * Enable the buffer allocator implementation that makes use of a (stack)
02002  * based buffer to 'allocate' dynamic memory. (replaces calloc() and free()
02003  * calls)
02004  *
02005  * Module:  library/memory_buffer_alloc.c
02006  *
02007  * Requires: MBEDTLS_PLATFORM_C
02008  *           MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
02009  *
02010  * Enable this module to enable the buffer memory allocator.
02011  */
02012 //#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
02013 
02014 /**
02015  * \def MBEDTLS_NET_C
02016  *
02017  * Enable the TCP and UDP over IPv6/IPv4 networking routines.
02018  *
02019  * \note This module only works on POSIX/Unix (including Linux, BSD and OS X)
02020  * and Windows. For other platforms, you'll want to disable it, and write your
02021  * own networking callbacks to be passed to \c mbedtls_ssl_set_bio().
02022  *
02023  * \note See also our Knowledge Base article about porting to a new
02024  * environment:
02025  * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
02026  *
02027  * Module:  library/net_sockets.c
02028  *
02029  * This module provides networking routines.
02030  */
02031 //#define MBEDTLS_NET_C
02032 
02033 /**
02034  * \def MBEDTLS_OID_C
02035  *
02036  * Enable the OID database.
02037  *
02038  * Module:  library/oid.c
02039  * Caller:  library/asn1write.c
02040  *          library/pkcs5.c
02041  *          library/pkparse.c
02042  *          library/pkwrite.c
02043  *          library/rsa.c
02044  *          library/x509.c
02045  *          library/x509_create.c
02046  *          library/x509_crl.c
02047  *          library/x509_crt.c
02048  *          library/x509_csr.c
02049  *          library/x509write_crt.c
02050  *          library/x509write_csr.c
02051  *
02052  * This modules translates between OIDs and internal values.
02053  */
02054 #define MBEDTLS_OID_C
02055 
02056 /**
02057  * \def MBEDTLS_PADLOCK_C
02058  *
02059  * Enable VIA Padlock support on x86.
02060  *
02061  * Module:  library/padlock.c
02062  * Caller:  library/aes.c
02063  *
02064  * Requires: MBEDTLS_HAVE_ASM
02065  *
02066  * This modules adds support for the VIA PadLock on x86.
02067  */
02068 //#define MBEDTLS_PADLOCK_C
02069 
02070 /**
02071  * \def MBEDTLS_PEM_PARSE_C
02072  *
02073  * Enable PEM decoding / parsing.
02074  *
02075  * Module:  library/pem.c
02076  * Caller:  library/dhm.c
02077  *          library/pkparse.c
02078  *          library/x509_crl.c
02079  *          library/x509_crt.c
02080  *          library/x509_csr.c
02081  *
02082  * Requires: MBEDTLS_BASE64_C
02083  *
02084  * This modules adds support for decoding / parsing PEM files.
02085  */
02086 //#define MBEDTLS_PEM_PARSE_C
02087 
02088 /**
02089  * \def MBEDTLS_PEM_WRITE_C
02090  *
02091  * Enable PEM encoding / writing.
02092  *
02093  * Module:  library/pem.c
02094  * Caller:  library/pkwrite.c
02095  *          library/x509write_crt.c
02096  *          library/x509write_csr.c
02097  *
02098  * Requires: MBEDTLS_BASE64_C
02099  *
02100  * This modules adds support for encoding / writing PEM files.
02101  */
02102 //#define MBEDTLS_PEM_WRITE_C
02103 
02104 /**
02105  * \def MBEDTLS_PK_C
02106  *
02107  * Enable the generic public (asymetric) key layer.
02108  *
02109  * Module:  library/pk.c
02110  * Caller:  library/ssl_tls.c
02111  *          library/ssl_cli.c
02112  *          library/ssl_srv.c
02113  *
02114  * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
02115  *
02116  * Uncomment to enable generic public key wrappers.
02117  */
02118 #define MBEDTLS_PK_C
02119 
02120 /**
02121  * \def MBEDTLS_PK_PARSE_C
02122  *
02123  * Enable the generic public (asymetric) key parser.
02124  *
02125  * Module:  library/pkparse.c
02126  * Caller:  library/x509_crt.c
02127  *          library/x509_csr.c
02128  *
02129  * Requires: MBEDTLS_PK_C
02130  *
02131  * Uncomment to enable generic public key parse functions.
02132  */
02133 #define MBEDTLS_PK_PARSE_C
02134 
02135 /**
02136  * \def MBEDTLS_PK_WRITE_C
02137  *
02138  * Enable the generic public (asymetric) key writer.
02139  *
02140  * Module:  library/pkwrite.c
02141  * Caller:  library/x509write.c
02142  *
02143  * Requires: MBEDTLS_PK_C
02144  *
02145  * Uncomment to enable generic public key write functions.
02146  */
02147 #define MBEDTLS_PK_WRITE_C
02148 
02149 /**
02150  * \def MBEDTLS_PKCS5_C
02151  *
02152  * Enable PKCS#5 functions.
02153  *
02154  * Module:  library/pkcs5.c
02155  *
02156  * Requires: MBEDTLS_MD_C
02157  *
02158  * This module adds support for the PKCS#5 functions.
02159  */
02160 //#define MBEDTLS_PKCS5_C
02161 
02162 /**
02163  * \def MBEDTLS_PKCS11_C
02164  *
02165  * Enable wrapper for PKCS#11 smartcard support.
02166  *
02167  * Module:  library/pkcs11.c
02168  * Caller:  library/pk.c
02169  *
02170  * Requires: MBEDTLS_PK_C
02171  *
02172  * This module enables SSL/TLS PKCS #11 smartcard support.
02173  * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
02174  */
02175 //#define MBEDTLS_PKCS11_C
02176 
02177 /**
02178  * \def MBEDTLS_PKCS12_C
02179  *
02180  * Enable PKCS#12 PBE functions.
02181  * Adds algorithms for parsing PKCS#8 encrypted private keys
02182  *
02183  * Module:  library/pkcs12.c
02184  * Caller:  library/pkparse.c
02185  *
02186  * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
02187  * Can use:  MBEDTLS_ARC4_C
02188  *
02189  * This module enables PKCS#12 functions.
02190  */
02191 //#define MBEDTLS_PKCS12_C
02192 
02193 /**
02194  * \def MBEDTLS_PLATFORM_C
02195  *
02196  * Enable the platform abstraction layer that allows you to re-assign
02197  * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
02198  *
02199  * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
02200  * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
02201  * above to be specified at runtime or compile time respectively.
02202  *
02203  * \note This abstraction layer must be enabled on Windows (including MSYS2)
02204  * as other module rely on it for a fixed snprintf implementation.
02205  *
02206  * Module:  library/platform.c
02207  * Caller:  Most other .c files
02208  *
02209  * This module enables abstraction of common (libc) functions.
02210  */
02211 #define MBEDTLS_PLATFORM_C
02212 
02213 /**
02214  * \def MBEDTLS_RIPEMD160_C
02215  *
02216  * Enable the RIPEMD-160 hash algorithm.
02217  *
02218  * Module:  library/ripemd160.c
02219  * Caller:  library/md.c
02220  *
02221  */
02222 //#define MBEDTLS_RIPEMD160_C
02223 
02224 /**
02225  * \def MBEDTLS_RSA_C
02226  *
02227  * Enable the RSA public-key cryptosystem.
02228  *
02229  * Module:  library/rsa.c
02230  * Caller:  library/ssl_cli.c
02231  *          library/ssl_srv.c
02232  *          library/ssl_tls.c
02233  *          library/x509.c
02234  *
02235  * This module is used by the following key exchanges:
02236  *      RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
02237  *
02238  * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
02239  */
02240 //#define MBEDTLS_RSA_C
02241 
02242 /**
02243  * \def MBEDTLS_SHA1_C
02244  *
02245  * Enable the SHA1 cryptographic hash algorithm.
02246  *
02247  * Module:  library/sha1.c
02248  * Caller:  library/md.c
02249  *          library/ssl_cli.c
02250  *          library/ssl_srv.c
02251  *          library/ssl_tls.c
02252  *          library/x509write_crt.c
02253  *
02254  * This module is required for SSL/TLS and SHA1-signed certificates.
02255  */
02256 //#define MBEDTLS_SHA1_C
02257 
02258 /**
02259  * \def MBEDTLS_SHA256_C
02260  *
02261  * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
02262  *
02263  * Module:  library/sha256.c
02264  * Caller:  library/entropy.c
02265  *          library/md.c
02266  *          library/ssl_cli.c
02267  *          library/ssl_srv.c
02268  *          library/ssl_tls.c
02269  *
02270  * This module adds support for SHA-224 and SHA-256.
02271  * This module is required for the SSL/TLS 1.2 PRF function.
02272  */
02273 #define MBEDTLS_SHA256_C
02274 
02275 /**
02276  * \def MBEDTLS_SHA512_C
02277  *
02278  * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
02279  *
02280  * Module:  library/sha512.c
02281  * Caller:  library/entropy.c
02282  *          library/md.c
02283  *          library/ssl_cli.c
02284  *          library/ssl_srv.c
02285  *
02286  * This module adds support for SHA-384 and SHA-512.
02287  */
02288 //#define MBEDTLS_SHA512_C
02289 
02290 /**
02291  * \def MBEDTLS_SSL_CACHE_C
02292  *
02293  * Enable simple SSL cache implementation.
02294  *
02295  * Module:  library/ssl_cache.c
02296  * Caller:
02297  *
02298  * Requires: MBEDTLS_SSL_CACHE_C
02299  */
02300 #define MBEDTLS_SSL_CACHE_C
02301 
02302 /**
02303  * \def MBEDTLS_SSL_COOKIE_C
02304  *
02305  * Enable basic implementation of DTLS cookies for hello verification.
02306  *
02307  * Module:  library/ssl_cookie.c
02308  * Caller:
02309  */
02310 #define MBEDTLS_SSL_COOKIE_C
02311 
02312 /**
02313  * \def MBEDTLS_SSL_TICKET_C
02314  *
02315  * Enable an implementation of TLS server-side callbacks for session tickets.
02316  *
02317  * Module:  library/ssl_ticket.c
02318  * Caller:
02319  *
02320  * Requires: MBEDTLS_CIPHER_C
02321  */
02322 #define MBEDTLS_SSL_TICKET_C
02323 
02324 /**
02325  * \def MBEDTLS_SSL_CLI_C
02326  *
02327  * Enable the SSL/TLS client code.
02328  *
02329  * Module:  library/ssl_cli.c
02330  * Caller:
02331  *
02332  * Requires: MBEDTLS_SSL_TLS_C
02333  *
02334  * This module is required for SSL/TLS client support.
02335  */
02336 #define MBEDTLS_SSL_CLI_C
02337 
02338 /**
02339  * \def MBEDTLS_SSL_SRV_C
02340  *
02341  * Enable the SSL/TLS server code.
02342  *
02343  * Module:  library/ssl_srv.c
02344  * Caller:
02345  *
02346  * Requires: MBEDTLS_SSL_TLS_C
02347  *
02348  * This module is required for SSL/TLS server support.
02349  */
02350 //#define MBEDTLS_SSL_SRV_C
02351 
02352 /**
02353  * \def MBEDTLS_SSL_TLS_C
02354  *
02355  * Enable the generic SSL/TLS code.
02356  *
02357  * Module:  library/ssl_tls.c
02358  * Caller:  library/ssl_cli.c
02359  *          library/ssl_srv.c
02360  *
02361  * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
02362  *           and at least one of the MBEDTLS_SSL_PROTO_XXX defines
02363  *
02364  * This module is required for SSL/TLS.
02365  */
02366 #define MBEDTLS_SSL_TLS_C
02367 
02368 /**
02369  * \def MBEDTLS_THREADING_C
02370  *
02371  * Enable the threading abstraction layer.
02372  * By default mbed TLS assumes it is used in a non-threaded environment or that
02373  * contexts are not shared between threads. If you do intend to use contexts
02374  * between threads, you will need to enable this layer to prevent race
02375  * conditions. See also our Knowledge Base article about threading:
02376  * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading
02377  *
02378  * Module:  library/threading.c
02379  *
02380  * This allows different threading implementations (self-implemented or
02381  * provided).
02382  *
02383  * You will have to enable either MBEDTLS_THREADING_ALT or
02384  * MBEDTLS_THREADING_PTHREAD.
02385  *
02386  * Enable this layer to allow use of mutexes within mbed TLS
02387  */
02388 //#define MBEDTLS_THREADING_C
02389 
02390 /**
02391  * \def MBEDTLS_TIMING_C
02392  *
02393  * Enable the semi-portable timing interface.
02394  *
02395  * \note The provided implementation only works on POSIX/Unix (including Linux,
02396  * BSD and OS X) and Windows. On other platforms, you can either disable that
02397  * module and provide your own implementations of the callbacks needed by
02398  * \c mbedtls_ssl_set_timer_cb() for DTLS, or leave it enabled and provide
02399  * your own implementation of the whole module by setting
02400  * \c MBEDTLS_TIMING_ALT in the current file.
02401  *
02402  * \note See also our Knowledge Base article about porting to a new
02403  * environment:
02404  * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
02405  *
02406  * Module:  library/timing.c
02407  * Caller:  library/havege.c
02408  *
02409  * This module is used by the HAVEGE random number generator.
02410  */
02411 //#define MBEDTLS_TIMING_C
02412 
02413 /**
02414  * \def MBEDTLS_VERSION_C
02415  *
02416  * Enable run-time version information.
02417  *
02418  * Module:  library/version.c
02419  *
02420  * This module provides run-time version information.
02421  */
02422 #define MBEDTLS_VERSION_C
02423 
02424 /**
02425  * \def MBEDTLS_X509_USE_C
02426  *
02427  * Enable X.509 core for using certificates.
02428  *
02429  * Module:  library/x509.c
02430  * Caller:  library/x509_crl.c
02431  *          library/x509_crt.c
02432  *          library/x509_csr.c
02433  *
02434  * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
02435  *           MBEDTLS_PK_PARSE_C
02436  *
02437  * This module is required for the X.509 parsing modules.
02438  */
02439 #define MBEDTLS_X509_USE_C
02440 
02441 /**
02442  * \def MBEDTLS_X509_CRT_PARSE_C
02443  *
02444  * Enable X.509 certificate parsing.
02445  *
02446  * Module:  library/x509_crt.c
02447  * Caller:  library/ssl_cli.c
02448  *          library/ssl_srv.c
02449  *          library/ssl_tls.c
02450  *
02451  * Requires: MBEDTLS_X509_USE_C
02452  *
02453  * This module is required for X.509 certificate parsing.
02454  */
02455 #define MBEDTLS_X509_CRT_PARSE_C
02456 
02457 /**
02458  * \def MBEDTLS_X509_CRL_PARSE_C
02459  *
02460  * Enable X.509 CRL parsing.
02461  *
02462  * Module:  library/x509_crl.c
02463  * Caller:  library/x509_crt.c
02464  *
02465  * Requires: MBEDTLS_X509_USE_C
02466  *
02467  * This module is required for X.509 CRL parsing.
02468  */
02469 #define MBEDTLS_X509_CRL_PARSE_C
02470 
02471 /**
02472  * \def MBEDTLS_X509_CSR_PARSE_C
02473  *
02474  * Enable X.509 Certificate Signing Request (CSR) parsing.
02475  *
02476  * Module:  library/x509_csr.c
02477  * Caller:  library/x509_crt_write.c
02478  *
02479  * Requires: MBEDTLS_X509_USE_C
02480  *
02481  * This module is used for reading X.509 certificate request.
02482  */
02483 #define MBEDTLS_X509_CSR_PARSE_C
02484 
02485 /**
02486  * \def MBEDTLS_X509_CREATE_C
02487  *
02488  * Enable X.509 core for creating certificates.
02489  *
02490  * Module:  library/x509_create.c
02491  *
02492  * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
02493  *
02494  * This module is the basis for creating X.509 certificates and CSRs.
02495  */
02496 #define MBEDTLS_X509_CREATE_C
02497 
02498 /**
02499  * \def MBEDTLS_X509_CRT_WRITE_C
02500  *
02501  * Enable creating X.509 certificates.
02502  *
02503  * Module:  library/x509_crt_write.c
02504  *
02505  * Requires: MBEDTLS_X509_CREATE_C
02506  *
02507  * This module is required for X.509 certificate creation.
02508  */
02509 //#define MBEDTLS_X509_CRT_WRITE_C
02510 
02511 /**
02512  * \def MBEDTLS_X509_CSR_WRITE_C
02513  *
02514  * Enable creating X.509 Certificate Signing Requests (CSR).
02515  *
02516  * Module:  library/x509_csr_write.c
02517  *
02518  * Requires: MBEDTLS_X509_CREATE_C
02519  *
02520  * This module is required for X.509 certificate request writing.
02521  */
02522 #define MBEDTLS_X509_CSR_WRITE_C
02523 
02524 /**
02525  * \def MBEDTLS_XTEA_C
02526  *
02527  * Enable the XTEA block cipher.
02528  *
02529  * Module:  library/xtea.c
02530  * Caller:
02531  */
02532 //#define MBEDTLS_XTEA_C
02533 
02534 /* \} name SECTION: mbed TLS modules */
02535 
02536 /**
02537  * \name SECTION: Module configuration options
02538  *
02539  * This section allows for the setting of module specific sizes and
02540  * configuration options. The default values are already present in the
02541  * relevant header files and should suffice for the regular use cases.
02542  *
02543  * Our advice is to enable options and change their values here
02544  * only if you have a good reason and know the consequences.
02545  *
02546  * Please check the respective header file for documentation on these
02547  * parameters (to prevent duplicate documentation).
02548  * \{
02549  */
02550 
02551 /* MPI / BIGNUM options */
02552 //#define MBEDTLS_MPI_WINDOW_SIZE            6 /**< Maximum windows size used. */
02553 //#define MBEDTLS_MPI_MAX_SIZE            1024 /**< Maximum number of bytes for usable MPIs. */
02554 
02555 /* CTR_DRBG options */
02556 //#define MBEDTLS_CTR_DRBG_ENTROPY_LEN               48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
02557 //#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL        10000 /**< Interval before reseed is performed by default */
02558 //#define MBEDTLS_CTR_DRBG_MAX_INPUT                256 /**< Maximum number of additional input bytes */
02559 //#define MBEDTLS_CTR_DRBG_MAX_REQUEST             1024 /**< Maximum number of requested bytes per call */
02560 //#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT           384 /**< Maximum size of (re)seed buffer */
02561 
02562 /* HMAC_DRBG options */
02563 //#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL   10000 /**< Interval before reseed is performed by default */
02564 //#define MBEDTLS_HMAC_DRBG_MAX_INPUT           256 /**< Maximum number of additional input bytes */
02565 //#define MBEDTLS_HMAC_DRBG_MAX_REQUEST        1024 /**< Maximum number of requested bytes per call */
02566 //#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT      384 /**< Maximum size of (re)seed buffer */
02567 
02568 /* ECP options */
02569 //#define MBEDTLS_ECP_MAX_BITS             521 /**< Maximum bit size of groups */
02570 //#define MBEDTLS_ECP_WINDOW_SIZE            6 /**< Maximum window size used */
02571 //#define MBEDTLS_ECP_FIXED_POINT_OPTIM      1 /**< Enable fixed-point speed-up */
02572 
02573 /* Entropy options */
02574 //#define MBEDTLS_ENTROPY_MAX_SOURCES                20 /**< Maximum number of sources supported */
02575 //#define MBEDTLS_ENTROPY_MAX_GATHER                128 /**< Maximum amount requested from entropy sources */
02576 //#define MBEDTLS_ENTROPY_MIN_HARDWARE               32 /**< Default minimum number of bytes required for the hardware entropy source mbedtls_hardware_poll() before entropy is released */
02577 
02578 /* Memory buffer allocator options */
02579 //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE      4 /**< Align on multiples of this value */
02580 
02581 /* Platform options */
02582 //#define MBEDTLS_PLATFORM_STD_MEM_HDR   <stdlib.h> /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */
02583 //#define MBEDTLS_PLATFORM_STD_CALLOC        calloc /**< Default allocator to use, can be undefined */
02584 //#define MBEDTLS_PLATFORM_STD_FREE            free /**< Default free to use, can be undefined */
02585 //#define MBEDTLS_PLATFORM_STD_EXIT            exit /**< Default exit to use, can be undefined */
02586 //#define MBEDTLS_PLATFORM_STD_TIME            time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
02587 //#define MBEDTLS_PLATFORM_STD_FPRINTF      fprintf /**< Default fprintf to use, can be undefined */
02588 //#define MBEDTLS_PLATFORM_STD_PRINTF        printf /**< Default printf to use, can be undefined */
02589 /* Note: your snprintf must correclty zero-terminate the buffer! */
02590 //#define MBEDTLS_PLATFORM_STD_SNPRINTF    snprintf /**< Default snprintf to use, can be undefined */
02591 //#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS       0 /**< Default exit value to use, can be undefined */
02592 //#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE       1 /**< Default exit value to use, can be undefined */
02593 //#define MBEDTLS_PLATFORM_STD_NV_SEED_READ   mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
02594 //#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE  mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
02595 //#define MBEDTLS_PLATFORM_STD_NV_SEED_FILE  "seedfile" /**< Seed file to read/write with default implementation */
02596 
02597 /* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
02598 /* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
02599 //#define MBEDTLS_PLATFORM_CALLOC_MACRO        calloc /**< Default allocator macro to use, can be undefined */
02600 //#define MBEDTLS_PLATFORM_FREE_MACRO            free /**< Default free macro to use, can be undefined */
02601 //#define MBEDTLS_PLATFORM_EXIT_MACRO            exit /**< Default exit macro to use, can be undefined */
02602 //#define MBEDTLS_PLATFORM_TIME_MACRO            time /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
02603 //#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO       time_t /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
02604 //#define MBEDTLS_PLATFORM_FPRINTF_MACRO      fprintf /**< Default fprintf macro to use, can be undefined */
02605 //#define MBEDTLS_PLATFORM_PRINTF_MACRO        printf /**< Default printf macro to use, can be undefined */
02606 /* Note: your snprintf must correclty zero-terminate the buffer! */
02607 //#define MBEDTLS_PLATFORM_SNPRINTF_MACRO    snprintf /**< Default snprintf macro to use, can be undefined */
02608 //#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO   mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
02609 //#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO  mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
02610 
02611 /* SSL Cache options */
02612 //#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT       86400 /**< 1 day  */
02613 //#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES      50 /**< Maximum entries in cache */
02614 
02615 /* SSL options */
02616 #define MBEDTLS_SSL_MAX_CONTENT_LEN             4096 /**< Maxium fragment length in bytes, determines the size of each of the two internal I/O buffers */
02617 //#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME     86400 /**< Lifetime of session tickets (if enabled) */
02618 //#define MBEDTLS_PSK_MAX_LEN               32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
02619 //#define MBEDTLS_SSL_COOKIE_TIMEOUT        60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
02620 
02621 /**
02622  * Complete list of ciphersuites to use, in order of preference.
02623  *
02624  * \warning No dependency checking is done on that field! This option can only
02625  * be used to restrict the set of available ciphersuites. It is your
02626  * responsibility to make sure the needed modules are active.
02627  *
02628  * Use this to save a few hundred bytes of ROM (default ordering of all
02629  * available ciphersuites) and a few to a few hundred bytes of RAM.
02630  *
02631  * The value below is only an example, not the default.
02632  */
02633 #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, \
02634                                  MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, \
02635                                  MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, \
02636                                  MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8, \
02637                                  MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8, \
02638                                  MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
02639 /* X509 options */
02640 //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA   8   /**< Maximum number of intermediate CAs in a verification chain. */
02641 //#define MBEDTLS_X509_MAX_FILE_PATH_LEN     512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */
02642 
02643 /* \} name SECTION: Customisation configuration options */
02644 
02645 /* Target and application specific configurations */
02646 //#define YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE "mbedtls/target_config.h"
02647 
02648 #if defined(TARGET_LIKE_MBED) && defined(YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE)
02649 #include YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE
02650 #endif
02651 
02652 
02653 #include "check_config.h"
02654 
02655 #if defined(MBEDTLS_TEST_NULL_ENTROPY)
02656 #warning "MBEDTLS_TEST_NULL_ENTROPY has been enabled. This " \
02657     "configuration is not secure and is not suitable for production use"
02658 #endif
02659 
02660 #endif /* MBEDTLS_CONFIG_H */