aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/keyedit.c')
-rw-r--r--g10/keyedit.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 1afaad6a9..0a5064a25 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -5053,9 +5053,11 @@ fail:
/* Core function to add an ADSK to the KEYBLOCK. Returns 0 on success
- * or an error code. */
+ * or an error code. CACHE_NONCE can be used to avoid a second
+ * Pinetry pop-up for appending the ADSK. */
gpg_error_t
-append_adsk_to_key (ctrl_t ctrl, kbnode_t keyblock, PKT_public_key *adsk)
+append_adsk_to_key (ctrl_t ctrl, kbnode_t keyblock, PKT_public_key *adsk,
+ const char *cache_nonce)
{
gpg_error_t err;
PKT_public_key *main_pk; /* The primary key. */
@@ -5101,7 +5103,7 @@ append_adsk_to_key (ctrl_t ctrl, kbnode_t keyblock, PKT_public_key *adsk)
/* Make the signature. */
err = make_keysig_packet (ctrl, &sig, main_pk, NULL, adsk, main_pk, 0x18,
adsk->timestamp, 0,
- keygen_add_key_flags_and_expire, adsk, NULL);
+ keygen_add_key_flags_and_expire, adsk, cache_nonce);
adsk = NULL; /* (owned by adsknode - avoid double free.) */
if (err)
{
@@ -5248,7 +5250,8 @@ menu_addadsk (ctrl_t ctrl, kbnode_t pub_keyblock, const char *adskfpr)
/* Append the subkey. */
log_assert (node->pkt->pkttype == PKT_PUBLIC_KEY
|| node->pkt->pkttype == PKT_PUBLIC_SUBKEY);
- err = append_adsk_to_key (ctrl, pub_keyblock, node->pkt->pkt.public_key);
+ err = append_adsk_to_key (ctrl, pub_keyblock, node->pkt->pkt.public_key,
+ NULL);
leave: