aboutsummaryrefslogtreecommitdiffstats
path: root/g10/trustdb.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-10-13 15:34:52 +0000
committerDavid Shaw <[email protected]>2004-10-13 15:34:52 +0000
commit9a4dc13d5e34fd93a2c2b59d99894c75eb3d4fce (patch)
treeaed46514ac8908373174ae052b2789a188ca6fbb /g10/trustdb.c
parent* configure.ac: Actually name the option --disable-finger and not (diff)
downloadgnupg-9a4dc13d5e34fd93a2c2b59d99894c75eb3d4fce.tar.gz
gnupg-9a4dc13d5e34fd93a2c2b59d99894c75eb3d4fce.zip
* pkclist.c (do_edit_ownertrust): Different prompt when we're using direct
trust since the meaning is different. * keyedit.c (trustsig_prompt): Change the strings to match the ones in pkclist.c:do_edit_ownertrust to make translation easier. * trustdb.c (trust_model_string, get_validity): Add direct trust model which applies to the key as a whole and not per-uid. * options.h, g10.c (parse_trust_model): New. (main): Call it from here to do string-to-trust-model.
Diffstat (limited to '')
-rw-r--r--g10/trustdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c
index 3052281ab..e4e8f812c 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -391,6 +391,7 @@ trust_model_string(void)
case TM_PGP: return "PGP";
case TM_EXTERNAL: return "external";
case TM_ALWAYS: return "always";
+ case TM_DIRECT: return "direct";
default: return "unknown";
}
}
@@ -1034,6 +1035,14 @@ get_validity (PKT_public_key *pk, PKT_user_id *uid)
else
main_pk = pk;
+ if(opt.trust_model==TM_DIRECT)
+ {
+ /* Note that this happens BEFORE any user ID stuff is checked.
+ The direct trust model applies to keys as a whole. */
+ validity=get_ownertrust(main_pk);
+ goto leave;
+ }
+
rc = read_trust_record (main_pk, &trec);
if (rc && rc != -1)
{