These fixes allow the Authvars TA to run enough for basic testing to start.
In memory variable lists are now initialized properly
On clean RPMB TEE_StartPersistentObjectEnumerator() will return TEE_ERROR_ITEM_NOT_FOUND, handle this.
Even though we don't need to keep track of the unique object IDs used to create persistent objects, OP-TEE requires they be unique. Use a truncated SHA256 hash of (GUID + Variable Name) as the object ID when creating a new variable. This ID is picked back up when enumerating the persistent objects during initialization (although we don't currently need it again).
AuthVarDumpVarList() updated to work again, also prints volatile variables as well.
Note: The Authvar TA is currently not tracking newly created variables correctly and returns TEE_ERROR_ACCESS_CONFLICT because it attempts to create a new persistent object but the SHA256 hash always produce the same object ID for the same GUID + name.
These fixes allow the Authvars TA to run enough for basic testing to start.
Note: The Authvar TA is currently not tracking newly created variables correctly and returns TEE_ERROR_ACCESS_CONFLICT because it attempts to create a new persistent object but the SHA256 hash always produce the same object ID for the same GUID + name.