## ESourceSMIME ESourceSMIME — ESource extension for S/MIME settings |

## Functions

const gchar * | e_source_smime_get_encryption_certificate ()
gchar * | e_source_smime_dup_encryption_certificate ()
void | e_source_smime_set_encryption_certificate ()
gboolean | e_source_smime_get_encrypt_by_default ()
void | e_source_smime_set_encrypt_by_default ()
gboolean | e_source_smime_get_encrypt_to_self ()
void | e_source_smime_set_encrypt_to_self ()
const gchar * | e_source_smime_get_signing_algorithm ()
gchar * | e_source_smime_dup_signing_algorithm ()
void | e_source_smime_set_signing_algorithm ()
const gchar * | e_source_smime_get_signing_certificate ()
gchar * | e_source_smime_dup_signing_certificate ()
void | e_source_smime_set_signing_certificate ()
gboolean | e_source_smime_get_sign_by_default ()
void | e_source_smime_set_sign_by_default ()

## Types and Values

#define | E_SOURCE_EXTENSION_SMIME
struct | ESourceSMIME
struct | ESourceSMIMEClass

## Includes

    #include <libedataserver/libedataserver.h>

## Description

The ESourceSMIME extension tracks Secure/Multipurpose Internet Mail Extensions (S/MIME) settings to be applied to outgoing mail messages.

Access the extension as follows:

    1
    2
    3
    4
    5
    #include <libedataserver/libedataserver.h>

    ESourceSMIME *extension;

    extension = e_source_get_extension (source, E_SOURCE_EXTENSION_SMIME);

## Functions

### e_source_smime_get_encryption_certificate ()

    const gchar *
    e_source_smime_get_encryption_certificate
                                   (ESourceSMIME *extension);

Returns the S/MIME certificate name used to encrypt messages.

#### Parameters

extension | an ESourceSMIME |

#### Returns

the certificate name used to encrypt messages

Since 3.6

### e_source_smime_dup_encryption_certificate ()

    gchar *
    e_source_smime_dup_encryption_certificate
                                   (ESourceSMIME *extension);

Thread-safe variation of `e_source_smime_get_encryption_certificate()`. Use this function when accessing `extension` from multiple threads.

The returned string should be freed with `g_free()` when no longer needed.

#### Parameters

extension | an ESourceSMIME |

#### Returns

a newly-allocated copy of “encryption-certificate”

Since 3.6

### e_source_smime_set_encryption_certificate ()

    void
    e_source_smime_set_encryption_certificate
                                   (ESourceSMIME *extension,
                                    const gchar *encryption_certificate);

Sets the certificate name used to encrypt messages.

The internal copy of `encryption_certificate` is automatically stripped of leading and trailing whitespace. If the resulting string is empty, `NULL` is set instead.

#### Parameters

extension | an ESourceSMIME |
encryption_certificate | the certificate name used to encrypt messages, or `NULL`. | [allow-none]

Since 3.6

### e_source_smime_get_encrypt_by_default ()

    gboolean
    e_source_smime_get_encrypt_by_default (ESourceSMIME *extension);

Returns whether to encrypt outgoing messages by default using S/MIME software such as Mozilla Network Security Services (NSS).

#### Parameters

extension | an ESourceSMIME |

#### Returns

whether to encrypt outgoing messages by default

Since 3.6

### e_source_smime_set_encrypt_by_default ()

    void
    e_source_smime_set_encrypt_by_default (ESourceSMIME *extension,
                                           gboolean encrypt_by_default);

Sets whether to encrypt outgoing messages by default using S/MIME software such as Mozilla Network Security Services (NSS).

#### Parameters

extension | an ESourceSMIME |
encrypt_by_default | whether to encrypt outgoing messages by default |

Since 3.6

### e_source_smime_get_encrypt_to_self ()

    gboolean
    e_source_smime_get_encrypt_to_self (ESourceSMIME *extension);

Returns whether to "encrypt-to-self" when sending encrypted messages.

#### Parameters

extension | an ESourceSMIME |

#### Returns

whether to "encrypt-to-self"

Since 3.6

### e_source_smime_set_encrypt_to_self ()

    void
    e_source_smime_set_encrypt_to_self (ESourceSMIME *extension,
                                        gboolean encrypt_to_self);

Sets whether to "encrypt-to-self" when sending encrypted messages.

#### Parameters

extension | an ESourceSMIME |
encrypt_to_self | whether to "encrypt-to-self" |

Since 3.6

### e_source_smime_get_signing_algorithm ()

    const gchar *
    e_source_smime_get_signing_algorithm (ESourceSMIME *extension);

Returns the name of the hash algorithm used to digitally sign outgoing messages.

#### Parameters

extension | an ESourceSMIME |

#### Returns

the signing algorithm for outgoing messages

Since 3.6

### e_source_smime_dup_signing_algorithm ()

    gchar *
    e_source_smime_dup_signing_algorithm (ESourceSMIME *extension);

Thread-safe variation of `e_source_smime_get_signing_algorithm()`. Use this function when accessing `extension` from multiple threads.

The returned string should be freed with `g_free()` when no longer needed.

#### Parameters

extension | an ESourceSMIME |

#### Returns

a newly-allocated copy of “signing-algorithm”

Since 3.6

### e_source_smime_set_signing_algorithm ()

    void
    e_source_smime_set_signing_algorithm (ESourceSMIME *extension,
                                          const gchar *signing_algorithm);

Sets the name of the hash algorithm used to digitally sign outgoing messages.

The internal copy of `signing_algorithm` is automatically stripped of leading and trailing whitespace. If the resulting string is empty, `NULL` is set instead.

#### Parameters

extension | an ESourceSMIME |
signing_algorithm | the signing algorithm for outgoing messages, or `NULL`. | [allow-none]

Since 3.6

### e_source_smime_get_signing_certificate ()

    const gchar *
    e_source_smime_get_signing_certificate
                                   (ESourceSMIME *extension);

Returns the S/MIME certificate name used to sign messages.

#### Parameters

extension | an ESourceSMIME |

#### Returns

the certificate name used to sign messages

Since 3.6

### e_source_smime_dup_signing_certificate ()

    gchar *
    e_source_smime_dup_signing_certificate
                                   (ESourceSMIME *extension);

Thread-safe variation of `e_source_smime_get_signing_certificate()`. Use this function when accessing `extension` from multiple threads.

The returned string should be freed with `g_free()` when no longer needed.

#### Parameters

extension | an ESourceSMIME |

#### Returns

a newly-allocated copy of “signing-certificate”

Since 3.6

### e_source_smime_set_signing_certificate ()

    void
    e_source_smime_set_signing_certificate
                                   (ESourceSMIME *extension,
                                    const gchar *signing_certificate);

Sets the S/MIME certificate name used to sign messages.

The internal copy of `signing_certificate` is automatically stripped of leading and trailing whitespace. If the resulting string is empty, `NULL` is set instead.

#### Parameters

extension | an ESourceSMIME |
signing_certificate | the certificate name used to sign messages, or `NULL`. | [allow-none]

Since 3.6

### e_source_smime_get_sign_by_default ()

    gboolean
    e_source_smime_get_sign_by_default (ESourceSMIME *extension);

Returns whether to digitally sign outgoing messages by default using S/MIME software such as Mozilla Network Security Services (NSS).

#### Parameters

extension | an ESourceSMIME |

#### Returns

whether to sign outgoing messages by default

Since 3.6

### e_source_smime_set_sign_by_default ()

    void
    e_source_smime_set_sign_by_default (ESourceSMIME *extension,
                                        gboolean sign_by_default);

Sets whether to digitally sign outgoing messages by default using S/MIME software such as Mozilla Network Security Services (NSS).

#### Parameters

extension | an ESourceSMIME |
sign_by_default | whether to sign outgoing messages by default |

Since 3.6

## Types and Values

### E_SOURCE_EXTENSION_SMIME

    #define E_SOURCE_EXTENSION_SMIME "Secure MIME (S/MIME)"

Pass this extension name to `e_source_get_extension()` to access ESourceSMIME. This is also used as a group name in key files.

Since 3.6

### struct ESourceSMIME

    struct ESourceSMIME {
    	ESourceExtension parent;
    	ESourceSMIMEPrivate *priv;
    };

Contains only private data that should be read and manipulated using the functions below.

Since 3.6

### struct ESourceSMIMEClass

    struct ESourceSMIMEClass {
    	ESourceExtensionClass parent_class;
    };