diff options
author | Neal H. Walfield <neal@pep.foundation> | 2020-04-27 13:41:48 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-04-28 08:32:40 +0200 |
commit | 22a777c7c5db1d35642bfb9d2ab44b4833937956 (patch) | |
tree | 2f6ff41f3034ac48b642ed3280b1b2d5f02ebcf6 | |
parent | 313c9ef9774c20d6e3dfe1f53ad3fdc7181c60dd (diff) |
openpgp: Rename Cert::revoked, etc. to revocation_status
- Rename `Cert::revoked`, `ValidCert::revoked`,
`ValidAmalgamation::revoked`, and `ComponentBundle::revoked` to
revocation_status to more accurately match what it does.
- Don't rename `ValidComponentAmalgamationIter::revoked` or
`ValidKeyAmalgamationIter::revoked`. They don't return the
revocation status; they check whether the key is revoked.
-rw-r--r-- | autocrypt/src/lib.rs | 2 | ||||
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp.h | 4 | ||||
-rw-r--r-- | openpgp-ffi/src/amalgamation.rs | 2 | ||||
-rw-r--r-- | openpgp-ffi/src/cert.rs | 10 | ||||
-rw-r--r-- | openpgp-ffi/src/key_amalgamation.rs | 2 | ||||
-rw-r--r-- | openpgp-ffi/src/parse/stream.rs | 4 | ||||
-rw-r--r-- | openpgp/src/cert/amalgamation.rs | 18 | ||||
-rw-r--r-- | openpgp/src/cert/amalgamation/iter.rs | 6 | ||||
-rw-r--r-- | openpgp/src/cert/amalgamation/key.rs | 22 | ||||
-rw-r--r-- | openpgp/src/cert/amalgamation/key/iter.rs | 14 | ||||
-rw-r--r-- | openpgp/src/cert/builder.rs | 4 | ||||
-rw-r--r-- | openpgp/src/cert/bundle.rs | 28 | ||||
-rw-r--r-- | openpgp/src/cert/mod.rs | 82 | ||||
-rw-r--r-- | openpgp/src/cert/revoke.rs | 10 | ||||
-rw-r--r-- | openpgp/src/packet_pile.rs | 4 | ||||
-rw-r--r-- | openpgp/src/parse/stream.rs | 4 | ||||
-rw-r--r-- | openpgp/src/policy.rs | 16 | ||||
-rw-r--r-- | openpgp/src/serialize/cert_armored.rs | 2 | ||||
-rw-r--r-- | tool/src/commands/inspect.rs | 8 |
19 files changed, 122 insertions, 120 deletions
diff --git a/autocrypt/src/lib.rs b/autocrypt/src/lib.rs index 64b7fa58..479aeb8d 100644 --- a/autocrypt/src/lib.rs +++ b/autocrypt/src/lib.rs @@ -120,7 +120,7 @@ impl AutocryptHeader { // The subkeys and the most recent selfsig. for skb in cert.keys().with_policy(policy, None).subkeys() { // Skip if revoked. - if let RevocationStatus::Revoked(_) = skb.revoked() { + if let RevocationStatus::Revoked(_) = skb.revocation_status() { continue; } diff --git a/openpgp-ffi/include/sequoia/openpgp.h b/openpgp-ffi/include/sequoia/openpgp.h index e0657812..42591a4a 100644 --- a/openpgp-ffi/include/sequoia/openpgp.h +++ b/openpgp-ffi/include/sequoia/openpgp.h @@ -954,8 +954,8 @@ pgp_key_t pgp_cert_primary_key (pgp_cert_t cert); /// If `when` is 0, then returns the Cert's revocation status as of the /// time of the call. /*/ -pgp_revocation_status_t pgp_cert_revoked (pgp_cert_t cert, - pgp_policy_t policy, time_t when); +pgp_revocation_status_t pgp_cert_revocation_status (pgp_cert_t cert, + pgp_policy_t policy, time_t when); /*/ /// Writes a revocation certificate to the writer. diff --git a/openpgp-ffi/src/amalgamation.rs b/openpgp-ffi/src/amalgamation.rs index c737da0c..7f75751d 100644 --- a/openpgp-ffi/src/amalgamation.rs +++ b/openpgp-ffi/src/amalgamation.rs @@ -77,7 +77,7 @@ pub extern "C" fn pgp_valid_user_id_amalgamation_revocation_status<'a>(ua: *cons -> *mut RevocationStatus<'a> { ua.ref_raw() - .revoked() + .revocation_status() .move_into_raw() } diff --git a/openpgp-ffi/src/cert.rs b/openpgp-ffi/src/cert.rs index d51d29ad..3237e126 100644 --- a/openpgp-ffi/src/cert.rs +++ b/openpgp-ffi/src/cert.rs @@ -159,12 +159,12 @@ fn pgp_cert_primary_key(cert: *const Cert) -> *const Key { /// If `when` is 0, then returns the Cert's revocation status as of the /// time of the call. #[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" -fn pgp_cert_revoked(cert: *const Cert, policy: *const Policy, when: time_t) +fn pgp_cert_revocation_status(cert: *const Cert, policy: *const Policy, when: time_t) -> *mut RevocationStatus<'static> { let policy = &**policy.ref_raw(); cert.ref_raw() - .revoked(policy, maybe_time(when)) + .revocation_status(policy, maybe_time(when)) .move_into_raw() } @@ -222,7 +222,7 @@ fn int_to_reason_for_revocation(code: c_int) -> ReasonForRevocation { /// cert = pgp_cert_merge_packets (NULL, cert, &packet, 1); /// assert (cert); /// -/// pgp_revocation_status_t rs = pgp_cert_revoked (cert, policy, 0); +/// pgp_revocation_status_t rs = pgp_cert_revocation_status (cert, policy, 0); /// assert (pgp_revocation_status_variant (rs) == PGP_REVOCATION_STATUS_REVOKED); /// pgp_revocation_status_free (rs); /// @@ -290,7 +290,7 @@ fn pgp_cert_revoke(errp: Option<&mut *mut crate::error::Error>, /// pgp_signer_free (primary_signer); /// pgp_key_pair_free (primary_keypair); /// -/// pgp_revocation_status_t rs = pgp_cert_revoked (cert, policy, 0); +/// pgp_revocation_status_t rs = pgp_cert_revocation_status (cert, policy, 0); /// assert (pgp_revocation_status_variant (rs) == PGP_REVOCATION_STATUS_REVOKED); /// pgp_revocation_status_free (rs); /// @@ -837,7 +837,7 @@ pub extern "C" fn pgp_cert_valid_key_iter_next<'a>( if let Some(ka) = iter_wrapper.iter.as_mut().unwrap().next() { let sig = ka.binding_signature(); - let rs = ka.revoked(); + let rs = ka.revocation_status(); if let Some(ptr) = sigo { *ptr = sig.move_into_raw(); diff --git a/openpgp-ffi/src/key_amalgamation.rs b/openpgp-ffi/src/key_amalgamation.rs index 1c5ff534..0b661533 100644 --- a/openpgp-ffi/src/key_amalgamation.rs +++ b/openpgp-ffi/src/key_amalgamation.rs @@ -83,7 +83,7 @@ pub extern "C" fn pgp_valid_key_amalgamation_revocation_status<'a>(ka: *const Va -> *mut RevocationStatus<'a> { ka.ref_raw() - .revoked() + .revocation_status() .move_into_raw() } diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs index fab833c9..9e23cb47 100644 --- a/openpgp-ffi/src/parse/stream.rs +++ b/openpgp-ffi/src/parse/stream.rs @@ -216,7 +216,7 @@ fn pgp_verification_result_good_checksum<'a>( ka.binding_signature().move_into_raw(); } if let Some(mut p) = revocation_status_r { - *unsafe { p.as_mut() } = ka.revoked().move_into_raw(); + *unsafe { p.as_mut() } = ka.revocation_status().move_into_raw(); } true } else { @@ -344,7 +344,7 @@ fn $fn_name<'a>( ka.binding_signature().move_into_raw(); } if let Some(mut p) = revocation_status_r { - *unsafe { p.as_mut() } = ka.revoked().move_into_raw(); + *unsafe { p.as_mut() } = ka.revocation_status().move_into_raw(); } if let Some(mut p) = error_r { *unsafe { p.as_mut() } = error.move_into_raw(); diff --git a/openpgp/src/cert/amalgamation.rs b/openpgp/src/cert/amalgamation.rs index 2e0ddbaf..8f887166 100644 --- a/openpgp/src/cert/amalgamation.rs +++ b/openpgp/src/cert/amalgamation.rs @@ -531,7 +531,7 @@ pub trait ValidAmalgamation<'a, C: 'a> /// reference time. /// /// This does *not* check whether the certificate has been - /// revoked. For that, use `Cert::revoked()`. + /// revoked. For that, use `Cert::revocation_status()`. /// /// Note, as per [RFC 4880], a key is considered to be revoked at /// some time if there were no soft revocations created as of that @@ -558,7 +558,7 @@ pub trait ValidAmalgamation<'a, C: 'a> /// # .generate()?; /// # let cert = cert.with_policy(p, None)?; /// # let ua = cert.userids().nth(0).expect("User IDs"); - /// match ua.revoked() { + /// match ua.revocation_status() { /// RevocationStatus::Revoked(revs) => { /// // The certificate holder revoked the User ID. /// # unreachable!(); @@ -577,7 +577,7 @@ pub trait ValidAmalgamation<'a, C: 'a> /// # Ok(()) /// # } /// ``` - fn revoked(&self) -> RevocationStatus<'a>; + fn revocation_status(&self) -> RevocationStatus<'a>; } /// A certificate component, its associated data, and useful methods. @@ -1020,7 +1020,7 @@ impl<'a> UserAttributeAmalgamation<'a> { /// // that there is a valid *binding signature*, not that the /// // `ComponentAmalgamation` is valid. /// // -/// // Note: `ValidComponentAmalgamation::revoked` and +/// // Note: `ValidComponentAmalgamation::revocation_status` and /// // `Preferences::preferred_symmetric_algorithms` use the /// // embedded policy and timestamp. Even though we used `None` for /// // the timestamp (i.e., now), they are guaranteed to use the same @@ -1030,7 +1030,7 @@ impl<'a> UserAttributeAmalgamation<'a> { /// // Note: we only check whether the User ID is not revoked. If /// // we were using a key, we'd also want to check that it is alive. /// // (Keys can expire, but User IDs cannot.) -/// if let RevocationStatus::Revoked(_revs) = u.revoked() { +/// if let RevocationStatus::Revoked(_revs) = u.revocation_status() { /// // Revoked by the key owner. (If we care about /// // designated revokers, then we need to check those /// // ourselves.) @@ -1167,7 +1167,7 @@ impl<'a, C> ValidComponentAmalgamation<'a, C> }, }?; - let revoked = c._revoked(policy, t, false, Some(sig)); + let revoked = c._revocation_status(policy, t, false, Some(sig)); let primary = sig.primary_userid().unwrap_or(false); let signature_creation_time = match sig.signature_creation_time() { Some(time) => Some(time), @@ -1255,9 +1255,9 @@ impl<'a, C> ValidAmalgamation<'a, C> for ValidComponentAmalgamation<'a, C> { self.binding_signature } - fn revoked(&self) -> RevocationStatus<'a> { - self.bundle._revoked(self.policy(), self.cert.time, - false, Some(self.binding_signature)) + fn revocation_status(&self) -> RevocationStatus<'a> { + self.bundle._revocation_status(self.policy(), self.cert.time, + false, Some(self.binding_signature)) } } diff --git a/openpgp/src/cert/amalgamation/iter.rs b/openpgp/src/cert/amalgamation/iter.rs index 612e38e2..44a36a14 100644 --- a/openpgp/src/cert/amalgamation/iter.rs +++ b/openpgp/src/cert/amalgamation/iter.rs @@ -290,7 +290,7 @@ impl<'a, C> Iterator for ValidComponentAmalgamationIter<'a, C> }; if let Some(want_revoked) = self.revoked { - if let RevocationStatus::Revoked(_) = vca.revoked() { + if let RevocationStatus::Revoked(_) = vca.revocation_status() { // The component is definitely revoked. if ! want_revoked { t!("Component revoked... skipping."); @@ -351,7 +351,7 @@ impl<'a, C> ValidComponentAmalgamationIter<'a, C> { /// .user_attributes() /// .with_policy(p, timestamp) /// .filter(|ca| { - /// match ca.revoked() { + /// match ca.revocation_status() { /// RevocationStatus::Revoked(_) => /// // It's definitely revoked, skip it. /// false, @@ -374,7 +374,7 @@ impl<'a, C> ValidComponentAmalgamationIter<'a, C> { /// ``` /// /// As the example shows, this filter is significantly less - /// flexible than using `ValidComponentAmalgamation::revoked`. + /// flexible than using `ValidComponentAmalgamation::revocation_status`. /// However, this filter implements a typical policy, and does not /// preclude using `filter` to realize alternative policies. /// diff --git a/openpgp/src/cert/amalgamation/key.rs b/openpgp/src/cert/amalgamation/key.rs index 86061173..f282b7bb 100644 --- a/openpgp/src/cert/amalgamation/key.rs +++ b/openpgp/src/cert/amalgamation/key.rs @@ -97,7 +97,7 @@ //! //! let cert = cert.with_policy(p, None)?; //! -//! if let RevocationStatus::Revoked(_) = cert.revoked() { +//! if let RevocationStatus::Revoked(_) = cert.revocation_status() { //! // The certificate is revoked, don't use any keys from it. //! # unreachable!(); //! } else if let Err(_) = cert.alive() { @@ -105,7 +105,7 @@ //! # unreachable!(); //! } else { //! for ka in cert.keys() { -//! if let RevocationStatus::Revoked(_) = ka.revoked() { +//! if let RevocationStatus::Revoked(_) = ka.revocation_status() { //! // The key is revoked. //! # unreachable!(); //! } else if let Err(_) = ka.alive() { @@ -157,7 +157,7 @@ //! # let issuer = cert.fingerprint(); //! # let mut i = 0; //! let cert = cert.with_policy(p, timestamp)?; -//! if let RevocationStatus::Revoked(_) = cert.revoked() { +//! if let RevocationStatus::Revoked(_) = cert.revocation_status() { //! // The certificate is revoked, don't use any keys from it. //! # unreachable!(); //! } else if let Err(_) = cert.alive() { @@ -165,7 +165,7 @@ //! # unreachable!(); //! } else { //! for ka in cert.keys().key_handle(issuer) { -//! if let RevocationStatus::Revoked(_) = ka.revoked() { +//! if let RevocationStatus::Revoked(_) = ka.revocation_status() { //! // The key is revoked, don't use it! //! # unreachable!(); //! } else if let Err(_) = ka.alive() { @@ -860,13 +860,13 @@ impl<'a, P, R, R2> KeyAmalgamation<'a, P, R, R2> /// // need to check that the certificate and `Key` are not revoked, /// // and live. /// // -/// // Note: `ValidKeyAmalgamation::revoked`, etc. use the +/// // Note: `ValidKeyAmalgamation::revocation_status`, etc. use the /// // embedded policy and timestamp. Even though we used `None` for /// // the timestamp (i.e., now), they are guaranteed to use the same /// // timestamp, because `with_policy` eagerly transforms it into /// // the current time. /// let cert = cert.with_policy(p, None)?; -/// if let RevocationStatus::Revoked(_revs) = cert.revoked() { +/// if let RevocationStatus::Revoked(_revs) = cert.revocation_status() { /// // Revoked by the certificate holder. (If we care about /// // designated revokers, then we need to check those /// // ourselves.) @@ -877,7 +877,7 @@ impl<'a, P, R, R2> KeyAmalgamation<'a, P, R, R2> /// } else { /// // `ValidCert::keys` returns `ValidKeyAmalgamation`s. /// for ka in cert.keys() { -/// if let RevocationStatus::Revoked(_revs) = ka.revoked() { +/// if let RevocationStatus::Revoked(_revs) = ka.revocation_status() { /// // Revoked by the key owner. (If we care about /// // designated revokers, then we need to check those /// // ourselves.) @@ -1154,12 +1154,12 @@ impl<'a, P, R, R2> ValidAmalgamation<'a, Key<P, R>> self.binding_signature } - fn revoked(&self) -> RevocationStatus<'a> { + fn revocation_status(&self) -> RevocationStatus<'a> { if self.primary() { - self.cert.revoked() + self.cert.revocation_status() } else { - self.bundle()._revoked(self.policy(), self.time(), - true, Some(self.binding_signature)) + self.bundle()._revocation_status(self.policy(), self.time(), + true, Some(self.binding_signature)) } } } diff --git a/openpgp/src/cert/amalgamation/key/iter.rs b/openpgp/src/cert/amalgamation/key/iter.rs index 4911fbcd..28efdfb0 100644 --- a/openpgp/src/cert/amalgamation/key/iter.rs +++ b/openpgp/src/cert/amalgamation/key/iter.rs @@ -535,7 +535,7 @@ impl<'a, P, R> KeyAmalgamationIter<'a, P, R> /// // The certificate *and* keys need to be valid. /// let cert = cert.with_policy(p, None)?; /// -/// if let RevocationStatus::Revoked(_) = cert.revoked() { +/// if let RevocationStatus::Revoked(_) = cert.revocation_status() { /// // Certificate is revoked. /// } else if let Err(_err) = cert.alive() { /// // The certificate is not alive. @@ -746,7 +746,7 @@ impl<'a, P, R> ValidKeyAmalgamationIter<'a, P, R> } if let Some(want_revoked) = self.revoked { - if let RevocationStatus::Revoked(_) = ka.revoked() { + if let RevocationStatus::Revoked(_) = ka.revocation_status() { // The key is definitely revoked. if ! want_revoked { t!("Key revoked... skipping."); @@ -1216,7 +1216,7 @@ impl<'a, P, R> ValidKeyAmalgamationIter<'a, P, R> /// .keys() /// .with_policy(p, timestamp) /// .filter(|ka| { - /// match ka.revoked() { + /// match ka.revocation_status() { /// RevocationStatus::Revoked(_) => /// // It's definitely revoked, skip it. /// false, @@ -1240,10 +1240,10 @@ impl<'a, P, R> ValidKeyAmalgamationIter<'a, P, R> /// ``` /// /// As the example shows, this filter is significantly less - /// flexible than using `KeyAmalgamation::revoked`. However, this - /// filter implements a typical policy, and does not preclude - /// using something like `Iter::filter` to implement alternative - /// policies. + /// flexible than using `KeyAmalgamation::revocation_status`. + /// However, this filter implements a typical policy, and does not + /// preclude using something like `Iter::filter` to implement + /// alternative policies. pub fn revoked<T>(mut self, revoked: T) -> Self where T: Into<Option<bool>> { diff --git a/openpgp/src/cert/builder.rs b/openpgp/src/cert/builder.rs index d7ce99ef..7619e6d4 100644 --- a/openpgp/src/cert/builder.rs +++ b/openpgp/src/cert/builder.rs @@ -570,11 +570,11 @@ mod tests { let (cert, revocation) = CertBuilder::new() .set_cipher_suite(CipherSuite::Cv25519) .generate().unwrap(); - assert_eq!(cert.revoked(p, None), + assert_eq!(cert.revocation_status(p, None), RevocationStatus::NotAsFarAsWeKnow); let cert = cert.merge_packets(vec![revocation.clone().into()]).unwrap(); - assert_eq!(cert.revoked(p, None), + assert_eq!(cert.revocation_status(p, None), RevocationStatus::Revoked(vec![ &revocation ])); } diff --git a/openpgp/src/cert/bundle.rs b/openpgp/src/cert/bundle.rs index 54540831..28f61e1f 100644 --- a/openpgp/src/cert/bundle.rs +++ b/openpgp/src/cert/bundle.rs @@ -451,9 +451,9 @@ impl<C> ComponentBundle<C> { /// even if there is a newer self-signature). /// /// selfsig must be the newest live self signature at time `t`. - pub(crate) fn _revoked<'a, T>(&'a self, policy: &dyn Policy, t: T, - hard_revocations_are_final: bool, - selfsig: Option<&Signature>) + pub(crate) fn _revocation_status<'a, T>(&'a self, policy: &dyn Policy, t: T, + hard_revocations_are_final: bool, + selfsig: Option<&Signature>) -> RevocationStatus<'a> where T: Into<Option<time::SystemTime>> { @@ -464,7 +464,7 @@ impl<C> ComponentBundle<C> { = selfsig.and_then(|s| s.signature_creation_time()) .unwrap_or_else(time_zero); - tracer!(super::TRACE, "ComponentBundle::_revoked", 0); + tracer!(super::TRACE, "ComponentBundle::_revocation_status", 0); t!("hard_revocations_are_final: {}, selfsig: {:?}, t: {:?}", hard_revocations_are_final, selfsig_creation_time, @@ -658,16 +658,17 @@ impl<P: key::KeyParts> ComponentBundle<Key<P, key::SubordinateRole>> { /// // Display the subkeys' revocation status. /// for ka in cert.keys().subkeys() { /// eprintln!(" Revocation status of {}: {:?}", - /// ka.fingerprint(), ka.revoked(p, None)); + /// ka.fingerprint(), ka.revocation_status(p, None)); /// } /// # Ok(()) } /// ``` - pub fn revoked<T>(&self, policy: &dyn Policy, t: T) + pub fn revocation_status<T>(&self, policy: &dyn Policy, t: T) -> RevocationStatus where T: Into<Option<time::SystemTime>> { let t = t.into(); - self._revoked(policy, t, true, self.binding_signature(policy, t).ok()) + self._revocation_status(policy, t, true, + self.binding_signature(policy, t).ok()) } } @@ -729,16 +730,16 @@ impl ComponentBundle<UserID> { /// for ua in cert.userids() { /// eprintln!(" Revocation status of {}: {:?}", /// String::from_utf8_lossy(ua.userid().value()), - /// ua.revoked(p, None)); + /// ua.revocation_status(p, None)); /// } /// # Ok(()) } /// ``` - pub fn revoked<T>(&self, policy: &dyn Policy, t: T) + pub fn revocation_status<T>(&self, policy: &dyn Policy, t: T) -> RevocationStatus where T: Into<Option<time::SystemTime>> { let t = t.into(); - self._revoked(policy, t, false, self.binding_signature(policy, t).ok()) + self._revocation_status(policy, t, false, self.binding_signature(policy, t).ok()) } } @@ -799,16 +800,17 @@ impl ComponentBundle<UserAttribute> { /// // Display the User Attributes' revocation status. /// for (i, ua) in cert.user_attributes().enumerate() { /// eprintln!(" Revocation status of User Attribute #{}: {:?}", - /// i, ua.revoked(p, None)); + /// i, ua.revocation_status(p, None)); /// } /// # Ok(()) } /// ``` - pub fn revoked<T>(&self, policy: &dyn Policy, t: T) + pub fn revocation_status<T>(&self, policy: &dyn Policy, t: T) -> RevocationStatus where T: Into<Option<time::SystemTime>> { let t = t.into(); - self._revoked(policy, t, false, self.binding_signature(policy, t).ok()) + self._revocation_status(policy, t, false, + self.binding_signature(policy, t).ok()) } } diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs index 9c8883b2..e2e54219 100644 --- a/openpgp/src/cert/mod.rs +++ b/openpgp/src/cert/mod.rs @@ -778,7 +778,7 @@ impl Cert { /// Note: certificates and subkeys have different revocation /// criteria from [User IDs and User Attributes]. /// - /// [User IDs and User Attributes]: amalgamation/struct.ComponentAmalgamation.html#method.revoked + /// [User IDs and User Attributes]: amalgamation/struct.ComponentAmalgamation.html#method.revocation_status /// /// # Examples /// @@ -795,17 +795,17 @@ impl Cert { /// CertBuilder::general_purpose(None, Some("alice@example.org")) /// .generate()?; /// - /// assert_eq!(cert.revoked(p, None), RevocationStatus::NotAsFarAsWeKnow); + /// assert_eq!(cert.revocation_status(p, None), RevocationStatus::NotAsFarAsWeKnow); /// /// // Merge the revocation certificate. `cert` is now considered /// // to be revoked. /// let cert = cert.merge_packets(vec![ rev.clone().into() ])?; - /// assert_eq!(cert.revoked(p, None), + /// assert_eq!(cert.revocation_status(p, None), /// RevocationStatus::Revoked(vec![ &rev.into() ])); /// # Ok(()) /// # } /// ``` - pub fn revoked<T>(&self, policy: &dyn Policy, t: T) -> RevocationStatus + pub fn revocation_status<T>(&self, policy: &dyn Policy, t: T) -> RevocationStatus where T: Into<Option<time::SystemTime>> { let t = t.into(); @@ -824,7 +824,7 @@ impl Cert { _ => () } } - self.primary_key().bundle()._revoked(policy, t, true, sig) + self.primary_key().bundle()._revocation_status(policy, t, true, sig) } /// Revokes the certificate in place. @@ -864,7 +864,7 @@ impl Cert { /// .generate()?; /// /// // A new certificate is not revoked. - /// assert_eq!(cert.revoked(p, None), + /// assert_eq!(cert.revocation_status(p, None), /// RevocationStatus::NotAsFarAsWeKnow); /// /// // The default revocation certificate is a generic @@ -878,7 +878,7 @@ impl Cert { /// let cert = cert.revoke_in_place(&mut keypair, /// ReasonForRevocation::KeyCompromised, /// b"It was the maid :/")?; - /// if let RevocationStatus::Revoked(revs) = cert.revoked(p, None |