[U-Boot] [PATCH v1 1/3] lib: rsa: decouple rsa from FIT image verification

AKASHI Takahiro takahiro.akashi at linaro.org
Wed Oct 23 05:10:33 UTC 2019


On Mon, Oct 21, 2019 at 06:17:02PM -0600, Simon Glass wrote:
> Hi Takahiro,
> 
> On Tue, 8 Oct 2019 at 23:27, AKASHI Takahiro <takahiro.akashi at linaro.org> wrote:
> >
> > Introduce new configuration, CONFIG_RSA_VERIFY which will decouple building
> > RSA functions from FIT verification and allow for adding a RSA-based
> > signature verification for other file formats, in particular PE file
> > for UEFI secure boot.
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> > ---
> >  Kconfig                |   1 +
> >  common/Makefile        |   3 +-
> >  common/image-fit-sig.c | 417 +++++++++++++++++++++++++++++++++++++++++
> >  common/image-fit.c     |   6 +-
> >  common/image-sig.c     | 396 --------------------------------------
> >  include/image.h        |  14 +-
> >  lib/rsa/Kconfig        |  12 ++
> >  lib/rsa/Makefile       |   2 +-
> >  lib/rsa/rsa-verify.c   |   2 +
> >  tools/Makefile         |   2 +-
> >  10 files changed, 452 insertions(+), 403 deletions(-)
> >  create mode 100644 common/image-fit-sig.c
> 
> [..]
> 
> > diff --git a/include/image.h b/include/image.h
> > index c1065c06f9bd..e37011b7e463 100644
> > --- a/include/image.h
> > +++ b/include/image.h
> > @@ -18,6 +18,15 @@
> >  #include "compiler.h"
> >  #include <asm/byteorder.h>
> >  #include <stdbool.h>
> > +#if 1
> > +#ifndef USE_HOSTCC
> > +/*
> > + * We should not include kconfig.h> on host, otherwise it may cause
> > + * build errors due to unexpected CONFIG_* defined.
> > + */
> > +#include <linux/kconfig.h>
> > +#endif
> > +#endif
> 
> Can we remove all this somehow? We seem to have got this far without
> including kconfig.h

I don't remember why I added this #ifndef here. As I can't reproduce
an issue, I will remove it.

-Takahiro Akashi

> Other than that it looks good.
> 
> 
> - Simon


More information about the U-Boot mailing list