diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-02-18 03:45:48 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-02-18 03:45:48 +0800 |
commit | 9e55ed8c3fac87a040f9ebc38885632cabc0a516 (patch) | |
tree | c758521468c0df4df2b19b87cf0b1bd0b5e7047e /camel/camel-gpg-context.c | |
parent | 0e572dcbe55f695ecbf05dccc5b525211e9a14b5 (diff) | |
download | gsoc2013-evolution-9e55ed8c3fac87a040f9ebc38885632cabc0a516.tar.gz gsoc2013-evolution-9e55ed8c3fac87a040f9ebc38885632cabc0a516.tar.zst gsoc2013-evolution-9e55ed8c3fac87a040f9ebc38885632cabc0a516.zip |
Set the trust.
2004-02-17 Jeffrey Stedfast <fejj@ximian.com>
* camel-gpg-context.c (gpg_verify): Set the trust.
* camel-cipher-context.h: Add a trust metric to signatures.
svn path=/trunk/; revision=24763
Diffstat (limited to 'camel/camel-gpg-context.c')
-rw-r--r-- | camel/camel-gpg-context.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c index 4a0e1151c9..ca235bd0d1 100644 --- a/camel/camel-gpg-context.c +++ b/camel/camel-gpg-context.c @@ -156,8 +156,9 @@ enum _GpgCtxMode { }; enum _GpgTrustMetric { - GPG_TRUST_UNKNOWN, + GPG_TRUST_NONE, GPG_TRUST_NEVER, + GPG_TRUST_UNDEFINED, GPG_TRUST_MARGINAL, GPG_TRUST_FULLY, GPG_TRUST_ULTIMATE @@ -260,7 +261,7 @@ gpg_ctx_new (CamelSession *session) gpg->passwd = NULL; gpg->validsig = FALSE; - gpg->trust = GPG_TRUST_UNKNOWN; + gpg->trust = GPG_TRUST_NONE; gpg->istream = NULL; gpg->ostream = NULL; @@ -832,6 +833,8 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg, CamelException *ex) gpg->trust = GPG_TRUST_FULLY; } else if (!strncmp (status, "ULTIMATE", 8)) { gpg->trust = GPG_TRUST_ULTIMATE; + } else if (!strncmp (status, "UNDEFINED", 9)) { + gpg->trust = GPG_TRUST_UNDEFINED; } } else if (!strncmp (status, "VALIDSIG", 8)) { gpg->validsig = TRUE; @@ -1440,6 +1443,7 @@ gpg_verify (CamelCipherContext *context, CamelMimePart *ipart, CamelException *e 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; gpg_ctx_free (gpg); if (sigfile) { |