diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-02-12 16:53:25 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-02-12 16:56:23 +0100 |
commit | 779fd253b285f315aff529690716e2e56047caa9 (patch) | |
tree | 3c52fb94dacea04f46b9f43337b6923856c15660 /openpgp-ffi/src/crypto.rs | |
parent | ddcd197113b805410ea273e7e36ab73fe7b13c2c (diff) |
openpgp-ffi: Wrap openpgp::packet::Key.
Diffstat (limited to 'openpgp-ffi/src/crypto.rs')
-rw-r--r-- | openpgp-ffi/src/crypto.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/openpgp-ffi/src/crypto.rs b/openpgp-ffi/src/crypto.rs index 82bb1707..7a453b60 100644 --- a/openpgp-ffi/src/crypto.rs +++ b/openpgp-ffi/src/crypto.rs @@ -7,8 +7,10 @@ extern crate sequoia_openpgp; use self::sequoia_openpgp::{ crypto, - packet::Key, }; +use super::packet::key::Key; + +use MoveFromRaw; /// Frees a signer. #[::sequoia_ffi_macros::extern_fn] #[no_mangle] @@ -25,9 +27,9 @@ pub extern "system" fn pgp_key_pair_new -> *mut crypto::KeyPair { ffi_make_fry_from_errp!(errp); - let public = ffi_param_move!(public); + let public = public.move_from_raw(); let secret = ffi_param_move!(secret); - ffi_try_box!(crypto::KeyPair::new(*public, *secret)) + ffi_try_box!(crypto::KeyPair::new(public, *secret)) } /// Frees a key pair. |