54 Commits

Author SHA1 Message Date
Timo Kösters
4f16b9357c fix: verify_json algorithm 2021-04-22 18:23:45 +02:00
Jonas Platte
f6371bb1f2
Release ruma-signatures 0.7.0 2021-04-13 21:34:53 +02:00
Jonas Platte
2a8b4a0478
Release ruma-identifiers 0.19.0 2021-04-13 21:12:24 +02:00
Kévin Commaille
963400979b
docs: Harmonize ruma modules descriptions 2021-04-07 12:14:49 +02:00
Jonas Platte
b4da6b784a
Replace non-renaming uses of serde_json::{from_str, to_string} 2021-04-05 13:33:59 +02:00
Jonas Platte
1dd6a3870a
Use mem::take instead of mem::replace where applicable 2021-04-05 12:08:29 +02:00
Jonas Platte
1bf4157a89
Add favicon and logo URLs for rustdoc 2021-04-05 11:42:07 +02:00
Jonas Platte
39a8c26263
Release ruma-identifiers 0.18.1 2021-04-03 17:56:01 +02:00
Jonas Platte
953358e8ee
Release ruma-signatures 0.6.0 2021-04-01 01:30:01 +02:00
Jonas Platte
b79fd0c3aa
Release ruma-identifiers 0.18.0 2021-03-23 21:08:44 +01:00
Jonas Platte
c910d57b14
Release ruma-serde 0.3.1 2021-03-23 20:58:53 +01:00
Jonas Platte
a0e8bb416b
Increase MSRV from 1.43 to 1.45 2021-03-21 20:32:46 +01:00
Jonas Platte
c96537c7d6
signatures: Remove needless pre-declarations 2021-03-21 20:26:24 +01:00
Timo Kösters
5eec262130
Fix redactions for aliases events 2021-03-13 19:39:16 +01:00
Jonas Platte
00121bdb4b
Fix inconsistent #[test] module naming 2021-02-02 11:44:30 +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
ca1f334ded
Remove documentation links from all Cargo.tomls
It was wrong for ruma-federation-api and useless for all others since
crates.io will link to docs.rs automatically if no link is given.
2021-01-17 17:00:09 +01:00
Jonas Platte
e77de978cf
Release ruma-signatures 0.6.0-alpha.1 2021-01-02 13:44:24 +01:00
Jonas Platte
6d468b88a3
Release ruma-identifiers-validation 0.2.0 and ruma-identifiers 0.18.0-alpha.1 2021-01-02 13:31:08 +01:00
Jonas Platte
2ebd827355
Release ruma-serde 0.3.0 2021-01-02 13:04:39 +01:00
Jonas Platte
19ae6ff347
Remove lots of Copy implementations
so we don't have do breaking releases once they can't be Copy anymore.
2020-12-24 02:51:08 +01:00
Jonas Platte
f55e2b2cc6
Bump dependency requirements 2020-12-24 02:48:01 +01:00
Devin Ragotzy
45d0101155
Export the Verified enum in ruma-signatures 2020-12-21 10:39:17 +01:00
Jonas Platte
5562a23aaa
Move Raw, Outgoing and all macro code from ruma-common to ruma-serde 2020-11-28 03:45:39 +01:00
Jonas Platte
e7f55ea2c6
Rewrap comments 2020-11-27 18:22:18 +01:00
Jonas Platte
f2a8dd7a55
signatures: Simplify key version validity check 2020-11-10 14:21:03 +01:00
Jonas Platte
d34a270919
Allow custom values for more enums 2020-11-02 00:29:47 +01:00
Jonas Platte
6ba16b3ddb
signatures: Re-export canonical json types 2020-10-29 21:02:01 +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
e1975c2035
Be more consistent about whitespace 2020-10-24 00:44:01 +02: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
9b52601808
signatures: Replace remaining uses of HashMap with BTreeMap 2020-10-04 22:46:48 +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
Jonas Platte
006582e3f2
Various README updates 2020-09-29 20:30:33 +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
565e3a1ee7
Merge LICENSE files
The Copyright notice is taken out because no single person has a
copyright to the entire codebase.
2020-09-26 15:52:52 +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
30e73186e7
Bump dependencies 2020-08-07 19:13:00 +02:00
Jonas Platte
c1677aa4c0
Fix cargo metadata 2020-07-29 16:36:48 +02:00
Jonas Platte
4238c91e24
Update MSRV policy 2020-07-22 23:05:50 +02:00
Jonas Platte
8683901e14
Don't to_string() string literals 2020-07-14 22:11:05 +02:00
Jonas Platte
c621f220b9
Bump dependency versions 2020-06-19 22:53:07 +02:00
Jonas Platte
29a6c94a4f
Remove all but the toplevel .gitignore 2020-06-07 18:53:53 +02:00