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,
item_type: &KeystoreItemType,
) -> Result<bool>
fn contains( &self, key_spec: &dyn KeySpecifier, item_type: &KeystoreItemType, ) -> Result<bool>
key_spec exists in this key store.Source§fn get(
&self,
key_spec: &dyn KeySpecifier,
item_type: &KeystoreItemType,
) -> Result<Option<ErasedKey>>
fn get( &self, key_spec: &dyn KeySpecifier, item_type: &KeystoreItemType, ) -> Result<Option<ErasedKey>>
key_spec. Read moreSource§fn insert(
&self,
key: &dyn EncodableItem,
key_spec: &dyn KeySpecifier,
item_type: &KeystoreItemType,
) -> Result<()>
fn insert( &self, key: &dyn EncodableItem, key_spec: &dyn KeySpecifier, item_type: &KeystoreItemType, ) -> Result<()>
key to the key store.Source§fn remove(
&self,
key_spec: &dyn KeySpecifier,
item_type: &KeystoreItemType,
) -> Result<Option<()>>
fn remove( &self, key_spec: &dyn KeySpecifier, item_type: &KeystoreItemType, ) -> Result<Option<()>>
Auto Trait Implementations§
impl Freeze for ArtiNativeKeystore
impl RefUnwindSafe for ArtiNativeKeystore
impl Send for ArtiNativeKeystore
impl Sync for ArtiNativeKeystore
impl Unpin for ArtiNativeKeystore
impl UnwindSafe for ArtiNativeKeystore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more