aboutsummaryrefslogtreecommitdiffstats
path: root/g10/trustdb.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/trustdb.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/trustdb.c')
-rw-r--r--g10/trustdb.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c
index da05632d7..ffdce2c16 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -1075,13 +1075,24 @@ ask_ownertrust (u32 *kid,int minimum)
return TRUST_UNKNOWN;
}
- ot=edit_ownertrust(pk,0);
- if(ot>0)
- ot = get_ownertrust (pk);
- else if(ot==0)
- ot = minimum?minimum:TRUST_UNDEFINED;
+ if(opt.force_ownertrust)
+ {
+ log_info("force trust for key %08lX to %s\n",(ulong)kid[1],
+ trust_string(opt.force_ownertrust));
+ update_ownertrust(pk,opt.force_ownertrust);
+ ot=opt.force_ownertrust;
+ }
else
- ot = -1; /* quit */
+ {
+ ot=edit_ownertrust(pk,0);
+ if(ot>0)
+ ot = get_ownertrust (pk);
+ else if(ot==0)
+ ot = minimum?minimum:TRUST_UNDEFINED;
+ else
+ ot = -1; /* quit */
+ }
+
free_public_key( pk );
return ot;