pub trait DeviceIdentityCustody: Send + Sync {
// Required methods
fn unlock(&self) -> Result<Option<UserKeypair>, KeyError>;
fn persist(&self, keypair: &UserKeypair) -> Result<(), KeyError>;
fn forget(&self) -> Result<(), KeyError>;
// Provided method
fn establish(&self, keypair: &UserKeypair) -> Result<(), KeyError> { ... }
}Expand description
Custody of the Store identity used by this installation: who unlocks it,
where an established identity is written, and how it is removed. Selected
per Store, like MasterKeyCustody, but retains a UserKeypair instead
of the Store’s encryption keyring.
Required Methods§
Sourcefn unlock(&self) -> Result<Option<UserKeypair>, KeyError>
fn unlock(&self) -> Result<Option<UserKeypair>, KeyError>
This store’s established signing identity. Ok(None) means none has
ever been established — distinct from a failure to produce one (wrong
passphrase, unreadable backing store), which is Err.