aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tdbio.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-05-01 21:37:08 +0000
committerDavid Shaw <[email protected]>2003-05-01 21:37:08 +0000
commitf861b6488ecc87e8dbc3ab45a1eca3189cf24834 (patch)
tree9a30d79c54be728b724398288db9d7c438bedd09 /g10/tdbio.c
parent* build-packet.c (build_sig_subpkt): Comments. (diff)
downloadgnupg-f861b6488ecc87e8dbc3ab45a1eca3189cf24834.tar.gz
gnupg-f861b6488ecc87e8dbc3ab45a1eca3189cf24834.zip
* tdbio.c (create_version_record): Only create new trustdbs with
TM_CLASSIC or TM_PGP. * trustdb.h, trustdb.c (trust_string, get_ownertrust_string, get_validity_string, ask_ownertrust, validate_keys), pkclist.c (do_edit_ownertrust): Rename trust_string to trust_value_to_string for naming consistency. * trustdb.h, trustdb.c (string_to_trust_value): New function to translate a string to a trust value. * g10.c (main): Use string_to_trust_value here for --force-ownertrust. * options.h, g10.c (main), trustdb.c (trust_model_string, init_trustdb, check_trustdb, update_trustdb, get_validity, validate_one_keyblock): An "OpenPGP" trust model is misleading since there is no official OpenPGP trust model. Use "PGP" instead.
Diffstat (limited to 'g10/tdbio.c')
-rw-r--r--g10/tdbio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/tdbio.c b/g10/tdbio.c
index e331d1ada..bc609adee 100644
--- a/g10/tdbio.c
+++ b/g10/tdbio.c
@@ -453,7 +453,10 @@ create_version_record (void)
rec.r.ver.marginals = opt.marginals_needed;
rec.r.ver.completes = opt.completes_needed;
rec.r.ver.cert_depth = opt.max_cert_depth;
- rec.r.ver.trust_model = opt.trust_model;
+ if(opt.trust_model==TM_PGP || opt.trust_model==TM_CLASSIC)
+ rec.r.ver.trust_model = opt.trust_model;
+ else
+ rec.r.ver.trust_model = TM_PGP;
rec.rectype = RECTYPE_VER;
rec.recnum = 0;
rc = tdbio_write_record( &rec );