Timo Kösters
5eec262130
Fix redactions for aliases events
2021-03-13 19:39:16 +01:00
gnieto
0635b40729
Verify only the required signatures on verify_event
( #394 )
...
The spec says that the required signatures for a signed event is the
signature of sender's server (unless is a third party invite) and the
`event_id` server (in v1 and v2 room versions).
This changes the previous behaviour, which tried to verify the
signatures for all the servers in the `PublicKeyMap`, instead of
checking only the required signatures.
Relevant spec section:
https://matrix.org/docs/spec/server_server/r0.1.4#validating-hashes-and-signatures-on-received-events
2021-01-18 23:21:47 +01:00
Jonas Platte
6877115109
signatures: Update docs
2020-10-29 21:01:43 +01:00
Devin Ragotzy
bc43e94d7e
Add helper methods for CanonicalJsonObject construction
2020-10-29 19:31:23 +01:00
Jonas Platte
87b0846201
signatures: Replace serde_json::Value with CanonicalJsonValue
2020-10-04 22:56:45 +02:00
Jonas Platte
5d03bd883a
signatures: Implement most function in terms of JSON objects
...
Instead of arbitrary JSON values, since they all error on non-object
values anyway.
2020-10-04 22:52:03 +02:00
Jonas Platte
6c8bac949e
signatures: Simplify sign_json
2020-09-29 23:23:47 +02:00
Jonas Platte
54ba6d10fe
signatures: Remove useless Value > Value conversion
2020-09-29 23:21:17 +02:00
Jonas Platte
5ab9c4dc19
signatures: Use BTreeMap instead of HashMap
2020-09-29 23:20:53 +02:00
Devin Ragotzy
ac3878cbe3
Use url safe no pad base64 encoding config options for reference_hash
2020-09-26 16:27:19 +02:00
Jonas Platte
eeb5df2c95
signatures: Handle room version 5 / 6 differences
2020-09-23 12:40:28 +02:00
Jonas Platte
fa58f09a23
signatures: Rewrite redaction to be more efficient
2020-09-23 12:19:35 +02:00
Jonas Platte
414161f0fd
Fix redaction
...
The catch-all branch was applying where it wasn't meant to.
2020-09-23 12:18:45 +02:00
Jonas Platte
1fbf05d71f
Fix some bad formatting
2020-08-08 21:52:58 +02:00
Jonas Platte
8683901e14
Don't to_string() string literals
2020-07-14 22:11:05 +02:00
Jonas Platte
db4c0b2134
Add a test for ruma_signatures::canonical_json
2020-06-06 20:36:01 +02:00
Jonas Platte
d5bd6bd61d
Rerun cargo fmt
2020-06-05 17:46:29 +02:00
Jonas Platte
916586e56a
Add 'ruma-signatures/' from commit '1ca545cba8dfd43e0fc8e3c18e1311fb73390a97'
...
git-subtree-dir: ruma-signatures
git-subtree-mainline: 50b74e2b7633f0c4dddb9a71313dc198c58a3074
git-subtree-split: 1ca545cba8dfd43e0fc8e3c18e1311fb73390a97
2020-06-05 17:20:12 +02:00