From 34993bc0feaa65d15ccc57d49b448b7ad8815775 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 22 Jun 2002 04:56:05 +0000 Subject: If the pgp type is gpg, then use the gpg context. 2002-06-21 Jeffrey Stedfast * 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 --- mail/mail-format.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'mail/mail-format.c') 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"); -- cgit v1.2.3