JcatEngine

JcatEngine

Functions

Types and Values

Description

Functions

jcat_engine_get_kind ()

JcatBlobKind
jcat_engine_get_kind (JcatEngine *self);

Gets the blob kind.

Parameters

self

JcatEngine

 

Since: 0.1.3


jcat_engine_get_method ()

JcatBlobMethod
jcat_engine_get_method (JcatEngine *self);

Gets the verification method.

Parameters

self

JcatEngine

 

Since: 0.1.3


jcat_engine_pubkey_verify ()

JcatResult *
jcat_engine_pubkey_verify (JcatEngine *self,
                           GBytes *blob,
                           GBytes *blob_signature,
                           JcatVerifyFlags flags,
                           GError **error);

Verifies a chunk of data.

Parameters

self

JcatEngine

 

blob

GBytes

 

blob_signature

GBytes

 

flags

JcatVerifyFlags, e.g. JCAT_VERIFY_FLAG_DISABLE_TIME_CHECKS

 

error

GError, or NULL

 

Returns

JcatResult, or NULL for failed.

[transfer full]

Since: 0.1.0


jcat_engine_pubkey_sign ()

JcatBlob *
jcat_engine_pubkey_sign (JcatEngine *self,
                         GBytes *blob,
                         GBytes *cert,
                         GBytes *privkey,
                         JcatSignFlags flags,
                         GError **error);

Signs a chunk of data.

Parameters

self

JcatEngine

 

blob

GBytes

 

cert

GBytes

 

privkey

GBytes

 

flags

JcatSignFlags, e.g. JCAT_SIGN_FLAG_ADD_TIMESTAMP

 

error

GError, or NULL

 

Returns

JcatBlob, or NULL for failed.

[transfer full]

Since: 0.1.0


jcat_engine_self_verify ()

JcatResult *
jcat_engine_self_verify (JcatEngine *self,
                         GBytes *blob,
                         GBytes *blob_signature,
                         JcatVerifyFlags flags,
                         GError **error);

Verifies a chunk of data.

Parameters

self

JcatEngine

 

blob

GBytes

 

blob_signature

GBytes

 

flags

JcatVerifyFlags, e.g. JCAT_VERIFY_FLAG_DISABLE_TIME_CHECKS

 

error

GError, or NULL

 

Returns

JcatResult, or NULL for failed.

[transfer full]

Since: 0.1.0


jcat_engine_self_sign ()

JcatBlob *
jcat_engine_self_sign (JcatEngine *self,
                       GBytes *blob,
                       JcatSignFlags flags,
                       GError **error);

Signs a chunk of data.

Parameters

self

JcatEngine

 

blob

GBytes

 

flags

JcatSignFlags, e.g. JCAT_SIGN_FLAG_ADD_TIMESTAMP

 

error

GError, or NULL

 

Returns

JcatBlob, or NULL for failed.

[transfer full]

Since: 0.1.0


jcat_engine_add_public_key_raw ()

gboolean
jcat_engine_add_public_key_raw (JcatEngine *self,
                                GBytes *blob,
                                GError **error);

Adds a public key manually.

Parameters

self

JcatEngine

 

blob

GBytes

 

error

GError, or NULL

 

Returns

%

Since: 0.1.9

Types and Values

JCAT_TYPE_ENGINE

#define JCAT_TYPE_ENGINE (jcat_engine_get_type())

struct JcatEngineClass

struct JcatEngineClass {
	GObjectClass parent_class;
	gboolean (*setup)(JcatEngine *self, GError **error);
	gboolean (*add_public_key)(JcatEngine *self, const gchar *filename, GError **error);
	JcatResult *(*pubkey_verify)(JcatEngine *self,
				     GBytes *blob,
				     GBytes *blob_signature,
				     JcatVerifyFlags flags,
				     GError **error);
	JcatBlob *(*pubkey_sign)(JcatEngine *self,
				 GBytes *blob,
				 GBytes *cert,
				 GBytes *privkey,
				 JcatSignFlags flags,
				 GError **error);
	JcatResult *(*self_verify)(JcatEngine *self,
				   GBytes *blob,
				   GBytes *blob_signature,
				   JcatVerifyFlags flags,
				   GError **error);
	JcatBlob *(*self_sign)(JcatEngine *self, GBytes *blob, JcatSignFlags flags, GError **error);
	gboolean (*add_public_key_raw)(JcatEngine *self, GBytes *blob, GError **error);
	gpointer padding[8];
};

JcatEngine

typedef struct _JcatEngine JcatEngine;