diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-04-15 05:20:44 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-04-15 05:20:44 +0800 |
commit | 6dce8c2f32c5738b78a6e7b26e15db8b562981e5 (patch) | |
tree | aebfee2db412300d6aced0fe044067292f5bb564 /camel/camel-cipher-context.c | |
parent | 1d4c16a76ac2886fc626b7f64ff1f6f284cc9c9f (diff) | |
download | gsoc2013-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/camel-cipher-context.c')
-rw-r--r-- | camel/camel-cipher-context.c | 10 |
1 files changed, 10 insertions, 0 deletions
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); |