CCF
CCF copied to clipboard
Error checking in `set_claims_digest`
set_claims_digest
expects a SHA-256 hash as input, but there is no error check on the size. It accepts value of any size.
@MahatiC I do wonder why that is, a superficial look at the code suggests we are in fact checking the size: https://github.com/microsoft/CCF/blob/main/src/js/wrap.cpp#L855
@achamayou When test_historical_receipts_with_claims
test in e2e_logging.py
is enabled (#4370), and I manually modify logging.js to pass a non-SHA256 as input for set_claims_digest
, it does trigger the exception.