Report provider client token

[ Merge of http://go/wvgerrit/71103 ]

A content provider may specify a provider client token in a license.
This is a client token generated by a provider. If present in a license,
they will now be included in a license renewal request.

Bug: 34386290
Test: WV unit/integration tests
Change-Id: I3db303ea4d8b4ff4495393be4015b49e13db2ffc
This commit is contained in:
Rahul Frias
2019-01-23 00:35:39 -08:00
parent 85e2c6a026
commit 7982f0848d
6 changed files with 137 additions and 5 deletions

View File

@@ -73,6 +73,7 @@ CdmResponseType ClientIdentification::Init(const std::string& client_token,
*/
CdmResponseType ClientIdentification::Prepare(
const CdmAppParameterMap& app_parameters,
const std::string& provider_client_token,
video_widevine::ClientIdentification* client_id) {
if (is_license_request_) {
@@ -147,6 +148,10 @@ CdmResponseType ClientIdentification::Prepare(
ss << (uint32_t)crypto_session_->GetSecurityPatchLevel();
client_info->set_value(ss.str());
if (!provider_client_token.empty()) {
client_id->set_provider_client_token(provider_client_token);
}
ClientIdentification_ClientCapabilities* client_capabilities =
client_id->mutable_client_capabilities();