summaryrefslogtreecommitdiffstats
path: root/ffi/include
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2018-12-17 21:16:03 +0100
committerNeal H. Walfield <neal@pep.foundation>2018-12-17 21:31:25 +0100
commit07a577c6b5af361fcbdf5918bbadc9b8d6e83a10 (patch)
treeeea94d8a3d6136bd0955b9dd6d39b9f3d4cc259b /ffi/include
parent7f5384b0a35e09d51970fbd7c8b1a6d25ce1051e (diff)
ffi: Wrap Key's alive and expired methods.
- Wrap Key::expired, Key::expired_at, Key::alive, and Key::alive_at.
Diffstat (limited to 'ffi/include')
-rw-r--r--ffi/include/sequoia/openpgp.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/ffi/include/sequoia/openpgp.h b/ffi/include/sequoia/openpgp.h
index 4c6f61a8..8c9e8343 100644
--- a/ffi/include/sequoia/openpgp.h
+++ b/ffi/include/sequoia/openpgp.h
@@ -1003,6 +1003,41 @@ sq_fingerprint_t sq_p_key_fingerprint (sq_p_key_t p);
sq_keyid_t sq_p_key_keyid (sq_p_key_t p);
/*/
+/// Returns whether the key is expired according to the provided
+/// self-signature.
+///
+/// Note: this is with respect to the provided signature, which is not
+/// checked for validity. That is, we do not check whether the
+/// signature is a valid self-signature for the given key.
+/*/
+int sq_p_key_expired(sq_p_key_t key, sq_signature_t self_signature);
+
+/*/
+/// Like sq_p_key_expired, but at a specific time.
+/*/
+int sq_p_key_expired_at(sq_p_key_t key, sq_signature_t self_signature,
+ time_t when);
+
+/*/
+/// Returns whether the key is alive according to the provided
+/// self-signature.
+///
+/// A key is alive if the creation date is in the past, and the key
+/// has not expired.
+///
+/// Note: this is with respect to the provided signature, which is not
+/// checked for validity. That is, we do not check whether the
+/// signature is a valid self-signature for the given key.
+/*/
+int sq_p_key_alive(sq_p_key_t key, sq_signature_t self_signature);
+
+/*/
+/// Like sq_p_key_alive, but at a specific time.
+/*/
+int sq_p_key_alive_at(sq_p_key_t key, sq_signature_t self_signature,
+ time_t when);
+
+/*/
/// Returns the value of the User ID Packet.
///
/// The returned pointer is valid until `uid` is deallocated. If