aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-11-07 04:37:27 +0000
committerDavid Shaw <[email protected]>2002-11-07 04:37:27 +0000
commitbf4a8935866e1527224f2463f3fa86d314dde480 (patch)
treecbc3d7dcce4609f7ee67cb1792c22a1d45cdef29 /g10/g10.c
parent* w32reg.c (read_w32_registry_string): Fixed expanding of the environment (diff)
downloadgnupg-bf4a8935866e1527224f2463f3fa86d314dde480.tar.gz
gnupg-bf4a8935866e1527224f2463f3fa86d314dde480.zip
* options.h, g10.c (main), trustdb.c (ask_ownertrust): Add
--force-ownertrust option for debugging purposes. This allows setting a whole keyring to a given trust during an --update-trustdb. Not for normal use - it's just easier than hitting "4" all the time to test a large trustdb.
Diffstat (limited to 'g10/g10.c')
-rw-r--r--g10/g10.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/g10/g10.c b/g10/g10.c
index 365d15fba..19c1828e6 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -206,6 +206,7 @@ enum cmd_and_opt_values { aNull = 0,
oCompressSigs,
oAlwaysTrust,
oTrustModel,
+ oForceOwnertrust,
oEmuChecksumBug,
oRunAsShmCP,
oSetFilename,
@@ -524,6 +525,7 @@ static ARGPARSE_OPTS opts[] = {
{ oDefCertCheckLevel, "default-cert-check-level", 1, "@"},
{ oAlwaysTrust, "always-trust", 0, "@"},
{ oTrustModel, "trust-model", 2, "@"},
+ { oForceOwnertrust, "force-ownertrust", 1, "@"},
{ oEmuChecksumBug, "emulate-checksum-bug", 0, "@"},
{ oRunAsShmCP, "run-as-shm-coprocess", 4, "@" },
{ oSetFilename, "set-filename", 2, "@" },
@@ -1460,6 +1462,15 @@ main( int argc, char **argv )
else
log_error("unknown trust model \"%s\"\n",pargs.r.ret_str);
break;
+ case oForceOwnertrust:
+ log_info(_("NOTE: %s is not for normal use!\n"),
+ "--force-ownertrust");
+ if(pargs.r.ret_int>=TRUST_UNDEFINED
+ && pargs.r.ret_int<=TRUST_ULTIMATE)
+ opt.force_ownertrust=pargs.r.ret_int;
+ else
+ log_error("invalid ownertrust %d\n",pargs.r.ret_int);
+ break;
case oLoadExtension:
#ifndef __riscos__
#if defined(USE_DYNAMIC_LINKING) || defined(__MINGW32__)