[Concept,02/15] mbedtls: Allow use of base64

Message ID 20251111124131.1198930-3-sjg@u-boot.org
State New
Headers
Series luks: Provide support for LUKSv2 |

Commit Message

Simon Glass Nov. 11, 2025, 12:41 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Add a configuration and a Makefile rule to provide access to the mbedtls
base64 support.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 lib/mbedtls/Makefile             | 1 +
 lib/mbedtls/mbedtls_def_config.h | 1 +
 2 files changed, 2 insertions(+)
  

Patch

diff --git a/lib/mbedtls/Makefile b/lib/mbedtls/Makefile
index 257f585c013..5b3f664073c 100644
--- a/lib/mbedtls/Makefile
+++ b/lib/mbedtls/Makefile
@@ -39,6 +39,7 @@  mbedtls_lib_crypto-$(CONFIG_$(PHASE_)PKCS5_MBEDTLS) += \
 	$(MBEDTLS_LIB_DIR)/pkcs5.o
 mbedtls_lib_crypto-$(CONFIG_$(PHASE_)BLK_LUKS) += \
 	$(MBEDTLS_LIB_DIR)/aes.o \
+	$(MBEDTLS_LIB_DIR)/base64.o \
 	$(MBEDTLS_LIB_DIR)/cipher.o \
 	$(MBEDTLS_LIB_DIR)/cipher_wrap.o
 
diff --git a/lib/mbedtls/mbedtls_def_config.h b/lib/mbedtls/mbedtls_def_config.h
index a0578d33ba6..d4e35ddeb61 100644
--- a/lib/mbedtls/mbedtls_def_config.h
+++ b/lib/mbedtls/mbedtls_def_config.h
@@ -65,6 +65,7 @@ 
 #endif
 
 #if CONFIG_IS_ENABLED(BLK_LUKS)
+#define MBEDTLS_BASE64_C
 #define MBEDTLS_CIPHER_C
 #define MBEDTLS_CIPHER_MODE_XTS
 #define MBEDTLS_AES_C