Offline playback failure for ATSC 3.0

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

For ATSC licenses use ATSC certificates/private keys rather than
any cert/private key specified in the license.

Bug: 216420542
Test: WV unit/integration tests
Change-Id: I12541577e672c67cc4c6eb3365e48bf2034fd9a4
This commit is contained in:
Rahul Frias
2022-03-24 18:37:45 -07:00
parent 8b52f39a58
commit 63ff6596b6

View File

@@ -263,8 +263,14 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id,
usage_entry_ = std::move(license_data.usage_entry);
usage_entry_index_ = license_data.usage_entry_index;
CdmResponseType result = LoadPrivateOrLegacyKey(
license_data.drm_certificate, license_data.wrapped_private_key);
// If ATSC mode is enabled, use ATSC DRM cert/private key, rather than any
// cert/private key embedded in the license.
CdmResponseType result =
atsc_mode_enabled_
? LoadPrivateKey()
: LoadPrivateOrLegacyKey(license_data.drm_certificate,
license_data.wrapped_private_key);
if (result != NO_ERROR) return result;
// Attempts to restore a released offline license are treated as a release