mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
* keyedit.c (menu_revuid): Properly handle a nonselfsigned uid on a v4 key
(treat as a v4 revocation). * import.c (print_import_check): Do not re-utf8 convert user IDs.
This commit is contained in:
parent
169f4365da
commit
6291f18371
@ -1,3 +1,10 @@
|
|||||||
|
2003-02-02 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keyedit.c (menu_revuid): Properly handle a nonselfsigned uid on
|
||||||
|
a v4 key (treat as a v4 revocation).
|
||||||
|
|
||||||
|
* import.c (print_import_check): Do not re-utf8 convert user IDs.
|
||||||
|
|
||||||
2003-01-27 David Shaw <dshaw@jabberwocky.com>
|
2003-01-27 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* mainproc.c (list_node): Show signature expiration date in
|
* mainproc.c (list_node): Show signature expiration date in
|
||||||
|
10
g10/import.c
10
g10/import.c
@ -555,11 +555,10 @@ print_import_ok (PKT_public_key *pk, PKT_secret_key *sk, unsigned int reason)
|
|||||||
write_status_text (STATUS_IMPORT_OK, buf);
|
write_status_text (STATUS_IMPORT_OK, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
print_import_check (PKT_public_key * pk, PKT_user_id * id)
|
print_import_check (PKT_public_key * pk, PKT_user_id * id)
|
||||||
{
|
{
|
||||||
char * buf, * p;
|
char * buf;
|
||||||
byte fpr[24];
|
byte fpr[24];
|
||||||
u32 keyid[2];
|
u32 keyid[2];
|
||||||
size_t i, pos = 0, n;
|
size_t i, pos = 0, n;
|
||||||
@ -573,14 +572,11 @@ print_import_check (PKT_public_key * pk, PKT_user_id * id)
|
|||||||
sprintf (buf+pos, "%02X", fpr[i]);
|
sprintf (buf+pos, "%02X", fpr[i]);
|
||||||
strcat (buf, " ");
|
strcat (buf, " ");
|
||||||
pos += 1;
|
pos += 1;
|
||||||
p = native_to_utf8 (id->name);
|
strcat (buf, id->name);
|
||||||
strcat (buf, p);
|
|
||||||
write_status_text (STATUS_IMPORT_CHECK, buf);
|
write_status_text (STATUS_IMPORT_CHECK, buf);
|
||||||
m_free (buf);
|
m_free (buf);
|
||||||
m_free (p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************
|
/****************
|
||||||
* Try to import one keyblock. Return an error only in serious cases, but
|
* Try to import one keyblock. Return an error only in serious cases, but
|
||||||
* never for an invalid keyblock. It uses log_error to increase the
|
* never for an invalid keyblock. It uses log_error to increase the
|
||||||
@ -632,7 +628,7 @@ import_one( const char *fname, KBNODE keyblock,
|
|||||||
if (opt.interactive) {
|
if (opt.interactive) {
|
||||||
if(is_status_enabled())
|
if(is_status_enabled())
|
||||||
print_import_check (pk, uidnode->pkt->pkt.user_id);
|
print_import_check (pk, uidnode->pkt->pkt.user_id);
|
||||||
merge_keys_and_selfsig (keyblock);
|
merge_keys_and_selfsig (keyblock);
|
||||||
tty_printf ("\n");
|
tty_printf ("\n");
|
||||||
show_basic_key_info (keyblock);
|
show_basic_key_info (keyblock);
|
||||||
tty_printf ("\n");
|
tty_printf ("\n");
|
||||||
|
@ -3352,8 +3352,8 @@ menu_revuid( KBNODE pub_keyblock, KBNODE sec_keyblock )
|
|||||||
probably be safe to use v4 revocations everywhere. -ds */
|
probably be safe to use v4 revocations everywhere. -ds */
|
||||||
|
|
||||||
for( node = pub_keyblock; node; node = node->next )
|
for( node = pub_keyblock; node; node = node->next )
|
||||||
if(node->pkt->pkttype==PKT_USER_ID &&
|
if(pk->version>3 || (node->pkt->pkttype==PKT_USER_ID &&
|
||||||
node->pkt->pkt.user_id->selfsigversion>3)
|
node->pkt->pkt.user_id->selfsigversion>3))
|
||||||
{
|
{
|
||||||
if((reason = ask_revocation_reason( 0, 1, 4 )))
|
if((reason = ask_revocation_reason( 0, 1, 4 )))
|
||||||
break;
|
break;
|
||||||
@ -3413,13 +3413,11 @@ menu_revuid( KBNODE pub_keyblock, KBNODE sec_keyblock )
|
|||||||
pkt->pkt.signature = sig;
|
pkt->pkt.signature = sig;
|
||||||
insert_kbnode( node, new_kbnode(pkt), 0 );
|
insert_kbnode( node, new_kbnode(pkt), 0 );
|
||||||
|
|
||||||
if(!update_trust)
|
/* If the trustdb has an entry for this key+uid then the
|
||||||
{
|
trustdb needs an update. */
|
||||||
/* If the trustdb has an entry for this key+uid then the
|
if(!update_trust
|
||||||
trustdb needs an update. */
|
&& (get_validity(pk,uid)&TRUST_MASK)>=TRUST_UNDEFINED)
|
||||||
if((get_validity(pk,uid)&TRUST_MASK)>=TRUST_UNDEFINED)
|
update_trust=1;
|
||||||
update_trust=1;
|
|
||||||
}
|
|
||||||
|
|
||||||
changed = 1;
|
changed = 1;
|
||||||
node->pkt->pkt.user_id->is_revoked=1;
|
node->pkt->pkt.user_id->is_revoked=1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user