hsclient API: Remove notion of ambient keys fromk this layer
This commit is contained in:
parent
a45acb3905
commit
891782122d
|
@ -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>>,
|
||||
}
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Reference in New Issue