diff --git a/crates/ruma-federation-api/CHANGELOG.md b/crates/ruma-federation-api/CHANGELOG.md index 09023b49..f6ea78a5 100644 --- a/crates/ruma-federation-api/CHANGELOG.md +++ b/crates/ruma-federation-api/CHANGELOG.md @@ -7,6 +7,7 @@ Breaking changes: - Use `OwnedOneTimeKeyId` and `OneTimeKeyAlgorithm` instead of `OwnedDeviceKeyId` and `DeviceKeyAlgorithm` respectively to identify one-time and fallback keys and their algorithm. +- Use `ServerSignatures` for the `signatures` or `ServerSigningKeys`. Bug fixes: diff --git a/crates/ruma-federation-api/src/discovery.rs b/crates/ruma-federation-api/src/discovery.rs index b97bd609..69f6d586 100644 --- a/crates/ruma-federation-api/src/discovery.rs +++ b/crates/ruma-federation-api/src/discovery.rs @@ -4,6 +4,7 @@ use std::collections::BTreeMap; use ruma_common::{ serde::Base64, MilliSecondsSinceUnixEpoch, OwnedServerName, OwnedServerSigningKeyId, + ServerSignatures, }; use serde::{Deserialize, Serialize}; @@ -67,7 +68,7 @@ pub struct ServerSigningKeys { /// Digital signatures of this object signed using the verify_keys. /// /// Map of server name to keys by key ID. - pub signatures: BTreeMap>, + pub signatures: ServerSignatures, /// Timestamp when the keys should be refreshed. /// @@ -84,7 +85,7 @@ impl ServerSigningKeys { server_name, verify_keys: BTreeMap::new(), old_verify_keys: BTreeMap::new(), - signatures: BTreeMap::new(), + signatures: ServerSignatures::default(), valid_until_ts, } }