]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lib/crypto: Adapt public_key header with MbedTLS
authorRaymond Mao <raymond.mao@linaro.org>
Thu, 3 Oct 2024 21:50:29 +0000 (14:50 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 14 Oct 2024 23:58:44 +0000 (17:58 -0600)
Previous patch has introduced MbedTLS porting layer for public key,
here to adjust the header and makefiles accordingly.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
include/crypto/public_key.h
lib/crypto/Makefile
lib/crypto/asymmetric_type.c

index 3ba90fcc3483171fa47faace1ebe639161dbd50c..25cfb68adce5fb137d7ed2b10bafb3148c96317a 100644 (file)
 
 #ifdef __UBOOT__
 #include <linux/types.h>
+#if CONFIG_IS_ENABLED(MBEDTLS_LIB_X509)
+#include <library/common.h>
+#include <mbedtls/pk.h>
+#include <mbedtls/x509_crt.h>
+#include <mbedtls/md.h>
+#endif
 #else
 #include <linux/keyctl.h>
 #endif
index 16059088f2684df2d94da2024ade5aa7ed8ec871..7e877214aa8a4f64d0ce7da1e68dbc98f3aa753e 100644 (file)
@@ -7,9 +7,8 @@ obj-$(CONFIG_$(SPL_)ASYMMETRIC_KEY_TYPE) += asymmetric_keys.o
 
 asymmetric_keys-y := asymmetric_type.o
 
-obj-$(CONFIG_$(SPL_)ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += \
-       public_key_helper.o \
-       public_key.o
+obj-$(CONFIG_$(SPL_)ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key_helper.o
+obj-$(CONFIG_$(SPL_)ASYMMETRIC_PUBLIC_KEY_LEGACY) += public_key.o
 
 #
 # RSA public key parser
index 24c2d15ef97a4c6b9f70a76c9ef6e78b249961de..95b82cd8e849ac8806b08d30908a730ce59434e5 100644 (file)
@@ -12,7 +12,6 @@
 #include <keys/asymmetric-subtype.h>
 #include <keys/asymmetric-parser.h>
 #endif
-#include <crypto/public_key.h>
 #ifdef __UBOOT__
 #include <linux/bug.h>
 #include <linux/compat.h>
@@ -26,6 +25,7 @@
 #include <linux/slab.h>
 #include <linux/ctype.h>
 #endif
+#include <crypto/public_key.h>
 #ifdef __UBOOT__
 #include <keys/asymmetric-type.h>
 #else