aboutsummaryrefslogtreecommitdiffstats
path: root/g10/getkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/getkey.c')
-rw-r--r--g10/getkey.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index d00a2ebd9..96dd8ee89 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -156,6 +156,7 @@ static int uid_cache_entries; /* number of entries in uid cache */
static char* prepare_word_match( const byte *name );
static int lookup( GETKEY_CTX ctx, KBNODE *ret_kb, int secmode );
+static void merge_selfsigs( KBNODE keyblock );
#if 0
@@ -1285,6 +1286,13 @@ merge_keys_and_selfsig( KBNODE keyblock )
u32 kid[2] = { 0, 0 };
u32 sigdate = 0;
+ if (keyblock && keyblock->pkt->pkttype == PKT_PUBLIC_KEY ) {
+ /* divert to our new function */
+ merge_selfsigs (keyblock);
+ return;
+ }
+ /* still need the old one because the new one can't handle secret keys */
+
for(k=keyblock; k; k = k->next ) {
if( k->pkt->pkttype == PKT_PUBLIC_KEY
|| k->pkt->pkttype == PKT_PUBLIC_SUBKEY ) {
@@ -1733,6 +1741,7 @@ merge_selfsigs_subkey( KBNODE keyblock, KBNODE subnode )
subpk->pubkey_usage = key_usage;
p = parse_sig_subpkt ( sig->hashed_data, SIGSUBPKT_KEY_EXPIRE, NULL);
+
if ( p )
key_expire = sig->timestamp + buffer_to_u32(p);
else