aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.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-format.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-format.c')
-rw-r--r--mail/mail-format.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c
index a580796e4d..7517ac95bd 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -990,7 +990,7 @@ try_inline_pgp_sig (char *start, MailDisplay *md)
{
char *end, *ciphertext, *plaintext;
CamelException *ex;
- gboolean valid;
+ PgpValidity *valid;
end = strstr (start, "-----END PGP SIGNATURE-----");
if (!end)
@@ -1010,11 +1010,11 @@ try_inline_pgp_sig (char *start, MailDisplay *md)
g_free (plaintext);
/* Now display the "seal-of-authenticity" or something... */
- if (valid) {
+ if (openpgp_validity_get_valid (valid)) {
mail_html_write (md->html, md->stream,
"<hr>\n<table><tr valign=top>"
"<td><img src=\"%s\"></td>"
- "<td><font size=-1>%s<br><br></font></td></table>",
+ "<td><font size=-1>%s<br><br>",
get_url_for_icon ("wax-seal2.png", md),
_("This message is digitally signed and "
"has been found to be authentic."));
@@ -1026,13 +1026,18 @@ try_inline_pgp_sig (char *start, MailDisplay *md)
get_url_for_icon ("wax-seal-broken.png", md),
_("This message is digitally signed but can "
"not be proven to be authentic."));
+ }
+
+ if (openpgp_validity_get_description (valid)) {
mail_error_write (md->html, md->stream,
- camel_exception_get_description (ex));
- mail_html_write (md->html, md->stream,
- "<br><br></font></td></table>");
+ openpgp_validity_get_description (valid));
+ mail_html_write (md->html, md->stream, "<br><br>");
}
+ mail_html_write (md->html, md->stream, "</font></td></table>");
+
camel_exception_free (ex);
+ openpgp_validity_free (valid);
return end;
}
@@ -1363,7 +1368,7 @@ handle_multipart_signed (CamelMimePart *part, const char *mime_type,
CamelMultipart *mp;
CamelException *ex;
gboolean output = FALSE;
- gboolean valid;
+ PgpValidity *valid;
int nparts, i;
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
@@ -1390,11 +1395,11 @@ handle_multipart_signed (CamelMimePart *part, const char *mime_type,
}
/* Now display the "seal-of-authenticity" or something... */
- if (valid) {
+ if (openpgp_validity_get_valid (valid)) {
mail_html_write (md->html, md->stream,
"<hr>\n<table><tr valign=top>"
"<td><img src=\"%s\"></td>"
- "<td><font size=-1>%s<br><br></font></td></table>",
+ "<td><font size=-1>%s<br><br>",
get_url_for_icon ("wax-seal2.png", md),
_("This message is digitally signed and "
"has been found to be authentic."));
@@ -1406,12 +1411,18 @@ handle_multipart_signed (CamelMimePart *part, const char *mime_type,
get_url_for_icon ("wax-seal-broken.png", md),
_("This message is digitally signed but can "
"not be proven to be authentic."));
+ }
+
+ if (openpgp_validity_get_description (valid)) {
mail_error_write (md->html, md->stream,
- camel_exception_get_description (ex));
- mail_html_write (md->html, md->stream,
- "<br><br></font></td></table>");
+ openpgp_validity_get_description (valid));
+ mail_html_write (md->html, md->stream, "<br><br>");
}
+
+ mail_html_write (md->html, md->stream, "</font></td></table>");
+
camel_exception_free (ex);
+ openpgp_validity_free (valid);
return TRUE;
}