summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-04-07 13:42:03 +0200
committerNeal H. Walfield <neal@pep.foundation>2020-04-07 13:42:03 +0200
commit38eab42143318a622759dc98a5cc5ecd5df9b9b4 (patch)
tree27c15a0ef5fe73491c8efdb66e5e2714e4e186fc
parentad365cf87e3b45b34600b3f5eb4390ad940ee077 (diff)
openpgp: Remove convenience methods that don't improve convenience
- Remove `ValidAmalgamation::cert_revoked` and `ValidAmalgamation::cert_alive`, which don't offer any convenience over `ValidAmalgamation::cert().revoked()` and `ValidAmalgamation::cert().alive()`.
-rw-r--r--openpgp/src/cert/amalgamation.rs12
-rw-r--r--openpgp/src/parse/stream.rs4
2 files changed, 2 insertions, 14 deletions
diff --git a/openpgp/src/cert/amalgamation.rs b/openpgp/src/cert/amalgamation.rs
index f9a06d94..9a2620bc 100644
--- a/openpgp/src/cert/amalgamation.rs
+++ b/openpgp/src/cert/amalgamation.rs
@@ -168,18 +168,6 @@ pub trait ValidAmalgamation<'a, C: 'a>
/// Note: this does not return whether the certificate is valid.
fn revoked(&self) -> RevocationStatus<'a>;
- /// Returns the certificate's revocation status as of the
- /// amalgamation's reference time.
- fn cert_revoked(&self) -> RevocationStatus<'a> {
- self.cert().revoked()
- }
-
- /// Returns whether the certificate is alive as of the
- /// amalgamation's reference time.
- fn cert_alive(&self) -> Result<()> {
- self.cert().alive()
- }
-
/// Maps the given function over binding and direct key signature.
///
/// Makes `f` consider both the binding signature and the direct
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs
index 865912c8..5ed3cae8 100644
--- a/openpgp/src/parse/stream.rs
+++ b/openpgp/src/parse/stream.rs
@@ -1382,7 +1382,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
}
};
- err = if let Err(err) = ka.cert_alive() {
+ err = if let Err(err) = ka.cert().alive() {
t!("{:02X}{:02X}: cert {} not alive: {}",
sigid[0], sigid[1], ka.cert().fingerprint(), err);
VerificationError::BadKey {
@@ -1399,7 +1399,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
error: err,
}
} else if let
- RevocationStatus::Revoked(rev) = ka.cert_revoked()
+ RevocationStatus::Revoked(rev) = ka.cert().revoked()
{
t!("{:02X}{:02X}: cert {} revoked: {:?}",
sigid[0], sigid[1], ka.cert().fingerprint(), rev);