mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-12 21:58:50 +01:00
* keyedit.c (no_primary_warning): Cleanup. (menu_expire): Don't give
primary warning for subkey expiration changes. These cannot reorder primaries.
This commit is contained in:
parent
2980b7129f
commit
fd2e1cd717
@ -1,3 +1,9 @@
|
|||||||
|
2004-03-23 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keyedit.c (no_primary_warning): Cleanup.
|
||||||
|
(menu_expire): Don't give primary warning for subkey expiration
|
||||||
|
changes. These cannot reorder primaries.
|
||||||
|
|
||||||
2004-03-22 David Shaw <dshaw@jabberwocky.com>
|
2004-03-22 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* packet.h, getkey.c (fixup_uidnode, merge_selfsigs_subkey): Keep
|
* packet.h, getkey.c (fixup_uidnode, merge_selfsigs_subkey): Keep
|
||||||
|
@ -2075,13 +2075,10 @@ show_key_and_fingerprint( KBNODE keyblock )
|
|||||||
/* Show a warning if no uids on the key have the primary uid flag
|
/* Show a warning if no uids on the key have the primary uid flag
|
||||||
set. */
|
set. */
|
||||||
static void
|
static void
|
||||||
no_primary_warning(KBNODE keyblock, int uids)
|
no_primary_warning(KBNODE keyblock)
|
||||||
{
|
{
|
||||||
KBNODE node;
|
KBNODE node;
|
||||||
int select_all=1,have_uid=0,uid_count=0;
|
int have_primary=0,uid_count=0;
|
||||||
|
|
||||||
if(uids)
|
|
||||||
select_all=!count_selected_uids(keyblock);
|
|
||||||
|
|
||||||
/* TODO: if we ever start behaving differently with a primary or
|
/* TODO: if we ever start behaving differently with a primary or
|
||||||
non-primary attribute ID, we will need to check for attributes
|
non-primary attribute ID, we will need to check for attributes
|
||||||
@ -2094,17 +2091,18 @@ no_primary_warning(KBNODE keyblock, int uids)
|
|||||||
{
|
{
|
||||||
uid_count++;
|
uid_count++;
|
||||||
|
|
||||||
if((select_all || (node->flag & NODFLG_SELUID))
|
if(node->pkt->pkt.user_id->is_primary==2)
|
||||||
&& node->pkt->pkt.user_id->is_primary==2)
|
{
|
||||||
have_uid|=2;
|
have_primary=1;
|
||||||
else
|
break;
|
||||||
have_uid|=1;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(uid_count>1 && have_uid&1 && !(have_uid&2))
|
if(uid_count>1 && !have_primary)
|
||||||
log_info(_("WARNING: no user ID has been marked as primary. This command "
|
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"));
|
" may\n cause a different user ID to become"
|
||||||
|
" the assumed primary.\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************
|
/****************
|
||||||
@ -2603,13 +2601,13 @@ menu_expire( KBNODE pub_keyblock, KBNODE sec_keyblock )
|
|||||||
}
|
}
|
||||||
else if( n1 )
|
else if( n1 )
|
||||||
tty_printf(_("Changing expiration time for a secondary key.\n"));
|
tty_printf(_("Changing expiration time for a secondary key.\n"));
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
tty_printf(_("Changing expiration time for the primary key.\n"));
|
tty_printf(_("Changing expiration time for the primary key.\n"));
|
||||||
mainkey=1;
|
mainkey=1;
|
||||||
|
no_primary_warning(pub_keyblock);
|
||||||
}
|
}
|
||||||
|
|
||||||
no_primary_warning(pub_keyblock,0);
|
|
||||||
|
|
||||||
expiredate = ask_expiredate();
|
expiredate = ask_expiredate();
|
||||||
node = find_kbnode( sec_keyblock, PKT_SECRET_KEY );
|
node = find_kbnode( sec_keyblock, PKT_SECRET_KEY );
|
||||||
sk = copy_secret_key( NULL, node->pkt->pkt.secret_key);
|
sk = copy_secret_key( NULL, node->pkt->pkt.secret_key);
|
||||||
@ -2864,7 +2862,7 @@ menu_set_preferences (KBNODE pub_keyblock, KBNODE sec_keyblock )
|
|||||||
int selected, select_all;
|
int selected, select_all;
|
||||||
int modified = 0;
|
int modified = 0;
|
||||||
|
|
||||||
no_primary_warning(pub_keyblock,1);
|
no_primary_warning(pub_keyblock);
|
||||||
|
|
||||||
select_all = !count_selected_uids (pub_keyblock);
|
select_all = !count_selected_uids (pub_keyblock);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user