From 8738bf7afffc7d2696d6e422e08583d3207ef837 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 21 Feb 2001 17:24:13 +0000 Subject: Changed to use PgpValidity. 2001-02-21 Jeffrey Stedfast * 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 --- mail/mail-crypto.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'mail/mail-crypto.c') 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); -- cgit v1.2.3