[PATCH v4 24/29] lib/crypto: Adapt mscode_parser to MbedTLS

Raymond Mao raymond.mao at linaro.org
Tue Jul 30 16:07:41 CEST 2024


Hi Ilias,

On Tue, 30 Jul 2024 at 04:04, Ilias Apalodimas <ilias.apalodimas at linaro.org>
wrote:

> Hi Raymond,
>
> On Tue, 2 Jul 2024 at 21:33, Raymond Mao <raymond.mao at linaro.org> wrote:
> >
> > Previous patch has introduced MbedTLS porting layer for mscode parser,
> > here to adjust the header and makefiles accordingly.
> >
> > Signed-off-by: Raymond Mao <raymond.mao at linaro.org>
> > ---
> > Changes in v2
> > - Move the porting layer to MbedTLS dir.
> > Changes in v3
> > - Update commit message.
> > Changes in v4
> > - Control building legacy library via '_LEGACY' Kconfig.
> > - Minor fix of the include directories.
> >
> >  include/crypto/mscode.h | 4 ++++
> >  lib/crypto/Makefile     | 2 +-
> >  2 files changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/crypto/mscode.h b/include/crypto/mscode.h
> > index 551058b96e6..678e69001b9 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 <mbedtls/asn1.h>
> > +#include <mbedtls/oid.h>
> > +#endif
> >
> >  struct pefile_context {
> >  #ifndef __UBOOT__
> > diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
> > index 428dcba0a6b..9bbd8b48d77 100644
> > --- a/lib/crypto/Makefile
> > +++ b/lib/crypto/Makefile
> > @@ -63,7 +63,7 @@ obj-$(CONFIG_$(SPL_)PKCS7_VERIFY) += pkcs7_verify.o
> >  #
> >  # Signed PE binary-wrapped key handling
> >  #
> > -obj-$(CONFIG_$(SPL_)MSCODE_PARSER) += mscode.o
> > +obj-$(CONFIG_$(SPL_)MSCODE_PARSER_LEGACY) += mscode.o
>
> The change it self is correct. But patches should be self contained as
> much as possible without breaking the compilation or functionality.
> IOW I think this should be in a different patch where the
> MSCODE_PARSER_LEGACY is introduced.
>
> No worries, I can move them into the same patch.

Regards,
Raymond


More information about the U-Boot mailing list