Skip to content

Commit

Permalink
suit: Fix not working SHA-512
Browse files Browse the repository at this point in the history
This fixes the error causing manifests with SHA-512 installation
failure.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
  • Loading branch information
ahasztag committed Nov 7, 2024
1 parent 4dad8e2 commit 030897d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions subsys/suit/platform/src/suit_plat_digest.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ int suit_plat_check_digest(enum suit_cose_alg alg_id, struct zcbor_string *diges
case suit_cose_sha256:
psa_alg = PSA_ALG_SHA_256;
break;
case suit_cose_sha512:
psa_alg = PSA_ALG_SHA_512;
break;
default:
LOG_ERR("Unsupported digest algorithm: %d", alg_id);
return SUIT_ERR_DECODING;
Expand Down
1 change: 1 addition & 0 deletions subsys/suit/stream/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ endif # SUIT_STREAM_SINK_SDFW_RECOVERY
config SUIT_STREAM_SINK_DIGEST
bool "Enable digest sink"
select PSA_WANT_ALG_SHA_256 if SOC_FAMILY_NORDIC_NRF
imply PSA_WANT_ALG_SHA_512 if SOC_FAMILY_NORDIC_NRF

if SUIT_STREAM_SINK_DIGEST
config SUIT_STREAM_SINK_DIGEST_CONTEXT_COUNT
Expand Down

0 comments on commit 030897d

Please sign in to comment.