Hi,
I’m have an issue with secure storage after migrating to vscode and upgrading to a newer firmware version on a Sierra Wireless WP77xx modem.
I get a build error where some defines in the generated secstore interface are not set properly:
[…]/client/le_secstore_interface.h:199:0: error: “LE_SECSTORE_MAX_NAME_BYTES” redefined [-Werror]
#define LE_SECSTORE_MAX_NAME_BYTES LE_SECSTORE_MAX_NAME_BYTES
The same goes for LE_SECSTORE_MAX_NAME_SIZE and LE_SECSTORE_MAX_ITEM_SIZE. When i look into the linked secstore interface then i see the following weird (re)defines:
#define LE_SECSTORE_MAX_NAME_SIZE LE_SECSTORE_MAX_NAME_SIZE
#define LE_SECSTORE_MAX_NAME_BYTES LE_SECSTORE_MAX_NAME_BYTES
#define LE_SECSTORE_MAX_ITEM_SIZE LE_SECSTORE_MAX_ITEM_SIZE
I have compared this generated secstore interface with the interface generated by developer studio. There I see that those defines are correct:
#define LE_SECSTORE_MAX_NAME_SIZE 255
#define LE_SECSTORE_MAX_NAME_BYTES 256
#define LE_SECSTORE_MAX_ITEM_SIZE 8192
I have tried to change the defined manually, this solves the build issue but the secstore is still not working properly.
Whenever I want to use the (global) secure storage I get errors and the data could not be retrieved.
Jul 20 16:43:29 | TestComponentExe[13044]/framework T=action | secStoreGlobal_client.c DoConnectService() 242
Jul 20 18:43:29 | secStore[13187]/le_pa_tz T=main | trustZone.c TzIoctl() 75 | ioctl /dev/tzdev failed, ret=-1
Jul 20 18:43:29 | secStore[13187]/le_pa_tz T=main | trustZone.c SendTzRequest() 123 | TzIoctl ret=-1
Jul 20 18:43:29 | secStore[13187]/le_pa_tz T=main | trustZone.c tz_DecryptData() 345 | Error decrypting string.
Jul 20 18:43:29 | secStore[13187]/le_pa_secStoreTz T=main | pa_secStoreTz.c Read() 784 | Unable to decrypt data [/global/testdata].
Jul 20 16:43:29 | TestComponentExe[13044]/TestComponent T=action | test.cpp perform_read() 54 | Result -6
Jul 20 16:43:29 | TestComponentExe[13044]/framework T=action | secStoreGlobal_client.c secStoreGlobal_DisconnectService() 43
It is just a simple secstore read (secStoreGlobal_Read), which has worked before in an older firmware version.
Information
Device: WP7700
Firmware Version: SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
Hope that someone could help me with this issue.
Bart