Message ID | 20210727091054.512050-5-takahiro.akashi@linaro.org |
---|---|
State | New |
Headers | show |
Series | efi_loader: capsule: improve capsule authentication support | expand |
On 7/27/21 11:10 AM, AKASHI Takahiro wrote: > The check for CONFIG_EFI_CAPSULE_KEY_PATH: > ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") > does not allow users to specify a relative path for including a public > key binary. This is fine for most of all cases, but it will make it > difficult to add pytest test cases as pre-created keys/certificates > are placed in "test" directory. > > So just ease the check, still causing an error if the specified file > does not exist at compiling efi_capsule_key.S. > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > --- > lib/efi_loader/Makefile | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile > index 9b369430e258..fca0da4d131e 100644 > --- a/lib/efi_loader/Makefile > +++ b/lib/efi_loader/Makefile > @@ -21,8 +21,9 @@ targets += helloworld.o > endif > > ifeq ($(CONFIG_EFI_CAPSULE_AUTHENTICATE),y) > -EFI_CAPSULE_KEY_PATH := $(subst $\",,$(CONFIG_EFI_CAPSULE_KEY_PATH)) > -ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") > +#EFI_CAPSULE_KEY_PATH := $(subst $\",,$(CONFIG_EFI_CAPSULE_KEY_PATH)) > +#ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") Please, remove these two comment lines. > +ifeq ($(CONFIG_EFI_CAPSULE_KEY_PATH),"") > $(error .esl cerificate not found. Configure your CONFIG_EFI_CAPSULE_KEY_PATH) %s/cerificate/certificate/ Best regards Heinrich > endif > endif >
On Sun, Aug 01, 2021 at 11:35:15AM +0200, Heinrich Schuchardt wrote: > On 7/27/21 11:10 AM, AKASHI Takahiro wrote: > > The check for CONFIG_EFI_CAPSULE_KEY_PATH: > > ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") > > does not allow users to specify a relative path for including a public > > key binary. This is fine for most of all cases, but it will make it > > difficult to add pytest test cases as pre-created keys/certificates > > are placed in "test" directory. > > > > So just ease the check, still causing an error if the specified file > > does not exist at compiling efi_capsule_key.S. > > > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > > --- > > lib/efi_loader/Makefile | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile > > index 9b369430e258..fca0da4d131e 100644 > > --- a/lib/efi_loader/Makefile > > +++ b/lib/efi_loader/Makefile > > @@ -21,8 +21,9 @@ targets += helloworld.o > > endif > > > > ifeq ($(CONFIG_EFI_CAPSULE_AUTHENTICATE),y) > > -EFI_CAPSULE_KEY_PATH := $(subst $\",,$(CONFIG_EFI_CAPSULE_KEY_PATH)) > > -ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") > > +#EFI_CAPSULE_KEY_PATH := $(subst $\",,$(CONFIG_EFI_CAPSULE_KEY_PATH)) > > +#ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") > > Please, remove these two comment lines. I forgot to do so. > > +ifeq ($(CONFIG_EFI_CAPSULE_KEY_PATH),"") > > $(error .esl cerificate not found. Configure your CONFIG_EFI_CAPSULE_KEY_PATH) > > %s/cerificate/certificate/ This misspelling does exist in the original. I won't fix it. -Takahiro Akashi > Best regards > > Heinrich > > > endif > > endif > > >
diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index 9b369430e258..fca0da4d131e 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -21,8 +21,9 @@ targets += helloworld.o endif ifeq ($(CONFIG_EFI_CAPSULE_AUTHENTICATE),y) -EFI_CAPSULE_KEY_PATH := $(subst $\",,$(CONFIG_EFI_CAPSULE_KEY_PATH)) -ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") +#EFI_CAPSULE_KEY_PATH := $(subst $\",,$(CONFIG_EFI_CAPSULE_KEY_PATH)) +#ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") +ifeq ($(CONFIG_EFI_CAPSULE_KEY_PATH),"") $(error .esl cerificate not found. Configure your CONFIG_EFI_CAPSULE_KEY_PATH) endif endif
The check for CONFIG_EFI_CAPSULE_KEY_PATH: ifeq ("$(wildcard $(EFI_CAPSULE_KEY_PATH))","") does not allow users to specify a relative path for including a public key binary. This is fine for most of all cases, but it will make it difficult to add pytest test cases as pre-created keys/certificates are placed in "test" directory. So just ease the check, still causing an error if the specified file does not exist at compiling efi_capsule_key.S. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- lib/efi_loader/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.31.0