summaryrefslogtreecommitdiffstats
path: root/ffi/src/openpgp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ffi/src/openpgp.rs')
-rw-r--r--ffi/src/openpgp.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/ffi/src/openpgp.rs b/ffi/src/openpgp.rs
index 27df8ff5..1d23ad61 100644
--- a/ffi/src/openpgp.rs
+++ b/ffi/src/openpgp.rs
@@ -1048,6 +1048,16 @@ pub extern "system" fn sq_tsk_tpk(tsk: Option<&TSK>)
tsk.tpk()
}
+/// Converts the TSK into a TPK.
+#[no_mangle]
+pub extern "system" fn sq_tsk_into_tpk(tsk: *mut TSK)
+ -> *mut TPK {
+ let tsk = unsafe {
+ Box::from_raw(tsk)
+ };
+ box_raw!(tsk.into_tpk())
+}
+
/// Serializes the TSK.
#[no_mangle]