Skip to content

Commit

Permalink
decoder: Allow to decode severed extensions
Browse files Browse the repository at this point in the history
Allow to finish decoding severable sequences (extensions)
suit-dependency-resolution as well as suit-candidate-verification with
SEVERED status.
This case is already allowed for suit-install and suit-payload-fetch
sequences and result in a dedicated error code
(SUIT_ERR_UNAUTHORIZED_COMMAND_SEQ) being returned from
suit_manifest_get_command_seq.

This error code blocks the possibility to fetch or execute the severed
sequence, so a manifest with severed sequence is valid, but execution of
those sequences lead to unrecoverable error.
See #76 and
cc42cf8
for more details.

Ref: NCSDK-29653

Signed-off-by: Tomasz Chyrowicz <[email protected]>
  • Loading branch information
tomchy committed Nov 26, 2024
1 parent 9b4987c commit c97fbb3
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/suit_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,22 +838,6 @@ int suit_decoder_decode_sequences(struct suit_decoder_state *state)
}
}

if ((state->decoded_manifest->dependency_resolution_seq_status != AUTHENTICATED) &&
(state->decoded_manifest->dependency_resolution_seq_status != UNAVAILABLE)) {
state->decoded_manifest->dependency_resolution_seq_status = UNAVAILABLE;
if (ret == SUIT_SUCCESS) {
ret = SUIT_ERR_MANIFEST_VALIDATION;
}
}

if ((state->decoded_manifest->candidate_verification_seq_status != AUTHENTICATED) &&
(state->decoded_manifest->candidate_verification_seq_status != UNAVAILABLE)) {
state->decoded_manifest->candidate_verification_seq_status = UNAVAILABLE;
if (ret == SUIT_SUCCESS) {
ret = SUIT_ERR_MANIFEST_VALIDATION;
}
}

if (ret == SUIT_SUCCESS) {
state->step = SEQUENCES_DECODED;
} else {
Expand Down

0 comments on commit c97fbb3

Please sign in to comment.