Skip to content

Commit 012b111

Browse files
committed
Merge branch 'feature/mbedtls_hkdf' into 'master'
mbedtls_hkdf: Add a config option to enable HKDF See merge request espressif/esp-idf!8680
2 parents c0c0223 + 43b3def commit 012b111

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

components/mbedtls/Kconfig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,14 @@ menu "mbedTLS"
712712
default n
713713
depends on MBEDTLS_CHACHA20_C && MBEDTLS_POLY1305_C
714714
help
715-
Enable support for ChaCha20-Poly1305 AEAD algorithm
715+
Enable support for ChaCha20-Poly1305 AEAD algorithm.
716+
717+
config MBEDTLS_HKDF_C
718+
bool "HKDF algorithm (RFC 5869)"
719+
default n
720+
help
721+
Enable support for the Hashed Message Authentication Code
722+
(HMAC)-based key derivation function (HKDF).
716723

717724
menuconfig MBEDTLS_SECURITY_RISKS
718725
bool "Show configurations with potential security risks"

components/mbedtls/port/include/mbedtls/esp_config.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,17 +1692,19 @@
16921692
/**
16931693
* \def MBEDTLS_HKDF_C
16941694
*
1695-
* Disable the HKDF algorithm (RFC 5869).
1695+
* Enable the HKDF algorithm (RFC 5869).
16961696
*
16971697
* Module: library/hkdf.c
16981698
* Caller:
16991699
*
17001700
* Requires: MBEDTLS_MD_C
17011701
*
1702-
* This module adds support for the Hashed Message Authentication Code
1702+
* This module enables support for the Hashed Message Authentication Code
17031703
* (HMAC)-based key derivation function (HKDF).
17041704
*/
1705-
#ifdef MBEDTLS_HKDF_C
1705+
#ifdef CONFIG_MBEDTLS_HKDF_C
1706+
#define MBEDTLS_HKDF_C
1707+
#else
17061708
#undef MBEDTLS_HKDF_C
17071709
#endif
17081710

0 commit comments

Comments
 (0)