split signing_keys_for from verify_keys_for

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-17 07:49:52 +00:00
parent 4458efa2b2
commit c64adbec0e
2 changed files with 18 additions and 4 deletions

View file

@ -13,7 +13,10 @@ use data::Data;
use ipaddress::IPAddress;
use regex::RegexSet;
use ruma::{
api::{client::discovery::discover_support::ContactRole, federation::discovery::VerifyKey},
api::{
client::discovery::discover_support::ContactRole,
federation::discovery::{ServerSigningKeys, VerifyKey},
},
serde::Base64,
DeviceId, OwnedEventId, OwnedRoomAliasId, OwnedServerName, OwnedServerSigningKeyId, OwnedUserId, RoomAliasId,
RoomVersionId, ServerName, UserId,
@ -288,6 +291,10 @@ impl Service {
Ok(keys)
}
pub fn signing_keys_for(&self, origin: &ServerName) -> Result<Option<ServerSigningKeys>> {
self.db.signing_keys_for(origin)
}
pub fn well_known_client(&self) -> &Option<Url> { &self.config.well_known.client }
pub fn well_known_server(&self) -> &Option<OwnedServerName> { &self.config.well_known.server }