Crate openpgp_piv_sequoia
source ·Expand description
Library for PIV HSM usage with Sequoia PGP.
Example use, performing an OpenPGP decryption operation on a PIV device:
use openpgp_piv_sequoia::Opiv;
use sequoia_openpgp::{parse::Parse, Cert};
use yubikey::piv::SlotId;
let mut opiv = Opiv::open(16019180)?;
opiv.verify_pin("123456".as_bytes())?;
let cert = Cert::from_file("example-cert.asc")?;
opiv.decrypt(
SlotId::KeyManagement,
&mut std::io::stdin(),
&mut std::io::stdout(),
cert,
)?;
Structs
- OpenPGP PIV device
- PIV implementation of
sequoia_openpgp::crypto::Signer
andsequoia_openpgp::crypto::Decryptor
.