Merge "Fix for off by one error and correct comments"
This commit is contained in:
committed by
Android (Google) Code Review
commit
f76387d1fc
@@ -1144,7 +1144,7 @@ uint32_t OEMCrypto_ResourceRatingTier(SecurityLevel level) {
|
|||||||
if (!gAdapter.get()) return 0;
|
if (!gAdapter.get()) return 0;
|
||||||
const FunctionPointers* fcn = gAdapter->GetFunctionPointers(level);
|
const FunctionPointers* fcn = gAdapter->GetFunctionPointers(level);
|
||||||
if (!fcn) return 0;
|
if (!fcn) return 0;
|
||||||
if (fcn->version < 14) return 0;
|
if (fcn->version <= 14) return 0;
|
||||||
if (fcn->ResourceRatingTier == NULL) return 0;
|
if (fcn->ResourceRatingTier == NULL) return 0;
|
||||||
return fcn->ResourceRatingTier();
|
return fcn->ResourceRatingTier();
|
||||||
}
|
}
|
||||||
@@ -1153,7 +1153,7 @@ uint32_t OEMCrypto_SupportsDecryptHash(SecurityLevel level) {
|
|||||||
if (!gAdapter.get()) return OEMCrypto_Hash_Not_Supported;
|
if (!gAdapter.get()) return OEMCrypto_Hash_Not_Supported;
|
||||||
const FunctionPointers* fcn = gAdapter->GetFunctionPointers(level);
|
const FunctionPointers* fcn = gAdapter->GetFunctionPointers(level);
|
||||||
if (!fcn) return OEMCrypto_Hash_Not_Supported;
|
if (!fcn) return OEMCrypto_Hash_Not_Supported;
|
||||||
if (fcn->version < 14) return OEMCrypto_Hash_Not_Supported;
|
if (fcn->version < 15) return OEMCrypto_Hash_Not_Supported;
|
||||||
if (fcn->BuildInformation == NULL) return OEMCrypto_Hash_Not_Supported;
|
if (fcn->BuildInformation == NULL) return OEMCrypto_Hash_Not_Supported;
|
||||||
return fcn->SupportsDecryptHash();
|
return fcn->SupportsDecryptHash();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ void DeviceFeatures::Initialize(bool is_cast_receiver,
|
|||||||
}
|
}
|
||||||
printf("cast_receiver = %s.\n", cast_receiver ? "true" : "false");
|
printf("cast_receiver = %s.\n", cast_receiver ? "true" : "false");
|
||||||
resource_rating = OEMCrypto_ResourceRatingTier();
|
resource_rating = OEMCrypto_ResourceRatingTier();
|
||||||
printf("resource_rating = %d, security leve %s.\n", resource_rating,
|
printf("resource_rating = %d, security level %s.\n", resource_rating,
|
||||||
OEMCrypto_SecurityLevel());
|
OEMCrypto_SecurityLevel());
|
||||||
uint32_t decrypt_hash_type = OEMCrypto_SupportsDecryptHash();
|
uint32_t decrypt_hash_type = OEMCrypto_SupportsDecryptHash();
|
||||||
supports_crc = (decrypt_hash_type == OEMCrypto_CRC_Clear_Buffer);
|
supports_crc = (decrypt_hash_type == OEMCrypto_CRC_Clear_Buffer);
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ static const WidevineKeybox kTestKeyboxForV13 = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is a test keybox. They will not be accepted by production systems.
|
// This is a test keybox. It will not be accepted by production systems. By
|
||||||
// By using known keyboxes for these tests, the results for a given set of
|
// using a known keybox for these tests, the results for a given set of inputs
|
||||||
// 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.
|
||||||
static const WidevineKeybox kTestKeybox = {
|
static const WidevineKeybox kTestKeybox = {
|
||||||
// Sample keybox used for test vectors
|
// Sample keybox used for test vectors
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user