Fetching a large claim with an embedded receipt can result in an error if the size of the claim + the size of the receipt payload exceeds the size allocated to the CBOR encoder buffer (default to 10KB).
This PR fixes the issue by initializing a dynamic buffer size proportionally to the size of the claim and the receipt when embedding a receipt into a claim entry. Other relevant changes included:
Added a functional test to reproduce the bug and validate the fix.
Added a flag in the pyscitt retrieve_signed_claims command to allow users to optionally embed receipts in claims.
Added more logging to make the debugging and investigation of similar problems easier in the future.
Fetching a large claim with an embedded receipt can result in an error if the size of the claim + the size of the receipt payload exceeds the size allocated to the CBOR encoder buffer (default to 10KB).
This PR fixes the issue by initializing a dynamic buffer size proportionally to the size of the claim and the receipt when embedding a receipt into a claim entry. Other relevant changes included:
pyscitt retrieve_signed_claims
command to allow users to optionally embed receipts in claims.