From 8e70ae7c71fb0a31b3b95f156b2d865ba8a07ae8 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 13 Jun 2025 12:06:48 +0200 Subject: [PATCH] fwtool: check for EST support if the cert was issued by insta Signed-off-by: John Crispin --- include/image-commands.mk | 3 ++- package/base-files/files/lib/upgrade/fwtool.sh | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index d3c9cea293..b7a0d98d3d 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -85,7 +85,8 @@ metadata_json = \ "revision": "$(call json_quote,$(REVISION))", \ "target": "$(call json_quote,$(TARGETID))", \ "board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \ - } \ + }, \ + "est_supported": 1 \ }' define Build/append-metadata diff --git a/package/base-files/files/lib/upgrade/fwtool.sh b/package/base-files/files/lib/upgrade/fwtool.sh index 8bd00a3332..a84eb96baf 100644 --- a/package/base-files/files/lib/upgrade/fwtool.sh +++ b/package/base-files/files/lib/upgrade/fwtool.sh @@ -51,6 +51,10 @@ fwtool_check_image() { json_get_var compatmessage compat_message [ -n "$imagecompat" ] || imagecompat="1.0" + if ! est_client fwtool; then + return 1 + fi + # select correct supported list based on compat_version # (using this ensures that compatibility check works for devices # not knowing about compat-version) -- 2.34.1