Fix some unit tests
Merge from Widevine repo of http://go/wvgerrit/42020 This CL fixes the OEMCrypto unit tests for refresh license. Test: ran unit tests bug: 64851667 bug: 72497813 Change-Id: Ice1661fd832793358b725be9016d85465f6b8d14
This commit is contained in:
committed by
Rahul Frias
parent
9ae7489938
commit
8230484de2
@@ -1183,7 +1183,6 @@ CdmResponseType CdmLicense::HandleEntitlementKeyResponse(
|
||||
entitled_license.set_license_start_time(license.license_start_time());
|
||||
for (size_t i = 0; i < wrapped_keys_.size(); ++i) {
|
||||
for (int x = 0; x < entitled_license.key().size(); ++x) {
|
||||
LOGE("Test for %s", wrapped_keys_[i].wrapping_key_id().c_str());
|
||||
if (entitled_license.key(x).id() ==
|
||||
wrapped_keys_[i].wrapping_key_id()) {
|
||||
video_widevine::License::KeyContainer* kc =
|
||||
@@ -1191,11 +1190,9 @@ CdmResponseType CdmLicense::HandleEntitlementKeyResponse(
|
||||
kc->set_type(video_widevine::License::KeyContainer::CONTENT);
|
||||
kc->set_key(wrapped_keys_[i].wrapped_key());
|
||||
kc->set_id(wrapped_keys_[i].key_id());
|
||||
LOGE("Add %s", wrapped_keys_[i].wrapping_key_id().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
LOGE("%d license keys", entitled_license.key_size());
|
||||
policy_engine_->SetLicense(entitled_license);
|
||||
}
|
||||
return resp;
|
||||
|
||||
@@ -295,7 +295,7 @@ OEMCryptoResult SubLicenseKeySession::DoSubLicenseLoadKeys(
|
||||
|
||||
OEMCryptoResult sts;
|
||||
const std::string& sub_session_key = keys_[key_index].sub_session_key();
|
||||
LOGE("ssksize = %d", sub_session_key.size());
|
||||
LOGV("ssksize = %d", sub_session_key.size());
|
||||
|
||||
M_TIME(
|
||||
sts = OEMCrypto_DeriveKeysFromSessionKey(
|
||||
|
||||
@@ -1112,7 +1112,7 @@ class WvCdmRequestLicenseTest : public WvCdmTestBase {
|
||||
if (kHttpOk != http_status_code) {
|
||||
LogResponseError(message, http_status_code);
|
||||
}
|
||||
EXPECT_EQ(kHttpOk, http_status_code);
|
||||
EXPECT_EQ(kHttpOk, http_status_code) << message;
|
||||
|
||||
std::string drm_msg;
|
||||
if (kHttpOk == http_status_code) {
|
||||
|
||||
@@ -56,8 +56,6 @@ LOCAL_PROPRIETARY_MODULE := true
|
||||
# When built, explicitly put it in the DATA/bin directory.
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
||||
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
ifneq ($(TARGET_ENABLE_MEDIADRM_64), true)
|
||||
LOCAL_MODULE_TARGET_ARCH := arm x86 mips
|
||||
endif
|
||||
|
||||
@@ -566,7 +566,7 @@ void Session::FillRefreshMessage(size_t key_count, uint32_t control_bits,
|
||||
encrypted_license().keys[i].key_id_length);
|
||||
if (global_features.api_version == 14) {
|
||||
// For version 14, we require OEMCrypto to handle kc14 for all licenses.
|
||||
memcpy(license_.keys[i].control.verification, "kc14", 4);
|
||||
memcpy(encrypted_license().keys[i].control.verification, "kc14", 4);
|
||||
} else if (global_features.api_version == 13) {
|
||||
// For version 13, we require OEMCrypto to handle kc13 for all licenses.
|
||||
memcpy(encrypted_license().keys[i].control.verification, "kc13", 4);
|
||||
|
||||
Reference in New Issue
Block a user