Struct signatory::FsKeyStore

source ·
pub struct FsKeyStore { /* private fields */ }
Available on crate feature std only.
Expand description

Filesystem-backed keystore.

Implementations§

source§

impl FsKeyStore

source

pub fn create_or_open(dir_path: &Path) -> Result<Self>

Attempt to open a filesystem-backed keystore at the given path, creating it if it doesn’t already exist.

source

pub fn create(dir_path: &Path) -> Result<Self>

Create a filesystem-backed keystore at the given path, making a new directory and setting its file permissions.

source

pub fn open(dir_path: &Path) -> Result<Self>

Initialize filesystem-backed keystore, opening the directory at the provided path and checking that it has the correct filesystem permissions.

source

pub fn info(&self, name: &KeyName) -> Result<KeyInfo>

Get information about a key with the given name.

source

pub fn import( &self, name: &KeyName, key_ring: &mut KeyRing ) -> Result<KeyHandle>

Import a key with a given name into the provided keyring.

source

pub fn load(&self, name: &KeyName) -> Result<SecretDocument>

Load a PKCS#8 key from the keystore.

source

pub fn store(&self, name: &KeyName, der: &SecretDocument) -> Result<()>

Import a PKCS#8 key into the keystore.

source

pub fn delete(&self, name: &KeyName) -> Result<()>

Delete a PKCS#8 key from the keystore.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.