Beispiel #1
0
TEE_Result TEE_GetNextPersistentObject(TEE_ObjectEnumHandle objectEnumerator,
				       TEE_ObjectInfo *objectInfo,
				       void *objectID, uint32_t *objectIDLen)
{
	TEE_Result res;

	if (!objectID) {
		res = TEE_ERROR_BAD_PARAMETERS;
		goto out;
	}

	if (!objectIDLen) {
		res = TEE_ERROR_BAD_PARAMETERS;
		goto out;
	}

	res = utee_storage_next_enum(objectEnumerator, objectInfo, objectID,
				     objectIDLen);

out:
	if (res != TEE_SUCCESS &&
	    res != TEE_ERROR_ITEM_NOT_FOUND &&
	    res != TEE_ERROR_CORRUPT_OBJECT &&
	    res != TEE_ERROR_STORAGE_NOT_AVAILABLE)
		TEE_Panic(0);

	return res;
}
Beispiel #2
0
TEE_Result TEE_GetNextPersistentObject(TEE_ObjectEnumHandle objectEnumerator,
                                       TEE_ObjectInfo *objectInfo,
                                       void *objectID, size_t *objectIDLen)
{
    TEE_Result res;

    res =
        utee_storage_next_enum(objectEnumerator, objectInfo, objectID,
                               objectIDLen);

    if (res != TEE_SUCCESS && res != TEE_ERROR_ITEM_NOT_FOUND)
        TEE_Panic(0);

    return res;
}
Beispiel #3
0
TEE_Result TEE_GetNextPersistentObject(TEE_ObjectEnumHandle objectEnumerator,
				       TEE_ObjectInfo *objectInfo,
				       void *objectID, uint32_t *objectIDLen)
{
	TEE_Result res;
	uint64_t len;
	TEE_ObjectInfo local_info;
	TEE_ObjectInfo *pt_info;

	if (!objectID) {
		res = TEE_ERROR_BAD_PARAMETERS;
		goto out;
	}

	if (!objectIDLen) {
		res = TEE_ERROR_BAD_PARAMETERS;
		goto out;
	}

	if (objectInfo)
		pt_info = objectInfo;
	else
		pt_info = &local_info;
	len = *objectIDLen;
	res = utee_storage_next_enum((unsigned long)objectEnumerator,
				     pt_info, objectID, &len);
	*objectIDLen = len;

out:
	if (res != TEE_SUCCESS &&
	    res != TEE_ERROR_ITEM_NOT_FOUND &&
	    res != TEE_ERROR_CORRUPT_OBJECT &&
	    res != TEE_ERROR_STORAGE_NOT_AVAILABLE)
		TEE_Panic(0);

	return res;
}