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 /openpgp-ffi/src/cert.rs | |
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.
Diffstat (limited to 'openpgp-ffi/src/cert.rs')
-rw-r--r-- | openpgp-ffi/src/cert.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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(); |