summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-04-15 11:57:17 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-04-15 15:48:23 +0200
commitcab27418a20ecb42a0084073051b405648cb100b (patch)
treedc6c64968f8450a12349cb99b6a340a88c9b39a0 /openpgp
parentd4717c4ac1febd0e79ab284c4982e2cc1c5fb781 (diff)
openpgp: Drop Cert::direct_key_signature.
- Methods on Cert should not take a policy. Instead, the corresponding method on ValidCert should be used. - See #484.
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/cert/mod.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs
index bcc0ee16..c228b03c 100644
--- a/openpgp/src/cert/mod.rs
+++ b/openpgp/src/cert/mod.rs
@@ -675,18 +675,6 @@ impl Cert {
PrimaryKeyAmalgamation::new(&self)
}
- /// Returns the Certificate's direct key signature as of the
- /// reference time, if any.
- ///
- /// Subpackets on direct key signatures apply to all components of
- /// the certificate.
- pub fn direct_key_signature<T>(&self, policy: &dyn Policy, t: T)
- -> Result<&Signature>
- where T: Into<Option<time::SystemTime>>
- {
- self.primary.binding_signature(policy, t)
- }
-
/// Returns the Cert's revocation status at time `t`.
///
/// A Cert is revoked at time `t` if:
@@ -1655,7 +1643,7 @@ impl<'a> ValidCert<'a> {
/// the certificate.
pub fn direct_key_signature(&self) -> Result<&'a Signature>
{
- self.cert.direct_key_signature(self.policy(), self.time())
+ self.cert.primary.binding_signature(self.policy(), self.time())
}
/// Returns the Cert's revocation status.