summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-03-11 10:00:25 +0100
committerNeal H. Walfield <neal@pep.foundation>2019-03-11 10:02:30 +0100
commit06b7e5c0d508e2053e1de20ef7f4522289b54cc9 (patch)
tree59f103e2ffcac2194ad77f78a5a71078cf224447 /openpgp-ffi
parent83ca74b2f57d322561ca54c5c4c1952e95e0d2fb (diff)
openpgp-ffi: Unwrap object.
- Use ref_raw, not ffi_parame_ref! to access wrapped objects.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r--openpgp-ffi/src/packet/pkesk.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/openpgp-ffi/src/packet/pkesk.rs b/openpgp-ffi/src/packet/pkesk.rs
index 7df0d51c..36af7c0d 100644
--- a/openpgp-ffi/src/packet/pkesk.rs
+++ b/openpgp-ffi/src/packet/pkesk.rs
@@ -4,12 +4,14 @@ use failure;
use libc::{uint8_t, size_t};
extern crate sequoia_openpgp as openpgp;
-use self::openpgp::packet::{Key, PKESK, key::SecretKey};
+use self::openpgp::packet::{PKESK, key::SecretKey};
use super::super::keyid::KeyID;
+use super::super::packet::key::Key;
use error::Status;
use MoveIntoRaw;
+use RefRaw;
/// Returns the PKESK's recipient.
///
@@ -38,7 +40,7 @@ pub extern "system" fn pgp_pkesk_decrypt(errp: Option<&mut *mut ::error::Error>,
-> Status {
ffi_make_fry_from_errp!(errp);
let pkesk = ffi_param_ref!(pkesk);
- let secret_key = ffi_param_ref!(secret_key);
+ let secret_key = secret_key.ref_raw();
let algo = ffi_param_ref_mut!(algo);
let key_len = ffi_param_ref_mut!(key_len);