mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* 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.
This commit is contained in:
parent
d771dd272d
commit
bf4a893586
4 changed files with 35 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue