rename signing_keys_for to verify_keys_for

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-17 07:21:51 +00:00
parent 5c0bf29122
commit 4458efa2b2
4 changed files with 6 additions and 6 deletions

View file

@ -46,7 +46,7 @@ pub(super) async fn globals(subcommand: Globals) -> Result<RoomMessageEventConte
origin,
} => {
let timer = tokio::time::Instant::now();
let results = services().globals.db.signing_keys_for(&origin);
let results = services().globals.db.verify_keys_for(&origin);
let query_time = timer.elapsed();
Ok(RoomMessageEventContent::notice_markdown(format!(

View file

@ -289,7 +289,7 @@ impl Data {
/// This returns an empty `Ok(BTreeMap<..>)` when there are no keys found
/// for the server.
pub fn signing_keys_for(&self, origin: &ServerName) -> Result<BTreeMap<OwnedServerSigningKeyId, VerifyKey>> {
pub fn verify_keys_for(&self, origin: &ServerName) -> Result<BTreeMap<OwnedServerSigningKeyId, VerifyKey>> {
let signingkeys = self
.server_signingkeys
.get(origin.as_bytes())?

View file

@ -272,8 +272,8 @@ impl Service {
/// This returns an empty `Ok(BTreeMap<..>)` when there are no keys found
/// for the server.
pub fn signing_keys_for(&self, origin: &ServerName) -> Result<BTreeMap<OwnedServerSigningKeyId, VerifyKey>> {
let mut keys = self.db.signing_keys_for(origin)?;
pub fn verify_keys_for(&self, origin: &ServerName) -> Result<BTreeMap<OwnedServerSigningKeyId, VerifyKey>> {
let mut keys = self.db.verify_keys_for(origin)?;
if origin == self.server_name() {
keys.insert(
format!("ed25519:{}", self.keypair().version())

View file

@ -148,7 +148,7 @@ impl super::Service {
let result: BTreeMap<_, _> = self
.services
.globals
.signing_keys_for(origin)?
.verify_keys_for(origin)?
.into_iter()
.map(|(k, v)| (k.to_string(), v.key))
.collect();
@ -354,7 +354,7 @@ impl super::Service {
let mut result: BTreeMap<_, _> = self
.services
.globals
.signing_keys_for(origin)?
.verify_keys_for(origin)?
.into_iter()
.map(|(k, v)| (k.to_string(), v.key))
.collect();