diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-02-19 00:20:19 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-02-19 00:20:19 +0800 |
commit | b85cbb139e63d97b646aca22866aa1e440b386c8 (patch) | |
tree | bcc31a01759e6a1b71fd941a5c40197fc41de706 /camel/camel-gpg-context.c | |
parent | 8d4f642268967bcf14edf6d070ffdda19be4cb9f (diff) | |
download | gsoc2013-evolution-b85cbb139e63d97b646aca22866aa1e440b386c8.tar.gz gsoc2013-evolution-b85cbb139e63d97b646aca22866aa1e440b386c8.tar.zst gsoc2013-evolution-b85cbb139e63d97b646aca22866aa1e440b386c8.zip |
Use the trust to decide the validity signature status. (Better way of
2004-02-18 Jeffrey Stedfast <fejj@ximian.com>
* camel-gpg-context.c (gpg_verify): Use the trust to decide the
validity signature status. (Better way of solving yesterday's
problem)
* camel-cipher-context.h: Revert change from yesterday.
svn path=/trunk/; revision=24779
Diffstat (limited to 'camel/camel-gpg-context.c')
-rw-r--r-- | camel/camel-gpg-context.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c index ca235bd0d1..306211ab99 100644 --- a/camel/camel-gpg-context.c +++ b/camel/camel-gpg-context.c @@ -1441,9 +1441,14 @@ gpg_verify (CamelCipherContext *context, CamelMimePart *ipart, CamelException *e valid = gpg_ctx_op_wait (gpg) == 0; validity = camel_cipher_validity_new (); diagnostics = gpg_ctx_get_diagnostics (gpg); - camel_cipher_validity_set_valid (validity, valid); camel_cipher_validity_set_description (validity, diagnostics); - validity->sign.trust = gpg->trust; + if (valid && gpg->trust > GPG_TRUST_NEVER) { + if (gpg->trust == GPG_TRUST_UNDEFINED) + validity->sign.status = CAMEL_CIPHER_VALIDITY_SIGN_UNKNOWN; + else + validity->sign.status = CAMEL_CIPHER_VALIDITY_SIGN_GOOD; + } else + validity->sign.status = CAMEL_CIPHER_VALIDITY_SIGN_BAD; gpg_ctx_free (gpg); if (sigfile) { |