OEMCrypto_GetDeviceID should return Not Implemented for Prov 3.0

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

This CL updates the oemcrypto reference implementation (mock) to
return OEMCrypto_ERROR_NOT_IMPLEMENTED from OEMCrypto_GetDeviceID when
the device is configured to use provisioning 3.0.

This CL also moves unit test for OEMCrypto_GetDeviceID to the section
that is run only for keybox using devices.

b/33178932

Change-Id: Ie4f9346132ce305bdbd47474dc4c0f6268f3d444
This commit is contained in:
Fred Gylys-Colwell
2016-11-30 15:54:00 -08:00
parent 1d5a03cb40
commit 50fe997cf2
2 changed files with 34 additions and 31 deletions

View File

@@ -796,6 +796,9 @@ OEMCryptoResult OEMCrypto_GetDeviceID(uint8_t* deviceID,
LOGE("OEMCrypto_GetDeviceID: OEMCrypto Not Initialized.");
return OEMCrypto_ERROR_UNKNOWN_FAILURE;
}
if (!crypto_engine->supports_keybox()) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
// Devices that do not support a keybox should use some other method to
// store the device id.
std::vector<uint8_t> dev_id_string = crypto_engine->keybox().device_id();