Snap for 8561975 from c4a2a08ee6 to tm-release
Change-Id: Ib06cd02934355fbc4a2ea878f983662ed8c513ea
This commit is contained in:
@@ -63,6 +63,10 @@ void DeviceFeatures::Initialize() {
|
|||||||
OEMCrypto_Generic_Encrypt(session, buffer, 0, iv,
|
OEMCrypto_Generic_Encrypt(session, buffer, 0, iv,
|
||||||
OEMCrypto_AES_CBC_128_NO_PADDING, buffer));
|
OEMCrypto_AES_CBC_128_NO_PADDING, buffer));
|
||||||
printf("generic_crypto = %s.\n", generic_crypto ? "true" : "false");
|
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);
|
OEMCrypto_CloseSession(session);
|
||||||
api_version = OEMCrypto_APIVersion();
|
api_version = OEMCrypto_APIVersion();
|
||||||
printf("api_version = %u.\n", api_version);
|
printf("api_version = %u.\n", api_version);
|
||||||
@@ -137,6 +141,7 @@ std::string DeviceFeatures::RestrictFilter(const std::string& initial_filter) {
|
|||||||
FilterOut(&filter, "OEMCryptoLoadsCert*");
|
FilterOut(&filter, "OEMCryptoLoadsCert*");
|
||||||
if (!generic_crypto) FilterOut(&filter, "*GenericCrypto*");
|
if (!generic_crypto) FilterOut(&filter, "*GenericCrypto*");
|
||||||
if (!cast_receiver) FilterOut(&filter, "*CastReceiver*");
|
if (!cast_receiver) FilterOut(&filter, "*CastReceiver*");
|
||||||
|
if (!supports_cas) FilterOut(&filter, "*CasOnly*");
|
||||||
if (derive_key_method == NO_METHOD) FilterOut(&filter, "*SessionTest*");
|
if (derive_key_method == NO_METHOD) FilterOut(&filter, "*SessionTest*");
|
||||||
if (provisioning_method
|
if (provisioning_method
|
||||||
!= OEMCrypto_OEMCertificate) FilterOut(&filter, "*Prov30*");
|
!= OEMCrypto_OEMCertificate) FilterOut(&filter, "*Prov30*");
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class DeviceFeatures {
|
|||||||
uint32_t resource_rating; // Device's resource rating tier.
|
uint32_t resource_rating; // Device's resource rating tier.
|
||||||
bool supports_crc; // Supported decrypt hash type CRC.
|
bool supports_crc; // Supported decrypt hash type CRC.
|
||||||
bool test_secure_buffers; // If we can create a secure buffer for testing.
|
bool test_secure_buffers; // If we can create a secure buffer for testing.
|
||||||
|
bool supports_cas; // Device supports CAS (Condition Access System).
|
||||||
uint32_t api_version;
|
uint32_t api_version;
|
||||||
OEMCrypto_ProvisioningMethod provisioning_method;
|
OEMCrypto_ProvisioningMethod provisioning_method;
|
||||||
|
|
||||||
|
|||||||
@@ -5951,9 +5951,9 @@ TEST_F(OEMCryptoLoadsCertificate, TestMaxDRMKeys) {
|
|||||||
|
|
||||||
// Attempts to load one more key than the kMaxTotalDRMPrivateKeys
|
// Attempts to load one more key than the kMaxTotalDRMPrivateKeys
|
||||||
Session s;
|
Session s;
|
||||||
encoded_rsa_key_.assign(kTestRSAPKCS8PrivateKeyInfo3_3072,
|
encoded_rsa_key_.assign(kTestRSAPKCS8PrivateKeyInfo2_2048,
|
||||||
kTestRSAPKCS8PrivateKeyInfo3_3072 +
|
kTestRSAPKCS8PrivateKeyInfo2_2048 +
|
||||||
sizeof(kTestRSAPKCS8PrivateKeyInfo3_3072));
|
sizeof(kTestRSAPKCS8PrivateKeyInfo2_2048));
|
||||||
Session ps;
|
Session ps;
|
||||||
ProvisioningRoundTrip provisioning_messages(&ps, encoded_rsa_key_);
|
ProvisioningRoundTrip provisioning_messages(&ps, encoded_rsa_key_);
|
||||||
provisioning_messages.PrepareSession(keybox_);
|
provisioning_messages.PrepareSession(keybox_);
|
||||||
|
|||||||
Reference in New Issue
Block a user