aboutsummaryrefslogtreecommitdiffstats
path: root/g10/trustdb.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-11-15 00:19:49 +0000
committerDavid Shaw <[email protected]>2003-11-15 00:19:49 +0000
commitc47ec46526b603a4052873fab3e33ad5f03f758b (patch)
tree3849873131a0e6b3c1a95f791e0733e0414f8d30 /g10/trustdb.c
parent* options.h, g10.c, keyedit.c, keylist.c, mainproc.c: Clarify the (diff)
downloadgnupg-c47ec46526b603a4052873fab3e33ad5f03f758b.tar.gz
gnupg-c47ec46526b603a4052873fab3e33ad5f03f758b.zip
* options.h, trustdb.c (trust_model_string, init_trustdb): Add support for
"external" trust model, where the user can provide a pregenerated trustdb. * keyedit.c (keyedit_menu): Do not allow editing ownertrust with an external trust model trustdb.
Diffstat (limited to 'g10/trustdb.c')
-rw-r--r--g10/trustdb.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c
index be8835807..c9f75b933 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -1,6 +1,6 @@
/* trustdb.c
- * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
- * Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002
+ * 2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -388,10 +388,11 @@ trust_model_string(void)
{
switch(opt.trust_model)
{
- case TM_PGP: return "PGP";
- case TM_CLASSIC: return "classic";
- case TM_ALWAYS: return "always";
- default: return "unknown";
+ case TM_CLASSIC: return "classic";
+ case TM_PGP: return "PGP";
+ case TM_EXTERNAL: return "external";
+ case TM_ALWAYS: return "always";
+ default: return "unknown";
}
}
@@ -438,7 +439,9 @@ init_trustdb()
opt.trust_model=tdbio_read_model();
/* Sanity check this ;) */
- if(opt.trust_model!=TM_CLASSIC && opt.trust_model!=TM_PGP)
+ if(opt.trust_model!=TM_CLASSIC
+ && opt.trust_model!=TM_PGP
+ && opt.trust_model!=TM_EXTERNAL)
{
log_info(_("unable to use unknown trust model (%d) - "
"assuming %s trust model\n"),opt.trust_model,"PGP");