diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-06-22 12:56:05 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-06-22 12:56:05 +0800 |
commit | 34993bc0feaa65d15ccc57d49b448b7ad8815775 (patch) | |
tree | 2b92187279bccb0c68bc332324568329838746ae /mail/mail-format.c | |
parent | e1d47e07e9353fcb8cdf7f8ccaef1a82da0a6a2b (diff) | |
download | gsoc2013-evolution-34993bc0feaa65d15ccc57d49b448b7ad8815775.tar.gz gsoc2013-evolution-34993bc0feaa65d15ccc57d49b448b7ad8815775.tar.zst gsoc2013-evolution-34993bc0feaa65d15ccc57d49b448b7ad8815775.zip |
If the pgp type is gpg, then use the gpg context.
2002-06-21 Jeffrey Stedfast <fejj@ximian.com>
* mail-crypto.c (mail_crypto_pgp_mime_part_verify): If the pgp
type is gpg, then use the gpg context.
(mail_crypto_pgp_mime_part_sign): Same.
(mail_crypto_pgp_mime_part_encrypt): Same.
(mail_crypto_pgp_mime_part_decrypt): Same.
* mail-format.c (handle_multipart_signed): Use the new gpg cipher
context.
svn path=/trunk/; revision=17253
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r-- | mail/mail-format.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c index c17e614636..4eeca49f44 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -1839,19 +1839,20 @@ handle_multipart_signed (CamelMimePart *part, const char *mime_type, CamelException ex; const char *message = NULL; gboolean good = FALSE; - CamelPgpContext *context; + CamelCipherContext *cipher; /* Write out the verification results */ /* TODO: use the right context for the right message ... */ camel_exception_init (&ex); - context = camel_pgp_context_new(session, mail_config_get_pgp_type(), mail_config_get_pgp_path()); - if (context) { - valid = camel_multipart_signed_verify(mps, (CamelCipherContext *)context, &ex); + cipher = camel_gpg_context_new (session, mail_config_get_pgp_path ()); + if (cipher) { + valid = camel_multipart_signed_verify (mps, cipher, &ex); + camel_object_unref (CAMEL_OBJECT (cipher)); if (valid) { - good = camel_cipher_validity_get_valid(valid); - message = camel_cipher_validity_get_description(valid); + good = camel_cipher_validity_get_valid (valid); + message = camel_cipher_validity_get_description (valid); } else { - message = camel_exception_get_description(&ex); + message = camel_exception_get_description (&ex); } } else { message = U_("Could not create a PGP verfication context"); |