Struct tor_keymgr::ArtiNativeKeystore
source · pub struct ArtiNativeKeystore { /* private fields */ }keymgr only.Expand description
The Arti key store.
This is a disk-based key store that encodes keys in OpenSSH format.
Some of the key types supported by the ArtiNativeKeystore
don’t have a predefined SSH public key algorithm name,
so we define several custom SSH algorithm names.
As per RFC4251 § 6, our custom SSH algorithm names use the
<something@subdomain.torproject.org> format.
We have assigned the following custom algorithm names:
x25519@spec.torproject.org, for x25519 keysed25519-expanded@spec.torproject.org, for expanded ed25519 keys
See SSH protocol extensions for more details.
Implementations§
source§impl ArtiNativeKeystore
impl ArtiNativeKeystore
sourcepub fn from_path_and_mistrust(
keystore_dir: impl AsRef<Path>,
mistrust: &Mistrust
) -> Result<Self>
pub fn from_path_and_mistrust( keystore_dir: impl AsRef<Path>, mistrust: &Mistrust ) -> Result<Self>
Create a new ArtiNativeKeystore rooted at the specified keystore_dir directory.
The keystore_dir directory is created if it doesn’t exist.
This function returns an error if keystore_dir is not a directory, if it does not conform
to the requirements of the specified Mistrust, or if there was a problem creating the
directory.
Trait Implementations§
source§impl Debug for ArtiNativeKeystore
impl Debug for ArtiNativeKeystore
source§impl Keystore for ArtiNativeKeystore
impl Keystore for ArtiNativeKeystore
source§fn id(&self) -> &KeystoreId
fn id(&self) -> &KeystoreId
source§fn contains(
&self,
key_spec: &dyn KeySpecifier,
key_type: &KeyType
) -> Result<bool>
fn contains( &self, key_spec: &dyn KeySpecifier, key_type: &KeyType ) -> Result<bool>
key_spec exists in this key store.source§fn get(
&self,
key_spec: &dyn KeySpecifier,
key_type: &KeyType
) -> Result<Option<ErasedKey>>
fn get( &self, key_spec: &dyn KeySpecifier, key_type: &KeyType ) -> Result<Option<ErasedKey>>
key_spec. Read moresource§fn insert(
&self,
key: &dyn EncodableKey,
key_spec: &dyn KeySpecifier,
key_type: &KeyType
) -> Result<()>
fn insert( &self, key: &dyn EncodableKey, key_spec: &dyn KeySpecifier, key_type: &KeyType ) -> Result<()>
key to the key store.Auto Trait Implementations§
impl RefUnwindSafe for ArtiNativeKeystore
impl Send for ArtiNativeKeystore
impl Sync for ArtiNativeKeystore
impl Unpin for ArtiNativeKeystore
impl UnwindSafe for ArtiNativeKeystore
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.