Camel.GpgContext¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Camel.GpgContext(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(session)¶
- Parameters:
session (
Camel.Session
orNone
) – session- Returns:
a new gpg cipher context object.
- Return type:
Creates a new gpg cipher context object.
- get_key_data_info_sync(data, data_size, flags, cancellable)¶
- Parameters:
data (
int
) – the public key datadata_size (
int
) – the data sizeflags (
int
) – flags for the operationcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
whether succeeded
- out_infos:
an out parameter to get
GLib.SList
ofCamel.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:
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()¶
-
New in version 3.20.
- get_public_key_info_sync(keyid, flags, cancellable)¶
- Parameters:
keyid (
str
) – a key ID or an email addressflags (
int
) – flags for the operationcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
whether succeeded
- out_infos:
an out parameter to get
GLib.SList
ofCamel.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:
keyid (
str
) – a key ID or an email addressflags (
int
) – flags for the operationcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- 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:
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:
keyid (
str
) – a key ID or an email addresscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
whether the key could be found
- Return type:
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:
data (
int
) – the public key datadata_size (
int
) – the data sizeflags (
int
) – bit-or of CamelPgpImportFlags, flags for the operationcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
whether succeeded
- Return type:
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:
keyid (
str
) – a key ID or an email addresstrust (
Camel.GpgTrust
) – aCamel.GpgTrust
to setcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
whether succeeded
- Return type:
Sets trust level on the key keyid.
The keyid can be either key ID or an email address.
New in version 3.50.
Property Details¶
- Camel.GpgContext.props.always_trust¶
- Camel.GpgContext.props.locate_keys¶