Lines Matching refs:obj

310 				  struct pkcs11_object *obj)  in create_object_uuid()  argument
312 assert(!obj->uuid); in create_object_uuid()
314 obj->uuid = TEE_Malloc(sizeof(TEE_UUID), in create_object_uuid()
316 if (!obj->uuid) in create_object_uuid()
319 obj->token = token; in create_object_uuid()
322 TEE_GenerateRandom(obj->uuid, sizeof(TEE_UUID)); in create_object_uuid()
323 } while (get_persistent_obj_idx(token, obj->uuid) >= 0); in create_object_uuid()
329 struct pkcs11_object *obj) in destroy_object_uuid() argument
331 assert(get_persistent_obj_idx(token, obj->uuid) < 0); in destroy_object_uuid()
333 TEE_Free(obj->uuid); in destroy_object_uuid()
334 obj->uuid = NULL; in destroy_object_uuid()
468 enum pkcs11_rc load_persistent_object_attributes(struct pkcs11_object *obj) in load_persistent_object_attributes() argument
472 TEE_ObjectHandle hdl = obj->attribs_hdl; in load_persistent_object_attributes()
477 if (obj->attributes) in load_persistent_object_attributes()
482 obj->uuid, sizeof(*obj->uuid), in load_persistent_object_attributes()
524 obj->attributes = attr; in load_persistent_object_attributes()
532 if (obj->attribs_hdl == TEE_HANDLE_NULL) in load_persistent_object_attributes()
538 void release_persistent_object_attributes(struct pkcs11_object *obj) in release_persistent_object_attributes() argument
540 TEE_Free(obj->attributes); in release_persistent_object_attributes()
541 obj->attributes = NULL; in release_persistent_object_attributes()
544 enum pkcs11_rc update_persistent_object_attributes(struct pkcs11_object *obj) in update_persistent_object_attributes() argument
551 assert(obj && obj->attributes); in update_persistent_object_attributes()
554 obj->uuid, sizeof(*obj->uuid), in update_persistent_object_attributes()
561 size = sizeof(struct obj_attrs) + obj->attributes->attrs_size; in update_persistent_object_attributes()
563 res = TEE_WriteObjectData(hdl, obj->attributes, size); in update_persistent_object_attributes()
632 struct pkcs11_object *obj = NULL; in init_persistent_db() local
642 obj = create_token_object(NULL, uuid, token); in init_persistent_db()
643 if (!obj) in init_persistent_db()
646 LIST_INSERT_HEAD(&token->object_list, obj, link); in init_persistent_db()