OEMCrypto v14 Unit tests and reference code
Merge from Widevine repo of http://go/wvgerrit/41661 bug: 64001862 OEMCrypto V14 for Android P test: Unit tests pass Change-Id: I3314a881357c12ef63d7b257d83f6f0d07e4725a
This commit is contained in:
@@ -18,8 +18,9 @@ bool KeyControlBlock::Validate() {
|
||||
memcmp(verification_, "kc09", 4) && // add in version 9 api
|
||||
memcmp(verification_, "kc10", 4) && // add in version 10 api
|
||||
memcmp(verification_, "kc11", 4) && // add in version 11 api
|
||||
memcmp(verification_, "kc12", 4) && // add in version 11 api
|
||||
memcmp(verification_, "kc13", 4)) { // add in version 13 api
|
||||
memcmp(verification_, "kc12", 4) && // add in version 12 api
|
||||
memcmp(verification_, "kc13", 4) && // add in version 13 api
|
||||
memcmp(verification_, "kc14", 4)) { // add in version 14 api
|
||||
LOGE("KCB: BAD verification string: %4.4s", verification_);
|
||||
valid_ = false;
|
||||
} else {
|
||||
|
||||
@@ -1338,7 +1338,7 @@ extern "C" OEMCryptoResult OEMCrypto_DeriveKeysFromSessionKey(
|
||||
return OEMCrypto_SUCCESS;
|
||||
}
|
||||
|
||||
extern "C" uint32_t OEMCrypto_APIVersion() { return 13; }
|
||||
extern "C" uint32_t OEMCrypto_APIVersion() { return 14; }
|
||||
|
||||
extern "C" uint8_t OEMCrypto_Security_Patch_Level() {
|
||||
uint8_t security_patch_level = crypto_engine->config_security_patch_level();
|
||||
@@ -1378,6 +1378,11 @@ extern "C" OEMCryptoResult OEMCrypto_GetHDCPCapability(
|
||||
return OEMCrypto_SUCCESS;
|
||||
}
|
||||
|
||||
extern "C" uint32_t OEMCrypto_GetAnalogOutputFlags() {
|
||||
// TODO(b/69867568, fredgc): parameterize this.
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" bool OEMCrypto_SupportsUsageTable() {
|
||||
bool supports_usage = crypto_engine->config_supports_usage_table();
|
||||
if (LogCategoryEnabled(kLoggingTraceOEMCryptoCalls)) {
|
||||
|
||||
Reference in New Issue
Block a user