gmime r1267 - in trunk: . docs/reference gmime tests



Author: fejj
Date: Sat May 24 16:49:55 2008
New Revision: 1267
URL: http://svn.gnome.org/viewvc/gmime?rev=1267&view=rev

Log:
2008-05-24  Jeffrey Stedfast  <fejj novell com>

	* tests/test-pgp.c: Updated.

	* gmime/gmime-multipart-encrypted.c: Updated.

	* gmime/gmime-multipart-signed.c: Updated.

	* gmime/gmime-cipher-context.c (g_mime_cipher_context_*): Renamed
	from g_mime_cipher_*() which did not match the class
	name. Deprecated the old names.



Modified:
   trunk/ChangeLog
   trunk/docs/reference/changes-2.4.sgml
   trunk/docs/reference/gmime-sections.txt
   trunk/gmime/gmime-cipher-context.c
   trunk/gmime/gmime-cipher-context.h
   trunk/gmime/gmime-multipart-encrypted.c
   trunk/gmime/gmime-multipart-signed.c
   trunk/tests/test-pgp.c
   trunk/tests/test-pgpmime.c

Modified: trunk/docs/reference/changes-2.4.sgml
==============================================================================
--- trunk/docs/reference/changes-2.4.sgml	(original)
+++ trunk/docs/reference/changes-2.4.sgml	Sat May 24 16:49:55 2008
@@ -51,4 +51,21 @@
       </listitem>
     </itemizedlist>
   </refsect1>
+  <refsect1>
+    <title>Newly Deprecated Functions in GMime 2.4</title>
+    <para>GMimeCipherContext methods have been renamed from
+<function>g_mime_cipher_*</function> to
+<function>g_mime_cipher_context_*</function>. The 2.2 to 2.4 name mapping is as
+follows:</para>
+    <itemizedlist>
+      <listitem><function>g_mime_cipher_hash_id</function> has been renamed to <function>g_mime_cipher_context_hash_id</function></listitem>
+      <listitem><function>g_mime_cipher_hash_name</function> has been renamed to <function>g_mime_cipher_context_hash_name</function></listitem>
+      <listitem><function>g_mime_cipher_sign</function> has been renamed to <function>g_mime_cipher_context_sign</function></listitem>
+      <listitem><function>g_mime_cipher_verify</function> has been renamed to <function>g_mime_cipher_context_verify</function></listitem>
+      <listitem><function>g_mime_cipher_encrypt</function> has been renamed to <function>g_mime_cipher_context_encrypt</function></listitem>
+      <listitem><function>g_mime_cipher_decrypt</function> has been renamed to <function>g_mime_cipher_context_decrypt</function></listitem>
+      <listitem><function>g_mime_cipher_import_keys</function> has been renamed to <function>g_mime_cipher_context_import_keys</function></listitem>
+      <listitem><function>g_mime_cipher_export_keys</function> has been renamed to <function>g_mime_cipher_context_export_keys</function></listitem>
+    </itemizedlist>
+  </refsect1>
 </refentry>

Modified: trunk/docs/reference/gmime-sections.txt
==============================================================================
--- trunk/docs/reference/gmime-sections.txt	(original)
+++ trunk/docs/reference/gmime-sections.txt	Sat May 24 16:49:55 2008
@@ -1025,6 +1025,14 @@
 GMimeSignerTrust
 GMimeSignerError
 GMimeSigner
+g_mime_cipher_context_hash_id
+g_mime_cipher_context_hash_name
+g_mime_cipher_context_sign
+g_mime_cipher_context_verify
+g_mime_cipher_context_encrypt
+g_mime_cipher_context_decrypt
+g_mime_cipher_context_import_keys
+g_mime_cipher_context_export_keys
 g_mime_cipher_hash_id
 g_mime_cipher_hash_name
 g_mime_cipher_sign

Modified: trunk/gmime/gmime-cipher-context.c
==============================================================================
--- trunk/gmime/gmime-cipher-context.c	(original)
+++ trunk/gmime/gmime-cipher-context.c	Sat May 24 16:49:55 2008
@@ -142,7 +142,7 @@
 
 
 /**
- * g_mime_cipher_hash_id:
+ * g_mime_cipher_context_hash_id:
  * @ctx: Cipher Context
  * @hash: hash name
  *
@@ -151,7 +151,7 @@
  * Returns the equivalent hash id or #GMIME_CIPHER_HASH_DEFAULT on fail.
  **/
 GMimeCipherHash
-g_mime_cipher_hash_id (GMimeCipherContext *ctx, const char *hash)
+g_mime_cipher_context_hash_id (GMimeCipherContext *ctx, const char *hash)
 {
 	g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), GMIME_CIPHER_HASH_DEFAULT);
 	g_return_val_if_fail (hash != NULL, GMIME_CIPHER_HASH_DEFAULT);
@@ -168,7 +168,7 @@
 
 
 /**
- * g_mime_cipher_hash_name:
+ * g_mime_cipher_context_hash_name:
  * @ctx: Cipher Context
  * @hash: hash id
  *
@@ -177,7 +177,7 @@
  * Returns the equivalent hash name or %NULL on fail.
  **/
 const char *
-g_mime_cipher_hash_name (GMimeCipherContext *ctx, GMimeCipherHash hash)
+g_mime_cipher_context_hash_name (GMimeCipherContext *ctx, GMimeCipherHash hash)
 {
 	g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), NULL);
 	
@@ -197,7 +197,7 @@
 
 
 /**
- * g_mime_cipher_sign:
+ * g_mime_cipher_context_sign:
  * @ctx: Cipher Context
  * @userid: private key to use to sign the stream
  * @hash: preferred Message-Integrity-Check hash algorithm
@@ -210,8 +210,8 @@
  * Returns %0 on success or %-1 on fail.
  **/
 int
-g_mime_cipher_sign (GMimeCipherContext *ctx, const char *userid, GMimeCipherHash hash,
-		    GMimeStream *istream, GMimeStream *ostream, GError **err)
+g_mime_cipher_context_sign (GMimeCipherContext *ctx, const char *userid, GMimeCipherHash hash,
+			    GMimeStream *istream, GMimeStream *ostream, GError **err)
 {
 	g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), -1);
 	g_return_val_if_fail (GMIME_IS_STREAM (istream), -1);
@@ -233,7 +233,7 @@
 
 
 /**
- * g_mime_cipher_verify:
+ * g_mime_cipher_context_verify:
  * @ctx: Cipher Context
  * @hash: secure hash used
  * @istream: input stream
@@ -250,8 +250,8 @@
  * execute at all.
  **/
 GMimeSignatureValidity *
-g_mime_cipher_verify (GMimeCipherContext *ctx, GMimeCipherHash hash, GMimeStream *istream,
-		      GMimeStream *sigstream, GError **err)
+g_mime_cipher_context_verify (GMimeCipherContext *ctx, GMimeCipherHash hash, GMimeStream *istream,
+			      GMimeStream *sigstream, GError **err)
 {
 	g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), NULL);
 	g_return_val_if_fail (GMIME_IS_STREAM (istream), NULL);
@@ -272,7 +272,7 @@
 
 
 /**
- * g_mime_cipher_encrypt:
+ * g_mime_cipher_context_encrypt:
  * @ctx: Cipher Context
  * @sign: sign as well as encrypt
  * @userid: key id (or email address) to use when signing (assuming @sign is %TRUE)
@@ -287,8 +287,8 @@
  * Returns %0 on success or %-1 on fail.
  **/
 int
-g_mime_cipher_encrypt (GMimeCipherContext *ctx, gboolean sign, const char *userid, GPtrArray *recipients,
-		       GMimeStream *istream, GMimeStream *ostream, GError **err)
+g_mime_cipher_context_encrypt (GMimeCipherContext *ctx, gboolean sign, const char *userid, GPtrArray *recipients,
+			       GMimeStream *istream, GMimeStream *ostream, GError **err)
 {
 	g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), -1);
 	g_return_val_if_fail (GMIME_IS_STREAM (istream), -1);
@@ -310,7 +310,7 @@
 
 
 /**
- * g_mime_cipher_decrypt:
+ * g_mime_cipher_context_decrypt:
  * @ctx: Cipher Context
  * @istream: input/ciphertext stream
  * @ostream: output/cleartext stream
@@ -322,8 +322,8 @@
  * Returns %0 on success or %-1 for fail.
  **/
 int
-g_mime_cipher_decrypt (GMimeCipherContext *ctx, GMimeStream *istream,
-		       GMimeStream *ostream, GError **err)
+g_mime_cipher_context_decrypt (GMimeCipherContext *ctx, GMimeStream *istream,
+			       GMimeStream *ostream, GError **err)
 {
 	g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), -1);
 	g_return_val_if_fail (GMIME_IS_STREAM (istream), -1);
@@ -344,7 +344,7 @@
 
 
 /**
- * g_mime_cipher_import_keys:
+ * g_mime_cipher_context_import_keys:
  * @ctx: Cipher Context
  * @istream: input stream (containing keys)
  * @err: exception
@@ -355,7 +355,7 @@
  * Returns %0 on success or %-1 on fail.
  **/
 int
-g_mime_cipher_import_keys (GMimeCipherContext *ctx, GMimeStream *istream, GError **err)
+g_mime_cipher_context_import_keys (GMimeCipherContext *ctx, GMimeStream *istream, GError **err)
 {
 	g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), -1);
 	g_return_val_if_fail (GMIME_IS_STREAM (istream), -1);
@@ -376,7 +376,7 @@
 
 
 /**
- * g_mime_cipher_export_keys:
+ * g_mime_cipher_context_export_keys:
  * @ctx: Cipher Context
  * @keys: an array of key ids
  * @ostream: output stream
@@ -388,8 +388,8 @@
  * Returns %0 on success or %-1 on fail.
  **/
 int
-g_mime_cipher_export_keys (GMimeCipherContext *ctx, GPtrArray *keys,
-			   GMimeStream *ostream, GError **err)
+g_mime_cipher_context_export_keys (GMimeCipherContext *ctx, GPtrArray *keys,
+				   GMimeStream *ostream, GError **err)
 {
 	g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), -1);
 	g_return_val_if_fail (GMIME_IS_STREAM (ostream), -1);
@@ -765,3 +765,187 @@
 {
 	g_mime_signature_validity_free (validity);
 }
+
+
+/**
+ * g_mime_cipher_hash_id:
+ * @ctx: Cipher Context
+ * @hash: hash name
+ *
+ * Gets the hash id based on the hash name @hash.
+ *
+ * WARNING: This interface is deprecated. Use
+ * g_mime_cipher_context_hash_id() instead.
+ *
+ * Returns the equivalent hash id or #GMIME_CIPHER_HASH_DEFAULT on fail.
+ **/
+GMimeCipherHash
+g_mime_cipher_hash_id (GMimeCipherContext *ctx, const char *hash)
+{
+	return g_mime_cipher_context_hash_id (ctx, hash);
+}
+
+
+/**
+ * g_mime_cipher_hash_name:
+ * @ctx: Cipher Context
+ * @hash: hash id
+ *
+ * Gets the hash name based on the hash id @hash.
+ *
+ * WARNING: This interface is deprecated. Use
+ * g_mime_cipher_context_hash_name() instead.
+ *
+ * Returns the equivalent hash name or %NULL on fail.
+ **/
+const char *
+g_mime_cipher_hash_name (GMimeCipherContext *ctx, GMimeCipherHash hash)
+{
+	return g_mime_cipher_context_hash_name (ctx, hash);
+}
+
+
+/**
+ * g_mime_cipher_sign:
+ * @ctx: Cipher Context
+ * @userid: private key to use to sign the stream
+ * @hash: preferred Message-Integrity-Check hash algorithm
+ * @istream: input stream
+ * @ostream: output stream
+ * @err: exception
+ *
+ * Signs the input stream and writes the resulting signature to the
+ * output stream.
+ *
+ * WARNING: This interface is deprecated. Use
+ * g_mime_cipher_context_sign() instead.
+ *
+ * Returns %0 on success or %-1 on fail.
+ **/
+int
+g_mime_cipher_sign (GMimeCipherContext *ctx, const char *userid, GMimeCipherHash hash,
+		    GMimeStream *istream, GMimeStream *ostream, GError **err)
+{
+	return g_mime_cipher_context_sign (ctx, userid, hash, istream, ostream, err);
+}
+
+
+/**
+ * g_mime_cipher_verify:
+ * @ctx: Cipher Context
+ * @hash: secure hash used
+ * @istream: input stream
+ * @sigstream: optional detached-signature stream
+ * @err: exception
+ *
+ * Verifies the signature. If @istream is a clearsigned stream,
+ * you should pass %NULL as the sigstream parameter. Otherwise
+ * @sigstream is assumed to be the signature stream and is used to
+ * verify the integirity of the @istream.
+ *
+ * WARNING: This interface is deprecated. Use
+ * g_mime_cipher_context_verify() instead.
+ *
+ * Returns a #GMimeSignatureValidity structure containing information
+ * about the integrity of the input stream or %NULL on failure to
+ * execute at all.
+ **/
+GMimeSignatureValidity *
+g_mime_cipher_verify (GMimeCipherContext *ctx, GMimeCipherHash hash, GMimeStream *istream,
+		      GMimeStream *sigstream, GError **err)
+{
+	return g_mime_cipher_context_verify (ctx, hash, istream, sigstream, err);
+}
+
+
+/**
+ * g_mime_cipher_encrypt:
+ * @ctx: Cipher Context
+ * @sign: sign as well as encrypt
+ * @userid: key id (or email address) to use when signing (assuming @sign is %TRUE)
+ * @recipients: an array of recipient key ids and/or email addresses
+ * @istream: cleartext input stream
+ * @ostream: ciphertext output stream
+ * @err: exception
+ *
+ * Encrypts (and optionally signs) the cleartext input stream and
+ * writes the resulting ciphertext to the output stream.
+ *
+ * WARNING: This interface is deprecated. Use
+ * g_mime_cipher_context_encrypt() instead.
+ *
+ * Returns %0 on success or %-1 on fail.
+ **/
+int
+g_mime_cipher_encrypt (GMimeCipherContext *ctx, gboolean sign, const char *userid, GPtrArray *recipients,
+		       GMimeStream *istream, GMimeStream *ostream, GError **err)
+{
+	return g_mime_cipher_context_encrypt (ctx, sign, userid, recipients, istream, ostream, err);
+}
+
+
+/**
+ * g_mime_cipher_decrypt:
+ * @ctx: Cipher Context
+ * @istream: input/ciphertext stream
+ * @ostream: output/cleartext stream
+ * @err: exception
+ *
+ * Decrypts the ciphertext input stream and writes the resulting
+ * cleartext to the output stream.
+ *
+ * WARNING: This interface is deprecated. Use
+ * g_mime_cipher_context_decrypt() instead.
+ *
+ * Returns %0 on success or %-1 for fail.
+ **/
+int
+g_mime_cipher_decrypt (GMimeCipherContext *ctx, GMimeStream *istream,
+		       GMimeStream *ostream, GError **err)
+{
+	return g_mime_cipher_context_decrypt (ctx, istream, ostream, err);
+}
+
+
+/**
+ * g_mime_cipher_import_keys:
+ * @ctx: Cipher Context
+ * @istream: input stream (containing keys)
+ * @err: exception
+ *
+ * Imports a stream of keys/certificates contained within @istream
+ * into the key/certificate database controlled by @ctx.
+ *
+ * WARNING: This interface is deprecated. Use
+ * g_mime_cipher_context_import_keys() instead.
+ *
+ * Returns %0 on success or %-1 on fail.
+ **/
+int
+g_mime_cipher_import_keys (GMimeCipherContext *ctx, GMimeStream *istream, GError **err)
+{
+	return g_mime_cipher_context_import_keys (ctx, istream, err);
+}
+
+
+/**
+ * g_mime_cipher_export_keys:
+ * @ctx: Cipher Context
+ * @keys: an array of key ids
+ * @ostream: output stream
+ * @err: exception
+ *
+ * Exports the keys/certificates in @keys to the stream @ostream from
+ * the key/certificate database controlled by @ctx.
+ *
+ * WARNING: This interface is deprecated. Use
+ * g_mime_cipher_context_export_keys() instead.
+ *
+ * Returns %0 on success or %-1 on fail.
+ **/
+int
+g_mime_cipher_export_keys (GMimeCipherContext *ctx, GPtrArray *keys,
+			   GMimeStream *ostream, GError **err)
+{
+	return g_mime_cipher_context_export_keys (ctx, keys, ostream, err);
+}

Modified: trunk/gmime/gmime-cipher-context.h
==============================================================================
--- trunk/gmime/gmime-cipher-context.h	(original)
+++ trunk/gmime/gmime-cipher-context.h	Sat May 24 16:49:55 2008
@@ -112,7 +112,36 @@
 
 GType g_mime_cipher_context_get_type (void);
 
+/* hash routines */
+GMimeCipherHash      g_mime_cipher_context_hash_id (GMimeCipherContext *ctx, const char *hash);
+
+const char *         g_mime_cipher_context_hash_name (GMimeCipherContext *ctx, GMimeCipherHash hash);
+
+/* cipher routines */
+int                  g_mime_cipher_context_sign (GMimeCipherContext *ctx, const char *userid,
+						 GMimeCipherHash hash, GMimeStream *istream,
+						 GMimeStream *ostream, GError **err);
+
+GMimeSignatureValidity *g_mime_cipher_context_verify (GMimeCipherContext *ctx, GMimeCipherHash hash,
+						      GMimeStream *istream, GMimeStream *sigstream,
+						      GError **err);
+
+int                  g_mime_cipher_context_encrypt (GMimeCipherContext *ctx, gboolean sign,
+						    const char *userid, GPtrArray *recipients,
+						    GMimeStream *istream, GMimeStream *ostream,
+						    GError **err);
+
+int                  g_mime_cipher_context_decrypt (GMimeCipherContext *ctx, GMimeStream *istream,
+						    GMimeStream *ostream, GError **err);
 
+/* key/certificate routines */
+int                  g_mime_cipher_context_import_keys (GMimeCipherContext *ctx, GMimeStream *istream,
+							GError **err);
+
+int                  g_mime_cipher_context_export_keys (GMimeCipherContext *ctx, GPtrArray *keys,
+							GMimeStream *ostream, GError **err);
+
+#ifndef GMIME_DISABLE_DEPRECATED
 /* hash routines */
 GMimeCipherHash      g_mime_cipher_hash_id (GMimeCipherContext *ctx, const char *hash);
 
@@ -141,7 +170,7 @@
 
 int                  g_mime_cipher_export_keys (GMimeCipherContext *ctx, GPtrArray *keys,
 						GMimeStream *ostream, GError **err);
-
+#endif /* GMIME_DISABLE_DEPRECATED */
 
 
 /* signature status structures and functions */

Modified: trunk/gmime/gmime-multipart-encrypted.c
==============================================================================
--- trunk/gmime/gmime-multipart-encrypted.c	(original)
+++ trunk/gmime/gmime-multipart-encrypted.c	Sat May 24 16:49:55 2008
@@ -267,7 +267,7 @@
 	
 	/* encrypt the content stream */
 	ciphertext = g_mime_stream_mem_new ();
-	if (g_mime_cipher_encrypt (ctx, FALSE, NULL, recipients, stream, ciphertext, err) == -1) {
+	if (g_mime_cipher_context_encrypt (ctx, FALSE, NULL, recipients, stream, ciphertext, err) == -1) {
 		g_object_unref (ciphertext);
 		g_object_unref (stream);
 		return -1;
@@ -401,7 +401,7 @@
 	g_object_unref (crlf_filter);
 	
 	/* get the cleartext */
-	if (g_mime_cipher_decrypt (ctx, ciphertext, filtered_stream, err) == -1) {
+	if (g_mime_cipher_context_decrypt (ctx, ciphertext, filtered_stream, err) == -1) {
 		g_object_unref (filtered_stream);
 		g_object_unref (ciphertext);
 		g_object_unref (stream);

Modified: trunk/gmime/gmime-multipart-signed.c
==============================================================================
--- trunk/gmime/gmime-multipart-signed.c	(original)
+++ trunk/gmime/gmime-multipart-signed.c	Sat May 24 16:49:55 2008
@@ -327,7 +327,7 @@
 	sigstream = g_mime_stream_mem_new ();
 	
 	/* sign the content stream */
-	if (g_mime_cipher_sign (ctx, userid, hash, filtered_stream, sigstream, err) == -1) {
+	if (g_mime_cipher_context_sign (ctx, userid, hash, filtered_stream, sigstream, err) == -1) {
 		g_object_unref (filtered_stream);
 		g_object_unref (sigstream);
 		g_object_unref (stream);
@@ -353,7 +353,7 @@
 	g_object_unref (wrapper);
 	
 	mps->protocol = g_strdup (ctx->sign_protocol);
-	mps->micalg = g_strdup (g_mime_cipher_hash_name (ctx, hash));
+	mps->micalg = g_strdup (g_mime_cipher_context_hash_name (ctx, hash));
 	
 	/* set the content-type of the signature part */
 	content_type = g_mime_content_type_new_from_string (mps->protocol);
@@ -480,8 +480,8 @@
 	g_object_unref (wrapper);
 	
 	/* verify the signature */
-	hash = g_mime_cipher_hash_id (ctx, mps->micalg);
-	valid = g_mime_cipher_verify (ctx, hash, stream, sigstream, err);
+	hash = g_mime_cipher_context_hash_id (ctx, mps->micalg);
+	valid = g_mime_cipher_context_verify (ctx, hash, stream, sigstream, err);
 	
 	d(printf ("attempted to verify:\n----- BEGIN SIGNED PART -----\n%.*s----- END SIGNED PART -----\n",
 		  (int) GMIME_STREAM_MEM (stream)->buffer->len, GMIME_STREAM_MEM (stream)->buffer->data));

Modified: trunk/tests/test-pgp.c
==============================================================================
--- trunk/tests/test-pgp.c	(original)
+++ trunk/tests/test-pgp.c	Sat May 24 16:49:55 2008
@@ -109,9 +109,9 @@
 	GError *err = NULL;
 	Exception *ex;
 	
-	g_mime_cipher_sign (ctx, "no user no domain",
-			    GMIME_CIPHER_HASH_DEFAULT,
-			    cleartext, ciphertext, &err);
+	g_mime_cipher_context_sign (ctx, "no user no domain",
+				    GMIME_CIPHER_HASH_DEFAULT,
+				    cleartext, ciphertext, &err);
 	
 	if (err != NULL) {
 		ex = exception_new ("%s", err->message);
@@ -131,8 +131,8 @@
 	GError *err = NULL;
 	Exception *ex;
 	
-	validity = g_mime_cipher_verify (ctx, GMIME_CIPHER_HASH_DEFAULT,
-					 cleartext, ciphertext, &err);
+	validity = g_mime_cipher_context_verify (ctx, GMIME_CIPHER_HASH_DEFAULT,
+						 cleartext, ciphertext, &err);
 	
 	if (validity == NULL) {
 		ex = exception_new ("%s", err->message);
@@ -158,8 +158,8 @@
 	recipients = g_ptr_array_new ();
 	g_ptr_array_add (recipients, "no user no domain");
 	
-	g_mime_cipher_encrypt (ctx, FALSE, "no user no domain", recipients,
-			       cleartext, ciphertext, &err);
+	g_mime_cipher_context_encrypt (ctx, FALSE, "no user no domain", recipients,
+				       cleartext, ciphertext, &err);
 	
 	g_ptr_array_free (recipients, TRUE);
 	
@@ -184,7 +184,7 @@
 	
 	stream = g_mime_stream_mem_new ();
 	
-	g_mime_cipher_decrypt (ctx, ciphertext, stream, &err);
+	g_mime_cipher_context_decrypt (ctx, ciphertext, stream, &err);
 	
 	if (err != NULL) {
 		g_object_unref (stream);
@@ -231,7 +231,7 @@
 	
 	ostream = g_mime_stream_mem_new ();
 	
-	g_mime_cipher_export_keys (ctx, keys, ostream, &err);
+	g_mime_cipher_context_export_keys (ctx, keys, ostream, &err);
 	g_ptr_array_free (keys, TRUE);
 	if (err != NULL) {
 		ex = exception_new ("%s", err->message);
@@ -281,7 +281,7 @@
 		throw (exception_new ("open() failed: %s", strerror (errno)));
 	
 	stream = g_mime_stream_fs_new (fd);
-	g_mime_cipher_import_keys (ctx, stream, &err);
+	g_mime_cipher_context_import_keys (ctx, stream, &err);
 	g_object_unref (stream);
 	
 	if (err != NULL) {

Modified: trunk/tests/test-pgpmime.c
==============================================================================
--- trunk/tests/test-pgpmime.c	(original)
+++ trunk/tests/test-pgpmime.c	Sat May 24 16:49:55 2008
@@ -408,7 +408,7 @@
 		throw (exception_new ("open() failed: %s", strerror (errno)));
 	
 	stream = g_mime_stream_fs_new (fd);
-	g_mime_cipher_import_keys (ctx, stream, &err);
+	g_mime_cipher_context_import_keys (ctx, stream, &err);
 	g_object_unref (stream);
 	
 	if (err != NULL) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]