diff options
author | Neal H. Walfield <neal@pep.foundation> | 2018-12-17 20:42:20 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2018-12-17 20:42:20 +0100 |
commit | a3bd8dd4c18fed9167ebf0c411ad793ba96b29d7 (patch) | |
tree | 3e913d31121d24ba69616c8a438c237abf38b909 /ffi/include | |
parent | 3366d09c94c88bb8366ed470e49ff841f336b894 (diff) |
ffi: Export getters for signature key flags.
Diffstat (limited to 'ffi/include')
-rw-r--r-- | ffi/include/sequoia/openpgp.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ffi/include/sequoia/openpgp.h b/ffi/include/sequoia/openpgp.h index 765ff1a6..d949ee01 100644 --- a/ffi/include/sequoia/openpgp.h +++ b/ffi/include/sequoia/openpgp.h @@ -519,6 +519,47 @@ sq_keyid_t sq_signature_issuer(sq_signature_t sig); /*/ sq_fingerprint_t sq_signature_issuer_fingerprint(sq_signature_t sig); +/*/ +/// Returns whether the KeyFlags indicates that the key can be used to +/// make certifications. +/*/ +int sq_signature_can_certify(sq_signature_t signature); + +/*/ +/// Returns whether the KeyFlags indicates that the key can be used to +/// make signatures. +/*/ +int sq_signature_can_sign(sq_signature_t signature); + +/*/ +/// Returns whether the KeyFlags indicates that the key can be used to +/// encrypt data for transport. +/*/ +int sq_signature_can_encrypt_for_transport(sq_signature_t signature); + +/*/ +/// Returns whether the KeyFlags indicates that the key can be used to +/// encrypt data at rest. +/*/ +int sq_signature_can_encrypt_at_rest(sq_signature_t signature); + +/*/ +/// Returns whether the KeyFlags indicates that the key can be used +/// for authentication. +/*/ +int sq_signature_can_authenticate(sq_signature_t signature); + +/*/ +/// Returns whether the KeyFlags indicates that the key is a split +/// key. +/*/ +int sq_signature_is_split_key(sq_signature_t signature); + +/*/ +/// Returns whether the KeyFlags indicates that the key is a group +/// key. +/*/ +int sq_signature_is_group_key(sq_signature_t signature); /// Returns the PKESK's recipient. /// /// The return value is a reference ot a `KeyID`. The caller must not |