pub struct LinuxKeyutilsStore { /* private fields */ }Expand description
A second, independently-selectable KeyStore backend — proof that
the trait boundary is genuinely overridable, not merely declared to be:
the kernel’s own keyutils facility, no D-Bus/secret-service daemon
required. This is what KeyringStore’s underlying keyring
dependency itself recommends for headless Linux (containers, CI, a
sandboxed dev box with no gnome-keyring/kwalletd running) — see
linux-keyutils-keyring-store’s own module doc, which states this
outright.
Deliberately does NOT go through keyring’s own v1::Entry/
keyring_core::set_default_store (a process-global) — doing so would
silently fight KeyringStore’s own default-store selection if both
were ever constructed in the same process, with whichever initializes
first winning. Instead this holds its own Store instance and asks it
directly for a credential via CredentialStoreApi::build, which never
touches the global default at all.
Implementations§
Trait Implementations§
Source§impl KeyStore for LinuxKeyutilsStore
Available on Linux only.
impl KeyStore for LinuxKeyutilsStore
Source§fn save_key(&self, key: &[u8]) -> Result<(), KeyStoreError>
fn save_key(&self, key: &[u8]) -> Result<(), KeyStoreError>
key, overwriting any value already stored under this
store’s identity.Source§fn load_key(&self) -> Result<Zeroizing<Vec<u8>>, KeyStoreError>
fn load_key(&self) -> Result<Zeroizing<Vec<u8>>, KeyStoreError>
save_keyd key.
KeyStoreError::NotFound if nothing has been stored yet.Source§fn delete_key(&self) -> Result<(), KeyStoreError>
fn delete_key(&self) -> Result<(), KeyStoreError>
save_key (which overwrites), only for
deliberately forgetting an identity.