Merge "trusty: keymaster-hal: Reconnect on failed VERSION"

This commit is contained in:
Treehugger Robot 2021-01-21 20:36:45 +00:00 committed by Gerrit Code Review
commit 1433d42cea
1 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,12 @@ int TrustyKeymaster::Initialize() {
if (versionRsp.error != KM_ERROR_OK) { if (versionRsp.error != KM_ERROR_OK) {
ALOGW("TA appears not to support GetVersion2, falling back (err = %d)", versionRsp.error); ALOGW("TA appears not to support GetVersion2, falling back (err = %d)", versionRsp.error);
err = trusty_keymaster_connect();
if (err) {
ALOGE("Failed to connect to trusty keymaster %d", err);
return err;
}
GetVersionRequest versionReq; GetVersionRequest versionReq;
GetVersionResponse versionRsp; GetVersionResponse versionRsp;
GetVersion(versionReq, &versionRsp); GetVersion(versionReq, &versionRsp);