ESourceSMIME

ESourceSMIME — ESource extension for S/MIME settings

Functions

Properties

gboolean encrypt-by-default Read / Write / Construct
gboolean encrypt-to-self Read / Write / Construct
gchar * encryption-certificate Read / Write / Construct
gboolean sign-by-default Read / Write / Construct
gchar * signing-algorithm Read / Write / Construct
gchar * signing-certificate Read / Write / Construct

Types and Values

Object Hierarchy

    GObject
    ╰── ESourceExtension
        ╰── ESourceSMIME

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:

  #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

struct ESourceSMIME

struct ESourceSMIME;

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

Since 3.6


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

Property Details

The “encrypt-by-default” property

  “encrypt-by-default”       gboolean

Encrypt outgoing messages by default.

Flags: Read / Write / Construct

Default value: FALSE


The “encrypt-to-self” property

  “encrypt-to-self”          gboolean

Always encrypt to myself.

Flags: Read / Write / Construct

Default value: TRUE


The “encryption-certificate” property

  “encryption-certificate”   gchar *

S/MIME certificate for encrypting messages.

Flags: Read / Write / Construct

Default value: NULL


The “sign-by-default” property

  “sign-by-default”          gboolean

Sign outgoing messages by default.

Flags: Read / Write / Construct

Default value: FALSE


The “signing-algorithm” property

  “signing-algorithm”        gchar *

Hash algorithm used to sign messages.

Flags: Read / Write / Construct

Default value: NULL


The “signing-certificate” property

  “signing-certificate”      gchar *

S/MIME certificate for signing messages.

Flags: Read / Write / Construct

Default value: NULL