mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
* keyedit.c (menu_deluid): Only cause a trust update if we delete a
non-revoked user id. * hkp.c (hkp_ask_import), keyserver.c (parse_keyserver_options, keyserver_spawn), options.h: Remove fast-import keyserver option (no longer meaningful). * g10.c (main), keyedit.c (sign_uids), options.h: Change --default-check-level to --default-cert-check-level as it makes clear what it operates on. * g10.c (main): --pgp6 also implies --no-ask-sig-expire. * delkey.c (do_delete_key): Comment.
This commit is contained in:
parent
5aab7388df
commit
f06ee291db
@ -1,5 +1,20 @@
|
|||||||
2002-04-19 David Shaw <dshaw@jabberwocky.com>
|
2002-04-19 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keyedit.c (menu_deluid): Only cause a trust update if we delete
|
||||||
|
a non-revoked user id.
|
||||||
|
|
||||||
|
* hkp.c (hkp_ask_import), keyserver.c (parse_keyserver_options,
|
||||||
|
keyserver_spawn), options.h: Remove fast-import keyserver option
|
||||||
|
(no longer meaningful).
|
||||||
|
|
||||||
|
* g10.c (main), keyedit.c (sign_uids), options.h: Change
|
||||||
|
--default-check-level to --default-cert-check-level as it makes
|
||||||
|
clear what it operates on.
|
||||||
|
|
||||||
|
* g10.c (main): --pgp6 also implies --no-ask-sig-expire.
|
||||||
|
|
||||||
|
* delkey.c (do_delete_key): Comment.
|
||||||
|
|
||||||
* keyedit.c (sign_uids, keyedit_menu, menu_deluid, menu_delsig,
|
* keyedit.c (sign_uids, keyedit_menu, menu_deluid, menu_delsig,
|
||||||
menu_expire, menu_revsig, menu_revkey): Only force a trustdb check
|
menu_expire, menu_revsig, menu_revkey): Only force a trustdb check
|
||||||
if we did something that changes it.
|
if we did something that changes it.
|
||||||
|
@ -156,6 +156,11 @@ do_delete_key( const char *username, int secret, int *r_sec_avail )
|
|||||||
log_error (_("deleting keyblock failed: %s\n"), g10_errstr(rc) );
|
log_error (_("deleting keyblock failed: %s\n"), g10_errstr(rc) );
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Note that the ownertrust being cleared will trigger a
|
||||||
|
revalidation_mark(). This makes sense - only deleting keys
|
||||||
|
that have ownertrust set should trigger this. */
|
||||||
|
|
||||||
if (!secret && pk && clear_ownertrust (pk)) {
|
if (!secret && pk && clear_ownertrust (pk)) {
|
||||||
if (opt.verbose)
|
if (opt.verbose)
|
||||||
log_info (_("ownertrust information cleared\n"));
|
log_info (_("ownertrust information cleared\n"));
|
||||||
|
@ -133,7 +133,7 @@ enum cmd_and_opt_values { aNull = 0,
|
|||||||
oWithFingerprint,
|
oWithFingerprint,
|
||||||
oAnswerYes,
|
oAnswerYes,
|
||||||
oAnswerNo,
|
oAnswerNo,
|
||||||
oDefCheckLevel,
|
oDefCertCheckLevel,
|
||||||
oKeyring,
|
oKeyring,
|
||||||
oSecretKeyring,
|
oSecretKeyring,
|
||||||
oShowKeyring,
|
oShowKeyring,
|
||||||
@ -471,7 +471,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
{ oSkipVerify, "skip-verify",0, "@" },
|
{ oSkipVerify, "skip-verify",0, "@" },
|
||||||
{ oCompressKeys, "compress-keys",0, "@"},
|
{ oCompressKeys, "compress-keys",0, "@"},
|
||||||
{ oCompressSigs, "compress-sigs",0, "@"},
|
{ oCompressSigs, "compress-sigs",0, "@"},
|
||||||
{ oDefCheckLevel, "default-check-level", 1, "@"},
|
{ oDefCertCheckLevel, "default-cert-check-level", 1, "@"},
|
||||||
{ oAlwaysTrust, "always-trust", 0, "@"},
|
{ oAlwaysTrust, "always-trust", 0, "@"},
|
||||||
{ oEmuChecksumBug, "emulate-checksum-bug", 0, "@"},
|
{ oEmuChecksumBug, "emulate-checksum-bug", 0, "@"},
|
||||||
{ oRunAsShmCP, "run-as-shm-coprocess", 4, "@" },
|
{ oRunAsShmCP, "run-as-shm-coprocess", 4, "@" },
|
||||||
@ -1026,7 +1026,7 @@ main( int argc, char **argv )
|
|||||||
break;
|
break;
|
||||||
case oNoArmor: opt.no_armor=1; opt.armor=0; break;
|
case oNoArmor: opt.no_armor=1; opt.armor=0; break;
|
||||||
case oNoDefKeyring: default_keyring = 0; break;
|
case oNoDefKeyring: default_keyring = 0; break;
|
||||||
case oDefCheckLevel: opt.def_check_level=pargs.r.ret_int; break;
|
case oDefCertCheckLevel: opt.def_cert_check_level=pargs.r.ret_int; break;
|
||||||
case oNoGreeting: nogreeting = 1; break;
|
case oNoGreeting: nogreeting = 1; break;
|
||||||
case oNoVerbose: g10_opt_verbose = 0;
|
case oNoVerbose: g10_opt_verbose = 0;
|
||||||
opt.verbose = 0; opt.list_sigs=0; break;
|
opt.verbose = 0; opt.list_sigs=0; break;
|
||||||
@ -1439,6 +1439,7 @@ main( int argc, char **argv )
|
|||||||
opt.no_comment=1;
|
opt.no_comment=1;
|
||||||
opt.escape_from=1;
|
opt.escape_from=1;
|
||||||
opt.force_v3_sigs=1;
|
opt.force_v3_sigs=1;
|
||||||
|
opt.ask_sig_expire=0;
|
||||||
opt.def_compress_algo=1;
|
opt.def_compress_algo=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1496,7 +1497,7 @@ main( int argc, char **argv )
|
|||||||
log_error(_("invalid S2K mode; must be 0, 1 or 3\n"));
|
log_error(_("invalid S2K mode; must be 0, 1 or 3\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(opt.def_check_level<0 || opt.def_check_level>3)
|
if(opt.def_cert_check_level<0 || opt.def_cert_check_level>3)
|
||||||
log_error(_("invalid default-check-level; must be 0, 1, 2, or 3\n"));
|
log_error(_("invalid default-check-level; must be 0, 1, 2, or 3\n"));
|
||||||
|
|
||||||
if (preference_list && keygen_set_std_prefs (preference_list))
|
if (preference_list && keygen_set_std_prefs (preference_list))
|
||||||
|
@ -96,8 +96,7 @@ hkp_ask_import( KEYDB_SEARCH_DESC *desc, void *stats_handle)
|
|||||||
: g10_errstr(rc) );
|
: g10_errstr(rc) );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rc = import_keys_stream( hd.fp_read,
|
rc = import_keys_stream( hd.fp_read, 0, stats_handle);
|
||||||
opt.keyserver_options.fast_import,stats_handle);
|
|
||||||
http_close( &hd );
|
http_close( &hd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,7 +486,7 @@ sign_uids( KBNODE keyblock, STRLIST locusr, int *ret_modified,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(opt.batch)
|
if(opt.batch)
|
||||||
class=0x10+opt.def_check_level;
|
class=0x10+opt.def_cert_check_level;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *answer;
|
char *answer;
|
||||||
@ -496,13 +496,13 @@ sign_uids( KBNODE keyblock, STRLIST locusr, int *ret_modified,
|
|||||||
"above? If you don't know what to answer, enter \"0\".\n"));
|
"above? If you don't know what to answer, enter \"0\".\n"));
|
||||||
tty_printf("\n");
|
tty_printf("\n");
|
||||||
tty_printf(_(" (0) I will not answer.%s\n"),
|
tty_printf(_(" (0) I will not answer.%s\n"),
|
||||||
opt.def_check_level==0?" (default)":"");
|
opt.def_cert_check_level==0?" (default)":"");
|
||||||
tty_printf(_(" (1) I have not checked at all.%s\n"),
|
tty_printf(_(" (1) I have not checked at all.%s\n"),
|
||||||
opt.def_check_level==1?" (default)":"");
|
opt.def_cert_check_level==1?" (default)":"");
|
||||||
tty_printf(_(" (2) I have done casual checking.%s\n"),
|
tty_printf(_(" (2) I have done casual checking.%s\n"),
|
||||||
opt.def_check_level==2?" (default)":"");
|
opt.def_cert_check_level==2?" (default)":"");
|
||||||
tty_printf(_(" (3) I have done very careful checking.%s\n"),
|
tty_printf(_(" (3) I have done very careful checking.%s\n"),
|
||||||
opt.def_check_level==3?" (default)":"");
|
opt.def_cert_check_level==3?" (default)":"");
|
||||||
tty_printf("\n");
|
tty_printf("\n");
|
||||||
|
|
||||||
while(class==0)
|
while(class==0)
|
||||||
@ -510,7 +510,7 @@ sign_uids( KBNODE keyblock, STRLIST locusr, int *ret_modified,
|
|||||||
answer = cpr_get("sign_uid.class",_("Your selection? "));
|
answer = cpr_get("sign_uid.class",_("Your selection? "));
|
||||||
|
|
||||||
if(answer[0]=='\0')
|
if(answer[0]=='\0')
|
||||||
class=0x10+opt.def_check_level; /* Default */
|
class=0x10+opt.def_cert_check_level; /* Default */
|
||||||
else if(strcasecmp(answer,"0")==0)
|
else if(strcasecmp(answer,"0")==0)
|
||||||
class=0x10; /* Generic */
|
class=0x10; /* Generic */
|
||||||
else if(strcasecmp(answer,"1")==0)
|
else if(strcasecmp(answer,"1")==0)
|
||||||
@ -1758,8 +1758,11 @@ menu_deluid( KBNODE pub_keyblock, KBNODE sec_keyblock )
|
|||||||
if( node->pkt->pkttype == PKT_USER_ID ) {
|
if( node->pkt->pkttype == PKT_USER_ID ) {
|
||||||
selected = node->flag & NODFLG_SELUID;
|
selected = node->flag & NODFLG_SELUID;
|
||||||
if( selected ) {
|
if( selected ) {
|
||||||
|
/* Only cause a trust update if we delete a
|
||||||
|
non-revoked user id */
|
||||||
|
if(!node->pkt->pkt.user_id->is_revoked)
|
||||||
|
update_trust=1;
|
||||||
delete_kbnode( node );
|
delete_kbnode( node );
|
||||||
update_trust=1;
|
|
||||||
if( sec_keyblock ) {
|
if( sec_keyblock ) {
|
||||||
KBNODE snode;
|
KBNODE snode;
|
||||||
int s_selected = 0;
|
int s_selected = 0;
|
||||||
|
@ -51,11 +51,7 @@ parse_keyserver_options(char *options)
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if(strcasecmp(tok,"fast-import")==0)
|
if(strcasecmp(tok,"include-revoked")==0)
|
||||||
opt.keyserver_options.fast_import=1;
|
|
||||||
else if(strcasecmp(tok,"no-fast-import")==0)
|
|
||||||
opt.keyserver_options.fast_import=0;
|
|
||||||
else if(strcasecmp(tok,"include-revoked")==0)
|
|
||||||
opt.keyserver_options.include_revoked=1;
|
opt.keyserver_options.include_revoked=1;
|
||||||
else if(strcasecmp(tok,"no-include-revoked")==0)
|
else if(strcasecmp(tok,"no-include-revoked")==0)
|
||||||
opt.keyserver_options.include_revoked=0;
|
opt.keyserver_options.include_revoked=0;
|
||||||
@ -518,8 +514,7 @@ keyserver_spawn(int action,STRLIST list,
|
|||||||
do this could be to continue parsing this line-by-line and
|
do this could be to continue parsing this line-by-line and
|
||||||
make a temp iobuf for each key. */
|
make a temp iobuf for each key. */
|
||||||
|
|
||||||
import_keys_stream(spawn->fromchild,
|
import_keys_stream(spawn->fromchild,0,stats_handle);
|
||||||
opt.keyserver_options.fast_import,stats_handle);
|
|
||||||
|
|
||||||
import_print_stats(stats_handle);
|
import_print_stats(stats_handle);
|
||||||
import_release_stats_handle(stats_handle);
|
import_release_stats_handle(stats_handle);
|
||||||
|
@ -68,7 +68,7 @@ struct {
|
|||||||
const char *def_secret_key;
|
const char *def_secret_key;
|
||||||
char *def_recipient;
|
char *def_recipient;
|
||||||
int def_recipient_self;
|
int def_recipient_self;
|
||||||
int def_check_level;
|
int def_cert_check_level;
|
||||||
int no_comment;
|
int no_comment;
|
||||||
int no_version;
|
int no_version;
|
||||||
int marginals_needed;
|
int marginals_needed;
|
||||||
@ -105,7 +105,6 @@ struct {
|
|||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int verbose;
|
int verbose;
|
||||||
int fast_import:1;
|
|
||||||
int include_revoked:1;
|
int include_revoked:1;
|
||||||
int include_disabled:1;
|
int include_disabled:1;
|
||||||
int use_temp_files:1;
|
int use_temp_files:1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user