LiKeyring

LiKeyring — Database of trusted keys as well as methods to verify signatures on Limba packages

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── LiKeyring

Description

Limba maintains two keyrings: One with keys which are trusted explicitly (meaning that a human has explicitly defined them as trusted), and one which is trusted implicitly (meaning that it contains keys of software which has been installed on the system).

Functions

LI_TYPE_KEYRING

#define LI_TYPE_KEYRING (li_keyring_get_type ())


li_keyring_error_quark ()

GQuark
li_keyring_error_quark (void);

Returns

An error quark.


li_keyring_new ()

LiKeyring *
li_keyring_new (void);

Creates a new LiKeyring.

Returns

a LiKeyring.

[transfer full]


li_keyring_add_key ()

gboolean
li_keyring_add_key (LiKeyring *kr,
                    const gchar *fpr,
                    GError **error);

Get a key matching the fingerprint and add it to the list of trusted keys.

Parameters

kr

An instance of LiKeyring

 

fpr

The fingerprint of the key to fetch.

 

li_keyring_add_key_file ()

gboolean
li_keyring_add_key_file (LiKeyring *kr,
                         const gchar *fname,
                         GError **error);

Get a key matching the fingerprint and add it to the list of trusted keys.

Parameters

kr

An instance of LiKeyring

 

fname

The fingerprint of the key to fetch.

 

li_keyring_refresh_keys ()

gboolean
li_keyring_refresh_keys (LiKeyring *kr,
                         GError **error);

Scan for keys in keyring import directories and rebuild the actual keyrings using them.

Parameters

kr

An instance of LiKeyring

 

li_keyring_verify_clear_signature ()

gchar *
li_keyring_verify_clear_signature (LiKeyring *kr,
                                   LiKeyringKind kind,
                                   const gchar *sigtext,
                                   gchar **out_fpr,
                                   GError **error);

Verifies a GPG signature.

Returns

The data which was signed.


li_keyring_process_signature ()

LiTrustLevel
li_keyring_process_signature (LiKeyring *kr,
                              const gchar *sigtext,
                              gchar **out_data,
                              gchar **out_fpr,
                              GError **error);

Validate the signature of an IPK package and check the trusted keyrings to determine a trust-level for this package.

Types and Values

struct LiKeyringClass

struct LiKeyringClass {
	GObjectClass		parent_class;
};


enum LiKeyringKind

Type of the keyring to validate against.

Members

LI_KEYRING_KIND_NONE

No specific keyring should be used.

 

LI_KEYRING_KIND_ALL

Use all keyrings.

 

LI_KEYRING_KIND_VENDOR

Use the vendor keyring, containing explicitly trusted keys by the distribution vendor.

 

LI_KEYRING_KIND_EXTRA

Use the extra keyring, containing manually trusted keys by the user.

 

enum LiKeyringError

The error type.

Members

LI_KEYRING_ERROR_FAILED

Generic failure

 

LI_KEYRING_ERROR_SCAN

Looking for keys has failed.

 

LI_KEYRING_ERROR_IMPORT

Importing of a key failed

 

LI_KEYRING_ERROR_LOOKUP

An error occured while looking up a key

 

LI_KEYRING_ERROR_KEY_UNKNOWN

The key we are dealing with is unknown

 

LI_KEYRING_ERROR_VERIFY

Verification failed

 

LI_KEYRING_ERROR_KEY_MISSING

A (public) key is missing to complete the validation.

 

LI_KEYRING_ERROR

#define LI_KEYRING_ERROR li_keyring_error_quark ()


LiKeyring

typedef struct _LiKeyring LiKeyring;