Camel.GpgContext

g Camel.CipherContext Camel.CipherContext Camel.GpgContext Camel.GpgContext Camel.CipherContext->Camel.GpgContext GObject.Object GObject.Object GObject.Object->Camel.CipherContext

Subclasses:

None

Methods

Inherited:

Camel.CipherContext (17), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (session)

get_always_trust ()

get_key_data_info_sync (data, data_size, flags, cancellable)

get_locate_keys ()

get_prefer_inline ()

get_public_key_info_sync (keyid, flags, cancellable)

get_public_key_sync (keyid, flags, cancellable)

has_public_key_sync (keyid, cancellable)

import_key_sync (data, data_size, flags, cancellable)

set_always_trust (always_trust)

set_key_trust_sync (keyid, trust, cancellable)

set_locate_keys (locate_keys)

set_prefer_inline (prefer_inline)

Virtual Methods

Inherited:

Camel.CipherContext (6), GObject.Object (7)

Properties

Inherited:

Camel.CipherContext (1)

Name

Type

Flags

Short Description

always-trust

bool

r/w/c/en

locate-keys

bool

r/w/c/en

prefer-inline

bool

r/w/c/en

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Camel.CipherContext

r

Class Details

class Camel.GpgContext(**kwargs)
Bases:

Camel.CipherContext

Abstract:

No

Structure:

Camel.GpgContextClass

classmethod new(session)
Parameters:

session (Camel.Session or None) – session

Returns:

a new gpg cipher context object.

Return type:

Camel.CipherContext

Creates a new gpg cipher context object.

get_always_trust()
Return type:

bool

New in version 2.32.

get_key_data_info_sync(data, data_size, flags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

whether succeeded

out_infos:

an out parameter to get GLib.SList of Camel.GpgKeyInfo structures

Return type:

(bool, out_infos: [Camel.GpgKeyInfo])

Receives information about a key stored in data of size data_size.

The flags argument is currently unused and should be set to 0.

Free the returned out_infos with g_slist_free_full (infos, Camel.GpgKeyInfo.free); when no longer needed.

New in version 3.50.

get_locate_keys()
Returns:

whether gpg can locate keys using Web Key Directory (WKD) lookup when encrypting messages.

Return type:

bool

Returns, whether gpg can locate keys using Web Key Directory (WKD) lookup when encrypting messages. The default is True.

New in version 3.46.

get_prefer_inline()
Returns:

Whether prefer inline sign/encrypt (True), or as multiparts (False)

Return type:

bool

New in version 3.20.

get_public_key_info_sync(keyid, flags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

whether succeeded

out_infos:

an out parameter to get GLib.SList of Camel.GpgKeyInfo structures

Return type:

(bool, out_infos: [Camel.GpgKeyInfo])

Receives information about a key keyid.

The keyid can be either key ID or an email address.

The flags argument is currently unused and should be set to 0.

Free the returned out_infos with g_slist_free_full (infos, Camel.GpgKeyInfo.free); when no longer needed.

New in version 3.50.

get_public_key_sync(keyid, flags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

whether succeeded

out_data:

return location for the public key data, in binary form

out_data_size:

return location to store the out_data size to

Return type:

(bool, out_data: int, out_data_size: int)

Returns a public key with keyid.

The keyid can be either key ID or an email address.

The flags argument is currently unused and should be set to 0.

The out_data content should be freed with GLib.free(), when no longer needed.

New in version 3.50.

has_public_key_sync(keyid, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

whether the key could be found

Return type:

bool

Checks whether there exists a public key with keyid.

The keyid can be either key ID or an email address.

New in version 3.50.

import_key_sync(data, data_size, flags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

whether succeeded

Return type:

bool

Imports a (public) key provided in a binary form stored in the data of size data_size.

New in version 3.50.

set_always_trust(always_trust)
Parameters:

always_trust (bool) – always trust flag

Sets the always_trust flag on the gpg context which is used for encryption.

set_key_trust_sync(keyid, trust, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

whether succeeded

Return type:

bool

Sets trust level on the key keyid.

The keyid can be either key ID or an email address.

New in version 3.50.

set_locate_keys(locate_keys)
Parameters:

locate_keys (bool) – value to set

Sets the locate_keys on the gpg context which is used to instruct gpg to locate keys using Web Key Directory (WKD) lookup when encrypting messages.

New in version 3.46.

set_prefer_inline(prefer_inline)
Parameters:

prefer_inline (bool) – whether prefer inline sign/encrypt

Sets the prefer_inline flag on the gpg context.

New in version 3.20.

Property Details

Camel.GpgContext.props.always_trust
Name:

always-trust

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

Camel.GpgContext.props.locate_keys
Name:

locate-keys

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY

Camel.GpgContext.props.prefer_inline
Name:

prefer-inline

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT, EXPLICIT_NOTIFY