diff options
author | Neal H. Walfield <neal@pep.foundation> | 2019-12-20 14:22:09 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-12-20 14:22:09 +0100 |
commit | f078f93025b517609d25ce2cb2ebc41a01d81190 (patch) | |
tree | 32766c92a0a6e7877b538d373cced9c9f0a97019 /openpgp-ffi/include | |
parent | b3ba97146f534ac5cf67db7f72d8a633112d0a18 (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/include')
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp.h | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp.h b/openpgp-ffi/include/sequoia/openpgp.h index 4d6d8416..4468ccb5 100644 --- a/openpgp-ffi/include/sequoia/openpgp.h +++ b/openpgp-ffi/include/sequoia/openpgp.h @@ -912,30 +912,9 @@ pgp_user_id_binding_iter_t pgp_cert_user_id_binding_iter (pgp_cert_t cert); /// Returns an iterator over all `Key`s in a Cert. /// /// That is, this returns an iterator over the primary key and any -/// subkeys, along with the corresponding signatures. -/// -/// Note: since a primary key is different from a subkey, the iterator -/// is over `Key`s and not `SubkeyBindings`. Since the primary key -/// has no binding signature, the signature carrying the primary key's -/// key flags is returned (either a direct key signature, or the -/// self-signature on the primary User ID). There are corner cases -/// where no such signature exists (e.g. partial Certs), therefore this -/// iterator may return `None` for the primary key's signature. -/// -/// A valid `Key` has at least one good self-signature. -/// -/// Compare with `pgp_cert_key_iter_valid`, which filters out expired and -/// revoked keys. -/*/ -pgp_cert_key_iter_t pgp_cert_key_iter_all (pgp_cert_t cert); - -/*/ -/// Returns an iterator over the live and unrevoked `Key`s in a Cert. -/// -/// Compare with `pgp_cert_key_iter_all`, which doesn't filter out -/// expired and revoked keys by default. +/// subkeys. /*/ -pgp_cert_key_iter_t pgp_cert_key_iter_valid (pgp_cert_t cert); +pgp_cert_key_iter_t pgp_cert_key_iter (pgp_cert_t cert); /*/ /// Returns the Cert's primary user id (if any). |