signatures: Remove age_ts from reference hash calculation

According to a spec clarification
This commit is contained in:
Kévin Commaille 2023-05-24 18:43:57 +02:00 committed by Kévin Commaille
parent 6df78e8aee
commit d78c3e11f1
2 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,10 @@ Bug fixes:
- Ignore keys with unknown algorithms in `verify_events`
Improvements:
- Remove `age_ts` from `REFERENCE_HASH_FIELDS_TO_REMOVE` according to a spec clarification
# 0.13.1
No changes for this version

View File

@ -31,7 +31,7 @@ static CANONICAL_JSON_FIELDS_TO_REMOVE: &[&str] = &["signatures", "unsigned"];
static CONTENT_HASH_FIELDS_TO_REMOVE: &[&str] = &["hashes", "signatures", "unsigned"];
/// The fields to remove from a JSON object when creating a reference hash of an event.
static REFERENCE_HASH_FIELDS_TO_REMOVE: &[&str] = &["age_ts", "signatures", "unsigned"];
static REFERENCE_HASH_FIELDS_TO_REMOVE: &[&str] = &["signatures", "unsigned"];
/// Signs an arbitrary JSON object and adds the signature to an object under the key `signatures`.
///