p11_index_lookup (p11_index *index,
                  CK_OBJECT_HANDLE handle)
{
	index_object *obj;

	return_val_if_fail (index != NULL, NULL);

	if (handle == CK_INVALID_HANDLE)
		return NULL;

	obj = p11_dict_get (index->objects, &handle);
	return obj ? obj->attrs : NULL;
}
p11_index_lookup (p11_index *index,
                  CK_OBJECT_HANDLE handle)
{
	index_object *obj;

	return_val_if_fail (index != NULL, NULL);

	if (handle == CK_INVALID_HANDLE)
		return NULL;

	obj = p11_dict_get (index->objects, &handle);
	return obj ? obj->attrs : NULL;
}