diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2022-04-21 13:24:02 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-04-21 14:13:44 +0200 |
commit | eb9b87a96f6b15a91ec0fd3dfad80bb97d18e4f5 (patch) | |
tree | a2257f3b331384fdd733d507124615e151429798 /ipc/examples | |
parent | ec5755545f7ce2e886ee5f1346df08015d229e31 (diff) |
ipc: Provide a password prompt to pinentry.
Diffstat (limited to 'ipc/examples')
-rw-r--r-- | ipc/examples/gpg-agent-sign.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipc/examples/gpg-agent-sign.rs b/ipc/examples/gpg-agent-sign.rs index e2445107..b3204ec9 100644 --- a/ipc/examples/gpg-agent-sign.rs +++ b/ipc/examples/gpg-agent-sign.rs @@ -38,10 +38,13 @@ fn main() -> openpgp::Result<()> { ).collect::<Result<Vec<_>, _>>()?; // Construct a KeyPair for every signing-capable (sub)key. + use openpgp::cert::amalgamation::ValidAmalgamation; let mut signers = certs.iter().flat_map(|cert| { cert.keys().with_policy(p, None).alive().revoked(false).for_signing() .filter_map(|ka| { - KeyPair::new(&ctx, ka.key()).ok() + KeyPair::new(&ctx, ka.key()) + .map(|kp| kp.with_cert(ka.cert())) + .ok() }) }).collect::<Vec<KeyPair>>(); |