diff options
Diffstat (limited to 'openpgp/examples/encrypt-for.rs')
-rw-r--r-- | openpgp/examples/encrypt-for.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp/examples/encrypt-for.rs b/openpgp/examples/encrypt-for.rs index eceec5b3..93eba5b5 100644 --- a/openpgp/examples/encrypt-for.rs +++ b/openpgp/examples/encrypt-for.rs @@ -37,7 +37,9 @@ fn main() { // Build a vector of recipients to hand to Encryptor. let mut recipients = certs.iter() - .flat_map(|cert| cert.keys_valid().key_flags(mode.clone())) + .flat_map(|cert| { + cert.keys().alive().revoked(false).key_flags(mode.clone()) + }) .map(|ka| ka.key().into()) .collect::<Vec<_>>(); |