Pass CdmIdentifier to UsageInfo Methods

The methods on WvContentDecryptionModule related to UsageInfo (Secure
Stops) do not work if kDefaultCdmIdentifier has not been provisioned.
This can occur if an app provisions and uses an origin without any app
on that device ever provisioning the default origin. More concerningly,
this will happen 100% of the time on SPOID-using devices, as there is no
way to provision the default identifier on these devices.

The fix is to pass the current identifier to these methods so that they
do not have to use kDefaultCdmIdentifier.

Test: build_and_run_all_unit_tests.sh
Test: WV GTS Tests
Bug: 62431478
Change-Id: I92a8b4acb69c964abe8129bccf2ff48a66c4a9e0
This commit is contained in:
John W. Bruce
2017-06-16 16:54:59 -07:00
parent c3cdb531d4
commit 43b8522b70
8 changed files with 144 additions and 65 deletions

View File

@@ -99,13 +99,17 @@ class WvContentDecryptionModule : public android::RefBase, public TimerHandler {
// Secure stop related methods
virtual CdmResponseType GetUsageInfo(const std::string& app_id,
const CdmIdentifier& identifier,
CdmUsageInfo* usage_info);
virtual CdmResponseType GetUsageInfo(const std::string& app_id,
const CdmSecureStopId& ssid,
const CdmIdentifier& identifier,
CdmUsageInfo* usage_info);
virtual CdmResponseType ReleaseAllUsageInfo(const std::string& app_id);
virtual CdmResponseType ReleaseAllUsageInfo(const std::string& app_id,
const CdmIdentifier& identifier);
virtual CdmResponseType ReleaseUsageInfo(
const CdmUsageInfoReleaseMessage& message);
const CdmUsageInfoReleaseMessage& message,
const CdmIdentifier& identifier);
// Accept encrypted buffer and decrypt data.
// Decryption parameters that need to be specified are