aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-cipher-context.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-07-13 12:05:10 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-07-13 12:05:10 +0800
commit0a3341dda86ee8068183aec18289e8a70afea709 (patch)
treea11521a6cfe1b4960307123582b929c1a0516da7 /camel/camel-cipher-context.c
parentae2cc62f2c4e1a4476e77afa853d3c1563c8234f (diff)
downloadgsoc2013-evolution-0a3341dda86ee8068183aec18289e8a70afea709.tar
gsoc2013-evolution-0a3341dda86ee8068183aec18289e8a70afea709.tar.gz
gsoc2013-evolution-0a3341dda86ee8068183aec18289e8a70afea709.tar.bz2
gsoc2013-evolution-0a3341dda86ee8068183aec18289e8a70afea709.tar.lz
gsoc2013-evolution-0a3341dda86ee8068183aec18289e8a70afea709.tar.xz
gsoc2013-evolution-0a3341dda86ee8068183aec18289e8a70afea709.tar.zst
gsoc2013-evolution-0a3341dda86ee8068183aec18289e8a70afea709.zip
** This is no guarantee of security, but its just a helper to prevent old
2004-07-09 Not Zed <NotZed@Ximian.com> ** This is no guarantee of security, but its just a helper to prevent old memory accidentally being included/used elsewhere. * camel-smime-context.c (sm_decrypt): mark the output stream 'secure'. * camel-gpg-context.c (gpg_decrypt): set the output stream to secured, so we automagically blank it out on finalise. * camel-stream-mem.c (camel_stream_mem_set_secure): set the memory-stream 'secured', all we do at the moment is blank out the buffer on finalise. (camel_stream_mem_set_byte_array, camel_stream_mem_finalize): clear memory if owner and secured. kill dead comment. (clear_mem): utilitiy to set memory to 0xABADF00D 2004-07-08 Not Zed <NotZed@Ximian.com> ** See bug #61186. * camel-cipher-context.c (camel_cipher_sign): (camel_cipher_verify, camel_cipher_encrypt, camel_cipher_decrypt): Add preliminary progress reporting. svn path=/trunk/; revision=26629
Diffstat (limited to 'camel/camel-cipher-context.c')
-rw-r--r--camel/camel-cipher-context.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
index 5725470855..f2c017e9c3 100644
--- a/camel/camel-cipher-context.c
+++ b/camel/camel-cipher-context.c
@@ -31,6 +31,7 @@
#include "camel-cipher-context.h"
#include "camel-stream.h"
+#include "camel-operation.h"
#include "camel-mime-utils.h"
#include "camel-medium.h"
@@ -123,13 +124,17 @@ camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherH
int retval;
g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-
+
+ camel_operation_start(NULL, _("Signing message"));
+
CIPHER_LOCK(context);
retval = CCC_CLASS (context)->sign (context, userid, hash, ipart, opart, ex);
CIPHER_UNLOCK(context);
-
+
+ camel_operation_end(NULL);
+
return retval;
}
@@ -163,11 +168,15 @@ camel_cipher_verify (CamelCipherContext *context, struct _CamelMimePart *ipart,
g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), NULL);
+ camel_operation_start(NULL, _("Verifying message"));
+
CIPHER_LOCK(context);
valid = CCC_CLASS (context)->verify (context, ipart, ex);
CIPHER_UNLOCK(context);
+
+ camel_operation_end(NULL);
return valid;
}
@@ -202,12 +211,16 @@ camel_cipher_encrypt (CamelCipherContext *context, const char *userid, GPtrArray
int retval;
g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
+
+ camel_operation_start(NULL, _("Encrypting message"));
CIPHER_LOCK(context);
retval = CCC_CLASS (context)->encrypt (context, userid, recipients, ipart, opart, ex);
CIPHER_UNLOCK(context);
+
+ camel_operation_end(NULL);
return retval;
}
@@ -237,12 +250,16 @@ camel_cipher_decrypt(CamelCipherContext *context, struct _CamelMimePart *ipart,
CamelCipherValidity *valid;
g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), NULL);
+
+ camel_operation_start(NULL, _("Decrypting message"));
CIPHER_LOCK(context);
valid = CCC_CLASS (context)->decrypt (context, ipart, opart, ex);
CIPHER_UNLOCK(context);
+
+ camel_operation_end(NULL);
return valid;
}