aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-04-15 05:20:44 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-04-15 05:20:44 +0800
commit6dce8c2f32c5738b78a6e7b26e15db8b562981e5 (patch)
treeaebfee2db412300d6aced0fe044067292f5bb564 /camel
parent1d4c16a76ac2886fc626b7f64ff1f6f284cc9c9f (diff)
downloadgsoc2013-evolution-6dce8c2f32c5738b78a6e7b26e15db8b562981e5.tar
gsoc2013-evolution-6dce8c2f32c5738b78a6e7b26e15db8b562981e5.tar.gz
gsoc2013-evolution-6dce8c2f32c5738b78a6e7b26e15db8b562981e5.tar.bz2
gsoc2013-evolution-6dce8c2f32c5738b78a6e7b26e15db8b562981e5.tar.lz
gsoc2013-evolution-6dce8c2f32c5738b78a6e7b26e15db8b562981e5.tar.xz
gsoc2013-evolution-6dce8c2f32c5738b78a6e7b26e15db8b562981e5.tar.zst
gsoc2013-evolution-6dce8c2f32c5738b78a6e7b26e15db8b562981e5.zip
Check to make sure the context is a valid context in all the user
2001-04-14 Jeffrey Stedfast <fejj@ximian.com> * camel-cipher-context.c: Check to make sure the context is a valid context in all the user functions. svn path=/trunk/; revision=9314
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-cipher-context.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 269e29bdc4..c4b0a513ab 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-cipher-context.c: Check to make sure the context is a
+ valid context in all the user functions.
+
2001-04-13 Jon Trowbridge <trow@ximian.com>
* providers/imap/camel-imap-store.c (imap_disconnect):
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
index 1f6f4af3ec..dde023eb10 100644
--- a/camel/camel-cipher-context.c
+++ b/camel/camel-cipher-context.c
@@ -189,6 +189,8 @@ camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherH
{
int retval;
+ g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
+
CIPHER_LOCK(context);
retval = CCC_CLASS (context)->sign (context, userid, hash, istream, ostream, ex);
@@ -227,6 +229,8 @@ camel_cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCi
{
int retval;
+ g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
+
CIPHER_LOCK(context);
retval = CCC_CLASS (context)->clearsign (context, userid, hash, istream, ostream, ex);
@@ -268,6 +272,8 @@ camel_cipher_verify (CamelCipherContext *context, CamelStream *istream,
{
CamelCipherValidity *valid;
+ g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), NULL);
+
CIPHER_LOCK(context);
valid = CCC_CLASS (context)->verify (context, istream, sigstream, ex);
@@ -308,6 +314,8 @@ camel_cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *us
{
int retval;
+ g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
+
CIPHER_LOCK(context);
retval = CCC_CLASS (context)->encrypt (context, sign, userid, recipients, istream, ostream, ex);
@@ -345,6 +353,8 @@ camel_cipher_decrypt (CamelCipherContext *context, CamelStream *istream,
{
int retval;
+ g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
+
CIPHER_LOCK(context);
retval = CCC_CLASS (context)->decrypt (context, istream, ostream, ex);