Hi Kent,
I have cross-compiled the trousers-0.3.11.2 and tpm4720 for running on Android-N platform on my Board. I have called these functions:
TSS_UUID SRK_UUID = TSS_UUID_SRK;
define TESTSUITE_SRK_SECRET getenv("TESTSUITE_SRK_SECRET")
define TESTSUITE_SRK_SECRET_LEN TESTSUITE_SRK_SECRET == NULL ? 0 : strlen(TESTSUITE_SRK_SECRET)
Tspi_context_create( &uihContext );
Tspi_context_connect( uihContext, NULL );
Tspi_context_GetTpmObject( uihContext, &uihTPM );
Tspi_context_LoadKeyByUUID(uihContext,TSS_PS_TYPE_SYSTEM,SRK_UUID, &uihSRK);
Tspi_GetPolicyObject(uihSRK, TSS_POLICY_USAGE, &uiSrkusagePolicy);
Tspi_policy_SetSecret(uiSrkusagePolicy, TSS_SECRET_MODE_PLAIN,
TESTSUITE_SRK_SECRET_LEN, (BYTE *)TESTSUITE_SRK_SECRET);
The call Tspi_policy_SetSecret is failing with error "invalid handle".
I dont understand why is it failing since "Tspi_GetPolicyObject" call was successfull.
Please help me how to debug this issue?
However i was not able to cross-compile tpm-tools-1.3.9.1, hence didn't ran ./tpm_takeownership call.
is it mandatory to run tpm_takeownership call?
Thanks,
Syed Mahaboob