diff options
author | David Shaw <[email protected]> | 2004-10-13 15:34:52 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-10-13 15:34:52 +0000 |
commit | 9a4dc13d5e34fd93a2c2b59d99894c75eb3d4fce (patch) | |
tree | aed46514ac8908373174ae052b2789a188ca6fbb /g10/g10.c | |
parent | * configure.ac: Actually name the option --disable-finger and not (diff) | |
download | gnupg-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 'g10/g10.c')
-rw-r--r-- | g10/g10.c | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -1507,6 +1507,22 @@ collapse_args(int argc,char *argv[]) return str; } +static void +parse_trust_model(const char *model) +{ + if(ascii_strcasecmp(model,"pgp")==0) + opt.trust_model=TM_PGP; + else if(ascii_strcasecmp(model,"classic")==0) + opt.trust_model=TM_CLASSIC; + else if(ascii_strcasecmp(model,"always")==0) + opt.trust_model=TM_ALWAYS; + else if(ascii_strcasecmp(model,"direct")==0) + opt.trust_model=TM_DIRECT; + else if(ascii_strcasecmp(model,"auto")==0) + opt.trust_model=TM_AUTO; + else + log_error("unknown trust model `%s'\n",model); +} int main( int argc, char **argv ) @@ -1993,16 +2009,7 @@ main( int argc, char **argv ) time. */ case oAlwaysTrust: opt.trust_model=TM_ALWAYS; break; case oTrustModel: - if(ascii_strcasecmp(pargs.r.ret_str,"pgp")==0) - opt.trust_model=TM_PGP; - else if(ascii_strcasecmp(pargs.r.ret_str,"classic")==0) - opt.trust_model=TM_CLASSIC; - else if(ascii_strcasecmp(pargs.r.ret_str,"always")==0) - opt.trust_model=TM_ALWAYS; - else if(ascii_strcasecmp(pargs.r.ret_str,"auto")==0) - opt.trust_model=TM_AUTO; - else - log_error("unknown trust model `%s'\n",pargs.r.ret_str); + parse_trust_model(pargs.r.ret_str); break; case oForceOwnertrust: log_info(_("NOTE: %s is not for normal use!\n"), |