mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #20862 from benpicco/drop-SUIT_SEC_PASSWORD
makefiles/suit: make use of `SUIT_SEC_PASSWORD` optional
This commit is contained in:
commit
61df141332
@ -32,10 +32,6 @@ SUIT_MANIFEST_SIGNED_LATEST ?= $(BINDIR_SUIT)/$(SUIT_MANIFEST_BASENAME).latest.b
|
||||
SUIT_NOTIFY_VERSION ?= latest
|
||||
SUIT_NOTIFY_MANIFEST ?= $(SUIT_MANIFEST_BASENAME).$(SUIT_NOTIFY_VERSION).bin
|
||||
|
||||
ifneq (,$(SUIT_SEC_PASSWORD))
|
||||
SUIT_TOOL_ARGS += -p $(SUIT_SEC_PASSWORD)
|
||||
endif
|
||||
|
||||
# Long manifest names require more buffer space when parsing
|
||||
export CFLAGS += -DCONFIG_SOCK_URLPATH_MAXLEN=128
|
||||
export CFLAGS += -DSUIT_VENDOR_DOMAIN="\"$(SUIT_VENDOR)\""
|
||||
@ -58,7 +54,19 @@ $(SUIT_MANIFEST): $(SUIT_MANIFEST_PAYLOADS) $(BINDIR_SUIT)
|
||||
$(Q)rm -f $@.tmp
|
||||
|
||||
$(SUIT_MANIFEST_SIGNED): $(SUIT_MANIFEST) $(SUIT_SEC)
|
||||
$(Q)$(SUIT_TOOL) sign $(SUIT_TOOL_ARGS) -k $(SUIT_SEC_SIGN) -m $(SUIT_MANIFEST) -o $@
|
||||
$(Q)( \
|
||||
if grep -q ENCRYPTED $(SUIT_SEC_SIGN); then \
|
||||
if [ -z "$(SUIT_SEC_PASSWORD)" ]; then \
|
||||
printf "Enter encryption for key file $(SUIT_SEC_SIGN): "; \
|
||||
read PASSWORD; \
|
||||
else \
|
||||
PASSWORD="$(SUIT_SEC_PASSWORD)"; \
|
||||
fi; \
|
||||
$(SUIT_TOOL) sign -p "$$PASSWORD" -k $(SUIT_SEC_SIGN) -m $(SUIT_MANIFEST) -o $@;\
|
||||
else \
|
||||
$(SUIT_TOOL) sign -k $(SUIT_SEC_SIGN) -m $(SUIT_MANIFEST) -o $@; \
|
||||
fi \
|
||||
)
|
||||
|
||||
$(SUIT_MANIFEST_LATEST): $(SUIT_MANIFEST)
|
||||
$(Q)ln -f -s $< $@
|
||||
|
Loading…
Reference in New Issue
Block a user