mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
Support specifying old_verify_keys in config
This commit is contained in:
parent
5691cf0868
commit
458a7458dc
3 changed files with 22 additions and 2 deletions
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue