Oops, lets not get into a recursive call here ;-)

2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
	get into a recursive call here ;-)

	* tests/smime/pgp.c: Updated to reflect changes to the PGP code.

	* tests/smime/pgp-mime.c: Same.

svn path=/trunk/; revision=9287
This commit is contained in:
Jeffrey Stedfast
2001-04-12 22:03:23 +00:00
committed by Jeffrey Stedfast
parent de35de9442
commit dc90015fb8
5 changed files with 24 additions and 15 deletions

View File

@ -1,3 +1,12 @@
2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
get into a recursive call here ;-)
* tests/smime/pgp.c: Updated to reflect changes to the PGP code.
* tests/smime/pgp-mime.c: Same.
2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-mime.c: Updated to reflect the few changes made to the

View File

@ -41,7 +41,7 @@
#define d(x)
#define CCCC(k) CAMEL_CIPHER_CONTEXT_CLASS (k)
#define CCC_CLASS(o) CAMEL_CIPHER_CONTEXT_CLASS(CAMEL_OBJECT_GET_CLASS(o))
struct _CamelCipherContextPrivate {
#ifdef ENABLE_THREADS
@ -191,7 +191,7 @@ camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherH
CIPHER_LOCK(context);
retval = CCCC (context)->sign (context, userid, hash, istream, ostream, ex);
retval = CCC_CLASS (context)->sign (context, userid, hash, istream, ostream, ex);
CIPHER_UNLOCK(context);
@ -229,7 +229,7 @@ camel_cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCi
CIPHER_LOCK(context);
retval = CCCC (context)->clearsign (context, userid, hash, istream, ostream, ex);
retval = CCC_CLASS (context)->clearsign (context, userid, hash, istream, ostream, ex);
CIPHER_UNLOCK(context);
@ -270,7 +270,7 @@ camel_cipher_verify (CamelCipherContext *context, CamelStream *istream,
CIPHER_LOCK(context);
valid = CCCC (context)->verify (context, istream, sigstream, ex);
valid = CCC_CLASS (context)->verify (context, istream, sigstream, ex);
CIPHER_UNLOCK(context);
@ -310,7 +310,7 @@ camel_cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *us
CIPHER_LOCK(context);
retval = CCCC (context)->encrypt (context, sign, userid, recipients, istream, ostream, ex);
retval = CCC_CLASS (context)->encrypt (context, sign, userid, recipients, istream, ostream, ex);
CIPHER_UNLOCK(context);
@ -347,7 +347,7 @@ camel_cipher_decrypt (CamelCipherContext *context, CamelStream *istream,
CIPHER_LOCK(context);
retval = CCCC (context)->decrypt (context, istream, ostream, ex);
retval = CCC_CLASS (context)->decrypt (context, istream, ostream, ex);
CIPHER_UNLOCK(context);

View File

@ -110,7 +110,7 @@ camel_pgp_context_get_type (void)
static CamelType type = CAMEL_INVALID_TYPE;
if (type == CAMEL_INVALID_TYPE) {
type = camel_type_register (camel_pgp_context_get_type (),
type = camel_type_register (camel_cipher_context_get_type (),
"CamelPgpContext",
sizeof (CamelPgpContext),
sizeof (CamelPgpContextClass),

View File

@ -26,7 +26,7 @@ int main (int argc, char **argv)
CamelSession *session;
CamelPgpContext *ctx;
CamelException *ex;
CamelPgpValidity *valid;
CamelCipherValidity *valid;
CamelMimePart *mime_part, *part;
GPtrArray *recipients;
@ -49,7 +49,7 @@ int main (int argc, char **argv)
camel_mime_part_set_description (mime_part, "Test of PGP/MIME multipart/signed stuff");
camel_test_push ("PGP/MIME signing");
camel_pgp_mime_part_sign (ctx, &mime_part, "pgp-mime@xtorshun.org", CAMEL_PGP_HASH_TYPE_SHA1, ex);
camel_pgp_mime_part_sign (ctx, &mime_part, "pgp-mime@xtorshun.org", CAMEL_CIPHER_HASH_SHA1, ex);
check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
check_msg (camel_pgp_mime_is_rfc2015_signed (mime_part),
"Huh, the MIME part does not seem to be a valid multipart/signed part");
@ -60,8 +60,8 @@ int main (int argc, char **argv)
camel_test_push ("PGP/MIME verify");
valid = camel_pgp_mime_part_verify (ctx, mime_part, ex);
check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
check_msg (camel_pgp_validity_get_valid (valid), "%s", camel_pgp_validity_get_description (valid));
camel_pgp_validity_free (valid);
check_msg (camel_cipher_validity_get_valid (valid), "%s", camel_cipher_validity_get_description (valid));
camel_cipher_validity_free (valid);
camel_test_pull ();
camel_object_unref (CAMEL_OBJECT (mime_part));

View File

@ -22,7 +22,7 @@ int main (int argc, char **argv)
CamelSession *session;
CamelPgpContext *ctx;
CamelException *ex;
CamelPgpValidity *valid;
CamelCipherValidity *valid;
CamelStream *stream1, *stream2, *stream3;
GPtrArray *recipients;
GByteArray *buf;
@ -49,7 +49,7 @@ int main (int argc, char **argv)
stream2 = camel_stream_mem_new ();
camel_test_push ("PGP signing");
camel_pgp_sign (ctx, "pgp-mime@xtorshun.org", CAMEL_PGP_HASH_TYPE_SHA1,
camel_pgp_sign (ctx, "pgp-mime@xtorshun.org", CAMEL_CIPHER_HASH_SHA1,
stream1, stream2, ex);
check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
camel_test_pull ();
@ -61,8 +61,8 @@ int main (int argc, char **argv)
camel_stream_reset (stream2);
valid = camel_pgp_verify (ctx, stream1, stream2, ex);
check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
check_msg (camel_pgp_validity_get_valid (valid), "%s", camel_pgp_validity_get_description (valid));
camel_pgp_validity_free (valid);
check_msg (camel_cipher_validity_get_valid (valid), "%s", camel_cipher_validity_get_description (valid));
camel_cipher_validity_free (valid);
camel_test_pull ();
camel_object_unref (CAMEL_OBJECT (stream1));