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 /sqv/src | |
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 'sqv/src')
-rw-r--r-- | sqv/src/sqv.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sqv/src/sqv.rs b/sqv/src/sqv.rs index b73592f6..ac78c8c5 100644 --- a/sqv/src/sqv.rs +++ b/sqv/src/sqv.rs @@ -155,7 +155,7 @@ fn real_main() -> Result<(), failure::Error> { fn cert_has_key(cert: &Cert, keyid: &KeyID) -> bool { // Even if a key is revoked or expired, we can still use it to // verify a message. - cert.keys_all().any(|ka| *keyid == ka.key().keyid()) + cert.keys().any(|ka| *keyid == ka.key().keyid()) } // Find the certs. @@ -233,7 +233,7 @@ fn real_main() -> Result<(), failure::Error> { if let Some(cert) = certs.get(&issuer.clone().into()) { let cert = cert.borrow(); // Find the right key. - for ka in cert.keys_all() { + for ka in cert.keys() { // Use the current binding signature. let binding = match ka.binding_signature(None) { Some(b) => b, |