aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-crypto.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-02-22 01:24:13 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-02-22 01:24:13 +0800
commit8738bf7afffc7d2696d6e422e08583d3207ef837 (patch)
tree0ae98fda61c372b0e7939b66de995f767d5f2f2c /mail/mail-crypto.c
parent782a42ee7d5ee47607d742a3201715e4201f2e3a (diff)
downloadgsoc2013-evolution-8738bf7afffc7d2696d6e422e08583d3207ef837.tar
gsoc2013-evolution-8738bf7afffc7d2696d6e422e08583d3207ef837.tar.gz
gsoc2013-evolution-8738bf7afffc7d2696d6e422e08583d3207ef837.tar.bz2
gsoc2013-evolution-8738bf7afffc7d2696d6e422e08583d3207ef837.tar.lz
gsoc2013-evolution-8738bf7afffc7d2696d6e422e08583d3207ef837.tar.xz
gsoc2013-evolution-8738bf7afffc7d2696d6e422e08583d3207ef837.tar.zst
gsoc2013-evolution-8738bf7afffc7d2696d6e422e08583d3207ef837.zip
Changed to use PgpValidity.
2001-02-21 Jeffrey Stedfast <fejj@ximian.com> * mail-crypto.c (pgp_mime_part_verify): Changed to use PgpValidity. * openpgp-utils.c (openpgp_verify): Return a PgpValidity and set the description as UTF-8 for later use in mail-format.c when writing to GtkHTML. * mail-format.c (try_inline_pgp_sig): Updated to use the new PgpValidity code. (handle_multipart_signed): Updated. svn path=/trunk/; revision=8320
Diffstat (limited to 'mail/mail-crypto.c')
-rw-r--r--mail/mail-crypto.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/mail/mail-crypto.c b/mail/mail-crypto.c
index 7d7369c488..efef0f09e1 100644
--- a/mail/mail-crypto.c
+++ b/mail/mail-crypto.c
@@ -245,13 +245,9 @@ pgp_mime_part_sign (CamelMimePart **mime_part, const gchar *userid, PgpHashType
* @mime_part: a multipart/signed MIME Part
* @ex: exception
*
- * Returns TRUE if the signature is valid otherwise returns
- * FALSE. Note: you may want to check the exception if it fails as
- * there may be useful information to give to the user; example:
- * verification may have failed merely because the user doesn't have
- * the sender's key on her system.
+ * Returns a PgpValidity on success or NULL on fail.
**/
-gboolean
+PgpValidity *
pgp_mime_part_verify (CamelMimePart *mime_part, CamelException *ex)
{
CamelDataWrapper *wrapper;
@@ -261,13 +257,13 @@ pgp_mime_part_verify (CamelMimePart *mime_part, CamelException *ex)
CamelMimeFilter *crlf_filter;
CamelStream *stream;
GByteArray *content, *signature;
- gboolean valid = FALSE;
+ PgpValidity *valid;
- g_return_val_if_fail (mime_part != NULL, FALSE);
- g_return_val_if_fail (CAMEL_IS_MIME_PART (mime_part), FALSE);
+ g_return_val_if_fail (mime_part != NULL, NULL);
+ g_return_val_if_fail (CAMEL_IS_MIME_PART (mime_part), NULL);
if (!mail_crypto_is_rfc2015_signed (mime_part))
- return FALSE;
+ return NULL;
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
multipart = CAMEL_MULTIPART (wrapper);