From cab27418a20ecb42a0084073051b405648cb100b Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 15 Apr 2020 11:57:17 +0200 Subject: 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. --- openpgp/src/cert/mod.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'openpgp') 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(&self, policy: &dyn Policy, t: T) - -> Result<&Signature> - where T: Into> - { - 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. -- cgit v1.2.3