summaryrefslogtreecommitdiff
path: root/pkcs11/gkm/gkm-assertion.c
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2010-11-25 03:24:09 +0000
committerStef Walter <stefw@collabora.co.uk>2010-11-25 03:24:09 +0000
commit00a1c8b66f5cecbd08e50cb7390d62602a52b77b (patch)
tree2f64ba902398463e141ee0a18e2b48fbcbbdcb96 /pkcs11/gkm/gkm-assertion.c
parent004c9b1d97a6f4e1257f39811af6a406c9fcaaba (diff)
[xdg-store] Assertion creation test and fixes.
Diffstat (limited to 'pkcs11/gkm/gkm-assertion.c')
-rw-r--r--pkcs11/gkm/gkm-assertion.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/pkcs11/gkm/gkm-assertion.c b/pkcs11/gkm/gkm-assertion.c
index 5302652a..c35e3f55 100644
--- a/pkcs11/gkm/gkm-assertion.c
+++ b/pkcs11/gkm/gkm-assertion.c
@@ -95,6 +95,18 @@ gkm_assertion_get_attribute (GkmObject *base, GkmSession *session, CK_ATTRIBUTE_
return GKM_OBJECT_CLASS (gkm_assertion_parent_class)->get_attribute (base, session, attr);
}
+static GObject*
+gkm_assertion_constructor (GType type, guint n_props, GObjectConstructParam *props)
+{
+ GkmAssertion *self = GKM_ASSERTION (G_OBJECT_CLASS (gkm_assertion_parent_class)->constructor(type, n_props, props));
+
+ g_return_val_if_fail (self, NULL);
+ g_return_val_if_fail (self->pv->purpose, NULL);
+ g_return_val_if_fail (self->pv->type, NULL);
+
+ return G_OBJECT (self);
+}
+
static void
gkm_assertion_init (GkmAssertion *self)
{
@@ -179,6 +191,7 @@ gkm_assertion_class_init (GkmAssertionClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GkmObjectClass *gkm_class = GKM_OBJECT_CLASS (klass);
+ gobject_class->constructor = gkm_assertion_constructor;
gobject_class->finalize = gkm_assertion_finalize;
gobject_class->set_property = gkm_assertion_set_property;
gobject_class->get_property = gkm_assertion_get_property;
@@ -197,7 +210,7 @@ gkm_assertion_class_init (GkmAssertionClass *klass)
g_param_spec_string ("purpose", "Purpose", "The purpose for the trust",
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (gobject_class, PROP_PURPOSE,
+ g_object_class_install_property (gobject_class, PROP_PEER,
g_param_spec_string ("peer", "Peer", "Optional peer this assertion applies to",
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));