aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-03-05 13:34:56 +0000
committerDavid Shaw <[email protected]>2004-03-05 13:34:56 +0000
commitea73c94bc683027f7bbc0807b98695f42f7690a0 (patch)
treeb430557d1d6b6bd970de05d51ab649eda9360d97
parent* revoke.c (export_minimal_pk), export.c (do_export_stream), passphrase.c (diff)
downloadgnupg-ea73c94bc683027f7bbc0807b98695f42f7690a0.tar.gz
gnupg-ea73c94bc683027f7bbc0807b98695f42f7690a0.zip
* 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.
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog9
-rw-r--r--g10/getkey.c13
-rw-r--r--g10/passphrase.c2
3 files changed, 19 insertions, 5 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 45464c9a8..034ae75d0 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,12 @@
+2004-03-05 David Shaw <[email protected]>
+
+ * 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 <[email protected]>
* revoke.c (export_minimal_pk), export.c (do_export_stream),
diff --git a/g10/getkey.c b/g10/getkey.c
index e479ed6ea..7e6c30c91 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -1895,11 +1895,10 @@ merge_selfsigs_subkey( KBNODE keyblock, KBNODE subnode )
}
}
- if ( !signode ) {
- return; /* no valid key binding */
- }
+ /* no valid key binding */
+ if ( !signode )
+ return;
- subpk->is_valid = 1;
sig = signode->pkt->pkt.signature;
p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_KEY_FLAGS, &n );
@@ -1929,6 +1928,12 @@ merge_selfsigs_subkey( KBNODE keyblock, KBNODE subnode )
key_expire = 0;
subpk->has_expired = key_expire >= curtime? 0 : key_expire;
subpk->expiredate = key_expire;
+
+ /* algo doesn't exist */
+ if(check_pubkey_algo(subpk->pubkey_algo))
+ return;
+
+ subpk->is_valid = 1;
}
diff --git a/g10/passphrase.c b/g10/passphrase.c
index 870ad9770..1274afce9 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -1134,7 +1134,7 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo,
if(keystrlen()>10)
{
tty_printf("\n");
- tty_printf(_(" (main key ID %s)"),
+ tty_printf(_(" (subkey on main key ID %s)"),
keystr(&keyid[2]) );
}
else