From mboxrd@z Thu Jan 1 00:00:00 1970 From: AKASHI Takahiro Date: Wed, 23 Oct 2019 14:10:33 +0900 Subject: [U-Boot] [PATCH v1 1/3] lib: rsa: decouple rsa from FIT image verification In-Reply-To: References: <20191009053044.7348-1-takahiro.akashi@linaro.org> <20191009053044.7348-2-takahiro.akashi@linaro.org> Message-ID: <20191023051032.GA10448@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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 > > --- > > 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 > > #include > > +#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 > > +#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