summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/examples/encrypt-for.c
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-12-20 14:22:09 +0100
committerNeal H. Walfield <neal@pep.foundation>2019-12-20 14:22:09 +0100
commitf078f93025b517609d25ce2cb2ebc41a01d81190 (patch)
tree32766c92a0a6e7877b538d373cced9c9f0a97019 /openpgp-ffi/examples/encrypt-for.c
parentb3ba97146f534ac5cf67db7f72d8a633112d0a18 (diff)
openpgp: Simplify key iteration interface.
- Cert::keys_valid() is just a short-cut for Cert::keys_all().alive().revoked(false). - Remove Cert::keys_valid() and rename Cert::keys_all() to Cert::keys().
Diffstat (limited to 'openpgp-ffi/examples/encrypt-for.c')
-rw-r--r--openpgp-ffi/examples/encrypt-for.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp-ffi/examples/encrypt-for.c b/openpgp-ffi/examples/encrypt-for.c
index 8303f8ee..65bd8a45 100644
--- a/openpgp-ffi/examples/encrypt-for.c
+++ b/openpgp-ffi/examples/encrypt-for.c
@@ -36,7 +36,9 @@ main (int argc, char **argv)
if (cert == NULL)
error (1, 0, "pgp_cert_from_file: %s", pgp_error_to_string (err));
- pgp_cert_key_iter_t iter = pgp_cert_key_iter_valid (cert);
+ pgp_cert_key_iter_t iter = pgp_cert_key_iter (cert);
+ pgp_cert_key_iter_alive (iter);
+ pgp_cert_key_iter_revoked (iter, false);
pgp_cert_key_iter_for_storage_encryption (iter);
pgp_cert_key_iter_for_transport_encryption (iter);
size_t recipients_len;