1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* keylist.c (list_one): Don't show the keyring filename when in

--with-colons mode.  Actually translate "Keyring" string.

* mainproc.c (proc_tree): We can't currently handle multiple signatures of
different classes or digests (we'd pretty much have to run a different
hash context for each), but if they are all the same, make an exception.
This is Debian bug #194292.

* sig-check.c (check_key_signature2): Make string translatable.

* packet.h, getkey.c (fixup_uidnode): Mark real primary uids differently
than assumed primaries.

* keyedit.c (no_primary_warning): Use the differently marked primaries
here in a new function to warn when an --edit-key command might rearrange
the self-sig dates enough to change which uid is primary. (menu_expire,
menu_set_preferences): Use no_primary_warning() here.

* Makefile.am: Use @DLLIBS@ for -ldl.
This commit is contained in:
David Shaw 2003-05-31 04:06:06 +00:00
parent 0a86b45b9d
commit 9390fe676b
8 changed files with 115 additions and 26 deletions

View file

@ -2194,6 +2194,40 @@ show_key_and_fingerprint( KBNODE keyblock )
}
/* Show a warning if no uids on the key have the primary uid flag
set. */
static void
no_primary_warning(KBNODE keyblock, int uids)
{
KBNODE node;
int select_all=1,have_uid=0,uid_count=0;
if(uids)
select_all=!count_selected_uids(keyblock);
/* TODO: if we ever start behaving differently with a primary or
non-primary attribute ID, we will need to check for attributes
here as well. */
for(node=keyblock; node; node = node->next)
{
if(node->pkt->pkttype==PKT_USER_ID
&& node->pkt->pkt.user_id->attrib_data==NULL)
{
uid_count++;
if((select_all || (node->flag & NODFLG_SELUID))
&& node->pkt->pkt.user_id->is_primary==2)
have_uid|=2;
else
have_uid|=1;
}
}
if(uid_count>1 && have_uid&1 && !(have_uid&2))
log_info(_("WARNING: no user ID has been marked as primary. This command "
"may\n cause a different user ID to become the assumed primary.\n"));
}
/****************
* Ask for a new user id, do the selfsignature and put it into
@ -2721,6 +2755,8 @@ menu_expire( KBNODE pub_keyblock, KBNODE sec_keyblock )
mainkey=1;
}
no_primary_warning(pub_keyblock,0);
expiredate = ask_expiredate();
node = find_kbnode( sec_keyblock, PKT_SECRET_KEY );
sk = copy_secret_key( NULL, node->pkt->pkt.secret_key);
@ -2970,6 +3006,8 @@ menu_set_preferences (KBNODE pub_keyblock, KBNODE sec_keyblock )
int selected, select_all;
int modified = 0;
no_primary_warning(pub_keyblock,1);
select_all = !count_selected_uids (pub_keyblock);
node = find_kbnode( sec_keyblock, PKT_SECRET_KEY );