mbed TLS v1.3.16
config.h
Go to the documentation of this file.
1 
28 #ifndef POLARSSL_CONFIG_H
29 #define POLARSSL_CONFIG_H
30 
31 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
32 #define _CRT_SECURE_NO_DEPRECATE 1
33 #endif
34 
53 //#define POLARSSL_HAVE_INT8
54 
66 //#define POLARSSL_HAVE_INT16
67 
74 #define POLARSSL_HAVE_LONGLONG
75 
90 #define POLARSSL_HAVE_ASM
91 
99 //#define POLARSSL_HAVE_SSE2
100 
108 #define POLARSSL_HAVE_TIME
109 
123 #define POLARSSL_HAVE_IPV6
124 
147 //#define POLARSSL_PLATFORM_MEMORY
148 
166 //#define POLARSSL_PLATFORM_NO_STD_FUNCTIONS
167 
189 //#define POLARSSL_PLATFORM_EXIT_ALT
190 //#define POLARSSL_PLATFORM_FPRINTF_ALT
191 //#define POLARSSL_PLATFORM_PRINTF_ALT
192 //#define POLARSSL_PLATFORM_SNPRINTF_ALT
193 
207 //#define POLARSSL_DEPRECATED_WARNING
208 
219 //#define POLARSSL_DEPRECATED_REMOVED
220 
221 /* \} name SECTION: System support */
222 
242 //#define POLARSSL_TIMING_ALT
243 
260 //#define POLARSSL_AES_ALT
261 //#define POLARSSL_ARC4_ALT
262 //#define POLARSSL_BLOWFISH_ALT
263 //#define POLARSSL_CAMELLIA_ALT
264 //#define POLARSSL_DES_ALT
265 //#define POLARSSL_XTEA_ALT
266 //#define POLARSSL_MD2_ALT
267 //#define POLARSSL_MD4_ALT
268 //#define POLARSSL_MD5_ALT
269 //#define POLARSSL_RIPEMD160_ALT
270 //#define POLARSSL_SHA1_ALT
271 //#define POLARSSL_SHA256_ALT
272 //#define POLARSSL_SHA512_ALT
273 
281 //#define POLARSSL_AES_ROM_TABLES
282 
290 //#define POLARSSL_CAMELLIA_SMALL_MEMORY
291 
297 #define POLARSSL_CIPHER_MODE_CBC
298 
304 #define POLARSSL_CIPHER_MODE_CFB
305 
311 #define POLARSSL_CIPHER_MODE_CTR
312 
344 //#define POLARSSL_CIPHER_NULL_CIPHER
345 
356 #define POLARSSL_CIPHER_PADDING_PKCS7
357 #define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
358 #define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
359 #define POLARSSL_CIPHER_PADDING_ZEROS
360 
374 //#define POLARSSL_ENABLE_WEAK_CIPHERSUITES
375 
387 //#define POLARSSL_REMOVE_ARC4_CIPHERSUITES
388 
397 #define POLARSSL_ECP_DP_SECP192R1_ENABLED
398 #define POLARSSL_ECP_DP_SECP224R1_ENABLED
399 #define POLARSSL_ECP_DP_SECP256R1_ENABLED
400 #define POLARSSL_ECP_DP_SECP384R1_ENABLED
401 #define POLARSSL_ECP_DP_SECP521R1_ENABLED
402 #define POLARSSL_ECP_DP_SECP192K1_ENABLED
403 #define POLARSSL_ECP_DP_SECP224K1_ENABLED
404 #define POLARSSL_ECP_DP_SECP256K1_ENABLED
405 #define POLARSSL_ECP_DP_BP256R1_ENABLED
406 #define POLARSSL_ECP_DP_BP384R1_ENABLED
407 #define POLARSSL_ECP_DP_BP512R1_ENABLED
408 //#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
409 #define POLARSSL_ECP_DP_M255_ENABLED
410 //#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
411 //#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
412 
422 #define POLARSSL_ECP_NIST_OPTIM
423 
436 #define POLARSSL_ECDSA_DETERMINISTIC
437 
458 #define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
459 
482 #define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
483 
502 #define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
503 
527 #define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
528 
555 #define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
556 
581 #define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
582 
606 #define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
607 
630 #define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
631 
654 #define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
655 
678 #define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
679 
692 #define POLARSSL_PK_PARSE_EC_EXTENDED
693 
704 #define POLARSSL_ERROR_STRERROR_BC
705 
719 #define POLARSSL_ERROR_STRERROR_DUMMY
720 
728 #define POLARSSL_GENPRIME
729 
735 #define POLARSSL_FS_IO
736 
748 //#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
749 
759 //#define POLARSSL_NO_PLATFORM_ENTROPY
760 
775 //#define POLARSSL_ENTROPY_FORCE_SHA256
776 
788 //#define POLARSSL_MEMORY_DEBUG
789 
800 //#define POLARSSL_MEMORY_BACKTRACE
801 
811 #define POLARSSL_PKCS1_V15
812 
822 #define POLARSSL_PKCS1_V21
823 
832 //#define POLARSSL_RSA_NO_CRT
833 
839 #define POLARSSL_SELF_TEST
840 
851 //#define POLARSSL_SSL_AEAD_RANDOM_IV
852 
865 #define POLARSSL_SSL_ALERT_MESSAGES
866 
881 //#define POLARSSL_SSL_DEBUG_ALL
882 
899 #define POLARSSL_SSL_ENCRYPT_THEN_MAC
900 
917 #define POLARSSL_SSL_EXTENDED_MASTER_SECRET
918 
934 #define POLARSSL_SSL_FALLBACK_SCSV
935 
944 //#define POLARSSL_SSL_HW_RECORD_ACCEL
945 
956 #define POLARSSL_SSL_CBC_RECORD_SPLITTING
957 
974 //#define POLARSSL_SSL_DISABLE_RENEGOTIATION
975 
984 #define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
985 
994 //#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
995 
1003 #define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
1004 
1015 #define POLARSSL_SSL_PROTO_SSL3
1016 
1027 #define POLARSSL_SSL_PROTO_TLS1
1028 
1039 #define POLARSSL_SSL_PROTO_TLS1_1
1040 
1051 #define POLARSSL_SSL_PROTO_TLS1_2
1052 
1060 #define POLARSSL_SSL_ALPN
1061 
1073 #define POLARSSL_SSL_SESSION_TICKETS
1074 
1084 #define POLARSSL_SSL_SERVER_NAME_INDICATION
1085 
1093 #define POLARSSL_SSL_TRUNCATED_HMAC
1094 
1106 //#define POLARSSL_SSL_ENABLE_MD5_SIGNATURES
1107 
1120 //#define POLARSSL_SSL_SET_CURVES
1121 
1131 //#define POLARSSL_THREADING_ALT
1132 
1142 //#define POLARSSL_THREADING_PTHREAD
1143 
1155 #define POLARSSL_VERSION_FEATURES
1156 
1165 //#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
1166 
1177 //#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
1178 
1191 #define POLARSSL_X509_CHECK_KEY_USAGE
1192 
1204 #define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
1205 
1214 #define POLARSSL_X509_RSASSA_PSS_SUPPORT
1215 
1234 //#define POLARSSL_ZLIB_SUPPORT
1235 /* \} name SECTION: mbed TLS feature support */
1236 
1256 #define POLARSSL_AESNI_C
1257 
1331 #define POLARSSL_AES_C
1332 
1354 #define POLARSSL_ARC4_C
1355 
1368 #define POLARSSL_ASN1_PARSE_C
1369 
1382 #define POLARSSL_ASN1_WRITE_C
1383 
1394 #define POLARSSL_BASE64_C
1395 
1410 #define POLARSSL_BIGNUM_C
1411 
1419 #define POLARSSL_BLOWFISH_C
1420 
1474 #define POLARSSL_CAMELLIA_C
1475 
1488 #define POLARSSL_CCM_C
1489 
1502 #define POLARSSL_CERTS_C
1503 
1514 #define POLARSSL_CIPHER_C
1515 
1528 #define POLARSSL_CTR_DRBG_C
1529 
1542 #define POLARSSL_DEBUG_C
1543 
1568 #define POLARSSL_DES_C
1569 
1582 #define POLARSSL_DHM_C
1583 
1598 #define POLARSSL_ECDH_C
1599 
1613 #define POLARSSL_ECDSA_C
1614 
1626 #define POLARSSL_ECP_C
1627 
1640 #define POLARSSL_ENTROPY_C
1641 
1652 #define POLARSSL_ERROR_C
1653 
1666 #define POLARSSL_GCM_C
1667 
1689 //#define POLARSSL_HAVEGE_C
1690 
1703 #define POLARSSL_HMAC_DRBG_C
1704 
1715 #define POLARSSL_MD_C
1716 
1727 //#define POLARSSL_MD2_C
1728 
1739 //#define POLARSSL_MD4_C
1740 
1754 #define POLARSSL_MD5_C
1755 
1763 //#define POLARSSL_MEMORY_C
1764 
1779 //#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1780 
1793 #define POLARSSL_NET_C
1794 
1816 #define POLARSSL_OID_C
1817 
1830 #define POLARSSL_PADLOCK_C
1831 
1845 #define POLARSSL_PBKDF2_C
1846 
1863 #define POLARSSL_PEM_PARSE_C
1864 
1879 #define POLARSSL_PEM_WRITE_C
1880 
1895 #define POLARSSL_PK_C
1896 
1910 #define POLARSSL_PK_PARSE_C
1911 
1924 #define POLARSSL_PK_WRITE_C
1925 
1937 #define POLARSSL_PKCS5_C
1938 
1952 //#define POLARSSL_PKCS11_C
1953 
1968 #define POLARSSL_PKCS12_C
1969 
1985 #define POLARSSL_PLATFORM_C
1986 
1996 #define POLARSSL_RIPEMD160_C
1997 
2014 #define POLARSSL_RSA_C
2015 
2030 #define POLARSSL_SHA1_C
2031 
2048 #define POLARSSL_SHA256_C
2049 
2064 #define POLARSSL_SHA512_C
2065 
2076 #define POLARSSL_SSL_CACHE_C
2077 
2090 #define POLARSSL_SSL_CLI_C
2091 
2104 #define POLARSSL_SSL_SRV_C
2105 
2120 #define POLARSSL_SSL_TLS_C
2121 
2141 //#define POLARSSL_THREADING_C
2142 
2153 #define POLARSSL_TIMING_C
2154 
2164 #define POLARSSL_VERSION_C
2165 
2181 #define POLARSSL_X509_USE_C
2182 
2197 #define POLARSSL_X509_CRT_PARSE_C
2198 
2211 #define POLARSSL_X509_CRL_PARSE_C
2212 
2225 #define POLARSSL_X509_CSR_PARSE_C
2226 
2238 #define POLARSSL_X509_CREATE_C
2239 
2251 #define POLARSSL_X509_CRT_WRITE_C
2252 
2264 #define POLARSSL_X509_CSR_WRITE_C
2265 
2274 #define POLARSSL_XTEA_C
2275 
2276 /* \} name SECTION: mbed TLS modules */
2277 
2293 /* MPI / BIGNUM options */
2294 //#define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
2295 //#define POLARSSL_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
2296 
2297 /* CTR_DRBG options */
2298 //#define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
2299 //#define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2300 //#define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2301 //#define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2302 //#define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2303 
2304 /* HMAC_DRBG options */
2305 //#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
2306 //#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
2307 //#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
2308 //#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
2309 
2310 /* ECP options */
2311 //#define POLARSSL_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
2312 //#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
2313 //#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
2314 
2315 /* Entropy options */
2316 //#define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
2317 //#define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
2318 
2319 /* Memory buffer allocator options */
2320 //#define POLARSSL_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
2321 
2322 /* Platform options */
2323 //#define POLARSSL_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if POLARSSL_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */
2324 //#define POLARSSL_PLATFORM_STD_MALLOC malloc /**< Default allocator to use, can be undefined */
2325 //#define POLARSSL_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
2326 //#define POLARSSL_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
2327 //#define POLARSSL_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
2328 //#define POLARSSL_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
2329 //#define POLARSSL_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
2330 
2331 /* To Use Function Macros POLARSSL_PLATFORM_C must be enabled */
2332 /* POLARSSL_PLATFORM_XXX_MACRO and POLARSSL_PLATFORM_XXX_ALT cannot both be defined */
2333 //#define POLARSSL_PLATFORM_MALLOC_MACRO malloc /**< Default allocator macro to use, can be undefined */
2334 //#define POLARSSL_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
2335 //#define POLARSSL_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
2336 //#define POLARSSL_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
2337 //#define POLARSSL_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
2338 //#define POLARSSL_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
2339 
2340 /* SSL Cache options */
2341 //#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
2342 //#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
2343 
2344 /* SSL options */
2345 //#define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
2346 //#define SSL_MIN_DHM_BYTES 128 /**< Min size of the Diffie-Hellman prime */
2347 //#define SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
2348 //#define POLARSSL_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
2349 
2362 //#define SSL_CIPHERSUITES TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
2363 
2364 /* Debug options */
2365 //#define POLARSSL_DEBUG_DFL_MODE POLARSSL_DEBUG_LOG_FULL /**< Default log: Full or Raw */
2366 
2367 /* X509 options */
2368 //#define POLARSSL_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
2369 
2370 /* \} name SECTION: Module configuration options */
2371 
2372 #include "check_config.h"
2373 
2374 #endif /* POLARSSL_CONFIG_H */
Consistency checks for configuration options.