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

See ChangeLog: Tue Jun 29 21:44:25 CEST 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-06-29 19:50:54 +00:00
parent 38c47646ea
commit 75ed03c960
29 changed files with 1025 additions and 1284 deletions

View file

@ -59,6 +59,7 @@ static int count_selected_uids( KBNODE keyblock );
static int count_selected_keys( KBNODE keyblock );
static int menu_revsig( KBNODE keyblock );
static int menu_revkey( KBNODE pub_keyblock, KBNODE sec_keyblock );
static int enable_disable_key( KBNODE keyblock, int disable );
#define CONTROL_D ('D' - 'A' + 1)
@ -550,6 +551,7 @@ keyedit_menu( const char *username, STRLIST locusr, STRLIST commands )
cmdLSIGN, cmdREVSIG, cmdREVKEY, cmdDELSIG,
cmdDEBUG, cmdSAVE, cmdADDUID, cmdDELUID, cmdADDKEY, cmdDELKEY,
cmdTOGGLE, cmdSELKEY, cmdPASSWD, cmdTRUST, cmdPREF, cmdEXPIRE,
cmdENABLEKEY, cmdDISABLEKEY,
cmdNOP };
static struct { const char *name;
enum cmdids id;
@ -586,6 +588,8 @@ keyedit_menu( const char *username, STRLIST locusr, STRLIST commands )
{ N_("trust") , cmdTRUST , 0, N_("change the ownertrust") },
{ N_("revsig") , cmdREVSIG , 0, N_("revoke signatures") },
{ N_("revkey") , cmdREVKEY , 1, N_("revoke a secondary key") },
{ N_("disable") , cmdDISABLEKEY , 0, N_("disable a key") },
{ N_("enable") , cmdENABLEKEY , 0, N_("enable a key") },
{ NULL, cmdNONE } };
enum cmdids cmd;
@ -662,7 +666,7 @@ keyedit_menu( const char *username, STRLIST locusr, STRLIST commands )
have_commands = 0;
}
if( !have_commands ) {
answer = cpr_get("keyedit.cmd", _("Command> "));
answer = cpr_get("", _("Command> "));
cpr_kill_prompt();
}
trim_spaces(answer);
@ -842,12 +846,10 @@ keyedit_menu( const char *username, STRLIST locusr, STRLIST commands )
break;
case cmdADDKEY:
secmem_dump_stats();
if( generate_subkeypair( keyblock, sec_keyblock ) ) {
redisplay = 1;
sec_modified = modified = 1;
}
secmem_dump_stats();
break;
@ -934,6 +936,14 @@ keyedit_menu( const char *username, STRLIST locusr, STRLIST commands )
}
break;
case cmdENABLEKEY:
case cmdDISABLEKEY:
if( enable_disable_key( keyblock, cmd == cmdDISABLEKEY ) ) {
redisplay = 1;
modified = 1;
}
break;
default:
tty_printf("\n");
tty_printf(_("Invalid command (try \"help\")\n"));
@ -1859,3 +1869,15 @@ menu_revkey( KBNODE pub_keyblock, KBNODE sec_keyblock )
}
static int
enable_disable_key( KBNODE keyblock, int disable )
{
int entire;
int changed = 0;
entire = !count_selected_keys( keyblock );
return changed;
}