Skip to content

Commit

Permalink
More CI-based debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurence Lundblade committed Jun 28, 2023
1 parent a007d89 commit a7ecdc4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/t_cose_sign_sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@ t_cose_sign_encode_finish(struct t_cose_sign_sign_ctx *me,
* as a byte string to the CBOR encode context.
*/
return_value = signer->sign1_cb(signer, &sign_inputs, cbor_encoder);
if(return_value == T_COSE_ERR_SIG_IN_PROGRESS) {
me->started = true;
} else {
/* Reset the started value to enable reuse of the context */
me->started = false;
if(return_value != T_COSE_SUCCESS) {
if(return_value == T_COSE_ERR_SIG_IN_PROGRESS) {
me->started = true;
}
goto Done;
}

} else {
#ifndef T_COSE_DISABLE_COSE_SIGN
/* --- One or more COSE_Signatures for COSE_Sign --- */
Expand Down Expand Up @@ -182,6 +183,7 @@ t_cose_sign_encode_finish(struct t_cose_sign_sign_ctx *me,
* errors. Some are detected at the start of this function, but
* they cannot all be deteced there.
*/
Done:
return return_value;
}

Expand Down
2 changes: 2 additions & 0 deletions src/t_cose_signature_sign_restart.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ t_cose_signature_sign1_restart_cb(struct t_cose_signature_sign *me_x,
QCBOREncode_CloseBytes(qcbor_encoder, signature.len);

Done:
printf("Done %d %d\n", return_value, QCBOREncode_GetErrorState(qcbor_encoder));

return return_value;
}

Expand Down

0 comments on commit a7ecdc4

Please sign in to comment.