Sony Patch to LicenseKeys::GetAllowedUsage()

[ Merged from http://go/wvgerrit/179214 ]

Sony has identified a 5-year-old copy-and-paste error in
LicenseKeys::GetAllowedUsage(). For entitled keys, it was calling
CanDecryptContent() instead of GetAllowedUsage() on the entitlement key
session. This meant that for entitled keys, the allowed_usage parameter
was never updated and the return value of the function was indicating
something different than intended.

Bug: 280902715
Test: build_and_run_all_unit_tests
Test: wvts on panther
Change-Id: Ic1db01b6dce08d444572f53157ff08b337c48d31
This commit is contained in:
Rahul Frias
2023-07-21 02:33:57 -07:00
parent c785d6f02f
commit 0a8acd713e

View File

@@ -130,7 +130,7 @@ bool LicenseKeys::GetAllowedUsage(const KeyId& key_id,
} else if (content_keyid_to_entitlement_key_id_.count(key_id) > 0) {
if (key_statuses_.count(content_keyid_to_entitlement_key_id_[key_id]) > 0) {
return key_statuses_[content_keyid_to_entitlement_key_id_[key_id]]
->CanDecryptContent();
->GetAllowedUsage(allowed_usage);
}
return false;
} else {