diff options
author | Stef Walter <stef@memberwebs.com> | 2007-05-06 13:40:52 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2007-05-06 13:40:52 +0000 |
commit | 80ca168a6b656dfc7bcc0cc32e90391b66b6bf4c (patch) | |
tree | 61a23ca635748acfa8d23a98105494ad575bc4f1 /ckcapi-object.c | |
parent | 8ae74e82e50a2e4e7e48b6a25aad42fadfbcfaca (diff) |
Complete trust for Mozilla.
Diffstat (limited to 'ckcapi-object.c')
-rw-r--r-- | ckcapi-object.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/ckcapi-object.c b/ckcapi-object.c index 4bc0ce1..763102c 100644 --- a/ckcapi-object.c +++ b/ckcapi-object.c @@ -15,8 +15,9 @@ static void object_free(CkCapiObject* obj) { ASSERT(obj); - ASSERT(obj->obj_funcs.release); - (obj->obj_funcs.release)(obj); + ASSERT(obj->obj_funcs); + ASSERT(obj->obj_funcs->release); + (obj->obj_funcs->release)(obj); } void @@ -312,6 +313,7 @@ ckcapi_object_data_match_attr(CkCapiObjectData* objdata, CK_ATTRIBUTE_PTR match) ASSERT(match); ASSERT(objdata && objdata->data); + ASSERT(objdata->data_funcs); /* Get the data type of the attribute */ dtype = attribute_data_type(match->type); @@ -329,16 +331,16 @@ ckcapi_object_data_match_attr(CkCapiObjectData* objdata, CK_ATTRIBUTE_PTR match) switch(dtype) { case DATA_BOOL: - rv = (objdata->data_funcs.get_bool)(objdata->data, match->type, value, &len); + rv = (objdata->data_funcs->get_bool)(objdata->data, match->type, value, &len); break; case DATA_ULONG: - rv = (objdata->data_funcs.get_ulong)(objdata->data, match->type, value, &len); + rv = (objdata->data_funcs->get_ulong)(objdata->data, match->type, value, &len); break; case DATA_BYTES: - rv = (objdata->data_funcs.get_bytes)(objdata->data, match->type, value, &len); + rv = (objdata->data_funcs->get_bytes)(objdata->data, match->type, value, &len); break; case DATA_DATE: - rv = (objdata->data_funcs.get_date)(objdata->data, match->type, value, &len); + rv = (objdata->data_funcs->get_date)(objdata->data, match->type, value, &len); break; default: ASSERT(0 && "unrecognized type"); @@ -392,20 +394,20 @@ ckcapi_object_data_get_attrs(CkCapiObjectData* objdata, CK_ATTRIBUTE_PTR attrs, switch(attribute_data_type(attrs[i].type)) { case DATA_BOOL: - rv = (objdata->data_funcs.get_bool)(objdata->data, attrs[i].type, - attrs[i].pValue, &attrs[i].ulValueLen); + rv = (objdata->data_funcs->get_bool)(objdata->data, attrs[i].type, + attrs[i].pValue, &attrs[i].ulValueLen); break; case DATA_ULONG: - rv = (objdata->data_funcs.get_ulong)(objdata->data, attrs[i].type, - attrs[i].pValue, &attrs[i].ulValueLen); + rv = (objdata->data_funcs->get_ulong)(objdata->data, attrs[i].type, + attrs[i].pValue, &attrs[i].ulValueLen); break; case DATA_BYTES: - rv = (objdata->data_funcs.get_bytes)(objdata->data, attrs[i].type, - attrs[i].pValue, &attrs[i].ulValueLen); + rv = (objdata->data_funcs->get_bytes)(objdata->data, attrs[i].type, + attrs[i].pValue, &attrs[i].ulValueLen); break; case DATA_DATE: - rv = (objdata->data_funcs.get_date)(objdata->data, attrs[i].type, - attrs[i].pValue, &attrs[i].ulValueLen); + rv = (objdata->data_funcs->get_date)(objdata->data, attrs[i].type, + attrs[i].pValue, &attrs[i].ulValueLen); break; case DATA_UNKNOWN: rv = CKR_ATTRIBUTE_TYPE_INVALID; |