[PATCH v3 19/25] mbedtls: add MSCode parser porting layer

Raymond Mao raymond.mao at linaro.org
Tue Jun 4 18:26:32 CEST 2024


Hi Ilias,

On Fri, 31 May 2024 at 06:03, Ilias Apalodimas <ilias.apalodimas at linaro.org>
wrote:

> On Tue, 28 May 2024 at 17:17, Raymond Mao <raymond.mao at linaro.org> wrote:
> >
> > Add porting layer for MSCode on top of MbedTLS ASN1 library.
> >
> > Signed-off-by: Raymond Mao <raymond.mao at linaro.org>
> > ---
> > Changes in v2
> > - Move the porting layer to MbedTLS dir.
> > Changes in v3
> > - None.
> >
> >  lib/mbedtls/Makefile        |   1 +
> >  lib/mbedtls/mscode_parser.c | 111 ++++++++++++++++++++++++++++++++++++
> >  2 files changed, 112 insertions(+)
> >  create mode 100644 lib/mbedtls/mscode_parser.c
> >
>
> [snip]

> > diff --git a/lib/mbedtls/mscode_parser.c b/lib/mbedtls/mscode_parser.c
> > new file mode 100644
> > index 00000000000..34715f3a137
> > --- /dev/null
> > +++ b/lib/mbedtls/mscode_parser.c
>
> [snip]

>
> > + *
> > + */
> > +int mscode_parse(void *_ctx, const void *content_data, size_t data_len,
> > +                size_t asn1hdrlen)
> > +{
> > +       struct pefile_context *ctx = _ctx;
> > +       unsigned char *p = (unsigned char *)content_data;
> > +       unsigned char *end = (unsigned char *)content_data + data_len;
>
> Why are you dropping const here?
>
> mbedtls_asn1_get_tag requires the args without const.

Regards,
Raymond


More information about the U-Boot mailing list