diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-11-25 14:34:01 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-09 13:30:09 +0100 |
commit | 9fbbecd7b75f64c68ec784e86f62dd8c7da590ae (patch) | |
tree | 27e86b52de2efa124340acb720bb662eae1d212a /openpgp-ffi | |
parent | 67abd92024ac01344e739f72099d4fa4685db04a (diff) |
openpgp: Remove Signature::key_expired.
- Fixes #371.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp.h | 8 | ||||
-rw-r--r-- | openpgp-ffi/src/packet/signature.rs | 14 |
2 files changed, 0 insertions, 22 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp.h b/openpgp-ffi/include/sequoia/openpgp.h index 6e966fba..4d6d8416 100644 --- a/openpgp-ffi/include/sequoia/openpgp.h +++ b/openpgp-ffi/include/sequoia/openpgp.h @@ -499,14 +499,6 @@ pgp_status_t pgp_signature_key_alive(pgp_error_t *errp, time_t when); /*/ -/// Returns whether the signature is expired at the specified time. -/// -/// If `when` is 0, then the current time is used. -/*/ -bool pgp_signature_key_expired(pgp_signature_t signature, pgp_key_t key, - time_t when); - -/*/ /// Returns the PKESK's recipient. /// /// The return value is a reference to a `KeyID`. The caller must not diff --git a/openpgp-ffi/src/packet/signature.rs b/openpgp-ffi/src/packet/signature.rs index 6ce3c0ac..64a81281 100644 --- a/openpgp-ffi/src/packet/signature.rs +++ b/openpgp-ffi/src/packet/signature.rs @@ -264,17 +264,3 @@ fn pgp_signature_key_alive(errp: Option<&mut *mut crate::error::Error>, }; ffi_try_status!(sig.ref_raw().key_alive(key.ref_raw(), t)) } - -/// Returns whether the signature is expired at the specified time. -/// -/// If `when` is 0, then the current time is used. -#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" -fn pgp_signature_key_expired(sig: *const Signature, key: *const Key, - when: time_t) -> bool { - let t = if when == 0 { - None - } else { - Some(std::time::UNIX_EPOCH + std::time::Duration::new(when as u64, 0)) - }; - sig.ref_raw().key_expired(key.ref_raw(), t) -} |