hsclient API: Remove notion of ambient keys fromk this layer

This commit is contained in:
Ian Jackson 2023-02-22 16:00:13 +00:00
parent a45acb3905
commit 891782122d
2 changed files with 5 additions and 14 deletions

View File

@ -1,11 +1,7 @@
//! Manage a set of private keys for a client to authenticate to one or more
//! onion services.
//! Hidden service (onion service) client key management functionality
use std::{collections::HashMap, sync::Mutex};
// TODO HS what layer should be responsible for finding and dispatching keys?
// I think it should be as high as possible, so keys should be passed into
// the hs connector for each connection. Otherwise there would have to be an
// HsKeyProvider trait here, and error handling gets complicated.
use tor_hscrypto::pk::{ClientSecretKeys, HsId};
pub(crate) struct Keys {
/// The
keys: Mutex<HashMap<HsId, ClientSecretKeys>>,
}

View File

@ -37,11 +37,6 @@ pub struct HsClientConnector<R: Runtime> {
// TODO hs: if we implement cache isolation or state isolation, we might
// need multiple instances of this.
state: state::StateMap,
/// A collection of private keys to be used with various onion services.
//
// TODO hs: we might even want multiple instances of this, depending on how
// we decide to do isolation.
keys: keys::Keys,
}
impl<R: Runtime> HsClientConnector<R> {