federation-api: Use Signatures in more places
This commit is contained in:
parent
f87f388280
commit
807b278dab
@ -7,6 +7,7 @@ Breaking changes:
|
|||||||
- Use `OwnedOneTimeKeyId` and `OneTimeKeyAlgorithm` instead of
|
- Use `OwnedOneTimeKeyId` and `OneTimeKeyAlgorithm` instead of
|
||||||
`OwnedDeviceKeyId` and `DeviceKeyAlgorithm` respectively to identify one-time
|
`OwnedDeviceKeyId` and `DeviceKeyAlgorithm` respectively to identify one-time
|
||||||
and fallback keys and their algorithm.
|
and fallback keys and their algorithm.
|
||||||
|
- Use `ServerSignatures` for the `signatures` or `ServerSigningKeys`.
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ use std::collections::BTreeMap;
|
|||||||
|
|
||||||
use ruma_common::{
|
use ruma_common::{
|
||||||
serde::Base64, MilliSecondsSinceUnixEpoch, OwnedServerName, OwnedServerSigningKeyId,
|
serde::Base64, MilliSecondsSinceUnixEpoch, OwnedServerName, OwnedServerSigningKeyId,
|
||||||
|
ServerSignatures,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -67,7 +68,7 @@ pub struct ServerSigningKeys {
|
|||||||
/// Digital signatures of this object signed using the verify_keys.
|
/// Digital signatures of this object signed using the verify_keys.
|
||||||
///
|
///
|
||||||
/// Map of server name to keys by key ID.
|
/// Map of server name to keys by key ID.
|
||||||
pub signatures: BTreeMap<OwnedServerName, BTreeMap<OwnedServerSigningKeyId, String>>,
|
pub signatures: ServerSignatures,
|
||||||
|
|
||||||
/// Timestamp when the keys should be refreshed.
|
/// Timestamp when the keys should be refreshed.
|
||||||
///
|
///
|
||||||
@ -84,7 +85,7 @@ impl ServerSigningKeys {
|
|||||||
server_name,
|
server_name,
|
||||||
verify_keys: BTreeMap::new(),
|
verify_keys: BTreeMap::new(),
|
||||||
old_verify_keys: BTreeMap::new(),
|
old_verify_keys: BTreeMap::new(),
|
||||||
signatures: BTreeMap::new(),
|
signatures: ServerSignatures::default(),
|
||||||
valid_until_ts,
|
valid_until_ts,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user