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 | |
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
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/camel-cipher-context.h | 10 | ||||
-rw-r--r-- | camel/camel-gpg-context.c | 8 |
3 files changed, 22 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index b4028f9a76..ba595e60b0 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +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. + 2004-02-17 Not Zed <NotZed@Ximian.com> * camel-vee-store.c (vee_sync): implment, make sync a noop on vee diff --git a/camel/camel-cipher-context.h b/camel/camel-cipher-context.h index 4b5dbaed42..6aef6ab13b 100644 --- a/camel/camel-cipher-context.h +++ b/camel/camel-cipher-context.h @@ -62,6 +62,15 @@ enum _camel_cipher_validity_sign_t { CAMEL_CIPHER_VALIDITY_SIGN_UNKNOWN, }; +enum _camel_cipher_validity_trust_t { + CAMEL_CIPHER_VALIDITY_TRUST_NONE, + CAMEL_CIPHER_VALIDITY_TRUST_NEVER, + CAMEL_CIPHER_VALIDITY_TRUST_UNDEFINED, + CAMEL_CIPHER_VALIDITY_TRUST_MARGINAL, + CAMEL_CIPHER_VALIDITY_TRUST_FULLY, + CAMEL_CIPHER_VALIDITY_TRUST_ULTIMATE +}; + enum _camel_cipher_validity_encrypt_t { CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE, CAMEL_CIPHER_VALIDITY_ENCRYPT_WEAK, @@ -89,6 +98,7 @@ struct _CamelCipherValidity { struct { enum _camel_cipher_validity_sign_t status; + enum _camel_cipher_validity_trust_t trust; char *description; EDList signers; /* CamelCipherCertInfo's */ } sign; 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) { |