[isar-cip-core][PATCH v1 2/2] swupdate.cfg.tmpl: Add digest-provider option for signature verification

[email protected] Mon, 20 Jul 2026 10:29:03 +0530
Newsgroups org.cip-project.lists.cip-dev
Message-ID <[email protected]>
From: Shivanand Kunijadar <[email protected]>

This option is introduced from v2025.12 onwards in the SWUpdate package.
It sets the crypto backend (mbedTLS) that the SWUpdate uses to verify
signed updates and compute digests when multiple provides are available.

Signed-off-by: Shivanand Kunijadar <[email protected]>
---
 .../files/{swupdate.cfg => swupdate.cfg.tmpl}             | 1 +
 recipes-core/swupdate-config/swupdate-config_0.2.bb       | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)
 rename recipes-core/swupdate-config/files/{swupdate.cfg => swupdate.cfg.tmpl} (77%)

diff --git a/recipes-core/swupdate-config/files/swupdate.cfg b/recipes-core/swupdate-config/files/swupdate.cfg.tmpl
similarity index 77%
rename from recipes-core/swupdate-config/files/swupdate.cfg
rename to recipes-core/swupdate-config/files/swupdate.cfg.tmpl
index 3e2b45c..44d8d04 100644
--- a/recipes-core/swupdate-config/files/swupdate.cfg
+++ b/recipes-core/swupdate-config/files/swupdate.cfg.tmpl
@@ -2,4 +2,5 @@ globals :
 {
     bootloader = "ebg";
     public-key-file = "/usr/share/swupdate-signing/swupdate-sign.crt"
+    ${SWUPDATE_DIGEST_PROVIDER}
 };
diff --git a/recipes-core/swupdate-config/swupdate-config_0.2.bb b/recipes-core/swupdate-config/swupdate-config_0.2.bb
index b48e3d1..584706c 100644
--- a/recipes-core/swupdate-config/swupdate-config_0.2.bb
+++ b/recipes-core/swupdate-config/swupdate-config_0.2.bb
@@ -19,12 +19,14 @@ DEBIAN_PROVIDES := "${PN}"
 
 PN .= "-${MACHINE}"
 
-SRC_URI = "file://swupdate.cfg \
+SRC_URI = "file://swupdate.cfg.tmpl \
            file://hwrevision.tmpl"
 
+SWUPDATE_DIGEST_PROVIDER ??= ""
+SWUPDATE_DIGEST_PROVIDER:sid = "digest-provider = "pkcs#7mbedtls";"
 MACHINE_HW_VERSION ??= "cip-core-1.0"
-TEMPLATE_FILES += "hwrevision.tmpl"
-TEMPLATE_VARS += "MACHINE MACHINE_HW_VERSION"
+TEMPLATE_FILES += "hwrevision.tmpl swupdate.cfg.tmpl"
+TEMPLATE_VARS += "MACHINE MACHINE_HW_VERSION SWUPDATE_DIGEST_PROVIDER"
 
 do_install[cleandirs] = "${D}/etc/"
 do_install() {
-- 
2.39.5