diff --git a/g10/ChangeLog b/g10/ChangeLog index 693d3a114..d1e22719c 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,13 @@ +2002-12-26 David Shaw + + * keygen.c (keygen_add_key_expire): Properly handle updating a key + expiration to a no-expiration value. + + * keyedit.c (enable_disable_key): Comment. + + * import.c (import_one): When in interactive mode and --verbose, + don't repeat some key information twice. + 2002-12-23 Timo Schulz * import.c (import_one): Use merge_keys_and_selfsig in the diff --git a/g10/import.c b/g10/import.c index e8de666f1..336d4aaf1 100644 --- a/g10/import.c +++ b/g10/import.c @@ -575,7 +575,7 @@ import_one( const char *fname, KBNODE keyblock, int fast, log_info(_("NOTE: Elgamal primary key detected - " "this may take some time to import\n")); - if( opt.verbose ) { + if( opt.verbose && !opt.interactive ) { log_info( "pub %4u%c/%08lX %s ", nbits_from_pk( pk ), pubkey_letter( pk->pubkey_algo ), diff --git a/g10/keyedit.c b/g10/keyedit.c index 1d76e6f07..6f6240580 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -3208,7 +3208,10 @@ menu_revkey( KBNODE pub_keyblock, KBNODE sec_keyblock ) return changed; } - +/* Note that update_ownertrust is going to mark the trustdb dirty when + enabling or disabling a key. This is arguably sub-optimal as + disabled keys are still counted in the web of trust, but perhaps + not worth adding extra complexity to change. -ds */ static int enable_disable_key( KBNODE keyblock, int disable ) { diff --git a/g10/keygen.c b/g10/keygen.c index 15b8e5b71..372f61d63 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -163,6 +163,12 @@ keygen_add_key_expire( PKT_signature *sig, void *opaque ) buf[3] = u & 0xff; build_sig_subpkt( sig, SIGSUBPKT_KEY_EXPIRE, buf, 4 ); } + else + { + /* Make sure we don't leave a key expiration subpacket lying + around */ + delete_sig_subpkt (sig->hashed, SIGSUBPKT_KEY_EXPIRE); + } return 0; }