Fix backwards compatibility
Merge from Widevine repo of http://go/wvgerrit/42403 This CL changes the names of some unit tests so that they don't run when testing an older version of oemcrypto. bug: 68275290 test: ran unit tests against v8-v14 oemcrypto. Change-Id: I773350adf4df3f3b310478400cd4d4e85789fc37
This commit is contained in:
@@ -186,8 +186,8 @@ bool DeviceFeatures::IsTestKeyboxInstalled() {
|
||||
size_t key_data_len = sizeof(key_data);
|
||||
if (OEMCrypto_GetKeyData(key_data, &key_data_len) != OEMCrypto_SUCCESS)
|
||||
return false;
|
||||
if (key_data_len != sizeof(kTestKeybox.data_)) return false;
|
||||
if (memcmp(key_data, kTestKeybox.data_, key_data_len)) return false;
|
||||
if (key_data_len != sizeof(kValidKeybox01.data_)) return false;
|
||||
if (memcmp(key_data, kValidKeybox01.data_, key_data_len)) return false;
|
||||
uint8_t dev_id[128] = {0};
|
||||
size_t dev_id_len = 128;
|
||||
if (OEMCrypto_GetDeviceID(dev_id, &dev_id_len) != OEMCrypto_SUCCESS)
|
||||
@@ -195,8 +195,8 @@ bool DeviceFeatures::IsTestKeyboxInstalled() {
|
||||
// We use strncmp instead of memcmp because we don't really care about the
|
||||
// multiple '\0' characters at the end of the device id.
|
||||
return 0 == strncmp(reinterpret_cast<const char*>(dev_id),
|
||||
reinterpret_cast<const char*>(kTestKeybox.device_id_),
|
||||
sizeof(kTestKeybox.device_id_));
|
||||
reinterpret_cast<const char*>(kValidKeybox01.device_id_),
|
||||
sizeof(kValidKeybox01.device_id_));
|
||||
}
|
||||
|
||||
void DeviceFeatures::FilterOut(std::string* current_filter,
|
||||
|
||||
Reference in New Issue
Block a user