diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-06-20 10:35:53 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-06-20 11:25:42 +0200 |
commit | f7599c408cb86340851c8e75e5ae433a5b89e28b (patch) | |
tree | 637dd0529947bb8aa12f03929a6af8a132d38a18 /ffi | |
parent | e6694210613067dafc4d6de499f1245c78162e6f (diff) |
Consistently call passwords password, not passwd or passphrase.
Diffstat (limited to 'ffi')
-rw-r--r-- | ffi/include/sequoia/openpgp.h | 2 | ||||
-rw-r--r-- | ffi/src/openpgp.rs | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/ffi/include/sequoia/openpgp.h b/ffi/include/sequoia/openpgp.h index 51da1d77..50eeec4d 100644 --- a/ffi/include/sequoia/openpgp.h +++ b/ffi/include/sequoia/openpgp.h @@ -465,7 +465,7 @@ sq_tag_t sq_packet_tag (sq_packet_t p); /// the session key. /*/ sq_status_t sq_skesk_decrypt (sq_context_t ctx, sq_skesk_t skesk, - const uint8_t *passphrase, size_t passphrase_len, + const uint8_t *password, size_t password_len, uint8_t *algo, /* XXX */ uint8_t *key, size_t *key_len); diff --git a/ffi/src/openpgp.rs b/ffi/src/openpgp.rs index 86b50963..964f43fd 100644 --- a/ffi/src/openpgp.rs +++ b/ffi/src/openpgp.rs @@ -478,23 +478,23 @@ pub extern "system" fn sq_packet_tag(p: Option<&Packet>) #[no_mangle] pub extern "system" fn sq_skesk_decrypt(ctx: Option<&mut Context>, skesk: Option<&Packet>, - passphrase: *const uint8_t, - passphrase_len: size_t, + password: *const uint8_t, + password_len: size_t, algo: Option<&mut uint8_t>, // XXX key: *mut uint8_t, key_len: Option<&mut size_t>) -> Status { let ctx = ctx.expect("Context is NULL"); let skesk = skesk.expect("SKESK is NULL"); - assert!(!passphrase.is_null()); - let passphrase = unsafe { - slice::from_raw_parts(passphrase, passphrase_len as usize) + assert!(!password.is_null()); + let password = unsafe { + slice::from_raw_parts(password, password_len as usize) }; let algo = algo.expect("Algo is NULL"); let key_len = key_len.expect("Key length is NULL"); if let &Packet::SKESK(ref skesk) = skesk { - match skesk.decrypt(passphrase) { + match skesk.decrypt(password) { Ok((a, k)) => { *algo = a.into(); if !key.is_null() && *key_len >= k.len() { |