Merge "Revert workaround for falling back to L3" into sc-widevine-release

This commit is contained in:
TreeHugger Robot
2021-12-13 20:09:49 +00:00
committed by Android (Google) Code Review

View File

@@ -1232,10 +1232,6 @@ class Adapter {
}
bool IsOTAKeyboxSupported() {
// TODO(b/206570220): work around for failing Keybox reprovisioning is
// to fall back to Level 3 if the keybox is not found.
// Put this back when we can: *needs_keybox_provisioning = true;
return false;
if (!level1_valid_) return false;
if (!level1_.GenerateOTARequest) return false;
size_t buffer_size = 500; // a large buffer.
@@ -1334,9 +1330,15 @@ OEMCryptoResult OEMCrypto_InitializeAndCheckKeybox(
if (ignore_count > 0) {
LOGD("Ignoring keybox status %d", static_cast<int>(keybox_status));
}
LOGD("L1 has no keybox. Falling back to L3.");
gAdapter->FallBackToLevel3();
return OEMCrypto_SUCCESS;
if (gAdapter->IsOTAKeyboxSupported()) {
LOGD("L1 needs keybox reprovisioning.");
*needs_keybox_provisioning = true;
return OEMCrypto_SUCCESS;
} else {
LOGD("L1 has no keybox. Falling back to L3.");
gAdapter->FallBackToLevel3();
return OEMCrypto_SUCCESS;
}
}
return keybox_status;
}