[U-Boot] [PATCH v3 14/16] lib: crypto: add x509 parser

AKASHI Takahiro takahiro.akashi at linaro.org
Mon Dec 9 01:59:32 CET 2019


On Sat, Dec 07, 2019 at 05:34:07PM -0500, Tom Rini wrote:
> On Sat, Dec 07, 2019 at 09:51:22PM +0100, Heinrich Schuchardt wrote:
> > On 12/6/19 10:50 PM, Tom Rini wrote:
> > > On Wed, Nov 13, 2019 at 09:45:00AM +0900, AKASHI Takahiro wrote:
> > > 
> > > > Imported from linux kernel v5.3:
> > > >   x509.asn1 without changes
> > > >   x509_akid.asn1 without changes
> > > >   x509_parser.h without changes
> > > >   x509_cert_parser.c with changes marked as __UBOOT__
> > > >   x509_public_key.c with changes marked as __UBOOT__
> > > > 
> > > > Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> > > 
> > > Applied to u-boot/master, thanks!
> > > 
> > Hello Tom,
> > 
> > this patch causes a build error for rpi_0_w_defconfig with
> > CONFIG_X509_CERTIFICATE_PARSER=y:
> > 
> > In file included from include/linux/time.h:4,
> >                  from lib/crypto/x509_parser.h:8,
> >                  from lib/crypto/x509_cert_parser.c:20:
> > include/rtc.h:197:26: error: unknown type name ‘uchar’; did you mean
> > ‘unchar’?
> >  void rtc_write8(int reg, uchar val);
> >                           ^~~~~
> >                           unchar
> > make[4]: *** [scripts/Makefile.build:279: lib/crypto/x509_cert_parser.o]
> > Error 1
> > 
> > The error is caused by:
> > 
> > include/linux/types.h:88:typedef unsigned char          unchar;
> > 
> > I have prepared a patch but will first run it through Gitlab:
> > 
> > https://gitlab.denx.de/u-boot/custodians/u-boot-efi/commit/f574992867cf40f48a381f88c1ac15a47dbe1baf
> > 
> > @Takahiro:
> > I am wondering why this did not show up in your tests. Did Tom miss a patch?

Thank you for catching this, Heinrich.

> Only sandbox enables any of this out of the box, which is why I've taken
> it at this point in the window.  It's otherwise neutral and as good as
> it was going to get prior to inclusion somewhere for wider testing.
> Which, thanks for doing.

Yeah, more strictly speaking, my x509 test is enabled by default
due to "default y" if UNIT_TEST is also enabled.
So if pytest is run on Travis CI, x509 test can also be exercised
via pytest's ut driver, but pytest is run on limited number of
architectures on Travis CI and UNIT_TEST is enabled only on sandbox
for now.

Thanks,
-Takahiro Akashi


> -- 
> Tom




More information about the U-Boot mailing list