Remove Test Keybox Again

Merge from Widevine repo of http://go/wvgerrit/69563

This CL also disables unit tests that depend on the old test keybox when run
against OEMCrypto v13 or earlier.

Unit tests that require a particular API level have been
removed.  This requirement for Android is tested in GTS tests.

Bug: 119316243
Test: unit tests
Change-Id: I9a13dbaee1693ecea906fd0184a8e2590dc5beed
This commit is contained in:
Fred Gylys-Colwell
2019-01-23 21:11:43 -08:00
parent 869fd8b0d6
commit 408509efdc
5 changed files with 31 additions and 90 deletions

View File

@@ -226,19 +226,10 @@ void WvCdmTestBase::SetUp() {
void WvCdmTestBase::InstallTestRootOfTrust() {
switch (wvoec::global_features.derive_key_method) {
case wvoec::DeviceFeatures::LOAD_TEST_KEYBOX:
// TODO(fredgc, b/119316243): REMOVE THIS! (and the lines below)
if (wvoec::global_features.api_version < 14) {
// This should work with a production android device, but will fail with
// the keyboxless ce cdm, as shipped. We are including this bit of code
// so we can develop on Android, but plan to remove it when we have a
// few more android test devices with v14 or v15 oemcrypto.
LOGE("Attempting tests without test keybox.");
} else { // TODO(fredgc, b/119316243): END OF REMOVE THIS!
ASSERT_EQ(OEMCrypto_SUCCESS,
OEMCrypto_LoadTestKeybox(
reinterpret_cast<const uint8_t*>(&wvoec::kTestKeybox),
sizeof(wvoec::kTestKeybox)));
} // TODO(fredgc, b/119316243): yeah, yeah... remove this line, too.
ASSERT_EQ(OEMCrypto_SUCCESS,
OEMCrypto_LoadTestKeybox(
reinterpret_cast<const uint8_t*>(&wvoec::kTestKeybox),
sizeof(wvoec::kTestKeybox)));
break;
case wvoec::DeviceFeatures::LOAD_TEST_RSA_KEY:
// Rare case: used by devices with baked in DRM cert.