## CamelCipherContext

CamelCipherContext

## Synopsis

                        CamelCipherContext;
                        CamelCipherValidity;
                        CamelCipherCertInfo;
    enum                CamelCipherHash;
    enum                camel_cipher_validity_sign_t;
    enum                camel_cipher_validity_encrypt_t;
    enum                camel_cipher_validity_mode_t;
    CamelCipherContext * camel_cipher_context_new           (CamelSession *session);
    CamelSession *      camel_cipher_context_get_session    (CamelCipherContext *context);
    CamelCipherHash     camel_cipher_context_id_to_hash     (CamelCipherContext *context,
                                                             const gchar *id);
    const gchar *       camel_cipher_context_hash_to_id     (CamelCipherContext *context,
                                                             CamelCipherHash hash);
    gboolean            camel_cipher_context_sign_sync      (CamelCipherContext *context,
                                                             const gchar *userid,
                                                             CamelCipherHash hash,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                camel_cipher_context_sign           (CamelCipherContext *context,
                                                             const gchar *userid,
                                                             CamelCipherHash hash,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            camel_cipher_context_sign_finish    (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);
    CamelCipherValidity * camel_cipher_context_verify_sync  (CamelCipherContext *context,
                                                             CamelMimePart *ipart,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                camel_cipher_context_verify         (CamelCipherContext *context,
                                                             CamelMimePart *ipart,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    CamelCipherValidity * camel_cipher_context_verify_finish
                                                            (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            camel_cipher_context_encrypt_sync   (CamelCipherContext *context,
                                                             const gchar *userid,
                                                             GPtrArray *recipients,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                camel_cipher_context_encrypt        (CamelCipherContext *context,
                                                             const gchar *userid,
                                                             GPtrArray *recipients,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            camel_cipher_context_encrypt_finish (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);
    CamelCipherValidity * camel_cipher_context_decrypt_sync (CamelCipherContext *context,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                camel_cipher_context_decrypt        (CamelCipherContext *context,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    CamelCipherValidity * camel_cipher_context_decrypt_finish
                                                            (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            camel_cipher_context_import_keys_sync
                                                            (CamelCipherContext *context,
                                                             CamelStream *istream,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                camel_cipher_context_import_keys    (CamelCipherContext *context,
                                                             CamelStream *istream,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            camel_cipher_context_import_keys_finish
                                                            (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            camel_cipher_context_export_keys_sync
                                                            (CamelCipherContext *context,
                                                             GPtrArray *keys,
                                                             CamelStream *ostream,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                camel_cipher_context_export_keys    (CamelCipherContext *context,
                                                             GPtrArray *keys,
                                                             CamelStream *ostream,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            camel_cipher_context_export_keys_finish
                                                            (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);
    CamelCipherValidity * camel_cipher_validity_new         (void);
    void                camel_cipher_validity_init          (CamelCipherValidity *validity);
    gboolean            camel_cipher_validity_get_valid     (CamelCipherValidity *validity);
    void                camel_cipher_validity_set_valid     (CamelCipherValidity *validity,
                                                             gboolean valid);
    gchar *             camel_cipher_validity_get_description
                                                            (CamelCipherValidity *validity);
    void                camel_cipher_validity_set_description
                                                            (CamelCipherValidity *validity,
                                                             const gchar *description);
    void                camel_cipher_validity_clear         (CamelCipherValidity *validity);
    CamelCipherValidity * camel_cipher_validity_clone       (CamelCipherValidity *vin);
    void                camel_cipher_validity_add_certinfo  (CamelCipherValidity *vin,
                                                             camel_cipher_validity_mode_t mode,
                                                             const gchar *name,
                                                             const gchar *email);
    void                camel_cipher_validity_add_certinfo_ex
                                                            (CamelCipherValidity *vin,
                                                             camel_cipher_validity_mode_t mode,
                                                             const gchar *name,
                                                             const gchar *email,
                                                             gpointer cert_data,
                                                             void (cert_data_freegpointer cert_data) (),
                                                             gpointer (cert_data_clonegpointer cert_data) ());
    void                camel_cipher_validity_envelope      (CamelCipherValidity *parent,
                                                             CamelCipherValidity *valid);
    void                camel_cipher_validity_free          (CamelCipherValidity *validity);
    gint                camel_cipher_canonical_to_stream    (CamelMimePart *part,
                                                             guint32 flags,
                                                             CamelStream *ostream,
                                                             GCancellable *cancellable,
                                                             GError **error);

## Object Hierarchy

      GObject
       +----CamelObject
             +----CamelCipherContext
                   +----CamelGpgContext
                   +----CamelSMIMEContext

## Properties

      "session"                  CamelSession*         : Read / Write / Construct Only

## Description

## Details

### CamelCipherContext

    typedef struct _CamelCipherContext CamelCipherContext;

### CamelCipherValidity

    typedef struct {
    	struct _CamelCipherValidity *next;
    	struct _CamelCipherValidity *prev;
    	CamelDList children;

    	struct {
    		enum _camel_cipher_validity_sign_t status;
    		gchar *description;
    		CamelDList signers; /* CamelCipherCertInfo's */
    	} sign;
    	struct {
    		enum _camel_cipher_validity_encrypt_t status;
    		gchar *description;
    		CamelDList encrypters; /* CamelCipherCertInfo's */
    	} encrypt;
    } CamelCipherValidity;

### CamelCipherCertInfo

    typedef struct {
    	struct _CamelCipherCertInfo *next;
    	struct _CamelCipherCertInfo *prev;

    	gchar *name;		/* common name */
    	gchar *email;

    	gpointer cert_data;  /* custom certificate data; can be NULL */
    	void (*cert_data_free) (gpointer cert_data); /* called to free cert_data; can be NULL only if cert_data is NULL */
    	gpointer (*cert_data_clone) (gpointer cert_data); /* called to clone cert_data; can be NULL only if cert_data is NULL */
    } CamelCipherCertInfo;

### enum CamelCipherHash

    typedef enum {
    	CAMEL_CIPHER_HASH_DEFAULT,
    	CAMEL_CIPHER_HASH_MD2,
    	CAMEL_CIPHER_HASH_MD5,
    	CAMEL_CIPHER_HASH_SHA1,
    	CAMEL_CIPHER_HASH_SHA256,
    	CAMEL_CIPHER_HASH_SHA384,
    	CAMEL_CIPHER_HASH_SHA512,
    	CAMEL_CIPHER_HASH_RIPEMD160,
    	CAMEL_CIPHER_HASH_TIGER192,
    	CAMEL_CIPHER_HASH_HAVAL5160
    } CamelCipherHash;

### enum camel_cipher_validity_sign_t

    typedef enum _camel_cipher_validity_sign_t {
    	CAMEL_CIPHER_VALIDITY_SIGN_NONE,
    	CAMEL_CIPHER_VALIDITY_SIGN_GOOD,
    	CAMEL_CIPHER_VALIDITY_SIGN_BAD,
    	CAMEL_CIPHER_VALIDITY_SIGN_UNKNOWN,
    	CAMEL_CIPHER_VALIDITY_SIGN_NEED_PUBLIC_KEY
    } camel_cipher_validity_sign_t;

### enum camel_cipher_validity_encrypt_t

    typedef enum _camel_cipher_validity_encrypt_t {
    	CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE,
    	CAMEL_CIPHER_VALIDITY_ENCRYPT_WEAK,
    	CAMEL_CIPHER_VALIDITY_ENCRYPT_ENCRYPTED, /* encrypted, unknown strenght */
    	CAMEL_CIPHER_VALIDITY_ENCRYPT_STRONG
    } camel_cipher_validity_encrypt_t;

### enum camel_cipher_validity_mode_t

    typedef enum _camel_cipher_validity_mode_t {
    	CAMEL_CIPHER_VALIDITY_SIGN,
    	CAMEL_CIPHER_VALIDITY_ENCRYPT
    } camel_cipher_validity_mode_t;

### camel_cipher_context_new ()

    CamelCipherContext * camel_cipher_context_new           (CamelSession *session);

This creates a new CamelCipherContext object which is used to sign, verify, encrypt and decrypt streams.

`session` : | a CamelSession
Returns : | the new CamelCipherContext

### camel_cipher_context_get_session ()

    CamelSession *      camel_cipher_context_get_session    (CamelCipherContext *context);

`context` : | a CamelCipherContext
Returns : |

Since 2.32

### camel_cipher_context_id_to_hash ()

    CamelCipherHash     camel_cipher_context_id_to_hash     (CamelCipherContext *context,
                                                             const gchar *id);

`context` : |
`id` : |
Returns : |

### camel_cipher_context_hash_to_id ()

    const gchar *       camel_cipher_context_hash_to_id     (CamelCipherContext *context,
                                                             CamelCipherHash hash);

`context` : |
`hash` : |
Returns : |

### camel_cipher_context_sign_sync ()

    gboolean            camel_cipher_context_sign_sync      (CamelCipherContext *context,
                                                             const gchar *userid,
                                                             CamelCipherHash hash,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             GCancellable *cancellable,
                                                             GError **error);

Converts the (unsigned) part `ipart` into a new self-contained MIME part `opart`. This may be a multipart/signed part, or a simple part for enveloped types.

`context` : | a CamelCipherContext
`userid` : | a private key to use to sign the stream
`hash` : | preferred Message-Integrity-Check hash algorithm
`ipart` : | input CamelMimePart
`opart` : | output CamelMimePart
`cancellable` : | optional GCancellable object, or `NULL`
`error` : | return location for a GError, or `NULL`
Returns : | `TRUE` on success, `FALSE` on error

Since 3.0

### camel_cipher_context_sign ()

    void                camel_cipher_context_sign           (CamelCipherContext *context,
                                                             const gchar *userid,
                                                             CamelCipherHash hash,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously converts the (unsigned) part `ipart` into a new self-contained MIME part `opart`. This may be a multipart/signed part, or a simple part for enveloped types.

When the operation is finished, `callback` will be called. You can then call `camel_cipher_context_sign_finish()` to get the result of the operation.

`context` : | a CamelCipherContext
`userid` : | a private key to use to sign the stream
`hash` : | preferred Message-Integrity-Check hash algorithm
`ipart` : | input CamelMimePart
`opart` : | output CamelMimePart
`io_priority` : | the I/O priority of the request
`cancellable` : | optional GCancellable object, or `NULL`
`callback` : | a GAsyncReadyCallback to call when the request is satisfied
`user_data` : | data to pass to the callback function

Since 3.0

### camel_cipher_context_sign_finish ()

    gboolean            camel_cipher_context_sign_finish    (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes the operation started with `camel_cipher_context_sign()`.

`context` : | a CamelCipherContext
`result` : | a GAsyncResult
`error` : | return location for a GError, or `NULL`
Returns : | `TRUE` on success, `FALSE` on error

Since 3.0

### camel_cipher_context_verify_sync ()

    CamelCipherValidity * camel_cipher_context_verify_sync  (CamelCipherContext *context,
                                                             CamelMimePart *ipart,
                                                             GCancellable *cancellable,
                                                             GError **error);

Verifies the signature.

`context` : | a CamelCipherContext
`ipart` : | the CamelMimePart to verify
`cancellable` : | optional GCancellable object, or `NULL`
`error` : | return location for a GError, or `NULL`
Returns : | a CamelCipherValidity structure containing information about the integrity of the input stream, or `NULL` on failure to execute at all

### camel_cipher_context_verify ()

    void                camel_cipher_context_verify         (CamelCipherContext *context,
                                                             CamelMimePart *ipart,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously verifies the signature.

When the operation is finished, `callback` will be called. You can then call `camel_cipher_context_verify_finish()` to get the result of the operation.

`context` : | a CamelCipherContext
`ipart` : | the CamelMimePart to verify
`io_priority` : | the I/O priority of the request
`cancellable` : | optional GCancellable object, or `NULL`
`callback` : | a GAsyncReadyCallback to call when the request is satisfied
`user_data` : | data to pass to the callback function

Since 3.0

### camel_cipher_context_verify_finish ()

    CamelCipherValidity * camel_cipher_context_verify_finish
                                                            (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes the operation started with `camel_cipher_context_verify()`.

`context` : | a CamelCipherContext
`result` : | a GAsyncResult
`error` : | return location for a GError, or `NULL`
Returns : | a CamelCipherValidity structure containing information about the integrity of the input stream, or `NULL` on failure to execute at all

Since 3.0

### camel_cipher_context_encrypt_sync ()

    gboolean            camel_cipher_context_encrypt_sync   (CamelCipherContext *context,
                                                             const gchar *userid,
                                                             GPtrArray *recipients,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             GCancellable *cancellable,
                                                             GError **error);

Encrypts (and optionally signs) the clear-text `ipart` and writes the resulting cipher-text to `opart`.

`context` : | a CamelCipherContext
`userid` : | key ID (or email address) to use when signing, or `NULL` to not sign
`recipients` : | 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`
Returns : | `TRUE` on success, `FALSE` on error

Since 3.0

### camel_cipher_context_encrypt ()

    void                camel_cipher_context_encrypt        (CamelCipherContext *context,
                                                             const gchar *userid,
                                                             GPtrArray *recipients,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously encrypts (and optionally signs) 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.

`context` : | a CamelCipherContext
`userid` : | key id (or email address) to use when signing, or `NULL` to not sign
`recipients` : | an array of recipient key IDs and/or email addresses
`ipart` : | clear-text CamelMimePart
`opart` : | cipher-text CamelMimePart
`io_priority` : | the I/O priority of the request
`cancellable` : | optional GCancellable object, or `NULL`
`callback` : | a GAsyncReadyCallback to call when the request is satisfied
`user_data` : | data to pass to the callback function

Since 3.0

### camel_cipher_context_encrypt_finish ()

    gboolean            camel_cipher_context_encrypt_finish (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes the operation started with `camel_cipher_context_encrypt()`.

`context` : | a CamelCipherContext
`result` : | a GAsyncResult
`error` : | return location for a GError, or `NULL`
Returns : | `TRUE` on success, `FALSE` on error

Since 3.0

### camel_cipher_context_decrypt_sync ()

    CamelCipherValidity * camel_cipher_context_decrypt_sync (CamelCipherContext *context,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             GCancellable *cancellable,
                                                             GError **error);

Decrypts `ipart` into `opart`.

`context` : | a CamelCipherContext
`ipart` : | cipher-text CamelMimePart
`opart` : | clear-text CamelMimePart
`cancellable` : | optional GCancellable object, or `NULL`
`error` : | return location for a GError, or `NULL`
Returns : | a validity/encryption status, or `NULL` on error

Since 3.0

### camel_cipher_context_decrypt ()

    void                camel_cipher_context_decrypt        (CamelCipherContext *context,
                                                             CamelMimePart *ipart,
                                                             CamelMimePart *opart,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously decrypts `ipart` into `opart`.

When the operation is finished, `callback` will be called. You can then call `camel_cipher_context_decrypt_finish()` to get the result of the operation.

`context` : | a CamelCipherContext
`ipart` : | cipher-text CamelMimePart
`opart` : | clear-text CamelMimePart
`io_priority` : | the I/O priority of the request
`cancellable` : | optional GCancellable object, or `NULL`
`callback` : | a GAsyncReadyCallback to call when the request is satisfied
`user_data` : | data to pass to the callback function

Since 3.0

### camel_cipher_context_decrypt_finish ()

    CamelCipherValidity * camel_cipher_context_decrypt_finish
                                                            (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes the operation started with `camel_cipher_context_decrypt()`.

`context` : | a CamelCipherContext
`result` : | a GAsyncResult
`error` : | return location for a GError, or `NULL`
Returns : | a validity/encryption status, or `NULL` on error

Since 3.0

### camel_cipher_context_import_keys_sync ()

    gboolean            camel_cipher_context_import_keys_sync
                                                            (CamelCipherContext *context,
                                                             CamelStream *istream,
                                                             GCancellable *cancellable,
                                                             GError **error);

Imports a stream of keys/certificates contained within `istream` into the key/certificate database controlled by `context`.

`context` : | a CamelCipherContext
`istream` : | an input stream containing keys
`cancellable` : | optional GCancellable object, or `NULL`
`error` : | return location for a GError, or `NULL`
Returns : | `TRUE` on success, `FALSE` on error

Since 3.0

### camel_cipher_context_import_keys ()

    void                camel_cipher_context_import_keys    (CamelCipherContext *context,
                                                             CamelStream *istream,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously imports a stream of keys/certificates contained within `istream` into the key/certificate database controlled by `context`.

When the operation is finished, `callback` will be called. You can then call `camel_cipher_context_import_keys_finish()` to get the result of the operation.

`context` : | a CamelCipherContext
`istream` : | an input stream containing keys
`io_priority` : | the I/O priority of the request
`cancellable` : | optional GCancellable object, or `NULL`
`callback` : | a GAsyncReadyCallback to call when the request is satisfied
`user_data` : | data to pass to the callback function

Since 3.0

### camel_cipher_context_import_keys_finish ()

    gboolean            camel_cipher_context_import_keys_finish
                                                            (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes the operation started with `camel_cipher_context_import_keys()`.

`context` : | a CamelCipherContext
`result` : | a GAsyncResult
`error` : | return location for a GError, or `NULL`
Returns : | `TRUE` on success, `FALSE` on error

Since 3.0

### camel_cipher_context_export_keys_sync ()

    gboolean            camel_cipher_context_export_keys_sync
                                                            (CamelCipherContext *context,
                                                             GPtrArray *keys,
                                                             CamelStream *ostream,
                                                             GCancellable *cancellable,
                                                             GError **error);

Exports the keys/certificates in `keys` to the stream `ostream` from the key/certificate database controlled by `context`.

`context` : | a CamelCipherContext
`keys` : | an array of key IDs
`ostream` : | an output stream
`cancellable` : | optional GCancellable object, or `NULL`
`error` : | return location for a GError, or `NULL`
Returns : | `TRUE` on success, `FALSE` on error

Since 3.0

### camel_cipher_context_export_keys ()

    void                camel_cipher_context_export_keys    (CamelCipherContext *context,
                                                             GPtrArray *keys,
                                                             CamelStream *ostream,
                                                             gint io_priority,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously exports the keys/certificates in `keys` to the stream `ostream` from the key/certificate database controlled by `context`.

When the operation is finished, `callback` will be called. You can then call `camel_cipher_context_export_keys_finish()` to get the result of the operation.

`context` : | a CamelCipherContext
`keys` : | an array of key IDs
`ostream` : | an output stream
`io_priority` : | the I/O priority of the request
`cancellable` : | optional GCancellable object, or `NULL`
`callback` : | a GAsyncReadyCallback to call when the request is satisfied
`user_data` : | data to pass to the callback function

Since 3.0

### camel_cipher_context_export_keys_finish ()

    gboolean            camel_cipher_context_export_keys_finish
                                                            (CamelCipherContext *context,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes the operation started with `camel_cipher_context_export_keys()`.

`context` : | a CamelCipherContext
`result` : | a GAsyncResult
`error` : | return location for a GError, or `NULL`
Returns : | `TRUE` on success, `FALSE` on error

Since 3.0

### camel_cipher_validity_new ()

    CamelCipherValidity * camel_cipher_validity_new         (void);

Returns : |

### camel_cipher_validity_init ()

    void                camel_cipher_validity_init          (CamelCipherValidity *validity);

`validity` : |

### camel_cipher_validity_get_valid ()

    gboolean            camel_cipher_validity_get_valid     (CamelCipherValidity *validity);

`validity` : |
Returns : |

### camel_cipher_validity_set_valid ()

    void                camel_cipher_validity_set_valid     (CamelCipherValidity *validity,
                                                             gboolean valid);

`validity` : |
`valid` : |

### camel_cipher_validity_get_description ()

    gchar *             camel_cipher_validity_get_description
                                                            (CamelCipherValidity *validity);

`validity` : |
Returns : |

### camel_cipher_validity_set_description ()

    void                camel_cipher_validity_set_description
                                                            (CamelCipherValidity *validity,
                                                             const gchar *description);

`validity` : |
`description` : |

### camel_cipher_validity_clear ()

    void                camel_cipher_validity_clear         (CamelCipherValidity *validity);

`validity` : |

### camel_cipher_validity_clone ()

    CamelCipherValidity * camel_cipher_validity_clone       (CamelCipherValidity *vin);

`vin` : |
Returns : |

### camel_cipher_validity_add_certinfo ()

    void                camel_cipher_validity_add_certinfo  (CamelCipherValidity *vin,
                                                             camel_cipher_validity_mode_t mode,
                                                             const gchar *name,
                                                             const gchar *email);

Add a cert info to the signer or encrypter info.

### camel_cipher_validity_add_certinfo_ex ()

    void                camel_cipher_validity_add_certinfo_ex
                                                            (CamelCipherValidity *vin,
                                                             camel_cipher_validity_mode_t mode,
                                                             const gchar *name,
                                                             const gchar *email,
                                                             gpointer cert_data,
                                                             void (cert_data_freegpointer cert_data) (),
                                                             gpointer (cert_data_clonegpointer cert_data) ());

Add a cert info to the signer or encrypter info, with extended data set.

`vin` : |
`mode` : |
`name` : |
`email` : |

`cert_data` :

`gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data: `gpointer` cert_data:

Since 2.30

### camel_cipher_validity_envelope ()

    void                camel_cipher_validity_envelope      (CamelCipherValidity *parent,
                                                             CamelCipherValidity *valid);

Calculate a conglomerate validity based on wrapping one secure part inside another one.

### camel_cipher_validity_free ()

    void                camel_cipher_validity_free          (CamelCipherValidity *validity);

`validity` : |

### camel_cipher_canonical_to_stream ()

    gint                camel_cipher_canonical_to_stream    (CamelMimePart *part,
                                                             guint32 flags,
                                                             CamelStream *ostream,
                                                             GCancellable *cancellable,
                                                             GError **error);

Writes a part to a stream in a canonicalised format, suitable for signing/encrypting.

The transfer encoding paramaters for the part may be changed by this function.

`part` : | Part to write.
`flags` : | flags for the canonicalisation filter (CamelMimeFilterCanon)
`ostream` : | stream to write canonicalised output to.
`cancellable` : | optional GCancellable object, or `NULL`
`error` : | return location for a GError, or `NULL`
Returns : | -1 on error;

## Property Details

### The `"session"` property

      "session"                  CamelSession*         : Read / Write / Construct Only