diff options
author | Not Zed <NotZed@Ximian.com> | 2003-11-10 20:46:07 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-11-10 20:46:07 +0800 |
commit | bb90a934d50682e2ffc93d307664b20e6e54bee7 (patch) | |
tree | f4b5dd08ce90c3354a3a35892a71592173ba7535 /camel/camel-multipart-encrypted.c | |
parent | 55e9c607f0bac0a0333552885d97d45c5122bd59 (diff) | |
download | gsoc2013-evolution-bb90a934d50682e2ffc93d307664b20e6e54bee7.tar.gz gsoc2013-evolution-bb90a934d50682e2ffc93d307664b20e6e54bee7.tar.zst gsoc2013-evolution-bb90a934d50682e2ffc93d307664b20e6e54bee7.zip |
split out the CMSMessage verification code so it can be used from
2003-11-10 Not Zed <NotZed@Ximian.com>
* camel-smime-context.c (sm_verify_cmsg): split out the CMSMessage
verification code so it can be used from enveloped or externally
signed data.
* camel-cipher-context.c (camel_cipher_verify): only take a
mimepart, internally handle multiparts and the hash.
2003-11-07 Not Zed <NotZed@Ximian.com>
* camel-cipher-context.c: make ciphervalidity a public structure,
added encrypt status.
(camel_cipher_decrypt): changed to return a ciphervalidity. fixed
implementations.
(camel_cipher_validity_*): Fixed implementations to match new
structure, some of this is now redundant.
2003-11-06 Not Zed <NotZed@Ximian.com>
* camel-smime-context.c (camel_smime_context_describe_part):
implement.
svn path=/trunk/; revision=23242
Diffstat (limited to 'camel/camel-multipart-encrypted.c')
-rw-r--r-- | camel/camel-multipart-encrypted.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/camel/camel-multipart-encrypted.c b/camel/camel-multipart-encrypted.c index 2dfe3b4914..aa036bec23 100644 --- a/camel/camel-multipart-encrypted.c +++ b/camel/camel-multipart-encrypted.c @@ -205,6 +205,7 @@ camel_multipart_encrypted_decrypt (CamelMultipartEncrypted *mpe, { CamelMimePart *version_part, *encrypted_part, *decrypted_part; CamelContentType *mime_type; + CamelCipherValidity *valid; CamelDataWrapper *wrapper; const char *protocol; char *content_type; @@ -256,11 +257,16 @@ camel_multipart_encrypted_decrypt (CamelMultipartEncrypted *mpe, _("Failed to decrypt MIME part: invalid structure")); return NULL; } - - decrypted_part = camel_cipher_decrypt(cipher, encrypted_part, ex); - if (decrypted_part) { - camel_object_ref (decrypted_part); + + decrypted_part = camel_mime_part_new(); + valid = camel_cipher_decrypt(cipher, encrypted_part, decrypted_part, ex); + if (valid) { + camel_object_ref(decrypted_part); mpe->decrypted = decrypted_part; + camel_cipher_validity_free(valid); + } else { + camel_object_ref(decrypted_part); + decrypted_part = NULL; } return decrypted_part; |