Пример #1
0
TEE_Result TEE_AllocateTransientObject(TEE_ObjectType objectType,
                                       uint32_t maxObjectSize,
                                       TEE_ObjectHandle *object)
{
    TEE_Result res;
    uint32_t obj;

    res = utee_cryp_obj_alloc(objectType, maxObjectSize, &obj);
    if (res == TEE_SUCCESS)
        *object = (TEE_ObjectHandle) obj;
    return res;
}
Пример #2
0
TEE_Result TEE_AllocateTransientObject(TEE_ObjectType objectType,
				       uint32_t maxKeySize,
				       TEE_ObjectHandle *object)
{
	TEE_Result res;
	uint32_t obj;

	res = utee_cryp_obj_alloc(objectType, maxKeySize, &obj);

	if (res != TEE_SUCCESS &&
	    res != TEE_ERROR_OUT_OF_MEMORY &&
	    res != TEE_ERROR_NOT_SUPPORTED)
		TEE_Panic(0);

	if (res == TEE_SUCCESS)
		*object = (TEE_ObjectHandle)(uintptr_t)obj;

	return res;
}