summaryrefslogtreecommitdiffstats
path: root/ffi/include
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-01-10 11:14:02 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-01-10 14:41:51 +0100
commit6e53bb4f673786acee95a416fbf7859659d626b7 (patch)
treeac248ced95585636a9b5ad122df5ce6de54c4752 /ffi/include
parentb3a4ad197f84b22883c2c2f4114b0e3472af60ee (diff)
ffi: New function sq_p_key_into_key_pair.
Diffstat (limited to 'ffi/include')
-rw-r--r--ffi/include/sequoia/openpgp.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ffi/include/sequoia/openpgp.h b/ffi/include/sequoia/openpgp.h
index 40c45d55..7b1aa3b6 100644
--- a/ffi/include/sequoia/openpgp.h
+++ b/ffi/include/sequoia/openpgp.h
@@ -1178,6 +1178,16 @@ sq_public_key_algo_t sq_p_key_public_key_algo(sq_p_key_t key);
int sq_p_key_public_key_bits(sq_p_key_t key);
/*/
+/// Creates a new key pair from a Key packet with an unencrypted
+/// secret key.
+///
+/// # Errors
+///
+/// Fails if the secret key is missing, or encrypted.
+/*/
+sq_key_pair_t sq_p_key_into_key_pair (sq_context_t ctx, sq_p_key_t key);
+
+/*/
/// Returns the value of the User ID Packet.
///
/// The returned pointer is valid until `uid` is deallocated. If