aboutsummaryrefslogtreecommitdiffstats
path: root/g10/getkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/getkey.c')
-rw-r--r--g10/getkey.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index 6715e0d59..aa2a8ce34 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -627,6 +627,16 @@ get_seckey( PKT_secret_key *sk, u32 *keyid )
}
/****************
+ * Get the primary secret key and store it into sk
+ * Note: This function does not unprotect the key!
+ */
+int
+get_primary_seckey( PKT_secret_key *sk, u32 *keyid )
+{
+ return lookup_sk( sk, 11, keyid, NULL, 1 );
+}
+
+/****************
* Check whether the secret key is available
* Returns: 0 := key is available
* G10ERR_NO_SECKEY := not availabe