Support specifying old_verify_keys in config

This commit is contained in:
Lambda 2024-09-13 14:46:27 +00:00
parent 5691cf0868
commit 458a7458dc
3 changed files with 22 additions and 2 deletions

View file

@ -1,12 +1,16 @@
use std::{
borrow::Cow,
collections::BTreeMap,
fmt::{self, Display},
net::{IpAddr, Ipv4Addr},
path::{Path, PathBuf},
};
use once_cell::sync::Lazy;
use ruma::{OwnedServerName, RoomVersionId};
use ruma::{
api::federation::discovery::OldVerifyKey, OwnedServerName,
OwnedServerSigningKeyId, RoomVersionId,
};
use serde::Deserialize;
use crate::error;
@ -288,6 +292,7 @@ pub(crate) struct FederationConfig {
pub(crate) trusted_servers: Vec<OwnedServerName>,
pub(crate) max_fetch_prev_events: u16,
pub(crate) max_concurrent_requests: u16,
pub(crate) old_verify_keys: BTreeMap<OwnedServerSigningKeyId, OldVerifyKey>,
}
impl Default for FederationConfig {
@ -299,6 +304,7 @@ impl Default for FederationConfig {
],
max_fetch_prev_events: 100,
max_concurrent_requests: 100,
old_verify_keys: BTreeMap::new(),
}
}
}