Skip to content

Commit 63c2a81

Browse files
authored
Merge pull request #21666 from benpicco/suit/SUIT_GEN_PUBKEY
makefiles/suit: add `SUIT_GEN_PUBKEY` variable to inhibit public key generation
2 parents ef76a04 + cd43084 commit 63c2a81

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

makefiles/suit.base.inc.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ $(SUIT_SEC): | $(CLEAN)
6060
)
6161
$(Q)if [ ! -s $@ ]; then rm $@; fi
6262

63-
%.pem.pub: %.pem
63+
# Allow to disable auto-generating public key from private key, e.g. if only the
64+
# public key is available at build time and manifest is created elsewhere.
65+
SUIT_GEN_PUBKEY ?= 1
66+
ifeq (1, $(SUIT_GEN_PUBKEY))
67+
_PUB_FROM_SEC := %.pem
68+
endif
69+
%.pem.pub: $(_PUB_FROM_SEC)
6470
$(Q)openssl ec -inform pem -in $< -outform pem -pubout -out $@
6571

6672
# Convert public keys to C headers - only last 32 bytes are key material

0 commit comments

Comments
 (0)