Remove test keybox one more time
Merge from Widevine repo of http://go/wvgerrit/78883 Bug: 119316243 Test: unit tests Change-Id: Ic6748a6e020c2a4058510fb5c6c5a821e57cc5fd
This commit is contained in:
@@ -236,19 +236,10 @@ void WvCdmTestBase::SetUp() {
|
|||||||
void WvCdmTestBase::InstallTestRootOfTrust() {
|
void WvCdmTestBase::InstallTestRootOfTrust() {
|
||||||
switch (wvoec::global_features.derive_key_method) {
|
switch (wvoec::global_features.derive_key_method) {
|
||||||
case wvoec::DeviceFeatures::LOAD_TEST_KEYBOX:
|
case wvoec::DeviceFeatures::LOAD_TEST_KEYBOX:
|
||||||
// TODO(fredgc, b/119316243): REMOVE THIS! (and the lines below)
|
ASSERT_EQ(OEMCrypto_SUCCESS,
|
||||||
if (wvoec::global_features.api_version < 14) {
|
OEMCrypto_LoadTestKeybox(
|
||||||
// This should work with a production android device, but will fail with
|
reinterpret_cast<const uint8_t*>(&wvoec::kTestKeybox),
|
||||||
// the keyboxless ce cdm, as shipped. We are including this bit of code
|
sizeof(wvoec::kTestKeybox)));
|
||||||
// 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.
|
|
||||||
break;
|
break;
|
||||||
case wvoec::DeviceFeatures::LOAD_TEST_RSA_KEY:
|
case wvoec::DeviceFeatures::LOAD_TEST_RSA_KEY:
|
||||||
// Rare case: used by devices with baked in DRM cert.
|
// Rare case: used by devices with baked in DRM cert.
|
||||||
|
|||||||
@@ -15,41 +15,6 @@
|
|||||||
|
|
||||||
namespace wvoec {
|
namespace wvoec {
|
||||||
|
|
||||||
// TODO(fredgc, b/119316243): REMOVE THIS KEYBOX!
|
|
||||||
// This test keybox is used for testing with OEMCrypto v13.
|
|
||||||
// It should be removed before release!
|
|
||||||
static const WidevineKeybox kTestKeyboxForV13 = {
|
|
||||||
// Sample keybox used for test vectors
|
|
||||||
{
|
|
||||||
// deviceID
|
|
||||||
0x54, 0x65, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x30, // TestKey01
|
|
||||||
0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........
|
|
||||||
}, {
|
|
||||||
// key
|
|
||||||
0xfb, 0xda, 0x04, 0x89, 0xa1, 0x58, 0x16, 0x0e,
|
|
||||||
0xa4, 0x02, 0xe9, 0x29, 0xe3, 0xb6, 0x8f, 0x04,
|
|
||||||
}, {
|
|
||||||
// data
|
|
||||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x10, 0x19,
|
|
||||||
0x07, 0xd9, 0xff, 0xde, 0x13, 0xaa, 0x95, 0xc1,
|
|
||||||
0x22, 0x67, 0x80, 0x53, 0x36, 0x21, 0x36, 0xbd,
|
|
||||||
0xf8, 0x40, 0x8f, 0x82, 0x76, 0xe4, 0xc2, 0xd8,
|
|
||||||
0x7e, 0xc5, 0x2b, 0x61, 0xaa, 0x1b, 0x9f, 0x64,
|
|
||||||
0x6e, 0x58, 0x73, 0x49, 0x30, 0xac, 0xeb, 0xe8,
|
|
||||||
0x99, 0xb3, 0xe4, 0x64, 0x18, 0x9a, 0x14, 0xa8,
|
|
||||||
0x72, 0x02, 0xfb, 0x02, 0x57, 0x4e, 0x70, 0x64,
|
|
||||||
0x0b, 0xd2, 0x2e, 0xf4, 0x4b, 0x2d, 0x7e, 0x39,
|
|
||||||
}, {
|
|
||||||
// magic
|
|
||||||
0x6b, 0x62, 0x6f, 0x78,
|
|
||||||
}, {
|
|
||||||
// Crc
|
|
||||||
0x0a, 0x7a, 0x2c, 0x35,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// This is a test keybox. It will not be accepted by production systems. By
|
// This is a test keybox. It will not be accepted by production systems. By
|
||||||
// using a known keybox for these tests, the results for a given set of inputs
|
// using a known keybox for these tests, the results for a given set of inputs
|
||||||
// to a test are predictable and can be compared to the actual results.
|
// to a test are predictable and can be compared to the actual results.
|
||||||
|
|||||||
@@ -105,8 +105,6 @@ void SessionUtil::EnsureTestKeys() {
|
|||||||
switch (global_features.derive_key_method) {
|
switch (global_features.derive_key_method) {
|
||||||
case DeviceFeatures::LOAD_TEST_KEYBOX:
|
case DeviceFeatures::LOAD_TEST_KEYBOX:
|
||||||
keybox_ = kTestKeybox;
|
keybox_ = kTestKeybox;
|
||||||
// TODO(fredgc, b/119316243): REMOVE FOLLOWING LINE:
|
|
||||||
if (global_features.api_version < 14) keybox_ = kTestKeyboxForV13;
|
|
||||||
ASSERT_EQ(OEMCrypto_SUCCESS,
|
ASSERT_EQ(OEMCrypto_SUCCESS,
|
||||||
OEMCrypto_LoadTestKeybox(
|
OEMCrypto_LoadTestKeybox(
|
||||||
reinterpret_cast<const uint8_t*>(&keybox_),
|
reinterpret_cast<const uint8_t*>(&keybox_),
|
||||||
|
|||||||
Reference in New Issue
Block a user