Function sequoia_net::pks::unlock_signer
source · pub fn unlock_signer(
store_uri: impl AsRef<str>,
key: Key<PublicParts, UnspecifiedRole>,
p: &Password
) -> Result<Box<dyn Signer + Send + Sync>>
Expand description
Unlock a remote key for signing.
Look up a private key corresponding to the public key passed as a
parameter and return a Signer
trait object that will utilize
that private key for signing.
Errors
This function fails if the key cannot be found on the remote store or if the password is not correct.
Examples
use sequoia_net::pks;
match pks::unlock_signer("http://localhost:3000/", key, &p) {
Ok(signer) => { /* use signer for signing */ },
Err(e) => { eprintln!("Could not unlock signer: {:?}", e); }
}