summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-03 17:50:12 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-04 13:21:47 +0100
commit8354d849b19170a9a2c2b97179d9aaedb6fca6cf (patch)
tree12578d07af9c4d104571e1055e1d40af4eae99ed /openpgp-ffi
parent807eee2432de52715a2e3c7167d5e859ca3315a8 (diff)
openpgp: Rename KeyFlag's accessors.
- Fixes #359.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r--openpgp-ffi/examples/encrypt-for.c4
-rw-r--r--openpgp-ffi/include/sequoia/openpgp.h10
-rw-r--r--openpgp-ffi/src/packet/signature.rs20
3 files changed, 17 insertions, 17 deletions
diff --git a/openpgp-ffi/examples/encrypt-for.c b/openpgp-ffi/examples/encrypt-for.c
index abf9d1a9..8303f8ee 100644
--- a/openpgp-ffi/examples/encrypt-for.c
+++ b/openpgp-ffi/examples/encrypt-for.c
@@ -37,8 +37,8 @@ main (int argc, char **argv)
error (1, 0, "pgp_cert_from_file: %s", pgp_error_to_string (err));
pgp_cert_key_iter_t iter = pgp_cert_key_iter_valid (cert);
- pgp_cert_key_iter_encrypting_capable_at_rest (iter);
- pgp_cert_key_iter_encrypting_capable_for_transport (iter);
+ pgp_cert_key_iter_for_storage_encryption (iter);
+ pgp_cert_key_iter_for_transport_encryption (iter);
size_t recipients_len;
pgp_recipient_t *recipients =
pgp_recipients_from_key_iter (iter, &recipients_len);
diff --git a/openpgp-ffi/include/sequoia/openpgp.h b/openpgp-ffi/include/sequoia/openpgp.h
index 00e841f9..b1de42e3 100644
--- a/openpgp-ffi/include/sequoia/openpgp.h
+++ b/openpgp-ffi/include/sequoia/openpgp.h
@@ -340,31 +340,31 @@ pgp_fingerprint_t pgp_signature_issuer_fingerprint(pgp_signature_t sig);
/// Returns whether the KeyFlags indicates that the key can be used to
/// make certifications.
/*/
-bool pgp_signature_can_certify(pgp_signature_t signature);
+bool pgp_signature_for_certification(pgp_signature_t signature);
/*/
/// Returns whether the KeyFlags indicates that the key can be used to
/// make signatures.
/*/
-bool pgp_signature_can_sign(pgp_signature_t signature);
+bool pgp_signature_for_signing(pgp_signature_t signature);
/*/
/// Returns whether the KeyFlags indicates that the key can be used to
/// encrypt data for transport.
/*/
-bool pgp_signature_can_encrypt_for_transport(pgp_signature_t signature);
+bool pgp_signature_for_transport_encryption(pgp_signature_t signature);
/*/
/// Returns whether the KeyFlags indicates that the key can be used to
/// encrypt data at rest.
/*/
-bool pgp_signature_can_encrypt_at_rest(pgp_signature_t signature);
+bool pgp_signature_for_storage_encryption(pgp_signature_t signature);
/*/
/// Returns whether the KeyFlags indicates that the key can be used
/// for authentication.
/*/
-bool pgp_signature_can_authenticate(pgp_signature_t signature);
+bool pgp_signature_for_authentication(pgp_signature_t signature);
/*/
/// Returns whether the KeyFlags indicates that the key is a split
diff --git a/openpgp-ffi/src/packet/signature.rs b/openpgp-ffi/src/packet/signature.rs
index 14df1ce3..e3abedb3 100644
--- a/openpgp-ffi/src/packet/signature.rs
+++ b/openpgp-ffi/src/packet/signature.rs
@@ -69,37 +69,37 @@ fn pgp_signature_issuer_fingerprint(sig: *const Signature)
/// Returns whether the KeyFlags indicates that the key can be used to
/// make certifications.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_signature_can_certify(sig: *const Signature) -> bool {
- sig.ref_raw().key_flags().can_certify()
+fn pgp_signature_for_certification(sig: *const Signature) -> bool {
+ sig.ref_raw().key_flags().for_certification()
}
/// Returns whether the KeyFlags indicates that the key can be used to
/// make signatures.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_signature_can_sign(sig: *const Signature) -> bool {
- sig.ref_raw().key_flags().can_sign()
+fn pgp_signature_for_signing(sig: *const Signature) -> bool {
+ sig.ref_raw().key_flags().for_signing()
}
/// Returns whether the KeyFlags indicates that the key can be used to
/// encrypt data for transport.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_signature_can_encrypt_for_transport(sig: *const Signature)
+fn pgp_signature_for_transport_encryption(sig: *const Signature)
-> bool {
- sig.ref_raw().key_flags().can_encrypt_for_transport()
+ sig.ref_raw().key_flags().for_transport_encryption()
}
/// Returns whether the KeyFlags indicates that the key can be used to
/// encrypt data at rest.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_signature_can_encrypt_at_rest(sig: *const Signature) -> bool {
- sig.ref_raw().key_flags().can_encrypt_at_rest()
+fn pgp_signature_for_storage_encryption(sig: *const Signature) -> bool {
+ sig.ref_raw().key_flags().for_storage_encryption()
}
/// Returns whether the KeyFlags indicates that the key can be used
/// for authentication.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
-fn pgp_signature_can_authenticate(sig: *const Signature) -> bool {
- sig.ref_raw().key_flags().can_authenticate()
+fn pgp_signature_for_authentication(sig: *const Signature) -> bool {
+ sig.ref_raw().key_flags().for_authentication()
}
/// Returns whether the KeyFlags indicates that the key is a split