Skip to content

Commit 409e92b

Browse files
ahasztagrlubos
authored andcommitted
suit: Fix not working SHA-512
This fixes the error causing manifests with SHA-512 installation failure. Signed-off-by: Artur Hadasz <[email protected]>
1 parent 540f139 commit 409e92b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

subsys/suit/platform/src/suit_plat_digest.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ int suit_plat_check_digest(enum suit_cose_alg alg_id, struct zcbor_string *diges
2222
case suit_cose_sha256:
2323
psa_alg = PSA_ALG_SHA_256;
2424
break;
25+
case suit_cose_sha512:
26+
psa_alg = PSA_ALG_SHA_512;
27+
break;
2528
default:
2629
LOG_ERR("Unsupported digest algorithm: %d", alg_id);
2730
return SUIT_ERR_DECODING;

subsys/suit/stream/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ endif # SUIT_STREAM_SINK_SDFW_RECOVERY
118118
config SUIT_STREAM_SINK_DIGEST
119119
bool "Enable digest sink"
120120
select PSA_WANT_ALG_SHA_256 if SOC_FAMILY_NORDIC_NRF
121+
imply PSA_WANT_ALG_SHA_512 if SOC_FAMILY_NORDIC_NRF
121122

122123
if SUIT_STREAM_SINK_DIGEST
123124
config SUIT_STREAM_SINK_DIGEST_CONTEXT_COUNT

0 commit comments

Comments
 (0)