On Tue, 7 May 2024 at 21:01, Raymond Mao <raymond....@linaro.org> wrote: > > Adapt mscode_parser to build with MbedTLS
Try to be precise in the description e.g "Previous patches enable alternative SSL libraries and use mbedTLS directly. Adjust the header and makefiles accordingly" Thanks /Ilias > > Signed-off-by: Raymond Mao <raymond....@linaro.org> > --- > Changes in v2 > - Move the porting layer to MbedTLS dir. > > include/crypto/mscode.h | 4 ++++ > lib/crypto/Makefile | 2 ++ > 2 files changed, 6 insertions(+) > > diff --git a/include/crypto/mscode.h b/include/crypto/mscode.h > index 551058b96e6..c214fc87e40 100644 > --- a/include/crypto/mscode.h > +++ b/include/crypto/mscode.h > @@ -9,6 +9,10 @@ > #ifndef __UBOOT__ > #include <crypto/hash_info.h> > #endif > +#if CONFIG_IS_ENABLED(MBEDTLS_LIB_X509) > +#include <external/mbedtls/include/mbedtls/asn1.h> > +#include <external/mbedtls/include/mbedtls/oid.h> > +#endif > > struct pefile_context { > #ifndef __UBOOT__ > diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile > index c3fe9c9d2c0..e3232019df2 100644 > --- a/lib/crypto/Makefile > +++ b/lib/crypto/Makefile > @@ -62,6 +62,7 @@ $(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h > endif > obj-$(CONFIG_$(SPL_)PKCS7_VERIFY) += pkcs7_verify.o > > +ifneq ($(CONFIG_MBEDTLS_LIB_X509), y) > # > # Signed PE binary-wrapped key handling > # > @@ -73,3 +74,4 @@ mscode-y := \ > > $(obj)/mscode_parser.o: $(obj)/mscode.asn1.h $(obj)/mscode.asn1.h > $(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h > +endif > -- > 2.25.1 > With the above fixed Reviewed-by: Ilias Apalodimas <ilias.apalodi...@linaro.org>