Restrict CAS unit tests to devices that support CAS
Merge from Widevine repo of http://go/wvgerrit/151253 This updates the OEMCrypto unit test filters to remove CasOnly tests if the device does not implement the cas function OEMCrypto_LoadCasECMKeys. Test: unit tests on Luci Bug: 221256887 Change-Id: I7026c4318153ada1d85055704e87b2cef397ffca
This commit is contained in:
@@ -63,6 +63,10 @@ void DeviceFeatures::Initialize() {
|
||||
OEMCrypto_Generic_Encrypt(session, buffer, 0, iv,
|
||||
OEMCrypto_AES_CBC_128_NO_PADDING, buffer));
|
||||
printf("generic_crypto = %s.\n", generic_crypto ? "true" : "false");
|
||||
supports_cas =
|
||||
(OEMCrypto_ERROR_NOT_IMPLEMENTED !=
|
||||
OEMCrypto_LoadCasECMKeys(session, nullptr, 0, nullptr, nullptr));
|
||||
printf("supports_cas = %s.\n", supports_cas ? "true" : "false");
|
||||
OEMCrypto_CloseSession(session);
|
||||
api_version = OEMCrypto_APIVersion();
|
||||
printf("api_version = %u.\n", api_version);
|
||||
@@ -137,6 +141,7 @@ std::string DeviceFeatures::RestrictFilter(const std::string& initial_filter) {
|
||||
FilterOut(&filter, "OEMCryptoLoadsCert*");
|
||||
if (!generic_crypto) FilterOut(&filter, "*GenericCrypto*");
|
||||
if (!cast_receiver) FilterOut(&filter, "*CastReceiver*");
|
||||
if (!supports_cas) FilterOut(&filter, "*CasOnly*");
|
||||
if (derive_key_method == NO_METHOD) FilterOut(&filter, "*SessionTest*");
|
||||
if (provisioning_method
|
||||
!= OEMCrypto_OEMCertificate) FilterOut(&filter, "*Prov30*");
|
||||
|
||||
Reference in New Issue
Block a user