Struct sequoia_octopus_librnp::keystore::Keystore
source · pub struct Keystore { /* private fields */ }
Implementations§
source§impl Keystore
impl Keystore
pub fn start_parcimonie(&mut self, policy: StandardPolicy<'static>)
pub fn enable_wot(&mut self, policy: &StandardPolicy<'static>) -> Result<()>
pub fn update_wot(&mut self, policy: &StandardPolicy<'static>) -> Result<()>
pub fn create_ref(&self) -> Arc<RwLock<KeystoreData>>
pub fn read(&self) -> RwLockReadGuard<'_, KeystoreData>
pub fn write(&self) -> RwLockWriteGuard<'_, KeystoreData>
sourcepub fn key_on_agent(&self, key: &Fingerprint) -> bool
pub fn key_on_agent(&self, key: &Fingerprint) -> bool
Returns whether the key appears to be on the gpg agent.
This is at most a few seconds out of date.
pub fn set_directory(&mut self, directory: PathBuf)
sourcepub fn load_gpg_keyring(
&mut self,
policy: Arc<RwLock<StandardPolicy<'static>>>
) -> Result<()>
pub fn load_gpg_keyring( &mut self, policy: Arc<RwLock<StandardPolicy<'static>>> ) -> Result<()>
Load the gpg keyring into the keystore.
Parse and load a keyring. If this encounters some corruption in the keyring and is able to recover, it does not report an error.
This also starts a thread to monitor the gpg store. This imports updates from the gpg keyring (XXX: but not removals!).
sourcepub fn load_keyring_in_background(
&mut self,
keyring: Vec<u8>,
import_secret_keys: bool,
policy: Arc<RwLock<StandardPolicy<'static>>>
) -> Result<()>
pub fn load_keyring_in_background( &mut self, keyring: Vec<u8>, import_secret_keys: bool, policy: Arc<RwLock<StandardPolicy<'static>>> ) -> Result<()>
Loads the specified keyring in the background.
If import_secret_keys is true, then it also imports any secret key material. Otherwise, secret key material is stripped.
sourcepub fn block_on_load(&mut self) -> Result<bool>
pub fn block_on_load(&mut self) -> Result<bool>
Blocks the current thread until any keyrings that are being loaded in the background have been loaded.
This includes the initial load of the gpg keyring, and any
keyrings added via Keystore::load_keyring_in_background
.
Returns whether we blocked.