1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

* getkey.c (merge_selfsigs_subkey): Do not mark subkeys valid if we do not

support their pk algorithm.  This allows for early (during get_*)
rejection of a subkey, and selection of another.

* passphrase.c (passphrase_to_dek): Give a little more information when we
have room to do so.
This commit is contained in:
David Shaw 2004-03-05 13:34:56 +00:00
parent 1e01514529
commit ea73c94bc6
3 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2004-03-05 David Shaw <dshaw@jabberwocky.com>
* getkey.c (merge_selfsigs_subkey): Do not mark subkeys valid if
we do not support their pk algorithm. This allows for early
(during get_*) rejection of a subkey, and selection of another.
* passphrase.c (passphrase_to_dek): Give a little more information
when we have room to do so.
2004-03-04 David Shaw <dshaw@jabberwocky.com> 2004-03-04 David Shaw <dshaw@jabberwocky.com>
* revoke.c (export_minimal_pk), export.c (do_export_stream), * revoke.c (export_minimal_pk), export.c (do_export_stream),

View File

@ -1895,11 +1895,10 @@ merge_selfsigs_subkey( KBNODE keyblock, KBNODE subnode )
} }
} }
if ( !signode ) { /* no valid key binding */
return; /* no valid key binding */ if ( !signode )
} return;
subpk->is_valid = 1;
sig = signode->pkt->pkt.signature; sig = signode->pkt->pkt.signature;
p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_KEY_FLAGS, &n ); p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_KEY_FLAGS, &n );
@ -1929,6 +1928,12 @@ merge_selfsigs_subkey( KBNODE keyblock, KBNODE subnode )
key_expire = 0; key_expire = 0;
subpk->has_expired = key_expire >= curtime? 0 : key_expire; subpk->has_expired = key_expire >= curtime? 0 : key_expire;
subpk->expiredate = key_expire; subpk->expiredate = key_expire;
/* algo doesn't exist */
if(check_pubkey_algo(subpk->pubkey_algo))
return;
subpk->is_valid = 1;
} }

View File

@ -1134,7 +1134,7 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo,
if(keystrlen()>10) if(keystrlen()>10)
{ {
tty_printf("\n"); tty_printf("\n");
tty_printf(_(" (main key ID %s)"), tty_printf(_(" (subkey on main key ID %s)"),
keystr(&keyid[2]) ); keystr(&keyid[2]) );
} }
else else