mbed TLS v2.16.3

config.h
Go to the documentation of this file.
1
10 /*
11 * Copyright (C) 2006-2018, ARM Limited, All Rights Reserved
12 * SPDX-License-Identifier: Apache-2.0
13 *
14 * Licensed under the Apache License, Version 2.0 (the "License"); you may
15 * not use this file except in compliance with the License.
16 * You may obtain a copy of the License at
17 *
18 * http://www.apache.org/licenses/LICENSE-2.0
19 *
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
22 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
25 *
26 * This file is part of mbed TLS (https://tls.mbed.org)
27 */
28
29 #ifndef MBEDTLS_CONFIG_H
30 #define MBEDTLS_CONFIG_H
31
32 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
33 #define _CRT_SECURE_NO_DEPRECATE 1
34 #endif
35
61 #define MBEDTLS_HAVE_ASM
62
89 //#define MBEDTLS_NO_UDBL_DIVISION
90
111 //#define MBEDTLS_NO_64BIT_MULTIPLICATION
112
120 //#define MBEDTLS_HAVE_SSE2
121
135 #define MBEDTLS_HAVE_TIME
136
156 #define MBEDTLS_HAVE_TIME_DATE
157
180 //#define MBEDTLS_PLATFORM_MEMORY
181
199 //#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
200
224 //#define MBEDTLS_PLATFORM_EXIT_ALT
225 //#define MBEDTLS_PLATFORM_TIME_ALT
226 //#define MBEDTLS_PLATFORM_FPRINTF_ALT
227 //#define MBEDTLS_PLATFORM_PRINTF_ALT
228 //#define MBEDTLS_PLATFORM_SNPRINTF_ALT
229 //#define MBEDTLS_PLATFORM_NV_SEED_ALT
230 //#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT
231
245 //#define MBEDTLS_DEPRECATED_WARNING
246
257 //#define MBEDTLS_DEPRECATED_REMOVED
258
309 //#define MBEDTLS_CHECK_PARAMS
310
323 //#define MBEDTLS_CHECK_PARAMS_ASSERT
324
325 /* \} name SECTION: System support */
326
346 //#define MBEDTLS_TIMING_ALT
347
373 //#define MBEDTLS_AES_ALT
374 //#define MBEDTLS_ARC4_ALT
375 //#define MBEDTLS_ARIA_ALT
376 //#define MBEDTLS_BLOWFISH_ALT
377 //#define MBEDTLS_CAMELLIA_ALT
378 //#define MBEDTLS_CCM_ALT
379 //#define MBEDTLS_CHACHA20_ALT
380 //#define MBEDTLS_CHACHAPOLY_ALT
381 //#define MBEDTLS_CMAC_ALT
382 //#define MBEDTLS_DES_ALT
383 //#define MBEDTLS_DHM_ALT
384 //#define MBEDTLS_ECJPAKE_ALT
385 //#define MBEDTLS_GCM_ALT
386 //#define MBEDTLS_NIST_KW_ALT
387 //#define MBEDTLS_MD2_ALT
388 //#define MBEDTLS_MD4_ALT
389 //#define MBEDTLS_MD5_ALT
390 //#define MBEDTLS_POLY1305_ALT
391 //#define MBEDTLS_RIPEMD160_ALT
392 //#define MBEDTLS_RSA_ALT
393 //#define MBEDTLS_SHA1_ALT
394 //#define MBEDTLS_SHA256_ALT
395 //#define MBEDTLS_SHA512_ALT
396 //#define MBEDTLS_XTEA_ALT
397
398 /*
399 * When replacing the elliptic curve module, pleace consider, that it is
400 * implemented with two .c files:
401 * - ecp.c
402 * - ecp_curves.c
403 * You can replace them very much like all the other MBEDTLS__MODULE_NAME__ALT
404 * macros as described above. The only difference is that you have to make sure
405 * that you provide functionality for both .c files.
406 */
407 //#define MBEDTLS_ECP_ALT
408
454 //#define MBEDTLS_MD2_PROCESS_ALT
455 //#define MBEDTLS_MD4_PROCESS_ALT
456 //#define MBEDTLS_MD5_PROCESS_ALT
457 //#define MBEDTLS_RIPEMD160_PROCESS_ALT
458 //#define MBEDTLS_SHA1_PROCESS_ALT
459 //#define MBEDTLS_SHA256_PROCESS_ALT
460 //#define MBEDTLS_SHA512_PROCESS_ALT
461 //#define MBEDTLS_DES_SETKEY_ALT
462 //#define MBEDTLS_DES_CRYPT_ECB_ALT
463 //#define MBEDTLS_DES3_CRYPT_ECB_ALT
464 //#define MBEDTLS_AES_SETKEY_ENC_ALT
465 //#define MBEDTLS_AES_SETKEY_DEC_ALT
466 //#define MBEDTLS_AES_ENCRYPT_ALT
467 //#define MBEDTLS_AES_DECRYPT_ALT
468 //#define MBEDTLS_ECDH_GEN_PUBLIC_ALT
469 //#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT
470 //#define MBEDTLS_ECDSA_VERIFY_ALT
471 //#define MBEDTLS_ECDSA_SIGN_ALT
472 //#define MBEDTLS_ECDSA_GENKEY_ALT
473
514 /* Required for all the functions in this section */
515 //#define MBEDTLS_ECP_INTERNAL_ALT
516 /* Support for Weierstrass curves with Jacobi representation */
517 //#define MBEDTLS_ECP_RANDOMIZE_JAC_ALT
518 //#define MBEDTLS_ECP_ADD_MIXED_ALT
519 //#define MBEDTLS_ECP_DOUBLE_JAC_ALT
520 //#define MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT
521 //#define MBEDTLS_ECP_NORMALIZE_JAC_ALT
522 /* Support for curves with Montgomery arithmetic */
523 //#define MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT
524 //#define MBEDTLS_ECP_RANDOMIZE_MXZ_ALT
525 //#define MBEDTLS_ECP_NORMALIZE_MXZ_ALT
526
542 //#define MBEDTLS_TEST_NULL_ENTROPY
543
555 //#define MBEDTLS_ENTROPY_HARDWARE_ALT
556
575 //#define MBEDTLS_AES_ROM_TABLES
576
597 //#define MBEDTLS_AES_FEWER_TABLES
598
606 //#define MBEDTLS_CAMELLIA_SMALL_MEMORY
607
613 #define MBEDTLS_CIPHER_MODE_CBC
614
620 #define MBEDTLS_CIPHER_MODE_CFB
621
627 #define MBEDTLS_CIPHER_MODE_CTR
628
634 #define MBEDTLS_CIPHER_MODE_OFB
635
641 #define MBEDTLS_CIPHER_MODE_XTS
642
674 //#define MBEDTLS_CIPHER_NULL_CIPHER
675
687 #define MBEDTLS_CIPHER_PADDING_PKCS7
688 #define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
689 #define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
690 #define MBEDTLS_CIPHER_PADDING_ZEROS
691
708 //#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
709
721 #define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
722
741 #define MBEDTLS_REMOVE_3DES_CIPHERSUITES
742
751 #define MBEDTLS_ECP_DP_SECP192R1_ENABLED
752 #define MBEDTLS_ECP_DP_SECP224R1_ENABLED
753 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
754 #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
755 #define MBEDTLS_ECP_DP_SECP521R1_ENABLED
756 #define MBEDTLS_ECP_DP_SECP192K1_ENABLED
757 #define MBEDTLS_ECP_DP_SECP224K1_ENABLED
758 #define MBEDTLS_ECP_DP_SECP256K1_ENABLED
759 #define MBEDTLS_ECP_DP_BP256R1_ENABLED
760 #define MBEDTLS_ECP_DP_BP384R1_ENABLED
761 #define MBEDTLS_ECP_DP_BP512R1_ENABLED
762 #define MBEDTLS_ECP_DP_CURVE25519_ENABLED
763 #define MBEDTLS_ECP_DP_CURVE448_ENABLED
764
774 #define MBEDTLS_ECP_NIST_OPTIM
775
798 //#define MBEDTLS_ECP_RESTARTABLE
799
812 #define MBEDTLS_ECDSA_DETERMINISTIC
813
834 #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
835
865 #define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
866
885 #define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
886
910 #define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
911
938 #define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
939
971 #define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
972
996 #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
997
1020 #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
1021
1044 #define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
1045
1068 #define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
1069
1087 //#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
1088
1101 #define MBEDTLS_PK_PARSE_EC_EXTENDED
1102
1116 #define MBEDTLS_ERROR_STRERROR_DUMMY
1117
1125 #define MBEDTLS_GENPRIME
1126
1132 #define MBEDTLS_FS_IO
1133
1145 //#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
1146
1156 //#define MBEDTLS_NO_PLATFORM_ENTROPY
1157
1172 //#define MBEDTLS_ENTROPY_FORCE_SHA256
1173
1200 //#define MBEDTLS_ENTROPY_NV_SEED
1201
1213 //#define MBEDTLS_MEMORY_DEBUG
1214
1225 //#define MBEDTLS_MEMORY_BACKTRACE
1226
1234 #define MBEDTLS_PK_RSA_ALT_SUPPORT
1235
1245 #define MBEDTLS_PKCS1_V15
1246
1256 #define MBEDTLS_PKCS1_V21
1257
1267 //#define MBEDTLS_RSA_NO_CRT
1268
1274 #define MBEDTLS_SELF_TEST
1275
1290 //#define MBEDTLS_SHA256_SMALLER
1291
1304 #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
1305
1315 //#define MBEDTLS_SSL_ASYNC_PRIVATE
1316
1331 //#define MBEDTLS_SSL_DEBUG_ALL
1332
1349 #define MBEDTLS_SSL_ENCRYPT_THEN_MAC
1350
1367 #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
1368
1384 #define MBEDTLS_SSL_FALLBACK_SCSV
1385
1394 //#define MBEDTLS_SSL_HW_RECORD_ACCEL
1395
1406 #define MBEDTLS_SSL_CBC_RECORD_SPLITTING
1407
1428 #define MBEDTLS_SSL_RENEGOTIATION
1429
1438 //#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
1439
1448 //#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
1449
1457 #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1458
1469 //#define MBEDTLS_SSL_PROTO_SSL3
1470
1481 #define MBEDTLS_SSL_PROTO_TLS1
1482
1493 #define MBEDTLS_SSL_PROTO_TLS1_1
1494
1505 #define MBEDTLS_SSL_PROTO_TLS1_2
1506
1520 #define MBEDTLS_SSL_PROTO_DTLS
1521
1529 #define MBEDTLS_SSL_ALPN
1530
1544 #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
1545
1562 #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
1563
1578 #define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
1579
1589 #define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
1590
1603 #define MBEDTLS_SSL_SESSION_TICKETS
1604
1613 #define MBEDTLS_SSL_EXPORT_KEYS
1614
1624 #define MBEDTLS_SSL_SERVER_NAME_INDICATION
1625
1633 #define MBEDTLS_SSL_TRUNCATED_HMAC
1634
1657 //#define MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
1658
1668 //#define MBEDTLS_THREADING_ALT
1669
1679 //#define MBEDTLS_THREADING_PTHREAD
1680
1692 #define MBEDTLS_VERSION_FEATURES
1693
1702 //#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
1703
1714 //#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1715
1728 #define MBEDTLS_X509_CHECK_KEY_USAGE
1729
1741 #define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
1742
1751 #define MBEDTLS_X509_RSASSA_PSS_SUPPORT
1752
1776 //#define MBEDTLS_ZLIB_SUPPORT
1777 /* \} name SECTION: mbed TLS feature support */
1778
1798 #define MBEDTLS_AESNI_C
1799
1873 #define MBEDTLS_AES_C
1874
1901 #define MBEDTLS_ARC4_C
1902
1915 #define MBEDTLS_ASN1_PARSE_C
1916
1929 #define MBEDTLS_ASN1_WRITE_C
1930
1941 #define MBEDTLS_BASE64_C
1942
1958 #define MBEDTLS_BIGNUM_C
1959
1967 #define MBEDTLS_BLOWFISH_C
1968
2022 #define MBEDTLS_CAMELLIA_C
2023
2074 //#define MBEDTLS_ARIA_C
2075
2088 #define MBEDTLS_CCM_C
2089
2100 #define MBEDTLS_CERTS_C
2101
2109 #define MBEDTLS_CHACHA20_C
2110
2120 #define MBEDTLS_CHACHAPOLY_C
2121
2132 #define MBEDTLS_CIPHER_C
2133
2145 //#define MBEDTLS_CMAC_C
2146
2161 #define MBEDTLS_CTR_DRBG_C
2162
2175 #define MBEDTLS_DEBUG_C
2176
2204 #define MBEDTLS_DES_C
2205
2225 #define MBEDTLS_DHM_C
2226
2241 #define MBEDTLS_ECDH_C
2242
2256 #define MBEDTLS_ECDSA_C
2257
2275 //#define MBEDTLS_ECJPAKE_C
2276
2289 #define MBEDTLS_ECP_C
2290
2303 #define MBEDTLS_ENTROPY_C
2304
2315 #define MBEDTLS_ERROR_C
2316
2329 #define MBEDTLS_GCM_C
2330
2352 //#define MBEDTLS_HAVEGE_C
2353
2367 #define MBEDTLS_HKDF_C
2368
2381 #define MBEDTLS_HMAC_DRBG_C
2382
2394 //#define MBEDTLS_NIST_KW_C
2395
2406 #define MBEDTLS_MD_C
2407
2423 //#define MBEDTLS_MD2_C
2424
2440 //#define MBEDTLS_MD4_C
2441
2462 #define MBEDTLS_MD5_C
2463
2478 //#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
2479
2497 #define MBEDTLS_NET_C
2498
2520 #define MBEDTLS_OID_C
2521
2534 #define MBEDTLS_PADLOCK_C
2535
2552 #define MBEDTLS_PEM_PARSE_C
2553
2568 #define MBEDTLS_PEM_WRITE_C
2569
2584 #define MBEDTLS_PK_C
2585
2599 #define MBEDTLS_PK_PARSE_C
2600
2613 #define MBEDTLS_PK_WRITE_C
2614
2626 #define MBEDTLS_PKCS5_C
2627
2641 //#define MBEDTLS_PKCS11_C
2642
2657 #define MBEDTLS_PKCS12_C
2658
2677 #define MBEDTLS_PLATFORM_C
2678
2687 #define MBEDTLS_POLY1305_C
2688
2698 #define MBEDTLS_RIPEMD160_C
2699
2717 #define MBEDTLS_RSA_C
2718
2739 #define MBEDTLS_SHA1_C
2740
2756 #define MBEDTLS_SHA256_C
2757
2771 #define MBEDTLS_SHA512_C
2772
2783 #define MBEDTLS_SSL_CACHE_C
2784
2793 #define MBEDTLS_SSL_COOKIE_C
2794
2805 #define MBEDTLS_SSL_TICKET_C
2806
2819 #define MBEDTLS_SSL_CLI_C
2820
2833 #define MBEDTLS_SSL_SRV_C
2834
2849 #define MBEDTLS_SSL_TLS_C
2850
2871 //#define MBEDTLS_THREADING_C
2872
2894 #define MBEDTLS_TIMING_C
2895
2905 #define MBEDTLS_VERSION_C
2906
2922 #define MBEDTLS_X509_USE_C
2923
2938 #define MBEDTLS_X509_CRT_PARSE_C
2939
2952 #define MBEDTLS_X509_CRL_PARSE_C
2953
2966 #define MBEDTLS_X509_CSR_PARSE_C
2967
2979 #define MBEDTLS_X509_CREATE_C
2980
2992 #define MBEDTLS_X509_CRT_WRITE_C
2993
3005 #define MBEDTLS_X509_CSR_WRITE_C
3006
3015 #define MBEDTLS_XTEA_C
3016
3017 /* \} name SECTION: mbed TLS modules */
3018
3034 /* MPI / BIGNUM options */
3035 //#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
3036 //#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
3037
3038 /* CTR_DRBG options */
3039 //#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
3040 //#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
3041 //#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
3042 //#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
3043 //#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
3044 //#define MBEDTLS_CTR_DRBG_USE_128_BIT_KEY /**< Use 128-bit key for CTR_DRBG - may reduce security (see ctr_drbg.h) */
3045
3046 /* HMAC_DRBG options */
3047 //#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
3048 //#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
3049 //#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
3050 //#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
3051
3052 /* ECP options */
3053 //#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
3054 //#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
3055 //#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
3056
3057 /* Entropy options */
3058 //#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
3059 //#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
3060 //#define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Default minimum number of bytes required for the hardware entropy source mbedtls_hardware_poll() before entropy is released */
3061
3062 /* Memory buffer allocator options */
3063 //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
3064
3065 /* Platform options */
3066 //#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. */
3067 //#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */
3068 //#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
3069 //#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
3070 //#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
3071 //#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
3072 //#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
3073 /* Note: your snprintf must correctly zero-terminate the buffer! */
3074 //#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
3075 //#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS 0 /**< Default exit value to use, can be undefined */
3076 //#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE 1 /**< Default exit value to use, can be undefined */
3077 //#define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
3078 //#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
3079 //#define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" /**< Seed file to read/write with default implementation */
3080
3081 /* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
3082 /* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
3083 //#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */
3084 //#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
3085 //#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
3086 //#define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
3087 //#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
3088 //#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
3089 //#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
3090 /* Note: your snprintf must correctly zero-terminate the buffer! */
3091 //#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
3092 //#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
3093 //#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
3094
3129 //#define MBEDTLS_PARAM_FAILED( cond ) assert( cond )
3130
3131 /* SSL Cache options */
3132 //#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
3133 //#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
3134
3135 /* SSL options */
3136
3161 //#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384
3162
3186 //#define MBEDTLS_SSL_IN_CONTENT_LEN 16384
3187
3210 //#define MBEDTLS_SSL_OUT_CONTENT_LEN 16384
3211
3227 //#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768
3228
3229 //#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
3230 //#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
3231 //#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
3232
3245 //#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
3246
3247 /* X509 options */
3248 //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
3249 //#define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */
3250
3263 // #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES
3264
3280 #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
3281
3300 //#define MBEDTLS_PLATFORM_ZEROIZE_ALT
3301
3319 //#define MBEDTLS_PLATFORM_GMTIME_R_ALT
3320
3321 /* \} name SECTION: Customisation configuration options */
3322
3323 /* Target and application specific configurations
3324 *
3325 * Allow user to override any previous default.
3326 *
3327 */
3328 #if defined(MBEDTLS_USER_CONFIG_FILE)
3329 #include MBEDTLS_USER_CONFIG_FILE
3330 #endif
3331
3332 #include "check_config.h"
3333
3334 #endif /* MBEDTLS_CONFIG_H */
check_config.h
Consistency checks for configuration options.