Return failure if ignore keybox debug count is non-zero.

[ Merge of http://go/wvgerrit/141949 ]
[ Cherry-pick of http://ag/16496424 ]

If the debug count for ignoring an L1 keybox is still non-zero after
successfully processing an OTA keybox request, the dynamic layer MUST
return a failure to the CDM to keep the CDM and dynamic layer in
agreement that the L1 keybox should continue be treated as invalid.

This will trigger a fallback; but the fallback can be canceled via
the debugging app.

Bug: 210823889
Test: Android manual testing
Change-Id: I75f50ba605d17872c0e8abffc1eee13ff539f01c
This commit is contained in:
Alex Dale
2021-12-16 19:32:30 -08:00
parent f6d682b182
commit 1b35b915b5

View File

@@ -2970,6 +2970,13 @@ extern "C" OEMCryptoResult OEMCrypto_ProcessOTAKeybox(OEMCrypto_SESSION session,
LOGE("Installed OTA keybox. save ignore count failed %d, count=%u",
static_cast<int>(save_result), ignore_count);
}
if (ignore_count > 0 && result == OEMCrypto_SUCCESS) {
// If success is returned while the dynamic adapter continues
// to ignore the keybox, the CDM layer will enter an invalid
// state and apps may get stuck.
LOGD("Ignoring install success");
return OEMCrypto_ERROR_UNKNOWN_FAILURE;
}
}
}
return result;