|
400 | 400 | *
|
401 | 401 | * Comment this macro to disable deterministic ECDSA.
|
402 | 402 | */
|
| 403 | +#ifdef CONFIG_MBEDTLS_ECDSA_DETERMINISTIC |
403 | 404 | #define MBEDTLS_ECDSA_DETERMINISTIC
|
| 405 | +#else |
| 406 | +#undef MBEDTLS_ECDSA_DETERMINISTIC |
| 407 | +#endif |
404 | 408 |
|
405 | 409 | /**
|
406 | 410 | * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
|
|
1692 | 1696 | /**
|
1693 | 1697 | * \def MBEDTLS_HKDF_C
|
1694 | 1698 | *
|
1695 |
| - * Disable the HKDF algorithm (RFC 5869). |
| 1699 | + * Enable the HKDF algorithm (RFC 5869). |
1696 | 1700 | *
|
1697 | 1701 | * Module: library/hkdf.c
|
1698 | 1702 | * Caller:
|
1699 | 1703 | *
|
1700 | 1704 | * Requires: MBEDTLS_MD_C
|
1701 | 1705 | *
|
1702 |
| - * This module adds support for the Hashed Message Authentication Code |
| 1706 | + * This module enables support for the Hashed Message Authentication Code |
1703 | 1707 | * (HMAC)-based key derivation function (HKDF).
|
1704 | 1708 | */
|
1705 |
| -#ifdef MBEDTLS_HKDF_C |
| 1709 | +#ifdef CONFIG_MBEDTLS_HKDF_C |
| 1710 | +#define MBEDTLS_HKDF_C |
| 1711 | +#else |
1706 | 1712 | #undef MBEDTLS_HKDF_C
|
1707 | 1713 | #endif
|
1708 | 1714 |
|
|
2026 | 2032 | *
|
2027 | 2033 | * This module adds support for SHA-384 and SHA-512.
|
2028 | 2034 | */
|
| 2035 | +#ifdef CONFIG_MBEDTLS_SHA512_C |
2029 | 2036 | #define MBEDTLS_SHA512_C
|
| 2037 | +#else |
| 2038 | +#undef MBEDTLS_SHA512_C |
| 2039 | +#endif |
2030 | 2040 |
|
2031 | 2041 | /**
|
2032 | 2042 | * \def MBEDTLS_SSL_CACHE_C
|
|
2368 | 2378 | */
|
2369 | 2379 | #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
|
2370 | 2380 |
|
| 2381 | +/** |
| 2382 | + * \def MBEDTLS_THREADING_C |
| 2383 | + * |
| 2384 | + * Enable the threading abstraction layer. |
| 2385 | + * By default mbed TLS assumes it is used in a non-threaded environment or that |
| 2386 | + * contexts are not shared between threads. If you do intend to use contexts |
| 2387 | + * between threads, you will need to enable this layer to prevent race |
| 2388 | + * conditions. See also our Knowledge Base article about threading: |
| 2389 | + * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading |
| 2390 | + * |
| 2391 | + * Module: library/threading.c |
| 2392 | + * |
| 2393 | + * This allows different threading implementations (self-implemented or |
| 2394 | + * provided). |
| 2395 | + * |
| 2396 | + * You will have to enable either MBEDTLS_THREADING_ALT or |
| 2397 | + * MBEDTLS_THREADING_PTHREAD. |
| 2398 | + * |
| 2399 | + * Enable this layer to allow use of mutexes within mbed TLS |
| 2400 | + */ |
| 2401 | +#ifdef CONFIG_MBEDTLS_THREADING_C |
| 2402 | +#define MBEDTLS_THREADING_C |
| 2403 | +#else |
| 2404 | +#undef MBEDTLS_THREADING_C |
| 2405 | +#endif |
| 2406 | + |
| 2407 | +/** |
| 2408 | + * \def MBEDTLS_THREADING_ALT |
| 2409 | + * |
| 2410 | + * Provide your own alternate threading implementation. |
| 2411 | + * |
| 2412 | + * Requires: MBEDTLS_THREADING_C |
| 2413 | + * |
| 2414 | + * Uncomment this to allow your own alternate threading implementation. |
| 2415 | + */ |
| 2416 | +#ifdef CONFIG_MBEDTLS_THREADING_ALT |
| 2417 | +#define MBEDTLS_THREADING_ALT |
| 2418 | +#else |
| 2419 | +#undef MBEDTLS_THREADING_ALT |
| 2420 | +#endif |
| 2421 | + |
| 2422 | +/** |
| 2423 | + * \def MBEDTLS_THREADING_PTHREAD |
| 2424 | + * |
| 2425 | + * Enable the pthread wrapper layer for the threading layer. |
| 2426 | + * |
| 2427 | + * Requires: MBEDTLS_THREADING_C |
| 2428 | + * |
| 2429 | + * Uncomment this to enable pthread mutexes. |
| 2430 | + */ |
| 2431 | +#ifdef CONFIG_MBEDTLS_THREADING_PTHREAD |
| 2432 | +#define MBEDTLS_THREADING_PTHREAD |
| 2433 | +#else |
| 2434 | +#undef MBEDTLS_THREADING_PTHREAD |
| 2435 | +#endif |
| 2436 | + |
2371 | 2437 | /* \} name SECTION: Module configuration options */
|
2372 | 2438 |
|
2373 | 2439 | #if defined(TARGET_LIKE_MBED)
|
|
0 commit comments