13 Commits

Author SHA1 Message Date
Damir Jelić
fdbc4d6d1d ruma-client-api: Use just a BTreeMap for the /keys/upload fields 2021-12-06 11:26:14 +01:00
Damir Jelić
caa3c05db3 client-api: Add support for fallback keys
This implements support for MSC2732[1], fallback keys. Only support to
upload and get notifications about fallback keys via `/sync` is
implemented.

[1]: https://github.com/matrix-org/matrix-doc/pull/2732
2021-12-06 11:26:14 +01:00
Damir Jelić
786ab15c0c client-api: Use Raw variants to upload/download keys
Uploaded objects holding public keys tend to have the object signed by
the very same key that is part of the object. Users that download such
public keys are expected to verify the signature to confirm that the
public key and its surrounding fields in the object have not been
manipulated with.

The SignedKey, DeviceKeys, and CrossSigningKey structs
perform a lossy variant of deserialization, which removes the ability to
verify signatures of the aforementioned objects.

This patch changes the response types to a Raw variant, which let's the
user decide how to deserialize.
2021-12-06 11:26:14 +01:00
Jonas Platte
3ce578f384
identifiers: Make UserId a DST 2021-11-26 00:40:40 +01:00
Jonas Platte
c73eb7dce3
identifiers: Make DeviceKeyId a DST 2021-11-25 21:07:14 +01:00
Jonas Platte
438efee143
identifiers: Remove Box<$id> aliases 2021-11-25 21:07:14 +01:00
Jonas Platte
aa5fdf9d22
Merge serde attributes and improve docs 2021-10-08 12:49:13 +02:00
Jonas Platte
271491732e
Remove now-redundant doc(cfg) attributes
They are now implied:
https://github.com/rust-lang/rust/pull/89596
2021-10-08 11:52:18 +02:00
Devin Ragotzy
bdcfc12ac7
Update client-server spec links 2021-10-06 10:48:08 +02:00
Jonas Platte
dc842f028f
Add missing commas 2021-08-30 17:34:20 +02:00
Jonas Platte
9b2602649f
Stop special-casing zero fields in macro code 2021-07-09 15:10:22 +02:00
Timo Kösters
a238a0dda5
federation-api: Improve get_keys 2021-05-21 12:37:41 +02:00
Jonas Platte
3db0ea7026
Move all crates into a new crates directory 2021-05-03 15:50:27 +02:00