Revert CDM changes from oemcrypto 18.4

[ Merge of TBD ]

The merge of oemcrypto-v18 cdm branch to udc-widevine-dev
caused a number of CDM/plugin fixes to be lost.

This undoes the non-oemcrypto changes in http://go/ag/26105061

Bug: 290252845
Test: WVTS, unittests on panther
Change-Id: I2bb99f423bda351eee30276cb0e26e3d9e27fa7d
This commit is contained in:
Rahul Frias
2024-02-16 14:36:10 -08:00
parent c5e171867b
commit 8e0a3f5600
4 changed files with 54 additions and 18 deletions

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