summaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorRaymond Mao <[email protected]>2024-10-03 14:50:31 -0700
committerTom Rini <[email protected]>2024-10-14 17:58:46 -0600
commit3741abfe86c677ed6ea05571bbab34cc25886848 (patch)
tree28f2e201030f21701a22d6755261afc617e7e1ca /lib/crypto
parent70002cec5f1c43c4a57c802b5149a1f320c5eaac (diff)
lib/crypto: Adapt x509_cert_parser to MbedTLS
Previous patch has introduced MbedTLS porting layer for x509 cert parser, here to adjust the header and makefiles accordingly. Signed-off-by: Raymond Mao <[email protected]>
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/Makefile4
-rw-r--r--lib/crypto/x509_public_key.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
index 7e877214aa8..4302f197297 100644
--- a/lib/crypto/Makefile
+++ b/lib/crypto/Makefile
@@ -32,11 +32,11 @@ endif
# X.509 Certificate handling
#
obj-$(CONFIG_$(SPL_)X509_CERTIFICATE_PARSER) += x509_key_parser.o
-x509_key_parser-y := \
+x509_key_parser-y := x509_helper.o
+x509_key_parser-$(CONFIG_$(SPL_)X509_CERTIFICATE_PARSER_LEGACY) += \
x509.asn1.o \
x509_akid.asn1.o \
x509_cert_parser.o \
- x509_helper.o \
x509_public_key.o
$(obj)/x509_cert_parser.o: \
diff --git a/lib/crypto/x509_public_key.c b/lib/crypto/x509_public_key.c
index 4ba13c1adc3..310edbd21be 100644
--- a/lib/crypto/x509_public_key.c
+++ b/lib/crypto/x509_public_key.c
@@ -30,6 +30,8 @@
#include "x509_parser.h"
#endif
+#if !CONFIG_IS_ENABLED(MBEDTLS_LIB_X509)
+
/*
* Set up the signature parameters in an X.509 certificate. This involves
* digesting the signed data and extracting the signature.