summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2023-04-19 12:27:01 +0200
committerMilan Crha <mcrha@redhat.com>2023-04-19 12:27:01 +0200
commitb8186d1caf4e0a73e7a96f2da96bd0c2d3f06870 (patch)
tree2b817a714dd0319620f1fcd0e0d466bfb9b945ae
parent1946803dc710ec46da31dbf201ea76ba9ae5980b (diff)
downloadevolution-data-server-b8186d1caf4e0a73e7a96f2da96bd0c2d3f06870.tar.gz
I#468 - Camel: Update developer documentation for camel_cipher_context_encrypt()
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/468
-rw-r--r--src/camel/camel-cipher-context.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/camel/camel-cipher-context.c b/src/camel/camel-cipher-context.c
index 44ac45839..cc010d669 100644
--- a/src/camel/camel-cipher-context.c
+++ b/src/camel/camel-cipher-context.c
@@ -599,15 +599,16 @@ camel_cipher_context_verify_finish (CamelCipherContext *context,
/**
* camel_cipher_context_encrypt_sync:
* @context: a #CamelCipherContext
- * @userid: (nullable): key ID (or email address) to use when signing, or %NULL to not sign
+ * @userid: (nullable): unused
* @recipients: (element-type utf8): an array of recipient key IDs and/or email addresses
* @ipart: clear-text #CamelMimePart
* @opart: cipher-text #CamelMimePart
* @cancellable: optional #GCancellable object, or %NULL
* @error: return location for a #GError, or %NULL
*
- * Encrypts (and optionally signs) the clear-text @ipart and writes the
- * resulting cipher-text to @opart.
+ * Encrypts the clear-text @ipart and writes the resulting cipher-text to @opart.
+ *
+ * Note: The @userid is unused, %NULL should be passed for it.
*
* Returns: %TRUE on success, %FALSE on error
*
@@ -644,7 +645,7 @@ camel_cipher_context_encrypt_sync (CamelCipherContext *context,
camel_operation_push_message (cancellable, _("Encrypting message"));
success = class->encrypt_sync (
- context, userid, recipients,
+ context, NULL, recipients,
ipart, opart, cancellable, error);
CAMEL_CHECK_GERROR (context, encrypt_sync, success, error);
@@ -686,7 +687,7 @@ cipher_context_encrypt_thread (GTask *task,
/**
* camel_cipher_context_encrypt:
* @context: a #CamelCipherContext
- * @userid: (nullable): key id (or email address) to use when signing, or %NULL to not sign
+ * @userid: (nullable): unused
* @recipients: (element-type utf8): an array of recipient key IDs and/or email addresses
* @ipart: clear-text #CamelMimePart
* @opart: cipher-text #CamelMimePart
@@ -695,13 +696,15 @@ cipher_context_encrypt_thread (GTask *task,
* @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: data to pass to the callback function
*
- * Asynchronously encrypts (and optionally signs) the clear-text @ipart and
+ * Asynchronously encrypts the clear-text @ipart and
* writes the resulting cipher-text to @opart.
*
* When the operation is finished, @callback will be called. You can
* then call camel_cipher_context_encrypt_finish() to get the result of
* the operation.
*
+ * Note: The @userid is unused, %NULL should be passed for it.
+ *
* Since: 3.0
**/
void
@@ -724,7 +727,7 @@ camel_cipher_context_encrypt (CamelCipherContext *context,
g_return_if_fail (CAMEL_IS_MIME_PART (opart));
async_context = g_slice_new0 (AsyncContext);
- async_context->userid = g_strdup (userid);
+ async_context->userid = NULL;
async_context->strings = g_ptr_array_new ();
async_context->ipart = g_object_ref (ipart);
async_context->opart = g_object_ref (opart);