From 1097a8aa9d2331f6eed8ca7ece0fe39e7ae55bbc Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 2 Aug 2017 16:11:52 -0400 Subject: [PATCH] Allow use of sbsign to sign things. Signed-off-by: Peter Jones --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 2137db2..4adc048 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ INSTALL ?= install PK12UTIL ?= pk12util CERTUTIL ?= certutil PESIGN ?= pesign +SBSIGN ?= sbsign prefix ?= /usr prefix := $(abspath $(prefix)) datadir ?= $(prefix)/share/ @@ -274,8 +275,13 @@ endif -j .note.gnu.build-id \ $(FORMAT) $^ $@.debug +ifneq ($(origin ENABLE_SBSIGN),undefined) +%.efi.signed: %.efi shim.key shim.crt + $(SBSIGN) --key shim.key --cert shim.crt --output $@ $< +else %.efi.signed: %.efi certdb/secmod.db $(PESIGN) -n certdb -i $< -c "shim" -s -o $@ -f +endif clean: $(MAKE) -C Cryptlib -f $(TOPDIR)/Cryptlib/Makefile clean