mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* import.c (import_one): Try and collapse user IDs when importing a key
for the first time. * build-packet.c (do_comment, do_user_id): Try for a headerlen of 2 since that's the smallest and most likely encoding for these packets * keyedit.c (menu_addrevoker): Allow appointing a subkey as a designated revoker if the user forces it via keyid!, so long as the subkey can certify. Also use the proper date string when prompting for confirmation.
This commit is contained in:
parent
49b6b71919
commit
be441babaa
@ -1,3 +1,17 @@
|
||||
2004-03-09 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* import.c (import_one): Try and collapse user IDs when importing
|
||||
a key for the first time.
|
||||
|
||||
* build-packet.c (do_comment, do_user_id): Try for a headerlen of
|
||||
2 since that's the smallest and most likely encoding for these
|
||||
packets
|
||||
|
||||
* keyedit.c (menu_addrevoker): Allow appointing a subkey as a
|
||||
designated revoker if the user forces it via keyid!, so long as
|
||||
the subkey can certify. Also use the proper date string when
|
||||
prompting for confirmation.
|
||||
|
||||
2004-03-01 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* options.h (ctrl): New for member IN_AUTO_KEY_RETRIEVE.
|
||||
|
@ -196,7 +196,7 @@ do_comment( IOBUF out, int ctb, PKT_comment *rem )
|
||||
{
|
||||
if( opt.sk_comments )
|
||||
{
|
||||
write_header2(out, ctb, rem->len, 1, 1);
|
||||
write_header2(out, ctb, rem->len, 2, 1);
|
||||
if( iobuf_write( out, rem->data, rem->len ) )
|
||||
return G10ERR_WRITE_FILE;
|
||||
}
|
||||
@ -214,7 +214,7 @@ do_user_id( IOBUF out, int ctb, PKT_user_id *uid )
|
||||
}
|
||||
else
|
||||
{
|
||||
write_header2( out, ctb, uid->len, 1, 1 );
|
||||
write_header2( out, ctb, uid->len, 2, 1 );
|
||||
if( iobuf_write( out, uid->name, uid->len ) )
|
||||
return G10ERR_WRITE_FILE;
|
||||
}
|
||||
|
@ -637,6 +637,9 @@ import_one( const char *fname, KBNODE keyblock, int fast,
|
||||
}
|
||||
if( opt.verbose > 1 )
|
||||
log_info (_("writing to `%s'\n"), keydb_get_resource_name (hd) );
|
||||
|
||||
collapse_uids(&keyblock);
|
||||
|
||||
rc = keydb_insert_keyblock (hd, keyblock );
|
||||
if (rc)
|
||||
log_error (_("error writing keyring `%s': %s\n"),
|
||||
|
@ -2476,8 +2476,10 @@ menu_addrevoker( KBNODE pub_keyblock, KBNODE sec_keyblock, int sensitive )
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Note that I'm requesting SIG here and not CERT. We're making
|
||||
a certification, but it is okay to be a subkey. */
|
||||
revoker_pk->req_usage=PUBKEY_USAGE_SIG;
|
||||
rc=get_pubkey_byname(revoker_pk,answer,NULL,NULL,1);
|
||||
|
||||
if(rc)
|
||||
{
|
||||
log_error (_("key `%s' not found: %s\n"),answer,g10_errstr(rc));
|
||||
@ -2485,13 +2487,6 @@ menu_addrevoker( KBNODE pub_keyblock, KBNODE sec_keyblock, int sensitive )
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!revoker_pk->is_primary)
|
||||
{
|
||||
log_error(_("cannot appoint a subkey as a designated revoker\n"));
|
||||
m_free(answer);
|
||||
continue;
|
||||
}
|
||||
|
||||
m_free(answer);
|
||||
|
||||
fingerprint_from_pk(revoker_pk,revkey.fpr,&fprlen);
|
||||
@ -2517,7 +2512,7 @@ menu_addrevoker( KBNODE pub_keyblock, KBNODE sec_keyblock, int sensitive )
|
||||
tty_printf("\npub %4u%c/%08lX %s ",
|
||||
nbits_from_pk( revoker_pk ),
|
||||
pubkey_letter( revoker_pk->pubkey_algo ),
|
||||
(ulong)keyid[1], datestr_from_pk(pk) );
|
||||
(ulong)keyid[1], datestr_from_pk(revoker_pk) );
|
||||
|
||||
p = get_user_id( keyid, &n );
|
||||
tty_print_utf8_string( p, n );
|
||||
|
Loading…
x
Reference in New Issue
Block a user